ContractUpgradeFilteredTransaction

data class ContractUpgradeFilteredTransaction(val visibleComponents: Map<Int, ContractUpgradeFilteredTransaction.FilteredComponent>, val hiddenComponents: Map<Int, SecureHash>, val digestService: DigestService) : CoreTransaction

A filtered version of the ContractUpgradeWireTransaction. In comparison with a regular FilteredTransaction, there is no flexibility on what parts of the transaction to reveal – the inputs, notary and network parameters hash fields are always visible and the rest of the transaction is always hidden. Its only purpose is to hide transaction data when using a non-validating notary.

Constructors

Link copied to clipboard
constructor(visibleComponents: Map<Int, ContractUpgradeFilteredTransaction.FilteredComponent>, hiddenComponents: Map<Int, SecureHash>)

Old version of ContractUpgradeFilteredTransaction constructor for ABI compatibility.

constructor(visibleComponents: Map<Int, ContractUpgradeFilteredTransaction.FilteredComponent>, hiddenComponents: Map<Int, SecureHash>, digestService: DigestService)

Types

Link copied to clipboard
class FilteredComponent(val component: OpaqueBytes, val nonce: SecureHash)

Contains the serialized component and the associated nonce for computing the transaction id.

Properties

Link copied to clipboard
Link copied to clipboard

Hashes of the transaction components that are not revealed in this transaction. Required for computing the transaction id.

Link copied to clipboard
open override val id: SecureHash
Link copied to clipboard
open override val inputs: List<StateRef>

The inputs of this transaction, containing state references only.

Link copied to clipboard
open override val networkParametersHash: SecureHash?

Hash of the network parameters that were in force when the transaction was notarised. Null means, that the transaction was created on older version of Corda (before 4), resolution will default to initial parameters.

Link copied to clipboard
open override 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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
open override val references: List<StateRef>

The reference inputs of this transaction, containing the state references only.

Link copied to clipboard

Transaction components that are exposed.

Functions

Link copied to clipboard
Link copied to clipboard
inline fun <T : ContractState> filterOutputs(crossinline predicate: (T) -> Boolean): List<T>

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

Helper to simplify filtering outputs according to a Predicate.

Link copied to clipboard
inline fun <T : ContractState> filterOutRefs(crossinline predicate: (T) -> Boolean): List<StateAndRef<T>>

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

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

Link copied to clipboard
inline fun <T : ContractState> findOutput(crossinline predicate: (T) -> Boolean): T

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

Helper to simplify finding a single output matching a Predicate.

Link copied to clipboard
inline fun <T : ContractState> findOutRef(crossinline predicate: (T) -> Boolean): StateAndRef<T>

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

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

Link copied to clipboard

Helper to simplify getting an indexed output.

Link copied to clipboard
inline fun <T : ContractState> outputsOfType(): List<T>

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

Link copied to clipboard

Returns a StateAndRef for the given output index.

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

Link copied to clipboard

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

Link copied to clipboard