Find something... ⌘K

Maxy for your app / Use cases

For intent apps

A Maxy order is a signed intent. The user signs exactly what they get, a solver fills it, and a contract settles it only against a proof of the Bitcoin payment. For intent-based swap apps, order-flow routers and solver teams that want native BTC on the other side of a signed order.

The intent

Buying BTC, the user signs one EIP-712 message with the domain { name: "BitcoinIntentSettler", version: "6", chainId, verifyingContract }, where the contract is the settler on that chain. Its hash is the order id, on chain and in the API.

Its 20 fields, what each binds, and the value the API always sends: Intent fields. Reject a quote whose fields differ.

Who fills it

The settler lets any solver that posts the bond commit to an order whose designatedFiller is the zero address; an order that names a filler takes only that one. The API names no designated filler, so each order is open to the whole network. A solver must commit within 2 hours of the quote, and pay the BTC within the order's settlementTimeoutBlocks of its commit: 36 Bitcoin blocks, about 6 hours, on API orders. The settler pays it only when the verifier, an on-chain Bitcoin node, accepts a proof of that payment. No Maxy server can mark a payment as made.

ExitCoins go toWhen
SettleThe solverIt proves it paid the BTC
CancelThe userNo solver committed: the user any time, anyone after 2 hours
SlashThe user, plus the bondA solver committed and did not prove within the order's settlementTimeoutBlocks, 36 Bitcoin blocks on API orders
RefundThe userThe Bitcoin deadline passed with no bond

Pausing the settler never blocks cancel, slash or refund, so no escrow can be trapped: Security and compliance.

What to build

  1. 01 Quote. GET /quote answers the intent as typed data in steps, with its hash: Get a quote.
  2. 02 Check before the wallet opens. Compute the EIP-712 hash yourself and compare it with the step's hash. The SDK also compares it with the settler's own hashIntent; a mismatch stops the order with nothing signed: Sign.
  3. 03 Place it. POST /orders answers the escrow transaction and its simulation. Send it only if simulation.ok is true, then POST /orders/submit with its hash so a solver starts at once: Place the order.
  4. 04 Follow it by its hash. GET /status?orderId= takes the intent hash. An order your app placed another way, straight on the settler, joins your webhooks with POST /orders/watch.
  5. 05 Give the user the exits. While no solver has committed, POST /orders/{id}/cancel answers the call to send. When it reads refundable, GET /orders/{id}/refund builds the refund for the user's wallet: When it fails.

Follow an order placed elsewhere

ORDER_ID is the intent hash, and BASE is as on Get a price. GET /orders/{id} also says when the deposit can be taken back: refundAt, and once a solver has committed, refundAfterBlock, the Bitcoin block it must pay by.

curl Copy
curl -s -X POST "$BASE/orders/watch" -H "x-maxy-key: $MAXY_API_KEY" -H "content-type: application/json" \ -d "{\"orderId\": \"$ORDER_ID\", \"chainId\": 8453}" curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/orders/$ORDER_ID?chainId=8453" | jq '{state, refundAt, refundAfterBlock}'

Selling and Solana

Selling BTC runs the other way: the solver locks the payout in the settler first, and a proof of the user's payment releases it: Sell BTC. On Solana, the settlement program holds SOL escrows with its own Bitcoin node: Pay with SOL. Every contract and who can change it: Contracts. Opening an escrow from your own contract: Opening an escrow from a contract.