class NotaryService : AbstractNodeServiceA 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
A transaction has to be signed by a Notary to be considered valid (except for output-only transactions w/o a timestamp)
| Type |
object Type : ServiceType |
| <init> |
NotaryService(net: MessagingService, identity: Party, signingKey: KeyPair, uniquenessProvider: UniquenessProvider, timestampChecker: TimestampChecker)A Notary service acts as the final signer of a transaction ensuring two things: |
| identity |
val identity: Party |
| signingKey |
val signingKey: KeyPair |
| timestampChecker |
val timestampChecker: TimestampChecker |
| uniquenessProvider |
val uniquenessProvider: UniquenessProvider |
| net |
val net: MessagingService |
| processRequest |
fun processRequest(txBits: SerializedBytes<WireTransaction>, reqIdentity: Party): ResultChecks that the timestamp command is valid (if present) and commits the input state, or returns a conflict if any of the input states have been previously committed |
| addMessageHandler |
fun <Q : AbstractRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R, exceptionConsumer: (Message, Exception) -> Unit): UnitRegister a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are caught and passed to the provided consumer. fun <Q : AbstractRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R): UnitRegister a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are propagated to the messaging layer. |