InteractiveSubmissionClient

class InteractiveSubmissionClient(channel: Channel)

The prepare → sign → execute flow for externally-signed transactions (Interactive Submission Service).

Before signing, signAndExecute recomputes prepared_transaction_hash locally from the raw PreparedTransaction proto (PreparedTransactionHash) and refuses to sign on mismatch — the node's hash is never trusted blindly.

ExecuteSubmission only acknowledges that the participant accepted the submission; commitment (or rejection — contention, time bounds) is reported asynchronously on the completion stream. Use signAndExecuteAndWait to await that verdict.

TODO before 1.0:

Constructors

Link copied to clipboard
constructor(channel: Channel)

Functions

Link copied to clipboard
suspend fun prepare(commands: List<CommandsOuterClass.Command>, actAs: String, synchronizerId: String, userId: String? = null, commandId: String = UUID.randomUUID().toString(), disclosedContracts: List<CommandsOuterClass.DisclosedContract> = emptyList()): InteractiveSubmissionServiceOuterClass.PrepareSubmissionResponse

Step one of the flow: asks the participant to prepare commands for actAs on synchronizerId and returns the raw PreparedTransaction plus its hash, ready for signAndExecute. Verbose hashing is off, so the response carries no hashing trace.

Link copied to clipboard
suspend fun signAndExecute(prepared: InteractiveSubmissionServiceOuterClass.PrepareSubmissionResponse, driver: SigningDriver, partyId: String, keyFingerprint: String, userId: String? = null, submissionId: String = UUID.randomUUID().toString(), verifyHash: Boolean = true)

Signs the prepared transaction hash with driver and executes. The signature's signed_by fingerprint must identify the party's registered key — pass the fingerprint returned at party onboarding.

Link copied to clipboard
suspend fun signAndExecuteAndWait(prepared: InteractiveSubmissionServiceOuterClass.PrepareSubmissionResponse, driver: SigningDriver, partyId: String, keyFingerprint: String, userId: String? = null, submissionId: String = UUID.randomUUID().toString(), verifyHash: Boolean = true): SubmissionCompletion

signAndExecute, then waits for the command's completion event — the only way to learn the outcome of an interactive submission, since ExecuteSubmission acknowledges acceptance, not commitment.