Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RPCClient

RPCClient connects to given host and port of an Ellcrys node.

export
class

RPCClient

Hierarchy

  • RPCClient

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates an instance of RPCClient.

    memberof

    RPCClient

    Parameters

    • Optional client: IClient

    Returns RPCClient

Properties

Optional client

client: IClient

client references the JSON-RPC 2.0 client

type

{Client}

memberof

RPCClient

clientOpts

clientOpts: any

clientOpts contains the options to pass to the client call request

type

{*}

memberof

RPCClient

Private token

token: string

The session token to access private endpoints

type

{string}

memberof

Spell

Methods

call

  • call(method: string, params: any): Promise<any>
  • Call a RPC method

    memberof

    RPCClient

    Parameters

    • method: string

      The RPC method full name

    • params: any

      The method's parameters

    Returns Promise<any>

setToken

  • setToken(token: string): void
  • Set the session token

    memberof

    RPCClient

    Parameters

    • token: string

    Returns void