multiSignerTransfer

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.

The caller supplies every signer that must sign via selectedSigners. There is no implicit connected passkey — include SelectedSigner.Passkey if the connected passkey should sign. Signatures are collected in list order:

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

Return

TransactionResult indicating success or failure

Parameters

tokenContract

The token contract address (C-address)

recipient

The recipient address (G-address or C-address)

amount

Decimal amount to transfer (e.g., "100" or "10.5")

selectedSigners

All signers that must sign, in collection order. The list must not be empty.

forceMethod

Optional override for the submission method. When null (default), the SDK auto-detects whether to use the relayer or direct submission.

resolveContextRuleIds

Optional callback to resolve context rule IDs per auth entry. When null (default), the SDK resolves the rule IDs automatically from the selected signers and available context rules. Provide a callback when automatic resolution fails due to ambiguity (selected signers match multiple rules) or to bypass auto-resolution.

Throws

if validation fails, signing fails, or submission fails

Example:

val result = multiSigner.multiSignerTransfer(
tokenContract = nativeTokenAddress,
recipient = "GBXYZ...",
amount = "50",
selectedSigners = listOf(
SelectedSigner.Passkey(), // connected passkey
SelectedSigner.Passkey("credBase64"), // a second specific passkey
SelectedSigner.Wallet("GA7Q...") // delegated wallet signer
)
)
if (result.success) {
println("Multi-sig transfer succeeded: ${result.hash ?: ""}")
}