A running single validator chain node.
- Implemented types
- Available extensions
Properties
-
eventStream
→ Stream<
ChainEvent> -
Available on Node, provided by the NodeEvents extension
Every chain event as it happens. The engine hands each event over synchronously inside the node call that caused it; listeners run on the next microtask, after that call has returned, so a listener may call the node again. Listening redirects events from the buffer behind events to this broadcast stream until the node is disposed, which closes it.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isReleased → bool
-
Whether the native handle has already been released.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accountAddress(
Uint8List publicKey) → Uint8List - The 32 byte chain address of a public key.
-
balance(
Uint8List address) → int -
Available on Node, provided by the NodeQueries extension
The balance of an address. -
blockAt(
int height) → Uint8List -
Available on Node, provided by the NodeStorage extension
The encoded finalized block atheight, 1 based. Throws when absent. -
commit(
{int? timestamp}) → int -
Available on Node, provided by the NodeSending extension
Produces the next block and returns its height.timestampdefaults to the new height, a monotone placeholder for callers that do not track time. -
credit(
Uint8List address, int amount) → void - Credits an address at genesis. Throws once a block has been produced.
-
dispose(
) → void - Releases the native node.
-
drainEvents(
) → String -
Available on Node, provided by the NodeQueries extension
Chain events since the last drain, as a JSON array string. -
events(
) → List< ChainEvent> -
Available on Node, provided by the NodeEvents extension
Chain events buffered since the last call, decoded. Returns nothing while eventStream is live, because events then go to the stream. -
free(
) → void - Alias of dispose.
-
fundAccount(
int amount) → Account -
Available on Node, provided by the NodeFunding extension
A fresh Ed25519 account credited withamountat genesis. Throws once the first block has been produced. -
fundHybridAccount(
int amount) → Account -
Available on Node, provided by the NodeFunding extension
A fresh hybrid post quantum account credited withamountat genesis. -
height(
) → int -
Available on Node, provided by the NodeQueries extension
The chain height. -
mempoolSize(
) → int -
Available on Node, provided by the NodeQueries extension
Transactions waiting in the mempool. -
metrics(
) → String -
Available on Node, provided by the NodeQueries extension
A Prometheus format metrics snapshot. -
metricValues(
) → Map< String, double> - Prometheus metric values keyed by sample name with its labels verbatim.
-
newAccount(
) → Account - A fresh Ed25519 account.
-
newAccountHybrid(
) → Account - A fresh hybrid post quantum account; spend it with NodeTransfers.submitTransferHybrid.
-
nextNonce(
Uint8List address) → int -
Available on Node, provided by the NodeQueries extension
The nonce the next transfer fromaddressmust carry: the committed nonce advanced past every transfer from it still pending in the mempool. -
nonce(
Uint8List address) → int -
Available on Node, provided by the NodeQueries extension
The committed nonce of an address. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
produceBlock(
int timestamp) → int - Produces the next block and returns its height.
-
proveAccount(
Uint8List address) → Uint8List -
Available on Node, provided by the NodeQueries extension
A state inclusion proof for an address. -
saveTo(
String path) → Future< void> -
Available on Node, provided by the NodeStorage extension
Writes snapshot topathatomically: a sibling temporary file is written and flushed, then renamed overpath. -
send(
Account from, Uint8List to, int amount, {int fee = 0}) → Uint8List -
Available on Node, provided by the NodeSending extension
Sendsamountfromfromto the addressto. The nonce comes from NodeQueries.nextNonce, so several transfers from one account may be queued before a block. The signature scheme follows the account; hybrid accounts carry nofee. Returns the transaction id. -
sendFromStore(
KeyStore store, Uint8List from, Uint8List to, int amount, {int fee = 0}) → Uint8List -
Available on Node, provided by the NodeSending extension
Sendsamountfrom the key store account atfromwith the nonce from NodeQueries.nextNonce; the secret never leaves the engine. -
sendTo(
Account from, Account to, int amount, {int fee = 0}) → Uint8List -
Available on Node, provided by the NodeSending extension
send to another account. -
snapshot(
) → Uint8List -
Available on Node, provided by the NodeStorage extension
The chain id, the genesis credits and every finalized block with its certificate as one blob. Pending mempool transactions are not included. -
stateRoot(
) → Uint8List -
Available on Node, provided by the NodeQueries extension
The 32 byte state root. -
submitTransfer(
Uint8List secret, Uint8List to, int amount, int nonce) → Uint8List -
Available on Node, provided by the NodeTransfers extension
Submits an Ed25519 transfer and returns its transaction id. -
submitTransferFee(
Uint8List secret, Uint8List to, int amount, int nonce, int fee) → Uint8List -
Available on Node, provided by the NodeTransfers extension
Submits a transfer carrying a priorityfee. -
submitTransferFromStore(
KeyStore store, Uint8List from, Uint8List to, int amount, int nonce, {int fee = 0}) → Uint8List -
Available on Node, provided by the NodeTransfers extension
Signs a transfer from thestoreaccount atfromand admits it. The secret never leaves the engine. Returns the transaction id. -
submitTransferHybrid(
Uint8List secret, Uint8List public, Uint8List to, int amount, int nonce) → Uint8List -
Available on Node, provided by the NodeTransfers extension
Submits a hybrid post quantum transfer with the blobs from Node.newAccountHybrid. -
submitTx(
Uint8List encodedTx) → Uint8List -
Available on Node, provided by the NodeTransfers extension
Admits an already signed, encoded transaction, for example from KeyStoreSigning.signTransfer. Returns its transaction id. -
toString(
) → String -
A string representation of this object.
inherited
-
verifyAccountProof(
Uint8List proof) → bool -
Available on Node, provided by the NodeViews extension
Whetherprooffrom NodeQueries.proveAccount holds under the current state root.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited