@oakagentkit/core 0.1.2 → 0.1.9

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 (576) hide show
  1. package/build/dist/api/addresses.d.ts +0 -1219
  2. package/build/dist/api/addresses.js +1 -1
  3. package/build/dist/api/amounts.d.ts +0 -1
  4. package/build/dist/api/amounts.js +1 -1
  5. package/build/dist/api/args.js +1 -1
  6. package/build/dist/api/canonical.d.ts +0 -1
  7. package/build/dist/api/canonical.js +1 -1
  8. package/build/dist/api/chain.d.ts +2 -0
  9. package/build/dist/api/chain.js +1 -1
  10. package/build/dist/api/errors.js +1 -1
  11. package/build/dist/api/gas.js +1 -1
  12. package/build/dist/api/grandfather.js +1 -1
  13. package/build/dist/api/guards.d.ts +23 -0
  14. package/build/dist/api/guards.js +1 -0
  15. package/build/dist/api/history.js +1 -1
  16. package/build/dist/api/http.js +1 -1
  17. package/build/dist/api/identity-link.js +1 -1
  18. package/build/dist/api/launch.d.ts +1 -0
  19. package/build/dist/api/launch.js +1 -1
  20. package/build/dist/api/merkle.js +1 -1
  21. package/build/dist/api/metadata.js +1 -1
  22. package/build/dist/api/module.js +1 -1
  23. package/build/dist/api/modules/beefy/boosts.d.ts +132 -0
  24. package/build/dist/api/modules/beefy/boosts.js +1 -0
  25. package/build/dist/api/modules/beefy/clm.d.ts +282 -0
  26. package/build/dist/api/modules/beefy/clm.js +1 -0
  27. package/build/dist/api/modules/beefy/guard.d.ts +5 -0
  28. package/build/dist/api/modules/beefy/guard.js +1 -0
  29. package/build/dist/api/modules/beefy/index.js +1 -1
  30. package/build/dist/api/modules/beefy/liquidity.d.ts +237 -0
  31. package/build/dist/api/modules/beefy/liquidity.js +1 -0
  32. package/build/dist/api/modules/beefy/management.d.ts +100 -0
  33. package/build/dist/api/modules/beefy/management.js +1 -0
  34. package/build/dist/api/modules/beefy/vaults.d.ts +14 -0
  35. package/build/dist/api/modules/beefy/vaults.js +1 -0
  36. package/build/dist/api/modules/clanker/extensions.d.ts +62 -0
  37. package/build/dist/api/modules/clanker/extensions.js +1 -0
  38. package/build/dist/api/modules/clanker/index.js +1 -1
  39. package/build/dist/api/modules/clanker/manage.d.ts +2 -0
  40. package/build/dist/api/modules/clanker/manage.js +1 -0
  41. package/build/dist/api/modules/clanker/pool-config.d.ts +96 -0
  42. package/build/dist/api/modules/clanker/pool-config.js +1 -0
  43. package/build/dist/api/modules/clanker/protocol.d.ts +2 -0
  44. package/build/dist/api/modules/clanker/protocol.js +1 -0
  45. package/build/dist/api/modules/clanker/state.d.ts +246 -0
  46. package/build/dist/api/modules/clanker/state.js +1 -0
  47. package/build/dist/api/modules/erc8004/abi.d.ts +808 -0
  48. package/build/dist/api/modules/erc8004/abi.js +1 -0
  49. package/build/dist/api/modules/erc8004/common.d.ts +69 -0
  50. package/build/dist/api/modules/erc8004/common.js +1 -0
  51. package/build/dist/api/modules/erc8004/domain.d.ts +3 -0
  52. package/build/dist/api/modules/erc8004/domain.js +1 -0
  53. package/build/dist/api/modules/erc8004/index.d.ts +3 -171
  54. package/build/dist/api/modules/erc8004/index.js +1 -1
  55. package/build/dist/api/modules/erc8004/management.d.ts +4 -0
  56. package/build/dist/api/modules/erc8004/management.js +1 -0
  57. package/build/dist/api/modules/erc8004/reputation.d.ts +3 -0
  58. package/build/dist/api/modules/erc8004/reputation.js +1 -0
  59. package/build/dist/api/modules/erc8004/services.d.ts +2 -0
  60. package/build/dist/api/modules/erc8004/services.js +1 -0
  61. package/build/dist/api/modules/erc8004/validation.d.ts +2 -0
  62. package/build/dist/api/modules/erc8004/validation.js +1 -0
  63. package/build/dist/api/modules/grove/index.js +1 -1
  64. package/build/dist/api/modules/heyresearch/freshness.d.ts +12 -0
  65. package/build/dist/api/modules/heyresearch/freshness.js +1 -0
  66. package/build/dist/api/modules/heyresearch/index.js +1 -1
  67. package/build/dist/api/modules/heyresearch/public-reads.d.ts +5 -0
  68. package/build/dist/api/modules/heyresearch/public-reads.js +1 -0
  69. package/build/dist/api/modules/hoodag/chain-reads.d.ts +33 -0
  70. package/build/dist/api/modules/hoodag/chain-reads.js +1 -0
  71. package/build/dist/api/modules/hoodag/index.d.ts +9 -1
  72. package/build/dist/api/modules/hoodag/index.js +1 -1
  73. package/build/dist/api/modules/hoodag/management.d.ts +2 -0
  74. package/build/dist/api/modules/hoodag/management.js +1 -0
  75. package/build/dist/api/modules/hoodag/public-reads.d.ts +2 -0
  76. package/build/dist/api/modules/hoodag/public-reads.js +1 -0
  77. package/build/dist/api/modules/hoodag/reconstruct.d.ts +14 -0
  78. package/build/dist/api/modules/hoodag/reconstruct.js +1 -0
  79. package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
  80. package/build/dist/api/modules/hoodlock/buyback.d.ts +28 -0
  81. package/build/dist/api/modules/hoodlock/buyback.js +1 -0
  82. package/build/dist/api/modules/hoodlock/commerce.d.ts +24 -0
  83. package/build/dist/api/modules/hoodlock/commerce.js +1 -0
  84. package/build/dist/api/modules/hoodlock/fee.d.ts +15 -0
  85. package/build/dist/api/modules/hoodlock/fee.js +1 -0
  86. package/build/dist/api/modules/hoodlock/guard.d.ts +5 -0
  87. package/build/dist/api/modules/hoodlock/guard.js +1 -0
  88. package/build/dist/api/modules/hoodlock/index.d.ts +4 -0
  89. package/build/dist/api/modules/hoodlock/index.js +1 -1
  90. package/build/dist/api/modules/hoodlock/lifecycle.d.ts +285 -0
  91. package/build/dist/api/modules/hoodlock/lifecycle.js +1 -0
  92. package/build/dist/api/modules/hoodlock/locks-burn.d.ts +3 -3
  93. package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
  94. package/build/dist/api/modules/hoodlock/public.d.ts +3 -0
  95. package/build/dist/api/modules/hoodlock/public.js +1 -0
  96. package/build/dist/api/modules/hookr/actions.d.ts +4 -0
  97. package/build/dist/api/modules/hookr/actions.js +1 -0
  98. package/build/dist/api/modules/hookr/addons.d.ts +4 -0
  99. package/build/dist/api/modules/hookr/addons.js +1 -0
  100. package/build/dist/api/modules/hookr/contracts.d.ts +30 -0
  101. package/build/dist/api/modules/hookr/contracts.js +1 -0
  102. package/build/dist/api/modules/hookr/create-cancel.d.ts +10 -73
  103. package/build/dist/api/modules/hookr/create-cancel.js +1 -1
  104. package/build/dist/api/modules/hookr/discovery.d.ts +3 -0
  105. package/build/dist/api/modules/hookr/discovery.js +1 -0
  106. package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
  107. package/build/dist/api/modules/hookr/index.d.ts +0 -3
  108. package/build/dist/api/modules/hookr/index.js +1 -1
  109. package/build/dist/api/modules/hookr/public-reads.d.ts +4 -0
  110. package/build/dist/api/modules/hookr/public-reads.js +1 -0
  111. package/build/dist/api/modules/hookr/relay.d.ts +304 -0
  112. package/build/dist/api/modules/hookr/relay.js +1 -0
  113. package/build/dist/api/modules/hookr/revenue.d.ts +5 -0
  114. package/build/dist/api/modules/hookr/revenue.js +1 -0
  115. package/build/dist/api/modules/kyberswap/index.d.ts +18 -2
  116. package/build/dist/api/modules/kyberswap/index.js +1 -1
  117. package/build/dist/api/modules/kyberswap/source-pools.d.ts +9 -0
  118. package/build/dist/api/modules/kyberswap/source-pools.js +1 -0
  119. package/build/dist/api/modules/lighter/index.js +1 -1
  120. package/build/dist/api/modules/longbow/administration.d.ts +119 -0
  121. package/build/dist/api/modules/longbow/administration.js +1 -0
  122. package/build/dist/api/modules/longbow/analytics.d.ts +272 -0
  123. package/build/dist/api/modules/longbow/analytics.js +1 -0
  124. package/build/dist/api/modules/longbow/fixed.d.ts +126 -0
  125. package/build/dist/api/modules/longbow/fixed.js +1 -0
  126. package/build/dist/api/modules/longbow/index.d.ts +16 -0
  127. package/build/dist/api/modules/longbow/index.js +1 -1
  128. package/build/dist/api/modules/longbow/nft.d.ts +236 -0
  129. package/build/dist/api/modules/longbow/nft.js +1 -0
  130. package/build/dist/api/modules/longbow/rebates.d.ts +152 -0
  131. package/build/dist/api/modules/longbow/rebates.js +1 -0
  132. package/build/dist/api/modules/longbow/staking.d.ts +4 -0
  133. package/build/dist/api/modules/longbow/staking.js +1 -0
  134. package/build/dist/api/modules/meridian/index.js +1 -1
  135. package/build/dist/api/modules/meridian/markets.js +1 -1
  136. package/build/dist/api/modules/meridian/perps-batch.d.ts +4 -0
  137. package/build/dist/api/modules/meridian/perps-batch.js +1 -0
  138. package/build/dist/api/modules/meridian/perps-common.d.ts +56 -0
  139. package/build/dist/api/modules/meridian/perps-common.js +1 -0
  140. package/build/dist/api/modules/meridian/perps-guards.d.ts +3 -0
  141. package/build/dist/api/modules/meridian/perps-guards.js +1 -0
  142. package/build/dist/api/modules/meridian/perps-intents.d.ts +18 -0
  143. package/build/dist/api/modules/meridian/perps-intents.js +1 -0
  144. package/build/dist/api/modules/meridian/perps-stream.d.ts +3 -0
  145. package/build/dist/api/modules/meridian/perps-stream.js +1 -0
  146. package/build/dist/api/modules/meridian/perps.d.ts +3 -0
  147. package/build/dist/api/modules/meridian/perps.js +1 -0
  148. package/build/dist/api/modules/meridian/predict-read.d.ts +2 -0
  149. package/build/dist/api/modules/meridian/predict-read.js +1 -0
  150. package/build/dist/api/modules/meridian/rfq.d.ts +29 -0
  151. package/build/dist/api/modules/meridian/rfq.js +1 -1
  152. package/build/dist/api/modules/merkl/discovery.d.ts +2 -0
  153. package/build/dist/api/modules/merkl/discovery.js +1 -0
  154. package/build/dist/api/modules/merkl/index.d.ts +10 -1
  155. package/build/dist/api/modules/merkl/index.js +1 -1
  156. package/build/dist/api/modules/merkl/manage.d.ts +2 -0
  157. package/build/dist/api/modules/merkl/manage.js +1 -0
  158. package/build/dist/api/modules/merkl/protocol.d.ts +2 -0
  159. package/build/dist/api/modules/merkl/protocol.js +1 -0
  160. package/build/dist/api/modules/morpho/allocator.d.ts +308 -0
  161. package/build/dist/api/modules/morpho/allocator.js +1 -0
  162. package/build/dist/api/modules/morpho/bundles-abi.d.ts +705 -0
  163. package/build/dist/api/modules/morpho/bundles-abi.js +1 -0
  164. package/build/dist/api/modules/morpho/bundles.d.ts +3 -0
  165. package/build/dist/api/modules/morpho/bundles.js +1 -0
  166. package/build/dist/api/modules/morpho/in-kind.d.ts +85 -0
  167. package/build/dist/api/modules/morpho/in-kind.js +1 -0
  168. package/build/dist/api/modules/morpho/index.d.ts +10 -2
  169. package/build/dist/api/modules/morpho/index.js +1 -12
  170. package/build/dist/api/modules/morpho/local-guard.d.ts +26 -0
  171. package/build/dist/api/modules/morpho/local-guard.js +1 -0
  172. package/build/dist/api/modules/morpho/midnight-abi.d.ts +1690 -0
  173. package/build/dist/api/modules/morpho/midnight-abi.js +1 -0
  174. package/build/dist/api/modules/morpho/midnight.d.ts +179 -0
  175. package/build/dist/api/modules/morpho/midnight.js +1 -0
  176. package/build/dist/api/modules/morpho/protocol.d.ts +290 -0
  177. package/build/dist/api/modules/morpho/protocol.js +1 -0
  178. package/build/dist/api/modules/morpho/surface.d.ts +4 -0
  179. package/build/dist/api/modules/morpho/surface.js +1 -0
  180. package/build/dist/api/modules/morpho/vault-management.d.ts +10 -0
  181. package/build/dist/api/modules/morpho/vault-management.js +1 -0
  182. package/build/dist/api/modules/morpho/vault-tools.d.ts +6 -0
  183. package/build/dist/api/modules/morpho/vault-tools.js +1 -0
  184. package/build/dist/api/modules/morpho/vault-v2.d.ts +190 -0
  185. package/build/dist/api/modules/morpho/vault-v2.js +1 -0
  186. package/build/dist/api/modules/netnet/blackjack-hashes.d.ts +89 -0
  187. package/build/dist/api/modules/netnet/blackjack-hashes.js +1 -0
  188. package/build/dist/api/modules/netnet/card-abi.d.ts +3758 -0
  189. package/build/dist/api/modules/netnet/card-abi.js +1 -0
  190. package/build/dist/api/modules/netnet/card-plan.d.ts +43 -0
  191. package/build/dist/api/modules/netnet/card-plan.js +1 -0
  192. package/build/dist/api/modules/netnet/card-policy.d.ts +10 -0
  193. package/build/dist/api/modules/netnet/card-policy.js +1 -0
  194. package/build/dist/api/modules/netnet/card-read.d.ts +2 -0
  195. package/build/dist/api/modules/netnet/card-read.js +1 -0
  196. package/build/dist/api/modules/netnet/card-recovery.d.ts +2 -0
  197. package/build/dist/api/modules/netnet/card-recovery.js +1 -0
  198. package/build/dist/api/modules/netnet/desk-action-abi.d.ts +2 -0
  199. package/build/dist/api/modules/netnet/desk-action-abi.js +1 -0
  200. package/build/dist/api/modules/netnet/desk-action.d.ts +3 -0
  201. package/build/dist/api/modules/netnet/desk-action.js +1 -0
  202. package/build/dist/api/modules/netnet/desk-read.d.ts +5 -0
  203. package/build/dist/api/modules/netnet/desk-read.js +1 -0
  204. package/build/dist/api/modules/netnet/desk-registry.d.ts +5 -0
  205. package/build/dist/api/modules/netnet/desk-registry.js +1 -0
  206. package/build/dist/api/modules/netnet/financial-abi.d.ts +1764 -0
  207. package/build/dist/api/modules/netnet/financial-abi.js +1 -0
  208. package/build/dist/api/modules/netnet/financial.d.ts +13 -0
  209. package/build/dist/api/modules/netnet/financial.js +1 -0
  210. package/build/dist/api/modules/netnet/index.d.ts +1 -0
  211. package/build/dist/api/modules/netnet/index.js +1 -1
  212. package/build/dist/api/modules/netnet/staking.d.ts +8 -0
  213. package/build/dist/api/modules/netnet/staking.js +1 -0
  214. package/build/dist/api/modules/orbio/gateway.d.ts +24 -0
  215. package/build/dist/api/modules/orbio/gateway.js +1 -0
  216. package/build/dist/api/modules/orbio/index.d.ts +3 -1
  217. package/build/dist/api/modules/orbio/index.js +1 -1
  218. package/build/dist/api/modules/orbio/pins.d.ts +457 -0
  219. package/build/dist/api/modules/orbio/pins.js +1 -0
  220. package/build/dist/api/modules/pons/claim.d.ts +33 -1
  221. package/build/dist/api/modules/pons/claim.js +1 -1
  222. package/build/dist/api/modules/pons/holder-directory.d.ts +35 -0
  223. package/build/dist/api/modules/pons/holder-directory.js +1 -0
  224. package/build/dist/api/modules/pons/index.js +1 -1
  225. package/build/dist/api/modules/pons/launch-status.d.ts +151 -5
  226. package/build/dist/api/modules/pons/launch-status.js +1 -1
  227. package/build/dist/api/modules/pons/prices.js +1 -1
  228. package/build/dist/api/modules/pons/reads.d.ts +3 -0
  229. package/build/dist/api/modules/pons/reads.js +1 -0
  230. package/build/dist/api/modules/pons/swap-terms.d.ts +77 -0
  231. package/build/dist/api/modules/pons/swap-terms.js +1 -0
  232. package/build/dist/api/modules/pons/trade.d.ts +13 -2
  233. package/build/dist/api/modules/pons/trade.js +1 -1
  234. package/build/dist/api/modules/poolstrade/index.js +1 -1
  235. package/build/dist/api/modules/priors/coverage.d.ts +23 -0
  236. package/build/dist/api/modules/priors/coverage.js +1 -0
  237. package/build/dist/api/modules/priors/discovery.d.ts +4 -0
  238. package/build/dist/api/modules/priors/discovery.js +1 -0
  239. package/build/dist/api/modules/priors/features.d.ts +62 -0
  240. package/build/dist/api/modules/priors/features.js +1 -0
  241. package/build/dist/api/modules/priors/index.d.ts +9 -2
  242. package/build/dist/api/modules/priors/index.js +1 -1
  243. package/build/dist/api/modules/priors/integration.d.ts +6 -0
  244. package/build/dist/api/modules/priors/integration.js +1 -0
  245. package/build/dist/api/modules/priors/market.d.ts +10 -0
  246. package/build/dist/api/modules/priors/market.js +1 -0
  247. package/build/dist/api/modules/priors/pt.d.ts +421 -0
  248. package/build/dist/api/modules/priors/pt.js +1 -0
  249. package/build/dist/api/modules/priors/savings-exit.d.ts +85 -0
  250. package/build/dist/api/modules/priors/savings-exit.js +1 -0
  251. package/build/dist/api/modules/priors/starter-line.d.ts +495 -0
  252. package/build/dist/api/modules/priors/starter-line.js +1 -0
  253. package/build/dist/api/modules/priors/stock-swap.d.ts +101 -0
  254. package/build/dist/api/modules/priors/stock-swap.js +1 -0
  255. package/build/dist/api/modules/relay/api.d.ts +52 -0
  256. package/build/dist/api/modules/relay/api.js +1 -0
  257. package/build/dist/api/modules/relay/bootstrap.d.ts +2 -0
  258. package/build/dist/api/modules/relay/bootstrap.js +1 -0
  259. package/build/dist/api/modules/relay/discovery.d.ts +2 -0
  260. package/build/dist/api/modules/relay/discovery.js +1 -0
  261. package/build/dist/api/modules/relay/inbound.js +1 -1
  262. package/build/dist/api/modules/relay/index.d.ts +2 -0
  263. package/build/dist/api/modules/relay/index.js +1 -1
  264. package/build/dist/api/modules/relay/order.d.ts +2 -0
  265. package/build/dist/api/modules/relay/order.js +1 -0
  266. package/build/dist/api/modules/relay/outbound-status.js +1 -1
  267. package/build/dist/api/modules/relay/readiness.d.ts +5 -0
  268. package/build/dist/api/modules/relay/readiness.js +1 -0
  269. package/build/dist/api/modules/relay/reads.d.ts +3 -0
  270. package/build/dist/api/modules/relay/reads.js +1 -0
  271. package/build/dist/api/modules/relay/vaults.d.ts +24 -0
  272. package/build/dist/api/modules/relay/vaults.js +1 -0
  273. package/build/dist/api/modules/spark/actions.d.ts +2 -0
  274. package/build/dist/api/modules/spark/actions.js +1 -0
  275. package/build/dist/api/modules/spark/details.d.ts +3 -0
  276. package/build/dist/api/modules/spark/details.js +1 -0
  277. package/build/dist/api/modules/spark/index.js +1 -1
  278. package/build/dist/api/modules/spark/management.d.ts +7 -0
  279. package/build/dist/api/modules/spark/management.js +1 -0
  280. package/build/dist/api/modules/steakhouse/analytics.d.ts +2 -0
  281. package/build/dist/api/modules/steakhouse/analytics.js +1 -0
  282. package/build/dist/api/modules/steakhouse/erc4626.d.ts +2 -0
  283. package/build/dist/api/modules/steakhouse/erc4626.js +1 -0
  284. package/build/dist/api/modules/steakhouse/index.js +1 -1
  285. package/build/dist/api/modules/steakhouse/local-guard.d.ts +7 -0
  286. package/build/dist/api/modules/steakhouse/local-guard.js +1 -0
  287. package/build/dist/api/modules/steakhouse/management.d.ts +3 -0
  288. package/build/dist/api/modules/steakhouse/management.js +1 -0
  289. package/build/dist/api/modules/steakhouse/v2-exit.d.ts +19 -0
  290. package/build/dist/api/modules/steakhouse/v2-exit.js +1 -0
  291. package/build/dist/api/modules/tickerspring/basket-routes.d.ts +2 -0
  292. package/build/dist/api/modules/tickerspring/basket-routes.js +1 -0
  293. package/build/dist/api/modules/tickerspring/contract-reads.d.ts +2 -0
  294. package/build/dist/api/modules/tickerspring/contract-reads.js +1 -0
  295. package/build/dist/api/modules/tickerspring/discovery.d.ts +27 -0
  296. package/build/dist/api/modules/tickerspring/discovery.js +1 -0
  297. package/build/dist/api/modules/tickerspring/exit-preview.d.ts +14 -0
  298. package/build/dist/api/modules/tickerspring/exit-preview.js +1 -0
  299. package/build/dist/api/modules/tickerspring/guards.d.ts +7 -0
  300. package/build/dist/api/modules/tickerspring/guards.js +1 -0
  301. package/build/dist/api/modules/tickerspring/index.d.ts +80 -1
  302. package/build/dist/api/modules/tickerspring/index.js +1 -1
  303. package/build/dist/api/modules/tickerspring/journeys.d.ts +31 -0
  304. package/build/dist/api/modules/tickerspring/journeys.js +1 -0
  305. package/build/dist/api/modules/tickerspring/ladder.d.ts +8 -0
  306. package/build/dist/api/modules/tickerspring/ladder.js +1 -0
  307. package/build/dist/api/modules/tickerspring/maker.d.ts +8 -0
  308. package/build/dist/api/modules/tickerspring/maker.js +1 -0
  309. package/build/dist/api/modules/tickerspring/order-accounting.d.ts +4 -0
  310. package/build/dist/api/modules/tickerspring/order-accounting.js +1 -0
  311. package/build/dist/api/modules/tickerspring/research.d.ts +2 -0
  312. package/build/dist/api/modules/tickerspring/research.js +1 -0
  313. package/build/dist/api/modules/tickerspring/strategies.d.ts +17 -0
  314. package/build/dist/api/modules/tickerspring/strategies.js +1 -0
  315. package/build/dist/api/modules/uniswap/auction-create.d.ts +112 -0
  316. package/build/dist/api/modules/uniswap/auction-create.js +1 -0
  317. package/build/dist/api/modules/uniswap/auction.d.ts +212 -0
  318. package/build/dist/api/modules/uniswap/auction.js +1 -0
  319. package/build/dist/api/modules/uniswap/batch.d.ts +22 -0
  320. package/build/dist/api/modules/uniswap/batch.js +1 -0
  321. package/build/dist/api/modules/uniswap/common.d.ts +12 -0
  322. package/build/dist/api/modules/uniswap/common.js +1 -0
  323. package/build/dist/api/modules/uniswap/fees.d.ts +54 -0
  324. package/build/dist/api/modules/uniswap/fees.js +1 -0
  325. package/build/dist/api/modules/uniswap/index.d.ts +2 -1
  326. package/build/dist/api/modules/uniswap/index.js +1 -1
  327. package/build/dist/api/modules/uniswap/local-guard.d.ts +16 -0
  328. package/build/dist/api/modules/uniswap/local-guard.js +1 -0
  329. package/build/dist/api/modules/uniswap/oracle.d.ts +2 -0
  330. package/build/dist/api/modules/uniswap/oracle.js +1 -0
  331. package/build/dist/api/modules/uniswap/pool-math.d.ts +13 -0
  332. package/build/dist/api/modules/uniswap/pool-math.js +1 -0
  333. package/build/dist/api/modules/uniswap/pools.d.ts +30 -0
  334. package/build/dist/api/modules/uniswap/pools.js +1 -0
  335. package/build/dist/api/modules/uniswap/position.d.ts +69 -0
  336. package/build/dist/api/modules/uniswap/position.js +1 -0
  337. package/build/dist/api/modules/uniswap/protocol.d.ts +154 -0
  338. package/build/dist/api/modules/uniswap/protocol.js +1 -0
  339. package/build/dist/api/modules/uniswap/token-jar.d.ts +52 -0
  340. package/build/dist/api/modules/uniswap/token-jar.js +1 -0
  341. package/build/dist/api/modules/uniswap/trade-batch.d.ts +2 -0
  342. package/build/dist/api/modules/uniswap/trade-batch.js +1 -0
  343. package/build/dist/api/modules/uniswap/trade.d.ts +406 -0
  344. package/build/dist/api/modules/uniswap/trade.js +1 -0
  345. package/build/dist/api/modules/uniswap/v2.d.ts +180 -0
  346. package/build/dist/api/modules/uniswap/v2.js +1 -0
  347. package/build/dist/api/modules/uniswap/v3.d.ts +23 -2
  348. package/build/dist/api/modules/uniswap/v3.js +1 -1
  349. package/build/dist/api/modules/uniswap/v4.d.ts +17 -28
  350. package/build/dist/api/modules/uniswap/v4.js +1 -1
  351. package/build/dist/api/modules/uniswap/wrap.d.ts +17 -0
  352. package/build/dist/api/modules/uniswap/wrap.js +1 -0
  353. package/build/dist/api/modules/velora/claims.d.ts +86 -0
  354. package/build/dist/api/modules/velora/claims.js +1 -0
  355. package/build/dist/api/modules/velora/delta-reads.d.ts +2 -0
  356. package/build/dist/api/modules/velora/delta-reads.js +1 -0
  357. package/build/dist/api/modules/velora/index.js +1 -1
  358. package/build/dist/api/owner-signature.d.ts +29 -0
  359. package/build/dist/api/owner-signature.js +1 -0
  360. package/build/dist/api/positions.js +1 -1
  361. package/build/dist/api/pricenote.d.ts +0 -1
  362. package/build/dist/api/pricenote.js +1 -1
  363. package/build/dist/api/prices.js +1 -1
  364. package/build/dist/api/pricing.d.ts +1 -14
  365. package/build/dist/api/pricing.js +1 -1
  366. package/build/dist/api/routes.js +1 -1
  367. package/build/dist/api/rpc.d.ts +23 -0
  368. package/build/dist/api/rpc.js +1 -0
  369. package/build/dist/api/secret-fields.js +1 -1
  370. package/build/dist/api/send.js +1 -1
  371. package/build/dist/api/signing-registry.d.ts +19 -0
  372. package/build/dist/api/signing-registry.js +1 -0
  373. package/build/dist/api/signing.d.ts +162 -0
  374. package/build/dist/api/signing.js +1 -0
  375. package/build/dist/api/simulate.js +1 -1
  376. package/build/dist/api/swap.d.ts +61 -27
  377. package/build/dist/api/swap.js +1 -1
  378. package/build/dist/api/tokens.d.ts +5 -0
  379. package/build/dist/api/tokens.js +1 -1
  380. package/build/dist/api/tool-policy.d.ts +6 -0
  381. package/build/dist/api/tool-policy.js +1 -1
  382. package/build/dist/api/tx.js +1 -1
  383. package/build/dist/api/types.d.ts +2 -0
  384. package/build/dist/api/vendor-limits.js +1 -1
  385. package/build/dist/chunks/2EDXKJ3B.js +1 -0
  386. package/build/dist/chunks/2EGFALNH.js +1 -0
  387. package/build/dist/chunks/2LM5C7FQ.js +1 -0
  388. package/build/dist/chunks/2NA6JLEC.js +1 -0
  389. package/build/dist/chunks/2O6A6WEX.js +1 -0
  390. package/build/dist/chunks/37QNUNED.js +1 -0
  391. package/build/dist/chunks/3CCBUYUM.js +1 -0
  392. package/build/dist/chunks/3RFSGU2Y.js +1 -0
  393. package/build/dist/chunks/{B4FOHEBE.js → 3Z3U4YPA.js} +1 -1
  394. package/build/dist/chunks/4CDR7F4I.js +1 -0
  395. package/build/dist/chunks/4X6JEMSF.js +1 -0
  396. package/build/dist/chunks/53N7PNJH.js +1 -0
  397. package/build/dist/chunks/5EHQM6DM.js +1 -0
  398. package/build/dist/chunks/5H3MQWH7.js +18 -0
  399. package/build/dist/chunks/5XFXH2JT.js +1 -0
  400. package/build/dist/chunks/5YS5V2LK.js +1 -0
  401. package/build/dist/chunks/65QFM4JU.js +1 -0
  402. package/build/dist/chunks/67TJOOBI.js +1 -0
  403. package/build/dist/chunks/6HV5BR7P.js +1 -0
  404. package/build/dist/chunks/{A5ITAEUQ.js → 6IM6A5VA.js} +1 -1
  405. package/build/dist/chunks/6JCEJ66K.js +1 -0
  406. package/build/dist/chunks/6NR7SVRO.js +1 -0
  407. package/build/dist/chunks/6SB3FB3P.js +1 -0
  408. package/build/dist/chunks/6SCCW74G.js +1 -0
  409. package/build/dist/chunks/73N3TOJL.js +1 -0
  410. package/build/dist/chunks/74BPMUAG.js +1 -0
  411. package/build/dist/chunks/7B5UH2VS.js +1 -0
  412. package/build/dist/chunks/7LDAJ6BM.js +1 -0
  413. package/build/dist/chunks/7MR37STI.js +1 -0
  414. package/build/dist/chunks/7US6PD56.js +1 -0
  415. package/build/dist/chunks/7YU6DELJ.js +1 -0
  416. package/build/dist/chunks/AFHHRDPJ.js +1 -0
  417. package/build/dist/chunks/AIWZGIZ6.js +1 -0
  418. package/build/dist/chunks/{UCMNB2UP.js → AXYOJBX6.js} +1 -1
  419. package/build/dist/chunks/AYM5L6L7.js +1 -0
  420. package/build/dist/chunks/B72Q2EQ2.js +1 -0
  421. package/build/dist/chunks/B7V7AA5A.js +1 -0
  422. package/build/dist/chunks/BBQVTEYB.js +1 -0
  423. package/build/dist/chunks/BQLLTY4L.js +1 -0
  424. package/build/dist/chunks/BYXBS45D.js +1 -0
  425. package/build/dist/chunks/C2FEXLMA.js +1 -0
  426. package/build/dist/chunks/C3TJLARP.js +1 -0
  427. package/build/dist/chunks/C3ZZSGSP.js +1 -0
  428. package/build/dist/chunks/C5LR6F4B.js +1 -0
  429. package/build/dist/chunks/CAYBSVA6.js +1 -0
  430. package/build/dist/chunks/CBA776XQ.js +1 -0
  431. package/build/dist/chunks/CCEWSOBT.js +1 -0
  432. package/build/dist/chunks/CEQNXF6A.js +1 -0
  433. package/build/dist/chunks/CS55ERS3.js +1 -0
  434. package/build/dist/chunks/CXMC3T6B.js +1 -0
  435. package/build/dist/chunks/{6SYTB6FB.js → D3OWLDVB.js} +1 -1
  436. package/build/dist/chunks/DHXVYHT4.js +1 -0
  437. package/build/dist/chunks/E2IVNGLC.js +1 -0
  438. package/build/dist/chunks/E2Q5IA67.js +1 -0
  439. package/build/dist/chunks/{SJ7HDRI4.js → E7ASOYQI.js} +1 -1
  440. package/build/dist/chunks/EAEQOS7Y.js +1 -0
  441. package/build/dist/chunks/EC5W3UZD.js +1 -0
  442. package/build/dist/chunks/{B4MLWDPM.js → EG6M6SSO.js} +1 -1
  443. package/build/dist/chunks/EHVPRQHS.js +1 -0
  444. package/build/dist/chunks/EKGHKEKV.js +1 -0
  445. package/build/dist/chunks/EVANKNJV.js +1 -0
  446. package/build/dist/chunks/F2YH72GF.js +1 -0
  447. package/build/dist/chunks/F3TJCOVV.js +1 -0
  448. package/build/dist/chunks/F6WBPPBN.js +1 -0
  449. package/build/dist/chunks/FL3EF72E.js +1 -0
  450. package/build/dist/chunks/FLXID6I3.js +1 -0
  451. package/build/dist/chunks/FYTF2QMS.js +1 -0
  452. package/build/dist/chunks/G7UKNO2I.js +1 -0
  453. package/build/dist/chunks/GZ5TW3WB.js +1 -0
  454. package/build/dist/chunks/H4S2ZCWK.js +1 -0
  455. package/build/dist/chunks/H6ED3RHF.js +1 -0
  456. package/build/dist/chunks/HACP2Q6D.js +3 -0
  457. package/build/dist/chunks/HF2AGJZC.js +1 -0
  458. package/build/dist/chunks/HFQS5344.js +1 -0
  459. package/build/dist/chunks/{Y3P6SUNL.js → HIMVOTIU.js} +1 -1
  460. package/build/dist/chunks/HL2MLC3O.js +1 -0
  461. package/build/dist/chunks/HNMOB76J.js +1 -0
  462. package/build/dist/chunks/HQVC6X3T.js +1 -0
  463. package/build/dist/chunks/HYIEQG4X.js +1 -0
  464. package/build/dist/chunks/HZUWK5B2.js +1 -0
  465. package/build/dist/chunks/IHGVCPVA.js +2 -0
  466. package/build/dist/chunks/IKP3Z3RX.js +1 -0
  467. package/build/dist/chunks/ITIIHCZK.js +1 -0
  468. package/build/dist/chunks/IWALIX7Q.js +1 -0
  469. package/build/dist/chunks/JOMK32QW.js +1 -0
  470. package/build/dist/chunks/JRO6WTK4.js +1 -0
  471. package/build/dist/chunks/JRVTSGAT.js +1 -0
  472. package/build/dist/chunks/JRZLKIYB.js +1 -0
  473. package/build/dist/chunks/JVTVOK6P.js +1 -0
  474. package/build/dist/chunks/K2LWX3PZ.js +1 -0
  475. package/build/dist/chunks/KEPQXFHU.js +1 -0
  476. package/build/dist/chunks/L24EOVLT.js +1 -0
  477. package/build/dist/chunks/L2MTPRU7.js +1 -0
  478. package/build/dist/chunks/LBEMCOND.js +1 -0
  479. package/build/dist/chunks/LFKSXD3S.js +1 -0
  480. package/build/dist/chunks/MRWCFTMS.js +1 -0
  481. package/build/dist/chunks/MWWYIFXJ.js +1 -0
  482. package/build/dist/chunks/MYBDO5SA.js +1 -0
  483. package/build/dist/chunks/N77ANGBT.js +1 -0
  484. package/build/dist/chunks/NCQFWPAW.js +1 -0
  485. package/build/dist/chunks/NHCRJC5X.js +1 -0
  486. package/build/dist/chunks/NNZ4SZZ4.js +1 -0
  487. package/build/dist/chunks/NUWL6TJM.js +1 -0
  488. package/build/dist/chunks/O47JXRXN.js +1 -0
  489. package/build/dist/chunks/{GIBF3YJO.js → OG5HRQU4.js} +1 -1
  490. package/build/dist/chunks/OJLMF5AR.js +1 -0
  491. package/build/dist/chunks/OJMYESQU.js +1 -0
  492. package/build/dist/chunks/OJP7Y4AM.js +1 -0
  493. package/build/dist/chunks/OK3TQFXZ.js +1 -0
  494. package/build/dist/chunks/OW7GOYKA.js +1 -0
  495. package/build/dist/chunks/P4UQGWCP.js +1 -0
  496. package/build/dist/chunks/P6ELT4ZV.js +1 -0
  497. package/build/dist/chunks/PHXWBC4O.js +1 -0
  498. package/build/dist/chunks/Q2VMH2LB.js +1 -0
  499. package/build/dist/chunks/QH3AL3UN.js +1 -0
  500. package/build/dist/chunks/QHHZDXRG.js +1 -0
  501. package/build/dist/chunks/QNPEKNWM.js +1 -0
  502. package/build/dist/chunks/QOY4AANB.js +1 -0
  503. package/build/dist/chunks/QRUC7EFE.js +1 -0
  504. package/build/dist/chunks/QYKXWBZC.js +1 -0
  505. package/build/dist/chunks/REGJY5RC.js +1 -0
  506. package/build/dist/chunks/RETS2ZEK.js +1 -0
  507. package/build/dist/chunks/RFJCG4NA.js +1 -0
  508. package/build/dist/chunks/RNEMTLQG.js +1 -0
  509. package/build/dist/chunks/RRSODRGT.js +1 -0
  510. package/build/dist/chunks/SEW7UP5U.js +1 -0
  511. package/build/dist/chunks/SLSPWXR6.js +1 -0
  512. package/build/dist/chunks/SPRVVJXI.js +1 -0
  513. package/build/dist/chunks/SQ5BNSXR.js +1 -0
  514. package/build/dist/chunks/SQH7A4O3.js +1 -0
  515. package/build/dist/chunks/SS7U3CMZ.js +1 -0
  516. package/build/dist/chunks/SXX52Y27.js +1 -0
  517. package/build/dist/chunks/SYZ55RCX.js +1 -0
  518. package/build/dist/chunks/T6MTTMLQ.js +1 -0
  519. package/build/dist/chunks/TAI63P6E.js +1 -0
  520. package/build/dist/chunks/TCS3ICNE.js +2 -0
  521. package/build/dist/chunks/TRCP7X5P.js +1 -0
  522. package/build/dist/chunks/TWR7BF72.js +1 -0
  523. package/build/dist/chunks/UEYFMXV3.js +1 -0
  524. package/build/dist/chunks/UWOFA6GV.js +1 -0
  525. package/build/dist/chunks/UXG67LH3.js +1 -0
  526. package/build/dist/chunks/V6SDKPZS.js +1 -0
  527. package/build/dist/chunks/VCWDJQDE.js +1 -0
  528. package/build/dist/chunks/{BOFA26WU.js → VXLJRRKV.js} +1 -1
  529. package/build/dist/chunks/W6G2QGYF.js +1 -0
  530. package/build/dist/chunks/WCKMQFGS.js +1117 -0
  531. package/build/dist/chunks/WHT45EFX.js +1 -0
  532. package/build/dist/chunks/WIDTTGSH.js +1 -0
  533. package/build/dist/chunks/WQZLYX64.js +1 -0
  534. package/build/dist/chunks/X5V2Z2NM.js +1 -0
  535. package/build/dist/chunks/{GDP4JSAX.js → XCFA73P2.js} +1 -1
  536. package/build/dist/chunks/XPFVT2EA.js +1 -0
  537. package/build/dist/chunks/XV6F3RET.js +1 -0
  538. package/build/dist/chunks/XW7RH7YY.js +1 -0
  539. package/build/dist/chunks/YHPOXAKA.js +1 -0
  540. package/build/dist/chunks/YONRUWN7.js +1 -0
  541. package/build/dist/chunks/YR3QJVJQ.js +1 -0
  542. package/build/dist/chunks/Z4LJ2GTX.js +1 -0
  543. package/build/dist/chunks/ZL3KVABO.js +1 -0
  544. package/build/dist/chunks/ZPM2MFXZ.js +1 -0
  545. package/build/dist/chunks/ZPNGV34U.js +1 -0
  546. package/build/dist/chunks/ZQI7B2Z7.js +1 -0
  547. package/build/dist/chunks/ZT67OMLW.js +1 -0
  548. package/package.json +13 -9
  549. package/build/dist/chunks/2IRORNOH.js +0 -1
  550. package/build/dist/chunks/3PA2XT75.js +0 -1
  551. package/build/dist/chunks/52TGAWSI.js +0 -1
  552. package/build/dist/chunks/66DWJWDA.js +0 -1
  553. package/build/dist/chunks/73EABRFC.js +0 -1
  554. package/build/dist/chunks/A5KSG6LW.js +0 -1
  555. package/build/dist/chunks/BHR46XNW.js +0 -3
  556. package/build/dist/chunks/CQNZWL7F.js +0 -1
  557. package/build/dist/chunks/GN4QZ4JA.js +0 -1
  558. package/build/dist/chunks/I5CQ64EU.js +0 -1
  559. package/build/dist/chunks/ICCJ3TOO.js +0 -1
  560. package/build/dist/chunks/KL5YE7JA.js +0 -1
  561. package/build/dist/chunks/KVVTKM6E.js +0 -1
  562. package/build/dist/chunks/M6JGTQRY.js +0 -1
  563. package/build/dist/chunks/MK6L6TGI.js +0 -1
  564. package/build/dist/chunks/MOVRI5IV.js +0 -1
  565. package/build/dist/chunks/NA7HV7BR.js +0 -1
  566. package/build/dist/chunks/NGAI6GTU.js +0 -1
  567. package/build/dist/chunks/OBX7IZG5.js +0 -1
  568. package/build/dist/chunks/OSQ4AAM2.js +0 -2
  569. package/build/dist/chunks/OWEUVFB6.js +0 -1
  570. package/build/dist/chunks/P4G3EKF7.js +0 -1
  571. package/build/dist/chunks/QGDHMVPE.js +0 -1
  572. package/build/dist/chunks/SPAKOCR7.js +0 -1
  573. package/build/dist/chunks/T6O2L6HF.js +0 -1
  574. package/build/dist/chunks/TEVKPJV5.js +0 -1
  575. package/build/dist/chunks/YX4NVVSX.js +0 -1
  576. package/build/dist/chunks/ZUC6ILK2.js +0 -1
@@ -0,0 +1,162 @@
1
+ import { OakError } from './errors.js';
2
+ import type { Address, JsonValue, TypedDataRequest } from './types.js';
3
+ export type SignatureClass = 'order' | 'cancel' | 'link' | 'offer' | 'consent' | 'auth' | 'relayed';
4
+ export type NonceKind = 'local-random' | 'local-time' | 'program-counter' | 'program-bitmap' | 'server-observed';
5
+ export type DerivedYield = 'expiry' | 'nonce' | 'amount-out' | 'amount-in' | 'token-out' | 'token-in' | 'counterparty' | 'recipient';
6
+ export type FieldRole = {
7
+ role: 'signer';
8
+ } | {
9
+ role: 'account';
10
+ } | {
11
+ role: 'recipient';
12
+ } | {
13
+ role: 'delegate';
14
+ } | {
15
+ role: 'counterparty';
16
+ } | {
17
+ role: 'token';
18
+ side: 'out' | 'in';
19
+ arg: string;
20
+ } | {
21
+ role: 'amount';
22
+ side: 'out';
23
+ token: string;
24
+ arg: string;
25
+ } | {
26
+ role: 'amount';
27
+ side: 'in';
28
+ token: string;
29
+ minArg: string;
30
+ } | {
31
+ role: 'fee';
32
+ token: string;
33
+ maxBps?: number;
34
+ } | {
35
+ role: 'expiry';
36
+ } | {
37
+ role: 'nonce';
38
+ kind: NonceKind;
39
+ } | {
40
+ role: 'pinned';
41
+ value: JsonValue;
42
+ } | {
43
+ role: 'derived';
44
+ rebuild: string;
45
+ yields?: readonly DerivedYield[];
46
+ } | {
47
+ role: 'observed';
48
+ check: string;
49
+ };
50
+ export type DeclaredField = FieldRole & {
51
+ meaning: string;
52
+ };
53
+ export interface SignatureDomain {
54
+ name: string;
55
+ version?: string;
56
+ chainId: number;
57
+ verifyingContract?: Address;
58
+ }
59
+ export type TypedFields = readonly {
60
+ name: string;
61
+ type: string;
62
+ }[];
63
+ export interface SignatureSpec {
64
+ id: string;
65
+ program: string;
66
+ purpose: string;
67
+ tools: readonly string[];
68
+ class: SignatureClass;
69
+ encoding: 'eip712' | 'eip191-template' | 'eip191-packed-hash';
70
+ network?: 'mainnet' | 'testnet';
71
+ domain?: Readonly<SignatureDomain>;
72
+ primaryType: string;
73
+ types: Readonly<Record<string, TypedFields>>;
74
+ fields: Readonly<Record<string, DeclaredField>>;
75
+ maxLifetimeSeconds: number;
76
+ expiryBinding?: 'signed' | 'program-link' | 'auth-window' | 'cancel-only';
77
+ authWindow?: {
78
+ field: string;
79
+ maxAgeSeconds: number;
80
+ maxFutureSeconds: number;
81
+ };
82
+ expiry?: {
83
+ enforcedBy: 'api';
84
+ path: string;
85
+ };
86
+ ownerVerification?: {
87
+ caller: Address;
88
+ digestRule: string;
89
+ supportVector: string;
90
+ };
91
+ contractHash?: {
92
+ fn: string;
93
+ };
94
+ nonceRead?: string;
95
+ revoke?: {
96
+ onchainTool?: string;
97
+ offchainSpec?: string;
98
+ none?: string;
99
+ staysExecutableUntilExpiry: boolean;
100
+ };
101
+ status?: {
102
+ tool: string;
103
+ open: readonly string[];
104
+ terminal: readonly string[];
105
+ };
106
+ submit: {
107
+ by: 'addon';
108
+ host: string;
109
+ path: string;
110
+ } | {
111
+ by: 'server-continuation';
112
+ reason: string;
113
+ } | {
114
+ by: 'transaction';
115
+ };
116
+ allowance?: {
117
+ spender: Address;
118
+ amountRole: string;
119
+ sharedAcrossOpenOrders: boolean;
120
+ };
121
+ signatureEncoding?: 'rsv65' | 'erc2098';
122
+ relayedPaths?: readonly string[];
123
+ requireHuman: boolean;
124
+ humanException?: string;
125
+ enabled?: false;
126
+ disabledReason?: string;
127
+ }
128
+ export declare const MAX_SIGNATURE_LIFETIME = 2592000;
129
+ export declare const MAX_SIGNED_AMOUNT: bigint;
130
+ export declare const VALUE_CLASSES: ReadonlySet<SignatureClass>;
131
+ export declare function signingRefusal(reason: string): OakError;
132
+ export declare const isValueClass: (spec: Pick<SignatureSpec, "class">) => boolean;
133
+ export declare function typePaths(types: Readonly<Record<string, TypedFields>>, primaryType: string): Map<string, string>;
134
+ export declare function pinnedAddresses(extra?: readonly string[]): ReadonlySet<string>;
135
+ export declare function specViolations(spec: SignatureSpec, pins?: ReadonlySet<string>): string[];
136
+ export declare function registryViolations(specs: readonly SignatureSpec[], pins?: ReadonlySet<string>): string[];
137
+ export declare function specKey(spec: Pick<SignatureSpec, 'network' | 'domain' | 'primaryType' | 'encoding'>): string;
138
+ export declare function assertRequestMatchesSpec(spec: SignatureSpec, request: TypedDataRequest): void;
139
+ export declare function fieldValue(message: unknown, path: string): unknown;
140
+ export interface SignedTerms {
141
+ signer?: string;
142
+ account?: string;
143
+ recipient?: string;
144
+ delegate?: string;
145
+ counterparty?: string;
146
+ tokenOut?: string;
147
+ amountOut?: string;
148
+ tokenIn?: string;
149
+ minAmountIn?: string;
150
+ fees?: {
151
+ token: string;
152
+ value: string;
153
+ }[];
154
+ expiry?: number;
155
+ nonce?: string;
156
+ orderId?: string;
157
+ }
158
+ export declare function roleTerms(spec: SignatureSpec, message: unknown): SignedTerms;
159
+ export declare function assertExpiry(spec: Pick<SignatureSpec, 'maxLifetimeSeconds' | 'class' | 'humanException'>, expiry: number | undefined, now: number): void;
160
+ export declare function assertSignatureTime(spec: SignatureSpec, message: unknown, now: number, derivedExpiry?: number): number | undefined;
161
+ export declare function assertAmount(value: string | undefined): bigint;
162
+ export declare function fieldRows(spec: SignatureSpec, message: unknown): string[];
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunks/67TJOOBI.js";import"../chunks/XPFVT2EA.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as MAX_SIGNATURE_LIFETIME,b as MAX_SIGNED_AMOUNT,c as VALUE_CLASSES,p as assertAmount,n as assertExpiry,k as assertRequestMatchesSpec,o as assertSignatureTime,q as fieldRows,l as fieldValue,e as isValueClass,g as pinnedAddresses,i as registryViolations,m as roleTerms,d as signingRefusal,j as specKey,h as specViolations,f as typePaths};
@@ -1 +1 @@
1
- import{a,b,c}from"../chunks/GDP4JSAX.js";import"../chunks/LIUXNOLP.js";import"../chunks/GIBF3YJO.js";import"../chunks/A5ITAEUQ.js";import"../chunks/I5CQ64EU.js";import"../chunks/5HCXZWUH.js";import"../chunks/M6JGTQRY.js";import"../chunks/ZUC6ILK2.js";import"../chunks/B4MLWDPM.js";import"../chunks/NGAI6GTU.js";import"../chunks/JXOEJPJ4.js";export{a as NATIVE_TOKEN_ADDRESS,c as createPreview,b as normalizeNativeTokenAddress};
1
+ import{a,b,c}from"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import"../chunks/6IM6A5VA.js";import"../chunks/OG5HRQU4.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as NATIVE_TOKEN_ADDRESS,c as createPreview,b as normalizeNativeTokenAddress};
@@ -1,45 +1,78 @@
1
1
  import { OakError } from './errors.js';
2
2
  import type { Address, DecimalString, Hex, Quote, SwapArgs, SwapProvider, UnsignedTx } from './types.js';
3
+ import { ponsCurveSwapAbi } from './modules/pons/swap-terms.js';
3
4
  export declare const QUOTE_TTL_SECONDS: 60;
4
5
  export declare const DEFAULT_SLIPPAGE_BPS: 50;
5
6
  export declare const PRICE_IMPACT_WARNING_BPS: 200;
6
- export declare const ponsCurveSwapAbi: readonly [{
7
- readonly name: "buy";
7
+ export { ponsCurveSwapAbi };
8
+ export declare const NATIVE_ETH_ADDRESS: Address;
9
+ export declare const ZERO_ADDRESS: Address;
10
+ export declare const kyberSwapAbi: readonly [{
11
+ readonly name: "swap";
8
12
  readonly type: "function";
9
13
  readonly stateMutability: "payable";
10
14
  readonly inputs: readonly [{
11
- readonly type: "uint256";
12
- readonly name: "quoteIn";
13
- }, {
14
- readonly type: "uint256";
15
- readonly name: "minTokensOut";
16
- }, {
17
- readonly type: "address";
18
- readonly name: "recipient";
15
+ readonly type: "tuple";
16
+ readonly components: readonly [{
17
+ readonly type: "address";
18
+ readonly name: "callTarget";
19
+ }, {
20
+ readonly type: "address";
21
+ readonly name: "approveTarget";
22
+ }, {
23
+ readonly type: "bytes";
24
+ readonly name: "targetData";
25
+ }, {
26
+ readonly type: "tuple";
27
+ readonly components: readonly [{
28
+ readonly type: "address";
29
+ readonly name: "srcToken";
30
+ }, {
31
+ readonly type: "address";
32
+ readonly name: "dstToken";
33
+ }, {
34
+ readonly type: "address[]";
35
+ readonly name: "srcReceivers";
36
+ }, {
37
+ readonly type: "uint256[]";
38
+ readonly name: "srcAmounts";
39
+ }, {
40
+ readonly type: "address[]";
41
+ readonly name: "feeReceivers";
42
+ }, {
43
+ readonly type: "uint256[]";
44
+ readonly name: "feeAmounts";
45
+ }, {
46
+ readonly type: "address";
47
+ readonly name: "dstReceiver";
48
+ }, {
49
+ readonly type: "uint256";
50
+ readonly name: "amount";
51
+ }, {
52
+ readonly type: "uint256";
53
+ readonly name: "minReturnAmount";
54
+ }, {
55
+ readonly type: "uint256";
56
+ readonly name: "flags";
57
+ }, {
58
+ readonly type: "bytes";
59
+ readonly name: "permit";
60
+ }];
61
+ readonly name: "desc";
62
+ }, {
63
+ readonly type: "bytes";
64
+ readonly name: "clientData";
65
+ }];
66
+ readonly name: "execution";
19
67
  }];
20
68
  readonly outputs: readonly [{
21
69
  readonly type: "uint256";
22
- }];
23
- }, {
24
- readonly name: "sell";
25
- readonly type: "function";
26
- readonly stateMutability: "nonpayable";
27
- readonly inputs: readonly [{
28
- readonly type: "uint256";
29
- readonly name: "tokensIn";
30
- }, {
31
- readonly type: "uint256";
32
- readonly name: "minQuoteOut";
70
+ readonly name: "returnAmount";
33
71
  }, {
34
- readonly type: "address";
35
- readonly name: "recipient";
36
- }];
37
- readonly outputs: readonly [{
38
72
  readonly type: "uint256";
73
+ readonly name: "gasUsed";
39
74
  }];
40
75
  }];
41
- export declare const NATIVE_ETH_ADDRESS: Address;
42
- export declare const ZERO_ADDRESS: Address;
43
76
  export declare class NoRouteError extends OakError {
44
77
  name: string;
45
78
  constructor(message?: string);
@@ -68,6 +101,7 @@ export interface SwapQuote extends Quote {
68
101
  venueFeeBps?: number;
69
102
  oakFee?: DecimalString;
70
103
  feeDisclosure?: string;
104
+ sourcePoolRoute?: unknown;
71
105
  ponsCurveToken?: Address;
72
106
  ponsPoolToken?: Address;
73
107
  blockNumber?: DecimalString;
@@ -1 +1 @@
1
- import{A,B,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunks/2IRORNOH.js";import"../chunks/GDP4JSAX.js";import"../chunks/LIUXNOLP.js";import"../chunks/Y3P6SUNL.js";import"../chunks/GIBF3YJO.js";import"../chunks/A5ITAEUQ.js";import"../chunks/I5CQ64EU.js";import"../chunks/5HCXZWUH.js";import"../chunks/M6JGTQRY.js";import"../chunks/ZUC6ILK2.js";import"../chunks/B4MLWDPM.js";import"../chunks/NGAI6GTU.js";import"../chunks/JXOEJPJ4.js";export{b as DEFAULT_SLIPPAGE_BPS,h as ExpiredQuoteError,i as MAX_RECENT_QUOTES,p as MAX_VELORA_FEE_BPS,e as NATIVE_ETH_ADDRESS,g as NoRouteError,c as PRICE_IMPACT_WARNING_BPS,a as QUOTE_TTL_SECONDS,f as ZERO_ADDRESS,x as assertCalldataMinAmountOut,l as assertQuoteBinding,y as assertSwapTransaction,s as assertVeloraPartnerAndFee,B as buildSwapFromQuote,o as computeMinAmountOut,j as copyQuote,w as decodeSwapMinAmountOut,u as encodeKyberSwapData,v as encodeVeloraSwapData,t as formatVenueFeeDisclosure,A as getQuote,n as isNativeToken,z as normalizeQuote,d as ponsCurveSwapAbi,m as resolveNowSeconds,k as snapshotQuote,r as veloraCalldataMinimum,q as veloraVenueFeeBps};
1
+ import{A as B,B as C,a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t,t as u,u as v,v as w,w as x,x as y,y as z,z as A}from"../chunks/EAEQOS7Y.js";import{a}from"../chunks/HQVC6X3T.js";import"../chunks/ZQI7B2Z7.js";import"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import"../chunks/6IM6A5VA.js";import"../chunks/HIMVOTIU.js";import"../chunks/OG5HRQU4.js";import"../chunks/73N3TOJL.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{c as DEFAULT_SLIPPAGE_BPS,i as ExpiredQuoteError,j as MAX_RECENT_QUOTES,q as MAX_VELORA_FEE_BPS,e as NATIVE_ETH_ADDRESS,h as NoRouteError,d as PRICE_IMPACT_WARNING_BPS,b as QUOTE_TTL_SECONDS,f as ZERO_ADDRESS,y as assertCalldataMinAmountOut,m as assertQuoteBinding,z as assertSwapTransaction,t as assertVeloraPartnerAndFee,C as buildSwapFromQuote,p as computeMinAmountOut,k as copyQuote,x as decodeSwapMinAmountOut,v as encodeKyberSwapData,w as encodeVeloraSwapData,u as formatVenueFeeDisclosure,B as getQuote,o as isNativeToken,g as kyberSwapAbi,A as normalizeQuote,a as ponsCurveSwapAbi,n as resolveNowSeconds,l as snapshotQuote,s as veloraCalldataMinimum,r as veloraVenueFeeBps};
@@ -16,6 +16,7 @@ export interface GetBalancesOptions {
16
16
  tokens?: readonly Token[];
17
17
  oakTokenAddress?: Address;
18
18
  includeStockTokens?: boolean;
19
+ includePoolTokens?: boolean;
19
20
  includeZero?: boolean;
20
21
  }
21
22
  interface StockDiscoveryOptions {
@@ -73,6 +74,10 @@ export declare const MULTICALL3_ABI: readonly [{
73
74
  }];
74
75
  }];
75
76
  export declare function getBalances(wallet: Address, options?: GetBalancesOptions): Promise<Balance[]>;
77
+ export declare function getReceivedTokenBalances(wallet: Address, addresses: readonly Address[], options: {
78
+ client: PublicClient;
79
+ chainId: number;
80
+ }): Promise<Balance[]>;
76
81
  export interface FoundToken extends Token {
77
82
  name: string;
78
83
  kind: 'native' | 'stablecoin' | 'wrapped' | 'oak' | 'official_stock' | 'launchpad' | 'erc20';
@@ -1 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunks/MOVRI5IV.js";import"../chunks/YX4NVVSX.js";import"../chunks/BHR46XNW.js";import"../chunks/73EABRFC.js";import"../chunks/2IRORNOH.js";import"../chunks/GDP4JSAX.js";import"../chunks/LIUXNOLP.js";import"../chunks/MK6L6TGI.js";import"../chunks/Y3P6SUNL.js";import"../chunks/GIBF3YJO.js";import"../chunks/UCMNB2UP.js";import"../chunks/Z25UKUJF.js";import"../chunks/A5ITAEUQ.js";import"../chunks/I5CQ64EU.js";import"../chunks/NA7HV7BR.js";import"../chunks/5HCXZWUH.js";import"../chunks/M6JGTQRY.js";import"../chunks/ZUC6ILK2.js";import"../chunks/B4MLWDPM.js";import"../chunks/NGAI6GTU.js";import"../chunks/JXOEJPJ4.js";export{j as MULTICALL3_ABI,b as NATIVE_ETH_TOKEN,a as STOCK_ASSETS_URL,e as USDE_TOKEN,c as USDG_TOKEN,d as WETH_TOKEN,h as assertOfficialStockIdentity,i as fetchOfficialStockTokens,l as findToken,k as getBalances,f as parseOfficialStockAssets,m as resolveQuoteToken,g as verifyOfficialStockToken};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunks/HZUWK5B2.js";import"../chunks/WHT45EFX.js";import"../chunks/HACP2Q6D.js";import"../chunks/FLXID6I3.js";import"../chunks/NNZ4SZZ4.js";import"../chunks/EAEQOS7Y.js";import"../chunks/HQVC6X3T.js";import"../chunks/ZQI7B2Z7.js";import"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import"../chunks/HFQS5344.js";import"../chunks/G7UKNO2I.js";import"../chunks/BYXBS45D.js";import"../chunks/GZ5TW3WB.js";import"../chunks/5EHQM6DM.js";import"../chunks/AXYOJBX6.js";import"../chunks/Z25UKUJF.js";import"../chunks/6IM6A5VA.js";import"../chunks/P4UQGWCP.js";import"../chunks/MYBDO5SA.js";import"../chunks/HIMVOTIU.js";import"../chunks/OG5HRQU4.js";import"../chunks/UWOFA6GV.js";import"../chunks/73N3TOJL.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{j as MULTICALL3_ABI,b as NATIVE_ETH_TOKEN,a as STOCK_ASSETS_URL,e as USDE_TOKEN,c as USDG_TOKEN,d as WETH_TOKEN,h as assertOfficialStockIdentity,i as fetchOfficialStockTokens,m as findToken,k as getBalances,l as getReceivedTokenBalances,f as parseOfficialStockAssets,n as resolveQuoteToken,g as verifyOfficialStockToken};
@@ -1,3 +1,9 @@
1
1
  import type { ToolArgs } from './types.js';
2
2
  export declare function isReadDiscovery(name: string, args: ToolArgs): boolean;
3
+ export { isRelayFundingBootstrap as isFundingBootstrap } from './modules/relay/bootstrap.js';
3
4
  export declare const COMING_SOON: ReadonlyMap<string, string>;
5
+ export declare const FIND_TOOL = "find_tool";
6
+ export declare const RUN_TOOL = "run_tool";
7
+ export declare const LOCAL_TOOLS: readonly string[];
8
+ export declare const VISIBLE_TOOLS: Readonly<Record<string, readonly string[]>>;
9
+ export declare function visibleTools(registered: Iterable<string>, network: 'mainnet' | 'testnet'): ReadonlySet<string>;
@@ -1 +1 @@
1
- import{a,b}from"../chunks/ICCJ3TOO.js";export{b as COMING_SOON,a as isReadDiscovery};
1
+ import{a as b,b as c,c as d,d as e,e as f,f as g,g as h}from"../chunks/6SCCW74G.js";import{a}from"../chunks/F3TJCOVV.js";import"../chunks/73N3TOJL.js";import"../chunks/RETS2ZEK.js";import"../chunks/XPFVT2EA.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{c as COMING_SOON,d as FIND_TOOL,f as LOCAL_TOOLS,e as RUN_TOOL,g as VISIBLE_TOOLS,a as isFundingBootstrap,b as isReadDiscovery,h as visibleTools};
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../chunks/A5ITAEUQ.js";import"../chunks/I5CQ64EU.js";import"../chunks/NGAI6GTU.js";import"../chunks/JXOEJPJ4.js";export{c as approval,a as assertAddress,d as deposit,e as redeemAll,b as unsignedTx};
1
+ import{a,b,c,d,e}from"../chunks/6IM6A5VA.js";import"../chunks/RETS2ZEK.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{c as approval,a as assertAddress,d as deposit,e as redeemAll,b as unsignedTx};
@@ -59,6 +59,7 @@ export interface SenderTransaction {
59
59
  }
60
60
  export interface SenderResult {
61
61
  hashes: string[];
62
+ warnings?: string[];
62
63
  transactions?: SenderTransaction[];
63
64
  summary: string;
64
65
  status?: 'submitted' | 'mined' | 'final' | 'not_submitted';
@@ -104,6 +105,7 @@ export interface HistoryItem {
104
105
  description: string;
105
106
  }
106
107
  export interface Position {
108
+ incomplete?: boolean;
107
109
  module: string;
108
110
  id: string;
109
111
  chainId: number;
@@ -1 +1 @@
1
- import{a,b,c}from"../chunks/Y3P6SUNL.js";import"../chunks/NGAI6GTU.js";import"../chunks/JXOEJPJ4.js";export{a as VendorBusyError,b as vendorBudget,c as vendorBusy};
1
+ import{a,b,c}from"../chunks/HIMVOTIU.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as VendorBusyError,b as vendorBudget,c as vendorBusy};
@@ -0,0 +1 @@
1
+ import{a as g}from"./X5V2Z2NM.js";import{a as m}from"./6IM6A5VA.js";import{a as v}from"./UWOFA6GV.js";import{e as A,g as u,i as b}from"./73N3TOJL.js";import{a as l,i as x,s as y}from"./XPFVT2EA.js";import{a as o}from"./5YS5V2LK.js";import{b as w}from"./JXOEJPJ4.js";import{Buffer as k}from"node:buffer";import{decodeEventLog as $}from"viem";var R="Profile contents and oak.registrar are mutable, self-asserted metadata, not registry-validated claims or proof of provenance.",B="oak.registrar",D="0x6f616b",L=v("Agent ID as a decimal uint256 integer string."),j={type:"string",pattern:"^0x[0-9a-fA-F]{64}$"},q={type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"32-byte hex value."},z={type:"string",pattern:"^0x([0-9a-fA-F]{2})*$"},T="0x0000000000000000000000000000000000000000";function h(t){let e=t.network??"mainnet",{chainId:n,identityRegistry:r}=y[e],s=e==="mainnet"?x[l].identity:void 0;return{network:e,chainId:n,registry:r,registryId:`eip155:${n}:${r}`,reputation:s?.reputationRegistry.address,validation:s?.validationRegistry.address}}function K(t){let{chainId:e,reputation:n}=h(t);if(!n)throw new o("Oak has no pinned ERC-8004 reputation registry for this network.");return{chainId:e,address:n}}function V(t){let{chainId:e,validation:n}=h(t);if(!n)throw new o("Oak has no pinned ERC-8004 validation registry for this network.");return{chainId:e,address:n}}function Z(t){return u(t,T)}function G(t){if(typeof t!="string"||!/^[0-9]+$/.test(t)||t.length>78||BigInt(t)>=2n**256n)throw new o("Provide an agent ID as a decimal uint256 integer string.");return BigInt(t)}function J(t,e){return b(t,`Provide a valid ${e} address.`)}function Q(t,e){let n=h(t).chainId;if(e!==void 0&&e!==n)throw new o(`ERC-8004 actions are supported only on chain ${n}.`)}function X(t,e){if(typeof t!="string"||!/^0x[0-9a-fA-F]{64}$/.test(t))throw new o(`Provide ${e} as 32-byte hex.`);return t.toLowerCase()}function I(t,e,n,r=!0){if(t===void 0){if(r)return"";throw new o(`Provide ${e}.`)}if(typeof t!="string"||!r&&!t.trim()||t.length>n||w(t))throw new o(`${e} must be plain text of at most ${n} characters.`);return t}function Y(t,e){if(typeof t!="string"||!t.trim()||t.length>2048)throw new o(`Provide a valid ${e}.`);try{let n=new URL(t);if(!["https:","ipfs:"].includes(n.protocol)||!n.hostname||n.username||n.password||w(t))throw new Error}catch{throw new o(`${e} must be an HTTPS or IPFS URI without credentials.`)}return t}function tt(t){let e=/^data:application\/json;base64,([A-Za-z0-9+/=]+)$/.exec(t);if(e)try{let n=JSON.parse(k.from(e[1],"base64").toString("utf8"));return A(n)?n:void 0}catch{return}}async function C(t,e,n,r,s=!0){let i=await t.preview(e,n),a=i.changes.map(({amount:d,token:f})=>{let c=d.startsWith("-");return`${c?"-":""}${t.formatAmount(c?d.slice(1):d,f.decimals)} ${f.symbol} (${f.address}, chain ${f.chainId})`});return{txs:e,summary:`${i.summary} ${a.join("; ")} ${s?`${R} `:""}${r}`}}async function et(t,e,n,r="update this profile"){let{chainId:s,registry:i}=h(t),a=t.clientFor(s),d=await a.readContract({address:i,abi:g,functionName:"ownerOf",args:[e]});if(m(d),u(d,n))return d;let[f,c]=await Promise.all([a.readContract({address:i,abi:g,functionName:"getApproved",args:[e]}),a.readContract({address:i,abi:g,functionName:"isApprovedForAll",args:[d,n]})]);if(m(f),typeof c!="boolean")throw new o("The registry returned invalid operator approval data.");if(!u(f,n)&&!c)throw new o(`Only the agent owner or an approved operator can ${r}.`);return d}async function nt(t,e,n){let{chainId:r,registry:s}=h(t),i=t.clientFor(r),a=await i.readContract({address:s,abi:g,functionName:"ownerOf",args:[e]});if(m(a),u(a,n))return a;if(await i.readContract({address:s,abi:g,functionName:"isApprovedForAll",args:[a,n]})!==!0)throw new o("Only the agent owner or an operator approved for all of its agents can change the token approval.");return a}async function H(t,e,n,r,s){let{chainId:i,registry:a}=h(t),d=s??a;if(typeof e!="string"||!/^0x[0-9a-fA-F]{64}$/.test(e))throw new o("Provide the mined transaction hash.");let f=t.clientFor(i),c=await f.getTransactionReceipt({hash:e});if(!c)throw new o("The transaction is not mined yet. Try again after confirmation.");if(c.status!=="success"||!c.to||!u(c.to,d)||!u(c.from,n)||!u(c.transactionHash,e))throw new o("The receipt is not a successful matching registry transaction.");let p=await f.getTransaction({hash:e});if(p.chainId!==i||p.value!==0n||!p.to||!u(p.to,d)||!u(p.from,n))throw new o("The transaction does not match this chain, registry and wallet.");if(!(typeof r=="function"?typeof p.input=="string"&&r(p.input):typeof p.input=="string"&&u(p.input,r)))throw new o("The mined transaction calldata does not match the exact operation Oak built.");return c}function rt(t,e,n,r){let s=t.logs.filter(i=>u(i.address,e)&&!i.removed).flatMap(i=>{try{let a=$({abi:n,topics:i.topics,data:i.data,strict:!0});return a.eventName===r?[a.args]:[]}catch{return[]}});if(s.length!==1)throw new o(`The receipt must contain one matching ${r} event.`);return s[0]}function ot(t){let e=I(t,"metadata key",128,!1);if(e==="agentWallet")throw new o("The key agentWallet is reserved: use erc8004_set_wallet / erc8004_unset_wallet, which prove control of the wallet.");return e}function it(t){if(t.value===void 0==(t.text===void 0))throw new o("Provide exactly one of value (0x hex bytes) or text (UTF-8).");let e;if(t.value!==void 0){if(typeof t.value!="string"||!/^0x([0-9a-fA-F]{2})*$/.test(t.value))throw new o("Metadata value must be 0x-prefixed hex bytes.");e=t.value}else{if(typeof t.text!="string")throw new o("Metadata text must be a string.");e=`0x${k.from(t.text,"utf8").toString("hex")}`}if((e.length-2)/2>4096)throw new o("Metadata values are limited to 4096 bytes.");return e}async function at(t,e,n,r){let{chainId:s}=h(t);if(n.transactionHash!==void 0){let a=await H(t,n.transactionHash,e,r.matcher??r.data,r.to);return r.verify(a)}await r.authority();let i=t.unsignedTx({to:r.to,data:r.data,value:"0",chainId:s,description:r.description});return C(t,[i],e,r.summary,!1)}export{R as a,B as b,D as c,L as d,j as e,q as f,z as g,h,K as i,V as j,Z as k,G as l,J as m,Q as n,X as o,I as p,Y as q,tt as r,C as s,et as t,nt as u,H as v,rt as w,ot as x,it as y,at as z};
@@ -0,0 +1 @@
1
+ import{b as z,c as I}from"./SPRVVJXI.js";import{b as W}from"./HL2MLC3O.js";import{d as R,e as _}from"./XV6F3RET.js";import{K as E}from"./5H3MQWH7.js";import{a as F}from"./6IM6A5VA.js";import{d as H,g as A,i as j}from"./73N3TOJL.js";import{a as C,s as S}from"./XPFVT2EA.js";import{a as s}from"./5YS5V2LK.js";import{encodeFunctionData as M,erc20Abi as V,getAddress as Z,keccak256 as K,zeroAddress as x}from"viem";var r=R.turbo,h=R.blackjack,g=m=>j(m,"Provide an explicit card address.",H);function G(m,d){if(/^uint\d*\[\]$/.test(m.type)&&Array.isArray(d))return d.map(c=>G({...m,type:m.type.slice(0,-2)},c));if(/^uint\d*$/.test(m.type)&&(typeof d!="string"||!/^(0|[1-9]\d*)$/.test(d)))throw new s("Card integers must be canonical decimal strings, without leading zeros.");return W(m,d)}var J=["buy","cashOut","claimExpiry","refund","safeTransferFrom","safeBatchTransferFrom"],X=["liquidate","recordKnock","liquidateKnock","clearKnock","recordDrift","settle","markVoid","depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries","haltSales","resumeSales","sweepFees","skim"],Q=m=>m==="netnet_turbo_action"||m.startsWith("netnet_blackjack_")&&["netnet_blackjack_finalize","netnet_blackjack_expire","netnet_blackjack_claim"].includes(m);async function de(m,d,c,k){if(F(c),!Q(m))throw new s("No local NetNet card action builder exists.");let v=m!=="netnet_turbo_action";if(Object.keys(d).some(e=>!(v?["sessionId","seriesId"]:["operation","values","minimum","allowZeroPayout"]).includes(e)))throw new s("Unexpected card action argument.");if(v&&!z(m,d))throw new s("Recovery accepts exactly one positive decimal session or series ID.");if(await k.getChainId()!==C)throw new s("NetNet cards require chain 4663.");let w=await k.getBlock();if(w.number===null||!w.hash)throw new s("Card action block is unavailable.");let p=(e,t,i=[])=>k.readContract({address:e.address,abi:e.abi,functionName:t,args:i,blockNumber:w.number});for(let e of v?[r,h]:[r]){let t=await k.getCode({address:e.address,blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet card runtime changed or is unavailable. Requalify this deployment before signing.")}for(let e of v?Object.values(_):[_.turbo]){let t=await k.getCode({address:Z(e.address),blockNumber:w.number});if(!t||K(t)!==e.codeHash)throw new s("NetNet linked card library changed or is unavailable. Requalify before signing.")}let l={txs:[],inputs:[],cards:[],decision:"",blockNumber:w.number,blockHash:w.hash},$=(e,t,i,a,o)=>({chainId:4663,collection:r.address,operator:e,from:t,to:i,id:a,amount:o,operation:t===x?"mint":i===x?"burn":"transfer"}),T=(e,t,i,a,o=[])=>{l.txs.push({to:e,chainId:C,value:"0",data:M({abi:t,functionName:i,args:a}),description:l.decision}),l.cards.push(o)},D=(e,t)=>{if(t<=0n||t>=1n<<128n)throw new s("Card payment must be positive and below the exact-approval ceiling.");l.inputs.push({token:e,amount:t,to:r.address}),T(e,V,"approve",[r.address,t])};if(v){if(g(await p(h,"cards"))!==r.address||g(await p(h,"turbo"))!==r.address)throw new s("Blackjack card wiring changed.");let e=m==="netnet_blackjack_claim";if(Object.keys(d).some(b=>b!==(e?"seriesId":"sessionId")))throw new s("Recovery accepts only its one exact session or series ID.");let t=E(e?d.seriesId:d.sessionId),i,a,o,u="Original-series parked payout; self-claim only.";if(e){if(i=t,a=await p(h,"unclaimedChips",[t,c]),o="claimUnclaimedChips",a===0n)throw new s("This wallet has no parked chips for that series.")}else{let b=await p(h,"sessionOf",[t]);if(!b||!A(b.player,c))throw new s("Recovery is limited to this wallet\u2019s recorded blackjack session.");let y=m==="netnet_blackjack_finalize";if(o=y?"finalize":"expireSession",b.state!==(y?2:1))throw new s(y?"Session is not Closing. Use its current on-chain state to choose recovery.":"Session is not Open. A Closing session uses finalize after its challenge window.");let N=y?b.closeAt:b.deadline;if(u=y?`Challenge ends ${new Date(Number(N)*1e3).toISOString()}.`:`Session deadline ${new Date(Number(N)*1e3).toISOString()}; player-only expiry until ${new Date(Number(N+3600n)*1e3).toISOString()}.`,w.timestamp<N)throw new s(`Recovery is not due until ${N} Unix seconds.`);i=await p(h,"tableSeries"),a=b.chips}if(i<=0n||a<0n)throw new s("Blackjack recovery accounting is unavailable.");return l.decision=`${o} ${e?"series":"session"} ${t} at ${h.address}: return ${a} whole cards of collection ${r.address}, series ${i}, to ${Z(c)}. ${u} Last on-chain chips may omit off-chain winnings; cards may be worthless. A failed receiver parks the payout at ${h.address}; self-claim only. ETH gas extra.`,T(h.address,h.abi,o,[t],a===0n?[]:[$(h.address,h.address,c,i,a)]),l.recovery={...e?{}:{sessionId:t.toString()},seriesId:i.toString(),count:a.toString(),player:c,operation:o},l}let n=String(d.operation);if(n==="setApprovalForAll")throw new s(I.setApprovalForAll);if(["convertPremiums","convertSleeveFees"].includes(n))throw new s(I.conversion);if(![...J,...X].includes(n))throw new s("Choose a qualified finite TURBO operation.");if(!Array.isArray(d.values))throw new s("Provide ordered TURBO values using decimal integer strings.");let U=n==="safeTransferFrom"||n==="safeBatchTransferFrom",B=r.abi.find(e=>e.name===n),q=U?B.inputs.slice(1,-1):B.inputs;if(d.values.length!==q.length)throw new s("TURBO values do not match the exact operation inputs.");let f=q.map((e,t)=>G(e,d.values[t])),O=g(await p(r,"manager")),L=g(await p(r,"sleeve")),P=[];if(U){if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Transfer has no payout floor.");let e=g(f[0]);if(e===x||A(e,c))throw new s("Name a nonzero, non-self card recipient.");let t=await k.getCode({address:e,blockNumber:w.number});if(t&&t!=="0x")throw new s("Card transfer to a contract requires qualified credit and recovery. New blackjack seating remains disabled.");let i=n==="safeTransferFrom"?[f[1]]:f[1],a=n==="safeTransferFrom"?[f[2]]:f[2];if(!i.length||i.length>8||i.length!==a.length||new Set(i.map(String)).size!==i.length||i.some((o,u)=>o<=0n||a[u]<=0n||u>0&&o<=i[u-1]))throw new s("Use at most eight unique positive series IDs in increasing order and exact positive counts.");for(let o=0;o<i.length;o++){if(await p(r,"balanceOf",[c,i[o]])<a[o])throw new s("Card transfer exceeds this wallet\u2019s balance.");P.push($(c,c,e,i[o],a[o])),l.inputs.push({token:r.address,id:i[o],amount:a[o],to:e,exact:!0})}l.decision=`Transfer whole cards of collection ${r.address}: ${i.map((o,u)=>`series ${o} count ${a[u]}`).join(", ")} to ${e}. Basis does not travel with cards; no operator approval. No payout; transfer is irreversible. ETH gas extra.`,f=[c,...f,"0x"]}else if(["buy","cashOut","claimExpiry","refund"].includes(n)){let e=f[0],t=f[1],i=await p(r,"seriesOf",[e]);if(!i||i.asset===x||t<=0n)throw new s("Choose a known series and positive whole-card count.");let a=i.side===0?g(i.asset):S.mainnet.usdg,o=await k.readContract({address:a,abi:V,functionName:"decimals",blockNumber:w.number});if((n==="buy"||n==="cashOut")&&(i.state!==1||w.timestamp>=i.expiry))throw new s("This TURBO series is not OPEN and unexpired.");if(n==="buy"){let[u]=await p(r,"quoteBuy",[e,t]);if(!u||u>f[2])throw new s("Current card quote exceeds the explicit maximum USDG payment.");if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("Buy uses its exact count and maximum USDG price.");l.decision=`Spend at most ${f[2]} USDG base units (${S.mainnet.usdg}, decimals 6) at ${r.address}; receive ${t} whole cards, collection ${r.address}, series ${e}, into this wallet. Exact quoted approval ${u}; fees included. Strike ${i.strikeWad} WAD; expiry ${new Date(Number(i.expiry)*1e3).toISOString()}; cards can lose all value. Any residual USDG allowance requires zero cleanup. ETH gas extra.`,D(S.mainnet.usdg,u),P=[$(c,x,c,e,t)]}else{if(n==="cashOut"&&d.minimum!==void 0)throw new s("cashOut takes its one encoded minimum in values, not a second local minimum.");if(await p(r,"balanceOf",[c,e])<t)throw new s("Card burn exceeds this wallet\u2019s balance.");let u=n==="cashOut"?f[2]:E(d.minimum,!0);if(u===0n&&d.allowZeroPayout!==!0)throw new s("A zero payout floor requires allowZeroPayout:true and explicit human confirmation.");let b=0n;if(n==="cashOut"){let y=await p(r,"quoteCashOut",[e,t,c]);if(y[0]<u)throw new s("The current cash-out quote misses the payout minimum.");b=y[1]}else if(i.state!==(n==="claimExpiry"?3:4))throw new s("Expiry claims require EXPIRED; pro-rata refunds require VOID.");l.decision=`Burn ${t} whole cards of ${r.address}, series ${e}; ${n==="refund"?"series pro-rata VOID refund, not personal purchase-price repayment":n}; receive >=${u} base units of ${a} (decimals ${o}) into this wallet. ${n==="cashOut"?`Minimum encoded in calldata; current performance fee ${b}.`:"Floor is local simulation only; no on-chain minimum. Settled payout includes applicable fees."} Burned cards cannot be returned; ETH gas extra.`,P=[$(c,c,x,e,t)],l.inputs.push({token:r.address,id:e,amount:t,to:x,exact:!0}),l.receipt={token:a,minimum:u,recipient:c,enforcement:n==="cashOut"?"calldata":"simulation"}}}else{if(d.minimum!==void 0||d.allowZeroPayout!==void 0)throw new s("This TURBO operation has no caller payout floor.");if(["withdrawHouse","withdrawPutPot","createSeries","resumeSales"].includes(n)&&!A(O,c))throw new s(`This TURBO operation requires manager ${O}.`);if(n==="haltSales"&&!A(c,O)&&!A(c,g(await p(r,"halter"))))throw new s("TURBO haltSales requires the current manager or halter.");if(["depositHouse","depositPutPot","withdrawHouse","withdrawPutPot","createSeries"].includes(n)){let t=g(f[0]);if(!(await Promise.all(["asset0","asset1","asset2"].map(a=>p(r,a)))).some(a=>typeof a=="string"&&A(a,t)))throw new s("This is not a pinned TURBO reserve asset.")}l.decision=`${n} at ${r.address}; values ${JSON.stringify(f,(t,i)=>typeof i=="bigint"?String(i):i)}. Protocol capital/accounting action; manager ${O}; sleeve ${L}; no caller reward. ${n.startsWith("deposit")?"Irreversible house funding; no personal withdrawable balance.":n.startsWith("withdraw")?"Pays the current manager; operating and reservation floors still apply.":"Series state, risk or protocol fee allocation may change."} No card approval; ETH gas extra.`,(n==="depositHouse"||n==="depositPutPot")&&D(n==="depositHouse"?g(f[0]):S.mainnet.usdg,f[1])}if(l.decision.length>1024)throw new s("Card decision terms exceed the complete confirmation label capacity. Use fewer card IDs.");T(r.address,r.abi,n,f,P);for(let e of l.txs)e.description=l.decision;return l}export{J as a,X as b,Q as c,de as d};
@@ -0,0 +1 @@
1
+ import{b as q}from"./EHVPRQHS.js";import{b as S}from"./HZUWK5B2.js";import{b as le}from"./AXYOJBX6.js";import{a as _}from"./6IM6A5VA.js";import{g as B,i as ue}from"./73N3TOJL.js";import{a as H}from"./RETS2ZEK.js";import{a as u,i as N}from"./XPFVT2EA.js";import{a as c}from"./5YS5V2LK.js";import{a as ce}from"./JXOEJPJ4.js";import{encodeFunctionData as z,erc20Abi as me,getAddress as m,isAddress as he,parseAbi as U,zeroAddress as ke}from"viem";var T=m(N[u].hoodlock.locker.address),C=m(N[u].hoodlock.burner.address),v=m(N[u].hoodlock.liquidityLocker.address),j=m(N[u].uniswap.v3_position_manager.address),K=m(N[u].uniswap.v4_position_manager.address),qe="0x000000000000000000000000000000000000dEaD",Ae=3153600000n,Te=1000000000000n,fe=65535,D=U(["function fee() view returns (uint256)","function lock(address token, uint256 amount, uint256 unlockTime) payable returns (uint256 lockId)","function getLock(uint256 lockId) view returns (address owner, address token, uint256 amount, uint256 unlockTime, bool withdrawn)","function locksByOwner(address owner) view returns (uint256[])","function locksByToken(address token) view returns (uint256[])"]),ee=U(["function fee() view returns (uint256)","function burn(address token, uint256 amount) payable returns (uint256 burnId)","function DEAD() view returns (address)","function getBurn(uint256 burnId) view returns (address burner, address token, uint256 amount, uint256 timestamp)","function totalBurnedOf(address token) view returns (uint256)"]),O=U(["function fixedFee() view returns (uint256)","function collectFeeBps() view returns (uint16)","function paused() view returns (bool)","function lock(address manager, uint256 tokenId, uint256 unlockTime, address feeRecipient, bool acceptUnverifiedHook, uint16 maxCollectFeeBps) payable returns (uint256 lockId)","function lockIdOf(address manager, uint256 tokenId) view returns (uint256)","function getLock(uint256 lockId) view returns (address owner, uint40 unlockTime, uint16 collectFeeBps, bool isV4, bool hookVerified, bool withdrawn, address feeRecipient, address token0, address token1, uint256 tokenId)","function locksOf(address owner) view returns (uint256[])"]),ye=U(["function approve(address to, uint256 tokenId)"]);function $e(e,o,t){let a=o.trim();if(a.startsWith("-")){let k=a.slice(1),i=e(k,t);return i==="0"?"0":`-${i}`}return e(a,t)}function pe(e,o){return o.length===0?"no ERC-20 transfer deltas":o.map(t=>`${$e(e.formatAmount,t.amount,t.token.decimals)} ${t.token.symbol}`).join(", ")}function E(e,o="token"){if(typeof e!="string"||!e.trim())throw new c(`Provide a valid ${o} contract address.`);if(!he(e,{strict:!1}))throw new c(`Identify ${o} by chain and contract address, not by symbol.`);return m(e)}async function W(e,o){try{return await o()}catch(t){throw new c(e.plainError(t))}}function we(e){if(typeof e!="string")throw new c("Amount must be a non-negative integer string in base units.");let o=H(e);if(o<=0n)throw new c("Amount must be greater than zero.");return o}async function ge(e){let o=await e.getBlock();if(!o||typeof o.timestamp!="bigint")throw new c("Could not read the current chain timestamp. Please try again.");return o.timestamp}function ve(e,o){if(typeof e!="string"||!/^\d+$/.test(e.trim()))throw new c("unlockTime must be a non-negative integer string in Unix seconds.");let t=BigInt(e.trim());if(t>=Te)throw new c("unlockTime appears to be in milliseconds; provide Unix seconds at most 100 years (3153600000 seconds) in the future.");if(t<=o)throw new c(`unlockTime (${t}) must be in the future (greater than current timestamp ${o}).`);let a=o+Ae;if(t>a)throw new c(`unlockTime (${t}) exceeds the 100-year maximum lock duration (3153600000 seconds; max ${a}).`);return t}async function oe(e,o,t=u){let a=m(o),[k,i]=await Promise.all([e.readContract({address:a,abi:me,functionName:"symbol"}),e.readContract({address:a,abi:me,functionName:"decimals"})]);return{address:a,symbol:ce(String(k)),decimals:Number(i),chainId:t}}function Se(e,o){if(e==null)return o;let t=typeof e=="number"?e:typeof e=="string"&&/^\d+$/.test(e.trim())?Number(e.trim()):NaN;if(!Number.isInteger(t)||t<0||t>fe)throw new c("maxCollectFeeBps must be an integer between 0 and 65535.");if(t<o)throw new c(`Live collectFeeBps (${o}) exceeds maxCollectFeeBps (${t}): collect fee changed.`);return Math.min(t,o)}function Le(e){return e.tokenId!==void 0||e.manager!==void 0||e.feeRecipient!==void 0||e.maxCollectFeeBps!==void 0||e.acceptUnverifiedHook!==void 0||e.kind==="v3"||e.kind==="lp"||e.kind==="v4"||e.version==="v3"||e.version==="v4"}async function xe(e,o,t){_(t);let a=m(t),k=o.kind==="v4"||o.version==="v4",i=o.manager!==void 0?E(o.manager,"manager"):k?K:j,g=i===K;if(i!==j&&!g)throw new c(`Unsupported position manager ${i}; use the configured Uniswap v3 or v4 manager.`);if(k&&!g||g&&(o.kind==="v3"||o.version==="v3"))throw new c("The requested version disagrees with the position manager.");if(o.acceptUnverifiedHook!==void 0&&typeof o.acceptUnverifiedHook!="boolean")throw new c("acceptUnverifiedHook must be a boolean.");let b=o.acceptUnverifiedHook===!0;if(!g&&b)throw new c("Uniswap v3 has no hooks; omit acceptUnverifiedHook.");let s=g?"v4":"v3";if(typeof o.tokenId!="string")throw new c("Provide an NFT tokenId as a decimal string.");let f=String(o.tokenId).trim(),d=H(f),l=ue(o.feeRecipient,"Provide an explicit feeRecipient address for LP position locks."),p=e.clientFor(u),[x,I,h]=await Promise.all([ge(p),p.readContract({address:v,abi:O,functionName:"fixedFee"}),p.readContract({address:v,abi:O,functionName:"collectFeeBps"})]),y,$=!0;if(g){let P=U(["function getPoolAndPositionInfo(uint256 tokenId) view returns ((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey, uint256 info)","function getPositionLiquidity(uint256 tokenId) view returns (uint128)","function ownerOf(uint256 tokenId) view returns (address)"]),[Y,J,M]=await Promise.all([p.readContract({address:i,abi:P,functionName:"getPoolAndPositionInfo",args:[d]}),p.readContract({address:i,abi:P,functionName:"getPositionLiquidity",args:[d]}),p.readContract({address:i,abi:P,functionName:"ownerOf",args:[d]})]);if(m(M)!==a)throw new c("This wallet does not own that v4 position NFT.");if(J<=0n)throw new c("The v4 position has no liquidity to lock.");if(y=m(Y[0].hooks),$=y===ke||await p.readContract({address:v,abi:U(["function hookAllowed(address) view returns (bool)"]),functionName:"hookAllowed",args:[y]}),!$&&!b)throw new c(`Unverified v4 hook ${y}; review its risks and explicitly set acceptUnverifiedHook: true to proceed.`)}let A=ve(o.unlockTime,x),n=BigInt(I),r=Number(h);if(!Number.isInteger(r)||r<0||r>fe)throw new c(`Invalid on-chain collectFeeBps (${String(h)}).`);if(o.maxFee!==void 0){let P=H(String(o.maxFee));if(n>P)throw new c(`Live fixedFee (${n}) exceeds maxFee (${P}).`)}let w=Se(o.maxCollectFeeBps,r),L=(r/100).toString(),R=e.unsignedTx({to:i,data:z({abi:ye,functionName:"approve",args:[v,d]}),value:"0",chainId:u,description:`Approve Uniswap ${s} position NFT #${d} on ${i} for HoodLock LiquidityLocker ${v}.`}),F=e.unsignedTx({to:v,data:z({abi:O,functionName:"lock",args:[i,d,A,l,b,w]}),value:n.toString(),chainId:u,description:`Lock Uniswap ${s} NFT #${d} in HoodLock LiquidityLocker (${v}) until ${A} with feeRecipient ${l}, upfront fixedFee ${e.formatAmount(n.toString(),S.decimals)} ETH (${n} wei), and ongoing collect fee ${r} bps (${L}% of collected LP fees, frozen per lock).`}),X=[R,F],V=await e.preview(X,a),Q=`Approve and lock Uniswap ${s} NFT #${d} (manager ${i}) in HoodLock LiquidityLocker ${v} until Unix ${A}. Upfront fixedFee: ${e.formatAmount(n.toString(),S.decimals)} ETH (${n} wei). Ongoing LP fee share: ${r} bps (${L}% of collected LP fees, frozen per lock; maxCollectFeeBps=${w}) with feeRecipient ${l}. V4 hook: ${y??"none"}, reviewed: ${$}; acceptUnverifiedHook=${b}.`;return q(e,{txs:V.txs,summary:Q,preview:V,kind:s,contract:v,manager:i,tokenId:d.toString(),unlockTime:A.toString(),feeRecipient:l,acceptUnverifiedHook:b,collectFeeBps:r,maxCollectFeeBps:w,fixedFee:{token:S,amount:n.toString()}},v,n)}async function Ie(e,o,t){_(t);let a=m(t),k=E(o.token,"token"),i=e.clientFor(u),[g,b,s]=await Promise.all([ge(i),i.readContract({address:T,abi:D,functionName:"fee"}),oe(i,k,u)]),f=we(o.amount),d=ve(o.unlockTime,g),l=BigInt(b);if(o.maxFee!==void 0){let A=H(String(o.maxFee));if(l>A)throw new c(`Live lock fee (${l}) exceeds maxFee (${A}).`)}let p=e.approval(s.address,T,f.toString(),u),x=e.unsignedTx({to:T,data:z({abi:D,functionName:"lock",args:[s.address,f,d]}),value:l.toString(),chainId:u,description:`Lock ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) in HoodLock Locker ${T} until ${d} with exact fee ${e.formatAmount(l.toString(),S.decimals)} ETH (${l} wei).`}),I=[p,x],h=await e.preview(I,a),y=pe(e,h.changes),$=`Approve and lock ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) in HoodLock Locker ${T} until Unix ${d}. Exact fee: ${e.formatAmount(l.toString(),S.decimals)} ETH (${l} wei). Preview changes: ${y}.`;return q(e,{txs:h.txs,summary:$,preview:h,kind:"token",contract:T,token:s,amount:f.toString(),unlockTime:d.toString(),fee:{token:S,amount:l.toString()}},T,l)}function Pe(e){return{name:"hoodlock_lock",inputSchema:{type:"object",properties:{kind:{type:"string",enum:["token","v2","v3","v4"],description:"Lock mode: token/v2 LP via Locker, or Uniswap v3/v4 NFT via LiquidityLocker."},token:{type:"string",description:"ERC-20 token or v2 LP token contract address on chain 4663 (for token/v2 locks)."},amount:{type:"string",description:"Token amount as an integer string in base units (for token/v2 locks)."},manager:{type:"string",description:"Configured Uniswap v3 or v4 position manager; inferred from kind when omitted."},tokenId:{type:"string",description:"Uniswap NFT position tokenId as a decimal string."},feeRecipient:{type:"string",description:"Explicit recipient address for collected LP fees during a position lock."},acceptUnverifiedHook:{type:"boolean",description:"Explicit v4 unreviewed-hook consent; default false. A reviewed hook is not a safety guarantee."},maxFee:{type:"string",description:"Maximum upfront ETH fee in wei; the exact live fee is sent."},maxCollectFeeBps:{type:"number",description:"Maximum acceptable ongoing LP collect fee in bps (uint16, must be >= live collectFeeBps)."},unlockTime:{type:"string",description:"Unlock timestamp in Unix seconds (must be > now and <= now + 100 years)."}},required:["unlockTime"],additionalProperties:!1},async execute(o,t){return W(e,async()=>Le(o)?xe(e,o,t):Ie(e,o,t))}}}function Ce(e){return{name:"hoodlock_burn",inputSchema:{type:"object",properties:{token:{type:"string",description:"ERC-20 token contract address on chain 4663 to send to the dead address via HoodLock Burner."},amount:{type:"string",description:"Amount to burn as an integer string in base units."}},required:["token","amount"],additionalProperties:!1},async execute(o,t){return W(e,async()=>{_(t);let a=m(t),k=E(o.token,"token"),i=e.clientFor(u),[g,b,s]=await Promise.all([i.readContract({address:C,abi:ee,functionName:"fee"}),i.readContract({address:C,abi:ee,functionName:"DEAD"}),oe(i,k,u)]),f=we(o.amount),d=BigInt(g),l=m(b);if(o.maxFee!==void 0){let A=H(String(o.maxFee));if(d>A)throw new c(`Live burn fee (${d}) exceeds maxFee (${A}).`)}let p=e.approval(s.address,C,f.toString(),u),x=e.unsignedTx({to:C,data:z({abi:ee,functionName:"burn",args:[s.address,f]}),value:d.toString(),chainId:u,description:`Send ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) to the dead address (${l}) via HoodLock Burner ${C} (totalSupply is unchanged) with exact fee ${e.formatAmount(d.toString(),S.decimals)} ETH (${d} wei).`}),I=[p,x],h=await e.preview(I,a),y=pe(e,h.changes),$=`Approve and send ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) to the dead address (${l}) via HoodLock Burner ${C}. Note: tokens are transferred to ${l} and totalSupply is unchanged. Exact fee: ${e.formatAmount(d.toString(),S.decimals)} ETH (${d} wei). Preview changes: ${y}.`;return q(e,{txs:h.txs,summary:$,preview:h,contract:C,deadAddress:l,token:s,amount:f.toString(),fee:{token:S,amount:d.toString()},totalSupplyReduced:!1},C,d)})}}}async function be(e,o,t){_(o);let a=m(o),k=t?E(t,"token"):void 0,i=e.clientFor(u),g=[],b=new Set,s=n=>{for(let r of n){let w=r.toString();b.has(w)||(b.add(w),g.push(r))}};if(k){let[n,r]=await Promise.all([i.readContract({address:T,abi:D,functionName:"locksByToken",args:[k]}),i.readContract({address:T,abi:D,functionName:"locksByOwner",args:[a]})]);s(n),s(r)}else{let n=await i.readContract({address:T,abi:D,functionName:"locksByOwner",args:[a]});s(n)}let d=(await Promise.all(g.map(async n=>{let r=await i.readContract({address:T,abi:D,functionName:"getLock",args:[n]});return{id:n,owner:m(r[0]),token:m(r[1]),amount:BigInt(r[2]),unlockTime:BigInt(r[3]),withdrawn:!!r[4]}}))).filter(n=>!n.withdrawn&&n.amount>0n&&B(n.owner,a)&&(!k||B(n.token,k))),l=new Map,p=async n=>{let r=n.toLowerCase(),w=l.get(r);if(w)return w;let L=n===ke?S:await oe(i,n,u);return l.set(r,L),L},x=[],I=[];for(let n of d){let r=await p(n.token),w=n.amount.toString(),L=n.unlockTime.toString(),R={token:r,amount:w};x.push({lockId:n.id.toString(),kind:"token",contract:T,chainId:u,owner:n.owner,token:r,amount:w,asset:R,unlockTime:L,withdrawn:!1}),I.push({module:"hoodlock",id:`lock:${n.id.toString()}`,chainId:u,assets:[R],description:`HoodLock token lock #${n.id} of ${e.formatAmount(w,r.decimals)} ${r.symbol} (${r.address}) until Unix ${L}.`})}let h=await i.readContract({address:v,abi:O,functionName:"locksOf",args:[a]}),y=[...new Set(h.map(n=>n.toString()))].map(n=>BigInt(n)),$=[];for(let n of y){let r=await i.readContract({address:v,abi:O,functionName:"getLock",args:[n]}),[w,L,R,F,X,V,Q,P,Y,J]=r,M=m(w);if(V||!B(M,a))continue;let ne=m(P),te=m(Y);if(k&&!B(ne,k)&&!B(te,k))continue;let[ie,re]=await Promise.all([p(ne),p(te)]),se=m(Q),ae=Number(R),de=BigInt(L).toString(),Z=BigInt(J).toString();$.push({lockId:n.toString(),kind:F?"v4":"v3",contract:v,manager:F?K:j,chainId:u,owner:M,tokenId:Z,unlockTime:de,collectFeeBps:ae,feeRecipient:se,hookVerified:!!X,token0:ie,token1:re,withdrawn:!1}),I.push({module:"hoodlock",id:`lp-lock:${n.toString()}`,chainId:u,assets:[{token:{address:F?K:j,symbol:`UNI-${F?"V4":"V3"} #${Z}`,decimals:0,chainId:u},amount:"1"}],description:`HoodLock Uniswap ${F?"v4":"v3"} LP lock #${n} (NFT #${Z}, ${ie.symbol}/${re.symbol}, feeRecipient ${se}, collectFeeBps ${ae}) until Unix ${de}. One NFT held in LiquidityLocker custody for ${M}. Underlying token amounts are not valued.`})}let A=`Found ${x.length} active token lock(s) and ${$.length} active Uniswap v3/v4 LP lock(s) for ${a}.`;return{locks:x,lpLocks:$,positions:I,summary:A}}function Fe(e){return{name:"hoodlock_list_locks",inputSchema:{type:"object",properties:{owner:{type:"string",description:"Optional owner wallet address to query (defaults to the authenticated wallet)."},token:{type:"string",description:"Optional ERC-20 or LP token address to filter active locks owned by the wallet."}},additionalProperties:!1},async execute(o,t){let a=o.owner!==void 0?E(o.owner,"owner"):m(t),k=o.token!==void 0?E(o.token,"token"):void 0;return W(e,()=>be(e,a,k))}}}function Re(e){return async o=>(await W(e,()=>be(e,o))).positions}var G=e=>({tools:[Pe(e),Ce(e),Fe(e)],positions:Re(e)}),ze=G,je=G,Ke=e=>le("hoodlock",[G(e)]),We=G;export{T as a,C as b,v as c,j as d,K as e,qe as f,Ae as g,$e as h,Pe as i,Ce as j,Fe as k,Re as l,G as m,ze as n,je as o,Ke as p,We as q};
@@ -0,0 +1 @@
1
+ import{a as d,b as f}from"./C3ZZSGSP.js";import{a}from"./P4UQGWCP.js";import{g as s}from"./73N3TOJL.js";import{a as n}from"./5YS5V2LK.js";import{getAddress as m,keccak256 as u}from"viem";var l=a.vaults;function c(t,o=!0){let e=l.find(r=>s(r.earnContractAddress,t));if(!e&&o)throw new n("This Beefy vault is not in the pinned chain 4663 standard-vault inventory.");return e}async function v(t,o,e){c(o);let[r,i]=await Promise.all([t.getCode({address:m(o),blockNumber:e}),t.getCode({address:d,blockNumber:e})]),p=`0x363d3d373d3d3d363d73${d.slice(2).toLowerCase()}5af43d82803e903d91602b57fd5bf3`;if(r?.toLowerCase()!==p||!i||u(i)!==f)throw new n("The Beefy standard vault or implementation no longer matches its verified code.")}export{l as a,c as b,v as c};
@@ -0,0 +1 @@
1
+ import{c as t}from"./UXG67LH3.js";import{c as o}from"./HZUWK5B2.js";function s(e,n,a){return t(e,n,a,o)}export{s as a};
@@ -0,0 +1 @@
1
+ import{d as R}from"./6SB3FB3P.js";import{H as O,J as L,K as N,b as p,d as l,y as j}from"./FL3EF72E.js";import{a as D,f as H,g as b}from"./ITIIHCZK.js";import{g as d}from"./73N3TOJL.js";import{a as y}from"./XPFVT2EA.js";import{a as e}from"./5YS5V2LK.js";import{decodeAbiParameters as J,decodeFunctionData as A,encodeAbiParameters as K,encodeFunctionData as Q,erc20Abi as W,getAddress as Y,parseAbi as Z,parseAbiParameters as ee}from"viem";var U=Z(["function modifyLiquidities(bytes unlockData,uint256 deadline) payable"]),V=ee("bytes actions,bytes[] params");function de(f,$){return{tools:[{name:"uniswap_batch",inputSchema:{type:"object",additionalProperties:!1,required:["operations"],properties:{operations:{type:"array",minItems:1,maxItems:20,items:{type:"object",additionalProperties:!1,required:["name","arguments"],properties:{name:{type:"string",enum:["uniswap_add","uniswap_collect","uniswap_remove"]},arguments:{anyOf:[O,L,N]}}}}}},async execute(a,v){if(b(a,["operations"]),!Array.isArray(a.operations)||a.operations.length<1||a.operations.length>20)throw new e("Provide 1 to 20 v4 liquidity operations.");let s="0x",c,h=[],P=0n,g=new Map,_=new Set,E=new Set;for(let t of a.operations){if(!t||typeof t!="object"||Array.isArray(t))throw new e("Each operation needs name and arguments.");let o=t;if(b(o,["name","arguments"]),!["uniswap_add","uniswap_collect","uniswap_remove"].includes(String(o.name))||!o.arguments||typeof o.arguments!="object"||Array.isArray(o.arguments))throw new e("Batch supports v4 add, collect and remove operations only.");let r=o.arguments;if(r.version!=="v4")throw new e("Every batch operation must explicitly select version v4.");if(r.initialPrice!==void 0||r.sqrtPriceX96!==void 0)throw new e("Create a pool before batching its liquidity operations.");if(r.tokenId!==void 0){let n=D(r.tokenId,"tokenId").toString();if(E.has(n))throw new e("Batch tokenIds must be distinct decimal strings.");E.add(n)}else if(o.name!=="uniswap_add")throw new e("Existing-position operations require tokenId.");let I=await $.tools.find(n=>n.name===o.name).execute(r,v),u=I.txs.at(-1);if(!u||!d(u.to,p))throw new e("Batch operation returned an unexpected destination.");P+=BigInt(u.value);for(let n of I.txs.slice(0,-1)){if(BigInt(n.value)!==0n)throw new e("Batch prerequisite cannot send native currency.");if(d(n.to,l)){let i=A({abi:R,data:n.data}),[B,G,X,z]=i.args;if(!d(G,p))throw new e("Batch Permit2 spender must be PositionManager.");let T=B.toLowerCase(),m=g.get(T),q=BigInt(z),C=(m?.amount??0n)+X;if(C>=1n<<160n)throw new e("Batch approval exceeds uint160.");g.set(T,{token:B,amount:C,expiration:m&&m.expiration<q?m.expiration:q})}else{let i=A({abi:W,data:n.data});if(i.functionName!=="approve"||!d(i.args[0],l))throw new e("Unexpected batch prerequisite.")}}let S=A({abi:U,data:u.data}),[F,x]=J(V,S.args[0]),k=F.slice(2).match(/../g)??[];if(k.length!==x.length)throw new e("Batch action/parameter count differs.");k.forEach((n,i)=>{n==="14"?_.add(x[i]):(s=`${s}${n}`,h.push(x[i]))});let M=S.args[1];c=c===void 0||M<c?M:c}for(let t of _)s=`${s}14`,h.push(t);let w=[];for(let t of g.values())w.push(f.approval(Y(t.token),l,t.amount.toString(),y),j(t.token,p,t.amount.toString(),t.expiration.toString()));return w.push(f.unsignedTx({to:p,data:Q({abi:U,functionName:"modifyLiquidities",args:[K(V,[s,h]),c]}),value:P.toString(),chainId:y,description:`Atomically modify ${a.operations.length} v4 positions; recipients are the signing wallet.`})),H(f,w,v,"Atomic v4 batch: every operation must succeed. Each position retains its own minimums; preview covers the complete action stream.")}}]}}export{U as a,V as b,de as c};
@@ -0,0 +1 @@
1
+ var e=[{name:"claimContinuousFee",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"receiver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"claimSettlementFee",type:"function",inputs:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"receiver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"claimableSettlementFee",type:"function",inputs:[{name:"token",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"collateral",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"},{name:"index",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"collateralBitmap",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"configurator",type:"function",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{name:"consumed",type:"function",inputs:[{name:"user",type:"address",internalType:"address"},{name:"group",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"continuousFee",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint32",internalType:"uint32"}],stateMutability:"view"},{name:"continuousFeeCredit",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"credit",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"debt",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"defaultContinuousFee",type:"function",inputs:[{name:"loanToken",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint32",internalType:"uint32"}],stateMutability:"view"},{name:"defaultSettlementFeeCbp",type:"function",inputs:[{name:"loanToken",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{name:"enableLiquidationCursor",type:"function",inputs:[{name:"liquidationCursor",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"enableLltv",type:"function",inputs:[{name:"lltv",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"feeClaimer",type:"function",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{name:"feeSetter",type:"function",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{name:"isAuthorized",type:"function",inputs:[{name:"authorizer",type:"address",internalType:"address"},{name:"authorized",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{name:"isHealthy",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"id",type:"bytes32",internalType:"bytes32"},{name:"borrower",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{name:"isLiquidationCursorEnabled",type:"function",inputs:[{name:"liquidationCursor",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{name:"isLltvEnabled",type:"function",inputs:[{name:"lltv",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{name:"lastAccrual",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"lastLossFactor",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"liquidate",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"collateralIndex",type:"uint256",internalType:"uint256"},{name:"seizedAssets",type:"uint256",internalType:"uint256"},{name:"repaidUnits",type:"uint256",internalType:"uint256"},{name:"borrower",type:"address",internalType:"address"},{name:"postMaturityMode",type:"bool",internalType:"bool"},{name:"receiver",type:"address",internalType:"address"},{name:"callback",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{name:"liquidationLocked",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{name:"lossFactor",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"marketState",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"totalUnits",type:"uint128",internalType:"uint128"},{name:"lossFactor",type:"uint128",internalType:"uint128"},{name:"withdrawable",type:"uint128",internalType:"uint128"},{name:"continuousFeeCredit",type:"uint128",internalType:"uint128"},{name:"settlementFeeCbp0",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp1",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp2",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp3",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp4",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp5",type:"uint16",internalType:"uint16"},{name:"settlementFeeCbp6",type:"uint16",internalType:"uint16"},{name:"continuousFee",type:"uint32",internalType:"uint32"},{name:"tickSpacing",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"multicall",type:"function",inputs:[{name:"calls",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{name:"pendingFee",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"position",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"credit",type:"uint128",internalType:"uint128"},{name:"pendingFee",type:"uint128",internalType:"uint128"},{name:"lastLossFactor",type:"uint128",internalType:"uint128"},{name:"lastAccrual",type:"uint128",internalType:"uint128"},{name:"debt",type:"uint128",internalType:"uint128"},{name:"collateralBitmap",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"repay",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"units",type:"uint256",internalType:"uint256"},{name:"onBehalf",type:"address",internalType:"address"},{name:"callback",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"setConfigurator",type:"function",inputs:[{name:"newConfigurator",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"setConsumed",type:"function",inputs:[{name:"group",type:"bytes32",internalType:"bytes32"},{name:"amount",type:"uint128",internalType:"uint128"},{name:"onBehalf",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"setDefaultContinuousFee",type:"function",inputs:[{name:"loanToken",type:"address",internalType:"address"},{name:"newContinuousFee",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"setDefaultSettlementFee",type:"function",inputs:[{name:"loanToken",type:"address",internalType:"address"},{name:"index",type:"uint256",internalType:"uint256"},{name:"newSettlementFee",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"setFeeClaimer",type:"function",inputs:[{name:"newFeeClaimer",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"setFeeSetter",type:"function",inputs:[{name:"newFeeSetter",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"setIsAuthorized",type:"function",inputs:[{name:"authorized",type:"address",internalType:"address"},{name:"newIsAuthorized",type:"bool",internalType:"bool"},{name:"onBehalf",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"setMarketContinuousFee",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"newContinuousFee",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"setMarketSettlementFee",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"index",type:"uint256",internalType:"uint256"},{name:"newSettlementFee",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"setMarketTickSpacing",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"newTickSpacing",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"setTickSpacingSetter",type:"function",inputs:[{name:"newTickSpacingSetter",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"settlementFee",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"},{name:"timeToMaturity",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{name:"settlementFeeCbps",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint16[7]",internalType:"uint16[7]"}],stateMutability:"view"},{name:"supplyCollateral",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"collateralIndex",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"},{name:"onBehalf",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"take",type:"function",inputs:[{name:"offer",type:"tuple",components:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"buy",type:"bool",internalType:"bool"},{name:"maker",type:"address",internalType:"address"},{name:"start",type:"uint256",internalType:"uint256"},{name:"expiry",type:"uint256",internalType:"uint256"},{name:"tick",type:"uint256",internalType:"uint256"},{name:"group",type:"bytes32",internalType:"bytes32"},{name:"callback",type:"address",internalType:"address"},{name:"callbackData",type:"bytes",internalType:"bytes"},{name:"receiverIfMakerIsSeller",type:"address",internalType:"address"},{name:"ratifier",type:"address",internalType:"address"},{name:"reduceOnly",type:"bool",internalType:"bool"},{name:"maxUnits",type:"uint128",internalType:"uint128"},{name:"maxAssets",type:"uint128",internalType:"uint128"},{name:"continuousFeeCap",type:"uint256",internalType:"uint256"}],internalType:"struct Offer"},{name:"ratifierData",type:"bytes",internalType:"bytes"},{name:"units",type:"uint256",internalType:"uint256"},{name:"taker",type:"address",internalType:"address"},{name:"receiverIfTakerIsSeller",type:"address",internalType:"address"},{name:"takerCallback",type:"address",internalType:"address"},{name:"takerCallbackData",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{name:"tickSpacing",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint8",internalType:"uint8"}],stateMutability:"view"},{name:"tickSpacingSetter",type:"function",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{name:"toMarket",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"}],stateMutability:"view"},{name:"totalUnits",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"touchMarket",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{name:"updatePosition",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"},{name:"",type:"uint128",internalType:"uint128"},{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"nonpayable"},{name:"updatePositionView",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"id",type:"bytes32",internalType:"bytes32"},{name:"user",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint128",internalType:"uint128"},{name:"",type:"uint128",internalType:"uint128"},{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"},{name:"withdraw",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"units",type:"uint256",internalType:"uint256"},{name:"onBehalf",type:"address",internalType:"address"},{name:"receiver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"withdrawCollateral",type:"function",inputs:[{name:"market",type:"tuple",components:[{name:"chainId",type:"uint256",internalType:"uint256"},{name:"midnight",type:"address",internalType:"address"},{name:"loanToken",type:"address",internalType:"address"},{name:"collateralParams",type:"tuple[]",components:[{name:"token",type:"address",internalType:"address"},{name:"lltv",type:"uint256",internalType:"uint256"},{name:"liquidationCursor",type:"uint256",internalType:"uint256"},{name:"oracle",type:"address",internalType:"address"}],internalType:"struct CollateralParams[]"},{name:"maturity",type:"uint256",internalType:"uint256"},{name:"rcfThreshold",type:"uint256",internalType:"uint256"},{name:"enterGate",type:"address",internalType:"address"},{name:"liquidatorGate",type:"address",internalType:"address"}],internalType:"struct Market"},{name:"collateralIndex",type:"uint256",internalType:"uint256"},{name:"assets",type:"uint256",internalType:"uint256"},{name:"onBehalf",type:"address",internalType:"address"},{name:"receiver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"withdrawable",type:"function",inputs:[{name:"id",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint128",internalType:"uint128"}],stateMutability:"view"}];export{e as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./5YS5V2LK.js";import{createHash as c}from"node:crypto";function f(n){if(n===null||typeof n!="object"||Array.isArray(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||t===null}function s(n){if(n===null||typeof n=="boolean"||typeof n=="string")return JSON.stringify(n);if(typeof n=="number"){if(!Number.isSafeInteger(n))throw new o("Canonical JSON numbers must be safe integers; encode base-unit amounts as decimal strings.");return Object.is(n,-0)?"0":String(n)}if(typeof n=="bigint")throw new o("BigInt values must be encoded as decimal strings before JSON serialization.");if(Array.isArray(n)){let t=[];for(let r=0;r<n.length;r++){if(!Object.prototype.hasOwnProperty.call(n,r))throw new o(`Sparse arrays are not permitted in canonical JSON (missing index ${r}).`);t.push(s(n[r]))}return`[${t.join(",")}]`}if(f(n)){let t=Object.keys(n).sort((e,i)=>e<i?-1:e>i?1:0),r=[];for(let e of t){let i=n[e];if(i===void 0)throw new o(`Canonical JSON object key "${e}" must not be undefined.`);r.push(`${JSON.stringify(e)}:${s(i)}`)}return`{${r.join(",")}}`}throw new o("Unsupported value in canonical JSON.")}function p(n){return new TextEncoder().encode(s(n))}function g(n){return`0x${c("sha256").update(p(n)).digest("hex")}`}export{s as a,p as b,g as c};
@@ -1 +1 @@
1
- import{c as s}from"./MK6L6TGI.js";import{a as n}from"./5HCXZWUH.js";var i=new WeakMap;async function h(a,r,p){let e=new URL(r);if(!(e.origin==="https://aggregator-api.kyberswap.com"&&e.pathname==="/robinhood/api/v1/routes")&&!(e.origin==="https://api.velora.xyz"&&e.pathname==="/prices"))throw new Error("Only supported public price routes may be shared.");let t=i.get(a);t||(t=new n(3e3),i.set(a,t));let o=await t.read(r,()=>s(a,r,{method:"GET"},p));return{value:o.value,expiresAt:Math.floor(o.started/1e3)+60}}export{h as a};
1
+ import{c as s}from"./MYBDO5SA.js";import{a as n}from"./5HCXZWUH.js";var i=new WeakMap;async function h(a,r,p){let e=new URL(r);if(!(e.origin==="https://aggregator-api.kyberswap.com"&&e.pathname==="/robinhood/api/v1/routes")&&!(e.origin==="https://api.velora.xyz"&&e.pathname==="/prices"))throw new Error("Only supported public price routes may be shared.");let t=i.get(a);t||(t=new n(3e3),i.set(a,t));let o=await t.read(r,()=>s(a,r,{method:"GET"},p));return{value:o.value,expiresAt:Math.floor(o.started/1e3)+60}}export{h as a};
@@ -0,0 +1 @@
1
+ import{a as B}from"./CXMC3T6B.js";import{c as V}from"./7B5UH2VS.js";import{c as P}from"./T6MTTMLQ.js";import{b as M}from"./LFKSXD3S.js";import{k as R}from"./O47JXRXN.js";import{c as _}from"./OJP7Y4AM.js";import{b as H,o as F}from"./EAEQOS7Y.js";import{b as W}from"./AXYOJBX6.js";import{a as k}from"./6IM6A5VA.js";import{a as G}from"./UWOFA6GV.js";import{g as A,m as I,n as O}from"./73N3TOJL.js";import{a as m,i as U}from"./XPFVT2EA.js";import{a as u}from"./5YS5V2LK.js";import{encodeFunctionData as C,getAddress as b,parseAbi as q}from"viem";var c=q(["function asset() view returns (address)","function decimals() view returns (uint8)","function totalAssets() view returns (uint256)","function performanceFee() view returns (uint256)","function managementFee() view returns (uint256)","function balanceOf(address) view returns (uint256)","function previewDeposit(uint256 assets) view returns (uint256)","function previewRedeem(uint256 shares) view returns (uint256)","function deposit(uint256 assets,address receiver) returns (uint256 shares)","function redeem(uint256 shares,address receiver,address owner) returns (uint256 assets)"]),J=q(["function deposit() payable"]),f=U[m],T=[{key:"core",name:"Longbow Core USDG",vault:f.vaults.longbowCore.address,asset:f.tokens.USDG.address,symbol:"USDG",decimals:6},{key:"frontier",name:"Longbow Frontier USDG",vault:f.vaults.longbowFrontier.address,asset:f.tokens.USDG.address,symbol:"USDG",decimals:6},{key:"eth",name:"Longbow ETH",vault:f.vaults.longbowEth.address,asset:f.tokens.WETH.address,symbol:"WETH",decimals:18}],D=[{key:"v1-usdg",name:"Longbow USDG Core V1 (legacy)",vault:b("0x8cb8AA35228c96C1C4E956E69AbAEBCc2aA7Dcfe"),asset:f.tokens.USDG.address,symbol:"USDG",decimals:6},{key:"v1-weth",name:"Longbow WETH Core V1 (legacy)",vault:b("0x93777a9b917be3c8259c84456222f43a01dd6492"),asset:f.tokens.WETH.address,symbol:"WETH",decimals:18}];function x(a,i){return O(a,`${i} must be positive and within the uint256 range.`,{notString:`${i} must be a positive integer string in base units.`,positive:!0})}function h(a){return I(a,"Longbow returned an invalid integer response.")}function j(a,i=!1){if(typeof a!="string")throw new u("Provide the address of a current Longbow vault.");let p=D.find(y=>A(y.vault,a));if(p&&!i)throw new u("Longbow V1 vaults are withdraw-only; deposit into a current V2 vault from longbow_list instead.");let g=p??T.find(y=>A(y.vault,a));if(!g)throw new u("Provide the address of a current Longbow vault, or a Longbow V1 vault to withdraw from. Other vaults are not supported.");return g}function L(a,i){if(Object.keys(a).some(p=>!i.includes(p)))throw new u("Unsupported Longbow input. Use the fields in the tool schema.")}var Q=a=>{async function i(t){try{return await t()}catch(e){throw new u(a.plainError(e))}}async function p(){let t=a.clientFor(m);if(await t.getChainId()!==m)throw new u("Longbow requires a client on chain 4663.");return t}async function g(t,e){let[o,r,s]=await Promise.all([t.readContract({address:e.vault,abi:c,functionName:"asset"}),t.readContract({address:e.vault,abi:c,functionName:"decimals"}),t.readContract({address:e.asset,abi:c,functionName:"decimals"})]);if(typeof o!="string"||!A(o,e.asset))throw new u("Longbow vault asset does not match the recorded deployment.");if(r!==18||s!==e.decimals)throw new u("Longbow token decimals do not match the recorded deployment.");return{vault:e.vault,key:e.key,name:e.name,asset:{address:b(e.asset),symbol:e.symbol,decimals:s,chainId:m},share:{address:e.vault,symbol:`${e.key} shares`,decimals:r,chainId:m}}}async function y(t,e,o,r){let s=F(o.amount,H);if(BigInt(s)===0n)throw new u("The expected output is too small for a nonzero simulation minimum.");let n=await a.preview(t,e);if(n.changes.filter(l=>l.token.chainId===o.token.chainId&&A(l.token.address,o.token.address)&&l.token.decimals===o.token.decimals).reduce((l,v)=>l+BigInt(v.amount),0n)<BigInt(s))throw new u("Longbow simulated output is below the expected minimum.");let d=n.changes.map(({token:l,amount:v})=>{let N=v.startsWith("-");return`${N?"-":"+"}${a.formatAmount(N?v.slice(1):v,l.decimals)} ${l.symbol} (${l.address}, chain ${l.chainId})`}).join("; ");return{txs:t,preview:n,expectedOutput:o,minimumOutput:{token:o.token,amount:s},minimumEnforcedOnchain:!1,summary:`${r} ${d}. Simulation only; no on-chain minimum is enforced by these ERC-4626 calls. ${n.summary}`}}async function z(t){L(t,[]);let e=await p();return Promise.all(T.map(async o=>{let[r,s,n,w]=await Promise.all([g(e,o),e.readContract({address:o.vault,abi:c,functionName:"totalAssets"}),e.readContract({address:o.vault,abi:c,functionName:"performanceFee"}),e.readContract({address:o.vault,abi:c,functionName:"managementFee"})]);return{...r,totalAssets:{token:r.asset,amount:h(s).toString()},fees:{performanceFeeE18:h(n).toString(),managementFeeE18:h(w).toString()},caveat:"Morpho V2 max views can be zero even when writes succeed. Simulate the requested action; listing does not prove availability."}}))}async function Y(t,e){L(t,["vault","amount","wrapEth"]),k(e);let o=j(t.vault),r=x(t.amount,"Deposit amount");if(t.wrapEth!==void 0&&typeof t.wrapEth!="boolean")throw new u("wrapEth must be a boolean.");if(t.wrapEth&&!A(o.asset,f.tokens.WETH.address))throw new u("Only a WETH vault accepts explicit ETH wrapping.");let s=await p(),n=await g(s,o),w=h(await s.readContract({address:n.vault,abi:c,functionName:"previewDeposit",args:[r]})),d=[];return t.wrapEth&&d.push(a.unsignedTx({to:n.asset.address,data:C({abi:J,functionName:"deposit"}),value:r.toString(),chainId:m,description:`Wrap ${a.formatAmount(r.toString(),18)} ETH into WETH for ${n.name}.`})),d.push(a.approval(n.asset.address,n.vault,r.toString(),m)),d.push(a.unsignedTx({to:n.vault,data:C({abi:c,functionName:"deposit",args:[r,b(e)]}),value:"0",chainId:m,description:`Deposit ${a.formatAmount(r.toString(),n.asset.decimals)} ${n.asset.symbol} into ${n.name}.`})),y(d,e,{token:n.share,amount:w.toString()},`Deposit into ${n.name}.`)}async function K(t,e){L(t,["vault","shares"]),k(e);let o=j(t.vault,!0),r=t.shares==="all"?void 0:x(t.shares,"Redeem shares"),s=await p(),n=await g(s,o),w=h(await s.readContract({address:n.vault,abi:c,functionName:"balanceOf",args:[e]})),d=r??w;if(d===0n||d>w)throw new u("The wallet has insufficient Longbow shares for this redemption.");let l=h(await s.readContract({address:n.vault,abi:c,functionName:"previewRedeem",args:[d]})),v=[a.unsignedTx({to:n.vault,data:C({abi:c,functionName:"redeem",args:[d,b(e),b(e)]}),value:"0",chainId:m,description:`Redeem ${a.formatAmount(d.toString(),n.share.decimals)} shares from ${n.name} into ${n.asset.symbol}.`})];return y(v,e,{token:n.asset,amount:l.toString()},`Redeem from ${n.name}.`)}let E={type:"string",enum:T.map(t=>t.vault),description:"Current vault address on chain 4663."},$=G("Positive integer base units, never a human-unit decimal."),S=(t,e,o,r)=>({name:t,inputSchema:{type:"object",properties:e,required:o,additionalProperties:!1},execute:(s,n)=>i(()=>r(s,n))});return{tools:[S("longbow_list",{},[],z),S("longbow_deposit",{vault:E,amount:$,wrapEth:{type:"boolean",default:!1,description:"Explicitly wrap this amount of native ETH before depositing into the WETH vault."}},["vault","amount"],Y),S("longbow_withdraw",{vault:{...E,enum:[...E.enum,...D.map(t=>t.vault)],description:"Current vault address, or a Longbow V1 vault (withdraw-only) on chain 4663."},shares:{anyOf:[$,{const:"all"}],description:"Share base units (18 decimals), or all for the fresh wallet share balance. Returns the underlying asset, including WETH."}},["vault","shares"],K)],positions:t=>i(async()=>{k(t);let e=await p();return(await Promise.all([...T,...D].map(async r=>{let s=await g(e,r),n=h(await e.readContract({address:s.vault,abi:c,functionName:"balanceOf",args:[t]}));if(n===0n)return[];let w=h(await e.readContract({address:s.vault,abi:c,functionName:"previewRedeem",args:[n]}));return[{module:"longbow",id:`${m}:${s.vault.toLowerCase()}`,chainId:m,assets:[{token:s.asset,amount:w.toString()}],description:`${s.name}: ${a.formatAmount(n.toString(),s.share.decimals)} shares (${s.share.address}, ${s.share.decimals} decimals). Underlying is a preview, not a guaranteed redemption.`}]}))).flat()})}};function we(a){return W("longbow",[Q(a),P(a),R(a),V(a),M(a),_(a),{tools:B(a,"longbow",T.map(i=>({vault:i.vault,asset:{address:b(i.asset),symbol:i.symbol,decimals:i.decimals,chainId:m}})))}])}export{D as a,Q as b,we as c};