Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Node

Node accesses information about an Elld client

export
class

Node

Hierarchy

Index

Constructors

constructor

Properties

Protected client

client: RPCClient

Methods

basic

  • basic(): Promise<BasicNodeInfo>
  • Returns non-sensitive information about a node.

    memberof

    Node

    Returns Promise<BasicNodeInfo>

config

  • config(): Promise<NodeConfig>

disableSync

  • disableSync(): Promise<boolean>
  • Disable block synchronization on the node

    memberof

    Node

    Returns Promise<boolean>

enableSync

  • enableSync(): Promise<boolean>
  • Enable block synchronization on the node

    memberof

    Node

    Returns Promise<boolean>

getSyncStat

  • getSyncStat(): Promise<SyncStat | null>
  • Get the current status of the node block synchronization session. Returns null when the node is not syncing.

    memberof

    Node

    Returns Promise<SyncStat | null>

getTransactionFromPool

  • getTransactionFromPool(txHash: string): Promise<Transaction>
  • Get transaction from the transaction pool

    memberof

    Node

    Parameters

    • txHash: string

      hash of the tx to fetch from pool

    Returns Promise<Transaction>

getTransactionStatus

  • getTransactionStatus(hash: string): Promise<TxStatus>
  • Get the status of a transaction.

    The status is 'pooled' when the transaction is currently in the transaction pool or 'mined' if the transaction has been added to a mined block. If the transaction hash is unrecognised, 'unknown' is returned.

    memberof

    Node

    Parameters

    • hash: string

      The transaction hash

    Returns Promise<TxStatus>

info

  • info(): Promise<NodeInfo>

isSyncEnabled

  • isSyncEnabled(): Promise<boolean>
  • Checks whether block synchronization is enabled on the node.

    memberof

    Node

    Returns Promise<boolean>

isSyncing

  • isSyncing(): Promise<boolean>
  • Check whether the node is currently syncing blocks with a peer.

    memberof

    Node

    Returns Promise<boolean>