Signing Policy
A JSON file the user owns, beside the session (policy.json in the config
directory). FibX evaluates it before signing anything — with an imported key,
through Privy, or over WalletConnect alike. The rules:
| Rule | Meaning | Example |
|---|---|---|
<chain>.maxValue |
Largest native value (ETH/HYPE/MON) in one transaction | base.maxValue 0.05 |
allowedChains |
Chains anything may be signed on | allowedChains base,monad |
<chain>.allowedDestinations |
Addresses anything may be sent to on that chain | base.allowedDestinations 0xAbC…,0xDeF… |
expiry |
When the whole policy stops applying | expiry 2026-12-31T00:00:00Z |
No policy file means everything is permitted. A file that exists but cannot be read means everything is refused until it is fixed or cleared.
Prerequisites
- None. The policy can be set before any session exists.
Rules
- Propose, then set. Suggest a concrete value and explain what it bounds; set it only after the user agrees.
maxValuebounds native value only. An ERC-20 transfer reaches the policy withvalue: 0, so the cap never sees a token amount — onlyallowedDestinationsbounds where tokens go. Never tell the user the cap limits token amounts.- On the imported-key path this file is the only bound. If
statusshows a private-key session andpolicy showshows nothing, recommend at least amaxValuebefore anytradeorsend. - A refusal names its rule.
POLICY_BLOCKEDcomes with the rule and the limit. Relay both and ask; do not retry, and do not loosen the rule unasked. policy clearwith no rule removes the whole policy and asks for confirmation. Do not pass-yunless the user explicitly asked to remove everything.- Never edit the file by hand; the CLI validates what it writes.
Commands
# Show the active policy (or that there is none)
npx fibx@latest policy show
# Set one rule (replaces the rule's previous value)
npx fibx@latest policy set <rule> <value>
# Remove one rule
npx fibx@latest policy clear <rule>
# Remove the whole policy (asks for confirmation)
npx fibx@latest policy clear
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
rule |
string | expiry, allowedChains, <chain>.maxValue or <chain>.allowedDestinations |
Yes |
value |
string | The value; comma-separated for lists; native units for maxValue |
Yes |
chain |
string | base, hyperevm, or monad |
in rule |
Examples
User: "Cap what this wallet can sign to 0.05 ETH on Base."
npx fibx@latest policy set base.maxValue 0.05
npx fibx@latest policy show
User: "Only let it use Base and Monad."
npx fibx@latest policy set allowedChains base,monad
User: "Only allow sends to my hardware wallet, 0xAbC…"
npx fibx@latest policy set base.allowedDestinations 0xAbC...
User: "What limits are on my wallet?"
npx fibx@latest policy show
User: "Remove the cap."
npx fibx@latest policy clear base.maxValue
Error Handling
| Error / situation | Action |
|---|---|
POLICY_BLOCKED on a trade or send |
Show the rule and limit it names. Ask whether the user wants to change the rule. |
| Policy file unreadable | Show the path. Ask before policy clear; a hand-edited file is the usual cause. |
Invalid value |
maxValue is a decimal in native units; lists are comma-separated; expiry is ISO-8601. |
| No policy on a private-key session | Recommend a maxValue (rule 3) before any transaction. |
Related Skills
authenticate-wallet— which signing path is active decides how much this file matters.trade/send— the operations this policy bounds.