corda / net.corda.core.contracts / TransactionState

TransactionState

data class TransactionState<out T : ContractState>

A wrapper for ContractState containing additional platform-level state information. This is the definitive state that is stored on the ledger and used in transaction outputs.

Constructors

<init> TransactionState(data: T, notary: Party, encumbrance: Int? = null)

A wrapper for ContractState containing additional platform-level state information. This is the definitive state that is stored on the ledger and used in transaction outputs.

Properties

data val data: T

The custom contract state

encumbrance val encumbrance: Int?

All contract states may be encumbered by up to one other state.

notary val notary: Party

Identity of the notary that ensures the state is not used as an input to a transaction more than once

Functions

withNotary fun withNotary(newNotary: Party): TransactionState<T>

Copies the underlying state, replacing the notary field with the new value. To replace the notary, we need an approval (signature) from all participants of the ContractState.