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.
| Exit | Coins go to | When |
|---|---|---|
| Settle | The solver | It proves it paid the BTC |
| Cancel | The user | No solver committed: the user any time, anyone after 2 hours |
| Slash | The user, plus the bond | A solver committed and did not prove within the order's settlementTimeoutBlocks, 36 Bitcoin blocks on API orders |
| Refund | The user | The 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
- 01 Quote.
GET /quoteanswers the intent as typed data insteps, with itshash: Get a quote. - 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 ownhashIntent; a mismatch stops the order with nothing signed: Sign. - 03 Place it.
POST /ordersanswers the escrow transaction and its simulation. Send it only ifsimulation.okis true, thenPOST /orders/submitwith its hash so a solver starts at once: Place the order. - 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 withPOST /orders/watch. - 05 Give the user the exits. While no solver has committed,
POST /orders/{id}/cancelanswers the call to send. When it readsrefundable,GET /orders/{id}/refundbuilds 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 -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.