NotaryChangeWireTransaction

data class NotaryChangeWireTransaction(val serializedComponents: List<OpaqueBytes>, val digestService: DigestService) : CoreTransaction

A special transaction for changing the notary of a state. It only needs specifying the state(s) as input(s), old and new notaries. Output states can be computed by applying the notary modification to corresponding inputs on the fly.

Constructors

Link copied to clipboard
constructor(serializedComponents: List<OpaqueBytes>)

Old version of NotaryChangeWireTransaction constructor for ABI compatibility.

constructor(inputs: List<StateRef>, notary: Party, newNotary: Party)
constructor(serializedComponents: List<OpaqueBytes>, digestService: DigestService)

Types

Properties

Link copied to clipboard
Link copied to clipboard
open override val id: SecureHash

A privacy salt is not really required in this case, because we already used nonces in normal transactions and thus input state refs will always be unique. Also, filtering doesn't apply on this type of transactions.

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

Identity of the notary service to reassign the states to.

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

This transaction does not contain any output states, outputs can be obtained by resolving a NotaryChangeLedgerTransaction and applying the notary modification to inputs.

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

Contains all of the transaction components in serialized form. This is used for calculating the transaction id in a deterministic fashion, since re-serializing properties may result in a different byte sequence depending on the serialization context.

Functions

Link copied to clipboard
fun copy(serializedComponents: List<OpaqueBytes>): NotaryChangeWireTransaction

Old version of NotaryChangeWireTransaction.copy for ABI compatibility.

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

Resolves input states and builds a NotaryChangeLedgerTransaction.

Resolves input states and network parameters and builds a NotaryChangeLedgerTransaction.

Link copied to clipboard