abstract class NotaryService : AbstractNodeService
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
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 protocol
Type |
object Type : ServiceType |
<init> |
NotaryService(smm: StateMachineManager, net: MessagingService, timestampChecker: TimestampChecker, uniquenessProvider: UniquenessProvider, networkMapCache: NetworkMapCache) A Notary service acts as the final signer of a transaction ensuring two things: |
logger |
abstract val logger: <ERROR CLASS> |
protocolFactory |
abstract val protocolFactory: Factory Implement a factory that specifies the transaction commit protocol for the notary service to use |
smm |
val smm: StateMachineManager |
timestampChecker |
val timestampChecker: TimestampChecker |
uniquenessProvider |
val uniquenessProvider: UniquenessProvider |
net |
val net: MessagingService |
networkMapCache |
val networkMapCache: NetworkMapCache |
addMessageHandler |
fun <Q : ServiceRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R, exceptionConsumer: (Message, Exception) -> Unit): Unit Register 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. If you just want a simple acknowledgement response with no content, use com.r3corda.core.messaging.Ack fun <Q : ServiceRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R): Unit Register 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. If you just want a simple acknowledgement response with no content, use com.r3corda.core.messaging.Ack |
SimpleNotaryService |
class SimpleNotaryService : NotaryService A simple Notary service that does not perform transaction validation |
ValidatingNotaryService |
class ValidatingNotaryService : NotaryService A Notary service that validates the transaction chain of he submitted transaction before committing it |