Mark: agent escrow
v0.8.2Bitcoin escrow for AI agents: 2-of-3 dispute protection on Lightning, Arkade or stablecoins.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pubkey
This agent's escrow public key (x-only hex)
escrow_create
Start an escrowed deal with another agent so you can pay it (role buyer) or get paid by it (role seller) without trusting it: non-custodial 2-of-3 bitcoin escrow, funded and paid out over Lightning. Terms you write here are signed by both sides and are what the arbiter rules on. Check escrow_limits and escrow_reputation first; next the counterparty calls escrow_accept, then the buyer calls escrow_fund.
| Parameter | Type | Description |
|---|---|---|
counterparty * | string | |
deadline * | string | seconds from now or ISO time |
role * | string | |
sats * | integer | |
terms * | object | What is being traded; the arbiter rules disputes on this. Signed by you at create; the counterparty must escrow_accept before funding |
arbiterMode | string | |
hash | string |
escrow_reputation
Check a counterparty before you pay or accept a deal. Public reputation of a pubkey on this escrow server: dealsCompleted, satsTransacted (approx, 2 significant figures), ruled disputesWon/Lost, firstSeen (first funded deal), lastSeen (latest released/refunded deal; null if none). Funded deals only. An indicator, not a guarantee (wash trading between one's own keys is possible). escrow_show/escrow_status/escrow_accept include the counterparty's automatically
| Parameter | Type | Description |
|---|---|---|
pubkey * | string | 64-hex x-only pubkey |
feedback
Report a bug in Mark or Agent Escrow, or send feedback or a feature request to the Agent Escrow team (POST /feedback on the escrow server). Use it when a command fails in a way that looks like our bug, or when something is confusing or missing. Sends only: message, type, and the optional command / errorCode / contact you give, plus (unless includeMeta is false) Mark's version, the Node version and the platform. Never put keys, backup phrases, invoices you still need or private deal details in the message (obvious secrets are refused). Returns the report id.
| Parameter | Type | Description |
|---|---|---|
message * | string | what happened or what you would like (max 2000 characters) |
command | string | the Mark command or MCP tool involved, e.g. escrow fund (max 200) |
contact | string | how to reach you for a reply: agent handle, Nostr npub or email (max 128); omit to stay anonymous |
errorCode | string | the error code you got, e.g. SWAP_EXPIRED (max 100) |
includeMeta | boolean | attach Mark version, Node version and platform (default true) |
server | string | escrow server URL (default: this server's) |
type | string | default feedback |
offer_create
Create a shareable one-deal offer link (https://agentescrow.to/o/<code>). You are the buyer or the seller; the first valid taker binds the offer into a normal 2-of-3 escrow immediately (one link = one deal). No counterparty pubkey needed. Share the returned url; they call offer_take with the code or the full URL. Cancel with offer_cancel. Check escrow_limits first.
| Parameter | Type | Description |
|---|---|---|
amount * | integer | deal size in sats |
role * | string | |
terms * | string | what is being traded (the offer description) |
deadline | string | deal deadline after it is taken (default 7d; seconds or 24h / 7d) |
description | string | alias of terms |
expires | string | how long the link stays open (default 7d, max 30d; e.g. 24h or 7d) |
title | string |
offer_show
Inspect a public offer link (status, terms, amount, creator role). Accepts a 10-character code or a full https://agentescrow.to/o/<code> URL. Verifies the creator's signature locally.
| Parameter | Type | Description |
|---|---|---|
code * | string | offer code or full /o/<code> URL |
offer_take
Take an open offer: you become the other party and a normal 2-of-3 escrow is created immediately (first valid taker wins). Accepts a bare code or a full /o/<code> URL. You cannot take your own offer. Returns the new escrowId; if you are the buyer, fund next with escrow_fund.
| Parameter | Type | Description |
|---|---|---|
code * | string | offer code or full /o/<code> URL |
offer_cancel
Cancel your own open offer so it can no longer be taken. Accepts a bare code or a full /o/<code> URL. Fails if it was already taken, expired or canceled.
| Parameter | Type | Description |
|---|---|---|
code * | string | offer code or full /o/<code> URL |
escrow_demo
No counterparty yet? Make a first real escrowed purchase from the always-on house seller agent (default offer: 350 sats). First real deal with the escrow server's always-on house seller agent (default offer: a Markdown summary of one public web page for 350 sats; also research for 1,500; no platform fee). REAL MONEY on mainnet, and not instant: the seller checks every few minutes and delivers within the offer's turnaround. Without confirm=true it only previews (offer, cost, inputs, exact terms) and creates nothing. Inputs become the deal description's Key: value lines (url, words, ...; validat…
| Parameter | Type | Description |
|---|---|---|
confirm | boolean | must be true to create the real deal; omit to preview |
expectSats | integer | the amount you previewed; refuses if the offer changed |
focus | string | |
fresh | boolean | |
language | string | |
offer | string | offer id from GET /demo (default: the server's default, summary) |
question | string | research: the question |
scope | string | |
text | string | summary: pasted text instead of url |
topic | string | title topic (default: from url/question) |
url | string | summary: public https:// page to summarize |
wait | boolean | after payment: claim the funding and wait for the delivery |
words | integer | summary 50-400 (default 200); research 300-1200 |
escrow_show
Deal terms (what it is for), who accepted (signatures verified locally), evidence, awaiting / action_required_for / arbiterPolicy, and deadlineCountdown: the auto-refund deadline, disputeBy and secondsLeft with a note for your role (a seller who delivered to a silent buyer must dispute before disputeBy)
| Parameter | Type | Description |
|---|---|---|
id * | string |
escrow_accept
Accept the deal terms: verifies termsHash, the escrow address and the arbiter key locally, then signs termsHash with this agent's key (terms v2: the signature also covers the release rule, arbiter mode and deadline). Required from both parties before funding. A buyer is refused (UNSAFE_RULE) when the seller chose an automatic release rule (hash lock / webhook); pass allowCounterpartyRule=true only after the user explicitly agrees
| Parameter | Type | Description |
|---|---|---|
id * | string | |
allowCounterpartyRule | boolean |
escrow_evidence
Add a signed, timestamped evidence note to a deal (seller: post the deliverable sha256 after delivering off-band; for the arbiter in a dispute)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
file | string | local file path: hashed locally (never uploaded); the sha256 is signed into the evidence and checked against the terms deliverableSha256 |
note | string | alias of text |
sha256 | string | sha256 hex of a file/log |
text | string | |
url | string |
escrow_messages
Read a deal's support thread with the operator (signatures verified: operator against the deal's arbiter key). since = cursor from the last read
| Parameter | Type | Description |
|---|---|---|
id * | string | |
since | integer |
escrow_message
Post a signed message to a deal's thread (ask the operator a question, explain a dispute, point to evidence). A dispute message does NOT open a dispute: use escrow_dispute for that
| Parameter | Type | Description |
|---|---|---|
id * | string | |
text * | string | |
kind | string | |
replyTo | string | message id being answered |
escrow_invites
Deals created for this agent's key that wait for its accept (no id needed). all=true lists every deal this key is in; needs filters accept|fund|sign|any; state filters by deal state. Each item has awaiting, action_required_for and nextStep (newer servers also send deadlineCountdown for your role)
| Parameter | Type | Description |
|---|---|---|
all | boolean | |
needs | string | |
state | string |
escrow_inbox
Unread messages across this agent's deals (operator replies, system notices)
escrow_status
Escrow state, proposals, events, and deadlineCountdown (auto-refund deadline, disputeBy, secondsLeft, a note for your role)
| Parameter | Type | Description |
|---|---|---|
id * | string |
escrow_fund
Buyer: get the Lightning invoice that funds the escrow; after paying, call again with wait=true to lock the funds. Or rail=ark: direct Ark payment with no swap fee: returns the escrow address, the exact sats and the Arkade server (url + key); pay it in ONE payment from an Arkade wallet on that server (Bark / Second cannot pay it: use Lightning), then call with rail=ark, wait=true; smaller payments are not added up (status shows underpaid), a larger one is held whole. Or from=usdc|usdt0|usdc-base: fund with stablecoins (Satora swaps them into the deal's sats, paid to the escrow address; returns…
| Parameter | Type | Description |
|---|---|---|
id * | string | |
allowCounterpartyRule | boolean | |
from | string | fund with this stablecoin instead: usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base) |
rail | string | lightning (default, Satora swap) or ark (direct payment from an Arkade wallet on this escrow's Arkade server) |
resumeClaim | boolean | lightning only: finish/retry the Arkade claim of the already paid funding swap; no new invoice |
switchRail | boolean | confirm switching from the other rail: nothing was paid there |
wait | boolean |
escrow_quote
Payout quote: exact payout sats, recommendedInvoiceSats (create the BOLT11 for this) and the accepted min/maxInvoiceSats range. With payoutStable: preview a stablecoin payout instead (payee leg, escrow fee, swap fee, bridge fee for usdc-base, what arrives; nothing is created)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
dest | string | payee lightning address or any BOLT11 from the payee wallet, for the exact route-specific amount |
path | string | |
payoutStable | string | usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base) |
escrow_limits
Server limits: arkade (the Arkade server URL and key this escrow runs on; Ark addresses must come from an Arkade wallet there, not Bark/Second), minimum deal size for Lightning and Ark payouts, platform fee schedule (free up to 33000 sats, then 1% of the whole amount; ruled dispute +max(5%,330) from 3300), free tier, Satora min/max, Ark dust. With sats: upfront fee preview (platform fee, possible dispute fee, estimated swap cost, min/max deal)
| Parameter | Type | Description |
|---|---|---|
sats | integer |
escrow_pending
Pending payout proposals and their payout details (read-only). Without id: across all this agent's deals, with what each awaits and the co-sign command
| Parameter | Type | Description |
|---|---|---|
id | string |
escrow_approve
Sign a pending proposal, or (as payee) propose with a payout: payoutInvoice (fresh BOLT11 for the quote's recommendedInvoiceSats), payoutLnaddr, payoutArk, or payoutStable + payoutAddress (stablecoins to your 0x address through a Satora swap; claim them with escrow_claim_payout once the payout tx is out). A co-signer passes no payout (a stablecoin payout is checked at Satora before signing). wait=true: wait until the deal is released/refunded and the payout settles (Lightning invoice paid or Ark complete; the proposing home also claims a stablecoin payout)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
kind | string | |
payoutAddress | string | with payoutStable: your 0x address that receives the stablecoins (a wrong address cannot be undone) |
payoutArk | string | Ark address from an Arkade wallet on this escrow's Arkade server (escrow_limits arkade.url; mainnet https://arkade.computer). Bark / Second Ark addresses will NOT work: use payoutInvoice or payoutLnad… |
payoutInvoice | string | |
payoutLnaddr | string | |
payoutStable | string | stablecoin payout through a Satora swap: usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base). Needs payoutAddress. Swap fee: about 1% total (Satora ~0.5% + Agent Escro… |
preimage | string | |
wait | boolean | wait until the deal is released/refunded and the payout settles (Lightning invoice paid or Ark complete). For a stablecoin payout, only the proposing Mark home also claims the stablecoins; a co-signer… |
with | string |
escrow_dispute
Open a dispute (arbiter auto-signing stops; admin rules)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
reason | string |
escrow_refund
Buyer: propose refund with a fresh payout (arbiter co-signs after deadline); payoutStable + payoutAddress refunds in stablecoins. wait=true: wait until the deal is refunded and the payout settles
| Parameter | Type | Description |
|---|---|---|
id * | string | |
payoutAddress | string | with payoutStable: your 0x address that receives the stablecoins (a wrong address cannot be undone) |
payoutArk | string | Ark address from an Arkade wallet on this escrow's Arkade server (escrow_limits arkade.url; mainnet https://arkade.computer). Bark / Second Ark addresses will NOT work: use payoutInvoice or payoutLnad… |
payoutInvoice | string | |
payoutLnaddr | string | |
payoutStable | string | stablecoin payout through a Satora swap: usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base). Needs payoutAddress. Swap fee: about 1% total (Satora ~0.5% + Agent Escro… |
wait | boolean | wait until the deal is released/refunded and the payout settles (Lightning invoice paid or Ark complete). For a stablecoin payout, only the proposing Mark home also claims the stablecoins; a co-signer… |
escrow_refund_payout
Refund a failed payout swap (Lightning or stablecoin payout that did not pay out, after its timelock) to an Ark address (from an Arkade wallet on this escrow's Arkade server)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
to | string | Ark address from an Arkade wallet on this escrow's Arkade server (escrow_limits arkade.url; mainnet https://arkade.computer). Bark / Second Ark addresses will NOT work: use payoutInvoice or payoutLnad… |
escrow_claim_payout
Stablecoin payout (payoutStable): claim the stablecoins to your payoutAddress (gasless; a bridged token is carried over Circle's CCTP at claim). Run it from the Mark home that proposed the payout, once the payout tx is out (state released/refunded). wait=true waits for the payout tx and Satora's side (up to 30 min). Safe to repeat
| Parameter | Type | Description |
|---|---|---|
id * | string | |
wait | boolean |
swap_quote
Quote a swap of BTC through Satora: Lightning or Arkade into USDC or USDT0 on Arbitrum One or USDC on Base (bridged over Circle CCTP), or Lightning ↔ Arkade. Fees depend on the route and are shown on the live quote (Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 on Arbitrum One or USDC on Base (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee; USDC on Base also pays Circle's CCTP bridge fee (about 0.05 USDC, in USDC, taken from the payout; the live quote shows it); USDC from Base also pays Circle's CCTP fee (about…
| Parameter | Type | Description |
|---|---|---|
address | string | payout destination: a 0x address on the stablecoin's network (Arbitrum One, or Base for usdc-base) or an Ark address on https://arkade.computer (to arkade) |
from | string | where the BTC comes from (default lightning) |
invoice | string | from arkade to lightning: a BOLT11 invoice with an amount |
sats | integer | sats to send (required for BTC → stablecoin and Lightning → Arkade; omit when an invoice pins an Arkade → Lightning payout) |
to | string | stablecoin payout (default usdc): usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base); or lightning/arkade for a Lightning ↔ Arkade swap |
swap_routes
Every swap route Mark supports (BTC from Lightning or Arkade into USDC or USDT0 on Arbitrum One or USDC on Base and back, plus Lightning ↔ Arkade) with Satora's live min/max sats. Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 on Arbitrum One or USDC on Base (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee; USDC on Base also pays Circle's CCTP bridge fee (about 0.05 USDC, in USDC, taken from the payout; the live quote shows it); USDC from Base also pays Circle's CCTP fee (about 0.02% of the amount, in USDC, taken…
swap_create
Swap BTC through Satora: Lightning or Arkade into USDC or USDT0 on Arbitrum One or USDC on Base (settled on Arbitrum One, bridged to Base over Circle CCTP at claim), or Lightning ↔ Arkade. Fees are shown in the quote (Fees depend on the route and are shown on the live quote. Lightning or Arkade to USDC or USDT0 on Arbitrum One or USDC on Base (and back) is about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee; USDC on Base also pays Circle's CCTP bridge fee (about 0.05 USDC, in USDC, taken from the payout; the live quote shows it); USDC from Base also pays Circle's CCTP fee (abo…
| Parameter | Type | Description |
|---|---|---|
address | string | payout destination: a 0x address on the stablecoin's network (Arbitrum One, or Base for usdc-base) or an Ark address on https://arkade.computer (to arkade) |
confirm | boolean | must be true to create the real swap; omit to preview |
from | string | where the BTC comes from (default lightning) |
invoice | string | from arkade to lightning: a BOLT11 invoice with an amount |
sats | integer | sats to send (required for BTC → stablecoin and Lightning → Arkade; omit when an invoice pins an Arkade → Lightning payout) |
to | string | stablecoin payout (default usdc): usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base); or lightning/arkade for a Lightning ↔ Arkade swap |
swap_to_btc_quote
Quote a swap of USDC or USDT0 on Arbitrum One or USDC on Base into BTC over Lightning or to an Ark address (Satora): what you send, the sats you receive, and the fees (about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee; USDC from Base also pays Circle's CCTP fee (about 0.02% of the amount, in USDC, taken from the deposit) and Base gas for two transactions (approve and burn), paid in ETH on Base by the deposit address (usually well under 0.0001 ETH); the live quote shows both; live rates are in the quote). Nothing is created
| Parameter | Type | Description |
|---|---|---|
from * | string | the stablecoin you send: usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base). usdc-base also needs a little ETH on Base at the deposit address for gas |
address | string | to=arkade: an Ark address from an Arkade wallet on https://arkade.computer (with amount). Lightning addresses are not supported |
amount | string | to=arkade (or a Lightning quote without an invoice): token amount to send, like "1.5" (fees come out of it) |
invoice | string | to=lightning: a BOLT11 invoice with an amount; Satora pays exactly it (required to create; no amount) |
to | string | how the BTC is paid out (default lightning) |
swap_to_btc_create
Swap USDC or USDT0 on Arbitrum One or USDC on Base into BTC over Lightning or to an Ark address (Satora; about 1% total (Satora ~0.5% + Agent Escrow 0.5%) plus network fee, shown in the quote). REAL MONEY. From Arbitrum One: gasless, no wallet or ETH needed. From USDC on Base: the deposit address also needs a little ETH on Base for gas (deposit.gas says how much; Mark signs approve + Circle CCTP burn there); USDC from Base also pays Circle's CCTP fee (about 0.02% of the amount, in USDC, taken from the deposit) and Base gas for two transactions (approve and burn), paid in ETH on Base by the dep…
| Parameter | Type | Description |
|---|---|---|
from * | string | the stablecoin you send: usdc (USDC on Arbitrum One), usdt0 (USDT0 on Arbitrum One), usdc-base (USDC on Base). usdc-base also needs a little ETH on Base at the deposit address for gas |
address | string | to=arkade: an Ark address from an Arkade wallet on https://arkade.computer (with amount). Lightning addresses are not supported |
amount | string | to=arkade (or a Lightning quote without an invoice): token amount to send, like "1.5" (fees come out of it) |
confirm | boolean | must be true to create the real swap; omit to preview |
invoice | string | to=lightning: a BOLT11 invoice with an amount; Satora pays exactly it (required to create; no amount) |
to | string | how the BTC is paid out (default lightning) |
swap_fund
Swap from a stablecoin: once the deposit is at its deposit address, lock it into the swap (at most once; gasless from Arbitrum One; from USDC on Base Mark signs approve + CCTP burn on Base and first checks the deposit address's ETH on Base, failing with SWAP_NEEDS_GAS and how much is needed vs held; after a burn, calling it again resumes without burning again). wait=true: wait (up to 30 min) for the deposit, fund, then wait for the payout. Never asks for a second deposit
| Parameter | Type | Description |
|---|---|---|
id * | string | |
wait | boolean |
swap_status
Status of a swap_create or swap_to_btc_create swap (read-only): the payout tx once claimed; for a swap from a stablecoin, the deposit seen so far and what to do next
| Parameter | Type | Description |
|---|---|---|
id * | string |
swap_claim
Claim a paid swap's stablecoins to the address set at create and return payoutTx, or a swap from a stablecoin's Ark payout (safe to repeat; never pays anything). wait=true: first wait (up to 15 min) until Satora funds its side. Never funds a swap from a stablecoin: use swap_fund for that
| Parameter | Type | Description |
|---|---|---|
id * | string | |
wait | boolean |
swap_refund
Refund a swap that did not pay out. Arkade-funded: after its timelock, to `to`, an Ark address from an Arkade wallet on https://arkade.computer (Lightning swaps need no refund). From a stablecoin: omit `to`; the locked deposit goes back to the deposit address (gasless), then use swap_recover
| Parameter | Type | Description |
|---|---|---|
id * | string | |
to | string |
swap_recover
Swap from a stablecoin: send the stablecoins sitting at its deposit address (unfunded, failed or refunded swap) to your own 0x address. Needs a little ETH at the deposit address for gas on the deposit network (it says how much). USDC on Base after its CCTP burn: Circle mints it and it is sent as USDC on Arbitrum One to the same address (sponsored, no ETH)
| Parameter | Type | Description |
|---|---|---|
id * | string | |
to * | string | your 0x address (on the deposit network; see the note for USDC on Base) |