Policies & spending limits
One policy per environment decides which chains, wallets, signing, sessions and limits your users get.
Preview: Swivy is not generally available
Swivy is a staging/testnet preview using software custody, not a production custody service. All six public SDK packages are available at 1.0.1. Use test assets only. Set up the preview or request project access.
In plain words: the policy is the rulebook for one environment. It lives on the server, not in your app, so you can tighten a limit without shipping a new build. Set it in the console or from your backend.
// Server only: needs an organization admin credential
await swivy.updateEnvironmentPolicy('env_...', policy);PUT /v1/control/environments/{environmentId}/policy replaces the whole policy, so send every section.
Sections
| Section | What it controls |
|---|---|
loginPolicy | Enable customer email, SMS and passkey login independently. Hosted login also follows client auth settings. |
allowedChains | Chain families the environment may use: evm, solana. |
walletPolicy | Whether embedded and linked wallets are allowed, whether split custody is allowed, the default custody mode, whether wallets are auto-created at login and on which chains. |
signingPolicy | Whether signing needs MFA, whether raw signing is allowed, and which signing kinds are allowed (sign_message, sign_digest, sign_typed_data, sign_transaction). |
executionPolicy | Whether sending needs MFA, whether hosted execution is on, a per-transaction value cap (maxTransactionValueUsd) and gas sponsorship. |
exportPolicy | Whether key export is allowed at all, and whether it needs MFA. |
sessionPolicy | Whether agent session grants are allowed, whether creating one needs MFA, default and maximum expiry, allowed signing kinds, whether grants may execute transactions, allowed networks and a value cap. |
recoveryPolicy | Which recovery routes are on: email, passkey, SMS. |
walletToolPolicy | Limits for built-in wallet tools (swap quotes and prediction-market orders): on/off, maximum swap value, maximum slippage, allowed tokens. |
rpcProviderPolicy, blockchainDataPolicy, offlineSigningPolicy | Advanced routing and offline-signing settings. |
Spending limits that matter most
- Per transaction:
executionPolicy.maxTransactionValueUsdcaps any single transaction a user sends. - Per agent:
sessionPolicy.maxTransactionValueUsdcaps what an agent can do with a grant, and each grant can set a lowerscope.maxTransactionValueUsdandmaxUses. - Sponsorship budget:
executionPolicy.sponsorship.maxSpendPerUserUsdandmaxSpendPerDayUsdcap the gas you pay for.
Good defaults
- Require MFA for execution and export.
- Keep raw signing and export off unless you have a specific need.
- Auto-create wallets only on the chains you actually use.
- Keep session grants short (a low
maxExpirySeconds) and limited to the networks the agent needs.
Delegated execution
Standing EVM grants require an explicit execution gas cap. Schema 21 also supports an optional cumulative encoded-native-value and execution-gas profile. These limits are not total-wallet-loss or USD guarantees. Read the scope, exclusions and reservation behavior before enabling them.