class TransactionSignature : DigitalSignature
A wrapper over the signature output accompanied by signer's public key and signature metadata. This is similar to DigitalSignature.WithKey, but targeted to DLT transaction (or block of transactions) signatures.
TransactionSignature(bytes: ByteArray, by: PublicKey, signatureMetadata: SignatureMetadata)
Construct a TransactionSignature with partialMerkleTree set to null. This is the recommended constructor when signing over a single transaction. TransactionSignature(bytes: ByteArray, by: PublicKey, signatureMetadata: SignatureMetadata, partialMerkleTree: PartialMerkleTree?)
A wrapper over the signature output accompanied by signer's public key and signature metadata. This is similar to DigitalSignature.WithKey, but targeted to DLT transaction (or block of transactions) signatures. |
val by: PublicKey
PublicKey of the signer. |
|
val partialMerkleTree: PartialMerkleTree?
required when multi-transaction signing is utilised. |
|
val signatureMetadata: SignatureMetadata
attached SignatureMetadata for this signature. |
fun equals(other: Any?): Boolean |
|
fun hashCode(): Int |
|
fun isValid(txId: SecureHash): Boolean
Utility to simplify the act of verifying a signature. In comparison to verify doesn't throw an exception, making it more suitable where a boolean is required, but normally you should use the function which throws, as it avoids the risk of failing to test the result. |
|
fun verify(txId: SecureHash): Boolean
Function to verify a SignableData object's signature. Note that SignableData contains the id of the transaction and extra metadata, such as DLT's platform version. A non-null partialMerkleTree implies multi-transaction signing and the signature is over the root of this tree. |
val OpaqueBytes.isZero: Boolean |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |
|
fun <T : Any> ByteSequence.deserialize(serializationFactory: SerializationFactory = SerializationFactory.defaultFactory, context: SerializationContext = serializationFactory.defaultContext): T
Convenience extension method for deserializing a ByteSequence, utilising the defaults. |
|
fun <T : Any> ByteSequence.deserializeWithCompatibleContext(serializationFactory: SerializationFactory = SerializationFactory.defaultFactory, context: SerializationContext = serializationFactory.defaultContext): ObjectWithCompatibleContext<T>
Additionally returns SerializationContext which was used for encoding. It might be helpful to know SerializationContext to use the same encoding in the reply. |
|
fun OpaqueBytes.hashAs(algorithm: String): SecureHash
Compute the algorithm hash for the contents of the OpaqueBytes. |
|
fun OpaqueBytes.sha256(): SHA256
Compute the SHA-256 hash for the contents of the OpaqueBytes. |