corda / net.corda.core.crypto / MetaData

# MetaData

`open class MetaData`

A 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.

### Parameters

`schemeCodeName` - a signature scheme's code name (e.g. ECDSA_SECP256K1_SHA256).

`versionID` - DLT's version.

`signatureType` - type of the signature, see 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.

### Constructors

<init> | `MetaData(schemeCodeName: String, versionID: String, signatureType: SignatureType = SignatureType.FULL, timestamp: Instant?, visibleInputs: BitSet?, signedInputs: BitSet?, merkleRoot: ByteArray, publicKey: PublicKey)` A 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.

### Properties

merkleRoot | `val merkleRoot: ByteArray`
publicKey | `val publicKey: PublicKey`
schemeCodeName | `val schemeCodeName: String`
signatureType | `val signatureType: SignatureType`
signedInputs | `val signedInputs: BitSet?`
timestamp | `val timestamp: Instant?`
versionID | `val versionID: String`
visibleInputs | `val visibleInputs: BitSet?`

### Functions

bytes | `fun bytes(): ByteArray`
equals | `open fun equals(other: Any?): Boolean`
hashCode | `open fun hashCode(): Int`