Skip to main content

Overview

Context rules define what signers and policies are required for different operations on your smart account. Access the manager via kit.rules.

Methods

add()

Create a new context rule on the smart account.
Example:

get()

Read a specific context rule directly from the contract by ID.
get() reads directly from the chain. For listing active rules after deletions, use list() or getAll() - these are indexer-backed because the contract does not expose an iterator over active rule IDs.

list()

List all active context rules. Requires indexer access.

getAll()

Get all active context rules of a specific type. Requires indexer access.

remove()

Delete a context rule by ID.

updateName()

Update the display name of a context rule.

updateExpiration()

Update the expiration ledger for a context rule. After this ledger, the rule is no longer active.

Context Rule Types

Use the builder functions to create context rule type values:
See Builder Functions for the full reference.