From policy to payout
Open the public transaction receipts for two completed claims on NEAR testnet.
Verify both testnet claims
Clone the AgSurance repo and run this command from its root with Bun. Each successful check prints PASS.
bun run verify:receipts0.25 NEAR CLI replay
Follow one policy on NEAR testnet, from enforcing a spending rule to paying a claim for a separate simulated loss.
- Payment blocked
- 0.01 NEAR attempted
- Approved supplier paid
- 0.05 NEAR sent
- Claim reimbursed
- 0.25 NEAR paid
CLI transaction receipts
- Activate the policy
The owner records the supplier and sets a 0.05 NEAR spending limit.
- Connect the agent
The owner grants the agent permission to call the vault.
- Reject a payment outside the mandate
The CLI requests 0.01 NEAR to the recovery account. The wallet rejects the request and sends no funds.
- Pay the approved supplier
The same CLI agent pays 0.05 NEAR to the supplier in the mandate.
- Record a simulated loss
The demo runner sends 0.30 NEAR to a separate test incident account.
- File and review the claim
The agent files from the CLI. Two reviewers approve the same final loss receipt.
- Pay 0.25 NEAR
The reserve pays the recovery account after a 0.05 NEAR deductible.
Policy and account IDs
- Claim ID
- vault.agsurance-7910a4d8.testnet/1
- Approved supplier
- supplier.agsurance-7910a4d8.testnet
- Simulated loss recipient
- incident.agsurance-7910a4d8.testnet
- Recovery account
- recovery.agsurance-7910a4d8.testnet
Why the second claim paid 0.18 NEAR
In this separate testnet run, the policy limit rose before the claim was filed. The payout used the limit in force at the block where the loss occurred.
- 0.18 NEAR limit at the simulated loss
A simulated transfer of 0.30 NEAR executed in block 277,218,273.
- New limit of 0.42 NEAR
The reserve booked the additional capacity. The vault confirmed the increase in block 277,218,292, effective from block 277,218,293.
- 0.18 NEAR paid after the increase
The agent filed after the increase. Two reviewers approved the earlier receipt, and the reserve paid the limit that applied to that transfer.
Try AgSurance with your wallet
Connect a NEAR testnet wallet to set up an insured agent account or fund the capital pilot.
Connect an agent
- Buy a policy with the owner wallet.
- From the frontend repo in the agent runtime, install dependencies with Bun and create a key.
bun install --frozen-lockfilebun scripts/agent.ts init .agsurance-agent.key - Copy the public key the CLI prints. Paste it under Connect Agent in your policy dashboard and approve the wallet transaction. Keep the private key file in the agent runtime.
- Once the dashboard confirms the connection, use the vault ID to check the policy or file a claim after a recorded loss.
bun scripts/agent.ts status YOUR_VAULT.testnetbun scripts/agent.ts submit-claim YOUR_VAULT.testnet .agsurance-agent.key
Replay the shared reserve claim
See a separate testnet scenario where a reserve shortfall held up reimbursement. No wallet or sign-in required.
Open the interactive replayDuplicate invoice simulation (optional)
A scripted agent stands in for one affected by prompt injection. It requests two payments for one invoice. The simulation runs in your browser with a mock ledger.
- Approved supplier
- Demo supplier
- Invoice INV-1042
- 0.05 NEAR due
- Total spending limit
- 0.12 NEAR