Update

data class Update<U : ContractState>(val consumed: Set<StateAndRef<U>>, val produced: Set<StateAndRef<U>>, val flowId: UUID? = null, val type: Vault.UpdateType = UpdateType.GENERAL, val references: Set<StateAndRef<U>> = emptySet(), val consumingTxIds: Map<StateRef, SecureHash> = emptyMap())

Represents an update observed by the vault that will be notified to observers. Include the StateRefs of transaction outputs that were consumed (inputs) and the ContractStates produced (outputs) to/by the transaction or transactions observed and the vault.

If the vault observes multiple transactions simultaneously, where some transactions consume the outputs of some of the other transactions observed, then the changes are observed "net" of those.

Constructors

Link copied to clipboard
constructor(consumed: Set<StateAndRef<U>>, produced: Set<StateAndRef<U>>, flowId: UUID? = null, type: Vault.UpdateType = UpdateType.GENERAL, references: Set<StateAndRef<U>> = emptySet())
constructor(consumed: Set<StateAndRef<U>>, produced: Set<StateAndRef<U>>, flowId: UUID? = null, type: Vault.UpdateType = UpdateType.GENERAL, references: Set<StateAndRef<U>> = emptySet(), consumingTxIds: Map<StateRef, SecureHash> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val flowId: UUID? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specifies the type of update, currently supported types are general and, contract upgrade and notary change. Notary change transactions only modify the notary field on states, and potentially need to be handled differently.

Functions

Link copied to clipboard

Checks whether the update contains a state of the specified type.

Checks whether the update contains a state of the specified type and state status

Link copied to clipboard
fun copy(consumed: Set<StateAndRef<U>>, produced: Set<StateAndRef<U>>, flowId: UUID? = null, type: Vault.UpdateType = UpdateType.GENERAL): Vault.Update<U>
fun copy(consumed: Set<StateAndRef<U>>, produced: Set<StateAndRef<U>>, flowId: UUID? = null, type: Vault.UpdateType = UpdateType.GENERAL, references: Set<StateAndRef<U>> = emptySet()): Vault.Update<U>

Additional copy method to maintain backwards compatibility.

Link copied to clipboard
Link copied to clipboard
operator fun plus(rhs: Vault.Update<U>): Vault.Update<U>

Combine two updates into a single update with the combined inputs and outputs of the two updates but net any outputs of the left-hand-side (this) that are consumed by the inputs of the right-hand-side (rhs).

Link copied to clipboard
open override fun toString(): String