Skip to content
docs

Policies

Defined in: kit/src/policies.ts:224

Rules the kit checks before every signature and broadcast of an account it hands out. Keys of the per-chain records are CAIP-2 ids or namespace prefixes (eip155). A namespace key covers every chain of the family, and an exact id’s rules apply on top of it: every matching fee cap is checked, a destination must be on every matching allowlist, and any matching blocklist refuses. An id matches its network in any spelling: solana:mainnet = solana:5eykt…, tron:728126428 = tron:mainnet = tron:0x2b6653dc, bitcoin:mainnet = bip122:0000…, eip155:0x1 = eip155:1; the bitcoin namespace is bip122.

optional allowlist?: Record<string, string[]>

Defined in: kit/src/policies.ts:232

Per-chain allowlist of destinations (case-insensitive) — recipients, called contracts and approval spenders. Writes to anything else throw.


optional blocklist?: Record<string, string[]>

Defined in: kit/src/policies.ts:234

Per-chain blocklist of destinations — recipients, called contracts and approval spenders.


optional confirm?: (intent) => boolean | Promise<boolean>

Defined in: kit/src/policies.ts:236

Last word before broadcast: return false (or throw) to reject. Hook a confirmation UI here.

WriteIntent

boolean | Promise<boolean>


optional maxFee?: Record<string, number | bigint>

Defined in: kit/src/policies.ts:230

Per-chain fee cap in native base units. A quote above it throws before confirm; the cap is then handed to the account as WriteOptions.maxFee, so chain packages check it again on the transaction they sign (EVM: gas limit with headroom × the signed gas price).