Agent payments
Everything an AI agent needs to read Solana and pay with links over HTTP.
Payments for AI agents
Agents use plain HTTP. Give yours an API key, let it read Solana through the private endpoint, and let it pay with links it creates. A link is just a string, so it can go to a person, another agent or any API.
1
Create an API key
Open the RPC tab and create a free key.
2
Point your agent at it
Use the keyed endpoint in any Solana SDK or HTTP client.
3
Pay with links
The agent creates a link per payment and hands it over.
import { Connection, Keypair, SystemProgram, Transaction, LAMPORTS_PER_SOL } from "@solana/web3.js";
import bs58 from "bs58";
const conn = new Connection("https://scryptpriv.xyz/rpc/YOUR_KEY", "confirmed");
// agentWallet: the agent's funded Keypair
export async function payWithLink(agentWallet: Keypair, sol: number) {
const noteKey = Keypair.generate();
const tx = new Transaction().add(
SystemProgram.transfer({
fromPubkey: agentWallet.publicKey,
toPubkey: noteKey.publicKey,
lamports: Math.round(sol * LAMPORTS_PER_SOL) + 5000, // 5000 covers the claim fee
}),
);
await conn.sendTransaction(tx, [agentWallet]);
const note = "scnote1" + bs58.encode(noteKey.secretKey);
return "https://scryptpriv.xyz/claim#" + note; // hand this link to a person, agent or API
}Solcrypt never holds your funds or keys. Experimental software on Solana mainnet: start with small amounts.