@ellcrys/spell
Version:
The official JavaScript library for Ellcrys
71 lines (70 loc) • 1.78 kB
TypeScript
import RPCClient from "../rpcclient";
import Namespace from "./namespace";
/**
* Node accesses information about an Elld client
*
* @export
* @class Node
*/
export default class Node extends Namespace {
/**
* Creates an instance of Node.
*
* @param {RPCClient} client
* @memberof Node
*/
constructor(client: RPCClient);
/**
* 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.
*
* @param {string} hash The transaction hash
* @returns {Promise<TxStatus>}
* @memberof Node
*/
getTransactionStatus(hash: string): Promise<TxStatus>;
/**
* Get the current status of the node
* block synchronization session. Returns
* null when the node is not syncing.
*
* @returns {Promise<SyncStat | null>}
* @memberof Node
*/
getSyncStat(): Promise<SyncStat | null>;
/**
* Check whether the node is currently
* syncing blocks with a peer.
*
* @returns {Promise<boolean>}
* @memberof Node
*/
isSyncing(): Promise<boolean>;
/**
* Get information about the node
*
* @returns {Promise<NodeInfo>}
* @memberof Node
*/
info(): Promise<NodeInfo>;
/**
* Get the node's configurations
*
* @returns {Promise<NodeInfo>}
* @memberof Node
*/
config(): Promise<NodeConfig>;
/**
* Returns non-sensitive information about
* a node.
*
* @returns {Promise<BasicNodeInfo>}
* @memberof Node
*/
basic(): Promise<BasicNodeInfo>;
}