Deploy your first GuardedWallet
Stand up a governed agent wallet on Arc Testnet in five steps. Every transaction it attempts will be evaluated against a Doctrine before it can settle on-chain.
- A GuardedWallet is a real wallet owned by your signer, but spending is checked by policy before it is allowed through.
- Use it when an AI agent, automation, or team wallet needs budget limits, vendor rules, and human review for risky actions.
- Arc Testnet is the safe place to practice. You can connect a wallet, deploy, and inspect results without risking production funds.
- Live workspaces show indexed, pending, empty, or error states while the indexer catches up; labeled demo rows are only for the configured demo wallet.
Install the SDK
npm install @arcanum/sdk
Configure the signer
Deploy the wallet with a Doctrine
import { WalletFactoryAbi } from "@arcanum/contracts";
import { parseUnits } from "viem";
const policy = {
perTxCap: parseUnits("50", 6),
daily24hCap: parseUnits("500", 6),
monthlyRollingCap: parseUnits("5000", 6),
allowedCategories: 0b11111n,
escalationThreshold: parseUnits("100", 6),
requireAllowlist: true,
};
const txHash = await walletClient.writeContract({
address: process.env.NEXT_PUBLIC_WALLET_FACTORY as `0x${string}`,
abi: WalletFactoryAbi,
functionName: "createWallet",
args: [ownerAddress, "AgentBackend", policy, [agentSigner], council, 2],
});Fund the wallet
Watch the Event Stream
First Restraint
When a transaction exceeds policy, Arcanum records a restraint instead of claiming a fake approval. Review the escalation, collect signatures, then release or reject from the approver portal.
- A restraint is a pause, not a failure. It means the wallet needs a human decision before money moves.
- Release means the approvers agree the transaction is safe and let it continue.
- Deny means the approvers decide the transaction should not execute.
- Quorum shows how many signatures have been collected and how many are still needed.
- The approver portal is public/shareable for the specific request, so reviewers can open the release page directly.
In the console, restrained transactions appear in Escalations. Open the row, inspect the vendor, amount, category, and reason, then use RELEASE or REJECT only when you mean to take that action.
SDK
Install the SDK with npm and point it at Arc Testnet. The current console does not require a GuardedWallet implementation address because WalletFactory deploys full wallet instances directly.
- Install with npm. This repository no longer requires pnpm for normal development.
- Configure the Arc Testnet RPC and contract addresses before sending transactions.
- Use the SDK for typed helpers and formatting; use the console when you want a visual operator workflow.
- Keep private keys out of committed files, screenshots, browser logs, and support messages.
npm install @arcanum/sdk
import { ArcanumClient } from "@arcanum/sdk";
import { ARC_TESTNET_RPC_URL, arcTestnet, usdcErc20 } from "@arcanum/sdk/chains";
const arcanum = new ArcanumClient({
walletAddress,
agentSigner,
chain: arcTestnet,
rpcUrl: process.env.ARC_TESTNET_RPC ?? ARC_TESTNET_RPC_URL,
});
const simulation = await arcanum.simulate({
to: vendorAddress,
amount: usdcErc20(12),
});Contracts
Deployed Arc Testnet contracts are read from the frontend environment and the deployment artifact. Configure WalletFactory, PolicyEngine, EscalationManager, AnomalyOracle, and VendorRegistry before enabling on-chain wallet creation.
- WalletFactory creates full GuardedWallet instances. Users interact with it when creating a governed wallet.
- PolicyEngine evaluates spend limits, categories, vendor rules, and escalation requirements.
- EscalationManager tracks restrained transactions and release/reject decisions.
- AnomalyOracle supplies risk signals used by policy checks.
- VendorRegistry stores allowlisted counterparties once write actions are wired.
- NEXT_PUBLIC_GUARDED_WALLET_IMPL is obsolete and must not be used because there is no proxy implementation address.
WalletFactory 0x1Da7E51b537F9E6CF5bB308b3B2d6fdc5D9E4750 PolicyEngine 0x767C95C3E914d63bD26a5f1cDE4d6DA950462112 EscalationManager 0x6E03e0030fCeE242E2cCB77Da8D7C6c93a36A37E AnomalyOracle 0x7A80C967A69E1d1a6bb2286089BB5945f3274cf4 VendorRegistry 0x4A4d419292F2E374421B45907861BBB5adA6eF82 USDC 0x3600000000000000000000000000000000000000
API Reference
Local development reads through stable tRPC adapters for agents, vendors, ledger rows, escalations, anomalies, notifications, and organization state. Mutations are user-click only and should never run from render, hover, polling, or effects.
- Read models: dashboard, agents, vendors, ledger, escalations, anomalies, and notifications.
- Click-only actions: release, reject, flag vendor, add vendor, and create governed wallet.
- Local fallback: if a database, indexer, or session is unavailable, the console may show stable demo-safe rows instead of crashing.
- Pending integration: VendorRegistry writes and some policy writes still show honest disabled states until wired.
- Request storm rule: opening a route, hovering, focusing, or changing filters must never submit a mutation.
Examples
Use the dashboard sample org to test the end-to-end loop: deploy readiness, vendor allowlisting, governed ledger decisions, escalation review, and public badge sharing.
- Deploy first governed wallet: open Agents, click Deploy Governed Wallet, connect to Arc Testnet, and submit createWallet once.
- Add a vendor allowlist entry: use Vendors to create a local row today; on-chain VendorRegistry writes are still pending.
- See a normal approved transaction: open Ledger and filter for approved/settled rows.
- See an escalated transaction: open Escalations, inspect the reason, then use the approver portal link for review.
- Share trust context: open an agent, then use Public Explorer or Badge links for read-only external sharing.
Glossary
GuardedWallet: an agent wallet governed by a Doctrine. Doctrine: policy rules evaluated before settlement. Restraint: a held transaction pending review. ArcaneVM: the confidential execution layer label used in the console.
- Agent: a wallet or automation identity that can request payments or operational actions.
- GuardedWallet: a wallet whose transactions are checked by Arcanum policy before they settle.
- Doctrine: the plain-language rulebook turned into machine-checkable spend policy.
- Vendor: a counterparty the wallet might pay, such as an API provider, cloud service, or contractor.
- Allowlist: the approved set of vendors or categories that can be used without extra review.
- Restraint: a paused transaction that requires a release or reject decision.
- Approver: a person or wallet allowed to sign release decisions.
- Indexer: the service that reads on-chain events and turns them into fast UI rows.
- Arcscan: the Arc Testnet explorer for checking transactions and contract addresses.