corda / net.corda.core.flows / NotaryFlow / Client

Client

@DoNotImplement @InitiatingFlow class Client : BackpressureAwareTimedFlow<List<TransactionSignature>>

A flow to be used by a party for obtaining signature(s) from a NotaryService ascertaining the transaction time-window is correct and none of its inputs have been used in another completed transaction.

In case of a single-node or Raft notary, the flow will return a single signature. For the BFT notary multiple signatures will be returned – one from each replica that accepted the input state commit.

The transaction to be notarised, stx, should be fully verified before calling this flow.

Exceptions

NotaryException - in case the any of the inputs to the transaction have been consumed by another transaction or the time-window is invalid or the parameters used for this transaction are no longer in force in the network.

Types

REQUESTING

object REQUESTING : Step

VALIDATING

object VALIDATING : Step

Constructors

<init>

Client(stx: SignedTransaction, skipVerification: Boolean = false)
Client(stx: SignedTransaction, progressTracker: ProgressTracker)

A flow to be used by a party for obtaining signature(s) from a NotaryService ascertaining the transaction time-window is correct and none of its inputs have been used in another completed transaction.

Client(stx: SignedTransaction, progressTracker: ProgressTracker, skipVerification: Boolean = false)

Properties

isTimeoutEnabled

open val isTimeoutEnabled: Boolean

progressTracker

Override this to provide a ProgressTracker. If one is provided and stepped, the framework will do something helpful with the progress reports e.g record to the audit service. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.

open val progressTracker: ProgressTracker

Functions

call

This is where you fill out your business logic.

open fun call(): List<TransactionSignature>

checkTransaction

Checks that the transaction specifies a valid notary, and verifies that it contains all required signatures apart from the notary's.

fun checkTransaction(): Party

notarise

Notarises the transaction with the notaryParty, obtains the notary's signature(s).

fun notarise(notaryParty: Party): UntrustworthyData<NotarisationResponse>

validateResponse

Checks that the notary's signature(s) is/are valid.

fun validateResponse(response: UntrustworthyData<NotarisationResponse>, notaryParty: Party): List<TransactionSignature>

Companion Object Functions

tracker

fun tracker(): ProgressTracker