Hierarchy (view full)

Constructors

Properties

Methods

beaconConsensusParameters beaconGetBaseEpoch beaconGetBeacon beaconGetEpoch beaconGetEpochBlock beaconGetFutureEpoch beaconStateToGenesis beaconWaitEpoch beaconWatchEpochs beaconWatchLatestEpoch callServerStreaming callUnary consensusEstimateGas consensusGetBlock consensusGetChainContext consensusGetGenesisDocument consensusGetLightBlock consensusGetNextBlockState consensusGetParameters consensusGetSignerNonce consensusGetStatus consensusGetTransactions consensusGetTransactionsWithProofs consensusGetTransactionsWithResults consensusGetUnconfirmedTransactions consensusMinGasPrice consensusStateSyncGet consensusStateSyncGetPrefixes consensusStateSyncIterate consensusStateToGenesis consensusSubmitEvidence consensusSubmitTx consensusSubmitTxNoWait consensusSubmitTxWithProof consensusWatchBlocks debugControllerSetEpoch debugControllerWaitNodesRegistered governanceActiveProposals governanceConsensusParameters governanceGetEvents governancePendingUpgrades governanceProposal governanceProposals governanceStateToGenesis governanceVotes governanceWatchEvents keyManagerStateToGenesis nodeControllerCancelUpgrade nodeControllerGetStatus nodeControllerIsReady nodeControllerIsSynced nodeControllerRequestShutdown nodeControllerUpgradeBinary nodeControllerWaitReady nodeControllerWaitSync registryConsensusParameters registryGetEntities registryGetEntity registryGetEvents registryGetNode registryGetNodeByConsensusAddress registryGetNodes registryGetNodeStatus registryGetRuntime registryGetRuntimes registryStateToGenesis registryWatchEntities registryWatchEvents registryWatchNodeList registryWatchNodes registryWatchRuntimes rootHashConsensusParameters rootHashGetEvents rootHashGetGenesisBlock rootHashGetIncomingMessageQueue rootHashGetIncomingMessageQueueMeta rootHashGetLastRoundResults rootHashGetLatestBlock rootHashGetPastRoundRoots rootHashGetRoundRoots rootHashGetRuntimeState rootHashStateToGenesis rootHashWatchBlocks rootHashWatchEvents rootHashWatchExecutorCommitments runtimeClientCheckTx runtimeClientGetBlock runtimeClientGetEvents runtimeClientGetGenesisBlock runtimeClientGetLastRetainedBlock runtimeClientGetTransactions runtimeClientGetTransactionsWithResults runtimeClientGetUnconfirmedTransactions runtimeClientQuery runtimeClientSubmitTx runtimeClientSubmitTxMeta runtimeClientSubmitTxNoWait runtimeClientWatchBlocks schedulerConsensusParameters schedulerGetCommittees schedulerGetValidators schedulerStateToGenesis schedulerWatchCommittees stakingAccount stakingAddresses stakingAllowance stakingCommissionScheduleAddresses stakingCommonPool stakingConsensusParameters stakingDebondingDelegationInfosFor stakingDebondingDelegationsFor stakingDebondingDelegationsTo stakingDelegationInfosFor stakingDelegationsFor stakingDelegationsTo stakingGetEvents stakingGovernanceDeposits stakingLastBlockFees stakingStateToGenesis stakingThreshold stakingTokenSymbol stakingTokenValueExponent stakingTotalSupply stakingWatchEvents storageGetCheckpointChunk storageGetCheckpoints storageGetDiff storageSyncGet storageSyncGetPrefixes storageSyncIterate storageWorkerGetLastSyncedRound storageWorkerPauseCheckpointer

Constructors

Properties

base: string
client: AbstractClientBase

Methods

  • GetBeacon gets the beacon for the provided block height. Calling this method with height consensus.HeightLatest should return the beacon for the latest finalized block.

    Parameters

    Returns Promise<Uint8Array>

  • GetEpoch returns the epoch number at the specified block height. Calling this method with height consensus.HeightLatest, should return the epoch of latest known block.

    Parameters

    Returns Promise<longnum>

  • WaitEpoch waits for a specific epoch.

    Note that an epoch is considered reached even if any epoch greater than the one specified is reached (e.g., that the current epoch is already in the future).

    Parameters

    Returns Promise<void>

  • WatchEpochs returns a channel that produces a stream of messages on epoch transitions.

    Upon subscription the current epoch is sent immediately.

    Returns ClientReadableStream<longnum>

  • WatchLatestEpoch returns a channel that produces a stream of messages on epoch transitions. If an epoch transition happens before the previous epoch is read from the channel, the old epochs are overwritten.

    Upon subscription the current epoch is sent immediately.

    Returns ClientReadableStream<longnum>

  • GetChainContext returns the chain domain separation context.

    Returns Promise<string>

  • GetTransactions returns a list of all transactions contained within a consensus block at a specific height.

    NOTE: Any of these transactions could be invalid.

    Parameters

    Returns Promise<Uint8Array[]>

  • GetUnconfirmedTransactions returns a list of transactions currently in the local node's mempool. These have not yet been included in a block.

    Returns Promise<Uint8Array[]>

  • MinGasPrice returns the minimum gas price.

    Returns Promise<Uint8Array>

  • SubmitTx submits a signed consensus transaction and waits for the transaction to be included in a block. Use SubmitTxNoWait if you only need to broadcast the transaction.

    Parameters

    Returns Promise<void>

  • SubmitTxNoWait submits a signed consensus transaction, but does not wait for the transaction to be included in a block. Use SubmitTx if you need to wait for execution.

    Parameters

    Returns Promise<void>

  • SetEpoch manually sets the current epoch to the given epoch.

    NOTE: This only works with a mock beacon backend and will otherwise return an error.

    Parameters

    Returns Promise<void>

  • WaitNodesRegistered waits for the given number of nodes to register.

    Parameters

    • count: number

    Returns Promise<void>

  • CancelUpgrade cancels the specific pending upgrade, unless it is already in progress.

    Parameters

    Returns Promise<void>

  • IsReady checks whether the node is ready to accept runtime work.

    Returns Promise<boolean>

  • IsSynced checks whether the node has finished syncing.

    Returns Promise<boolean>

  • RequestShutdown requests the node to shut down gracefully.

    If the wait argument is true then the method will also wait for the shutdown to complete.

    Parameters

    • wait: boolean

    Returns Promise<void>

  • UpgradeBinary submits an upgrade descriptor to a running node. The node will wait for the appropriate epoch, then update its binaries and shut down.

    Parameters

    Returns Promise<void>

  • WaitReady waits for the node to accept runtime work.

    Returns Promise<void>

  • WaitSync waits for the node to finish syncing.

    Returns Promise<void>

  • GetNodeByConsensusAddress looks up a node by its consensus address at the specified block height. The nature and format of the consensus address depends on the specific consensus backend implementation used.

    Returns Promise<Node>

  • WatchNodeList returns a channel that produces a stream of NodeList. Upon subscription, the node list for the current epoch will be sent immediately.

    Each node list will be sorted by node ID in lexicographically ascending order.

    Returns ClientReadableStream<RegistryNodeList>

  • WatchBlocks returns a channel that produces a stream of annotated blocks.

    The latest block if any will get pushed to the stream immediately. Subsequent blocks will be pushed into the stream as they are confirmed.

    Parameters

    • runtimeID: Uint8Array

    Returns ClientReadableStream<RootHashAnnotatedBlock>

  • WatchExecutorCommitments returns a channel that produces a stream of executor commitments observed in the consensus layer P2P network.

    Note that these commitments may not have been processed by consensus, commitments may be received in any order and duplicates are possible.

    Parameters

    • runtimeID: Uint8Array

    Returns ClientReadableStream<RootHashExecutorCommitment>

  • GetUnconfirmedTransactions fetches all unconfirmed runtime transactions that are currently pending to be included in a block.

    Parameters

    • runtimeID: Uint8Array

    Returns Promise<Uint8Array[]>

  • SubmitTx submits a transaction to the runtime transaction scheduler and waits for transaction execution results.

    Parameters

    Returns Promise<Uint8Array>

  • SubmitTxNoWait submits a transaction to the runtime transaction scheduler but does not wait for transaction execution.

    Parameters

    Returns Promise<void>

  • WatchCommittees returns a channel that produces a stream of Committee.

    Upon subscription, all committees for the current epoch will be sent immediately.

    Returns ClientReadableStream<SchedulerCommittee>

  • Addresses returns the addresses of all accounts with a non-zero general or escrow balance.

    Parameters

    Returns Promise<Uint8Array[]>

  • Allowance looks up the allowance for the given owner/beneficiary combination.

    Parameters

    Returns Promise<Uint8Array>

  • CommissionScheduleAddresses returns the addresses of all accounts with non-empty commission schedule.

    Parameters

    Returns Promise<Uint8Array[]>

  • CommonPool returns the common pool balance.

    Parameters

    Returns Promise<Uint8Array>

  • GovernanceDeposits returns the governance deposits account balance.

    Parameters

    Returns Promise<Uint8Array>

  • LastBlockFees returns the collected fees for previous block.

    Parameters

    Returns Promise<Uint8Array>

  • TokenSymbol returns the token's ticker symbol.

    Parameters

    Returns Promise<string>

  • TokenValueExponent is the token's value base-10 exponent, i.e. 1 token = 10**TokenValueExponent base units.

    Parameters

    Returns Promise<number>

  • TotalSupply returns the total number of base units.

    Parameters

    Returns Promise<Uint8Array>

  • GetCheckpointChunk fetches a specific chunk from an existing chekpoint.

    Parameters

    Returns ClientReadableStream<Uint8Array>