Start
Quickstart
Verify a NEAR agent in one minute from the web, the CLI, HTTP or MCP, then run the demo from the repository.
Two demo agents are live on testnet. bound-agent2-mwfnc6q8.testnet holds cert 1, left Verified until 2026-11-30. bound-agent-mwfnc6q8.testnet holds cert 0, which was settled against in the demo and reads Invalid. Every read below needs no NEAR account and no key.
1. In the browser
Open the app and paste an agent account into the verify box. The page shows the verdict, coverage, the agent's key and code confinement, claims and, for a settled certificate, the settlement waterfall.
2. From a terminal
Node.js 20 or later. Nothing to install first:
npx @bound/near verify bound-agent2-mwfnc6q8.testnetIt prints the certificate, coverage (reserve plus auditor allocation), confinement and a decision, and exits 0 for deal. Try the settled agent to see a refusal (exit 2):
npx @bound/near verify bound-agent-mwfnc6q8.testnetAdd --json for machine-readable output. See CLI.
3. Over HTTP
curl https://near.boundprotocol.dev/api/near/verify/bound-agent2-mwfnc6q8.testnetThe answer is JSON with deal, reason, the raw certificate view and the confinement check, read fresh from testnet and sent with cache-control: no-store (check cert.now for freshness). See HTTP API.
4. From an LLM agent (MCP)
Add the server to any MCP client that launches stdio servers (Claude Desktop, Cursor and similar):
{
"mcpServers": {
"bound-near": {
"command": "npx",
"args": ["-y", "@bound/near", "mcp"]
}
}
}Then ask the model to verify bound-agent2-mwfnc6q8.testnet. It calls near_verify_agent and near_check_agent_keys. See MCP server.
5. In code
npm install @bound/nearimport { fmtUsdc, verifyAgent } from "@bound/near";
const r = await verifyAgent("bound-agent2-mwfnc6q8.testnet");
if (r.deal && r.confinement?.confined) {
console.log(`deal: coverage ${fmtUsdc(r.coverage)} USDC`);
} else {
console.log(`refuse: ${r.reason}`);
}Run it from the repository
Prerequisites: Rust through rustup (the pinned 1.95.0 toolchain installs itself), cargo-near 0.23, Node.js 22 and pnpm 10. Clone the near-hackathon branch and run everything from the repository root.
pnpm install --frozen-lockfileOffline: the full lifecycle in tests
cd near && cargo testExpect 132 passed (unit), then 2 passed (near-sandbox: full_lifecycle_settles_victim, withdraw_failure_recredits_and_guards_hold), then 4 passed (mock token). The first run downloads the sandbox binary.
Every check at once
near/scripts/verify.shBuilds both wasm files, runs fmt, clippy, all tests, the TypeScript typecheck and vitest, checks that the built wasm sha256 equals the deployed one, then runs near:status and near:evidence. It ends with == all checks passed.
Zero-secret testnet reads
pnpm --silent near:status # contract ids, on-chain code_hash == recorded, get_config, cert count
pnpm --silent near:verify bound-agent2-mwfnc6q8.testnet
pnpm --silent near:verify bound-agent-mwfnc6q8.testnet # exit 2 on purpose: refuse
pnpm --silent near:evidence # re-checks every recorded tx hash on an archival node
pnpm --silent near:mcp-smoke # MCP client calls every read tool (8 checks)Use --silent so pnpm does not add its own lines. Without it, the settled agent's exit code 2 shows up as ELIFECYCLE, which only reports the exit code.
Replay the demo on testnet
pnpm near:demo --freshpnpm near:demoon the canonical deployment needs the arbiter key, which only the author has.--freshcreates a new deployer account and deploys a private copy. Its arbiter isarbiter.<deployer>, with the key saved in your own~/.near-credentials/testnet, so you decide its claims.- When the public faucet rate-limits, the script creates actors through the
testnetregistrar funded by--funder <account>. Pass your own account with a key in~/.near-credentials/testnet(about 10 testnet NEAR for--fresh).
The demo runs eight acts and asserts every balance change:
- Actors are created, mock USDC is minted, storage is registered.
- The auditor stakes; the operator publishes, the agent accepts, reserve and float are funded, the auditor attests.
- The agent swaps its full-access key for a pay-only key, then pays a service through the gate.
- A scripted attack: over-float and off-allowlist payments fail on chain, other actions are refused by NEAR, then the operator halts.
- A false
BoundExceededclaim is rejected in the same transaction. - The service files a Harm claim; the arbiter upholds it.
- Anyone closes the window; the victim is paid from the reserve, then the slash.
- A second certificate is left Verified for judging.
The recorded run of this demo is mwfnc6q8. Each step and its transaction is on its run page, re-checked against an archival node.