@gol/sdk/server. Owner and agent steps run where those keys live, with their own wallets, through @gol/sdk. GOL never sees the owner’s key.
Before you start
- A test API key with the full integration scopes (create one after obtaining access to the console).
pnpm add @gol/sdk@0.9.0 viem@2.54.6. See install the SDK for why both versions are pinned.- An owner account of a supported type on Base Sepolia, holding the USDC your agent will send and a little ETH for the inline gas reimbursement (a few thousandths of an ETH covers many actions).
- An agent key that your server controls. The agent needs no ETH.
@gol/sdk@0.9.0 with the version 3 mandate core on Base Sepolia. See current availability for the supported accounts, mandate rules, deployed addresses, and limits. The SDK section explains the package itself; this page stays the single end-to-end flow.
1. Check the owner’s account
family: null on a contract means the account is not one of the supported configurations. Stop there. A plain EOA (accountKind: "eoa") can become the nexus7702 family through the EIP-7702 setup below.
2. Install the core (owner, once per account)
Smart accounts. The owner installs the GOL core through the account’s own owner path. The SDK builds the exact operation; the owner’s wallet signs it.personal_sign, and the account pays the user operation’s gas from its own ETH. Recheck getAccountStatus until coreInstalled is true.
An EOA (EIP-7702 setup). The EOA keeps its address. It delegates to the reviewed Nexus 1.3.3 code and installs the GOL core in one type-4 transaction, which GOL’s relayer can send at GOL’s cost.
ownerSigner is any signer with signAuthorization({ chainId, address, nonce }) and sign({ hash }), such as a viem local account, or your wallet’s equivalent EIP-7702 and raw-hash signing methods. A wallet that sends type-4 transactions itself can use selfSentEip7702Setup(setup) instead of GOL’s sponsorship. Sponsorship is limited per project per day; beyond it submitEip7702Setup returns rate_limited.
Move an account from the previous deployment
The October 18, 2026 deployment uses a new core address. Existing installations and approvals for the previous core do not authorize the new core. Read the current address throughgetGasConfiguration and require the reviewed deployment
before asking the owner to sign.
For an EOA already delegated to Nexus 1.3.3, initialization is single-use. The owner
removes the previous core with preparePermanentRemoval, waits for its successful
receipt, then installs the current core with prepareOwnerInstallation. Submit
both as owner transactions to that same account. Do not run EIP-7702 setup again
or try to keep both cores installed together. Removing the previous core retires
its mandates; the owner must approve fresh limits for the new core.
Read the installed configuration before each retry. If removal succeeded and
installation failed, retry installation alone. The account and its balances stay
at the same address. Confirm the new configuration through getAccountStatus
before creating a new approval. The consumer app offers these steps in its core
upgrade dialog; an external integration can use the same published SDK helpers.
3. Prepare the approval (server)
prepared.review is a plain summary to show the owner: recipients, caps, gas caps, which outcomes they pay gas for, expiry, the relayer mode, the submitter allowed to send actions and the address it is reimbursed at, and any delegation limits. Send prepared to the browser.
4. Owner signs (browser)
signPreparedGasPolicy first recomputes the policy bytes, mandate and gas policy IDs, digest, and wallet payload from the response and compares them with what you asked for, so a wrong response cannot get signed. The owner sees one eth_signTypedData_v4 request in the format their account checks; for an EIP-7702 delegated EOA that is the GOL payload itself. A Safe with several owners needs its threshold of signatures; pass the assembled signature bytes.
5. Confirm (server)
safe head and the on-chain policy matches the draft. The hosted worker continues observing through finalized in the background. These reads come from one RPC operator. Safe-head settlement is earlier than Ethereum finality and is not a finality claim.
API 0.6.0 can report provisional
included after a signed Alchemy Custom Webhook wakes an exact receipt, canonical block, and expected GOL effect check. Reconciliation performs the same check when no hook arrives. It can also report a later orphaned, reverted, or mismatch result. The confirmed policy still waits for the selected safe head. Sponsored child records add submissionTransactionHash and inclusion while their final status remains pending. SDK 0.6.0 adds waitForGasPolicyInclusion, waitForChildMandateInclusion, waitForEip7702SetupInclusion, and waitForGasExecutionInclusion with one-second default checks. API 0.6.0 uses one Alchemy RPC operator, so the webhook and repeated RPC reads are not independent-provider evidence. The previous core’s hook has not been rebound to the current deployment; core transactions use polling reconciliation. The relayer hook can also trigger checks for GOL-relayed transactions. No fixed latency is promised.
Console 0.3.0 shows provisional inclusion separately from confirmation and settlement. This image uses mock data.
6. Submit an agent action (server and agent)
actionId before submitting. A retry with the same actionId and signature returns the original execution and never moves value twice. Changed fields under the same ID are refused.
7. Observe the result
settled.settlement shows how the gas was paid: kind (inline or claim), outcome (success, refusal, or revert), the metered gas units and price, the declared L1 fee, chargedWei, whether it was paid, and the recipient. settled.receipt gives the transaction, block, and each fee component, and settled.ledger lists network cost, owner reimbursement, and GOL’s own costs as separate entries. Use webhooks to be notified instead of polling; polling stays authoritative.
An action outside the owner’s rules, such as an amount above the per-action cap, is refused by the contract and moves no USDC. With refusal consent (bit 2) the owner still pays that transaction’s gas inline.
The console’s Gas activity page lists the project’s owner gas policies with their relayer and mandate tree, and each agent action with its state, network cost, reimbursement, and GOL cost.

8. Use your own relayer (optional)
Withrelayer: { mode: "developer", submitter, recipient } in step 3, the owner approves your relayer to send actions and to be reimbursed. The revert bit is not available in this mode.
developerRelayerTransaction checks that the prepared calldata is the agent’s signed action under this execution’s mandate, action, and policy before you sign. GOL broadcasts the bytes and observes the receipt like its own; you may also broadcast them yourself. The owner reimburses your recipient inline, and GOL records no cost. An unsigned request expires with its quote.
9. Delegate a child mandate (optional)
For a root approved withtree limits, the root’s agent can give another agent a narrower mandate. Every action in the tree is billed to the root’s gas policy, and the core checks each action against the child and every ancestor.
signPreparedChildMandate(...).submission yourself and record it with confirmChildMandate. listChildMandates shows the whole tree.
10. Pause, resume, or revoke a mandate
The owner can pause the root or any child. New actions naming it, or any descendant, are refused before they are signed or sent. Resume restores the same mandate; revoke is permanent.{ action: "resume" } or { action: "revoke" }, and mandateId to target a child. A paused or revoked mandate is refused with capability_unavailable; it is not a rejected on-chain action and moves no USDC. preparedPause.directOwnerCall is the same action as a call the account makes itself.
11. Revoke the gas policy
Costs, trust, and disputes
- The relayer fronts each action’s gas. In the same transaction the core meters the gas used, adds the relayer’s declared L1 data fee, and pays
min(metered cost, the agent's maximum charge, the owner's per-action cap, the remaining total)from the account to the owner-approved recipient, only for outcomes the owner enabled. It never charges one action twice. - GOL verifies each receipt through correlated Alchemy reads at the
safehead. If an inline charge was above the receipt’s actual network cost, the difference is recorded as a refund obligation and returned through the dispute process. A charge the account could not pay stays visible asuncollectable. - A reverted transaction pays nothing inline. With revert consent and GOL’s relayer, GOL can later claim that cost; the GOL attester signs the receipt facts the platform verified, and that signature is a trust dependency bounded by the owner’s caps.
- If a charge looks wrong, open a dispute with
openGasExecutionDisputeor from the action’s detail panel in the console. New actions under that policy pause until GOL resolves it, and a confirmed overcharge is refunded from GOL’s funds.

An action's detail panel shows its relayer, inline settlement, ledger entries, and a dispute form.