ResolveContextRuleIds

typealias ResolveContextRuleIds = suspend (entry: SorobanAuthorizationEntryXdr, index: Int) -> List<UInt>

Callback for resolving context rule IDs per auth entry.

Called during the signing flow for each authorization entry that matches the connected smart account. The callback receives the entry and its index in the auth entries list, and returns the context rule IDs to use for that entry's invocation tree.

When not provided, the SDK resolves rule IDs automatically from the connected signer and available context rules. Provide a callback when automatic resolution fails due to ambiguity (selected signers match multiple rules) or to bypass auto-resolution.

Example:

// Simple case: same rule for all entries
val resolver: ResolveContextRuleIds = { _, _ -> listOf(ruleId) }

// Advanced: inspect entry to decide
val resolver: ResolveContextRuleIds = { entry, index ->
if (index == 0) listOf(rule1Id) else listOf(rule2Id)
}