Dash Core  0.12.2.1
P2P Digital Currency
protocol.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2015 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_RPCPROTOCOL_H
7 #define BITCOIN_RPCPROTOCOL_H
8 
9 #include <list>
10 #include <map>
11 #include <stdint.h>
12 #include <string>
13 #include <boost/filesystem.hpp>
14 
15 #include <univalue.h>
16 
19 {
20  HTTP_OK = 200,
28 };
29 
32 {
38  RPC_PARSE_ERROR = -32700,
39 
52  RPC_IN_WARMUP = -28,
53 
58 
67 
78 };
79 
80 std::string JSONRPCRequest(const std::string& strMethod, const UniValue& params, const UniValue& id);
81 UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id);
82 std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id);
83 UniValue JSONRPCError(int code, const std::string& message);
84 
86 boost::filesystem::path GetAuthCookieFile();
88 bool GenerateAuthCookie(std::string *cookie_out);
90 bool GetAuthCookie(std::string *cookie_out);
92 void DeleteAuthCookie();
93 
94 #endif // BITCOIN_RPCPROTOCOL_H
UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, const UniValue &id)
Definition: protocol.cpp:39
Client still warming up.
Definition: protocol.h:55
std::string JSONRPCReply(const UniValue &result, const UniValue &error, const UniValue &id)
Definition: protocol.cpp:51
Node is already added.
Definition: protocol.h:63
Invalid account name.
Definition: protocol.h:72
Invalid address or key.
Definition: protocol.h:45
Keypool ran out, call keypoolrefill first.
Definition: protocol.h:73
bool GenerateAuthCookie(std::string *cookie_out)
Definition: protocol.cpp:79
Failed to encrypt the wallet.
Definition: protocol.h:77
General error during transaction or block submission.
Definition: protocol.h:50
HTTPStatusCode
HTTP status codes.
Definition: protocol.h:18
bool GetAuthCookie(std::string *cookie_out)
Definition: protocol.cpp:106
Transaction already in chain.
Definition: protocol.h:52
Ran out of memory during operation.
Definition: protocol.h:46
Error parsing or validating structure in raw format.
Definition: protocol.h:49
Enter the wallet passphrase with walletpassphrase first.
Definition: protocol.h:74
Transaction or block was rejected by network rules.
Definition: protocol.h:51
static bool error(const char *format)
Definition: util.h:131
Server is in safe mode, and command is not allowed in safe mode.
Definition: protocol.h:43
The wallet passphrase entered was incorrect.
Definition: protocol.h:75
General application defined errors.
Definition: protocol.h:41
Unexpected type was passed as parameter.
Definition: protocol.h:44
Node to disconnect not found in connected nodes.
Definition: protocol.h:65
Not enough funds in wallet or account.
Definition: protocol.h:71
void DeleteAuthCookie()
Definition: protocol.cpp:122
Invalid, missing or duplicate parameter.
Definition: protocol.h:47
Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
Definition: protocol.h:76
Unspecified problem with wallet (key not found etc.)
Definition: protocol.h:70
Node has not been added before.
Definition: protocol.h:64
Still downloading initial blocks.
Definition: protocol.h:62
std::exception thrown in command handling
Definition: protocol.h:42
UniValue JSONRPCError(int code, const std::string &message)
std::string JSONRPCRequest(const std::string &strMethod, const UniValue &params, const UniValue &id)
boost::filesystem::path GetAuthCookieFile()
Definition: protocol.cpp:72
Standard JSON-RPC 2.0 errors.
Definition: protocol.h:34
Wallet errors.
Definition: protocol.h:69
Invalid IP/Subnet.
Definition: protocol.h:66
RPCErrorCode
Dash Core RPC error codes.
Definition: protocol.h:31
Dash Core is not connected.
Definition: protocol.h:61
P2P client errors.
Definition: protocol.h:60
Database error.
Definition: protocol.h:48
result
Definition: rpcuser.py:37