maxy-labs 0.0.0-stage → 1.1.2

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 +899 -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-7K7CRDVX.js +263 -0
  14. package/dist/chunk-7K7CRDVX.js.map +7 -0
  15. package/dist/chunk-CRWYYNRV.js +104 -0
  16. package/dist/chunk-CRWYYNRV.js.map +7 -0
  17. package/dist/chunk-DV27CCJN.js +118 -0
  18. package/dist/chunk-DV27CCJN.js.map +7 -0
  19. package/dist/chunk-EA6CZHIN.js +207 -0
  20. package/dist/chunk-EA6CZHIN.js.map +7 -0
  21. package/dist/chunk-FCEFA4D3.js +543 -0
  22. package/dist/chunk-FCEFA4D3.js.map +7 -0
  23. package/dist/chunk-FT6SIOAR.js +83 -0
  24. package/dist/chunk-FT6SIOAR.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-HU3AJQCV.js +41 -0
  28. package/dist/chunk-HU3AJQCV.js.map +7 -0
  29. package/dist/chunk-IWWKPYRW.js +373 -0
  30. package/dist/chunk-IWWKPYRW.js.map +7 -0
  31. package/dist/chunk-KBOUGIOB.js +14 -0
  32. package/dist/chunk-KBOUGIOB.js.map +7 -0
  33. package/dist/chunk-KBRW7WVN.js +115 -0
  34. package/dist/chunk-KBRW7WVN.js.map +7 -0
  35. package/dist/chunk-LJJ6GM7B.js +1241 -0
  36. package/dist/chunk-LJJ6GM7B.js.map +7 -0
  37. package/dist/chunk-MXENTZBU.js +592 -0
  38. package/dist/chunk-MXENTZBU.js.map +7 -0
  39. package/dist/chunk-OEB2NVTB.js +378 -0
  40. package/dist/chunk-OEB2NVTB.js.map +7 -0
  41. package/dist/chunk-OXPFACA3.js +298 -0
  42. package/dist/chunk-OXPFACA3.js.map +7 -0
  43. package/dist/chunk-QHUBPOBH.js +89 -0
  44. package/dist/chunk-QHUBPOBH.js.map +7 -0
  45. package/dist/chunk-SKJNM56Z.js +153 -0
  46. package/dist/chunk-SKJNM56Z.js.map +7 -0
  47. package/dist/chunk-SRQ5SENB.js +289 -0
  48. package/dist/chunk-SRQ5SENB.js.map +7 -0
  49. package/dist/chunk-TI27WFJI.js +4520 -0
  50. package/dist/chunk-TI27WFJI.js.map +7 -0
  51. package/dist/chunk-W2FCQVTZ.js +1019 -0
  52. package/dist/chunk-W2FCQVTZ.js.map +7 -0
  53. package/dist/chunk-WLEH53HT.js +1219 -0
  54. package/dist/chunk-WLEH53HT.js.map +7 -0
  55. package/dist/chunk-XLTQRD2E.js +33 -0
  56. package/dist/chunk-XLTQRD2E.js.map +7 -0
  57. package/dist/chunk-XWSB6Y6U.js +42 -0
  58. package/dist/chunk-XWSB6Y6U.js.map +7 -0
  59. package/dist/chunk-YD53DYVV.js +154 -0
  60. package/dist/chunk-YD53DYVV.js.map +7 -0
  61. package/dist/chunk-YHN5A3CC.js +50 -0
  62. package/dist/chunk-YHN5A3CC.js.map +7 -0
  63. package/dist/chunk-ZEWZXZ3H.js +983 -0
  64. package/dist/chunk-ZEWZXZ3H.js.map +7 -0
  65. package/dist/cli.js +3010 -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 +498 -0
  71. package/dist/index.js.map +7 -0
  72. package/dist/jupiter-4TQZBIVV.js +23 -0
  73. package/dist/jupiter-4TQZBIVV.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-OMOOKWUH.js +95 -0
  79. package/dist/solToBtc-OMOOKWUH.js.map +7 -0
  80. package/dist/solana.js +32 -0
  81. package/dist/solana.js.map +7 -0
  82. package/dist/solanaLifiTx-VG6QRDNE.js +49 -0
  83. package/dist/solanaLifiTx-VG6QRDNE.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-76DC7VNF.js +21 -0
  87. package/dist/solanaWeb3-76DC7VNF.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-ZRPYNOO2.js +24 -0
  94. package/dist/tokenSearch-ZRPYNOO2.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 +140 -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 +10241 -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 +165 -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 +151 -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 +25 -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/HOSTS.md ADDED
@@ -0,0 +1,26 @@
1
+ # Hosts
2
+
3
+ Every call this package makes goes to one host: `https://openapi.maxy.co`. A page that runs it needs one
4
+ Content-Security-Policy entry:
5
+
6
+ ```http
7
+ connect-src 'self' https://openapi.maxy.co
8
+ ```
9
+
10
+ | Path | What it carries |
11
+ | --- | --- |
12
+ | `/v1/…` | The Maxy HTTP API: prices, quotes, orders, status |
13
+ | `/functions/v1/submit-intent`, `wallet-auth`, `btc-balance` | The solver's order calls, the wallet sign-in, Bitcoin reads and broadcasts |
14
+ | `/functions/v1/alchemy-rpc-proxy`, `solana-rpc-proxy` | Chain reads for every EVM chain Maxy swaps on, and Solana's |
15
+ | `/functions/v1/maxylock-*` | MaxyLock (the deprecated `borrow` module; `@maxy-labs/loans`) |
16
+ | `/rest/v1/…` | Read views of a signed-in wallet's own orders and loans |
17
+ | `/x/solana-gateway`, `/x/solana`, `/x/mm` | The Solana settler's gateway, Solana RPC, the market maker's Solana route |
18
+ | `/x/lifi`, `/x/tron`, `/x/sui`, `/x/jupiter` | LI.FI, Tron, Sui and Jupiter, for the legs that use them |
19
+
20
+ Not calls: explorer links written into answers (Basescan, Etherscan, mempool.space, Solscan, Tronscan, Suiscan and
21
+ others), and a wallet's own transactions, which a browser wallet sends through its own RPC and a key signer from this
22
+ package through the `rpcUrls` you pass, or else the chain's public RPC.
23
+
24
+ `apiUrl`, `rpcUrls`, `lifiApiUrl`, `tronApiUrl`, `suiGraphqlUrl` and `jupiterApiUrl` in `createMaxyClient` replace a
25
+ default with your own. Before each release every file of the package, source maps included, is scanned for any other
26
+ host; a finding stops the release. https://maxy.co/docs/sdk-hosts
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Maxy Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,67 @@
1
- # Temporary Holding Version
1
+ # maxy-labs
2
+
3
+ Native Bitcoin swaps for your app: BTC with every EVM chain the Maxy app swaps on, Solana, Tron and Sui, through bonded
4
+ solvers and settler contracts that release funds only against proofs of Bitcoin transactions. The SDK builds every
5
+ request and transaction, checks every answer locally, and never holds a key. Version 1.1.2, MIT licence. The same
6
+ package is published as `@maxy-labs/sdk`.
7
+
8
+ Set up the TypeScript SDK. It is `maxy-labs` on npm, under the MIT licence; it is ESM only and runs on Node 18+ and in browsers. The same package is also published as `@maxy-labs/sdk`, its earlier name, and imports work under either.
9
+
10
+ 1. Make a project: `mkdir first && cd first && npm init -y && npm pkg set type=module`
11
+ 2. Install it: `npm install maxy-labs viem` (pinned: `npm install maxy-labs@1.1.2`). Python: `pip install maxy-labs` (pinned: `pip install maxy-labs==1.1.2`), then `from maxy import Maxy`. Loans: `npm install @maxy-labs/loans`.
12
+ 3. Set your test key: `export MAXY_API_KEY=mxk_test_…`. `MAXY_API_BASE` moves the default host, for a test server of your own.
13
+
14
+ The same files are on maxy.co, one per version: `https://maxy.co/sdk/maxy-labs-1.1.2.tgz` and `https://maxy.co/sdk/maxy_labs-1.1.2-py3-none-any.whl`. Every file's SHA-256 is in [SHA256SUMS](https://maxy.co/sdk/SHA256SUMS), signed with Maxy's release key; [Security checks](https://maxy.co/docs/security-checks) shows the two commands that check a download. `maxy-labs-latest.tgz` points at the newest version.
15
+
16
+ Put this in `first.mjs` and run `node first.mjs`:
17
+
18
+ ```js
19
+ import { createMaxyClient } from 'maxy-labs';
20
+
21
+ const maxy = createMaxyClient(); // reads MAXY_API_KEY
22
+
23
+ const price = await maxy.swap.price({ from: 'ETH on base', to: 'BTC', amount: '0.01' });
24
+ console.log(price.formatted);
25
+ // { send: '0.01 ETH on Base', receive: '0.00027809 BTC', pair: 'ETH on Base → BTC' }
26
+
27
+ console.log((await maxy.swap.pairs()).map((p) => p.label));
28
+ // [ 'ETH on Base → BTC', 'USDC on Base → BTC', …, 'SOL → BTC', 'BTC → SOL', 'TRX → BTC', …, 'BTC → SUI' ]
29
+ ```
30
+
31
+ | Import | Gives |
32
+ | --- | --- |
33
+ | `maxy-labs/core` | The client, flow helpers and error classes. `fetch` only, 17 kB |
34
+ | `maxy-labs/evm`, `/solana`, `/bitcoin` | One helper per chain |
35
+ | `maxy-labs/server` | `verifyWebhook`, for Node and edge servers |
36
+ | `maxy-labs/testing` | Mocks and fixtures |
37
+ | `maxy-labs` | All of it, plus `swap`, `auth`, and `borrow` (deprecated: use `@maxy-labs/loans`) |
38
+
39
+ Every method is one route. Each failure is a `MaxyError` subclass with `code`, `status`, `requestId` and `retryable`.
40
+
41
+ ## Signers
42
+
43
+ A signer is your wallet, in the shape the SDK takes. Keys stay in your wallet or your own key system: the SDK never holds one.
44
+
45
+ ```ts
46
+ import { bitcoinSignerFromKey, evmSignerFromEip1193, evmSignerFromPrivateKey, evmSignerFromWalletClient } from 'maxy-labs';
47
+
48
+ const fromBrowser = evmSignerFromEip1193(window.ethereum); // an injected wallet, once connected
49
+ const fromViem = evmSignerFromWalletClient(walletClient); // a viem wallet client
50
+ const fromKey = evmSignerFromPrivateKey(process.env.EVM_PRIVATE_KEY!); // a server; follows the SDK to every Maxy chain
51
+ const bitcoin = bitcoinSignerFromKey(process.env.BTC_PRIVATE_KEY!); // a server
52
+ ```
53
+
54
+ | Chain | Takes |
55
+ | --- | --- |
56
+ | EVM | A viem wallet client, an EIP-1193 provider, or a key-backed signer |
57
+ | Bitcoin | A browser wallet adapter, or a key-backed signer |
58
+ | Solana | The provider shape browser wallets inject |
59
+
60
+ A wallet that could not switch chains throws `wrong_chain`: ask the user to switch. One that cannot sign what the order needs throws `signer_unsupported`: use another wallet. Each interface, with its adapters: the [integration guide PDF](https://maxy.co/guides/maxy-integration-guide.pdf).
61
+
62
+ ## More
63
+
64
+ - Documentation: https://maxy.co/docs (the API: https://maxy.co/docs/api-routes; every export: https://maxy.co/docs/sdk-reference)
65
+ - Hosts it calls: `HOSTS.md` (one, `openapi.maxy.co`); rebuilding it from its own source: `REPRODUCE.md`
66
+ - Changes: `CHANGELOG.md`; security reports: `SECURITY.md`
2
67
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
package/REPRODUCE.md ADDED
@@ -0,0 +1,18 @@
1
+ # Reproduce this package's JavaScript
2
+
3
+ The package carries the full source of what it runs: each `dist/*.js.map` holds the source of every module in that
4
+ file (`sourcesContent`, exactly as the bundler read it), and `dist/sources.json` the few modules the bundler kept nothing
5
+ of (types only, re-exports) with the two `package.json` fields it reads. `scripts/reproduce.mjs` lays those sources out
6
+ as they were at build time, bundles them again with the same options, and compares each result with the installed file,
7
+ byte for byte.
8
+
9
+ ```sh
10
+ cd node_modules/maxy-labs # or the folder you unpacked the .tgz into
11
+ npm install --no-save esbuild@0.25.12
12
+ node scripts/reproduce.mjs
13
+ # 133 sources from the maps; 44 of 44 JavaScript files rebuilt byte for byte.
14
+ ```
15
+
16
+ A file that differs is named and the command exits 1. The type declarations (`dist/types`) are generated from the same
17
+ sources by TypeScript and are not part of this check. The tarball itself is listed with its SHA-256 in
18
+ https://maxy.co/sdk/SHA256SUMS, which is signed (https://maxy.co/docs/security-checks).
package/SECURITY.md ADDED
@@ -0,0 +1,70 @@
1
+ # Security policy
2
+
3
+ This page is for security researchers and partners' security teams: what is in scope for vulnerability reports and how
4
+ Maxy handles them.
5
+
6
+ ## Scope
7
+
8
+ In scope:
9
+
10
+ - The Maxy SDK (`maxy-labs`): any way a server response, a wallet or a crafted input could make the SDK sign or pay
11
+ something other than what its [money-safety guarantees](https://maxy.co/docs/security-and-compliance) allow, leak a key or
12
+ session token, or broadcast a transaction it did not build.
13
+ - The contracts: the settlers, the verifier, the Solana settlement program and the MaxyLock loan contract, at the
14
+ addresses compiled into the SDK and listed on [contracts](https://maxy.co/docs/contracts).
15
+ - The Maxy API as the SDK uses it ([the one host it calls](https://maxy.co/docs/sdk-hosts)): access to another wallet's records, acting for
16
+ a wallet without its session, or bypassing a rate limit in a way that harms others.
17
+
18
+ Out of scope: third-party services the SDK calls (LI.FI, public RPC and block-explorer endpoints), denial of service by
19
+ volume, and findings that require a compromised user device or wallet.
20
+
21
+ ## Reporting
22
+
23
+ Security researchers are part of Maxy's defence. Maxy runs a bug bounty that pays up to $100,000 for a single finding.
24
+ Rewards scale with severity and impact, across a broad range of vulnerability categories. Reports go to
25
+ `POST /security-reports`, which needs no key, and a person reads every one. Maxy acknowledges each report, assesses its
26
+ impact, and agrees the fix and the disclosure date with the reporter. Good-faith research that leaves other users' funds
27
+ untouched is welcome.
28
+
29
+ `POST /security-reports` takes `{ "summary", "details", "replyTo" }` and is the one reporting path; your onboarding
30
+ channel with Maxy is the fallback. Include the affected component and version, the steps to
31
+ reproduce, the impact, and any transaction hashes or order ids. Do not test against other users' funds or orders, and do
32
+ not disclose the issue publicly until Maxy has confirmed a fix.
33
+
34
+ ## Bug bounty
35
+
36
+ The bounty above, by area:
37
+
38
+ | In scope | Examples |
39
+ | --- | --- |
40
+ | Settlers | An escrow leaving the settler other than by proof, cancel, slash or refund; a refund that cannot be sent |
41
+ | Verifier | A payment accepted without a valid Bitcoin proof; a header chain that accepts an invalid header |
42
+ | Solana settlement program | The same, for SOL escrows |
43
+ | Maxy API | Access to another wallet's or key's records; acting for a wallet without its signature |
44
+ | Maxy SDK | Signing or paying something other than what the money-safety guarantees allow |
45
+
46
+ Out of scope: third-party services, social engineering, denial of service by volume, and findings already reported. Rewards are paid in USDC.
47
+
48
+ Rewards by severity:
49
+
50
+ | Severity | Example | Reward |
51
+ | --- | --- | --- |
52
+ | Critical | Theft or permanent freezing of user funds in a settler or the verifier; a payment proof accepted without the Bitcoin payment | Up to $100,000 |
53
+ | High | Temporary freezing of funds; a solver paid without delivering; an escrow taken outside its four exits | Up to $25,000 |
54
+ | Medium | Denial of service of the API or the settler for all users; leaking another partner's orders or keys | Up to $5,000 |
55
+ | Low | Issues with limited impact on users or funds | Up to $1,000 |
56
+
57
+ **Response times.** Maxy acknowledges a report within 2 business days, gives a first assessment within 5 business days, and sends an update at least every 7 days until the fix ships. The disclosure date is agreed with the reporter.
58
+
59
+ **Safe harbour.** Research in good faith under this policy is welcome: test only against your own orders and funds, never
60
+ other users', and keep the finding private until Maxy has confirmed a fix.
61
+ ## Handling
62
+
63
+ Maxy acknowledges a report, assesses its impact, and works with the reporter on the fix and the disclosure date. Fixes to
64
+ the SDK are released as a new version and described in the [changelog](https://maxy.co/docs/changelog) under Security. Contract issues
65
+ are handled with the contracts' pause controls where the contracts provide them, and with a migration where needed.
66
+
67
+ ## Where next
68
+
69
+ - [Security and compliance](https://maxy.co/docs/security-and-compliance)
70
+ - [Audits and bug bounty](https://maxy.co/docs/audits-and-bug-bounty)
@@ -0,0 +1,199 @@
1
+ import {
2
+ SATS_PER_BTC,
3
+ btcDepositAllowlist,
4
+ btcToSats,
5
+ checkBtcDepositAddress,
6
+ satsToBtc
7
+ } from "./chunk-7K7CRDVX.js";
8
+ import {
9
+ generateSecret,
10
+ hashlockOf,
11
+ secretMatchesHashlock
12
+ } from "./chunk-XLTQRD2E.js";
13
+ import {
14
+ bip21Uri,
15
+ fromSmallest,
16
+ sellBtc,
17
+ toSmallest,
18
+ units
19
+ } from "./chunk-SRQ5SENB.js";
20
+ import "./chunk-DV27CCJN.js";
21
+ import {
22
+ NAMED_EVM_CHAINS
23
+ } from "./chunk-TI27WFJI.js";
24
+ import {
25
+ BtcScriptError,
26
+ BtcTxError,
27
+ DUST_SATS,
28
+ EsploraError,
29
+ INTEREST_RECOVERY_DELAY_SEC,
30
+ INTEREST_SWEEP_DELAY_SEC,
31
+ MIN_WALLET_UTXO_SATS,
32
+ SIGHASH_ALL,
33
+ SIGHASH_SINGLE_ANYONECANPAY,
34
+ TEMPLATE_VERSION,
35
+ addressUtxos,
36
+ borrowerIdentityFromWallet,
37
+ broadcastTx,
38
+ buildCollateralWitnessScript,
39
+ buildFundingPsbt,
40
+ buildInterestWitnessScript,
41
+ buildPayment,
42
+ buildPaymentPsbt,
43
+ decodeHtlcScript,
44
+ esploraFetchJson,
45
+ esploraOptions,
46
+ fetchConfirmedUtxos,
47
+ fetchFeeRate,
48
+ finalizeFundingPsbt,
49
+ getOutspend,
50
+ getTipHeight,
51
+ getTx,
52
+ getTxHex,
53
+ getTxStatus,
54
+ miniscriptDescriptor,
55
+ p2wshAddress,
56
+ p2wshScriptPubKey,
57
+ payToAddress,
58
+ payerIdentity,
59
+ pkhFromPubkey,
60
+ signAndBroadcast,
61
+ verifyFundingPsbt,
62
+ witnessScriptHash
63
+ } from "./chunk-WLEH53HT.js";
64
+ import "./chunk-ZEWZXZ3H.js";
65
+ import "./chunk-YHN5A3CC.js";
66
+ import {
67
+ ZERO_ADDRESS,
68
+ btcPayoutScript
69
+ } from "./chunk-LJJ6GM7B.js";
70
+ import "./chunk-IWWKPYRW.js";
71
+ import "./chunk-GIY74V4S.js";
72
+ import {
73
+ BTC_NETWORKS,
74
+ BtcAddressError,
75
+ addressToScriptPubKey,
76
+ base58Decode,
77
+ encodeSegwitAddress,
78
+ esploraBasesFor,
79
+ isBtcNetworkName,
80
+ isStandardScriptPubKey,
81
+ scriptHashToP2wshAddress,
82
+ scriptHashToP2wshScriptPubKey,
83
+ scriptPubKeyToAddress
84
+ } from "./chunk-OEB2NVTB.js";
85
+ import "./chunk-SKJNM56Z.js";
86
+ import {
87
+ MaxyError,
88
+ messageOf
89
+ } from "./chunk-OXPFACA3.js";
90
+ import "./chunk-KBOUGIOB.js";
91
+
92
+ // src/api/addresses.ts
93
+ import { getAddress } from "viem";
94
+ var sentence = (text) => `${text.trim().replace(/[.\s]+$/, "")}.`;
95
+ var invalid = (reason) => ({ valid: false, type: null, network: null, payable: false, reason });
96
+ function bitcoin(address) {
97
+ const lower = address.toLowerCase();
98
+ const net = lower.startsWith("bcrt1") ? "regtest" : lower.startsWith("tb1") || /^[mn2]/.test(address) ? "signet" : "mainnet";
99
+ let script;
100
+ try {
101
+ script = addressToScriptPubKey(address, net);
102
+ } catch (error) {
103
+ return invalid(sentence(messageOf(error)));
104
+ }
105
+ const type = isStandardScriptPubKey(script).type ?? null;
106
+ const network = net === "signet" ? "testnet" : net;
107
+ try {
108
+ btcPayoutScript(address);
109
+ return { valid: true, type, network, payable: true, reason: null };
110
+ } catch (error) {
111
+ return { valid: true, type, network, payable: false, reason: sentence(messageOf(error)) };
112
+ }
113
+ }
114
+ function evm(address) {
115
+ if (!/^0x[0-9a-fA-F]{40}$/.test(address)) return invalid("An EVM address is 0x followed by 40 hex characters.");
116
+ const body = address.slice(2);
117
+ if (body !== body.toLowerCase() && body !== body.toUpperCase() && getAddress(address) !== address) {
118
+ return invalid("The capital letters do not match the EIP-55 checksum, so the address likely has a typo.");
119
+ }
120
+ if (address.toLowerCase() === ZERO_ADDRESS) return { valid: true, type: "evm", network: "mainnet", payable: false, reason: "This is the zero address: anything sent to it is lost." };
121
+ return { valid: true, type: "evm", network: "mainnet", payable: true, reason: null };
122
+ }
123
+ function solana(address) {
124
+ if (!/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(address)) return invalid("A Solana address is 32 to 44 base58 characters.");
125
+ const bytes = base58Decode(address);
126
+ if (bytes.length !== 32) return invalid("A Solana address is 32 bytes; this one is not.");
127
+ if (bytes.every((b) => b === 0)) return { valid: true, type: "solana", network: "mainnet", payable: false, reason: "This is the System Program, not a wallet: anything sent to it is lost." };
128
+ return { valid: true, type: "solana", network: "mainnet", payable: true, reason: null };
129
+ }
130
+ function validateAddress(chain, address) {
131
+ if (typeof chain === "number" && !NAMED_EVM_CHAINS.includes(chain)) throw new MaxyError("unsupported_chain", `Maxy does not swap on chain ${chain}.`);
132
+ const verdict = chain === "bitcoin" ? bitcoin(address) : chain === "solana" ? solana(address) : evm(address);
133
+ return { address, chain, ...verdict };
134
+ }
135
+ export {
136
+ BTC_NETWORKS,
137
+ BtcAddressError,
138
+ BtcScriptError,
139
+ BtcTxError,
140
+ DUST_SATS,
141
+ EsploraError,
142
+ INTEREST_RECOVERY_DELAY_SEC,
143
+ INTEREST_SWEEP_DELAY_SEC,
144
+ MIN_WALLET_UTXO_SATS,
145
+ SATS_PER_BTC,
146
+ SIGHASH_ALL,
147
+ SIGHASH_SINGLE_ANYONECANPAY,
148
+ TEMPLATE_VERSION,
149
+ addressToScriptPubKey,
150
+ addressUtxos,
151
+ bip21Uri,
152
+ borrowerIdentityFromWallet,
153
+ broadcastTx,
154
+ btcDepositAllowlist,
155
+ btcToSats,
156
+ buildCollateralWitnessScript,
157
+ buildFundingPsbt,
158
+ buildInterestWitnessScript,
159
+ buildPayment,
160
+ buildPaymentPsbt,
161
+ checkBtcDepositAddress,
162
+ decodeHtlcScript,
163
+ encodeSegwitAddress,
164
+ esploraBasesFor,
165
+ esploraFetchJson,
166
+ esploraOptions,
167
+ fetchConfirmedUtxos,
168
+ fetchFeeRate,
169
+ finalizeFundingPsbt,
170
+ fromSmallest,
171
+ generateSecret,
172
+ getOutspend,
173
+ getTipHeight,
174
+ getTx,
175
+ getTxHex,
176
+ getTxStatus,
177
+ hashlockOf,
178
+ isBtcNetworkName,
179
+ isStandardScriptPubKey,
180
+ miniscriptDescriptor,
181
+ p2wshAddress,
182
+ p2wshScriptPubKey,
183
+ payToAddress,
184
+ payerIdentity,
185
+ pkhFromPubkey,
186
+ satsToBtc,
187
+ scriptHashToP2wshAddress,
188
+ scriptHashToP2wshScriptPubKey,
189
+ scriptPubKeyToAddress,
190
+ secretMatchesHashlock,
191
+ sellBtc,
192
+ signAndBroadcast,
193
+ toSmallest,
194
+ units,
195
+ validateAddress,
196
+ verifyFundingPsbt,
197
+ witnessScriptHash
198
+ };
199
+ //# sourceMappingURL=bitcoin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/api/addresses.ts"],
4
+ "sourcesContent": ["// GET /addresses/validate: is an address well formed for a chain, and would an order pay it. Offline: nothing is read\n// from a chain or a node. For Bitcoin, `payable` is the buy order's own check (btcPayoutScript), not a second opinion.\nimport { getAddress, type Hex } from 'viem';\nimport { addressToScriptPubKey, isStandardScriptPubKey, type BtcNetwork } from '../../../../src/lib/maxylock/btcAddress.ts';\nimport { base58Decode } from '../../../../src/utils/btcCodec.ts';\nimport { ZERO_ADDRESS } from '../chains.ts';\nimport { MaxyError, messageOf } from '../errors.ts';\nimport { NAMED_EVM_CHAINS } from '../swap/easy.ts';\nimport { btcPayoutScript } from '../swap/intent.ts';\nimport type { SwapChain } from '../swap/types.ts';\n\nexport interface AddressCheck {\n address: string;\n chain: SwapChain;\n valid: boolean;\n /** Bitcoin: p2wpkh, p2wsh, p2tr, p2pkh or p2sh. EVM: 'evm'. Solana: 'solana'. Null when not valid. */\n type: string | null;\n /** tb1 and m / n / 2 addresses read as testnet: signet uses the same prefixes. Null when not valid. */\n network: 'mainnet' | 'testnet' | 'signet' | 'regtest' | null;\n /** Bitcoin: a buy order would accept it as the BTC destination. EVM and Solana: valid and not a burn address. */\n payable: boolean;\n /** Why it is not valid or not payable, as a sentence; null otherwise. */\n reason: string | null;\n}\n\ntype Verdict = Omit<AddressCheck, 'address' | 'chain'>;\n\n/** A library message as a sentence: 'Bitcoin address checksum is invalid' -> '\u2026 is invalid.' */\nconst sentence = (text: string) => `${text.trim().replace(/[.\\s]+$/, '')}.`;\n\nconst invalid = (reason: string): Verdict => ({ valid: false, type: null, network: null, payable: false, reason });\n\nfunction bitcoin(address: string): Verdict {\n // The network its prefix names (bcrt1 before bc1); the address is then read for that network alone.\n const lower = address.toLowerCase();\n const net: BtcNetwork = lower.startsWith('bcrt1') ? 'regtest' : lower.startsWith('tb1') || /^[mn2]/.test(address) ? 'signet' : 'mainnet';\n let script: Hex;\n try {\n script = addressToScriptPubKey(address, net);\n } catch (error) {\n return invalid(sentence(messageOf(error)));\n }\n const type = isStandardScriptPubKey(script).type ?? null;\n const network = net === 'signet' ? 'testnet' : net;\n try {\n btcPayoutScript(address);\n return { valid: true, type, network, payable: true, reason: null };\n } catch (error) {\n return { valid: true, type, network, payable: false, reason: sentence(messageOf(error)) };\n }\n}\n\nfunction evm(address: string): Verdict {\n if (!/^0x[0-9a-fA-F]{40}$/.test(address)) return invalid('An EVM address is 0x followed by 40 hex characters.');\n const body = address.slice(2);\n // All one case carries no checksum; mixed case is EIP-55 and must match it exactly.\n if (body !== body.toLowerCase() && body !== body.toUpperCase() && getAddress(address) !== address) {\n return invalid('The capital letters do not match the EIP-55 checksum, so the address likely has a typo.');\n }\n if (address.toLowerCase() === ZERO_ADDRESS) return { valid: true, type: 'evm', network: 'mainnet', payable: false, reason: 'This is the zero address: anything sent to it is lost.' };\n return { valid: true, type: 'evm', network: 'mainnet', payable: true, reason: null };\n}\n\nfunction solana(address: string): Verdict {\n if (!/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(address)) return invalid('A Solana address is 32 to 44 base58 characters.');\n const bytes = base58Decode(address);\n if (bytes.length !== 32) return invalid('A Solana address is 32 bytes; this one is not.');\n if (bytes.every((b) => b === 0)) return { valid: true, type: 'solana', network: 'mainnet', payable: false, reason: 'This is the System Program, not a wallet: anything sent to it is lost.' };\n return { valid: true, type: 'solana', network: 'mainnet', payable: true, reason: null };\n}\n\n/** The check for one address on one chain (a chain from parseChain). An EVM chain Maxy does not name is refused. */\nexport function validateAddress(chain: SwapChain, address: string): AddressCheck {\n if (typeof chain === 'number' && !NAMED_EVM_CHAINS.includes(chain)) throw new MaxyError('unsupported_chain', `Maxy does not swap on chain ${chain}.`);\n const verdict = chain === 'bitcoin' ? bitcoin(address) : chain === 'solana' ? solana(address) : evm(address);\n return { address, chain, ...verdict };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,kBAA4B;AA0BrC,IAAM,WAAW,CAAC,SAAiB,GAAG,KAAK,KAAK,EAAE,QAAQ,WAAW,EAAE,CAAC;AAExE,IAAM,UAAU,CAAC,YAA6B,EAAE,OAAO,OAAO,MAAM,MAAM,SAAS,MAAM,SAAS,OAAO,OAAO;AAEhH,SAAS,QAAQ,SAA0B;AAEzC,QAAM,QAAQ,QAAQ,YAAY;AAClC,QAAM,MAAkB,MAAM,WAAW,OAAO,IAAI,YAAY,MAAM,WAAW,KAAK,KAAK,SAAS,KAAK,OAAO,IAAI,WAAW;AAC/H,MAAI;AACJ,MAAI;AACF,aAAS,sBAAsB,SAAS,GAAG;AAAA,EAC7C,SAAS,OAAO;AACd,WAAO,QAAQ,SAAS,UAAU,KAAK,CAAC,CAAC;AAAA,EAC3C;AACA,QAAM,OAAO,uBAAuB,MAAM,EAAE,QAAQ;AACpD,QAAM,UAAU,QAAQ,WAAW,YAAY;AAC/C,MAAI;AACF,oBAAgB,OAAO;AACvB,WAAO,EAAE,OAAO,MAAM,MAAM,SAAS,SAAS,MAAM,QAAQ,KAAK;AAAA,EACnE,SAAS,OAAO;AACd,WAAO,EAAE,OAAO,MAAM,MAAM,SAAS,SAAS,OAAO,QAAQ,SAAS,UAAU,KAAK,CAAC,EAAE;AAAA,EAC1F;AACF;AAEA,SAAS,IAAI,SAA0B;AACrC,MAAI,CAAC,sBAAsB,KAAK,OAAO,EAAG,QAAO,QAAQ,qDAAqD;AAC9G,QAAM,OAAO,QAAQ,MAAM,CAAC;AAE5B,MAAI,SAAS,KAAK,YAAY,KAAK,SAAS,KAAK,YAAY,KAAK,WAAW,OAAO,MAAM,SAAS;AACjG,WAAO,QAAQ,yFAAyF;AAAA,EAC1G;AACA,MAAI,QAAQ,YAAY,MAAM,aAAc,QAAO,EAAE,OAAO,MAAM,MAAM,OAAO,SAAS,WAAW,SAAS,OAAO,QAAQ,yDAAyD;AACpL,SAAO,EAAE,OAAO,MAAM,MAAM,OAAO,SAAS,WAAW,SAAS,MAAM,QAAQ,KAAK;AACrF;AAEA,SAAS,OAAO,SAA0B;AACxC,MAAI,CAAC,gCAAgC,KAAK,OAAO,EAAG,QAAO,QAAQ,iDAAiD;AACpH,QAAM,QAAQ,aAAa,OAAO;AAClC,MAAI,MAAM,WAAW,GAAI,QAAO,QAAQ,gDAAgD;AACxF,MAAI,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,EAAG,QAAO,EAAE,OAAO,MAAM,MAAM,UAAU,SAAS,WAAW,SAAS,OAAO,QAAQ,yEAAyE;AAC5L,SAAO,EAAE,OAAO,MAAM,MAAM,UAAU,SAAS,WAAW,SAAS,MAAM,QAAQ,KAAK;AACxF;AAGO,SAAS,gBAAgB,OAAkB,SAA+B;AAC/E,MAAI,OAAO,UAAU,YAAY,CAAC,iBAAiB,SAAS,KAAK,EAAG,OAAM,IAAI,UAAU,qBAAqB,+BAA+B,KAAK,GAAG;AACpJ,QAAM,UAAU,UAAU,YAAY,QAAQ,OAAO,IAAI,UAAU,WAAW,OAAO,OAAO,IAAI,IAAI,OAAO;AAC3G,SAAO,EAAE,SAAS,OAAO,GAAG,QAAQ;AACtC;",
6
+ "names": []
7
+ }