export = MoneroRpcConnection; /** * Maintains a connection and sends requests to a Monero RPC API. */ declare class MoneroRpcConnection { /** *
Construct a RPC connection.
* *Examples:
* *
* let connection1 = new MoneroRpcConnection("http://localhost:38081", "daemon_user", "daemon_password_123")
*
* let connection2 = new MoneroRpcConnection({
* uri: http://localhost:38081,
* username: "daemon_user",
* password: "daemon_password_123",
* rejectUnauthorized: false // accept self-signed certificates e.g. for local development
* });
*
*
* @param {string|object|MoneroRpcConnection} uriOrConfigOrConnection - RPC endpoint URI, MoneroRpcConnection, or equivalent JS object
* @param {string} uriOrConfigOrConnection.uri - URI of the RPC endpoint
* @param {string} uriOrConfigOrConnection.username - username to authenticate with the RPC endpoint (optional)
* @param {string} uriOrConfigOrConnection.password - password to authenticate with the RPC endpoint (optional)
* @param {boolean} uriOrConfigOrConnection.rejectUnauthorized - rejects self-signed certificates if true (default true)
* @param {string} username - username to authenticate with the RPC endpoint (optional)
* @param {string} password - password to authenticate with the RPC endpoint (optional)
* @param {boolean} rejectUnauthorized - reject self-signed certificates if true (default true)
*/
constructor(uriOrConfigOrConnection: string | object | MoneroRpcConnection, username: string, password: string, rejectUnauthorized: boolean);
config: any;
getUri(): any;
getUsername(): any;
getPassword(): any;
getRejectUnauthorized(): any;
getConfig(): any;
/**
* Sends a JSON RPC request.
*
* @param method is the JSON RPC method to invoke
* @param params are request parameters
* @return {object} is the response map
*/
sendJsonRequest(method: any, params: any): object;
/**
* Sends a RPC request to the given path and with the given paramters.
*
* E.g. "/get_transactions" with params
*/
sendPathRequest(path: any, params: any): Promise