Privileges
Privileges let you pre-approve a scope of operations so your agent can act without triggering an approval each time. Think of it as a signed permission slip: “you may spend up to $X, only to these addresses, only on this chain, and only for the next N hours.”
How It Works
- You define a scope. Spend limit, allowed addresses, chain, and expiration
- You approve it once. Creates an encoded token
- Agent attaches the token. Qualifying transactions are signed instantly, no 2FA
- Token expires. After the time limit or spend cap is reached, the agent needs a new token or falls back to normal approvals
Scope Parameters
| CLI flag | SDK parameter | What it controls |
|---|---|---|
--allow <scope...> | allowedAddresses | Which recipients the agent can pay. An empty allowlist means any address (riskier). Scopes can be an address, target:*, an EVM target:selector, a Sui target:module::function, or a Solana target:disc:0x... |
--chain <chain> | chainId | Which chain the token applies to. Required: evm:<id>, sui:<network>, or solana:<network> |
--amount-usd <amount> | requestedAmountUsd | Maximum cumulative USD value across every transaction under the grant, not a per-transaction limit. Defaults to 1 |
--expiry-seconds <seconds> | requestedExpirySeconds | How long the token is valid. Defaults to 900, and 7200 (two hours) is the maximum |
Using Privileges (CLI)
A headless agent can both mint and spend a Privilege from the CLI. Nothing needs a browser.
Minting a token
PRIVILEGE=$(waap-cli privilege create \
--chain sui:mainnet \
--allow 0xCetusPool \
--amount-usd 1 \
--expiry-seconds 900 \
--json | jq -r .permissionToken)privilege create --json returns an object. permissionToken is the encoded grant, alongside
chain, walletMode, expiry, allowedAddresses, and allowedScopes. Extract the token before
piping it.
The wallet mode is the command path, not an option. There is no --wallet-mode:
waap-cli privilege create ... # standard mode
waap-cli squid privilege create ... # SquidA Privilege minted on one path cannot be redeemed by the other, so mint it on the same path the
transaction will use. permission-token create remains as a command-group alias.
By default a Privilege lets ordinary threshold findings proceed without another 2FA prompt when the
Policy Engine accepts its scope. Add --require-2fa-for-high-risk-tx to keep that challenge.
Spending it
Pipe the encoded token into a matching transaction with --privilege-stdin:
printf '%s' "$PRIVILEGE" | waap-cli send-tx \
--to 0xCetusPool \
--value 0.01 \
--chain sui:mainnet \
--privilege-stdinThe transaction goes through immediately. No Telegram prompt, no waiting.
Treat a Privilege as a bearer secret. Piping it with --privilege-stdin keeps it out of shell
history, ps output, and logs. The older --privilege <encoded> and --permission-token <encoded>
flags still work but are deprecated, and both put the token in process arguments where anything on
the box can read it.
When to Use Them
| Scenario | Without Privilege | With Privilege |
|---|---|---|
| Yield agent repositioning every few hours | Telegram approval each time | Auto-approved within scope |
| Trading agent executing 50 trades/day | 50 Telegram approvals/day | Auto-approved up to limit |
| One-time large transfer | Approve manually (good) | Not recommended. Use normal approval |
Rule of thumb: Use Privileges for routine, low-value, repetitive operations. Keep normal approvals for anything large or unusual.
SDK Integration
For browser-based apps, Privileges are requested via window.waap.requestPermissionToken(). See the Privileges SDK guide for full implementation details. Agents do not need this path: mint from the CLI instead.
Privileges vs Policy Controls
Privileges and Policy Controls both shape what your agent can do without prompting, but they operate at different layers:
- Policy Controls are the global wallet-level baseline. Daily spend limit, 2FA method, risk threshold. They apply to every transaction the wallet signs.
- Privileges are scoped, time-bounded grants that bypass 2FA for specific operations within the policy baseline. A Privilege never overrides the policy’s daily spend limit; it just removes the 2FA prompt for transactions inside its declared scope.
Use Policy Controls to set the floor; use Privileges to grant per-task autonomy on top of that floor.
Related
- Approvals & Notifications: What happens when a Privilege isn’t present
- Policy Controls: Set the baseline limits that Privileges operate within
- CLI Commands: Full command reference