06 / Developers
Protocol handbook
Contracts · RPC · API · integration
VANTOR is a reader over public infrastructure. Everything it shows comes from these contracts and APIs, so you can read it yourself, or use VANTOR's JSON endpoints. The documentation explains the concepts behind them.
- Sheet
- 06 / 07
- Route
- /developers
- Chain
- Robinhood Chain · 4663
- API
- /api/v1 · JSON, read-only
- Keys
- Never shown: hosts only
01Network
Robinhood Chain mainnet · chain 4663 · ETH for gas
- Chain ID
- 4663
- CAIP-2
- eip155:4663
- Gas
- ETH
- Public RPC
- rpc.mainnet.chain.robinhood.com
- Robinhood documents the official public RPC as rate-limited and not for production traffic.
- On the official public RPC, eth_getLogs accepts ranges up to 10,000,000 blocks when every topic position holds one value; OR-ed topics are limited to 100,000 blocks. Historical state is not served.
- Source: docs.robinhood.com/chain/connecting (opens in a new tab)
02RPC infrastructure
The endpoints this deployment reads through, from its own configuration.
Reading the RPC configuration…
Hostnames only: endpoint paths, where providers put API keys, are never shown.
03Contracts
Verified against each protocol's own documentation and on chain.
| Contract | Address | Role | Source |
|---|---|---|---|
| USDG | 0x5fc5…d168 on the block explorer (opens in a new tab) | Settlement currency. 6 decimals, EIP-3009 transfers. | docs.robinhood.com (opens in a new tab) |
| ERC-8004 Identity Registry | 0x8004…a432 on the block explorer (opens in a new tab) | ERC-721 agent identities (agentId = tokenId, agentURI = registration file). | github.com (opens in a new tab) |
| ERC-8004 Reputation Registry | 0x8004…9b63 on the block explorer (opens in a new tab) | Feedback signals posted by clients about agents. | github.com (opens in a new tab) |
| Priors CreditPoolV2 | 0x2812…DE21 on the block explorer (opens in a new tab) | USDG credit pool for ERC-8004 agents: lines, loans, repayments, defaults. | github.com (opens in a new tab) |
| Priors CreditLensV2 | 0x9d70…3D9B on the block explorer (opens in a new tab) | Read-only views: on-chain score and available credit per agent. | github.com (opens in a new tab) |
04Identity
ERC-8004: read an agent, or register one from a browser wallet.
import { createPublicClient, http, parseAbi } from 'viem';
import { robinhood } from 'viem/chains';
const client = createPublicClient({
chain: robinhood,
transport: http('https://rpc.mainnet.chain.robinhood.com'),
});
const agentId = 437n;
const [owner, agentURI, score] = await Promise.all([
client.readContract({
address: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432', // ERC-8004 Identity Registry
abi: parseAbi(['function ownerOf(uint256) view returns (address)']),
functionName: 'ownerOf',
args: [agentId],
}),
client.readContract({
address: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432',
abi: parseAbi(['function tokenURI(uint256) view returns (string)']),
functionName: 'tokenURI',
args: [agentId],
}),
client.readContract({
address: '0x9d7035722bd42C551f82FEB9FDDd17453AEF3D9B', // Priors CreditLensV2
abi: parseAbi(['function score(uint256) view returns (uint256)']),
functionName: 'score',
args: [agentId],
}),
]);import { createWalletClient, custom, parseAbi } from 'viem';
import { robinhood } from 'viem/chains';
// A registration file stored fully on chain, as ERC-8004 recommends.
const file = {
type: 'https://eips.ethereum.org/EIPS/eip-8004#registration-v1',
name: 'my-agent',
description: 'What it does and what it charges.',
services: [{ name: 'web', endpoint: 'https://my-agent.example' }],
x402Support: true,
active: true,
supportedTrust: ['reputation'],
};
const bytes = new TextEncoder().encode(JSON.stringify(file));
const agentURI = 'data:application/json;base64,' + btoa(String.fromCharCode(...bytes));
const wallet = createWalletClient({ chain: robinhood, transport: custom(window.ethereum) });
const [account] = await wallet.requestAddresses();
const hash = await wallet.writeContract({
account,
address: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432',
abi: parseAbi(['function register(string agentURI) returns (uint256 agentId)']),
functionName: 'register',
args: [agentURI],
});
// The agent ID is in the Registered(agentId, agentURI, owner) event of the receipt.05Payments
x402 v2, exact scheme, settled in USDG on eip155:4663 by the Priors facilitator.
// From the Priors API documentation (api.priors.trade): pay 0.03 USDG per call.
import { wrapFetchWithPayment, x402Client } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';
const client = x402Client.fromConfig({
schemes: [{
network: 'eip155:4663',
client: new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
}],
// USDG is not a built-in x402 asset: allow it, capped per payment.
spendControls: {
allowedAssets: [{
network: 'eip155:4663',
asset: '0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168',
maxAmountPerPayment: '30000', // 0.03 USDG
}],
},
});
const res = await wrapFetchWithPayment(fetch, client)(
'https://api.priors.trade/v1/score/437',
);06Credit
Priors: check an agent's repayment record and score before paying it.
# Free, keyless: an agent's Priors repayment record and Score v2
curl -s "https://priors.trade/api/check?agent=437"
# By address: every agent it owns or declared as its payment wallet
curl -s "https://priors.trade/api/check?address=0x…"07VANTOR read API
JSON, read-only, cached for about 15–30 seconds. Base: https://vantor-one.vercel.app
| GET | Returns | Errors |
|---|---|---|
| /api/v1/agents/{id} | Identity (owner, payment wallet, agent URI, parsed registration file, binding), Priors credit record, Trust Score with dimensions, source addresses. | 400 invalid ID · 404 not registered · 502 source unreachable |
| /api/v1/network | Latest block, identity count, Priors pool figures, USDG supply, facilitator kinds. Each part has its own ok/error. | Always 200; failed parts carry { ok: false, error } |
| /api/v1/wallets/{address} | USDG and ETH balances, agents owned with credit records and open loans, recent USDG transfers, x402 listings paying the address. | 400 invalid address · 502 source unreachable |
# Identity, credit record and Trust Score of one agent, with sources
curl -s https://vantor-one.vercel.app/api/v1/agents/437
# Network figures: identities, pool, USDG supply, facilitator
curl -s https://vantor-one.vercel.app/api/v1/networkAmounts are atomic USDG (6 decimals) as decimal strings. Trust Scores follow the published methodology.
08Configuration
Environment variables. Every one is optional; defaults are the official public endpoints.
| Variable | Scope | Purpose |
|---|---|---|
| ROBINHOOD_RPC_URLS | Server | Comma-separated RPC endpoints, tried in order. Put keyed provider URLs here. |
| ROBINHOOD_LOGS_RPC_URL | Server | Endpoint for eth_getLogs; must accept wide block ranges. |
| IPFS_GATEWAY_URL | Server | Gateway for ipfs:// registration files. |
| VANTOR_JOB_PROVIDERS | Server | Extra job manifest URLs (agent002 protocol). |
| PRIORS_SITE_URL / PRIORS_API_URL / PRIORS_FACILITATOR_URL | Server | Priors endpoints; defaults are the official ones. |
| NEXT_PUBLIC_ROBINHOOD_RPC_URL | Browser | RPC for wallet-side reads. Public: never a keyed URL. |
| NEXT_PUBLIC_SITE_URL | Browser | Canonical URL for metadata. |