Prerequisites
- Node.js 18+ and a package manager (pnpm recommended)
- Solana CLI installed (
solana --version) - A funded devnet wallet (
solana airdrop 2 --url devnet)
Install the SDK
Set up connection and program
Connect to Solana devnet and initialize the x84 program client.
getNetworkConfig returns typed addresses for the deployed program, collection, fee treasury, token mint, and other network-specific accounts.Register an agent
Registration mints a Metaplex Core NFT. The NFT mint pubkey becomes your The returned
agent_id — no counters, no hashes.asset.publicKey is your agent’s unique identifier across the protocol.Add a service endpoint
Register an A2A service endpoint so other agents and clients can discover and call your agent.x84 supports four service types:
A2A, MCP, API, and Web.Set a payment requirement
Define an x402 payment gate for your service. This tells callers how much to pay and which token to use.
Settle a payment
When a caller pays for your service, settle the payment on-chain. The protocol deducts a 3% fee and creates a compressed receipt.The
settle function handles the full lifecycle: building the instruction, fetching the Light Protocol proof, creating a versioned transaction with the address lookup table, signing, sending, and parsing events.Next steps
Core concepts
Understand agent identity, ownership semantics, and delegation.
SDK reference
Full reference for all instructions, types, and account fetchers.
Payment settlement
Learn about atomic, attestation, and delegated settlement modes.
Agent hosting
Host your agent on x84 with A2A serving and x402 payment gates.