Package-level declarations

Types

Link copied to clipboard

An abstract class defining fields shared by all transaction types in the system.

Link copied to clipboard
open class ComponentGroup(val groupIndex: Int, val components: List<OpaqueBytes>)

A ComponentGroup is used to store the full list of transaction components of the same type in serialised form. Practically, a group per component type of a transaction is required; thus, there will be a group for input states, a group for all attachments (if there are any) etc.

Link copied to clipboard

Thrown when checking for visibility of all-components in a group in FilteredTransaction.checkAllComponentsVisible.

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

Link copied to clipboard

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.

Link copied to clipboard
data class ContractUpgradeWireTransaction(val serializedComponents: List<OpaqueBytes>, val privacySalt: PrivacySalt, val digestService: DigestService) : CoreTransaction

A special transaction for upgrading the contract of a state.

Link copied to clipboard

A transaction with the minimal amount of information required to compute the unique transaction id, and resolve a FullTransaction. This type of transaction, wrapped in SignedTransaction, gets transferred across the wire and recorded to storage.

Link copied to clipboard
data class FilteredComponentGroup(val groupIndex: Int, val components: List<OpaqueBytes>, val nonces: List<SecureHash>, val partialMerkleTree: PartialMerkleTree) : ComponentGroup

A FilteredComponentGroup is used to store the filtered list of transaction components of the same type in serialised form. This is similar to ComponentGroup, but it also includes the corresponding nonce per component.

Link copied to clipboard

Class representing merkleized filtered transaction.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
class MissingContractAttachments constructor(val states: List<TransactionState<ContractState>>, contractsClassName: String? = null, minimumRequiredContractClassVersion: Version? = null) : FlowException

A contract attachment was missing when trying to automatically attach all known contract attachments

Link copied to clipboard
data class NetworkParametersHash(val hash: SecureHash)

Wrapper over SecureHash to be used when filtering network parameters hash.

Link copied to clipboard

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.

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

Link copied to clipboard
data class ReferenceStateRef(val stateRef: StateRef)

Wrapper over StateRef to be used when filtering reference states.

Link copied to clipboard

SignedTransaction wraps a serialized CoreTransaction, though it will almost exclusively be a WireTransaction. It contains one or more signatures, each one for a public key (including composite keys) that is mentioned inside a transaction command. SignedTransaction is the top level transaction type and the type most frequently passed around the network and stored. The identity of a transaction is the hash of Merkle root of a WireTransaction, therefore if you are storing data keyed by WT hash be aware that multiple different STs may map to the same key (and they could be different in important ways, like validity!). The signatures on a SignedTransaction might be invalid or missing: the type does not imply validity. A transaction ID should be the hash of the WireTransaction Merkle tree root. Thus adding or removing a signature does not change it.

Link copied to clipboard
open class TransactionBuilder(var notary: Party? = null, var lockId: UUID = defaultLockId(), inputs: MutableList<StateRef> = arrayListOf(), attachments: MutableList<AttachmentId> = arrayListOf(), outputs: MutableList<TransactionState<ContractState>> = arrayListOf(), commands: MutableList<Command<*>> = arrayListOf(), window: TimeWindow? = null, privacySalt: PrivacySalt = PrivacySalt(), references: MutableList<StateRef> = arrayListOf(), serviceHub: ServiceHub? = (Strand.currentStrand() as? FlowStateMachine<*>)?.serviceHub)

A TransactionBuilder is a transaction class that's mutable (unlike the others which are all immutable). It is intended to be passed around contracts that may edit it by adding new states/commands. Then once the states and commands are right, this class can be used as a holding bucket to gather signatures from multiple parties.

Link copied to clipboard

An interface for transactions containing signatures, with logic for signature verification.

Link copied to clipboard
abstract class TraversableTransaction(val componentGroups: List<ComponentGroup>, val digestService: DigestService) : CoreTransaction

Implemented by WireTransaction and FilteredTransaction. A TraversableTransaction allows you to iterate over the flattened components of the underlying transaction structure, taking into account that some may be missing in the case of this representing a "torn" transaction. Please see the user guide section "Transaction tear-offs" to learn more about this feature.

Link copied to clipboard
class WireTransaction(val componentGroups: List<ComponentGroup>, val privacySalt: PrivacySalt, val digestService: DigestService) : TraversableTransaction

A transaction ready for serialisation, without any signatures attached. A WireTransaction is usually wrapped by a SignedTransaction that carries the signatures over this payload. The identity of the transaction is the Merkle tree root of its components (see MerkleTree).

Functions

Link copied to clipboard