NotarisationRequest
Keywords: net.corda.core.flows.NotarisationRequest class
Date: 2023-09-18

net.corda.core.flows

## Class NotarisationRequest

- net.corda.core.flows.NotarisationRequest

-     public class NotarisationRequest

  A notarisation request specifies a list of states to consume and the id of the consuming transaction. Its primary purpose is for notarisation traceability – a signature over the notarisation request, `class NotarisationRequestSignature`, allows a notary to prove that a certain party requested the consumption of a particular state.

  While the signature must be retained, the notarisation request does not need to be transferred or stored anywhere - it can be built from a `class SignedTransaction` or a `class CoreTransaction`. The notary can recompute it from the committed states index.

  Reference inputs states are not included as a separate property in the `class NotarisationRequest` as they are not consumed.

  In case there is a need to prove that a party spent a particular state, the notary will:

  1. Locate the consuming transaction id in the index, along with all other states consumed in the same transaction.

  2. Build a `class NotarisationRequest`.

  3. Locate the `class NotarisationRequestSignature` for the transaction id. The signature will contain the signing public key.

  4. Demonstrate the signature verifies against the serialized request. The provided states are always sorted internally, to ensure the serialization does not get affected by the order.

  See Also:
    `class NotarisationRequestSignature`, `class SignedTransaction`, `class CoreTransaction`, `class NotarisationRequest`, `class NotarisationRequest`, `class NotarisationRequestSignature`

- - ### Field Detail

    - #### Companion

          public static net.corda.core.flows.NotarisationRequest.Companion Companion

  - ### Constructor Detail

    - #### NotarisationRequest

          public NotarisationRequest(@NotNull
                                     java.util.List<net.corda.core.contracts.StateRef> statesToConsume,
                                     @NotNull
                                     SecureHash transactionId)

      A notarisation request specifies a list of states to consume and the id of the consuming transaction. Its primary purpose is for notarisation traceability – a signature over the notarisation request, `class NotarisationRequestSignature`, allows a notary to prove that a certain party requested the consumption of a particular state.

      While the signature must be retained, the notarisation request does not need to be transferred or stored anywhere - it can be built from a `class SignedTransaction` or a `class CoreTransaction`. The notary can recompute it from the committed states index.

      Reference inputs states are not included as a separate property in the `class NotarisationRequest` as they are not consumed.

      In case there is a need to prove that a party spent a particular state, the notary will:

      1. Locate the consuming transaction id in the index, along with all other states consumed in the same transaction.

      2. Build a `class NotarisationRequest`.

      3. Locate the `class NotarisationRequestSignature` for the transaction id. The signature will contain the signing public key.

      4. Demonstrate the signature verifies against the serialized request. The provided states are always sorted internally, to ensure the serialization does not get affected by the order.

      See Also:
        `class NotarisationRequestSignature`, `class SignedTransaction`, `class CoreTransaction`, `class NotarisationRequest`, `class NotarisationRequest`, `class NotarisationRequestSignature`

  - ### Method Detail

    - #### getStatesToConsume

          @NotNull
          public java.util.List<net.corda.core.contracts.StateRef> getStatesToConsume()

      States this request specifies to be consumed. Sorted to ensure the serialized form does not get affected by the state order.

    - #### getTransactionId

          @NotNull
          public SecureHash getTransactionId()