Interface RPCInterface

Implement this interface if the built-in RPC class does not fit your needs. The easiest way to do this is by just extending the built-in RPC class

interface RPCInterface {
    DECIMALS?: number;
    rpc_url: string;
    use_pending: boolean;
    call(payload): Promise<Record<string, string>>;
    get_account_info(account, include_confirmed?, representative?, weight?, pending?): Promise<AccountInfoRPC>;
    get_account_receivable(account, count?, threshold?, source?): Promise<AccountReceivableRPC | AccountReceivableThresholdRPC | AccountReceivableSourceRPC>;
    get_block_info(block_hash): Promise<BlockInfoRPC>;
}

Implemented by

Properties

DECIMALS?: number
rpc_url: string
use_pending: boolean

Methods

  • Parameters

    • payload: Record<string, any>

    Returns Promise<Record<string, string>>

  • Parameters

    • account: `ban_${string}` | `nano_${string}`
    • Optional include_confirmed: boolean
    • Optional representative: boolean
    • Optional weight: boolean
    • Optional pending: boolean

    Returns Promise<AccountInfoRPC>