Bitcoin Core  21.99.0
P2P Digital Currency
protocol.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2019 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 
83 
86 
89 };
90 
91 #endif // BITCOIN_RPC_PROTOCOL_H
RPC_METHOD_NOT_FOUND
@ RPC_METHOD_NOT_FOUND
Definition: protocol.h:31
RPC_INVALID_REQUEST
@ RPC_INVALID_REQUEST
Standard JSON-RPC 2.0 errors.
Definition: protocol.h:28
RPC_VERIFY_REJECTED
@ RPC_VERIFY_REJECTED
Transaction or block was rejected by network rules.
Definition: protocol.h:47
RPC_MISC_ERROR
@ RPC_MISC_ERROR
General application defined errors.
Definition: protocol.h:39
HTTP_SERVICE_UNAVAILABLE
@ HTTP_SERVICE_UNAVAILABLE
Definition: protocol.h:19
RPC_INTERNAL_ERROR
@ RPC_INTERNAL_ERROR
Definition: protocol.h:35
RPC_WALLET_ALREADY_UNLOCKED
@ RPC_WALLET_ALREADY_UNLOCKED
Wallet is already unlocked.
Definition: protocol.h:79
HTTP_BAD_METHOD
@ HTTP_BAD_METHOD
Definition: protocol.h:17
RPC_WALLET_WRONG_ENC_STATE
@ RPC_WALLET_WRONG_ENC_STATE
Command given in wrong wallet encryption state (encrypting an encrypted wallet etc....
Definition: protocol.h:77
RPC_CLIENT_P2P_DISABLED
@ RPC_CLIENT_P2P_DISABLED
No valid connection manager instance found.
Definition: protocol.h:64
RPC_TRANSACTION_REJECTED
@ RPC_TRANSACTION_REJECTED
Definition: protocol.h:54
RPC_VERIFY_ERROR
@ RPC_VERIFY_ERROR
General error during transaction or block submission.
Definition: protocol.h:46
HTTPStatusCode
HTTPStatusCode
HTTP status codes.
Definition: protocol.h:10
RPC_INVALID_PARAMETER
@ RPC_INVALID_PARAMETER
Invalid, missing or duplicate parameter.
Definition: protocol.h:43
HTTP_BAD_REQUEST
@ HTTP_BAD_REQUEST
Definition: protocol.h:13
RPC_CLIENT_MEMPOOL_DISABLED
@ RPC_CLIENT_MEMPOOL_DISABLED
Chain errors.
Definition: protocol.h:68
RPC_CLIENT_IN_INITIAL_DOWNLOAD
@ RPC_CLIENT_IN_INITIAL_DOWNLOAD
Still downloading initial blocks.
Definition: protocol.h:59
RPC_FORBIDDEN_BY_SAFE_MODE
@ RPC_FORBIDDEN_BY_SAFE_MODE
Unused reserved codes, kept around for backwards compatibility. Do not reuse.
Definition: protocol.h:88
RPC_WALLET_KEYPOOL_RAN_OUT
@ RPC_WALLET_KEYPOOL_RAN_OUT
Keypool ran out, call keypoolrefill first.
Definition: protocol.h:74
RPC_WALLET_INVALID_ACCOUNT_NAME
@ RPC_WALLET_INVALID_ACCOUNT_NAME
Backwards compatible aliases.
Definition: protocol.h:85
RPC_TRANSACTION_ALREADY_IN_CHAIN
@ RPC_TRANSACTION_ALREADY_IN_CHAIN
Definition: protocol.h:55
RPC_METHOD_DEPRECATED
@ RPC_METHOD_DEPRECATED
RPC method is deprecated.
Definition: protocol.h:50
RPC_DESERIALIZATION_ERROR
@ RPC_DESERIALIZATION_ERROR
Error parsing or validating structure in raw format.
Definition: protocol.h:45
HTTP_FORBIDDEN
@ HTTP_FORBIDDEN
Definition: protocol.h:15
RPC_WALLET_NOT_FOUND
@ RPC_WALLET_NOT_FOUND
Invalid wallet specified.
Definition: protocol.h:80
RPC_WALLET_PASSPHRASE_INCORRECT
@ RPC_WALLET_PASSPHRASE_INCORRECT
The wallet passphrase entered was incorrect.
Definition: protocol.h:76
RPC_WALLET_INVALID_LABEL_NAME
@ RPC_WALLET_INVALID_LABEL_NAME
Invalid label name.
Definition: protocol.h:73
RPC_DATABASE_ERROR
@ RPC_DATABASE_ERROR
Database error.
Definition: protocol.h:44
RPC_WALLET_UNLOCK_NEEDED
@ RPC_WALLET_UNLOCK_NEEDED
Enter the wallet passphrase with walletpassphrase first.
Definition: protocol.h:75
RPC_WALLET_ENCRYPTION_FAILED
@ RPC_WALLET_ENCRYPTION_FAILED
Failed to encrypt the wallet.
Definition: protocol.h:78
RPC_IN_WARMUP
@ RPC_IN_WARMUP
Client still warming up.
Definition: protocol.h:49
HTTP_UNAUTHORIZED
@ HTTP_UNAUTHORIZED
Definition: protocol.h:14
RPC_WALLET_ERROR
@ RPC_WALLET_ERROR
Wallet errors.
Definition: protocol.h:71
RPC_INVALID_ADDRESS_OR_KEY
@ RPC_INVALID_ADDRESS_OR_KEY
Invalid address or key.
Definition: protocol.h:41
RPC_WALLET_NOT_SPECIFIED
@ RPC_WALLET_NOT_SPECIFIED
No wallet specified (error when there are multiple wallets loaded)
Definition: protocol.h:81
RPC_OUT_OF_MEMORY
@ RPC_OUT_OF_MEMORY
Ran out of memory during operation.
Definition: protocol.h:42
HTTP_OK
@ HTTP_OK
Definition: protocol.h:12
RPC_WALLET_INSUFFICIENT_FUNDS
@ RPC_WALLET_INSUFFICIENT_FUNDS
Not enough funds in wallet or account.
Definition: protocol.h:72
RPCErrorCode
RPCErrorCode
Bitcoin RPC error codes.
Definition: protocol.h:23
RPC_CLIENT_NODE_ALREADY_ADDED
@ RPC_CLIENT_NODE_ALREADY_ADDED
Node is already added.
Definition: protocol.h:60
RPC_CLIENT_NODE_CAPACITY_REACHED
@ RPC_CLIENT_NODE_CAPACITY_REACHED
Max number of outbound or block-relay connections already open.
Definition: protocol.h:65
HTTP_NOT_FOUND
@ HTTP_NOT_FOUND
Definition: protocol.h:16
RPC_WALLET_ALREADY_LOADED
@ RPC_WALLET_ALREADY_LOADED
This same wallet is already loaded.
Definition: protocol.h:82
RPC_CLIENT_NODE_NOT_ADDED
@ RPC_CLIENT_NODE_NOT_ADDED
Node has not been added before.
Definition: protocol.h:61
RPC_CLIENT_NODE_NOT_CONNECTED
@ RPC_CLIENT_NODE_NOT_CONNECTED
Node to disconnect not found in connected nodes.
Definition: protocol.h:62
RPC_VERIFY_ALREADY_IN_CHAIN
@ RPC_VERIFY_ALREADY_IN_CHAIN
Transaction already in chain.
Definition: protocol.h:48
RPC_TYPE_ERROR
@ RPC_TYPE_ERROR
Unexpected type was passed as parameter.
Definition: protocol.h:40
RPC_INVALID_PARAMS
@ RPC_INVALID_PARAMS
Definition: protocol.h:32
RPC_PARSE_ERROR
@ RPC_PARSE_ERROR
Definition: protocol.h:36
RPC_TRANSACTION_ERROR
@ RPC_TRANSACTION_ERROR
Aliases for backward compatibility.
Definition: protocol.h:53
RPC_CLIENT_INVALID_IP_OR_SUBNET
@ RPC_CLIENT_INVALID_IP_OR_SUBNET
Invalid IP/Subnet.
Definition: protocol.h:63
RPC_CLIENT_NOT_CONNECTED
@ RPC_CLIENT_NOT_CONNECTED
P2P client errors.
Definition: protocol.h:58
HTTP_INTERNAL_SERVER_ERROR
@ HTTP_INTERNAL_SERVER_ERROR
Definition: protocol.h:18