Class RPC

Sends RPC requests to the RPC node, also has wrappers for actions that only read the network (write actions are handled by the Wallet class)

Implements

Constructors

  • Parameters

    • rpc_url: string
    • Optional use_pending: boolean = false

      If true, uses "pending" instead of "receivable" in RPC action names, for compatibility with older versions of the node

    Returns RPC

Properties

headers: Record<string, string>

HTTP headers to send with any RPC requests

rpc_url: string
use_pending: boolean

Methods

  • The function that sends the RPC POST request

    Parameters

    • payload: Record<string, any>

    Returns Promise<Record<string, any>>