Skip to main content
After this page, you know each step in the life of an account, which SDK call does it, and which party pays its gas. Each step links to the page with the full flow.

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 for executeSafeOwnerCalls, which takes ownerSent: true. For a Safe owner operation, the SDK reads GET /api/wallets/{account}/sponsorship (fetchWalletSponsorship). The answer is { feesOn, sponsored }.
  • When feesOn is false, or sponsored is true, Anafi relays the operation and pays its gas. The owner signs an EIP-712 SafeTx message. The SDK sends it to POST /api/wallets/{account}/safe/sponsor_exec, or for a deploy to POST /api/wallets/provision.
  • In each other case, the owner address sends the transaction and pays its gas. For a Safe transaction, the owner sends execTransaction to 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.
The SDK never relays an ERC20Allow operation, and the ERC20Allow methods read no sponsorship. Read the fee terms with fetchFeeTerms (GET /api/fees). See Fees.

Where your code can run

Today, the Anafi API hosts send the CORS header Access-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.