Make your own agent wallet.
Connect a NEAR testnet wallet, give a new agent a budget and rules, fund it, then try to steal from it yourself. You sign every step; the agent only ever gets a key that can ask for payments.
Connect a testnet wallet
Meteor, Intear, Nightly, Ledger and other NEAR wallets that support testnet. No testnet NEAR yet? Get some from the NEAR testnet faucet. You will sign every step yourself; this page never sees your wallet key.
- Set the rulesToken, budget, cap per payment, guardian threshold, allowed shops, expiry. One approval creates the agent, the guardian and the mandate.
- Fund itwNEAR (wrapped in the same transaction) or testnet USDC goes into the mandate, not to the agent.
- Be your own agentPay with the agent's key, gasless through the relayer. Then try to overspend.
- Revoke and withdrawStop the agent at any time and take back what is left.
Simulate the rules in your browser first
Try a payment
Pretend to be the agent. The same rules as the contract run here in your browser. No wallet needed, nothing is sent.
Press a button to see what the contract would do.
Simulation only. The recorded runs on testnet are listed on the verify page.
Show the contract call this form builds
The create_mandate call
JSONThe arguments this form would send. Amounts are exact token units (6 decimals for USDC), computed with BigInt, never floating point.
{
"agent": "agent.example.testnet",
"guardian": "guardian.example.testnet",
"token": "usdc.example.testnet",
"budget": "50000000",
"per_payment_cap": "5000000",
"approval_threshold": "2000000",
"expires_at_ms": 1794700740000,
"recipients": [
"merchant-a.example.testnet",
"merchant-b.example.testnet"
]
}The contract refuses to create a mandate unless
- the budget is at least the cap per payment, and the approval threshold at most the cap
- owner, agent and guardian are three different accounts
- there are 1 to 16 distinct recipients
- the expiry is in the future