maxy-labs 0.0.0-stage → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +889 -0
  2. package/HOSTS.md +26 -0
  3. package/LICENSE +21 -0
  4. package/README.md +66 -2
  5. package/REPRODUCE.md +18 -0
  6. package/SECURITY.md +70 -0
  7. package/dist/bitcoin.js +199 -0
  8. package/dist/bitcoin.js.map +7 -0
  9. package/dist/borrow.js +5905 -0
  10. package/dist/borrow.js.map +7 -0
  11. package/dist/btc.js +127 -0
  12. package/dist/btc.js.map +7 -0
  13. package/dist/chunk-2FH2JWSU.js +50 -0
  14. package/dist/chunk-2FH2JWSU.js.map +7 -0
  15. package/dist/chunk-67YGOCME.js +154 -0
  16. package/dist/chunk-67YGOCME.js.map +7 -0
  17. package/dist/chunk-AA6XO34X.js +41 -0
  18. package/dist/chunk-AA6XO34X.js.map +7 -0
  19. package/dist/chunk-AGJO7ZY6.js +116 -0
  20. package/dist/chunk-AGJO7ZY6.js.map +7 -0
  21. package/dist/chunk-CIKFCPYG.js +298 -0
  22. package/dist/chunk-CIKFCPYG.js.map +7 -0
  23. package/dist/chunk-EA6CZHIN.js +207 -0
  24. package/dist/chunk-EA6CZHIN.js.map +7 -0
  25. package/dist/chunk-GIY74V4S.js +11 -0
  26. package/dist/chunk-GIY74V4S.js.map +7 -0
  27. package/dist/chunk-GSDHPE57.js +289 -0
  28. package/dist/chunk-GSDHPE57.js.map +7 -0
  29. package/dist/chunk-HBTCJSGH.js +591 -0
  30. package/dist/chunk-HBTCJSGH.js.map +7 -0
  31. package/dist/chunk-JGB3B6LT.js +115 -0
  32. package/dist/chunk-JGB3B6LT.js.map +7 -0
  33. package/dist/chunk-KBOUGIOB.js +14 -0
  34. package/dist/chunk-KBOUGIOB.js.map +7 -0
  35. package/dist/chunk-KIA5INHO.js +983 -0
  36. package/dist/chunk-KIA5INHO.js.map +7 -0
  37. package/dist/chunk-LF7PLNRG.js +104 -0
  38. package/dist/chunk-LF7PLNRG.js.map +7 -0
  39. package/dist/chunk-LKG7Q64R.js +263 -0
  40. package/dist/chunk-LKG7Q64R.js.map +7 -0
  41. package/dist/chunk-OEB2NVTB.js +378 -0
  42. package/dist/chunk-OEB2NVTB.js.map +7 -0
  43. package/dist/chunk-OMVMSLMO.js +89 -0
  44. package/dist/chunk-OMVMSLMO.js.map +7 -0
  45. package/dist/chunk-R4M5ZCX7.js +4520 -0
  46. package/dist/chunk-R4M5ZCX7.js.map +7 -0
  47. package/dist/chunk-SKJNM56Z.js +153 -0
  48. package/dist/chunk-SKJNM56Z.js.map +7 -0
  49. package/dist/chunk-SPKK6DHR.js +543 -0
  50. package/dist/chunk-SPKK6DHR.js.map +7 -0
  51. package/dist/chunk-UUK7GKKZ.js +42 -0
  52. package/dist/chunk-UUK7GKKZ.js.map +7 -0
  53. package/dist/chunk-VLLV3I23.js +1019 -0
  54. package/dist/chunk-VLLV3I23.js.map +7 -0
  55. package/dist/chunk-W6KOI5BZ.js +1219 -0
  56. package/dist/chunk-W6KOI5BZ.js.map +7 -0
  57. package/dist/chunk-WJZVNWO3.js +373 -0
  58. package/dist/chunk-WJZVNWO3.js.map +7 -0
  59. package/dist/chunk-XFYYL63L.js +83 -0
  60. package/dist/chunk-XFYYL63L.js.map +7 -0
  61. package/dist/chunk-XLTQRD2E.js +33 -0
  62. package/dist/chunk-XLTQRD2E.js.map +7 -0
  63. package/dist/chunk-YPG47ESU.js +1241 -0
  64. package/dist/chunk-YPG47ESU.js.map +7 -0
  65. package/dist/cli.js +3009 -0
  66. package/dist/core.js +95 -0
  67. package/dist/core.js.map +7 -0
  68. package/dist/evm.js +47 -0
  69. package/dist/evm.js.map +7 -0
  70. package/dist/index.js +494 -0
  71. package/dist/index.js.map +7 -0
  72. package/dist/jupiter-A62AWINM.js +23 -0
  73. package/dist/jupiter-A62AWINM.js.map +7 -0
  74. package/dist/orders.js +25 -0
  75. package/dist/orders.js.map +7 -0
  76. package/dist/server.js +100 -0
  77. package/dist/server.js.map +7 -0
  78. package/dist/solToBtc-PUGHKYYG.js +95 -0
  79. package/dist/solToBtc-PUGHKYYG.js.map +7 -0
  80. package/dist/solana.js +32 -0
  81. package/dist/solana.js.map +7 -0
  82. package/dist/solanaLifiTx-AO73NAWZ.js +49 -0
  83. package/dist/solanaLifiTx-AO73NAWZ.js.map +7 -0
  84. package/dist/solanaTxCheck-AOYEH5WX.js +28 -0
  85. package/dist/solanaTxCheck-AOYEH5WX.js.map +7 -0
  86. package/dist/solanaWeb3-O5XU27QZ.js +21 -0
  87. package/dist/solanaWeb3-O5XU27QZ.js.map +7 -0
  88. package/dist/sources.json +1 -0
  89. package/dist/swap.js +198 -0
  90. package/dist/swap.js.map +7 -0
  91. package/dist/testing.js +141 -0
  92. package/dist/testing.js.map +7 -0
  93. package/dist/tokenSearch-7CQYNAIP.js +24 -0
  94. package/dist/tokenSearch-7CQYNAIP.js.map +7 -0
  95. package/dist/types/packages/maxy-sdk/src/api/addresses.d.ts +16 -0
  96. package/dist/types/packages/maxy-sdk/src/api/bridgedBuy.d.ts +21 -0
  97. package/dist/types/packages/maxy-sdk/src/api/btcSol.d.ts +12 -0
  98. package/dist/types/packages/maxy-sdk/src/api/checks.d.ts +19 -0
  99. package/dist/types/packages/maxy-sdk/src/api/config.d.ts +7 -0
  100. package/dist/types/packages/maxy-sdk/src/api/confirmations.d.ts +18 -0
  101. package/dist/types/packages/maxy-sdk/src/api/crossEvm.d.ts +10 -0
  102. package/dist/types/packages/maxy-sdk/src/api/health.d.ts +36 -0
  103. package/dist/types/packages/maxy-sdk/src/api/index.d.ts +83 -0
  104. package/dist/types/packages/maxy-sdk/src/api/lifecycle.d.ts +89 -0
  105. package/dist/types/packages/maxy-sdk/src/api/nonEvmBuy.d.ts +13 -0
  106. package/dist/types/packages/maxy-sdk/src/api/openapi.d.ts +3 -0
  107. package/dist/types/packages/maxy-sdk/src/api/openapiPortal.d.ts +1 -0
  108. package/dist/types/packages/maxy-sdk/src/api/partnerFeeParams.d.ts +10 -0
  109. package/dist/types/packages/maxy-sdk/src/api/portal.d.ts +246 -0
  110. package/dist/types/packages/maxy-sdk/src/api/refunds.d.ts +2 -0
  111. package/dist/types/packages/maxy-sdk/src/api/routerStatus.d.ts +38 -0
  112. package/dist/types/packages/maxy-sdk/src/api/routes.d.ts +37 -0
  113. package/dist/types/packages/maxy-sdk/src/api/sandbox.d.ts +138 -0
  114. package/dist/types/packages/maxy-sdk/src/api/sells.d.ts +15 -0
  115. package/dist/types/packages/maxy-sdk/src/api/solana.d.ts +56 -0
  116. package/dist/types/packages/maxy-sdk/src/api/solanaCodec.d.ts +21 -0
  117. package/dist/types/packages/maxy-sdk/src/api/statement.d.ts +50 -0
  118. package/dist/types/packages/maxy-sdk/src/api/stream.d.ts +29 -0
  119. package/dist/types/packages/maxy-sdk/src/api/streamTicket.d.ts +30 -0
  120. package/dist/types/packages/maxy-sdk/src/api/webhooks.d.ts +219 -0
  121. package/dist/types/packages/maxy-sdk/src/api-types.gen.d.ts +10049 -0
  122. package/dist/types/packages/maxy-sdk/src/auth.d.ts +45 -0
  123. package/dist/types/packages/maxy-sdk/src/borrow/bitcoin.d.ts +32 -0
  124. package/dist/types/packages/maxy-sdk/src/borrow/chain.d.ts +39 -0
  125. package/dist/types/packages/maxy-sdk/src/borrow/errors.d.ts +9 -0
  126. package/dist/types/packages/maxy-sdk/src/borrow/index.d.ts +258 -0
  127. package/dist/types/packages/maxy-sdk/src/borrow/lazy.d.ts +4 -0
  128. package/dist/types/packages/maxy-sdk/src/borrow/markets.d.ts +34 -0
  129. package/dist/types/packages/maxy-sdk/src/borrow/orders.d.ts +17 -0
  130. package/dist/types/packages/maxy-sdk/src/btc/index.d.ts +14 -0
  131. package/dist/types/packages/maxy-sdk/src/btc/pay.d.ts +51 -0
  132. package/dist/types/packages/maxy-sdk/src/chains.d.ts +55 -0
  133. package/dist/types/packages/maxy-sdk/src/client.d.ts +443 -0
  134. package/dist/types/packages/maxy-sdk/src/config.d.ts +160 -0
  135. package/dist/types/packages/maxy-sdk/src/context.d.ts +16 -0
  136. package/dist/types/packages/maxy-sdk/src/core/catalogue.d.ts +6 -0
  137. package/dist/types/packages/maxy-sdk/src/core/flows.d.ts +127 -0
  138. package/dist/types/packages/maxy-sdk/src/core/index.d.ts +9 -0
  139. package/dist/types/packages/maxy-sdk/src/core/machine.d.ts +13 -0
  140. package/dist/types/packages/maxy-sdk/src/core/resources.d.ts +648 -0
  141. package/dist/types/packages/maxy-sdk/src/core/rest.d.ts +73 -0
  142. package/dist/types/packages/maxy-sdk/src/core/units.d.ts +15 -0
  143. package/dist/types/packages/maxy-sdk/src/deployments.gen.d.ts +64 -0
  144. package/dist/types/packages/maxy-sdk/src/entries/bitcoin.d.ts +4 -0
  145. package/dist/types/packages/maxy-sdk/src/entries/evm.d.ts +15 -0
  146. package/dist/types/packages/maxy-sdk/src/entries/server.d.ts +80 -0
  147. package/dist/types/packages/maxy-sdk/src/entries/solana.d.ts +2 -0
  148. package/dist/types/packages/maxy-sdk/src/entries/testing.d.ts +82 -0
  149. package/dist/types/packages/maxy-sdk/src/errors.d.ts +149 -0
  150. package/dist/types/packages/maxy-sdk/src/http.d.ts +42 -0
  151. package/dist/types/packages/maxy-sdk/src/index.d.ts +27 -0
  152. package/dist/types/packages/maxy-sdk/src/internal/attestNotice.d.ts +14 -0
  153. package/dist/types/packages/maxy-sdk/src/internal/base64.d.ts +2 -0
  154. package/dist/types/packages/maxy-sdk/src/internal/checkoutSign.d.ts +11 -0
  155. package/dist/types/packages/maxy-sdk/src/internal/solanaWeb3.d.ts +17 -0
  156. package/dist/types/packages/maxy-sdk/src/keySigners.d.ts +28 -0
  157. package/dist/types/packages/maxy-sdk/src/orders/index.d.ts +41 -0
  158. package/dist/types/packages/maxy-sdk/src/orders/types.d.ts +48 -0
  159. package/dist/types/packages/maxy-sdk/src/sandbox.d.ts +21 -0
  160. package/dist/types/packages/maxy-sdk/src/signers.d.ts +93 -0
  161. package/dist/types/packages/maxy-sdk/src/swap/bridgedBuy.d.ts +94 -0
  162. package/dist/types/packages/maxy-sdk/src/swap/btcToEvm.d.ts +123 -0
  163. package/dist/types/packages/maxy-sdk/src/swap/catalog.d.ts +28 -0
  164. package/dist/types/packages/maxy-sdk/src/swap/crossEvm.d.ts +161 -0
  165. package/dist/types/packages/maxy-sdk/src/swap/easy.d.ts +93 -0
  166. package/dist/types/packages/maxy-sdk/src/swap/evmToBtc.d.ts +266 -0
  167. package/dist/types/packages/maxy-sdk/src/swap/index.d.ts +187 -0
  168. package/dist/types/packages/maxy-sdk/src/swap/intent.d.ts +104 -0
  169. package/dist/types/packages/maxy-sdk/src/swap/jupiter.d.ts +45 -0
  170. package/dist/types/packages/maxy-sdk/src/swap/jupiterLeg.d.ts +11 -0
  171. package/dist/types/packages/maxy-sdk/src/swap/nonEvm.d.ts +112 -0
  172. package/dist/types/packages/maxy-sdk/src/swap/nonEvmRoutes.d.ts +65 -0
  173. package/dist/types/packages/maxy-sdk/src/swap/orderCap.d.ts +37 -0
  174. package/dist/types/packages/maxy-sdk/src/swap/partnerFee.d.ts +87 -0
  175. package/dist/types/packages/maxy-sdk/src/swap/quote.d.ts +6 -0
  176. package/dist/types/packages/maxy-sdk/src/swap/sandbox.d.ts +27 -0
  177. package/dist/types/packages/maxy-sdk/src/swap/sellProof.d.ts +66 -0
  178. package/dist/types/packages/maxy-sdk/src/swap/solana.d.ts +64 -0
  179. package/dist/types/packages/maxy-sdk/src/swap/solver.d.ts +28 -0
  180. package/dist/types/packages/maxy-sdk/src/swap/status.d.ts +93 -0
  181. package/dist/types/packages/maxy-sdk/src/swap/suiTx.d.ts +17 -0
  182. package/dist/types/packages/maxy-sdk/src/swap/tokenSearch.d.ts +23 -0
  183. package/dist/types/packages/maxy-sdk/src/swap/tronTx.d.ts +75 -0
  184. package/dist/types/packages/maxy-sdk/src/swap/types.d.ts +152 -0
  185. package/dist/types/packages/maxy-sdk/src/version.d.ts +1 -0
  186. package/dist/types/src/config/networks.d.ts +63 -0
  187. package/dist/types/src/lib/maxylock/abi.d.ts +3039 -0
  188. package/dist/types/src/lib/maxylock/addresses.d.ts +36 -0
  189. package/dist/types/src/lib/maxylock/apiCodec.d.ts +199 -0
  190. package/dist/types/src/lib/maxylock/btcAddress.d.ts +16 -0
  191. package/dist/types/src/lib/maxylock/btcBroadcast.d.ts +23 -0
  192. package/dist/types/src/lib/maxylock/btcNetwork.d.ts +61 -0
  193. package/dist/types/src/lib/maxylock/btcScript.d.ts +90 -0
  194. package/dist/types/src/lib/maxylock/btcTx.d.ts +218 -0
  195. package/dist/types/src/lib/maxylock/chain.d.ts +22 -0
  196. package/dist/types/src/lib/maxylock/deployments.d.ts +47 -0
  197. package/dist/types/src/lib/maxylock/eip712.d.ts +382 -0
  198. package/dist/types/src/lib/maxylock/esplora.d.ts +117 -0
  199. package/dist/types/src/lib/maxylock/lenderKeys.d.ts +21 -0
  200. package/dist/types/src/lib/maxylock/phase.d.ts +58 -0
  201. package/dist/types/src/lib/maxylock/quote.d.ts +74 -0
  202. package/dist/types/src/lib/maxylock/secrets.d.ts +31 -0
  203. package/dist/types/src/lib/maxylock/terms.d.ts +125 -0
  204. package/dist/types/src/lib/maxylock/termsJson.d.ts +55 -0
  205. package/dist/types/src/lib/maxylock/termsPlan.d.ts +68 -0
  206. package/dist/types/src/lib/maxylock/types.d.ts +66 -0
  207. package/dist/types/src/lib/maxylock/verifyPlan.d.ts +97 -0
  208. package/dist/types/src/lib/security/attest.d.ts +24 -0
  209. package/dist/types/src/lib/security/botRoute.d.ts +123 -0
  210. package/dist/types/src/lib/security/bridgeTx.d.ts +69 -0
  211. package/dist/types/src/lib/security/lifiBand.d.ts +33 -0
  212. package/dist/types/src/lib/security/lifiTx.d.ts +39 -0
  213. package/dist/types/src/lib/security/mmAllowlist.d.ts +28 -0
  214. package/dist/types/src/lib/swap/buyFiller.d.ts +13 -0
  215. package/dist/types/src/lib/swap/settlerAbi.d.ts +574 -0
  216. package/dist/types/src/lib/swap/settlerSell.d.ts +436 -0
  217. package/dist/types/src/services/directErc20BuyPlan.d.ts +443 -0
  218. package/dist/types/src/services/intentFirstStatus.d.ts +9 -0
  219. package/dist/types/src/services/jupiterService.d.ts +36 -0
  220. package/dist/types/src/services/lifiService.d.ts +171 -0
  221. package/dist/types/src/services/nativeDirectBuy.d.ts +153 -0
  222. package/dist/types/src/services/pricing.d.ts +208 -0
  223. package/dist/types/src/services/solanaLifiTx.d.ts +23 -0
  224. package/dist/types/src/services/solanaTxCheck.d.ts +63 -0
  225. package/dist/types/src/services/solanaV2/btcToSolCore.d.ts +150 -0
  226. package/dist/types/src/services/solanaV2/fillBuilder.d.ts +132 -0
  227. package/dist/types/src/services/solanaV2/fillCost.d.ts +16 -0
  228. package/dist/types/src/services/solanaV2/solToBtc.d.ts +189 -0
  229. package/dist/types/src/utils/btcCodec.d.ts +25 -0
  230. package/dist/types/src/utils/sats.d.ts +16 -0
  231. package/dist/types/src/utils/withTimeout.d.ts +28 -0
  232. package/package.json +118 -4
  233. package/scripts/reproduce.mjs +104 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,889 @@
1
+ # Changelog
2
+
3
+ This page is for integrators upgrading the SDK (`maxy-labs`, also published as `@maxy-labs/sdk`), the loans package
4
+ (`@maxy-labs/loans`), the Python client (`maxy-labs`) and the `maxy` command: what changed in each version, in the categories Added, Changed, Deprecated, Fixed and Security. Changes to the
5
+ HTTP API itself are in the [HTTP API changelog](api-changelog.md), which lists API changes only.
6
+
7
+ The HTTP API is generally available from 24 November 2026, and the SDK's first stable release, 1.0.0, ships with it.
8
+ The notice policy applies from that date: the API only gains fields and routes, and any breaking change is announced at
9
+ least 90 days ahead. Releases before 24 November 2026 are marked pre-GA. They came before the policy applied, and some
10
+ of them changed behaviour without that notice (for example 0.15.0 on 5 November and 0.16.0 on 10 November).
11
+
12
+ From 1.0.0 the SDK follows semantic versioning (see Versioning below). A release ships when it is ready, a security
13
+ fix at once, and every entry below carries its release date in UTC.
14
+
15
+ ## 1.1.1 (24 November 2026)
16
+
17
+ **Fixed.** `node scripts/reproduce.mjs` inside the installed package now rebuilds every JavaScript file byte for byte, as
18
+ [Security checks](https://maxy.co/docs/security-checks) shows: the package carries `dist/sources.json` (the modules no
19
+ source map holds), and the script resolves each import from the rebuilt tree, never from the folder it runs in. The
20
+ release now runs that same command on the packed tarball, unpacked outside the repository. Nothing else changed; npm
21
+ carries 1.1.1 as the first 1.1 release.
22
+
23
+ ## 1.1.0 (24 November 2026)
24
+
25
+ Additive: no field, route or export changed meaning, and every 1.0 import keeps working. One change of name: the package
26
+ leads as `maxy-labs` (`npm install maxy-labs`, `pip install maxy-labs`); `@maxy-labs/sdk` is the same package.
27
+
28
+ **Added (every path the Maxy app swaps).**
29
+ - Tron and Sui with BTC, both ways: a Tron or Sui coin buys BTC in two legs (`evm-btc-bridge`: LI.FI into ETH on Base,
30
+ then the escrow), and BTC pays out on Tron or Sui (`btc-evm`: the settler's ETH on Base, then LI.FI's bridge). Quotes
31
+ take `evmAddress`, the user's EVM wallet between the legs. `TronSigner`, `SuiSigner`, `tronSignerFromKey`,
32
+ `suiSignerFromKey`; `createNonEvmBuyOrder`, `quoteNonEvmBuy`, `quoteLifiLeg`, `checkLifiLeg`. Every Tron leg is decoded
33
+ and checked (one call from the user's Tron address to the Tron LI.FI Diamond) before a wallet signs it.
34
+ - BTC to any Solana coin: a coin the Solana settler does not pay is the settler's SOL, then a swap on Solana from the
35
+ user's wallet (`btc-sol` in two legs; `sendJupiterLeg`), checked by the app's own Solana transaction check.
36
+ - BTC to another token on a settler chain (DAI on Base): the settler's ETH, then a same-chain swap.
37
+ - The app's eight further EVM chains for two-leg routes: Linea, zkSync Era, HyperEVM, Mantle, Berachain, Abstract,
38
+ ApeChain and Monad.
39
+ - A contract opens its escrow in one call: with a contract as `fromAddress`, the quote asks for its EIP-1271 signature
40
+ and the order answers `openBuyEscrowFor` with a `refundRecipient` (`contractEscrowTransaction`, `isContractMaker`).
41
+ - `GET /config` and `GET /ping` (`maxy.config`, `maxy.ping` in Python); `substatus` and `receiving` on every status and
42
+ webhook; `orderSize` per pair; `idempotent-replayed` on a repeated order; a gasless partner fee (a Permit2 transfer
43
+ the solver runs inside its commit).
44
+ - The sandbox's `shape=live`: the real 20-field intent on the Base Sepolia test settler.
45
+ - The command line prices and swaps any pair the SDK reads: `maxy price 100 usdt tron`, `maxy swap 0.001 btc to bonk
46
+ solana` (`--from-address`, `--to-address`, `--evm-address`; keys `MAXY_TRON_KEY`, `MAXY_SUI_KEY`).
47
+ - `@maxy-labs/loans`: MaxyLock as its own package (`createMaxyLoans`).
48
+
49
+ **Changed (one host).** Every call goes to `https://openapi.maxy.co`: the API, Maxy's functions, chain reads, Bitcoin
50
+ data, the Solana gateway, and the LI.FI, Tron, Sui and Solana-swap legs. The SDK carries no key of its own
51
+ (`MAXY_PUBLIC_KEY` is empty). A page's Content-Security-Policy needs `connect-src https://openapi.maxy.co` only.
52
+
53
+ **Deprecated.** `client.borrow` and the `./borrow` entry: use `@maxy-labs/loans`. They keep working until 2.0, their
54
+ code loaded only when first called.
55
+
56
+ **Removed.** Maxy Mint is no part of the SDK, the command line or the docs.
57
+
58
+ **Fixed.** A bridge to Tron was refused: LI.FI names Tron `1885080386571452` in its contracts' BridgeData, and the check
59
+ now takes it. HyperEVM's ETH is Unit's UETH (`0xBe6727B5…`). A number longer than 16 digits reads as a Solana address,
60
+ not a chain id.
61
+
62
+ **Security.** The files on maxy.co/sdk are listed in `SHA256SUMS`, signed with Maxy's release key (`SHA256SUMS.sig`,
63
+ `allowed_signers`). Each package carries its full source (`dist/*.js.map`, `dist/sources.json`) and
64
+ `scripts/reproduce.mjs`, which rebuilds every JavaScript file byte for byte. Before release each packed file is scanned
65
+ for any host but `openapi.maxy.co`, credentials, and addresses in no reviewed source.
66
+
67
+ ## 1.0.3 (24 November 2026)
68
+
69
+ Additive. Nothing to change in your code.
70
+
71
+ **Added (any EVM token to BTC: `evm-btc-bridge`).** Any token on Base, Arbitrum, BNB Chain, Avalanche, Robinhood Chain,
72
+ Ethereum, Optimism or Polygon buys BTC in two legs, the way the Maxy app does it: the user's own wallet swaps or bridges
73
+ it into the settler chain's own coin (the solver's route picker, its transaction checked by the SDK before anything is
74
+ signed, paid to that same wallet), then opens the escrow there as `evm-btc-escrow` does. The settler chain is the
75
+ token's own chain when it has a settler (a same-chain swap), Base otherwise. The BTC is sized on the leg's guaranteed
76
+ minimum, so `receiveAmount` is exact; the quote carries the leg's own floor. The intent is signed before any coin moves.
77
+ `resolveRoute` returns `evm-btc-bridge` for those pairs; `swap.quote` (with `fromAddress`), `createOrder` and `execute`
78
+ run it end to end (`createBridgedBuyOrder`, `quoteBridgedBuy`, `prepareBridgedBuy`, `bridgedLegStatus`); `getStatus`
79
+ follows the leg until the escrow is open (`bridgeTxHash`, `fromChainId`). A token the route picker proves no transaction
80
+ for gets a price and no order (`routeAvailable: false` over HTTP). Size these buys by the amount sent (`receive` is
81
+ refused). `createMaxyRest`'s `buyBtcWithEvm` runs both legs; `orders.submit` takes `bridgeTxHash`; `orders.bridge`
82
+ takes the path an answer gave. Python: `orders.submit(..., bridge_tx_hash=)`, `orders.bridge(order_id, path=)`.
83
+
84
+ **Added (tokens).** `swap.searchTokens(chain, query)` and `GET /tokens?chain=&search=` find any token on those chains as
85
+ the app's token picker does (by symbol, name or address), with decimals read from the token on its chain. A symbol Maxy's
86
+ own tables do not name (`'PEPE on ethereum'`) is looked up the same way. `GET /pairs` lists the two-leg routes that take
87
+ any token (`anyToken`); `GET /chains` lists Ethereum, Optimism and Polygon (`legOnly: true`). Python:
88
+ `pairs.search_tokens(chain, search)`.
89
+
90
+ **Added (partner fees).** A partner fee now also runs on `evm-btc-bridge` (in the coin paid, at its own decimals, sent
91
+ beside the swap leg) and on a two-leg BTC sell (from the settler's payout, beside the bridge leg, `included: true`: the
92
+ amount bridged is after it).
93
+
94
+ **Added.** `quote.requiredConfirmations` on EVM buys (the HTTP quote had it). BTC sells paid out through a bridge read
95
+ the coin's symbol and decimals on its chain.
96
+
97
+ **Changed (host).** The default `apiUrl` is `https://openapi.maxy.co/v1` (`MAXY_API_URL`). Maxy's earlier host
98
+ (`MAXY_API_URL_PREVIOUS`) and the function address keep answering and are still accepted as `apiUrl`. Python's
99
+ `DEFAULT_BASE` is the same.
100
+
101
+ **Fixed.** With a test key, `createMaxyClient`'s REST resources (`sandboxControls`, `orders`, `quotes`, `webhooks`)
102
+ reach the sandbox on Maxy's hosts; before, every call failed as a `NetworkError`. A test key's fence (`sandbox_refused`)
103
+ is raised at once, not retried and not wrapped. `swap.*` failures are typed like the REST client's
104
+ (`QuoteExpiredError`, `AmountOutOfRangeError`, `UnfillableError`, `RateLimitError` ...) and carry `status`, the answer's
105
+ `requestId` and Retry-After. `buyBtcWithEvm` sends a partner fee's transaction beside the escrow.
106
+
107
+ **Removed (package).** The `./mint` subpath and the bundled mint guides; the package description names swaps and loans.
108
+
109
+ ## 1.0.2 (24 November 2026)
110
+
111
+ Additive. Nothing to change in your code, unless you read `MAXY_API_URL` to build function addresses (see Hosts).
112
+
113
+ **Added (partner fees).** A partner adds its own fee on top of a quote: `partnerFee: { bps, recipient, token? }` on
114
+ `swap.price`, `swap.quote` and `swap.execute`; `partnerFeeBps`, `partnerFeeRecipient` and `partnerFeeToken` on
115
+ `createMaxyRest`'s `prices.get` and `quotes.get`; `partner_fee_bps`, `partner_fee_recipient` and `partner_fee_token` in
116
+ Python.
117
+ `bps` is 0 to 100 of the trade; `recipient` is the EVM address that receives it; `token` is the coin the user pays with
118
+ unless named (a dollar stablecoin on that chain, counted at the quote's dollar price). The quote carries it as its own
119
+ line, `quote.fees.partner` (`bps`, `amount`, `token`, `symbol`, `recipient`, `chainId`, `included: false`), with
120
+ `formatted.partnerFee` and `formatted.total`; `receiveAmount`, the intent the user signs and the escrow are the same as
121
+ without it. `createOrder` and `execute` send the fee from the user's own wallet straight to the partner, as one more
122
+ transaction after the escrow: Maxy takes no cut and nothing passes through Maxy. It runs on `evm-btc-escrow` (paying with
123
+ a chain's own coin); elsewhere the quote is refused with `partner_fee_unsupported_route` (`evm-btc-gasless` has the
124
+ solver open the escrow, so the wallet sends nothing to pay a fee beside). A malformed fee is `invalid_partner_fee`.
125
+ New exports: `partnerFeeFor`, `partnerFeeTransaction`, `checkPartnerFeeInput`, `PARTNER_FEE_MAX_BPS`.
126
+
127
+ **Changed (hosts).** The default `apiUrl` is Maxy's earlier host (`MAXY_API_URL`), Maxy's own host. The SDK still
128
+ calls Maxy's functions at the project behind it, `MAXY_FUNCTIONS_HOST` (the project's own address),
129
+ which is also still accepted as `apiUrl`. `MAXY_SUPABASE_URL` is that project host. `projectUrlOf(apiUrl)` and
130
+ `httpApiBaseOf(apiUrl)` give the functions host and the HTTP API base for any `apiUrl`.
131
+
132
+ ## 1.0.1 (24 November 2026)
133
+
134
+ Additive. Nothing to change in your code.
135
+
136
+ **Changed (confirmations on buys).** A buy's intent asks the Bitcoin confirmations of the solver's own schedule by
137
+ order size: 1 below $2,000, 2 from $2,000, 3 from $20,000. Before, the SDK's `buildBuyIntent` helper asked 3 at every
138
+ size; orders placed through the API and the app already asked 1. An order within 3% under a
139
+ threshold asks the higher number, so a price move before the solver commits cannot leave it one short. The BTC is sent
140
+ at once either way; the number only sets when the solver is paid from escrow. `buyConfirmationsFor(satAmount, btcUsd)`
141
+ gives the number, and `buildBuyIntent` uses it unless you pass `requiredConfirmations`. Over HTTP the price and the
142
+ firm quote state it as `requiredConfirmations` (the same number the signed intent carries), and `GET /pairs` marks buy
143
+ pairs `confirmationsBySize: true`, as sells already were.
144
+
145
+ **Added (finality).** `btcConfirmations` on `GET /status`, `GET /orders/{id}` and the order stream, and in every
146
+ `order.updated` and `order.payment_replaced` event: the Bitcoin blocks on the payment in `btcTxId`, 0 until its first
147
+ confirmation. A buy reads `completed` the moment the BTC is sent; report the transfer as final when `btcConfirmations`
148
+ reaches 1, about 10 minutes later. A completed order is watched until that first confirmation, which sends one more
149
+ `order.updated` with `btcConfirmations: 1`; then events for the order end. The sandbox reaches 1 about 30 seconds after a
150
+ buy completes.
151
+
152
+ **Python (`maxy` 1.0.1).** The models (`Maxy(models=True)`) are generated again from the API's spec: `btcConfirmations`
153
+ on `Status`, `requiredConfirmations` on prices and quotes, and the 1.0.0 fields (`ErrorCode`, `decimals` always set).
154
+
155
+ ## 1.0.0 (24 November 2026)
156
+
157
+ The first stable release, on the day the HTTP API is generally available. Upgrading from 0.18.2 needs no code change
158
+ unless you rely on one of the changes below.
159
+
160
+ **Changed (errors).** Selling BTC while the wallet already has three unpaid sell orders open is its own code,
161
+ `open_sells_limit` (HTTP `409`), with `OpenSellsLimitError`. It was `rate_limited` (`429`), which now means a rate limit
162
+ only. Pay the open sells or let them expire, then sell again. New codes `recipient_declined` and `jurisdiction_blocked`
163
+ (HTTP `403`, `DeclinedError`): Maxy declined the order, nothing was sent, do not retry it. `docsUrl` and every error's
164
+ `docs` link the code's own row on the Error codes page, `https://maxy.co/docs/error-codes#<code>` (the old
165
+ `/docs/sdk-errors#<code>` address redirects there).
166
+
167
+ **Changed (tokens).** `swap.tokens()` and `GET /tokens` list only the tokens in a pair (`swap.pairs()`, `GET /pairs`).
168
+ `swap.tokens(chain, { all: true })` and `GET /tokens?all=true` list the rest. `decimals` is always a number
169
+ (`TokenInfo.decimals` is `number`); a token whose decimals Maxy does not know is not listed. A chain Maxy does not swap
170
+ on is `unsupported_chain` (HTTP `400`).
171
+
172
+ **Changed (unknown coin).** A coin Maxy does not swap on a chain is `invalid_input` with a message that names the coins
173
+ it swaps there and points to `GET /pairs` (`swap.pairs()`), for example "DOGE is not a coin Maxy swaps on Base. On Base
174
+ it swaps ETH, USDC, …". It no longer suggests passing a contract address. `details.swaps` lists the same coins.
175
+
176
+ **Changed (hosts).** `createMaxyRest`, `downloadStatement`, `rotateKey` and `revokeKey` call the HTTP API at
177
+ Maxy's earlier host by default (`MAXY_HTTP_API_URL`). The function address,
178
+ the function's own address, keeps answering, and an `apiUrl` or `baseUrl` you
179
+ pass is used as before. `mswHandlers` answers both. `CHECKOUT_URL` (`@maxy-labs/sdk/server`) is
180
+ `https://buy.maxy.co/`; links already signed for its earlier address keep working. The Python client's
181
+ default base is Maxy's earlier host.
182
+
183
+ **Added (webhooks).** `order.payment_replaced`: after an order reads `completed`, its Bitcoin payment can still be
184
+ replaced before it confirms. A completed order is watched for 24 hours, or until its payment is proven on chain, and a
185
+ new `btcTxId` fires this event with `previousBtcTxId`. `MaxyWebhookEvent.type` includes it, and a new endpoint is
186
+ registered for both events.
187
+
188
+ **Changed (wording).** A `quote_expired` message says "a quote is valid for 60 seconds" (it said "lasts").
189
+
190
+ **Python (`maxy` 1.0.0).** The same error codes (`OpenSellsLimitError`, `DeclinedError`), the Error codes page in
191
+ `docs_url`, and Maxy's earlier host as the default base.
192
+
193
+ ## 0.18.2 (20 November 2026)
194
+
195
+ _Pre-GA release._
196
+
197
+ **Fixed (command line).** `npx maxy swap … --yes --json` printed nothing once the order was placed. It now prints one
198
+ line when the user's part is done: `orderId`, `route`, `chainId`, the wallet's `txHashes`, the deposit for a sell, and
199
+ `next`, the command that follows the order (`order watch <orderId> --json`).
200
+
201
+ **Fixed (API).** `GET /statements` counted a coin-to-coin order's amount, which is in the coin's smallest unit, into
202
+ `totals.completedSats`. Only orders with a Bitcoin side count now, and a coin-to-coin row's `satAmount` is empty.
203
+
204
+ ## 0.18.1 (12 November 2026)
205
+
206
+ _Pre-GA release._
207
+
208
+ **Changed (command line).** Buying BTC in `npx maxy` picks the coin, then its chain, then the amount from a short list
209
+ ($10 to $100 with a test key, $25 to $1,000 live), each with what it gets by a live quote, or "Another amount" to type
210
+ one. With a test key the screens say the order moves on a sandbox timer (about 20 seconds) instead of "under a second".
211
+
212
+ ## 0.18.0 (12 November 2026)
213
+
214
+ _Pre-GA release._
215
+
216
+ **Changed (no version in the paths).** Every route answers at the base URL with no version after it:
217
+ the function's own address (`/price`), `…/maxy-api/orders/{id}`. The SDK, the Python
218
+ client, the OpenAPI file and every page of these docs use that base. The routes, fields and answers are the same, and
219
+ existing integrations keep working unchanged. `GET /` no longer has a `version` field.
220
+
221
+ **Added.** `npx maxy sandbox key` prints a new test key and nothing else, so `export MAXY_API_KEY=$(npx maxy sandbox key)`
222
+ gets you started in one command.
223
+
224
+ **Changed (install).** `npm install https://maxy.co/sdk/maxy-labs-sdk-latest.tgz viem` and
225
+ `pip install https://maxy.co/sdk/maxy-latest.tar.gz` always install the newest release; `SHA256SUMS` beside them lists
226
+ every file's SHA-256.
227
+
228
+ ## 0.17.0 (12 November 2026)
229
+
230
+ _Pre-GA release._
231
+
232
+ **Changed (package name and licence).** The SDK is `@maxy-labs/sdk` (it was `@maxy/sdk`): every import moves from `@maxy/sdk…` to `@maxy-labs/sdk…`
233
+ with nothing else changed. Both packages install from maxy.co, not a public registry: `npm install https://maxy.co/sdk/maxy-labs-sdk-0.17.0.tgz viem` and
234
+ `pip install https://maxy.co/sdk/maxy-0.17.0-py3-none-any.whl` (SHA-256 in https://maxy.co/sdk/SHA256SUMS). Both are MIT licensed.
235
+
236
+ **Added (stream tickets).** A browser's `EventSource` cannot send a header, and every route takes a key, so
237
+ `POST /orders/{id}/stream-ticket` and `POST /prices/stream-ticket` answer a ticket for one stream: one order, or one
238
+ pair at any amount, for 10 minutes. `GET /orders/{id}/events/stream?ticket=…` and `GET /prices/stream?ticket=…` take
239
+ it in place of the key. The ticket is signed, so nothing is stored, and it carries the key's id, never the key. Another
240
+ order or pair, a changed ticket or an expired one answers `401 invalid_ticket`. A publishable key may ask, from its
241
+ origins. `orders.watch` and `prices.stream` in a browser fetch a ticket first; on a server they keep the header.
242
+
243
+ **Security.** A whole secret key in a query string answers `400` on every route: it would land in logs and history.
244
+
245
+ **Fixed.** `POST /sandbox/keys` takes no body (`curl -X POST …/sandbox/keys` works as is), and `GET /` names that
246
+ command as `try`.
247
+
248
+ ## 0.16.0 (10 November 2026)
249
+
250
+ _Pre-GA release._
251
+
252
+ **Changed (bridge legs).** Every EVM to EVM leg is the solver's route picker's route: of Mayan, deBridge, Across and
253
+ LI.FI, the one that pays out most after every fee, with a transaction that pays the user's own address. It replaces the
254
+ SDK's own LI.FI quote on `cross-evm` and on the second leg of a BTC sale into a coin no settler holds
255
+ (`bridgeBtcToEvmPayout`, `GET /orders/{id}/bridge`). The number shown is the solver's and the transaction signed is
256
+ the one it hands out. Before sending, the SDK checks that transaction itself by the rules of
257
+ the provider that carries it: that provider's contract, the user's address as receiver, the coin and amount asked for,
258
+ the quoted minimum where the calldata states one, no Mayan limit order, no deBridge taker or call on arrival, no Across
259
+ exclusive relayer, native value of the amount plus at most the provider's own fee, and a token approval for exactly the
260
+ amount to that contract. Another provider, or calldata that does not decode, is `verification_failed` and nothing is
261
+ sent. `checkCrossEvmQuote` returns what it proved.
262
+
263
+ **Changed (expiry and status).** A route's transaction carries its own expiry. A `cross-evm` quote lasts no longer than
264
+ it, and an order from a stale one is `quote_expired`: get a new quote, nothing was sent (HTTP: `409` with
265
+ `details.freshQuote`). A pair with no route is `unsupported_route` (it was `bad_response`). `swap.getStatus` and
266
+ `crossEvmStatus` ask the solver (`bridge_status`) with the provider and the source transaction hash; `REFUNDED` reads
267
+ as `refunded`, `FAILED` as `failed`, and a leg the solver cannot place stays `pending`. For a leg LI.FI carried, LI.FI's
268
+ status API answers when the solver cannot. The order cap on `cross-evm` is valued at the solver's live price.
269
+
270
+ **Added.** `quote.details.provider` and `via` on `cross-evm`; `provider`, `expiresAt` and `status` on the route's quote
271
+ (`quote.details.lifi`) and `provider` and `expiresAt` on the HTTP order and on `GET /orders/{id}/bridge`; `provider`,
272
+ `status` and `baselineBalance` in a `cross-evm` order's `response`; optional `provider`, `toAddress`, `toToken`,
273
+ `amountOutMin` and `baselineBalance` on `crossEvmStatus`.
274
+
275
+ **Migration (bridge legs).** Nothing is renamed. `slippage` is accepted and no longer used: the route's own minimum is
276
+ the floor. Handle `quote_expired` from `createOrder` on `cross-evm` by quoting again. A stored `cross-evm` order from
277
+ 0.15.0 is still followed (as LI.FI's). A two-leg `btc-evm` quote names `symbol` and `decimals` for native coins, the
278
+ settler chains' tokens, and USDC and USDT on Ethereum, Optimism and Polygon; for any other coin they are null.
279
+
280
+ **Changed.** Every flow runs the app's own code. Signed BTC buys are priced by the app's `pricing.priceWithBuyCost`, the
281
+ bot's `(value + network fee) / (1 - margin)` that its commit gate requires; `fillCostUsd` and the margin come from one
282
+ `get_live_rate` read, or none when `prices` gives both (new `prices.buyMarginBps`). Quotes take their split from the
283
+ market maker's own answer, as the app does: `displayAmount` (gross), `networkFee`, `receiveAmount` (net). A SOL to BTC
284
+ quote now shows the market maker's real Bitcoin fee (it showed the EVM buys' fee), and BTC to SOL and BTC to EVM quotes
285
+ gain `networkFee`. BTC to SOL (`btc-sol`) is the app's flow: the market maker builds and pays for every Solana
286
+ transaction, the wallet signs three times (open, Bitcoin payment, stage + lock) and needs no SOL, the market maker sends
287
+ the BTC once it is locked, proves and settles. `settleBtcToSol` signs nothing: it reads the settlement signature.
288
+ `BtcToSolState` is `{ offer, paid, sats, assetAmount }`. HTTP: the `btc-sol` stages are `fill`, `pay`, `lock`,
289
+ `submit`, `cancel` and `state`; `POST /orders` answers the open to sign directly (no authorization message). A
290
+ Taproot (`bc1p`) address may pay.
291
+
292
+ **Changed (keys).** Every HTTP API route takes a valid key (owner, 7 November 2026): chains, tokens, pairs, price,
293
+ prices/stream, quotes/batch, status, the order reads (refund, deposit, claim, bridge, events/stream, cancel), limits,
294
+ addresses/validate and explorer answer `401 auth_required` without one. Only `/`, `/openapi.json`, `/health`,
295
+ the status page (`/system/*`), `POST /sandbox/keys`, docs feedback, security reports and hosted checkout's
296
+ `/checkout/verify` answer without a key. A publishable key works for the reads from its own origins.
297
+
298
+ **Migration.** Send `x-maxy-key` on every call (a test key: `POST /sandbox/keys`). HTTP integrations of `btc-sol` follow the new stages (`steps` and `next` in each answer say what to do);
299
+ `take`, `prepare`, `broadcast`, `proof`, `settle` and `send` are gone. SDK code that stored `BtcToSolState` from 0.15.0
300
+ finishes those orders with the market maker, which settles them on its own.
301
+
302
+ ## 0.15.0 (5 November 2026)
303
+
304
+ _Pre-GA release._
305
+
306
+ **Added.** Self-serve test keys (`POST /sandbox/keys`), a status page at maxy.co/status, hosted checkout (`GET /checkout/verify`, `signCheckoutUrl`), `@maxy/widget`, `@maxy/cli`, `@maxy/api`, Python models (`Maxy(models=True)`). Routes: `/account`, `/usage`, `/keys`, `/limits/requests`, `/statements` (JSON, CSV, PDF), `/explorer/{query}`, `/feedback`, `/security-reports`, `/system/*`. `failureReason` on an order that ended badly. `details.freshQuote` on a 409 `quote_expired`. `Idempotency-Key` is now stored for a day: a repeat answers the first answer, with `Idempotent-Replayed: true`, and a different body answers 409 `idempotency_conflict`. Errors `checkout_signature_invalid`, `checkout_expired`, `idempotency_conflict`.
307
+
308
+ **Changed.** An order is done when the user's funds arrive. A Solana buy (`sol-btc`) now reads `completed` when the BTC is sent (`PAID`), the same as an EVM buy; it read `in_progress` until `SETTLED`. A buy whose BTC is out reads `completed` even if its settlement fails or runs late: `rawStatus` still shows it, for operations. Coin to coin reads `completed` when the coins reach the destination chain. A publishable key may now place the user's own signed order (`POST /orders`, `/orders/submit`, `/orders/{id}/signature`, `/orders/{id}/steps`, `/orders/{id}/cancel`); it gets the scope `place`. Packages: `@maxy-labs/sdk`, `@maxy/react`, `maxy`.
309
+
310
+ **Migration.** Code that waited for `rawStatus: SETTLED` on a Solana buy should wait for `state: completed`, and code that counted `in_progress` after `PAID` will see `completed` sooner. No field changed its name.
311
+
312
+ ## Versioning
313
+
314
+ The SDK follows semantic versioning. A breaking change to anything covered below raises the major version (before
315
+ 1.0.0, the minor version did).
316
+
317
+ | Covered | Not covered |
318
+ | --- | --- |
319
+ | Public exports of `@maxy-labs/sdk` and its subpaths (`/core`, `/evm`, `/solana`, `/bitcoin`, `/server`, `/testing`, `/swap`, `/borrow`, `/orders`, `/btc`), their parameters and return types | `serverCode` values, which are the servers' own codes |
320
+ | `MaxyError.code` values and their meaning | The shape of `MaxyError.details` beyond the fields read by `retryAfterSecondsOf`, `unlocksAtOf` and `preparedPostOf` |
321
+ | Configuration options of `createMaxyClient` | `MaxyError.message` text |
322
+ | — | Exports marked advanced in the reference (the low-level context, `poke`) |
323
+
324
+ ## 0.14.0 (4 November 2026)
325
+
326
+ _Pre-GA release._
327
+
328
+ ### Added
329
+
330
+ - **`@maxy-labs/sdk/core`**: one typed method per HTTP API route over `fetch` alone, 17 kB gzipped: `prices`, `pairs`, `quotes`, `orders`, `status`, `addresses`, `limits`, `health`, `key`, `webhooks`, `sandboxControls`, with `units`. Retries with backoff and `Retry-After`, a bucket from the rate-limit headers, shared reads in flight, `AbortSignal`, `meta.requestId`, Maxy's clock for `quotes.msUntilExpiry`, `onRequest`, `onResponse`, `onRetry`, and a `logger` that redacts keys, signatures and typed data. Types are generated from the OpenAPI document.
331
+ - **Flow helpers**: `buyBtcWithEvm`, `buyBtcWithSolana` and `sellBtc`, with the same progress events and a resume path, built on `createSwapMachine`.
332
+ - **Subpaths** `/evm`, `/solana`, `/bitcoin`, `/server` (Node and edge only: it does not bundle for a browser) and `/testing` (`createMockFetch`, `errorFixture`, `SandboxSimulator`, `mswHandlers`). Source maps.
333
+ - **`@maxy/react`**: `usePairs`, `usePrice`, `useQuote`, `useBuyBtc`, `useBuyBtcWithSolana`, `useSellBtc`, `useOrder`.
334
+ - **`maxy` for Python**: `Maxy` and `AsyncMaxy`, with `webhooks.verify` matching TypeScript byte for byte.
335
+ - **`maxy` command**: `doctor`, `pairs`, `order get|list|watch|events`, `webhooks` (`add`, `rm`, `test`, `replay`, and `listen --forward-to` with no tunnel), `sandbox advance|scenarios`.
336
+ - **HTTP API, additive.** Publishable keys (`mxk_pk_live_`, `mxk_pk_test_`) bound to origins; `POST /quotes/batch`; `GET /prices/stream` and `GET /orders/{id}/events/stream`; `quote.signing`, one shape on every route; `POST /orders/{id}/signature`; `POST /orders/{id}/cancel`; `GET /orders/{id}/events`; `refundAt`; `expiresAtIso`; `externalId` and `externalCustomerId` on orders; `limit`, `cursor`, `state`, `wallet` and `externalId` on `GET /orders`; CAIP-19 ids in and out; `GET /pairs` with route, settler, smallest order and confirmations; `/health` with the solver, Bitcoin and each verifier, and `degraded`; `routes` in `/limits`; `POST /webhooks/{id}/events/{eventId}/replay` and `?signed=1`; `POST /sandbox/orders/{id}/advance`, `?simulate=`, scenario `underpaid`. A caller's `x-request-id` is kept. Price reads count apart at ten times the limit, and the same question within 3 seconds is one read.
337
+
338
+ ### Changed
339
+
340
+ - **`borrow.quote` above what a vault can lend now** answers `canBorrow: false` with the amounts and no figure for the ceiling, and `createRequest` refuses it with `insufficient_liquidity`.
341
+ - **USDC on BNB Chain** answers `unsupported_route` on `GET /price`, as `GET /pairs` and a firm quote already say: that settler does not take USDC as a bond.
342
+ - **`GET /orders` answers a page of up to 100**, with `nextCursor`. `format=csv` still takes up to 1,000.
343
+ - **Every error's `docs`** links its own row: `…/sdk-errors#quote_expired`. `retryable` is always present.
344
+ - **A secret key in a browser page throws at construction**; `dangerouslyAllowBrowser: true` overrides it.
345
+ - **Every failure is a `MaxyError` subclass.** `instanceof MaxyError`, `isMaxyError` and `code` work as before; `error.name` is the subclass.
346
+
347
+ ## 0.13.5 (3 November 2026)
348
+
349
+ _Pre-GA release._
350
+
351
+ ### Added
352
+
353
+ - **The sandbox.** A test key (`mxk_test_…`) runs the same HTTP API, SDK and CLI with nothing real behind them: `"sandbox": true` on every answer, real prices, signed webhooks, orders that walk `pending` → `in_progress` → `completed` on a timer, and a `scenario` to force every outcome, the refund screen included. A partner changes only the key. See [sandbox](integrate/sandbox.md).
354
+ - **`client.sandbox`** and **`isSandboxKey(key)`** say whether a client runs in the sandbox; **`SANDBOX_SCENARIOS`** lists the scenarios; `swap.quote`, `swap.createOrder` and `swap.execute` take `scenario`, which a live key ignores.
355
+ - **`sandbox_refused`** (`MaxyError.code`): a test key asked for something with no sandbox form (loans, sign-in, a low-level order builder). Nothing happened.
356
+ - **`maxy` shows `[SANDBOX]`** in the banner, the prompt and every run with a test key.
357
+
358
+ ### Changed
359
+
360
+ - A live key behaves exactly as before.
361
+
362
+ ## 0.13.4 (3 November 2026)
363
+
364
+ _Pre-GA release._
365
+
366
+ ### Changed
367
+
368
+ - **`swap.getSellTemplate` no longer returns its sizing field.** A size the solver cannot fill is still refused with `insufficient_liquidity` and no figure.
369
+
370
+ ## 0.13.3 (3 November 2026)
371
+
372
+ _Pre-GA release._
373
+
374
+ ### Fixed
375
+
376
+ - **`maxy price` shows the BTC network fee.** It reads before the fee, as the swap page does, but has no review step, so it now also shows the fee and what arrives. That is the same `receiveAmount` the SDK and the API return.
377
+
378
+ ## 0.13.2 (2 November 2026)
379
+
380
+ _Pre-GA release._
381
+
382
+ ### Fixed
383
+
384
+ - **Your key's order size cap covers EVM to EVM.** The quote still shows the amounts, with `issues.orderCap` and no steps; `createOrder` and `POST /orders` refuse with `order_cap_exceeded`. The order is valued at the dollars the bridge values the amount at.
385
+ - Docs: sells and Solana orders run over HTTP, `POST /orders` refuses a quote older than 60 seconds, exact BTC exists, and `quote.details` carries no `maxSats`.
386
+
387
+ ## 0.13.1 (2 November 2026)
388
+
389
+ _Pre-GA release._
390
+
391
+ ### Fixed
392
+
393
+ - A price or quote on SOL or an SPL coin to BTC, or BTC to SOL, larger than the market maker holds now answers at the same rate instead of failing with a size in the error. Placing it is refused with `insufficient_liquidity` and no figure.
394
+ - A sell paid out on Ethereum, Optimism or Polygon names its coin and chain: `to.symbol`, `to.decimals`, `to.chainName` and `formatted` were null.
395
+
396
+ ## 0.13.0 (2 November 2026)
397
+
398
+ _Pre-GA release._
399
+
400
+ ### Added
401
+
402
+ - **Every route over HTTP.** BTC to SOL or an SPL token: `POST /orders`, then the stages of
403
+ `POST /orders/{id}/steps`, with the BTC sent last and only with the payment locked on Solana. Sells paid in a coin no
404
+ settler pays: the settler leg as any sell, then `GET /orders/{id}/bridge`. EVM to EVM: `GET /quote`,
405
+ `POST /orders` (checked and simulated), `POST /orders/submit`. No route answers `execution.by` any more.
406
+ - **Buy by exact BTC.** `swap.price` and `swap.quote` take `receive` (`'1.31'`, or a bigint of sats), and `/price` and
407
+ `/quote` take `receive` or `toAmount`, at the same price as sizing by the amount sent.
408
+ - A sell from a contract wallet: `POST /orders` checks ERC-1271, as the settler does.
409
+
410
+ ### Changed
411
+
412
+ - **Quotes last 60 seconds at `POST /orders`:** an older one is `409 quote_expired` (it was only the intent's 2 hours).
413
+ - **No per-order maximum.** The 500,000-sat limit is gone from the SDK and the API (`BUY_MAX_SATS` is removed): it copied a
414
+ solver setting that no longer exists, and no contract has one. Your key's order size cap stays. An order larger than
415
+ Maxy can fill now is refused when it is placed (`insufficient_liquidity`, "Unfillable right now"), with no figure.
416
+ - **Prices and quotes answer at any size, for sells too,** with the solver's own number; the order is what gets refused.
417
+ - `maxSatsOf` is removed, and no error or quote carries a maximum size.
418
+ - `toAmountMin` on a route through a bridge is the bridge's own minimum (it repeated `toAmount`).
419
+
420
+ ### Fixed
421
+
422
+ - A two-leg sell quote with a Bitcoin `fromAddress` answers (it was a 500).
423
+ - `GET /` lists the webhook routes and `POST /orders/watch`.
424
+
425
+ ## 0.12.0 (2 November 2026)
426
+
427
+ _Pre-GA release._
428
+
429
+ ### Added
430
+
431
+ - **Selling BTC over HTTP.** `GET /quote` for a settler payout returns the sell order to sign; `POST /orders`
432
+ sends it and the solver locks the payout in the settler; `GET /orders/{id}/deposit` reads the escrow from the
433
+ settler and answers the address to pay, decoded from the settler's own script; `GET /orders/{id}/claim` answers
434
+ the proof of the payment as a simulated transaction any wallet can send.
435
+ - **SOL and SPL tokens to BTC over HTTP.** `GET /quote` returns the message to sign; `POST /orders` opens the
436
+ market maker's offer and returns the deposit transaction; `POST /orders/{id}/steps` checks the signed deposit,
437
+ byte for byte, and sends it; `GET /orders/{id}/steps` says what is left.
438
+ - **Refunds over HTTP.** `GET /orders/{id}/refund` answers the settler call, simulated, for the user's wallet to
439
+ send, or why it is not open yet and when it opens.
440
+ - The new routes are in `GET /` and `GET /openapi.json`.
441
+
442
+ ## 0.11.0 (2 November 2026)
443
+
444
+ _Pre-GA release._
445
+
446
+ ### Added
447
+
448
+ - **The integration guide**, rebuilt as its own chapter: what Maxy is, which path is yours, a ten-minute quickstart,
449
+ the concepts (order lifecycle; prices, quotes and orders; keys, limits and retries; the security model), one page per
450
+ integration path, step-by-step guides with curl, TypeScript and Python, UX guidelines, security and compliance,
451
+ testing and going live, support, and the reference (contracts, chains and tokens, runnable samples).
452
+ - **Runnable samples** for every step of the reference flow in `examples/integrate/`, each with the real response it
453
+ returned from the live API.
454
+ - `GET /addresses/validate`: whether an address is well formed and whether a Maxy order can pay it, with a reason.
455
+ - `GET /health`: `ok` or `degraded`, for routers that skip a degraded source.
456
+ - `GET /limits`: your key's order size cap, the smallest order, the quote lifetime and where you stand on your rate
457
+ limit.
458
+ - CAIP-2 chain ids everywhere a chain is accepted (`eip155:8453`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`,
459
+ `bip122:000000000019d6689c085ae165831e93`), and `caip2` on chains, prices and quotes.
460
+ - `expiresAt` on `POST /orders`: when an order whose escrow was never sent lapses.
461
+
462
+ ### Changed
463
+
464
+ - **Prices answer at any size, with no size check.** Prices and quotes carry only `limits.minSats`. The separate size-check calls and fields are removed.
465
+ - **An order above the per-order maximum reads as the order size cap:** `order_cap_exceeded`, "Order size is capped
466
+ for this API key. Try $X or less.", flagged on the quote for the order (`issues.orderCap`, `steps: null`) and
467
+ refused by `createOrder` and `POST /orders` before anything is signed. Before, a price said
468
+ `"liquidityAvailable": false` and the order failed with `insufficient_liquidity`.
469
+ - The cap message is now "Order size is capped for this API key. Try $100 or less." (was "API key's order size cap
470
+ has been met. Try $100 or less."), the same from the SDK, the HTTP API and Maxy's servers.
471
+ - `waitForCompletion` (and `execute`) stops at `refundable`: nothing more happens there without the user.
472
+ - A refused key (`invalid_api_key`, `key_revoked`) answers with a `requestId`, the `x-request-id` header and the error
473
+ page link, like every other error.
474
+
475
+ ### Fixed
476
+
477
+ - `GET /status?txHash=` finds an order from any of its transactions, including a gasless order's escrow and every
478
+ settlement (read from the settler's own events); a hash no order has is a 404 (it could return another order).
479
+ - `GET /status?orderId=` refuses a value that is not an order id (it could return another order), and without
480
+ `route` reads the order's own route (a gasless order read as `evm-btc-escrow`).
481
+ - `txs` lists only real transactions: EVM hashes with `0x`, the Bitcoin txid bare.
482
+ - A malformed signature on `POST /orders` is `400 wallet_mismatch` (was `500`); an order without its `chainId` is
483
+ `400 invalid_input`.
484
+ - `GET /orders` lists a new order as `pending` until Maxy first reads it (was `null`).
485
+ - Solana phases `REFUNDED`, `COOPERATIVELY_CANCELLED`, `LATE_UNPAID` and `EXPIRED_AFTER_PAY` read as final states (they
486
+ read `pending`).
487
+ - The "Too small" error no longer carries the solver's internal pricing in `details`.
488
+
489
+ ## 0.10.0 (2 November 2026)
490
+
491
+ _Pre-GA release._
492
+
493
+ ### Added
494
+
495
+ - **Rate limits per key.** 600 calls a minute per API key (120 per IP without one), counted per key wherever the
496
+ calls come from, for the HTTP API and for quotes through the SDK. Every HTTP API answer carries `RateLimit-Limit`,
497
+ `RateLimit-Remaining` and `RateLimit-Reset`; over the limit is `429 rate_limited` with `Retry-After`.
498
+ - **Status by any transaction:** `GET /status?txHash=` (escrow, settlement or Bitcoin payment), and
499
+ `GET /orders/{id}`.
500
+ - **Your orders:** `GET /orders` (JSON, or `format=csv`). Orders the SDK places with a partner key are filed under
501
+ it, so they are listed there and reach your webhooks.
502
+ - Error bodies link the error catalogue (`docs`); browsers cache the API's CORS answer for a day.
503
+
504
+ ### Changed
505
+
506
+ - A revoked key answers `403 key_revoked` (an unknown key stays `401 invalid_api_key`).
507
+ - Versioning policy: the API only gains fields; a breaking change comes with at least 90 days' notice.
508
+
509
+ ## 0.9.0 (1 November 2026)
510
+
511
+ _Pre-GA release._
512
+
513
+ ### Changed
514
+
515
+ - **Price and quote are split, the way swap APIs split them.** `swap.price()` and `GET /price` check what an
516
+ amount gets right now, for showing while the user types; nothing is reserved. `swap.quote()` and `GET /quote` are
517
+ for the order about to be placed. `GET /quote` now needs `fromAddress` and `toAddress` (without them it answers 400
518
+ and points to `/price`) and returns `quoteId` and `issues.orderCap`. The CLI's `quote` and `quotes` are now
519
+ `price <amount> <coin>` and `prices` (the old names still work); `price` alone still shows live coin prices.
520
+ - **Prices and quotes answer at any size.** An API key's order size cap refuses the order, not the quote:
521
+ `createOrder` throws `order_cap_exceeded` (new code) before anything is signed, `POST /orders` answers 422, and
522
+ Maxy's servers refuse a gasless buy or a sell above the cap before the solver acts. Above what Maxy can fill right
523
+ now, `/price` and `/quote` show the amounts with `"liquidityAvailable": false` instead of no number.
524
+
525
+ ### Added
526
+
527
+ - `GET /key`: your key and its order size cap.
528
+ - Browser apps can call Maxy's services with a partner key from any origin (the key is what is checked), and from
529
+ maxy.co.
530
+
531
+ ## 0.8.1 (1 November 2026)
532
+
533
+ _Pre-GA release._
534
+
535
+ ### Changed
536
+
537
+ - **Faster.** Contract reads made together go out as one Multicall3 call; a buy's fill cost is read alongside its chain
538
+ reads, and the free settler nonce is found in one round for a wallet's first 16 orders. A BTC buy's steps
539
+ (`GET /quote` with addresses) come back in about half the time.
540
+ - **HTTP API reads need no key:** `GET /pairs`, `/price` and `/status` answer without one, limited per calling IP;
541
+ a key that is sent is checked and metered as before. `GET /` lists every route with a link to try, a mistyped path
542
+ answers with the route it was probably meant to be, JSON comes back indented, and every answer carries
543
+ `Server-Timing: total;dur=…`.
544
+
545
+ ## 0.8.0 (1 November 2026)
546
+
547
+ _Pre-GA release._
548
+
549
+ ### Added
550
+
551
+ - **The HTTP API** ([HTTP API](http-api.md)): price, quote and place swaps from any language, at
552
+ the function's own address. `GET /chains`, `/tokens`, `/pairs`, `/price`,
553
+ `/quote`, `/status`, `POST /orders`, `/orders/submit`, and an OpenAPI 3.1 spec at `/openapi.json`. Buying BTC runs end
554
+ to end: the quote returns the typed data to sign, `POST /orders` returns the transaction to send (or, for USDC, hands
555
+ the gasless order to the solver). Prices take plain words or the parameter names route aggregators and swap APIs use.
556
+ It is this SDK running on Maxy's side, so every order is rebuilt and checked before anything is returned.
557
+ - **Signed webhooks** for the HTTP API: register HTTPS endpoints per key (`POST /webhooks`); each change of an
558
+ order's state is delivered as an `order.updated` event signed with HMAC-SHA256 (`Maxy-Signature`), retried with
559
+ backoff for about 22 hours, with a test event and a delivery log per endpoint. Orders placed through the API are
560
+ followed automatically; `POST /orders/watch` follows any other. `verifyWebhook()` checks a delivery.
561
+ - `swap.chains()` and `swap.tokens(chain?)`: the chains Maxy swaps on and their tokens with decimals.
562
+ - `quote.formatted` carries `send`, `receive` and `pair`.
563
+ - `prepareGaslessOrder` / `submitGaslessOrder` (gasless USDC in two halves), `restoreEscrowOrder`,
564
+ `restoreGaslessOrder`, `nativeEscrowTransaction`, `intentFromJson`: the building blocks the HTTP API uses, exported
565
+ from `@maxy-labs/sdk/swap`.
566
+
567
+ ### Changed
568
+
569
+ - `createGaslessOrder` runs on the two halves above; what the wallet is asked to sign is unchanged.
570
+
571
+ ## 0.7.0 (1 November 2026)
572
+
573
+ _Pre-GA release._
574
+
575
+ ### Added
576
+
577
+ - **Plain words.** `swap.quote` and the new `swap.execute` take coins as words (`'ETH'`, `'USDC on arbitrum'`,
578
+ `'arbitrum:USDC'`, `'BASE.ETH'`, `'BTC'`, `'SOL'`) and amounts in whole coins (`'0.01'`, `25`). The exact form
579
+ (`{ chain: 8453, token: '0x…' }`, a `bigint` in the smallest unit) is unchanged. Sats stay a `bigint`.
580
+ - **`swap.execute()`**: quote, sign, send and follow a swap in one call, with `onUpdate` steps for a progress UI.
581
+ - **`quote.formatted`**: the quote in words (`'0.01 ETH on Base'`, `'0.00025 BTC'`, the pair).
582
+ - **`swap.pairs()`** lists every pair; **`swap.describeAsset()`** gives a coin's symbol, decimals and chain name.
583
+ - `parseAsset`, `parseAmount`, `formatAmount` and `parseChain` are exported.
584
+ - CLI: `swap 20 usdc on base to btc` and `swap 0.001 btc to usdc on base` in one line; `quote` and `buy` accept a
585
+ trailing `to btc`.
586
+
587
+ ### Changed
588
+
589
+ - `createMaxyClient()` reads `MAXY_API_KEY` from the environment in Node when no `apiKey` is passed.
590
+ - The integration guide shows each kind of integrator (swap APIs, route aggregators, wallet SDKs with plugins, card
591
+ on-ramps) with the plain-words calls.
592
+
593
+ ## 0.6.4 (29 October 2026)
594
+
595
+ _Pre-GA release._
596
+
597
+ ### Changed
598
+
599
+ - **Shorter command pages.** `help <command>` (also `man <command>` and `<command> --help`) shows the summary, the
600
+ usage and the examples only; the explanatory paragraphs are gone.
601
+
602
+ ## 0.6.3 (29 October 2026)
603
+
604
+ _Pre-GA release._
605
+
606
+ ### Changed
607
+
608
+ - **Results stay on screen in the menu.** After Quotes, Orders and Prices, `maxy` waits for Enter before showing
609
+ the menu again. With every quote now arriving at once, the menu printed right under the table pushed its top rows
610
+ (the Buy BTC routes) off a normal-size terminal.
611
+
612
+ ## 0.6.2 (29 October 2026)
613
+
614
+ _Pre-GA release._
615
+
616
+ ### Changed
617
+
618
+ - **Many quotes in the time of one.** Quotes started together (`Promise.all` over several `swap.quote` calls, a price
619
+ list, `maxy quotes`) go to Maxy as one request that the order bot prices in parallel in one warm container. All 21
620
+ routes of `maxy quotes` now arrive in about 1.5 s, the time of a single sell quote, instead of 3 to 8 s. Each quote
621
+ still resolves or fails on its own with the same result and `MaxyError` as before; a lone quote is sent as it always
622
+ was, and if the combined request fails each quote is asked for alone.
623
+
624
+ ## 0.6.1 (28 October 2026)
625
+
626
+ _Pre-GA release._
627
+
628
+ ### Changed
629
+
630
+ - **`maxy quotes` prints each route the moment its quote is in**, in order, with a count of what is left, instead of
631
+ one table after every quote has come back.
632
+ - **No wait before the first question.** `maxy swap` (and `buy` / `sell`) reads live prices in the background while
633
+ the coin and amount are chosen; the paying wallets' balances load while the amount is quoted; `maxy quote` asks for
634
+ the quote and the prices at the same time.
635
+ - **Per-key order size cap** (server side, no SDK change): a swap quote above your key's cap, $100 unless agreed
636
+ otherwise, is refused with HTTP 422, `serverCode` `order_cap_exceeded`, and a message naming the cap (today: "Order
637
+ size is capped for this API key. Try $100 or less."). `maxy` prints that message and asks for a smaller amount
638
+ ([limits](limits.md#swaps)).
639
+
640
+ ## 0.6.0 (28 October 2026)
641
+
642
+ _Pre-GA release._
643
+
644
+ ### Added
645
+
646
+ - **Your own API key.** `apiKey` takes the key Maxy issues to your integration (`mxk_live_…`). The SDK sends it in
647
+ `x-maxy-key` with the API's public gateway key (`MAXY_PUBLIC_KEY`, new `publicKey` option for a staging `apiUrl`), so
648
+ Maxy counts your calls and can revoke the key on its own. A revoked or unknown key is refused with `auth_required`
649
+ (server code `invalid_api_key`). Also exported: `SDK_VERSION`, `PARTNER_KEY_RE`.
650
+ - **`maxy` command line.** `npx maxy` asks how to work: the numbered menu, or a command line with commands like a
651
+ shell's: `ls`, `cat`, `new`, `add`, `mv`, `rm`, `key`, `login`, `price`, `quote 20 usdc base`, `quotes`,
652
+ `buy`/`sell` with `--from`, `--to` and `--yes`, `borrow`, `repay`, `apikey`, `help`/`man`. Each runs
653
+ once (`npx maxy ls orders --json`) or at the `maxy ›` prompt, with tab completion and ↑ history. See [the CLI](cli.md).
654
+ - `maxy apikey set <key>` saves the key in `~/.maxy/config.json`.
655
+
656
+ ### Changed
657
+
658
+ - The shared public key of earlier versions still works, but is no longer what Maxy issues: ask for your own key.
659
+
660
+ ## 0.5.5 (24 October 2026)
661
+
662
+ _Pre-GA release._
663
+
664
+ ### Changed
665
+
666
+ - **`maxy swap` (buy):** "Bitcoin sent" shows the sats that arrive.
667
+
668
+ ## 0.5.4 (24 October 2026)
669
+
670
+ _Pre-GA release._
671
+
672
+ ### Added
673
+
674
+ - **`maxy borrow` (MaxyLock), built like `maxy swap`.** Numbered choices, saved, pasted or new
675
+ wallets with their balances, a wallet that is short shows what to send and where; a review confirmed with `OK` before
676
+ anything is signed; then every transaction with its explorer link, followed live (Enter stops watching).
677
+ - Borrow: USDC on Base or USDG on Robinhood Chain against BTC, from the quote to the loan claimed into the wallet
678
+ (Maxy sends a little gas when the wallet has none); repay, with the secret revealed and the BTC coming back; your
679
+ loans, and claiming a payout. A quote MaxyLock cannot take is shown and refused only after `OK`, before anything is
680
+ signed. Shortcuts `npx maxy repay`, `npx maxy loans`.
681
+ - `loans` takes `--json`.
682
+
683
+ ## 0.5.3 (23 October 2026)
684
+
685
+ _Pre-GA release._
686
+
687
+ ### Changed
688
+
689
+ - **Wording.** "Solver" everywhere a partner reads (docs, diagrams, the `maxy` command, error messages). The docs describe
690
+ what the contracts do rather than how Maxy runs the solver; BTC to EVM payouts on other chains are described for any
691
+ EVM chain; the EVM to EVM route is marked as a bridge, not a Bitcoin swap.
692
+
693
+ ## 0.5.2 (23 October 2026)
694
+
695
+ _Pre-GA release._
696
+
697
+ ### Changed
698
+
699
+ - **`maxy swap` is as fast as the swap page.** Everything OK needs is read while the review is on screen (the order,
700
+ checked on-chain, and the wallet's nonce and fees on Base, BNB Chain and Avalanche), so OK only signs and broadcasts;
701
+ a prepared order is not simulated again; an instant fill prints the Bitcoin transaction straight from the order's answer,
702
+ and otherwise the order is checked every 0.4 s at first. "Bitcoin sent in N s" counts from the escrow reaching the chain.
703
+
704
+ ### Fixed
705
+
706
+ - A 64-hex Bitcoin private key starting with 1 or 3 was refused as a legacy address when pasted into `maxy`.
707
+
708
+ ## 0.5.1 (23 October 2026)
709
+
710
+ _Pre-GA release._
711
+
712
+ ### Changed
713
+
714
+ - **Wording.** "Maxy does not store your key; it remains only on your hardware"; creating a wallet during a swap is
715
+ marked optional; buying ends with one line: "Bitcoin sent in 0.8 s", the sats, where they went and the link.
716
+ - **`maxy swap` is done when the user's coins are sent, like the swap page.** Buying BTC finishes the moment the BTC is
717
+ sent to the user's address (usually under a second); the escrow settling afterwards is Maxy's side and is not waited for.
718
+ Selling finishes when the payout reaches the user's wallet, with a live count of the confirmations left and the minutes
719
+ to the payout.
720
+
721
+ ## 0.5.0 (23 October 2026)
722
+
723
+ _Pre-GA release._
724
+
725
+ ### Added
726
+
727
+ - **The `maxy` command** ([the CLI](cli.md)): `npx maxy` opens a numbered menu: Swap (buy or sell BTC end to end,
728
+ every step a numbered choice), Quotes, Orders (with each order's transactions), Wallets and Prices. Wallets are picked,
729
+ pasted or created on the spot during a swap, for EVM and Bitcoin; the first sign-in creates the wallet's Maxy profile.
730
+ `--json` for scripts.
731
+ - **Key-backed signers in one call**: `evmSignerFromPrivateKey(key)` (follows the SDK to every Maxy chain),
732
+ `bitcoinSignerFromKey(key)` (WIF or hex, native SegWit), `createEvmKey()`, `createBitcoinKey()`,
733
+ `bitcoinAddressOfKey(key)`.
734
+ - `createMaxyClient({ solanaWeb3 })`: the Solana library for Solana orders in a browser bundle.
735
+ - Error code `missing_dependency`; `UNFILLABLE_MESSAGE`.
736
+
737
+ ### Changed
738
+
739
+ - **Orders larger than Maxy can fill right now are refused "Unfillable right now"** (`insufficient_liquidity`), and the
740
+ message names no limit. This covers EVM to BTC orders above the per-order range (before: `amount_out_of_range` with the
741
+ range in the message) and BTC to EVM quotes Maxy could not pay (before: the quote succeeded and the order was
742
+ refused later).
743
+ - **Too small reads too small.** An EVM to BTC quote whose amount does not cover the solver's costs is
744
+ `amount_out_of_range` "Too small: orders start at 546 sats after costs" (before: `bad_response` "No BTC quote right
745
+ now").
746
+ - **A clean install.** `@solana/web3.js` is an optional peer dependency, loaded only when a Solana order runs.
747
+ `npm install @maxy-labs/sdk viem` installs 21 packages instead of 71, prints no deprecation warning (the `uuid@8` warning came
748
+ from `@solana/web3.js`) and audits with 0 vulnerabilities. Solana quotes, previews and status work without it; Solana
749
+ orders need `npm install @solana/web3.js` (Node loads it by itself) and throw `missing_dependency` without it.
750
+
751
+ ## 0.3.2 (23 October 2026)
752
+
753
+ _Pre-GA release._
754
+
755
+ ### Fixed
756
+
757
+ - **EVM to BTC orders lock what the quote says.** The quote already takes the solver's fill cost out of the sats;
758
+ the signed price now always carries that cost too, so the escrow matches the quote's amount. Before, an order whose
759
+ fill cost was over 25 % of it (under about $1.60) was signed at the bare market price and locked less than quoted
760
+ (0.0004 ETH quoted, 0.00024 ETH locked). An order whose fill cost is more than the BTC it buys is refused as
761
+ `amount_out_of_range`.
762
+ - **Solana previews reject an asset that was not awaited.** `swap.solanaAsset` returns a promise; passing it to
763
+ `previewSolToBtc`, `previewBtcToSol` or `createSolToBtcOrder` without `await` priced SOL whatever the asset was.
764
+ It now throws `invalid_input`.
765
+
766
+ ### Security
767
+
768
+ - **`prepareOrder` / `createOrder` refuse an escrow above the quote.** An `evm-btc-escrow` order that would lock more
769
+ than the quote's `sendAmount` plus the intent's slippage and 1 % throws `quote_mismatch` before anything is signed,
770
+ so a bad price or cost feed cannot overcharge.
771
+
772
+ ## 0.3.1 (22 October 2026)
773
+
774
+ _Pre-GA release._
775
+
776
+ ### Added
777
+
778
+ - **`swap.prepareOrder(quote, { evm, btcAddress })`** and `createOrder(quote, { ..., prepared })` for
779
+ `evm-btc-escrow`: every read happens before the user confirms, so confirming only signs, broadcasts and notifies the
780
+ solver. Also `swap.prepareNativeEscrowOrder`, the `PreparedEscrowOrder` type and `PREPARED_TTL_SEC`.
781
+ - **`simulate`** on `createOrder` for the EVM to BTC routes (default `true`), as the route builders already had.
782
+
783
+ ### Fixed
784
+
785
+ - **Status of an EVM to BTC order** always finds the order by its on-chain intent hash and keeps the BTC txid: every buy
786
+ sends `fallbackOrderId`, status falls back to the solver's own order id, and a buy counts as completed once its
787
+ BTC is sent.
788
+
789
+ ## 0.3.0 (21 October 2026)
790
+
791
+ _Pre-GA release._
792
+
793
+ Upgrading from 0.2.0: since 21 October 2026 the solver refuses BTC to EVM orders created by 0.2.0
794
+ (`settler_only`). Install 0.3.0 before creating new ones; the exports removed below have no replacement to call.
795
+
796
+ ### Changed
797
+
798
+ - **BTC to EVM runs through the settler.** `createBtcToEvmOrder` signs the solver's SELL intent (EIP-712, checked
799
+ field by field and against the settler's `hashIntent`), and returns the deposit only once the payout is escrowed in the
800
+ settler for the signing wallet, read on-chain (`deposit.verifiedBy: 'settler'`, new `order.settler`). The payout always
801
+ goes to the signing wallet; `destAddress` is now optional and must equal it for a settler coin. Settler coins: ETH /
802
+ USDC / USDT on Base and Arbitrum, BNB / USDC / USDT on BNB Chain, AVAX / USDC / USDT on Avalanche, ETH / USDG on
803
+ Robinhood. Any other EVM coin is two legs: the settler pays ETH on Base to your wallet, then `bridgeBtcToEvmPayout`
804
+ sends a checked LI.FI bridge from it. Removed: the `SettlementForward` payout authorization (`settlementForwardTypedData`,
805
+ `SETTLEMENT_FORWARD_TYPES`, `SETTLEMENT_OUTPUT_KIND`, `DEFAULT_MM_WALLET`, `SELL_DIRECT_CHAINS`, `SELL_BRIDGED_CHAINS`).
806
+ - `payDeposit` re-reads a btc-evm escrow before paying and refuses when it closed or too few blocks are left.
807
+ - `createBtcToSolOrder` prices the sats again before any wallet prompt, asks for that fresh settler price, and throws
808
+ `quote_mismatch` if it is more than 0.1% below `assetAmount` (previously it asked for `assetAmount` unchecked).
809
+
810
+ ### Added
811
+
812
+ - `swap.claimBtcToEvm`: prove your BTC payment from public Esplora data and receive the escrow from your own wallet,
813
+ without the solver (`slashSellWithProof` in the one-block late window). `buildSellProof`, `stripWitness`,
814
+ `merkleRoot`.
815
+ - `swap.getSellTemplate`, `swap.getSellEscrow`, `swap.bridgeBtcToEvmPayout`; exports `SETTLER_SELL_CHAINS`,
816
+ `SELL_SETTLER_CHAINS`, `MM_SAFE`, `bridgedSellPlan`, `settlerSellAsset`, `readSettlerEscrow`.
817
+ - `getStatus` of a btc-evm order reads the settler escrow (`rawStatus` `settler:COMMITTED|FILLED|SLASHED|REFUNDED`).
818
+ - A btc-evm quote of a coin no settler holds is two legs (`details.legs: 2`, `bridge`, `minReceiveAmount`, `via`).
819
+ `details.symbol` / `decimals` describe `receiveAmount`, the coin asked for; the settler leg's coin is the new
820
+ `details.settlerSymbol` / `settlerDecimals`.
821
+
822
+ ### Deprecated
823
+
824
+ - `SETTLEMENT_CHAIN_ID`: unused since the SettlementForward authorization was removed.
825
+
826
+ ### Fixed
827
+
828
+ - LI.FI quotes (`cross-evm`, the bridge leg of a two-leg `btc-evm`) are asked from LI.FI directly when Maxy's
829
+ `lifi-quote` relay is rate limited or unavailable; it shares one LI.FI allowance between every caller. The
830
+ transaction is checked the same way whichever answered. A LI.FI refusal of the route itself is not retried.
831
+ - EVM to BTC orders (`createNativeEscrowOrder`, `createDirectEscrowOrder`, `createGaslessOrder`, `createOrder`) fold the
832
+ solver's fill cost (BTC network fee and EVM gas, from `get_live_rate`) into the signed limit price, as the app
833
+ does. Orders signed at the bare market price were not filled: the solver requires an escrow that covers the
834
+ cost, so they waited for the refund. New optional `prices.fillCostUsd`; new exports `fillCostUsd`, `withFillCost`,
835
+ `MAX_FILL_COST_FRACTION`. If the cost cannot be read, nothing is signed (`bad_response`).
836
+ - `planRefund` on a committed order before its Bitcoin deadline throws `not_refundable` (previously `tx_reverted`):
837
+ the RPC names the settler's `IntentNotExpired()` error only by its selector.
838
+ - Documentation: the `btc-sol` route is described as it works (trustless, through the Solana settlement program, with
839
+ the solver settling a paid offer for you); SOL to BTC limits are the solver's live limits.
840
+
841
+ ## 0.2.0 (16 October 2026)
842
+
843
+ _Pre-GA release._
844
+
845
+ ### Added
846
+
847
+ - `apiKey` and `apiUrl` configuration options, and the `MAXY_API_URL` constant.
848
+ - MaxyLock market id `'base-mainnet'` for Base; `canonicalMarket(market)`.
849
+ - Typed readers for error details: `maxSatsOf`, `retryAfterSecondsOf`, `unlocksAtOf`, `preparedPostOf`.
850
+ - `MAXY_ATTEST_SIGNERS` environment variable as the fallback for the `attestSigners` option.
851
+ - Documentation: signers, glossary, environments, limits, operations, data handling, audits, endpoints; architecture and
852
+ sequence figures.
853
+
854
+ ### Changed
855
+
856
+ - MaxyLock results report the market as `'base-mainnet'` (previously `'mainnet'`).
857
+ - The one notice the SDK can print, when no attestation signers are configured, now names the SDK option.
858
+ - A MaxyLock `keeper_unhealthy` refusal maps to `route_disabled`.
859
+
860
+ ### Deprecated
861
+
862
+ - The previous names of the API key and base URL options; they are accepted unchanged, and the new names win when both
863
+ are set.
864
+ - Market id `'mainnet'` for Base; accepted as an alias of `'base-mainnet'`.
865
+
866
+ ## 0.1.0 (16 October 2026)
867
+
868
+ _Pre-GA release._
869
+
870
+ First version.
871
+
872
+ ### Added
873
+
874
+ - `createMaxyClient` with one shared configuration, transport, read clients and clock.
875
+ - `auth`: Sign-In with Ethereum.
876
+ - `swap`: quotes and orders for `evm-btc-escrow`, `evm-btc-direct`, `evm-btc-gasless`, `btc-evm`, `sol-btc`, `btc-sol`
877
+ and `cross-evm`; status, waiting, escrow reads and refunds.
878
+ - `borrow`: MaxyLock loans on Base (USDC) and Robinhood Chain (USDG) with local plan verification.
879
+ - `orders`: one list of swaps and loans.
880
+ - `btc`: payment builder (deposit first, change last), broadcast, Bitcoin chain readers, HTLC scripts.
881
+
882
+ ## Where next
883
+
884
+ - [Documentation index](README.md)
885
+ - [Core reference](reference/core.md)
886
+
887
+ **Next:** [Migration guides](integrate/migration-guides.md).
888
+
889
+ _Last verified: 23 November 2026._