net.corda.node.services.transactions

## Class NotaryService

- SingletonSerializeAsToken
- - net.corda.node.services.transactions.NotaryService

- All Implemented Interfaces:
    SerializeAsToken
  Direct Known Subclasses:
    BFTValidatingNotaryService, RaftValidatingNotaryService, SimpleNotaryService, ValidatingNotaryService

      public class NotaryService
      extends SingletonSerializeAsToken

  A Notary service acts as the final signer of a transaction ensuring two things:

  - The (optional) timestamp of the transaction is valid.

  - None of the referenced input states have previously been consumed by a transaction signed by this Notary O A transaction has to be signed by a Notary to be considered valid (except for output-only transactions without a timestamp).

  This is the base implementation that can be customised with specific Notary transaction commit flow.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotaryService(ServiceHubInternal services)` A Notary service acts as the final signer of a transaction ensuring two things:

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `NotaryFlow.Service` | `createFlow(Party otherParty)` Implement a factory that specifies the transaction commit flow for the notary service to use

    - ### Methods inherited from class net.corda.core.serialization.SingletonSerializeAsToken

      `toToken`

    - ### Methods inherited from interface net.corda.core.serialization.SerializeAsToken

      `toToken`

- - ### Constructor Detail

    - #### NotaryService

          public NotaryService(ServiceHubInternal services)

      A Notary service acts as the final signer of a transaction ensuring two things:

      - The (optional) timestamp of the transaction is valid.

      - None of the referenced input states have previously been consumed by a transaction signed by this Notary O A transaction has to be signed by a Notary to be considered valid (except for output-only transactions without a timestamp).

      This is the base implementation that can be customised with specific Notary transaction commit flow.

  - ### Method Detail

    - #### createFlow

          public NotaryFlow.Service createFlow(Party otherParty)

      Implement a factory that specifies the transaction commit flow for the notary service to use