Skip to main content

WaitForTx

enum WaitForTx : Enum<WaitForTx>

Determines what to wait for after executing a transaction.

Users should almost always use WaitForTx::Finalized (the default). The GraphQL client interacts with the indexer, not the fullnode directly. Using WaitForTx::IndexedOnNode only guarantees the transaction is indexed on the fullnode (meaning you can submit transactions that reference objects created by this transaction), but subsequent queries using the transaction ID can still fail until the transaction is indexed on the indexer.

Entries

INDEXED_ON_NODEINDEXED_ON_NODE
Indicates that the transaction effects will be usable in subsequent transactions (you can reference objects created by this transaction), and that the transaction itself is indexed on the fullnode.
FINALIZEDFINALIZED
Indicates that the transaction has been included in a checkpoint, and all queries may include it.

Properties

NameSummary
entriesval entries: EnumEntries<WaitForTx>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
nameval name: String
ordinalval ordinal: Int

Functions

NameSummary
valueOffun valueOf(value: String): WaitForTx
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
valuesfun values(): Array<WaitForTx>
Returns an array containing the constants of this enum type, in the order they're declared.

FINALIZED

FINALIZED

Indicates that the transaction has been included in a checkpoint, and all queries may include it.

Properties

NameSummary
nameval name: String
ordinalval ordinal: Int

INDEXED_ON_NODE

INDEXED_ON_NODE

Indicates that the transaction effects will be usable in subsequent transactions (you can reference objects created by this transaction), and that the transaction itself is indexed on the fullnode.

Warning: This does not guarantee the transaction is indexed on the indexer. Since the GraphQL client queries the indexer, subsequent queries with this transaction ID may still fail. Prefer WaitForTx::Finalized unless you have a specific reason to use this.

Properties

NameSummary
nameval name: String
ordinalval ordinal: Int