Policy composer
Set your rules in plain English.
Get deployable code.
Answer 4 questions. We compile them to an OnleashClient.deployProtectedMint() call — ready to run.
Spend limits
How much can the agent spend per transfer?
This is the single hardest limit. No single transfer can exceed it — no matter what the agent signs.
deploy.ts · live preview
import { Connection, Keypair } from "@solana/web3.js";
import { Wallet } from "@coral-xyz/anchor";
import { OnleashClient } from "@onleash/sdk";
const conn = new Connection("https://api.devnet.solana.com", "confirmed");
const wallet = new Wallet(payer); // your Keypair
const client = new OnleashClient(conn, wallet);
const { mint } = await client.deployProtectedMint({
decimals: 6,
perTxMax: 100n * 1000000n, // 100 tokens max per transfer
dailyCap: 1000n * 1000000n, // 1,000 tokens max per 24h
allowlist: [/* add approved ATAs */],
});
console.log("Protected mint:", mint.toBase58());Next steps
- Copy the code above
- Run on devnet to test
- Mint tokens to your agent wallet
- Agent uses the protected mint for all payments