Pick your surface
If you just want to drop Leash into an AI agent (Cursor, Claude Desktop, Cline, …), you do not need to clone this repo at all. Skip straight to one of:- Standalone MCP server —
npx -y @leashmarket/mcpand the agent can mint, pay, and discover on Solana from the chat. - Human CLI —
leash—npm i -g @leashmarket/clifor terminal ops on the same identity. - TypeScript SDK —
@leashmarket/sdk— typedLeashClientfor app developers.
Prerequisites
- Node >= 20
- pnpm 9
- (Optional) Docker for the compose flows
Install + build
Run the split stack (default)
runner (:8787), seller-demo (:3001), and web (:3000).
Run the merged stack
POST /echo) and buys (interval-driven calls back into itself), all writing to one receipt feed.
Scripted demo
Hosted playground at a glance
Once the web app is up at http://localhost:3000:| Surface | What it is | Signing model |
|---|---|---|
/agents/new | Mint a Core asset + Agent Identity: paste your hosted Core metadata JSON URL, configure services/trust/rules, then mint. Spend delegation is not configured here — use the agent profile after mint. | Privy embedded wallet (asset owner). |
/agents/[mint] | Identity, treasury, execute (executive + delegation), optional Genesis token launch, and spend delegation / funding controls. | Privy embedded wallet. |
/seller | Payment-Link Builder. Settlement currency + optional “also accept” stables → shareable /x/<id> x402 paywall. | Runner stores descriptors; /x/<id> settles via facilitator-devnet.leash.market (Leash default). |
/buyer | Autonomous-agent cockpit. Pay with (USDC / USDT / USDG) + policy rules → fire x402 URLs; treasury readout follows the selected mint. | Privy wallet signs as the agent’s registered Executive (no keys in browser). |
