ConstThe validity data of the transaction
The demos instance
The response from the node
Broadcast a confirmed transaction and wait for inclusion.
Polls the node's getTransactionStatus RPC until the tx is observed
included or failed, or until opts.timeoutMs elapses (default 30s).
Use this when you want a single call with a deterministic outcome.
Use plain broadcast() when you want to handle async confirmation
yourself.
On timeout, throws BroadcastTimeoutError carrying the tx hash,
the last observed state, and the elapsed time so the caller can
resume polling.
When opts.failFastOnBroadcastError is true, also throws
BroadcastFailedError synchronously when the broadcast itself can't
reach the node (e.g., ECONNREFUSED, ENOTFOUND). HTTP 5xx responses
are NOT considered fail-fast cases - the server did answer, so the
tx may still have landed and polling should run. Defaults to false
for one release to preserve current callers' behavior.
The validity data of the transaction (from confirm)
The demos instance
Optionalopts: { OptionalfailIf true, throw BroadcastFailedError
immediately when the broadcast can't contact the node. Defaults to false.
OptionalpollDelay between status polls. Defaults to 500.
OptionaltimeoutTotal time to wait for inclusion. Defaults to 30_000.
The original broadcast response and the terminal status.
Confirms a transaction.
The transaction to confirm
The validity data of the transaction containing the gas information.
Signs a transaction after hashing its content.
The transaction to be signed.
The keypair to use for signing.
A Promise that resolves to the signed transaction.
Signs a message with a given algorithm.
The message to sign.
The keypair to use for signing.
The algorithm related to the keypair.
A Promise that resolves to the signed message.
Convert a legacy DEM number input to an OS bigint for internal
carrying. Only whole-DEM number inputs are accepted on this
legacy path — fractional DEM is rejected with a clear error
directing callers to the bigint OS path (denomination.demToOs).
Rationale: silently flooring (the previous behaviour) discarded up
to ~10^9 OS per call without warning. The migration period
tolerates legacy number callers, but only at exact DEM
granularity — anything sub-DEM must come in as bigint so the
caller has explicitly opted into OS arithmetic.
Create a signed L2PS hash update transaction for DTR relay to validators.
L2PS hash updates are self-directed transactions that carry consolidated hash information representing multiple L2PS transactions. These transactions are automatically relayed to validators via DTR (Distributed Transaction Routing) to enable consensus on L2PS network activity without exposing transaction content.
The unique identifier of the L2PS network
SHA-256 hash representing all L2PS transactions
Number of transactions included in this hash update
The demos instance (for getting the address nonce)
The signed L2PS hash update transaction
Create a signed DEMOS transaction to send native tokens to a given address.
P4 dual-input:
bigint: OS amount (preferred — 1 DEM = 10^9 OS).number: DEM amount (legacy, deprecated). Auto-converted to OS.Internal carrier in tx.content.amount is bigint OS; the
serializerGate (run from demos.sign) emits the right wire shape
per the connected node's fork status.
The reciever
DEM number (legacy) or OS bigint.
The demos instance (for getting the address nonce)
The signed transaction.
Create a signed networkUpgrade proposal transaction.
Only active validators may propose. The node rejects proposals whose
proposedParameters violate safety bounds (≤50% change, absolute
floor/ceiling) or overlap keys with other pending/activating proposals.
Activation block. Must be ≥ tallyBlock + grace period.
UUID. Also used as lexicographic activation-order tiebreaker.
Subset of NetworkParameters to change.
Human-readable reason, ≤1024 bytes.
Create a signed validatorStake transaction. Used both for initial
validator registration and to top up an existing stake.
Stake amount in base-unit DEMOS, encoded as a bigint string.
Validator's public endpoint (required on first stake; subsequent top-ups may overwrite it).
The demos instance (for nonce + signing).
Create a signed DEMOS transaction to store binary data on the blockchain. Data is stored in the sender's account.
The binary data to store (will be base64-encoded)
The demos instance (for getting the address nonce)
The signed storage transaction.
Create a signed DEMOS transaction to send native tokens to a given address.
Alias of pay. Same dual-input semantics — bigint OS
preferred, number DEM accepted as the deprecated path.
The reciever
DEM number (legacy) or OS bigint.
The demos instance (for getting the address nonce)
The signed transaction.
Create a signed validatorUnstake transaction. Arms the unstake lock
period; after UNSTAKE_LOCK_BLOCKS have elapsed the validator may call
validatorExit.
Create a signed validatorExit transaction. Only accepted by the
network once unstake_available_at <= currentBlock.
Create a signed networkUpgradeVote transaction.
The voter must be in the validator snapshot taken at the proposal's confirmation block, and may cast exactly one vote per proposal (final, non-revocable).
Broadcasts a transaction for execution.