The life cycle
A commit always replaces the whole rule document of the account. Each account holds one document, and the document holds all its rules.
The two account kinds
See Accounts for the model behind the two kinds, and Contracts for the contracts.
Who pays the gas
The SDK decides per step. It never asks you to choose, except forexecuteSafeOwnerCalls, which takes ownerSent: true.
For a Safe owner operation, the SDK reads
GET /api/wallets/{account}/sponsorship (fetchWalletSponsorship). The answer is { feesOn, sponsored }.
- When
feesOnisfalse, orsponsoredistrue, Anafi relays the operation and pays its gas. The owner signs an EIP-712SafeTxmessage. The SDK sends it toPOST /api/wallets/{account}/safe/sponsor_exec, or for a deploy toPOST /api/wallets/provision. - In each other case, the owner address sends the transaction and pays its gas. For a Safe transaction, the owner sends
execTransactionto the Safe with a pre-validated signature, so the wallet shows one transaction prompt and no typed-data prompt. - For a revoke, a failed sponsorship read selects the owner-sent path. The SDK then refuses only when the owner address holds no gas.
fetchFeeTerms (GET /api/fees). See Fees.
Where your code can run
Today, the Anafi API hosts send the CORS headerAccess-Control-Allow-Origin only for https://app.ana.fi. A browser page on another origin cannot call the Anafi API directly. A server, a script, or your own same-origin proxy can. Chain reads and owner-sent transactions do not go through the Anafi API, so this limit does not apply to them.
The two sign-in flows, recover and the notification-email code request, are accepted only when the EIP-4361 message names the domain of the Anafi dapp, app.ana.fi. The Anafi API refuses a sign-in for another domain with 422. An integration on another domain cannot complete these two flows today.
Flow pages
Safe account
Predict, provision, stage, and commit for a Safe.
ERC20Allow account
Approvals, caps, block switch, stage, and commit.
Update, pause, revoke
Replace a document, stop payments, and leave.
Execution
The redeem transaction and the activity feed.
Read-back
Recover the plaintext document and the account state.
Notification email
Verify an inbox for
notify actions.Payments and subscriptions
One-time payments and monthly payments from a pay page.
Bank payouts
Pay a bank account from a Safe on Polygon Amoy.