Skip to main content

NodeCalls

A NodeCall is a request that reads blockchain state from a connected DEMOS node. NodeCall methods on the Demos class are denoted by the get prefix (e.g. getLastBlockNumber). All methods below assume you have an initialized, connected Demos instance:

Blocks

Get last block number

Returns the height of the chain tip.

Get last block hash

Returns the hash of the chain tip.

Get block by number

Get block by hash

Get a range of blocks

getBlocks(start, limit) — fetch up to limit blocks starting at start. Pass "latest" for the head:

Transactions

Get transaction by hash

Get a transaction page

getTransactions(start, limit) — paginated listing across the chain. Replaces the deprecated getAllTxs(). Accepts "latest" or a block number for start.
getAllTxs() is deprecated in v3.x and will be removed in a future major. Use getTransactions(start, limit) instead.

Get an address’s transaction history

Wait for a transaction to land

broadcastAndWait(validityData, opts?) (added in v2.12) broadcasts and then polls getTransactionStatus until the transaction reaches a terminal state. See Broadcasting a Transaction for the full reference, including BroadcastTimeoutError and BroadcastFailedError handling.

Addresses

Get address info

Returns balance and metadata for an address. In v3+ the balance field is a bigint in OS (1 DEM = 10⁹ OS). See Amounts & Denominations for conversion helpers.

Get address nonce

Used when constructing storage program payloads (and other nonce-sensitive operations).

Peer information

Get node identity

Get peer list

Get mempool

Validators

List validators

Get a single validator

Get a validator’s staked amount

Returns the staked amount as a bigint-encoded string in OS.
See Validator Staking for the corresponding stake / unstake / validatorExit write-side methods.

Network parameters & governance

These methods read the live state of network governance — the parameters validators have voted into effect, plus the proposals currently in flight.

Get current network parameters

Returns the live networkFee, rpcFee, minValidatorStake, etc. Cached per RPC URL with a 30-second TTL.

Get fork-activation status (getNetworkInfo)

Introduced in v3.0 for sub-DEM denomination detection. Returns the activation state of every known fork on the connected node.
The result is cached on the Demos instance. On RPC failure the SDK assumes pre-fork wire format and emits a one-time warning. You don’t normally need to call this yourself — transfer/pay/sign consult the cached fork status automatically.

List active proposals

Get votes for a proposal

Get the upgrade history

Activated proposals, ordered.
See Network Governance for the corresponding proposeNetworkUpgrade / voteOnUpgrade write-side methods.

Storage Programs

The SDK exposes one read shortcut for storage programs — demos.storagePrograms.read(address). The other 8 storage RPCs (listing, search, field-level lookup) are reachable via demos.rpcCall(...). See Storage Programs RPC Queries for the full reference.

Message signing & verification

Sign and verify arbitrary messages (independent of transactions). Algorithm defaults to the wallet’s connection algorithm; override with options.algorithm.

Web2 nodecalls

The web2 namespace fetches off-chain content via the node’s proxy (DAHR). See Web2 Integration and DAHR API Reference for the full surface.

IPFS quote

demos.ipfs.quote(fileSizeBytes, operation, durationBlocks) returns the cost estimate (in OS post-fork) for an IPFS operation ("IPFS_ADD" | "IPFS_PIN" | "IPFS_UNPIN"). The estimate is fork-aware.
Not yet available. IPFS storage is not implemented on the node side — there is no ipfsQuote handler, and the storage-program engine currently only supports onchain storage. The ipfs SDK module and demos.ipfs.quote are forward-looking and will not function against current networks.

TLSNotary

demos.tlsnotary(config?) lazily initializes a TLSNotary client for HTTPS attestations. See TLSNotary for the full flow.

API Reference

https://kynesyslabs.github.io/demosdk-api-ref/classes/websdk.Demos.html