SignableData
Keywords: net.corda.core.crypto.SignableData class
Date: 2023-09-18

net.corda.core.crypto

## Class SignableData

- net.corda.core.crypto.SignableData

-     public class SignableData

  A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

  See Also:
    `class SignableData`

- - ### Constructor Detail

    - #### SignableData

          public SignableData(@NotNull
                              SecureHash txId,
                              @NotNull
                              SignatureMetadata signatureMetadata)

      A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

      Parameters:
        `txId` - transaction's id or root of multi-transaction Merkle tree in case of multi-transaction signing.
        `signatureMetadata` - meta data required.
      See Also:
        `class SignableData`

  - ### Method Detail

    - #### getTxId

          @NotNull
          public SecureHash getTxId()

      transaction

      's id or root of multi-transaction Merkle tree in case of multi-transaction signing.

    - #### getSignatureMetadata

          @NotNull
          public SignatureMetadata getSignatureMetadata()

      meta data required.

    - #### component1

          @NotNull
          public SecureHash component1()

      transaction

      's id or root of multi-transaction Merkle tree in case of multi-transaction signing.

    - #### component2

          @NotNull
          public SignatureMetadata component2()

      meta data required.

    - #### copy

          @NotNull
          public SignableData copy(@NotNull
                                            SecureHash txId,
                                            @NotNull
                                            SignatureMetadata signatureMetadata)

      A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

      Parameters:
        `txId` - transaction's id or root of multi-transaction Merkle tree in case of multi-transaction signing.
        `signatureMetadata` - meta data required.
      See Also:
        `class SignableData`

    - #### toString

          @NotNull
          public java.lang.String toString()

      A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

      See Also:
        `class SignableData`

    - #### hashCode

          public int hashCode()

      A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

      See Also:
        `class SignableData`

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      A `class SignableData` object is the packet actually signed. It works as a wrapper over transaction id and signature metadata. Note that when multi-transaction signing (signing a block of transactions) is used, the root of the Merkle tree (having transaction IDs as leaves) is actually signed and thus txId refers to this root and not a specific transaction.

      See Also:
        `class SignableData`