Class: MoneroRpcConnection

MoneroRpcConnection(config)

Maintains a connection and sends requests to a Monero RPC API.

Constructor

new MoneroRpcConnection(config)

Constructs a RPC connection using the given config.
Parameters:
Name Type Description
config object defines the rpc configuration
Properties
Name Type Description
uri string is the uri of the rpc endpoint
protocol string is the protocol of the rpc endpoint
host string is the host of the rpc endpoint
port int is the port of the rpc endpoint
user string is a username to authenticate with the rpc endpoint
pass string is a password to authenticate with the rpc endpoint
maxRequestsPerSecond string is the maximum requests per second to allow
Source:

Methods

_throttledRequest()

Makes a throttled request.
Source:

(async) sendBinaryRequest(path)

Sends a binary RPC request.
Parameters:
Name Type Description
path is the path of the binary RPC method to invoke
Source:
Returns:
a Uint8Array with the binary response

(async) sendJsonRequest(method, params) → {object}

Sends a JSON RPC request.
Parameters:
Name Type Description
method is the JSON RPC method to invoke
params are request parameters
Source:
Returns:
is the response map
Type
object

(async) sendPathRequest()

Sends a RPC request to the given path and with the given paramters. E.g. "/get_transactions" with params
Source: