For agents
Private swaps for agents
Zecret Swap and this tool never hold your funds or your keys. They help your agent find, check and track a private swap. Your agent sends from your own wallet, with your approval.
For people: set up your agent
Give your agent the tool.
An agent that runs commands can start here. This command shows the help.
- Command
npx zecret --help
An MCP app, such as Claude Desktop or Cursor, needs this config.
MCP config { "mcpServers": { "zecret": { "command": "npx", "args": [ "-y", "zecret", "mcp" ] } } }Give your agent this prompt.
Paste it into your agent's chat or its standing instructions.
Prompt Use the zecret tool to make private token swaps through Zecret Swap. Run `npx zecret tokens --json` to find tokens. Get a quote with `npx zecret quote --from <token> --to <token> --amount <amount> --json` and show me what I send, what I get, the fees and the time. Make a swap only when I say yes: run `npx zecret swap --from <token> --to <token> --amount <amount> --payout <my address> --refund <my refund address> --yes --json`. It checks 1Click's signature before it gives a deposit address. Show me the exact amount and the deposit address, and send it from my wallet only after I confirm. Use a new payout address for each swap. To follow the swap, set ZECRET_PROOF to the `proof` that the swap command printed, then run `npx zecret status <deposit address> --watch --json`. Never ask for my seed phrase or private keys. Zecret Swap never holds my funds.Approve each swap yourself.
Your agent shows you the quote. You send the deposit from your wallet. Or your agent's own wallet tool sends it, after you confirm.
For agents
The rest of this page is for your agent: the four steps, the examples, the rules and the docs.
Four steps
Tokens
Read the list of tokens. Each token has its decimals and its price in US dollars.
- CLI
zecret tokens- HTTP
GET /api/swap/tokens
Quote
Ask for a dry quote. It shows what you get, the fees and the time. It holds no address.
- CLI
zecret quote --from usdc:base --to zec --amount 50- HTTP
POST /api/swap/quote, dry: true
Verify and get a deposit address
1Click, NEAR Intents' swap service, signs each quote. Ask for a live quote with your two addresses. Check 1Click's signature and the signed request. Only then use the deposit address. The CLI does both.
- CLI
zecret swap --from usdc:base --to zec --amount 50 …- HTTP
POST /api/swap/quote, dry: false
Track
Send the exact amount from your own wallet. Then follow the swap until it ends. Pass the proof, the signature of your live quote, to read its details. Without it you get the status only.
- CLI
zecret status <deposit address> --proof <proof> --watch- HTTP
POST /api/status
Send a token to someone else
Zecret Send pays one token to someone else's address: the same token, on the same chain, through NEAR Intents' confidential route. It uses the same endpoints as a swap.
Ask for a quote as for a swap, with
send: true. Give the token'sassetIdas bothoriginAssetanddestinationAsset.For a live quote,
recipientis the address of the person you pay, on that chain.refundTois an address of yours.Check the live quote as for a swap, with one change:
originAssetanddestinationAssetare the one token you chose. Also check thatamountInlessamountOutlesswithdrawFeeis no more than 3% ofamountIn.Your wallet never pays theirs. NEAR's public record lists the deposit and the payout as separate rows, and no field links them. Both rows show the same token and nearly the same amount, so a watcher can often link them.
Try it
The token list and the quote change nothing. The swap command asks 1Click for a live quote, and checks it before it prints a deposit address.
npm install -g zecret
zecret tokens --search usdc
zecret quote --from usdc:base --to zec --amount 50
zecret swap --from usdc:base --to zec --amount 50 \
--payout <your Zcash address> --refund <your Base address>
zecret status <deposit address> --proof <proof> --watchcurl https://zecretswap.com/api/swap/tokens
curl https://zecretswap.com/api/swap/quote \
-H 'content-type: application/json' \
-d '{"dry":true,"originAsset":"nep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near","destinationAsset":"nep141:zec.omft.near","amount":"50000000"}'
curl https://zecretswap.com/api/status \
-H 'content-type: application/json' \
-d '{"depositAddress":"<deposit address>","proof":"<signature of your live quote>"}'With plain HTTP, the checks are yours. Run every one on a live quote before you send. The docs below list them.
Rules for agents
Check the signature before you send.
1Click, NEAR Intents' swap service, signs every quote. Check its signature. Check that the signed request is the swap you asked for. The CLI does both. Do not send funds on a quote you have not checked.
Send exactly what the quote says.
Send the quoted amount of the quoted token on the quoted chain. Send it in one transfer, from your own wallet.
Give a refund address you control.
If the swap can't finish, NEAR Intents sends your deposit back here, minus a refund fee. Use the wallet you send from, or another you control, not an exchange. When you pay with ZEC, use a t1… address: NEAR Intents refunds ZEC to a transparent address only, and a refund there is public.
Use a new payout address each time.
Your wallet can make as many as you like. The CLI keeps no list of addresses, so this check is yours.
Read the fee.
Zecret Swap charges 0.4%. NEAR Intents charges its own fee, about 0.2% (less on stablecoin pairs). The quote lists both.
Stay inside the limits.
Each swap is $5 to $50,000. Each minute, one IP address may ask for 40 dry quotes, 8 live quotes, 90 status reads and 12 deposit notices. A busy answer says when to try again.
Who can still read what
The NEAR Intents Explorer lists a confidential swap as two separate rows. Each row leaves out one side.
- NEAR's private chain
- A small set of operators runs it and can see the swap.
- Operators
- Zecret Swap's server
- Sees your IP address and the addresses in a quote, and stores none of them. Our host, Cloudflare, keeps a sample of requests, with IP addresses, for up to 31 days. NEAR Intents sees the addresses, not your IP address. Blockchain data providers see the deposit address while you wait, not your IP address.
- Host logs only
- Direct
- One confidential swap through NEAR Intents, into any token, ZEC too. On a fast chain the payout follows within a minute of your deposit confirming, and equals the deposit less the fees and the price difference. Bitcoin takes 8 to 13 minutes, and other slow chains up to 30 minutes.
- Double hop
- One confidential swap into ZEC, at your own shielded Zcash address. Later, when you choose, you swap it out to any token, as a second swap that pays both fees again.
An agent can run Direct or a Double hop, one swap at a time. A Double hop is two swaps: first into ZEC at your own shielded address, then out to a new wallet.
The website also offers Through Zcash: two swaps from one deposit, with our fee once and NEAR Intents' fee on each swap. The ZEC between them is public, so it adds no privacy over Direct. It is on the website only: these docs and the CLI do not cover it.
Machine-readable docs
MCP server
zecret mcp offers four tools: tokens, quote, swap_prepare and status. swap_prepare checks the quote before it returns a deposit address.