OZMultiSignerManager

Manager for multi-signature smart account operations.

OZMultiSignerManager provides functionality for executing multi-signature operations — including token transfers and arbitrary contract calls — collecting signatures from both passkey and external wallet signers.

Multi-signature transactions require collecting signatures from multiple signers sequentially to enable fail-fast behavior on user cancellation.

Signatures are collected in the order the caller supplies them via SelectedSigner:

The connected passkey is NOT added implicitly. If it should sign, include SelectedSigner.Passkey with the credential ID and keyData populated from the signer data obtained during context rule discovery.

Delegated signers produce their own auth entries with Address credentials that reference the smart account's __check_auth function. The smart account's signature map includes a placeholder entry for each delegated signer.

Example usage:

val kit = OZSmartAccountKit.create(config)
val multiSigner = kit.multiSignerManager

// Execute multi-signature transfer — caller lists ALL signers explicitly
val result = multiSigner.multiSignerTransfer(
tokenContract = "CBCD...",
recipient = "GA7Q...",
amount = "100",
selectedSigners = listOf(
SelectedSigner.Passkey(
credentialId = credIdStr,
credentialIdBytes = credIdBytes,
keyData = signer.keyData
),
SelectedSigner.Wallet("GA7Q...")
)
)
println("Transfer ${if (result.success) "succeeded" else "failed"}")

Functions

Link copied to clipboard
suspend fun multiSignerContractCall(target: String, targetFn: String, targetArgs: List<SCValXdr> = emptyList(), selectedSigners: List<SelectedSigner>, forceMethod: SubmissionMethod? = null, resolveContextRuleIds: ResolveContextRuleIds? = null): TransactionResult

Calls an arbitrary function on an external contract directly with multi-signer authorization.

Link copied to clipboard
suspend fun multiSignerExecuteAndSubmit(target: String, targetFn: String, targetArgs: List<SCValXdr> = emptyList(), selectedSigners: List<SelectedSigner>, forceMethod: SubmissionMethod? = null, resolveContextRuleIds: ResolveContextRuleIds? = null): TransactionResult

Executes an arbitrary contract function through the smart account's execute entry point with multi-signer authorization.

Link copied to clipboard
suspend fun multiSignerTransfer(tokenContract: String, recipient: String, amount: String, selectedSigners: List<SelectedSigner>, forceMethod: SubmissionMethod? = null, resolveContextRuleIds: ResolveContextRuleIds? = null): TransactionResult

Executes a token transfer signed by an explicit list of signers.

Link copied to clipboard
suspend fun submitWithMultipleSigners(hostFunction: HostFunctionXdr, selectedSigners: List<SelectedSigner>, forceMethod: SubmissionMethod? = null, resolveContextRuleIds: ResolveContextRuleIds? = null): TransactionResult

Shared signing pipeline for multi-signer operations.