@dev.sail.money/sailor 0.0.2-12

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 (319) hide show
  1. package/AGENTS.md +111 -0
  2. package/LICENSE +21 -0
  3. package/README.md +337 -0
  4. package/docs/PERMISSION_MODEL.md +93 -0
  5. package/examples/permissions/BoundedBet_Limitless_Base.sol +96 -0
  6. package/examples/permissions/BoundedBorrow_AaveV3_Arbitrum.sol +94 -0
  7. package/examples/permissions/BoundedPerp_GMXv2_Arbitrum.sol +143 -0
  8. package/examples/permissions/BoundedSwap_UniswapV3_Base.sol +113 -0
  9. package/examples/permissions/BoundedSwap_UniswapV4_Unichain.sol +144 -0
  10. package/examples/permissions/BoundedTransfer_ERC20_Ethereum.sol +73 -0
  11. package/examples/permissions/README.md +52 -0
  12. package/examples/permissions/foundry.toml +10 -0
  13. package/examples/permissions/interfaces/IPermission.sol +18 -0
  14. package/package.json +39 -0
  15. package/packages/cli/README.md +34 -0
  16. package/packages/cli/dist/index.cjs +42801 -0
  17. package/packages/cli/dist/server.cjs +51201 -0
  18. package/packages/sdk/README.md +65 -0
  19. package/packages/sdk/dist/abis/MandateFactory.d.ts +140 -0
  20. package/packages/sdk/dist/abis/MandateFactory.d.ts.map +1 -0
  21. package/packages/sdk/dist/abis/MandateFactory.js +93 -0
  22. package/packages/sdk/dist/abis/MandateFactory.js.map +1 -0
  23. package/packages/sdk/dist/abis/SailGovernance.d.ts +57 -0
  24. package/packages/sdk/dist/abis/SailGovernance.d.ts.map +1 -0
  25. package/packages/sdk/dist/abis/SailGovernance.js +52 -0
  26. package/packages/sdk/dist/abis/SailGovernance.js.map +1 -0
  27. package/packages/sdk/dist/abis/SailKernel.d.ts +466 -0
  28. package/packages/sdk/dist/abis/SailKernel.d.ts.map +1 -0
  29. package/packages/sdk/dist/abis/SailKernel.js +311 -0
  30. package/packages/sdk/dist/abis/SailKernel.js.map +1 -0
  31. package/packages/sdk/dist/abis/index.d.ts +4 -0
  32. package/packages/sdk/dist/abis/index.d.ts.map +1 -0
  33. package/packages/sdk/dist/abis/index.js +7 -0
  34. package/packages/sdk/dist/abis/index.js.map +1 -0
  35. package/packages/sdk/dist/capabilities.d.ts +77 -0
  36. package/packages/sdk/dist/capabilities.d.ts.map +1 -0
  37. package/packages/sdk/dist/capabilities.js +158 -0
  38. package/packages/sdk/dist/capabilities.js.map +1 -0
  39. package/packages/sdk/dist/client.d.ts +37 -0
  40. package/packages/sdk/dist/client.d.ts.map +1 -0
  41. package/packages/sdk/dist/client.js +646 -0
  42. package/packages/sdk/dist/client.js.map +1 -0
  43. package/packages/sdk/dist/deployments.d.ts +82 -0
  44. package/packages/sdk/dist/deployments.d.ts.map +1 -0
  45. package/packages/sdk/dist/deployments.js +197 -0
  46. package/packages/sdk/dist/deployments.js.map +1 -0
  47. package/packages/sdk/dist/discovery.d.ts +10 -0
  48. package/packages/sdk/dist/discovery.d.ts.map +1 -0
  49. package/packages/sdk/dist/discovery.js +41 -0
  50. package/packages/sdk/dist/discovery.js.map +1 -0
  51. package/packages/sdk/dist/eip712.d.ts +257 -0
  52. package/packages/sdk/dist/eip712.d.ts.map +1 -0
  53. package/packages/sdk/dist/eip712.js +255 -0
  54. package/packages/sdk/dist/eip712.js.map +1 -0
  55. package/packages/sdk/dist/errors.d.ts +47 -0
  56. package/packages/sdk/dist/errors.d.ts.map +1 -0
  57. package/packages/sdk/dist/errors.js +168 -0
  58. package/packages/sdk/dist/errors.js.map +1 -0
  59. package/packages/sdk/dist/fees.d.ts +16 -0
  60. package/packages/sdk/dist/fees.d.ts.map +1 -0
  61. package/packages/sdk/dist/fees.js +51 -0
  62. package/packages/sdk/dist/fees.js.map +1 -0
  63. package/packages/sdk/dist/index.d.ts +23 -0
  64. package/packages/sdk/dist/index.d.ts.map +1 -0
  65. package/packages/sdk/dist/index.js +16 -0
  66. package/packages/sdk/dist/index.js.map +1 -0
  67. package/packages/sdk/dist/intelligence.d.ts +923 -0
  68. package/packages/sdk/dist/intelligence.d.ts.map +1 -0
  69. package/packages/sdk/dist/intelligence.js +357 -0
  70. package/packages/sdk/dist/intelligence.js.map +1 -0
  71. package/packages/sdk/dist/keyring.d.ts +60 -0
  72. package/packages/sdk/dist/keyring.d.ts.map +1 -0
  73. package/packages/sdk/dist/keyring.js +159 -0
  74. package/packages/sdk/dist/keyring.js.map +1 -0
  75. package/packages/sdk/dist/lifi.d.ts +83 -0
  76. package/packages/sdk/dist/lifi.d.ts.map +1 -0
  77. package/packages/sdk/dist/lifi.js +69 -0
  78. package/packages/sdk/dist/lifi.js.map +1 -0
  79. package/packages/sdk/dist/safe.d.ts +158 -0
  80. package/packages/sdk/dist/safe.d.ts.map +1 -0
  81. package/packages/sdk/dist/safe.js +163 -0
  82. package/packages/sdk/dist/safe.js.map +1 -0
  83. package/packages/sdk/dist/signing.d.ts +106 -0
  84. package/packages/sdk/dist/signing.d.ts.map +1 -0
  85. package/packages/sdk/dist/signing.js +2 -0
  86. package/packages/sdk/dist/signing.js.map +1 -0
  87. package/packages/sdk/dist/templates/ammLiquidity.d.ts +16 -0
  88. package/packages/sdk/dist/templates/ammLiquidity.d.ts.map +1 -0
  89. package/packages/sdk/dist/templates/ammLiquidity.js +60 -0
  90. package/packages/sdk/dist/templates/ammLiquidity.js.map +1 -0
  91. package/packages/sdk/dist/templates/approveAndCallBatch.d.ts +14 -0
  92. package/packages/sdk/dist/templates/approveAndCallBatch.d.ts.map +1 -0
  93. package/packages/sdk/dist/templates/approveAndCallBatch.js +53 -0
  94. package/packages/sdk/dist/templates/approveAndCallBatch.js.map +1 -0
  95. package/packages/sdk/dist/templates/boundedBorrow.d.ts +16 -0
  96. package/packages/sdk/dist/templates/boundedBorrow.d.ts.map +1 -0
  97. package/packages/sdk/dist/templates/boundedBorrow.js +56 -0
  98. package/packages/sdk/dist/templates/boundedBorrow.js.map +1 -0
  99. package/packages/sdk/dist/templates/boundedSwap.d.ts +16 -0
  100. package/packages/sdk/dist/templates/boundedSwap.d.ts.map +1 -0
  101. package/packages/sdk/dist/templates/boundedSwap.js +56 -0
  102. package/packages/sdk/dist/templates/boundedSwap.js.map +1 -0
  103. package/packages/sdk/dist/templates/defiBundle.d.ts +14 -0
  104. package/packages/sdk/dist/templates/defiBundle.d.ts.map +1 -0
  105. package/packages/sdk/dist/templates/defiBundle.js +52 -0
  106. package/packages/sdk/dist/templates/defiBundle.js.map +1 -0
  107. package/packages/sdk/dist/templates/index.d.ts +15 -0
  108. package/packages/sdk/dist/templates/index.d.ts.map +1 -0
  109. package/packages/sdk/dist/templates/index.js +8 -0
  110. package/packages/sdk/dist/templates/index.js.map +1 -0
  111. package/packages/sdk/dist/templates/pendle.d.ts +14 -0
  112. package/packages/sdk/dist/templates/pendle.d.ts.map +1 -0
  113. package/packages/sdk/dist/templates/pendle.js +52 -0
  114. package/packages/sdk/dist/templates/pendle.js.map +1 -0
  115. package/packages/sdk/dist/templates/transferTarget.d.ts +10 -0
  116. package/packages/sdk/dist/templates/transferTarget.d.ts.map +1 -0
  117. package/packages/sdk/dist/templates/transferTarget.js +42 -0
  118. package/packages/sdk/dist/templates/transferTarget.js.map +1 -0
  119. package/packages/sdk/dist/types.d.ts +382 -0
  120. package/packages/sdk/dist/types.d.ts.map +1 -0
  121. package/packages/sdk/dist/types.js +2 -0
  122. package/packages/sdk/dist/types.js.map +1 -0
  123. package/packages/sdk/package.json +52 -0
  124. package/packages/ui/dist/assets/Arc-VDBY7LNS-BChRXCXW.js +1 -0
  125. package/packages/ui/dist/assets/Brave-BRAKJXDS-mq-Xo37j.js +1 -0
  126. package/packages/ui/dist/assets/Browser-76IHF3Y2-BMhRaC5Z.js +1 -0
  127. package/packages/ui/dist/assets/Chrome-65Q5P54Y-DR9MQEVr.js +1 -0
  128. package/packages/ui/dist/assets/Edge-XSPUTORV-DEoZslQE.js +1 -0
  129. package/packages/ui/dist/assets/Firefox-AAHGJQIP-Bp_Hm04m.js +1 -0
  130. package/packages/ui/dist/assets/Linux-OO4TNCLJ-B0aw93n9.js +1 -0
  131. package/packages/ui/dist/assets/Macos-MW4AE7LN-Vvm8Drw3.js +1 -0
  132. package/packages/ui/dist/assets/Opera-KQZLSACL-Cwv5MDFy.js +1 -0
  133. package/packages/ui/dist/assets/Safari-ZPL37GXR-C4Ggg6rz.js +1 -0
  134. package/packages/ui/dist/assets/Windows-PPTHQER6-BlyV2p7Y.js +1 -0
  135. package/packages/ui/dist/assets/add-DaJhwIBV.js +15 -0
  136. package/packages/ui/dist/assets/all-wallets-BUxsqWXi.js +6 -0
  137. package/packages/ui/dist/assets/apechain-SX5YFU6N-q5qBv-mp.js +1 -0
  138. package/packages/ui/dist/assets/app-store-DkltwTqE.js +17 -0
  139. package/packages/ui/dist/assets/apple-owVOeaIT.js +18 -0
  140. package/packages/ui/dist/assets/ar_AR-LIPSOZP5-BQrIDibT.js +1519 -0
  141. package/packages/ui/dist/assets/arbitrum-WURIBY6W-CqVkHBr5.js +1 -0
  142. package/packages/ui/dist/assets/arrow-bottom-D2mmNJve.js +8 -0
  143. package/packages/ui/dist/assets/arrow-bottom-circle-CbNYijx-.js +11 -0
  144. package/packages/ui/dist/assets/arrow-left-DJB61s4C.js +8 -0
  145. package/packages/ui/dist/assets/arrow-right-BBrsQ9R4.js +8 -0
  146. package/packages/ui/dist/assets/arrow-top-Cil6bOc8.js +8 -0
  147. package/packages/ui/dist/assets/assets-Q6ZU7ZJ5-P8HioiAD.js +1 -0
  148. package/packages/ui/dist/assets/avalanche-KOMJD3XY-Dsn_JPR4.js +1 -0
  149. package/packages/ui/dist/assets/bank-CbwEmRo3.js +14 -0
  150. package/packages/ui/dist/assets/base-OAXLRA4F-CoYTVIiL.js +1 -0
  151. package/packages/ui/dist/assets/base-QS6CYWIN-CsjdbWCf.js +1 -0
  152. package/packages/ui/dist/assets/basic-CLNfjw3m.js +2128 -0
  153. package/packages/ui/dist/assets/berachain-NJECWIVC-DumxnFvf.js +1 -0
  154. package/packages/ui/dist/assets/blast-V555OVXZ-BbhJh1tj.js +1 -0
  155. package/packages/ui/dist/assets/browser-B5TtF4Pb.js +14 -0
  156. package/packages/ui/dist/assets/bsc-N647EYR2-B2nLKXWV.js +1 -0
  157. package/packages/ui/dist/assets/card-CO7BVB-C.js +14 -0
  158. package/packages/ui/dist/assets/ccip-2W7K3_J3.js +1 -0
  159. package/packages/ui/dist/assets/celo-GEP4TUHG-CenIBYLU.js +1 -0
  160. package/packages/ui/dist/assets/checkmark-BEtSHq9m.js +11 -0
  161. package/packages/ui/dist/assets/checkmark-bold-D9xGHzPE.js +8 -0
  162. package/packages/ui/dist/assets/chevron-bottom-BDztht6i.js +8 -0
  163. package/packages/ui/dist/assets/chevron-left-EV4GFNbc.js +8 -0
  164. package/packages/ui/dist/assets/chevron-right-B4_bB9oR.js +8 -0
  165. package/packages/ui/dist/assets/chevron-top-D54xPNzF.js +8 -0
  166. package/packages/ui/dist/assets/chrome-store-DYUpAJJq.js +61 -0
  167. package/packages/ui/dist/assets/clock-Ca1T1Soz.js +8 -0
  168. package/packages/ui/dist/assets/close-BZqWjurK.js +8 -0
  169. package/packages/ui/dist/assets/coinPlaceholder-e6fl2XDo.js +8 -0
  170. package/packages/ui/dist/assets/compass-DCLC7zIh.js +8 -0
  171. package/packages/ui/dist/assets/connect-UA7M4XW6-IY3X6Bmr.js +1 -0
  172. package/packages/ui/dist/assets/copy-Th2AaD-O.js +15 -0
  173. package/packages/ui/dist/assets/core-Ckx_cyuH.js +907 -0
  174. package/packages/ui/dist/assets/create-FASO7PVG-D_rvSpre.js +1 -0
  175. package/packages/ui/dist/assets/cronos-HJPAQTAE-BEOvlOC4.js +1 -0
  176. package/packages/ui/dist/assets/cursor-DV7rOqbJ.js +3 -0
  177. package/packages/ui/dist/assets/cursor-transparent-BKHeABKB.js +12 -0
  178. package/packages/ui/dist/assets/de_DE-YE3KOFHU-BRt5ztUe.js +1519 -0
  179. package/packages/ui/dist/assets/degen-FQQ4XGHB-CeHTs88l.js +1 -0
  180. package/packages/ui/dist/assets/desktop-CBjY8t6F.js +9 -0
  181. package/packages/ui/dist/assets/disconnect-DbSs2cli.js +8 -0
  182. package/packages/ui/dist/assets/discord-ZlLOAUkM.js +17 -0
  183. package/packages/ui/dist/assets/es_419-7LMPU7G4-DH7rM0yQ.js +1519 -0
  184. package/packages/ui/dist/assets/ethereum-RGGVA4PY-SWGOlkuk.js +1 -0
  185. package/packages/ui/dist/assets/etherscan-CKUrqWYN.js +6 -0
  186. package/packages/ui/dist/assets/events-CiKP71cK.js +1 -0
  187. package/packages/ui/dist/assets/exclamation-triangle-DA1QzFiO.js +4 -0
  188. package/packages/ui/dist/assets/extension-BVJkmvpJ.js +8 -0
  189. package/packages/ui/dist/assets/external-link-D_bsR7B2.js +8 -0
  190. package/packages/ui/dist/assets/facebook-CmFmhojx.js +26 -0
  191. package/packages/ui/dist/assets/fallback-Ofl6uSnB.js +1 -0
  192. package/packages/ui/dist/assets/farcaster-Co-M3Ss8.js +12 -0
  193. package/packages/ui/dist/assets/filters-B1WwNaFU.js +8 -0
  194. package/packages/ui/dist/assets/flow-5FQJFCTK-CUie2reO.js +1 -0
  195. package/packages/ui/dist/assets/fr_FR-VBJP3ZLL-B-_ocunw.js +1519 -0
  196. package/packages/ui/dist/assets/github-CP4fP6gn.js +18 -0
  197. package/packages/ui/dist/assets/gnosis-37ZC4RBL-B137OtHZ.js +1 -0
  198. package/packages/ui/dist/assets/google-CsOIXJ6V.js +18 -0
  199. package/packages/ui/dist/assets/gravity-J5YQHTYH-Bj6B0uod.js +1 -0
  200. package/packages/ui/dist/assets/hardhat-TX56IT5N-CV1FY-wE.js +1 -0
  201. package/packages/ui/dist/assets/help-circle-DiMkomdF.js +12 -0
  202. package/packages/ui/dist/assets/hi_IN-WBVD5XYI-D73g2UFs.js +1519 -0
  203. package/packages/ui/dist/assets/hyperevm-VKPAA4SA-CHwraEsx.js +1 -0
  204. package/packages/ui/dist/assets/id-lmscL5LX.js +12 -0
  205. package/packages/ui/dist/assets/id_ID-SBYANJ7G-Cjpa4ay6.js +1519 -0
  206. package/packages/ui/dist/assets/image-B-ubJrY5.js +4 -0
  207. package/packages/ui/dist/assets/index-BaukYv-x.js +16 -0
  208. package/packages/ui/dist/assets/index-CF0KMmke.js +395 -0
  209. package/packages/ui/dist/assets/index-CKxgNxS9.css +1 -0
  210. package/packages/ui/dist/assets/index-CZR1Qjhs.js +1 -0
  211. package/packages/ui/dist/assets/index-DVgfCzCo.js +1 -0
  212. package/packages/ui/dist/assets/index-Dbh5V1Z0.js +1 -0
  213. package/packages/ui/dist/assets/index-Q2Yai4Fe.js +2103 -0
  214. package/packages/ui/dist/assets/index.es-C78cE5SI.js +26 -0
  215. package/packages/ui/dist/assets/info-Cqg57EVo.js +3 -0
  216. package/packages/ui/dist/assets/info-circle-DkeSWNKV.js +12 -0
  217. package/packages/ui/dist/assets/ink-FZMYZWHG-62p-5IK5.js +1 -0
  218. package/packages/ui/dist/assets/ja_JP-ZRMWJV3I-DXbifiMm.js +1519 -0
  219. package/packages/ui/dist/assets/kaia-65D2U3PU-JmuLQ4gC.js +1 -0
  220. package/packages/ui/dist/assets/ko_KR-FR54RFUG-upinSHjQ.js +1519 -0
  221. package/packages/ui/dist/assets/lightbulb-DNlO4qKh.js +3 -0
  222. package/packages/ui/dist/assets/linea-QRMVQ5DY-DuI3vv0d.js +1 -0
  223. package/packages/ui/dist/assets/login-UP3DZBGS-Db_wM5oQ.js +1 -0
  224. package/packages/ui/dist/assets/mail-kVQ8Jb9Y.js +8 -0
  225. package/packages/ui/dist/assets/manta-SI27YFEJ-CpVOKa06.js +1 -0
  226. package/packages/ui/dist/assets/mantle-CKIUT334-DR2WgqzU.js +1 -0
  227. package/packages/ui/dist/assets/metaMaskWallet-EI6MED72-D5HFOsnz.js +1 -0
  228. package/packages/ui/dist/assets/metamask-sdk-CBalSvz7.js +542 -0
  229. package/packages/ui/dist/assets/mobile-BEteuhF7.js +9 -0
  230. package/packages/ui/dist/assets/monad-4KWC6TSS-DVXSkpiz.js +1 -0
  231. package/packages/ui/dist/assets/more-DBWmXQli.js +11 -0
  232. package/packages/ui/dist/assets/ms_MY-EZSGYYYQ-4cPLK-3L.js +1519 -0
  233. package/packages/ui/dist/assets/native-CJ5et6AR.js +1 -0
  234. package/packages/ui/dist/assets/network-placeholder-Dg1uUHiL.js +14 -0
  235. package/packages/ui/dist/assets/nftPlaceholder-i3AHSiD9.js +8 -0
  236. package/packages/ui/dist/assets/off-BtMm0fi2.js +8 -0
  237. package/packages/ui/dist/assets/optimism-HAF2GUT7-ec6Nqxs9.js +1 -0
  238. package/packages/ui/dist/assets/parseSignature-Cb5FlWWg.js +1 -0
  239. package/packages/ui/dist/assets/play-store-iKKkXa6a.js +32 -0
  240. package/packages/ui/dist/assets/plus-CA5NaRtb.js +13 -0
  241. package/packages/ui/dist/assets/polygon-WW6ZI7PM-DXlmm4L1.js +1 -0
  242. package/packages/ui/dist/assets/pt_BR-JQFQ3P4L-DOHfdcA2.js +1519 -0
  243. package/packages/ui/dist/assets/qr-code-D2kiqR7h.js +6 -0
  244. package/packages/ui/dist/assets/rainbowWallet-O26YNBMX-DUhYus-9.js +1 -0
  245. package/packages/ui/dist/assets/recycle-horizontal-Dcme7R03.js +9 -0
  246. package/packages/ui/dist/assets/refresh-Dega3sDp.js +8 -0
  247. package/packages/ui/dist/assets/refresh-S4T5V5GX-CwqIaaxK.js +1 -0
  248. package/packages/ui/dist/assets/reown-logo-xNkksyWJ.js +12 -0
  249. package/packages/ui/dist/assets/ronin-EMCPYXZT-N-QBHZdV.js +1 -0
  250. package/packages/ui/dist/assets/ru_RU-Z42UEJBP-Cvb2oWxQ.js +1519 -0
  251. package/packages/ui/dist/assets/safeWallet-5MNKTR5Z-D-5imDLD.js +1 -0
  252. package/packages/ui/dist/assets/sanko-RHQYXGM5-OX010CbN.js +1 -0
  253. package/packages/ui/dist/assets/scan-4UYSQ56Q-CjMz6-XC.js +1 -0
  254. package/packages/ui/dist/assets/scroll-5OBGQVOV-DJFECiai.js +1 -0
  255. package/packages/ui/dist/assets/search-HYl7NO8x.js +8 -0
  256. package/packages/ui/dist/assets/secp256k1-Cxd6_SiH.js +1 -0
  257. package/packages/ui/dist/assets/send-CJU8CUAo.js +15 -0
  258. package/packages/ui/dist/assets/sign-A7IJEUT5-CGsRnPrd.js +1 -0
  259. package/packages/ui/dist/assets/superposition-HG6MMR2Y-bRkgatRO.js +1 -0
  260. package/packages/ui/dist/assets/swapHorizontal-IMUKiUre.js +8 -0
  261. package/packages/ui/dist/assets/swapHorizontalBold-CNYnNJ9-.js +8 -0
  262. package/packages/ui/dist/assets/swapHorizontalMedium-B9VxEYsT.js +16 -0
  263. package/packages/ui/dist/assets/swapHorizontalRoundedBold-Dz33l_Jh.js +8 -0
  264. package/packages/ui/dist/assets/swapVertical-CHUmjVJ0.js +8 -0
  265. package/packages/ui/dist/assets/telegram-kl9S2mbU.js +16 -0
  266. package/packages/ui/dist/assets/th_TH-4YB4VSB2-BUipNP-V.js +1519 -0
  267. package/packages/ui/dist/assets/three-dots-U5lhA1Am.js +5 -0
  268. package/packages/ui/dist/assets/tr_TR-5FKHPPIO-D5jTpIm9.js +1519 -0
  269. package/packages/ui/dist/assets/twitch-KTEUWXEp.js +18 -0
  270. package/packages/ui/dist/assets/twitterIcon-BHiq8mRg.js +6 -0
  271. package/packages/ui/dist/assets/uk_UA-ZD4IBC52-DgnQrpzl.js +1519 -0
  272. package/packages/ui/dist/assets/unichain-C5BWO2ZY-BfguYsnu.js +1 -0
  273. package/packages/ui/dist/assets/verify-CfN-BXNd.js +8 -0
  274. package/packages/ui/dist/assets/verify-filled-DwZccetj.js +8 -0
  275. package/packages/ui/dist/assets/vi_VN-5EVRZKLY-x078672g.js +1519 -0
  276. package/packages/ui/dist/assets/w3m-modal-CS-PFqPE.js +642 -0
  277. package/packages/ui/dist/assets/wallet-DVlGkhOY.js +8 -0
  278. package/packages/ui/dist/assets/wallet-placeholder-CvR_iEWX.js +14 -0
  279. package/packages/ui/dist/assets/walletConnectWallet-YHWKVTDY-D3lyiczV.js +1 -0
  280. package/packages/ui/dist/assets/walletconnect-8pZBDvVI.js +30 -0
  281. package/packages/ui/dist/assets/warning-circle-ylLEE0Yp.js +12 -0
  282. package/packages/ui/dist/assets/x-C_TBsTMj.js +12 -0
  283. package/packages/ui/dist/assets/xdc-KJ3TDBYO-DNV6zchh.js +1 -0
  284. package/packages/ui/dist/assets/zetachain-TLDS5IPW-Udhyw16T.js +1 -0
  285. package/packages/ui/dist/assets/zh_CN-4XK5YJPR-Bt6Yz5Ek.js +1519 -0
  286. package/packages/ui/dist/assets/zh_HK-N4YN2WSI-Cvzl1V16.js +1519 -0
  287. package/packages/ui/dist/assets/zh_TW-CNCRXH6Z-BNelatfN.js +1519 -0
  288. package/packages/ui/dist/assets/zksync-DH7HK5U4-Dt4usFw6.js +1 -0
  289. package/packages/ui/dist/assets/zora-FYL5H3IO-iB4wygST.js +1 -0
  290. package/packages/ui/dist/index.html +14 -0
  291. package/scripts/check-docs.mjs +262 -0
  292. package/scripts/check-init.mjs +109 -0
  293. package/scripts/postinstall.js +366 -0
  294. package/templates/custom-mandate/.sail/contracts/interfaces/IPermission.sol +18 -0
  295. package/templates/custom-mandate/README.md +85 -0
  296. package/templates/custom-mandate/foundry.toml +8 -0
  297. package/templates/custom-mandate/mandates/BoundedCallPermission.sol +35 -0
  298. package/templates/custom-mandate/mandates/README.md +16 -0
  299. package/templates/dca-rebalancer/.cursor/rules +25 -0
  300. package/templates/dca-rebalancer/.env.example +6 -0
  301. package/templates/dca-rebalancer/.github/workflows/agent-tick.yml +32 -0
  302. package/templates/dca-rebalancer/.sail/.gitkeep +0 -0
  303. package/templates/dca-rebalancer/.sail/README.md +13 -0
  304. package/templates/dca-rebalancer/.sail/config.json +10 -0
  305. package/templates/dca-rebalancer/AGENTS.md +246 -0
  306. package/templates/dca-rebalancer/AGENT_PLAYBOOK.md +110 -0
  307. package/templates/dca-rebalancer/CLAUDE.md +2 -0
  308. package/templates/dca-rebalancer/README.md +16 -0
  309. package/templates/dca-rebalancer/_gitignore +13 -0
  310. package/templates/dca-rebalancer/docs/PERMISSION_MODEL.md +93 -0
  311. package/templates/dca-rebalancer/package.json +17 -0
  312. package/templates/dca-rebalancer/src/agent.ts +253 -0
  313. package/templates/dca-rebalancer/src/config.ts +27 -0
  314. package/templates/dca-rebalancer/src/mandate.ts +67 -0
  315. package/templates/dca-rebalancer/tsconfig.json +8 -0
  316. package/templates/dca-rebalancer/ui/README.md +3 -0
  317. package/templates/lifi-permissions/LifiBoundedApprovePermissionCloneable.sol +84 -0
  318. package/templates/lifi-permissions/LifiDiamondSwapPermissionCloneable.sol +97 -0
  319. package/templates/lifi-permissions/README.md +53 -0
@@ -0,0 +1,923 @@
1
+ /**
2
+ * Sail Intelligence — https://api.sail.money
3
+ *
4
+ * AUTO-GENERATED from the OpenAPI spec at build time.
5
+ * Do not edit manually — run `pnpm build` to regenerate.
6
+ *
7
+ * Spec version : 1.2.0
8
+ * Generated at : 2026-06-05T12:43:07.205Z
9
+ */
10
+ export declare const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
+ export declare const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
12
+ export interface ActionDetail {
13
+ action_type: string;
14
+ protocol: string;
15
+ amount: string;
16
+ underlying_amount?: string | null;
17
+ }
18
+ export interface AffectedPosition {
19
+ vault_address: string;
20
+ chain: string | null;
21
+ token: string | null;
22
+ issues: PositionIssue[];
23
+ }
24
+ export interface AllocationItem {
25
+ /** Vault contract address receiving allocation. */
26
+ vault_address: string;
27
+ /** Chain where the selected vault is deployed. */
28
+ chain: string;
29
+ /** Primary deposit token symbol for the selected vault. */
30
+ token: string;
31
+ /** Underlying protocol or venue name when available. */
32
+ protocol?: string | null;
33
+ /** Recommended portfolio weight for the vault. */
34
+ weight: number;
35
+ /** Recommended USD notional allocated to the vault. */
36
+ value_usd: number;
37
+ /** Expected APY contribution from the selected vault. */
38
+ expected_apy: number;
39
+ }
40
+ export interface AllocationRequest {
41
+ /** Total portfolio value in USD. */
42
+ portfolio_value_usd: number;
43
+ /** Market: 'usd' or 'eur'. */
44
+ market?: string;
45
+ /** Restrict to these chains. Omit for all chains. */
46
+ allowed_chains?: string[] | null;
47
+ /** Maximum number of vault positions. */
48
+ max_positions?: number;
49
+ /** Apply Sonar risk filtering. When False, pure yield logic — all market vaults included regardless of risk flags. */
50
+ sonar_enabled?: boolean;
51
+ }
52
+ export interface AllocationResponse {
53
+ /** Requested market segment. */
54
+ market: string;
55
+ /** Total USD portfolio value used for the allocation run. */
56
+ total_value_usd: number;
57
+ /** Recommended institutional allocation across selected vaults. */
58
+ allocations: AllocationItem[];
59
+ /** Expected blended APY for the proposed allocation. */
60
+ expected_portfolio_apy: number;
61
+ /** Whether Sonar filtering was applied during allocation. */
62
+ sonar_enabled: boolean;
63
+ /** UTC timestamp of the latest Sonar pipeline run. */
64
+ last_pipeline_run: string | null;
65
+ /** UTC timestamp when the allocation was produced. */
66
+ checked_at: string;
67
+ }
68
+ export interface BenchmarkResponse {
69
+ market: string;
70
+ chain?: string | null;
71
+ vault_count: number;
72
+ best_apy: number;
73
+ worst_apy: number;
74
+ median_apy: number;
75
+ mean_apy: number;
76
+ best_vault?: string | null;
77
+ sonar_enabled: boolean;
78
+ last_pipeline_run: string | null;
79
+ checked_at: string;
80
+ }
81
+ export interface CalldataInfo {
82
+ contract_address: string;
83
+ function_name: string;
84
+ parameters: string[];
85
+ value: string;
86
+ protocol: string;
87
+ description: string;
88
+ }
89
+ export interface CollateralTree {
90
+ /** Vault deposit token used as the root of the collateral dependency tree. */
91
+ deposit_token: string;
92
+ /** Terminal underlying assets reached by the collateral expansion. */
93
+ primitive_leaves: string[];
94
+ /** Expanded collateral structure used by Sonar dependency analysis. */
95
+ collateral_tokens: Record<string, unknown>[];
96
+ /** UTC timestamp when the collateral tree was last built. */
97
+ last_built: string;
98
+ }
99
+ export interface ComparePosition {
100
+ vault_address: string;
101
+ value_usd: number;
102
+ }
103
+ export interface CompareRequest {
104
+ /** Current portfolio positions. */
105
+ current: ComparePosition[];
106
+ /** Proposed portfolio positions. */
107
+ proposed: ComparePosition[];
108
+ /** Market: 'usd' or 'eur'. */
109
+ market?: string;
110
+ }
111
+ export interface CompareResponse {
112
+ /** Estimated APY of the current portfolio. */
113
+ current_portfolio_apy: number;
114
+ /** Estimated APY of the proposed portfolio. */
115
+ proposed_portfolio_apy: number;
116
+ /** APY delta between proposed and current portfolios. */
117
+ apy_change: number;
118
+ /** Number of Sonar risk flags in the current portfolio. */
119
+ current_risk_flags: number;
120
+ /** Number of Sonar risk flags in the proposed portfolio. */
121
+ proposed_risk_flags: number;
122
+ /** Net change in Sonar risk flags between portfolios. */
123
+ risk_change: number;
124
+ /** Vault addresses exited by the proposed portfolio. */
125
+ positions_exited: string[];
126
+ /** Vault addresses entered by the proposed portfolio. */
127
+ positions_entered: string[];
128
+ /** Overall assessment: improvement, degradation, or neutral. */
129
+ assessment: string;
130
+ /** UTC timestamp of the latest Sonar pipeline run. */
131
+ last_pipeline_run: string | null;
132
+ /** UTC timestamp when the comparison was produced. */
133
+ checked_at: string;
134
+ }
135
+ export interface Constraint {
136
+ kind: string;
137
+ params?: Record<string, unknown>;
138
+ }
139
+ export interface CostBreakdown {
140
+ /** Cumulative gas costs across all rebalancing events. */
141
+ gas_total_usd: number;
142
+ /** Estimated slippage on cross-token swaps. */
143
+ slippage_total_usd: number;
144
+ /** Bridge protocol fees for cross-chain moves. */
145
+ bridge_fees_total_usd: number;
146
+ /** Sum of all cost components. */
147
+ total_cost_usd: number;
148
+ /** Total number of periods the engine ran (checked and potentially rebalanced). */
149
+ rebalance_events: number;
150
+ /** Actual position changes executed (subset of rebalance_events that passed the profitability gate). */
151
+ trades_executed: number;
152
+ /** Average cost per executed trade. */
153
+ avg_cost_per_trade_usd: number;
154
+ }
155
+ export interface DepeggedTokens {
156
+ /** Total number of currently flagged depegged tokens. */
157
+ count: number;
158
+ /** Depegged tokens grouped by chain. */
159
+ by_chain: Record<string, string[]>;
160
+ }
161
+ export interface DetectorClearance {
162
+ /** Sonar detector name used in the audit trail. */
163
+ detector: string;
164
+ /** Detector outcome for the vault: clear or flagged. */
165
+ status: string;
166
+ /** Optional detector-specific explanation. */
167
+ detail?: string | null;
168
+ }
169
+ export interface DisableSource {
170
+ /** Underlying Sonar detector or disable source that flagged the vault. */
171
+ source: string;
172
+ /** Internal Sonar severity tier for this disable source. */
173
+ tier: number;
174
+ /** UTC timestamp when the disable source became active. */
175
+ disabled_at: string;
176
+ }
177
+ export interface DisabledVaults {
178
+ /** Total number of currently disabled vaults. */
179
+ count: number;
180
+ /** All currently disabled vault addresses. */
181
+ addresses: string[];
182
+ /** Disabled vault addresses grouped by Sonar source. */
183
+ by_source: Record<string, string[]>;
184
+ }
185
+ export interface ExecuteRequest {
186
+ chain_id: number;
187
+ total_capital: string;
188
+ token_address: string;
189
+ current_allocations?: Record<string, string>;
190
+ protocols?: string[];
191
+ constraints?: Constraint[];
192
+ receiver?: string | null;
193
+ include_forecast?: boolean;
194
+ }
195
+ export interface ExecuteResponse {
196
+ optimization_result: OptimizationResult;
197
+ action_plan: ActionDetail[];
198
+ calldata: CalldataInfo[];
199
+ swap_required?: SwapRequired[];
200
+ forecast_unavailable?: boolean | null;
201
+ }
202
+ export interface ExplainRequest {
203
+ /** Market: 'usd' or 'eur'. */
204
+ market?: string;
205
+ portfolio_value_usd: number;
206
+ max_positions?: number;
207
+ /** Restrict to a single chain. */
208
+ chain?: string | null;
209
+ }
210
+ export interface ExplainResponse {
211
+ allocation: AllocationItem[];
212
+ reasoning: VaultReasoning[];
213
+ universe_size: number;
214
+ filtered_count: number;
215
+ expected_portfolio_apy: number;
216
+ last_pipeline_run: string | null;
217
+ checked_at: string;
218
+ }
219
+ export interface InstitutionalRequest {
220
+ /** Current portfolio keyed by chain_id. Use '0x0000' as vault address for idle wallet cash. Values may be USD amounts (any > 2.0) or fractions (all ≤ 1.0). Example: {'1': {'0x0000': 50000, '0x9Fb7...': 30000}} */
221
+ portfolio_input: Record<string, Record<string, number>>;
222
+ /** Total portfolio value in USD. Required when portfolio_input values are fractions; auto-summed when values are USD amounts. */
223
+ total_balance?: number | null;
224
+ /** Market: 'usd' or 'eur'. */
225
+ client_market?: string;
226
+ /** Optional vault allowlist override. Accepts ['0x...'] addresses. */
227
+ client_sources?: string[] | null;
228
+ /** Executions per day. */
229
+ daily_executions?: number;
230
+ /** Max vault positions. */
231
+ max_positions?: number;
232
+ /** Allow same-chain token swaps. */
233
+ allow_swaps?: boolean;
234
+ /** Allow cross-chain bridges. */
235
+ allow_bridges?: boolean;
236
+ /** Lock current chain distribution. */
237
+ lock_chain_allocations?: boolean;
238
+ /** Required gain above break-even as a fraction, e.g. 0.05 = 5%. */
239
+ min_profit_margin?: number;
240
+ /** Max fraction of pool TVL per position, e.g. 0.01 = 1%. */
241
+ tvl_concentration_max?: number;
242
+ }
243
+ export interface InstitutionalResponse {
244
+ /** Recommended weights keyed by chain_id string, then vault address. */
245
+ address_weights_by_chain: Record<string, Record<string, number>>;
246
+ /** Requested client market segment. */
247
+ market: string;
248
+ /** Total USD portfolio value used for optimization. */
249
+ total_value_usd: number;
250
+ /** Expected blended APY for the optimized institutional portfolio. */
251
+ expected_portfolio_apy: number;
252
+ /** UTC timestamp of the latest Sonar pipeline run. */
253
+ last_pipeline_run: string | null;
254
+ /** UTC timestamp when the optimization response was produced. */
255
+ checked_at: string;
256
+ }
257
+ export interface OpportunitiesResponse {
258
+ /** Requested market segment, for example usd or eur. */
259
+ market: string;
260
+ /** Optional chain filter applied to the result set. */
261
+ chain: string | null;
262
+ /** Number of opportunities returned. */
263
+ count: number;
264
+ /** Ranked institutional yield opportunities. */
265
+ opportunities: YieldOpportunity[];
266
+ /** Whether Sonar filtering was applied to the result set. */
267
+ sonar_enabled: boolean;
268
+ /** UTC timestamp when the response was generated. */
269
+ checked_at: string;
270
+ }
271
+ export interface OptimizationResult {
272
+ allocations: ProtocolAllocation[];
273
+ total_costs: number;
274
+ weighted_apr_initial: number;
275
+ weighted_apr_final: number;
276
+ apr_improvement: number;
277
+ unallocated_amount?: string;
278
+ }
279
+ export interface PeriodSnapshot {
280
+ period_index: number;
281
+ date_offset_days: number;
282
+ p10_value_usd: number;
283
+ p50_value_usd: number;
284
+ p90_value_usd: number;
285
+ /** Weighted average APY applied in this period. */
286
+ avg_apy_applied: number;
287
+ /** Costs deducted during this rebalancing event (P50 path). */
288
+ costs_incurred_usd: number;
289
+ /** Number of position changes executed in this period. */
290
+ trades_executed?: number;
291
+ /** Vault addresses active in this period. */
292
+ active_vaults: string[];
293
+ }
294
+ export interface PortfolioCheckResponse {
295
+ summary: PortfolioSummary;
296
+ safe: string[];
297
+ affected: AffectedPosition[];
298
+ checked_at: string;
299
+ }
300
+ export interface PortfolioPosition {
301
+ /** Chain name (e.g. 'base', 'arbitrum', 'ethereum'). */
302
+ chain: string;
303
+ /** Token symbol (e.g. 'usdc', 'usdt', 'eurc'). */
304
+ token: string;
305
+ /** USD value allocated to this chain/token. */
306
+ amount_usd: number;
307
+ }
308
+ export interface PortfolioSummary {
309
+ total: number;
310
+ safe: number;
311
+ affected: number;
312
+ }
313
+ export interface PortfolioValueCurve {
314
+ /** 10th-percentile portfolio value at each period. */
315
+ p10: number[];
316
+ /** Median (50th-percentile) portfolio value. */
317
+ p50: number[];
318
+ /** 90th-percentile portfolio value at each period. */
319
+ p90: number[];
320
+ /** Day offsets from simulation start (period boundaries). */
321
+ dates_days_offset: number[];
322
+ }
323
+ export interface PositionIssue {
324
+ /** Issue type, for example vault_disabled or token_depegged. */
325
+ type: string;
326
+ /** Originating Sonar source or detector for this issue. */
327
+ source: string;
328
+ /** Internal Sonar severity tier for the issue. */
329
+ tier: number;
330
+ /** Human-readable severity label, for example CRITICAL or WARN. */
331
+ severity: string;
332
+ /** UTC timestamp when the issue became active. */
333
+ disabled_at: string;
334
+ /** Optional additional context for the issue. */
335
+ detail?: string | null;
336
+ }
337
+ export interface ProtocolAllocation {
338
+ protocol: string;
339
+ allocation: string;
340
+ apr: number;
341
+ risk_score?: number | null;
342
+ forecast_apr?: number[] | null;
343
+ forecast_apr_sigma?: number[] | null;
344
+ }
345
+ /** CompareResponse without risk-delta fields — used by Engine Raw tier. */
346
+ export interface RawCompareResponse {
347
+ /** Estimated APY of the current portfolio. */
348
+ current_portfolio_apy: number;
349
+ /** Estimated APY of the proposed portfolio. */
350
+ proposed_portfolio_apy: number;
351
+ /** APY delta between proposed and current portfolios. */
352
+ apy_change: number;
353
+ /** Vault addresses exited by the proposed portfolio. */
354
+ positions_exited: string[];
355
+ /** Vault addresses entered by the proposed portfolio. */
356
+ positions_entered: string[];
357
+ /** Overall APY assessment: improvement, degradation, or neutral. */
358
+ assessment: string;
359
+ /** UTC timestamp of the latest pipeline run used for the comparison. */
360
+ last_pipeline_run: string | null;
361
+ /** UTC timestamp when the comparison was produced. */
362
+ checked_at: string;
363
+ }
364
+ export interface RawOpportunitiesResponse {
365
+ market: string;
366
+ chain: string | null;
367
+ count: number;
368
+ opportunities: RawYieldOpportunity[];
369
+ checked_at: string;
370
+ }
371
+ /** YieldOpportunity without risk_flagged — used by Engine Raw tier. */
372
+ export interface RawYieldOpportunity {
373
+ /** Vault contract address. */
374
+ vault_address: string;
375
+ /** Chain where the opportunity is deployed. */
376
+ chain: string;
377
+ /** Primary deposit token symbol. */
378
+ token: string;
379
+ /** Underlying protocol or venue name when available. */
380
+ protocol?: string | null;
381
+ /** Current total APY used for ranking. */
382
+ apy: number;
383
+ /** Base APY component. */
384
+ apy_base?: number | null;
385
+ /** Reward-token APY component. */
386
+ apy_reward?: number | null;
387
+ /** Current total value locked in USD when available. */
388
+ tvl_usd?: number | null;
389
+ /** UTC timestamp of the latest APY refresh. */
390
+ last_updated?: string | null;
391
+ }
392
+ export interface RebalanceMove {
393
+ /** Vault contract address affected by the rebalance plan. */
394
+ vault_address: string;
395
+ /** Chain where the vault is deployed. */
396
+ chain?: string | null;
397
+ /** Primary deposit token symbol. */
398
+ token?: string | null;
399
+ /** Recommended action: exit, enter, or keep. */
400
+ action: string;
401
+ /** Primary reason for the rebalance action. */
402
+ reason: string;
403
+ /** Current APY of the position when applicable. */
404
+ current_apy?: number | null;
405
+ /** Target APY after the rebalance action when applicable. */
406
+ target_apy?: number | null;
407
+ /** USD notional associated with the move. */
408
+ value_usd: number;
409
+ }
410
+ export interface RebalancePosition {
411
+ /** Vault contract address in the current portfolio. */
412
+ vault_address: string;
413
+ /** Current USD notional held in the vault. */
414
+ value_usd: number;
415
+ }
416
+ export interface RebalanceRequest {
417
+ /** Current portfolio positions. */
418
+ positions: RebalancePosition[];
419
+ /** Market: 'usd' or 'eur'. */
420
+ market?: string;
421
+ max_positions?: number;
422
+ /** Apply Sonar risk filtering. When False, pure yield logic — all market vaults included regardless of risk flags. */
423
+ sonar_enabled?: boolean;
424
+ }
425
+ export interface RebalanceResponse {
426
+ moves: RebalanceMove[];
427
+ current_portfolio_apy: number;
428
+ optimal_portfolio_apy: number;
429
+ apy_improvement: number;
430
+ last_pipeline_run: string | null;
431
+ checked_at: string;
432
+ }
433
+ export interface RiskScore {
434
+ /** Aggregated Sonar severity for the vault. */
435
+ severity: string;
436
+ /** List of Sonar detectors contributing to the score. */
437
+ detectors: string[];
438
+ /** UTC timestamp of the risk score snapshot. */
439
+ ts: string;
440
+ }
441
+ export interface RisksSummaryResponse {
442
+ disabled_vaults: DisabledVaults;
443
+ depegged_tokens: DepeggedTokens;
444
+ vault_risk_scores: Record<string, unknown>;
445
+ last_pipeline_run: string | null;
446
+ checked_at: string;
447
+ }
448
+ export interface SafeCheckResponse {
449
+ safe: boolean;
450
+ vault_address: string;
451
+ chain?: string | null;
452
+ token?: string | null;
453
+ /** Non-empty when safe=False. Values: 'vault_disabled', 'token_depegged'. */
454
+ reasons?: string[];
455
+ checked_at: string;
456
+ }
457
+ export interface ScreenRequest {
458
+ /** Vault contract addresses to screen. Max 200. */
459
+ addresses: string[];
460
+ }
461
+ export interface ScreenResponse {
462
+ results: VaultScreenResult[];
463
+ summary: ScreenSummary;
464
+ last_pipeline_run: string | null;
465
+ checked_at: string;
466
+ }
467
+ export interface ScreenSummary {
468
+ total: number;
469
+ blocked: number;
470
+ caution: number;
471
+ clear: number;
472
+ }
473
+ export interface SimulationCreateResponse {
474
+ job_id: string;
475
+ status: string;
476
+ message: string;
477
+ poll_url: string;
478
+ }
479
+ export interface SimulationPollResponse {
480
+ job_id: string;
481
+ status: string;
482
+ result?: SimulationResult | null;
483
+ error?: string | null;
484
+ checked_at: string;
485
+ }
486
+ export interface SimulationRequest {
487
+ /** Total initial portfolio size in USD. Use this for a simple single-amount simulation. Mutually exclusive with `portfolio`. */
488
+ initial_amount?: number | null;
489
+ /** Per-chain/token allocation. E.g. [{chain:'base',token:'usdc',amount_usd:50000}, {chain:'arbitrum',token:'usdc',amount_usd:30000}]. Overrides `initial_amount` and `chains`/`tokens` filters — the simulation starts from these exact positions. */
490
+ portfolio?: PortfolioPosition[] | null;
491
+ /** Forecast horizon in months. */
492
+ horizon_months: number;
493
+ /** conservative → low-risk tier (no bridges, ≤2 positions); balanced → mid tier (swaps + bridges, ≤4 positions); aggressive → max tier (full features, ≤5 positions). */
494
+ strategy?: string;
495
+ /** Token list to include (e.g. ['usdc', 'usdt']). */
496
+ tokens?: string[];
497
+ /** Chain filter (e.g. ['base', 'arbitrum']). Null = all chains. */
498
+ chains?: string[] | null;
499
+ /** Allow cross-token swaps during rebalancing. */
500
+ allow_swaps?: boolean;
501
+ /** Allow cross-chain bridges during rebalancing. */
502
+ allow_bridges?: boolean;
503
+ /** How often the simulator rebalances the portfolio. */
504
+ rebalance_frequency?: string;
505
+ /** Restrict simulation to a specific vault allowlist (by vault address). */
506
+ custom_vaults?: string[] | null;
507
+ /** Return P10/P90 uncertainty bands alongside the P50 median curve. */
508
+ confidence_intervals?: boolean;
509
+ /** Number of Monte Carlo scenarios to run. */
510
+ monte_carlo_scenarios?: number;
511
+ /** Override the maximum number of concurrent vault positions. Defaults to the strategy tier value (conservative=2, balanced=4, aggressive=5). Higher values increase diversification but may dilute yield per position. */
512
+ max_positions?: number | null;
513
+ /** Override the minimum profit margin required before executing a rebalance move. 0.0 = move whenever there's any gain; 0.2 = require 20%% cost buffer. Defaults to strategy tier value (conservative=0, balanced=0.2, aggressive=0.1). */
514
+ min_profit_margin?: number | null;
515
+ }
516
+ export interface SimulationResult {
517
+ job_id: string;
518
+ status: string;
519
+ initial_amount: number;
520
+ horizon_months: number;
521
+ strategy: string;
522
+ final_p10_usd: number;
523
+ final_p50_usd: number;
524
+ final_p90_usd: number;
525
+ portfolio_value_curve: PortfolioValueCurve;
526
+ cost_breakdown: CostBreakdown;
527
+ /** Annualized return on the P50 path (e.g. 0.087 = 8.7%). */
528
+ annualized_return_p50: number;
529
+ scenarios_run: number;
530
+ created_at: string;
531
+ completed_at: string;
532
+ /** Per-period snapshots (P10/P50/P90, APY, costs, active vaults). Included in poll responses. */
533
+ periods?: PeriodSnapshot[] | null;
534
+ }
535
+ export interface SimulationTimelineResponse {
536
+ job_id: string;
537
+ periods: PeriodSnapshot[];
538
+ checked_at: string;
539
+ }
540
+ export interface SwapRequired {
541
+ from_chain: number;
542
+ from_token: string;
543
+ to_chain: number;
544
+ to_token: string;
545
+ amount: string;
546
+ }
547
+ export interface ValidateRequest {
548
+ vault_address: string;
549
+ /** Chain name (e.g. 'base'). */
550
+ chain?: string | null;
551
+ /** Deposit token symbol (e.g. 'usdc'). */
552
+ token?: string | null;
553
+ /** Intended position size in USD. Used to check TVL concentration. */
554
+ value_usd?: number | null;
555
+ }
556
+ export interface ValidateResponse {
557
+ /** Whether the proposed position passes Sonar validation. */
558
+ valid: boolean;
559
+ /** Vault contract address that was validated. */
560
+ vault_address: string;
561
+ /** Resolved chain for the validation result. */
562
+ chain?: string | null;
563
+ /** Resolved deposit token for the validation result. */
564
+ token?: string | null;
565
+ /** Operational Sonar recommendation: safe_to_enter, blocked, or caution. */
566
+ recommendation: string;
567
+ /** Hard risk flags that directly affect the recommendation. */
568
+ risk_flags?: string[];
569
+ /** Non-blocking warnings relevant to institutional review. */
570
+ warnings?: string[];
571
+ /** UTC timestamp when the validation decision was produced. */
572
+ checked_at: string;
573
+ }
574
+ export interface VaultReasoning {
575
+ /** Vault contract address evaluated during the explain run. */
576
+ vault_address: string;
577
+ /** Chain where the evaluated vault is deployed. */
578
+ chain: string;
579
+ /** Primary deposit token symbol for the evaluated vault. */
580
+ token: string;
581
+ /** APY observed for the vault during the explain run. */
582
+ apy: number;
583
+ /** Rank of the vault within the evaluated opportunity universe. */
584
+ apy_rank: number;
585
+ /** Assigned portfolio weight when selected, otherwise zero. */
586
+ weight: number;
587
+ /** Assigned USD notional when selected, otherwise zero. */
588
+ value_usd: number;
589
+ /** Whether Engine selected the vault in the proposed allocation. */
590
+ selected: boolean;
591
+ /** Whether Sonar flagged the vault during evaluation. */
592
+ risk_flagged: boolean;
593
+ /** Per-detector Sonar audit trail for the vault. */
594
+ sonar_clearance: DetectorClearance[];
595
+ /** Explicit reasons why the vault was selected or rejected. */
596
+ selection_reasons: string[];
597
+ }
598
+ export interface VaultRiskResponse {
599
+ /** Normalized vault contract address. */
600
+ vault_address: string;
601
+ /** Human-readable vault name when available. */
602
+ name?: string | null;
603
+ /** Chain where the vault is deployed. */
604
+ chain?: string | null;
605
+ /** Primary deposit token symbol for the vault. */
606
+ token?: string | null;
607
+ /** Whether Sonar currently blocks this vault for institutional use. */
608
+ is_disabled: boolean;
609
+ /** Detailed Sonar disable reasons for the vault. */
610
+ disable_sources?: DisableSource[];
611
+ /** Tokens on the vault's path currently affected by active risk events. */
612
+ affected_tokens?: string[];
613
+ /** Latest Sonar risk score context for the vault. */
614
+ risk_score?: RiskScore | null;
615
+ /** Collateral dependency structure used for risk interpretation. */
616
+ collateral_tree?: CollateralTree | null;
617
+ /** UTC timestamp of the latest Sonar pipeline run. */
618
+ last_pipeline_run?: string | null;
619
+ }
620
+ export interface VaultScreenResult {
621
+ /** Normalized vault contract address that was screened. */
622
+ vault_address: string;
623
+ /** Human-readable vault name when available. */
624
+ name?: string | null;
625
+ /** Chain where the screened vault is deployed. */
626
+ chain?: string | null;
627
+ /** Primary deposit token symbol for the vault. */
628
+ token?: string | null;
629
+ /** Institutional Sonar decision tier: blocked, caution, or clear. */
630
+ risk_tier: string;
631
+ /** Sonar detectors currently active for this vault. */
632
+ active_detectors: string[];
633
+ /** Detailed disable sources behind the decision. */
634
+ disable_sources?: DisableSource[];
635
+ /** Optional Sonar risk score context for the screened vault. */
636
+ risk_score?: RiskScore | null;
637
+ }
638
+ export interface YieldOpportunity {
639
+ /** Vault contract address. */
640
+ vault_address: string;
641
+ /** Chain where the opportunity is deployed. */
642
+ chain: string;
643
+ /** Primary deposit token symbol. */
644
+ token: string;
645
+ /** Underlying protocol or venue name when available. */
646
+ protocol?: string | null;
647
+ /** Current total APY used by Engine for ranking. */
648
+ apy: number;
649
+ /** Base APY component. */
650
+ apy_base?: number | null;
651
+ /** Reward-token APY component. */
652
+ apy_reward?: number | null;
653
+ /** Current total value locked in USD when available. */
654
+ tvl_usd?: number | null;
655
+ /** Whether Sonar currently flags the vault. */
656
+ risk_flagged: boolean;
657
+ /** UTC timestamp of the latest APY refresh. */
658
+ last_updated?: string | null;
659
+ }
660
+ export interface YieldSourceItem {
661
+ /** Yield source contract address. */
662
+ vault_address: string;
663
+ /** Chain where the yield source is deployed. */
664
+ chain: string;
665
+ /** Protocol and strategy name. */
666
+ name: string;
667
+ /** Primary deposit token symbol. */
668
+ token: string;
669
+ }
670
+ export interface YieldSourcesResponse {
671
+ /** Number of yield sources returned. */
672
+ count: number;
673
+ /** Chain filter applied, if any. */
674
+ chain?: string | null;
675
+ /** Token filter applied, if any. */
676
+ token?: string | null;
677
+ /** Available yield sources monitored by Sonar. */
678
+ sources: YieldSourceItem[];
679
+ /** UTC timestamp when the response was generated. */
680
+ checked_at: string;
681
+ }
682
+ export interface _NonceReq {
683
+ address: string;
684
+ }
685
+ export interface _VerifyReq {
686
+ message: string;
687
+ signature: string;
688
+ }
689
+ export interface PortfolioCheckRequest {
690
+ }
691
+ export interface SailIntelligenceOptions {
692
+ /** API key — passed as `X-API-Key` header. */
693
+ apiKey: string;
694
+ /** Override the base URL (for testing / staging). */
695
+ baseUrl?: string;
696
+ }
697
+ export declare class SailIntelligence {
698
+ private readonly _base;
699
+ private readonly _headers;
700
+ constructor(opts: SailIntelligenceOptions);
701
+ private _get;
702
+ private _post;
703
+ /**
704
+ * All available yield sources
705
+ * Returns all yield sources monitored by Sail Intelligence Sonar. Filter by chain or token to narrow the result set.
706
+ */
707
+ vaultSources(query?: {
708
+ chain?: string;
709
+ token?: string;
710
+ }): Promise<YieldSourcesResponse>;
711
+ /**
712
+ * Single yield source risk intelligence
713
+ * Returns Sail Intelligence Sonar risk intelligence for a single yield source. Includes active disable flags, affected tokens, risk score context, and the collateral dependency tree used for institutional review workflows.
714
+ */
715
+ vault(vaultAddress: string): Promise<VaultRiskResponse>;
716
+ /**
717
+ * Quick yield source safety decision
718
+ * Returns a single operational answer for institutional workflows: is this yield source currently safe to interact with. Checks both the source-level kill switch and deposit-token depeg status. For full Sonar context use GET /v1/vault/{address}.
719
+ */
720
+ vaultSafe(vaultAddress: string, query?: {
721
+ chain?: string;
722
+ token?: string;
723
+ }): Promise<SafeCheckResponse>;
724
+ /**
725
+ * Portfolio risk check
726
+ * Given a list of institutional positions (vault address plus optional chain/token), returns which are currently affected by active Sonar risk signals (vault disabled or deposit token depegged). Maximum 500 positions per request.
727
+ */
728
+ portfolioCheck(body: PortfolioCheckRequest): Promise<PortfolioCheckResponse>;
729
+ /**
730
+ * Sonar global risk snapshot
731
+ * Returns a full Sonar monitoring snapshot of all currently active risk flags: disabled vault addresses (with source breakdown and cooldown state), depegged tokens per chain, per-vault risk scores, and the timestamp of the last institutional monitoring pipeline run.
732
+ */
733
+ risksSummary(): Promise<RisksSummaryResponse>;
734
+ /**
735
+ * Institutional yield opportunities
736
+ * Returns the top available institutional yield opportunities for a given market, pre-filtered by Sonar risk signals. Disabled yield sources and depegged tokens are excluded by default. Results are sorted by APY descending.
737
+ */
738
+ engineOpportunities(query?: {
739
+ market?: string;
740
+ chain?: string;
741
+ limit?: string;
742
+ include_disabled?: string;
743
+ }): Promise<OpportunitiesResponse>;
744
+ /**
745
+ * Institutional market APY benchmark
746
+ * Returns APY statistics for all Sonar-clean vaults in a given market. Useful for benchmarking institutional portfolios against the currently available Sonar-cleared yield universe.
747
+ */
748
+ engineBenchmark(query?: {
749
+ market?: string;
750
+ chain?: string;
751
+ }): Promise<BenchmarkResponse>;
752
+ /**
753
+ * Institutional allocation recommendation
754
+ * Returns a recommended allocation across top-APY yield sources for a given portfolio value. Applies Sonar risk filters so disabled yield sources and depegged tokens are excluded. Uses equal-weight greedy allocation (top N by APY). For deeper execution-layer optimisation, use the institutional execution stack directly.
755
+ */
756
+ engineAllocate(body: AllocationRequest): Promise<AllocationResponse>;
757
+ /**
758
+ * Institutional rebalancing recommendation
759
+ * Given current institutional yield source positions, computes a rebalancing plan: which positions to exit (risk-flagged, depegged, or suboptimal APY), which to keep, and which new positions to enter. Returns current versus optimal APY and the improvement delta.
760
+ */
761
+ engineRebalance(body: RebalanceRequest): Promise<RebalanceResponse>;
762
+ /**
763
+ * Allocation audit trail
764
+ * Returns the recommended allocation alongside a full audit trail: APY rank of each vault considered, per-detector Sonar clearance status, and explicit reasons why each vault was selected or rejected. Designed for compliance review and institutional due diligence.
765
+ */
766
+ engineExplain(body: ExplainRequest): Promise<ExplainResponse>;
767
+ /**
768
+ * Institutional portfolio comparison
769
+ * Compares a current institutional portfolio against a proposed portfolio side by side. Returns APY delta, Sonar risk delta, which positions were exited or entered, and an overall assessment (improvement / degradation / neutral).
770
+ */
771
+ engineCompare(body: CompareRequest): Promise<CompareResponse>;
772
+ /**
773
+ * Institutional portfolio optimization
774
+ * Accepts a current portfolio keyed by chain_id and returns an APY-optimized allocation across authorized vaults. Applies Sonar risk filters and the client's vault allowlist. Mirrors the contract of the fungi-core institutional_endpoint script.
775
+ */
776
+ engineInstitutional(body: InstitutionalRequest): Promise<InstitutionalResponse>;
777
+ /**
778
+ * Allocation with execution-ready calldata
779
+ * Runs the institutional optimisation **and** returns the on-chain transaction batch (withdraws → approvals → deposits) needed to reach the target portfolio. Calldata is rendered from the live vault catalog — no per-protocol code paths. Designed for partners running automated DeFi treasury workflows (Ampli, etc.).
780
+ */
781
+ engineExecute(body: ExecuteRequest): Promise<ExecuteResponse>;
782
+ /**
783
+ * Live protocol catalog (APY + TVL) for a chain × token
784
+ * Returns every active vault we monitor for this chain + token with its current APY, TVL, and (when available) numeric risk score. Shaped to match the discovery feed in Ampli §5.3 — partners can consume it directly without an adapter.
785
+ */
786
+ engineProtocols(chainId: string, tokenAddress: string): Promise<unknown>;
787
+ /**
788
+ * Yield opportunities (custom risk)
789
+ * All available institutional yield sources for a given market sorted by APY. No Sonar risk filtering is applied, so all vaults are included regardless of risk status. Sonar signals are not exposed; clients apply their own risk logic.
790
+ */
791
+ engineRawOpportunities(query?: {
792
+ market?: string;
793
+ chain?: string;
794
+ limit?: string;
795
+ }): Promise<RawOpportunitiesResponse>;
796
+ /**
797
+ * Market APY benchmark (custom risk)
798
+ * APY statistics across all vaults in a market, including Sonar-flagged ones. Useful for institutional teams that want the full yield landscape without Sonar filtering.
799
+ */
800
+ engineRawBenchmark(query?: {
801
+ market?: string;
802
+ chain?: string;
803
+ }): Promise<BenchmarkResponse>;
804
+ /**
805
+ * Allocation recommendation (custom risk)
806
+ * Recommended allocation across top-APY vaults with no Sonar risk filtering. Allocates purely by APY. Clients apply their own institutional risk layer.
807
+ */
808
+ engineRawAllocate(body: AllocationRequest): Promise<AllocationResponse>;
809
+ /**
810
+ * Rebalancing recommendation (custom risk)
811
+ * Rebalancing recommendation with no Sonar risk filtering. Exit reasons are APY-based only — no risk_flagged or token_depegged exits.
812
+ */
813
+ engineRawRebalance(body: RebalanceRequest): Promise<RebalanceResponse>;
814
+ /**
815
+ * Portfolio comparison (custom risk)
816
+ * Side-by-side institutional portfolio comparison with no Sonar risk filtering. Assessment is based purely on APY delta. Sonar risk delta fields are not returned.
817
+ */
818
+ engineRawCompare(body: CompareRequest): Promise<RawCompareResponse>;
819
+ /**
820
+ * Institutional Sonar screening
821
+ * Screen up to 200 vault addresses in a single call. Returns a per-vault risk tier (blocked / caution / clear), the active Sonar detectors that flagged each vault, and a full disable-source breakdown. Designed for due diligence workflows and compliance audit trails.
822
+ */
823
+ sonarScreen(body: ScreenRequest): Promise<ScreenResponse>;
824
+ /**
825
+ * Institutional pre-trade validation
826
+ * Validates a proposed institutional vault position before execution. Checks the vault kill-switch, deposit token depeg status, and optionally TVL concentration if a position size is provided. Returns an operational recommendation: safe_to_enter, caution, or blocked.
827
+ */
828
+ sonarValidate(body: ValidateRequest): Promise<ValidateResponse>;
829
+ /**
830
+ * TCN model info
831
+ * Returns metadata about the currently loaded APY predictor: whether it is a trained neural model or the heuristic fallback, training timestamp, vault count, and validation loss.
832
+ */
833
+ simulationModelInfo(): Promise<unknown>;
834
+ /**
835
+ * Available chain/token combinations
836
+ * Returns live chain→token mapping derived from vault data in apy_data.
837
+ */
838
+ simulationChains(): Promise<unknown>;
839
+ /**
840
+ * Create portfolio simulation
841
+ * Queues a simulation of portfolio performance over the specified horizon. Uses TCN-predicted APY distributions and models gas, slippage, and bridge costs at every rebalancing event. Poll the returned `poll_url` for results.
842
+ */
843
+ simulation(body: SimulationRequest): Promise<unknown>;
844
+ /**
845
+ * List simulations
846
+ * Returns recent simulation jobs for the authenticated client, newest first.
847
+ */
848
+ simulations(query?: {
849
+ limit?: string;
850
+ }): Promise<[]>;
851
+ /**
852
+ * Poll simulation result
853
+ * Returns the current status of a simulation job. When `status` is `complete`, the `result` field contains the full P10/P50/P90 portfolio value curves and cost breakdown. Typical completion time: 5–15 seconds.
854
+ */
855
+ getSimulation(jobId: string): Promise<SimulationPollResponse>;
856
+ /**
857
+ * Delete simulation
858
+ * Permanently deletes a simulation job and its results.
859
+ */
860
+ deleteSimulation(jobId: string): Promise<unknown>;
861
+ /**
862
+ * Period-by-period simulation breakdown
863
+ * Returns a snapshot for every rebalancing period: P10/P50/P90 values, APY applied, costs incurred, and active vaults.
864
+ */
865
+ simulationTimeline(jobId: string): Promise<SimulationTimelineResponse>;
866
+ /**
867
+ * Get Pricing
868
+ * Public pricing manifest — backs `/pricing` UI + `/docs` price badges.
869
+ */
870
+ pricing(): Promise<unknown>;
871
+ /**
872
+ * Get Pricing Quote
873
+ * Pre-flight price + accepts entries — lets clients dry-run x402 flows.
874
+ */
875
+ pricingQuote(query?: {
876
+ route?: string;
877
+ horizon_months?: string;
878
+ positions?: string;
879
+ addresses?: string;
880
+ }): Promise<unknown>;
881
+ /**
882
+ * Siwe Nonce
883
+ */
884
+ billingSiweNonce(body: _NonceReq): Promise<unknown>;
885
+ /**
886
+ * Siwe Verify
887
+ */
888
+ billingSiweVerify(body: _VerifyReq): Promise<unknown>;
889
+ /**
890
+ * Logout
891
+ */
892
+ billingLogout(): Promise<unknown>;
893
+ /**
894
+ * Billing Me
895
+ */
896
+ billingMe(): Promise<unknown>;
897
+ /**
898
+ * Billing Keys
899
+ */
900
+ billingKeys(): Promise<unknown>;
901
+ /**
902
+ * Billing Payments
903
+ */
904
+ billingPayments(query?: {
905
+ from?: string;
906
+ to?: string;
907
+ limit?: string;
908
+ offset?: string;
909
+ }): Promise<unknown>;
910
+ /**
911
+ * Facilitator Verify
912
+ */
913
+ facilitatorVerify(): Promise<unknown>;
914
+ /**
915
+ * Facilitator Settle
916
+ */
917
+ facilitatorSettle(): Promise<unknown>;
918
+ /**
919
+ * Facilitator Supported
920
+ */
921
+ facilitatorSupported(): Promise<unknown>;
922
+ }
923
+ //# sourceMappingURL=intelligence.d.ts.map