remove Context Rule
Removes a context rule from the smart account.
Deletes the context rule with the specified ID from the smart account. Once removed, the rule will no longer apply to future transactions.
Flow:
Validates that a wallet is connected
Builds contract invocation for remove_context_rule
Simulates to get auth entries
Signs auth entries (requires user interaction)
Submits transaction
Polls for confirmation
IMPORTANT: This is a state-changing operation requiring smart account authorization. The user will be prompted for biometric authentication.
Return
TransactionResult indicating success or failure
Parameters
The ID of the context rule to remove
Optional list of signers for multi-signer authorization. When empty (default), uses single-signer auth with the connected passkey. When non-empty, coordinates signatures from all listed signers.
Optional submission method override. When null (default), uses the configured submission method (relayer if available, RPC otherwise).
Throws
if the rule doesn't exist or transaction submission fails
Example:
val result = contextMgr.removeContextRule(id = 3u)
if (result.success) {
println("Context rule removed. Hash: ${result.hash ?: ""}")
}