> ## Documentation Index
> Fetch the complete documentation index at: https://hevninc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> HEVN accounts are non-custodial in both products. Self-serve (the General tab): the person who owns the email holds the only key and signs for themselves. Whitelabel (the Whitelabel and REST API tabs): the integrator's customer creates and owns their account through Sign in with HEVN, a HEVN-hosted popup on the integrator's site; the integrator's backend holds a developer key, operates linked accounts and books their payouts, and the account holder approves every payout in that popup. The developer key signs only for the integrator's own wallet; it never signs a client's money.
> Use HEVN's terms exactly. A rail is a bank route a client can request. A virtual account (bnk_) is an opened rail. Account details are what a payer needs in order to wire money, and arrive in a field named requisites. A client is a customer's own account linked to the integrator through Sign in with HEVN (POST /dapi/v1/connect/sessions, then POST /dapi/v1/clients/link); there is no API call that creates one. The business behind it is the integrator's customer. A contact is a saved destination; a beneficiary is the party at the far end of a fiat payout. Every departure of money is a payout, to a bank account or to a wallet alike.
> Never name a banking partner. Say 'a licensed banking partner'.
> There are no published fee rates, spreads or minimums. Prices come from a quote on a specific payment; direct pricing questions to HEVN rather than inventing numbers.
> The whitelabel API is at /dapi/v1 and takes a developer-key session plus an X-Hevn-Account header. Developer keys have an IP allowlist and no scopes. Remote transfers are at /api/v1/remote_spend_limit and take a remote transfer key (rsl_) in X-Api-Key, bounded by an onchain spend permission the account holder grants. They are different credentials and neither works on the other surface. The HEVN CLI is discontinued.

# Shared account access

> Invite other users to manage a balance — with full onchain ownership or a limited spend allowance — grantable and revocable without HEVN in the middle.

A HEVN account owner can invite other users to help manage the balance — for example, a founder adding a finance teammate. This is **not** implemented as a platform-level permission that HEVN enforces off-chain. It is implemented directly at the wallet layer, using two standards built by Coinbase for Base smart wallets.

## Two access modes

| | Full access | Limited access |
| - | - | - |
| Standard | [`MultiOwnable`](https://github.com/coinbase/smart-wallet/blob/main/src/MultiOwnable.sol) (Smart Wallet owners) | [Spend Permissions](https://github.com/coinbase/spend-permissions) |
| What the invitee can do | Anything an owner can: spend the entire balance, manage other owners | Spend **up to an exact allowance** (e.g. 500 USDC per month), nothing else |
| Enforced by | The wallet contract's owner check | The `SpendPermissionManager` contract, onchain |
| Typical use | Co-founder, fully trusted partner | Accountant, operations teammate, automation/agent with a budget |
| Revocation | Remove the owner onchain | Revoke the permission onchain |

## Full access: `MultiOwnable`

Coinbase's Smart Wallet contracts include [`MultiOwnable`](https://github.com/coinbase/smart-wallet/blob/main/src/MultiOwnable.sol), an auth module that maintains a set of owners onchain. Key properties:

* **Owners are stored as `bytes`** — an owner can be a 32-byte-padded Ethereum address *or* a 64-byte secp256r1 (passkey) public key.
* **Owner management is itself owner-gated.** Adding an owner (`addOwnerAddress` / `addOwnerPublicKey`) or removing one (`removeOwnerAtIndex`) requires a signature from an existing owner.
* **Every owner's signature is validated by the wallet contract** for each user operation under [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337).

A full owner is a peer: they can spend any amount and manage the owner set. Grant full access only to people you would trust with the entire balance.

See Base's documentation on [Base Account](https://docs.base.org/base-account/overview/what-is-base-account), where multi-owner support is a core feature of every smart wallet.

## Limited access: Spend Permissions

For everything short of full trust, HEVN uses [Spend Permissions](https://docs.base.org/base-account/improve-ux/spend-permissions) — an onchain primitive from Coinbase that lets a wallet owner grant another account the right to spend **a precisely bounded amount**.

A permission is a signed `SpendPermission` struct with explicit constraints:

| Field | Meaning |
| - | - |
| `account` | The smart wallet the funds come from |
| `spender` | Who may spend (the invitee's address) |
| `token` | Which asset (USDC) |
| `allowance` | Maximum amount per period |
| `period` | Length of the recurring window (e.g. 30 days) |
| `start` / `end` | Validity bounds of the permission itself |

How it works onchain:

* The [`SpendPermissionManager`](https://github.com/coinbase/spend-permissions) singleton contract is registered on the wallet and enforces the permission logic: it tracks cumulative usage within each period and rejects anything beyond the allowance.
* When a new period begins, usage resets to zero — enabling recurring budgets ("this account may spend up to 1,000 USDC per month").
* The spender **cannot** exceed the allowance, touch other tokens, or change wallet ownership. The constraints are contract-enforced, not policy-enforced.
* The owner can [revoke](https://docs.base.org/base-account/improve-ux/spend-permissions) the permission onchain at any time, immediately ending the spender's access.

## How HEVN uses it

**1. Invite**

The account owner invites another HEVN user by email and chooses the access mode — full ownership or a spend allowance. Because every HEVN user's Privy address is [deterministic from their email](https://hevninc.mintlify.site/general/architecture.md#the-deterministic-chain), HEVN can resolve the invitee's key immediately.

![Invite member dialog with role, operations, spending limit and expiry](https://mintcdn.com/hevninc/LFQWsh1Hc0h_SGmj/images/team-invite-member.png?fit=max\&auto=format\&n=LFQWsh1Hc0h_SGmj\&q=85\&s=819a168504ced45a323e87a5e012c5ab)

Inviting an operator with a 500 USDC monthly spending limit — the allowance and period become the onchain SpendPermission

**2. Grant — signed by the user, not HEVN**

The account owner signs the grant: an owner-addition operation for full access, or a `SpendPermission` for limited access. HEVN prepares the operation and sponsors its gas, but cannot execute it — only the owner's signature makes it valid.

**3. Shared management**

The invitee signs operations with their own key through their own email login — unrestricted as an owner, or within the allowance as a permitted spender. No key material is ever shared between users.

![Team management page showing an owner and an operator with a 500 USDC allowance refreshing in 30 days](https://mintcdn.com/hevninc/LFQWsh1Hc0h_SGmj/images/team-manage.png?fit=max\&auto=format\&n=LFQWsh1Hc0h_SGmj\&q=85\&s=e09272a1369b3d782ea18030245c9789)

The team view mirrors the onchain state: the operator's remaining allowance, its refresh period, and expiry

**4. Revocation — also onchain**

The account owner removes an owner with `removeOwnerAtIndex`, or revokes a spend permission via the `SpendPermissionManager`. Once confirmed onchain, the removed key can no longer act on the wallet. Revocation does not depend on HEVN's cooperation or uptime.

## Why this design is safe

| Property | Guarantee |
| - | - |
| No key sharing | Each participant signs with their own Privy key; nobody ever reveals a secret to anyone. |
| HEVN cannot grant itself access | Both grants require the owner's signature. HEVN holds no owner key and no spend permission. |
| Limits are contract-enforced | An allowance is checked by the `SpendPermissionManager` on every spend — there is no "trusted middleware" that could be bypassed. |
| Auditable | The owner set, every spend permission, and their full history are public onchain — verifiable on [Basescan](https://basescan.org). |
| Cleanly revocable | Removal and revocation are onchain state changes; access ends cryptographically, not by policy. |

> [!NOTE]
>
> Platform roles (who can see invoices, edit contacts, etc.) are managed separately by the HEVN API under the [platform JWT](https://hevninc.mintlify.site/general/authentication.md). Onchain ownership and spend permissions govern money; platform roles govern metadata. HEVN's app keeps the two in sync when you manage teammates.

## References

* [coinbase/smart-wallet](https://github.com/coinbase/smart-wallet) — `MultiOwnable` source and audits
* [coinbase/spend-permissions](https://github.com/coinbase/spend-permissions) — `SpendPermissionManager` source and audits
* [Use Spend Permissions](https://docs.base.org/base-account/improve-ux/spend-permissions) — Base documentation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.