Bitcoin
Classes | Functions
request.h File Reference
#include <string>
#include <univalue.h>

Go to the source code of this file.

Classes

class  JSONRPCRequest
 

Functions

UniValue JSONRPCRequestObj (const std::string &strMethod, const UniValue &params, const UniValue &id)
 
UniValue JSONRPCReplyObj (const UniValue &result, const UniValue &error, const UniValue &id)
 
std::string JSONRPCReply (const UniValue &result, const UniValue &error, const UniValue &id)
 
UniValue JSONRPCError (int code, const std::string &message)
 
bool GenerateAuthCookie (std::string *cookie_out)
 
bool GetAuthCookie (std::string *cookie_out)
 
void DeleteAuthCookie ()
 
std::vector< UniValueJSONRPCProcessBatchReply (const UniValue &in, size_t num)
 

Function Documentation

◆ DeleteAuthCookie()

void DeleteAuthCookie ( )

Delete RPC authentication cookie from disk

◆ GenerateAuthCookie()

bool GenerateAuthCookie ( std::string *  cookie_out)

Generate a new RPC authentication cookie and write it to disk

the umask determines what permissions are used to create this file - these are set to 077 in init.cpp unless overridden with -sysperms.

◆ GetAuthCookie()

bool GetAuthCookie ( std::string *  cookie_out)

Read the RPC authentication cookie from disk

◆ JSONRPCError()

UniValue JSONRPCError ( int  code,
const std::string &  message 
)

◆ JSONRPCProcessBatchReply()

std::vector<UniValue> JSONRPCProcessBatchReply ( const UniValue in,
size_t  num 
)

Parse JSON-RPC batch reply into a vector

◆ JSONRPCReply()

std::string JSONRPCReply ( const UniValue result,
const UniValue error,
const UniValue id 
)

◆ JSONRPCReplyObj()

UniValue JSONRPCReplyObj ( const UniValue result,
const UniValue error,
const UniValue id 
)

◆ JSONRPCRequestObj()

UniValue JSONRPCRequestObj ( const std::string &  strMethod,
const UniValue params,
const UniValue id 
)

JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility, but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were unspecified (HTTP errors and contents of 'error').

1.0 spec: http://json-rpc.org/wiki/specification 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html