net.corda.core.crypto

## Class MetaData

- net.corda.core.crypto.MetaData

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

  See Also:
    `class MetaData`

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

- - ### Constructor Detail

    - #### MetaData

          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.

      Parameters:
        `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.
      See Also:
        `class MetaData`

  - ### Method Detail

    - #### bytes

          public byte[] bytes()

    - #### equals

          public boolean equals(java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### getSchemeCodeName

          public java.lang.String getSchemeCodeName()

    - #### getVersionID

          public java.lang.String getVersionID()

    - #### getSignatureType

          public SignatureType getSignatureType()

    - #### getTimestamp

          public java.time.Instant getTimestamp()

    - #### getVisibleInputs

          public java.util.BitSet getVisibleInputs()

    - #### getSignedInputs

          public java.util.BitSet getSignedInputs()

    - #### getMerkleRoot

          public byte[] getMerkleRoot()

    - #### getPublicKey

          public java.security.PublicKey getPublicKey()