ConsensualSignedTransaction

@DoNotImplement
interface ConsensualSignedTransaction

Defines a signed Consensual transaction.

Comparing with ConsensualLedgerTransaction:

  • It does not have access to the deserialized details.

  • It has direct access to the signatures.

  • It does not require a serializer.

ConsensualSignedTransaction wraps the wire representation of the transaction. It contains one or more signatures, each one for a public key (including composite keys) that is mentioned inside a transaction state. ConsensualSignedTransaction is frequently passed around the network and stored. The identity of a transaction is the hash of Merkle root of the wrapped wire representation, therefore if you are storing data keyed by wire representations hash be aware that multiple different ConsensualSignedTransactions may map to the same key (and they could be different in important ways, like validity!). The signatures on a ConsensualSignedTransaction might be invalid or missing: the type does not imply validity. A transaction ID should be the hash of the wrapped wire representation's Merkle tree root. Thus adding or removing a signature does not change it.

Functions

Link copied to clipboard
abstract fun addSignature(publicKey: PublicKey): ConsensualSignedTransaction

Sign the current ConsensualSignedTransaction with the specified key.

Link copied to clipboard
abstract fun getMissingSigningKeys(): Set<PublicKey>

Gets the signing keys for any missing transaction signatures.

Link copied to clipboard
abstract fun toLedgerTransaction(): ConsensualLedgerTransaction

Properties

Link copied to clipboard
abstract val id: SecureHash
Link copied to clipboard
abstract val signatures: List<DigitalSignatureAndMetadata>