Quick Start: Settlement for AI Agents
Get deterministic write-path settlement for your blockchain transactions in two steps.
The Backpac gateway empowers autonomous agents to execute high-value transactions with full settlement certainty. The core power path is not just reading data—it's executing a sendTransaction and definitively verifying it via Proof of Transport.
The AI Agent Power Path
Step 1: Send the Verification-Enforced Intent
Rather than blinding sending RPC traffic and polling, your agent generates an execution intent and watches for absolute finality.
Using the Cairn CLI:
# Generate a Proof of Intent tracker
cairn poi create --ttl 600 > poi.json
# Fire the transaction linked to the tracker
cairn intent send \
--method eth_sendRawTransaction \
--params '["0xYOUR_SIGNED_TX"]' \
--poi-id $(jq -r .id poi.json)Step 2: Block for Settlement Certainty
Stop writing complex polling loops. Backpac automatically detects network drops or reorgs, performing internal failover until the transaction truly settles. Your agent just waits for the final cryptographic proof.
# Block agent execution until finality is reached
cairn intent wait $(jq -r .id poi.json) --timeout 60
# Check final receipt
cairn proof verify $(jq -r .id poi.json)Result: You get guaranteed delivery. If the node fails, auto-failover in <2s. When the transaction finalizes, your agent receives:
- A confirmed settlement status
- A Proof of Transport — a signed cryptographic receipt proving your transaction settled.
What Changed in Your Code
The Typescript SDK Approach
While you can use raw curl, we recommend using your existing Web3 libraries side-by-side with our API for deterministic execution.
import { createPublicClient, http } from 'viem';
import { base } from 'viem/chains';
// 1. Point via Backpac to your premium infrastructure cluster
const client = createPublicClient({
chain: base,
transport: http('https://rpc.backpac.io/base', {
fetchOptions: {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
})
});
async function executeDeterministically(signedTx: `0x${string}`) {
// 2. Create the Execution Intent
const intentRes = await fetch('https://api.backpac.xyz/v1/execution/intents', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ chain: 'base', guarantees: { finality: 'economic' } })
});
const { intent_id } = await intentRes.json();
// 3. Send Transaction with the Intent Header mapped
const hash = await client.request({
method: 'eth_sendRawTransaction',
params: [signedTx]
}, {
headers: { 'X-Backpac-Intent-Id': intent_id }
});
console.log(`Broadcasted. Backpac is orchestrating settlement... Intent ID: ${intent_id}`);
// 4. Wait for true Settlement Certainty (Verification Path)
while (true) {
const statusRes = await fetch(`https://api.backpac.xyz/v1/execution/intents/${intent_id}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const statusBody = await statusRes.json();
if (statusBody.status === 'FINALIZED') {
console.log('✅ Finality Confirmed. Proof of Intent active.');
break;
}
if (statusBody.status === 'FAILED') {
throw new Error(`Transaction failed settlement: ${statusBody.error}`);
}
// Check every 2 seconds
await new Promise(resolve => setTimeout(resolve, 2000));
}
}This single flow completely eliminates "Silent Failures". If the transaction is dropped, reorged, or expires, Backpac will catch it and return a FAILED state deterministically.
What Happens Behind the Scenes
Your App Backpac
│ │
│─── 1. Create Intent ───────────▶│ Reserves execution capacity
│◀── intent_id ──────────────────│
│ │
│─── 2. sendTransaction + header ▶│ Broadcasts to healthy nodes
│ │ Monitors mempool inclusion
│ │ Auto-failover if node drops
│ │ Detects reorgs
│ │
│◀── 3. Webhook: FINALIZED ──────│ Signed Proof of Transport
│ │ Transaction hash + block
│ │ SLA met ✓Intent Lifecycle
| Status | Meaning |
|---|---|
CREATED | Intent reserved, awaiting transaction |
BOUND | Transaction received and matched |
BROADCAST | Submitted to the network |
INCLUDED | Confirmed in a block |
FINALIZED | Finality guarantee met — Proof of Transport issued |
Check status anytime:
curl https://api.backpac.xyz/v1/execution/intents/ei_123456789 \
-H "Authorization: Bearer YOUR_API_KEY"What Backpac Does NOT Do
- ❌ Sign transactions — you keep your keys
- ❌ Create transactions — you build them
- ❌ Manage wallets — you own custody
- ❌ Hold funds — we never touch your money
Backpac guarantees execution correctness. You stay in full control.
Prerequisites
- Backpac account — console.backpac.xyz
- Reliability Pool — a cluster of RPC nodes for your target chain
- Institutional Entry — your gateway URL
- API key — for intent creation
→ Follow the Introduction to set these up.