corda / net.corda.core.contracts / TransactionState

TransactionState

data class TransactionState<out T : ContractState>

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

Constructors

<init>

TransactionState(data: T, contract: ContractClassName, notary: Party, encumbrance: Int? = null, constraint: AttachmentConstraint = AutomaticHashConstraint)

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

Properties

constraint

val constraint: AttachmentConstraint

A validator for the contract attachments on the transaction.

contract

val contract: ContractClassName

The contract class name that will verify this state that will be created via reflection. The attachment containing this class will be automatically added to the transaction at transaction creation time.

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

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.