public class MetaData
A class MetaData
object adds extra information to a transaction. MetaData is used to support a universal
digital signature model enabling full, partial, fully or partially blind and metaData attached signatures,
(such as an attached timestamp). A MetaData object contains both the merkle root of the transaction and the signer's public key.
When signatureType is set to FULL, then visibleInputs and signedInputs can be ignored.
Note: We could omit signatureType as it can always be defined by combining visibleInputs and signedInputs,
but it helps to speed up the process when FULL is used, and thus we can bypass the extra check on boolean arrays.
class MetaData
Constructor and Description |
---|
MetaData(java.lang.String schemeCodeName,
java.lang.String versionID,
SignatureType signatureType,
java.time.Instant timestamp,
java.util.BitSet visibleInputs,
java.util.BitSet signedInputs,
byte[] merkleRoot,
java.security.PublicKey publicKey)
A
class MetaData object adds extra information to a transaction. MetaData is used to support a universal
digital signature model enabling full, partial, fully or partially blind and metaData attached signatures,
(such as an attached timestamp). A MetaData object contains both the merkle root of the transaction and the signer's public key.
When signatureType is set to FULL, then visibleInputs and signedInputs can be ignored.
Note: We could omit signatureType as it can always be defined by combining visibleInputs and signedInputs,
but it helps to speed up the process when FULL is used, and thus we can bypass the extra check on boolean arrays. |
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes() |
boolean |
equals(java.lang.Object other) |
byte[] |
getMerkleRoot() |
java.security.PublicKey |
getPublicKey() |
java.lang.String |
getSchemeCodeName() |
SignatureType |
getSignatureType() |
java.util.BitSet |
getSignedInputs() |
java.time.Instant |
getTimestamp() |
java.lang.String |
getVersionID() |
java.util.BitSet |
getVisibleInputs() |
int |
hashCode() |
public MetaData(java.lang.String schemeCodeName, java.lang.String versionID, SignatureType signatureType, java.time.Instant timestamp, java.util.BitSet visibleInputs, java.util.BitSet signedInputs, byte[] merkleRoot, java.security.PublicKey publicKey)
A class MetaData
object adds extra information to a transaction. MetaData is used to support a universal
digital signature model enabling full, partial, fully or partially blind and metaData attached signatures,
(such as an attached timestamp). A MetaData object contains both the merkle root of the transaction and the signer's public key.
When signatureType is set to FULL, then visibleInputs and signedInputs can be ignored.
Note: We could omit signatureType as it can always be defined by combining visibleInputs and signedInputs,
but it helps to speed up the process when FULL is used, and thus we can bypass the extra check on boolean arrays.
schemeCodeName
- a signature scheme's code name (e.g. ECDSA_SECP256K1_SHA256).versionID
- DLT's version.signatureType
- type of the signature, see enum SignatureType
(e.g. FULL, PARTIAL, BLIND, PARTIAL_AND_BLIND).timestamp
- the signature's timestamp as provided by the signer.visibleInputs
- for partially/fully blind signatures. We use Merkle tree boolean index flags (from left to right)
indicating what parts of the transaction were visible when the signature was calculated.signedInputs
- for partial signatures. We use Merkle tree boolean index flags (from left to right)
indicating what parts of the Merkle tree are actually signed.merkleRoot
- the Merkle root of the transaction.publicKey
- the signer's public key.class MetaData
public byte[] bytes()
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String getSchemeCodeName()
public java.lang.String getVersionID()
public SignatureType getSignatureType()
public java.time.Instant getTimestamp()
public java.util.BitSet getVisibleInputs()
public java.util.BitSet getSignedInputs()
public byte[] getMerkleRoot()
public java.security.PublicKey getPublicKey()