update Name
Updates the name of an existing context rule.
Changes the human-readable name of the context rule with the specified ID. The name is used for identification and has no effect on rule matching or enforcement.
Flow:
Validates inputs (name not empty)
Builds contract invocation for update_context_rule_name
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 update
The new name for the context rule
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 validation fails
if transaction submission fails
Example:
val result = contextMgr.updateName(
id = 2u,
name = "UpdatedTokenOps"
)
if (result.success) {
println("Context rule name updated. Hash: ${result.hash ?: ""}")
}