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

  1. Copy the code above
  2. Run on devnet to test
  3. Mint tokens to your agent wallet
  4. Agent uses the protected mint for all payments