Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Spell

Spell provides access to a client RPC functionalities.

export
class

Spell

Hierarchy

  • Spell

Index

Constructors

constructor

Properties

auth

auth: Auth

Authentication module

type

{Auth}

memberof

Spell

ell

ell: Ell

logger

logger: Logger

Logger Module

type

{Logger}

memberof

Spell

miner

miner: Miner

Miner module

type

{Miner}

memberof

Spell

net

net: Net

Net Module

type

{Net}

memberof

Spell

node

node: Node

Node module

type

{Node}

memberof

Spell

pool

pool: Pool

Mempool module

type

{Pool}

memberof

Spell

rpc

rpc: RPC

RPC Module

type

{RPC}

memberof

Spell

rpcClient

rpcClient: RPCClient

The RPC client

type

{RPCClient}

memberof

Spell

state

state: State

State module

type

{State}

memberof

Spell

Methods

authenticate

  • authenticate(username: string, password: string): Promise<string>
  • Request for a session token from the node.

    memberof

    Spell

    Parameters

    • username: string

      The node's RPC username

    • password: string

      The node's RPC password

    Returns Promise<string>

    A session token

provideClient

  • provideClient(options: ConnectOptions): Promise<RPCClient>
  • provideClient attempts to connect to an Ellcrys JSON-RPC server. If it succeeds, it will use the connection in future RPC method calls.

    memberof

    Spell

    Parameters

    • options: ConnectOptions

      The connection options

    Returns Promise<RPCClient>

    An initialized client