Bitcoin Core  27.99.0
P2P Digital Currency
protocol.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2021 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_RPC_PROTOCOL_H
7 #define BITCOIN_RPC_PROTOCOL_H
8 
11 {
12  HTTP_OK = 200,
20 };
21 
24 {
26  // RPC_INVALID_REQUEST is internally mapped to HTTP_BAD_REQUEST (400).
27  // It should not be used for application-layer errors.
29  // RPC_METHOD_NOT_FOUND is internally mapped to HTTP_NOT_FOUND (404).
30  // It should not be used for application-layer errors.
33  // RPC_INTERNAL_ERROR should only be used for genuine errors in bitcoind
34  // (for example datadir corruption).
36  RPC_PARSE_ERROR = -32700,
37 
49  RPC_IN_WARMUP = -28,
51 
56 
66 
69 
84 
87 
90 };
91 
92 #endif // BITCOIN_RPC_PROTOCOL_H
HTTPStatusCode
HTTP status codes.
Definition: protocol.h:11
@ HTTP_BAD_REQUEST
Definition: protocol.h:13
@ HTTP_BAD_METHOD
Definition: protocol.h:17
@ HTTP_OK
Definition: protocol.h:12
@ HTTP_SERVICE_UNAVAILABLE
Definition: protocol.h:19
@ HTTP_UNAUTHORIZED
Definition: protocol.h:14
@ HTTP_NOT_FOUND
Definition: protocol.h:16
@ HTTP_FORBIDDEN
Definition: protocol.h:15
@ HTTP_INTERNAL_SERVER_ERROR
Definition: protocol.h:18
RPCErrorCode
Bitcoin RPC error codes.
Definition: protocol.h:24
@ RPC_CLIENT_NODE_NOT_CONNECTED
Node to disconnect not found in connected nodes.
Definition: protocol.h:62
@ RPC_WALLET_NOT_SPECIFIED
No wallet specified (error when there are multiple wallets loaded)
Definition: protocol.h:81
@ RPC_WALLET_INVALID_ACCOUNT_NAME
Backwards compatible aliases.
Definition: protocol.h:86
@ RPC_VERIFY_ALREADY_IN_CHAIN
Transaction already in chain.
Definition: protocol.h:48
@ RPC_WALLET_INVALID_LABEL_NAME
Invalid label name.
Definition: protocol.h:73
@ RPC_WALLET_UNLOCK_NEEDED
Enter the wallet passphrase with walletpassphrase first.
Definition: protocol.h:75
@ RPC_WALLET_ALREADY_UNLOCKED
Wallet is already unlocked.
Definition: protocol.h:79
@ RPC_OUT_OF_MEMORY
Ran out of memory during operation.
Definition: protocol.h:42
@ RPC_PARSE_ERROR
Definition: protocol.h:36
@ RPC_FORBIDDEN_BY_SAFE_MODE
Unused reserved codes, kept around for backwards compatibility. Do not reuse.
Definition: protocol.h:89
@ RPC_CLIENT_INVALID_IP_OR_SUBNET
Invalid IP/Subnet.
Definition: protocol.h:63
@ RPC_MISC_ERROR
General application defined errors.
Definition: protocol.h:39
@ RPC_WALLET_INSUFFICIENT_FUNDS
Not enough funds in wallet or account.
Definition: protocol.h:72
@ RPC_WALLET_ALREADY_EXISTS
There is already a wallet with the same name.
Definition: protocol.h:83
@ RPC_CLIENT_NODE_ALREADY_ADDED
Node is already added.
Definition: protocol.h:60
@ RPC_WALLET_WRONG_ENC_STATE
Command given in wrong wallet encryption state (encrypting an encrypted wallet etc....
Definition: protocol.h:77
@ RPC_METHOD_NOT_FOUND
Definition: protocol.h:31
@ RPC_INVALID_PARAMS
Definition: protocol.h:32
@ RPC_WALLET_ENCRYPTION_FAILED
Failed to encrypt the wallet.
Definition: protocol.h:78
@ RPC_TRANSACTION_ALREADY_IN_CHAIN
Definition: protocol.h:55
@ RPC_TYPE_ERROR
Unexpected type was passed as parameter.
Definition: protocol.h:40
@ RPC_CLIENT_MEMPOOL_DISABLED
Chain errors.
Definition: protocol.h:68
@ RPC_TRANSACTION_REJECTED
Definition: protocol.h:54
@ RPC_TRANSACTION_ERROR
Aliases for backward compatibility.
Definition: protocol.h:53
@ RPC_METHOD_DEPRECATED
RPC method is deprecated.
Definition: protocol.h:50
@ RPC_CLIENT_NOT_CONNECTED
P2P client errors.
Definition: protocol.h:58
@ RPC_INVALID_PARAMETER
Invalid, missing or duplicate parameter.
Definition: protocol.h:43
@ RPC_IN_WARMUP
Client still warming up.
Definition: protocol.h:49
@ RPC_WALLET_ERROR
Wallet errors.
Definition: protocol.h:71
@ RPC_WALLET_ALREADY_LOADED
This same wallet is already loaded.
Definition: protocol.h:82
@ RPC_VERIFY_ERROR
General error during transaction or block submission.
Definition: protocol.h:46
@ RPC_WALLET_NOT_FOUND
Invalid wallet specified.
Definition: protocol.h:80
@ RPC_INTERNAL_ERROR
Definition: protocol.h:35
@ RPC_WALLET_KEYPOOL_RAN_OUT
Keypool ran out, call keypoolrefill first.
Definition: protocol.h:74
@ RPC_DATABASE_ERROR
Database error.
Definition: protocol.h:44
@ RPC_CLIENT_IN_INITIAL_DOWNLOAD
Still downloading initial blocks.
Definition: protocol.h:59
@ RPC_CLIENT_NODE_NOT_ADDED
Node has not been added before.
Definition: protocol.h:61
@ RPC_DESERIALIZATION_ERROR
Error parsing or validating structure in raw format.
Definition: protocol.h:45
@ RPC_WALLET_PASSPHRASE_INCORRECT
The wallet passphrase entered was incorrect.
Definition: protocol.h:76
@ RPC_INVALID_REQUEST
Standard JSON-RPC 2.0 errors.
Definition: protocol.h:28
@ RPC_VERIFY_REJECTED
Transaction or block was rejected by network rules.
Definition: protocol.h:47
@ RPC_CLIENT_NODE_CAPACITY_REACHED
Max number of outbound or block-relay connections already open.
Definition: protocol.h:65
@ RPC_INVALID_ADDRESS_OR_KEY
Invalid address or key.
Definition: protocol.h:41
@ RPC_CLIENT_P2P_DISABLED
No valid connection manager instance found.
Definition: protocol.h:64