corda / net.corda.core.transactions / FullTransaction

FullTransaction

abstract class FullTransaction : BaseTransaction

A transaction with fully resolved components, such as input states.

Constructors

<init>

FullTransaction()

A transaction with fully resolved components, such as input states.

Properties

inputs

abstract val inputs: List<StateAndRef<ContractState>>

The inputs of this transaction. Note that in BaseTransaction subclasses the type of this list may change!

networkParameters

abstract val networkParameters: NetworkParameters?

Network parameters that were in force when this transaction was created. Resolved from the hash of network parameters on the corresponding wire transaction.

references

abstract val references: List<StateAndRef<ContractState>>

A list of reusable reference data states which can be referred to by other contracts in this transaction.

Inherited Properties

notary

abstract val notary: Party?

If present, the notary for this transaction. If absent then the transaction is not notarised at all. This is intended for issuance/genesis transactions that don't consume any other states and thus can't double spend anything.

outputStates

val outputStates: List<ContractState>

Helper property to return a list of ContractState objects, rather than the often less convenient TransactionState

outputs

abstract val outputs: List<TransactionState<ContractState>>

Ordered list of states defined by this transaction, along with the associated notaries.

Functions

checkBaseInvariants

open fun checkBaseInvariants(): Unit

checkNotaryWhitelisted

fun checkNotaryWhitelisted(): Unit

Make sure the assigned notary is part of the network parameter whitelist.

Inherited Functions

filterOutRefs

fun <T : ContractState> filterOutRefs(clazz: Class<T>, predicate: Predicate<T>): List<StateAndRef<T>>

Helper to simplify filtering output StateAndRef items according to a Predicate.

fun <T : ContractState> filterOutRefs(predicate: (T) -> Boolean): List<StateAndRef<T>>

filterOutputs

fun <T : ContractState> filterOutputs(clazz: Class<T>, predicate: Predicate<T>): List<T>

Helper to simplify filtering outputs according to a Predicate.

fun <T : ContractState> filterOutputs(predicate: (T) -> Boolean): List<T>

findOutRef

fun <T : ContractState> findOutRef(clazz: Class<T>, predicate: Predicate<T>): StateAndRef<T>

Helper to simplify finding a single output StateAndRef matching a Predicate.

fun <T : ContractState> findOutRef(predicate: (T) -> Boolean): StateAndRef<T>

findOutput

fun <T : ContractState> findOutput(clazz: Class<T>, predicate: Predicate<T>): T

Helper to simplify finding a single output matching a Predicate.

fun <T : ContractState> findOutput(predicate: (T) -> Boolean): T

getOutput

fun getOutput(index: Int): ContractState

Helper to simplify getting an indexed output.

outRef

fun <T : ContractState> outRef(index: Int): StateAndRef<T>

Returns a StateAndRef for the given output index.

fun <T : ContractState> outRef(state: ContractState): StateAndRef<T>

Returns a StateAndRef for the requested output state, or throws IllegalArgumentException if not found.

outRefsOfType

fun <T : ContractState> outRefsOfType(clazz: Class<T>): List<StateAndRef<T>>

Helper to simplify getting all output StateAndRef items of a particular state class, interface, or base class.

fun <T : ContractState> outRefsOfType(): List<StateAndRef<T>>

outputsOfType

fun <T : ContractState> outputsOfType(clazz: Class<T>): List<T>

Helper to simplify getting all output states of a particular class, interface, or base class.

fun <T : ContractState> outputsOfType(): List<T>

toString

open fun toString(): String

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

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

Inheritors

ContractUpgradeLedgerTransaction

class ContractUpgradeLedgerTransaction : FullTransaction, TransactionWithSignatures

A contract upgrade transaction with fully resolved inputs and signatures. Contract upgrade transactions are separate to regular transactions because their validation logic is specialised; the original contract by definition cannot be aware of the upgraded contract (it was written after the original contract was developed), so its validation logic cannot succeed. Instead alternative verification logic is used which verifies that the outputs correspond to the inputs after upgrading.

LedgerTransaction

class LedgerTransaction : FullTransaction

A LedgerTransaction is derived from a WireTransaction. It is the result of doing the following operations:

NotaryChangeLedgerTransaction

class NotaryChangeLedgerTransaction : FullTransaction, TransactionWithSignatures

A notary change transaction with fully resolved inputs and signatures. In contrast with a regular transaction, signatures are checked against the signers specified by input states' participants fields, so full resolution is needed for signature verification.