update Valid Until
Updates the expiration ledger of an existing context rule.
Changes the ledger number at which the context rule expires. After expiration, the rule will no longer apply to transactions. Pass null to remove the expiration.
Flow:
Builds contract invocation for update_context_rule_valid_until
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 expiration ledger number, or null for no expiration
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 wallet is not connected
if transaction submission fails
Example:
// Set expiration to ledger 12345678
val result = contextMgr.updateValidUntil(
id = 2u,
validUntil = 12345678u
)
// Remove expiration (rule never expires)
val result2 = contextMgr.updateValidUntil(
id = 2u,
validUntil = null
)