TxChangedEvent

sealed interface TxChangedEvent

Lifecycle of one submission, as delivered by the txChanged event and returned (in its executed form) by prepareExecuteAndWait.

pending → signed → executed, or failed from anywhere. Modelled as a sealed hierarchy because the payload differs per state and only executed carries an update id.

Inheritors

Types

Link copied to clipboard
data class Executed(val commandId: String, val updateId: String, val completionOffset: Long) : TxChangedEvent

The participant executed the transaction. updateId names the resulting ledger update and completionOffset is the ledger offset it completed at.

Link copied to clipboard
data class Failed(val commandId: String) : TxChangedEvent

The submission did not execute: declined by the user or a spend policy, or failed downstream. The reason is not carried in the event; it travels in the request's error response.

Link copied to clipboard
data class Pending(val commandId: String) : TxChangedEvent

The wallet has accepted the submission and not yet executed it.

Link copied to clipboard
data class Signed(val commandId: String, val signature: String, val signedBy: String, val party: String) : TxChangedEvent

The wallet has signed the prepared transaction. signature is the signature; signedBy and party are the signer and the party signed for, as the wallet reports them. The engine in :canton-dapp-wallet goes straight from pending to executed and never emits this state, but a remote wallet may.

Properties

Link copied to clipboard
abstract val commandId: String

The command id the submission was made under — the key a dApp correlates events on.