Hierarchy

  • { $host: string; intAsString?: boolean; getAccountByPubkey: any; getAccountByPubkeyAndHash: any; getAccountByPubkeyAndHeight: any; getAccountNextNonce: any; getChainEnds: any; getChannelByPubkey: any; getContract: any; getContractCode: any; getContractPoI: any; getCurrentGeneration: any; getCurrentKeyBlock: any; getCurrentKeyBlockHash: any; getCurrentKeyBlockHeight: any; getGenerationByHash: any; getGenerationByHeight: any; getKeyBlockByHash: any; getKeyBlockByHeight: any; getMicroBlockHeaderByHash: any; getMicroBlockTransactionByHashAndIndex: any; getMicroBlockTransactionsByHash: any; getMicroBlockTransactionsCountByHash: any; getNameEntryByName: any; getOracleByPubkey: any; getOracleQueriesByPubkey: any; getOracleQueryByPubkeyAndQueryId: any; getPeerPubkey: any; getPendingAccountTransactionsByPubkey: any; getPendingKeyBlock: any; getStatus: any; getTopHeader: any; getTransactionByHash: any; getTransactionInfoByHash: any; postTransaction: any; protectedDryRunTxs: any }
    • Node

Constructors

  • Parameters

    • url: string

      Url for node API

    • options: NodeOptionalParams & { ignoreVersion?: boolean } = {}

      Options

    Returns Node

Properties

$host: string
intAsString?: boolean
url: string

Methods

  • Get an account by public key

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ authFun?: string; balance: bigint; contractId?: string; id: string; kind?: AccountKind; nonce: number; payable?: boolean }>

  • Get an account by public key after the block indicated by hash. Can be either a micro block or a keyblock hash

    Parameters

    • Rest ...args: [string, string, ...(undefined | {})[]]

    Returns Promise<{ authFun?: string; balance: bigint; contractId?: string; id: string; kind?: AccountKind; nonce: number; payable?: boolean }>

  • Get an account by public key after the opening key block of the generation at height

    Parameters

    • Rest ...args: [string, number, ...(undefined | {})[]]

    Returns Promise<{ authFun?: string; balance: bigint; contractId?: string; id: string; kind?: AccountKind; nonce: number; payable?: boolean }>

  • Get an account's next nonce; This is computed according to whatever is the current account nonce and what transactions are currently present in the transaction pool

    Parameters

    Returns Promise<{ nextNonce: number }>

  • Get oldest keyblock hashes counting from genesis including orphans

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ body: string[] }>

  • Get channel by public key

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ channelAmount: bigint; channelReserve: bigint; delegateIds: { initiator?: string[] | undefined; responder?: string[] | undefined; }; id: string; initiatorAmount: bigint; initiatorId: string; lockPeriod: string; lockedUntil: string; responderAmount: bigint; responderId: string; round: number; soloRound: string; stateHash: string }>

  • Get a contract by pubkey

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ abiVersion: string; active: boolean; deposit: bigint; id: string; ownerId: string; referrerIds: string[]; vmVersion: string }>

  • Get contract code by pubkey

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ bytecode: string }>

  • Get a proof of inclusion for a contract

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ poi: string }>

  • Get the current generation

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ keyBlock: { hash: string; height: number; prevHash: string; prevKeyHash: string; stateHash: string; miner: string; beneficiary: string; target: string; pow?: string[] | undefined; nonce?: number | undefined; time: number; version: number; info: string; }; microBlocks: string[] }>

  • Get the current key block

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ beneficiary: string; hash: string; height: number; info: string; miner: string; nonce?: number; pow?: string[]; prevHash: string; prevKeyHash: string; stateHash: string; target: string; time: number; version: number }>

  • Get the hash of the current key block

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ hash: string }>

  • Get the height of the current key block

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ height: number }>

  • Get a generation by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ keyBlock: { hash: string; height: number; prevHash: string; prevKeyHash: string; stateHash: string; miner: string; beneficiary: string; target: string; pow?: string[] | undefined; nonce?: number | undefined; time: number; version: number; info: string; }; microBlocks: string[] }>

  • Get a generation by height

    Parameters

    • Rest ...args: [number, ...(undefined | {})[]]

    Returns Promise<{ keyBlock: { hash: string; height: number; prevHash: string; prevKeyHash: string; stateHash: string; miner: string; beneficiary: string; target: string; pow?: string[] | undefined; nonce?: number | undefined; time: number; version: number; info: string; }; microBlocks: string[] }>

  • Get a key block by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ beneficiary: string; hash: string; height: number; info: string; miner: string; nonce?: number; pow?: string[]; prevHash: string; prevKeyHash: string; stateHash: string; target: string; time: number; version: number }>

  • Get a key block by height

    Parameters

    • Rest ...args: [number, ...(undefined | {})[]]

    Returns Promise<{ beneficiary: string; hash: string; height: number; info: string; miner: string; nonce?: number; pow?: string[]; prevHash: string; prevKeyHash: string; stateHash: string; target: string; time: number; version: number }>

  • Get a micro block header by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ hash: string; height: number; pofHash: string; prevHash: string; prevKeyHash: string; signature: string; stateHash: string; time: number; txsHash: string; version: number }>

  • Get a micro block transaction by hash and index

    Parameters

    • Rest ...args: [string, number, ...(undefined | {})[]]

    Returns Promise<{ blockHash: string; blockHeight: number; hash: string; signatures: string[]; tx: { type: "Tx"; recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 53 more ...; version: number; } }>

  • Get micro block transactions by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ transactions: ({ tx: { type: "Tx"; recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 53 more ...; version: number; }; blockHeight: number; blockHash: string; hash: string; signatures: str...)[] }>

  • Get micro block transaction count by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ count: string }>

  • Get name entry from naming system

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ id: string; owner?: string; pointers: ({ key: string; id: string; })[]; ttl: number }>

  • Get an oracle by public key

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ abiVersion: string; id: string; queryFee: bigint; queryFormat: string; responseFormat: string; ttl: number }>

  • Get oracle queries by public key

    Parameters

    • Rest ...args: [string, ...(undefined | { fromParam?: string; limit?: number; typeParam?: OracleQueryType })[]]

    Returns Promise<{ oracleQueries: ({ id: string; senderId: string; senderNonce: string; oracleId: string; query: string; response: string; ttl: number; responseTtl: { type: TTLType; value: string; }; fee: bigint; })[] }>

  • Get an oracle query by public key and query ID

    Parameters

    • Rest ...args: [string, string, ...(undefined | {})[]]

    Returns Promise<{ fee: bigint; id: string; oracleId: string; query: string; response: string; responseTtl: { type: TTLType; value: string; }; senderId: string; senderNonce: string; ttl: number }>

  • Get peer public key

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ pubkey: string }>

  • Get pending account transactions by public key

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ transactions: ({ tx: { type: "Tx"; recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 53 more ...; version: number; }; blockHeight: number; blockHash: string; hash: string; signatures: str...)[] }>

  • Get the pending key block

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ beneficiary: string; hash: string; height: number; info: string; miner: string; nonce?: number; pow?: string[]; prevHash: string; prevKeyHash: string; stateHash: string; target: string; time: number; version: number }>

  • Get the status of a node

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ difficulty: string; genesisKeyBlockHash: string; listening: boolean; networkId: string; nodeRevision: string; nodeVersion: string; peerConnections: { inbound: number; outbound: number; }; peerCount: number; peerPubkey: string; pendingTransactionsCount: number; protocols: ({ version: number; effectiveAtHeight: number; })[]; solutions: number; syncProgress?: number; syncing: boolean; topBlockHeight: number; topKeyBlockHash: string }>

  • Get the top header (either key or micro block)

    Parameters

    • Rest ...args: (undefined | {})[]

    Returns Promise<{ beneficiary?: string; hash: string; height: number; info?: string; miner?: string; nonce?: number; pofHash?: string; pow?: string[]; prevHash: string; prevKeyHash: string; signature?: string; stateHash: string; target?: string; time: number; txsHash?: string; version: number }>

  • Get a transaction by hash

    Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ blockHash: string; blockHeight: number; hash: string; signatures: string[]; tx: { type: "Tx"; recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 53 more ...; version: number; } }>

  • Parameters

    • Rest ...args: [string, ...(undefined | {})[]]

    Returns Promise<{ callInfo?: { callerId: string; callerNonce: string; height: number; contractId: string; gasPrice: bigint; gasUsed: number; log: { address: string; topics: string[]; data: string; }[]; returnValue: string; returnType: ContractCallReturnType; }; gaInfo?: { callerId: string; height: number; gasPrice: bigint; gasUsed: number; returnValue: string; returnType: GAReturnType; innerObject?: { callInfo?: { callerId: string; callerNonce: string; ... 6 more ...; returnType: ContractCallReturnType; } | undefined; gaInfo?: ... | undefined; txInfo?: string | undefined; } | undef...; txInfo?: string }>

  • Post a new transaction

    Parameters

    • Rest ...args: [{ tx: string }, ...(undefined | {})[]]

    Returns Promise<{ txHash: `th_${string}` }>

  • Dry-run transactions on top of a given block. Supports all TXs except GAMetaTx, PayingForTx and OffchainTx. The maximum gas limit of all calls is capped. The maximum gas limit per request is a global node setting. Since DryRunCallReq object do not have a mandatory gas field, if not set a default value of 1000000 is being used instead.

    Parameters

    • Rest ...args: [{ accounts?: ({ pubKey: string; amount: bigint; })[]; top?: number; txEvents?: boolean; txs: ({ tx?: string | undefined; callReq?: { calldata: string; contract: string; amount?: bigint | undefined; gas?: number | undefined; caller?: string | undefined; nonce?: number | undefined; abiVersion?: string | undefined; context?: { ...; } | undefined; } | undefined; })[] }, ...(undefined | {})[]]

    Returns Promise<{ results: ({ type: string; result: string; reason?: string | undefined; callObj?: { callerId: string; callerNonce: string; height: number; contractId: string; gasPrice: bigint; gasUsed: number; log: { address: string; topics: string[]; data: string; }[]; returnValue: string; returnType: ContractCallReturnType; } | undefined; })[]; txEvents?: ({ [x: string]: unknown; })[] }>

Generated using TypeDoc