@oakagentkit/core 0.2.7 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/build/dist/api/addresses.d.ts +9 -0
  2. package/build/dist/api/addresses.js +1 -1
  3. package/build/dist/api/chain.d.ts +4 -0
  4. package/build/dist/api/chain.js +1 -1
  5. package/build/dist/api/history.js +1 -1
  6. package/build/dist/api/identity-link.js +1 -1
  7. package/build/dist/api/metadata.js +1 -1
  8. package/build/dist/api/modules/beefy/boosts.js +1 -1
  9. package/build/dist/api/modules/beefy/clm.d.ts +9 -0
  10. package/build/dist/api/modules/beefy/clm.js +1 -1
  11. package/build/dist/api/modules/beefy/guard.js +1 -1
  12. package/build/dist/api/modules/beefy/index.js +1 -1
  13. package/build/dist/api/modules/beefy/liquidity.js +1 -1
  14. package/build/dist/api/modules/beefy/management.js +1 -1
  15. package/build/dist/api/modules/beefy/vaults.js +1 -1
  16. package/build/dist/api/modules/borro/abi.d.ts +54 -0
  17. package/build/dist/api/modules/borro/abi.js +1 -1
  18. package/build/dist/api/modules/borro/actions.d.ts +14 -1
  19. package/build/dist/api/modules/borro/actions.js +1 -1
  20. package/build/dist/api/modules/borro/checks.js +1 -1
  21. package/build/dist/api/modules/borro/copy.d.ts +10 -2
  22. package/build/dist/api/modules/borro/copy.js +1 -1
  23. package/build/dist/api/modules/borro/index.js +1 -1
  24. package/build/dist/api/modules/borro/liquidity.js +1 -1
  25. package/build/dist/api/modules/borro/pins.d.ts +30 -14
  26. package/build/dist/api/modules/borro/pins.js +1 -1
  27. package/build/dist/api/modules/borro/positions.js +1 -1
  28. package/build/dist/api/modules/borro/reader.js +1 -1
  29. package/build/dist/api/modules/borro/types.d.ts +1 -0
  30. package/build/dist/api/modules/chop/actions.js +1 -1
  31. package/build/dist/api/modules/chop/checks.js +1 -1
  32. package/build/dist/api/modules/chop/copy.js +1 -1
  33. package/build/dist/api/modules/chop/guard.js +1 -1
  34. package/build/dist/api/modules/chop/index.js +1 -1
  35. package/build/dist/api/modules/chop/pins.d.ts +13 -0
  36. package/build/dist/api/modules/chop/pins.js +1 -1
  37. package/build/dist/api/modules/chop/positions.js +1 -1
  38. package/build/dist/api/modules/chop/reader.js +1 -1
  39. package/build/dist/api/modules/clanker/extensions.js +1 -1
  40. package/build/dist/api/modules/clanker/index.js +1 -1
  41. package/build/dist/api/modules/clanker/manage.js +1 -1
  42. package/build/dist/api/modules/clanker/pool-config.js +1 -1
  43. package/build/dist/api/modules/clanker/protocol.js +1 -1
  44. package/build/dist/api/modules/clanker/state.js +1 -1
  45. package/build/dist/api/modules/earn/copy.d.ts +6 -6
  46. package/build/dist/api/modules/earn/copy.js +1 -1
  47. package/build/dist/api/modules/earn/cost.d.ts +1 -1
  48. package/build/dist/api/modules/earn/cost.js +1 -1
  49. package/build/dist/api/modules/earn/index.js +1 -1
  50. package/build/dist/api/modules/earn/lp.js +1 -1
  51. package/build/dist/api/modules/earn/options.js +1 -1
  52. package/build/dist/api/modules/erc8004/common.js +1 -1
  53. package/build/dist/api/modules/erc8004/domain.js +1 -1
  54. package/build/dist/api/modules/erc8004/index.js +1 -1
  55. package/build/dist/api/modules/erc8004/management.js +1 -1
  56. package/build/dist/api/modules/erc8004/reputation.js +1 -1
  57. package/build/dist/api/modules/erc8004/services.js +1 -1
  58. package/build/dist/api/modules/erc8004/thesis.d.ts +61 -0
  59. package/build/dist/api/modules/erc8004/thesis.js +1 -0
  60. package/build/dist/api/modules/erc8004/validation.js +1 -1
  61. package/build/dist/api/modules/fobo/client.d.ts +9 -0
  62. package/build/dist/api/modules/fobo/client.js +1 -0
  63. package/build/dist/api/modules/fobo/index.d.ts +16 -0
  64. package/build/dist/api/modules/fobo/index.js +1 -0
  65. package/build/dist/api/modules/fobo/intent.d.ts +243 -0
  66. package/build/dist/api/modules/fobo/intent.js +1 -0
  67. package/build/dist/api/modules/fobo/pins.d.ts +178 -0
  68. package/build/dist/api/modules/fobo/pins.js +1 -0
  69. package/build/dist/api/modules/fobo/steps.d.ts +25 -0
  70. package/build/dist/api/modules/fobo/steps.js +1 -0
  71. package/build/dist/api/modules/fobo/verify.d.ts +89 -0
  72. package/build/dist/api/modules/fobo/verify.js +1 -0
  73. package/build/dist/api/modules/gloam/copy.d.ts +1 -1
  74. package/build/dist/api/modules/gloam/copy.js +1 -1
  75. package/build/dist/api/modules/gloam/index.js +1 -1
  76. package/build/dist/api/modules/grove/index.js +1 -1
  77. package/build/dist/api/modules/heyresearch/builder-feed.js +1 -1
  78. package/build/dist/api/modules/heyresearch/index.js +1 -1
  79. package/build/dist/api/modules/heyresearch/public-reads.js +1 -1
  80. package/build/dist/api/modules/heyresearch/token-facts.js +1 -1
  81. package/build/dist/api/modules/hoodag/chain-reads.js +1 -1
  82. package/build/dist/api/modules/hoodag/index.d.ts +12 -1
  83. package/build/dist/api/modules/hoodag/index.js +1 -1
  84. package/build/dist/api/modules/hoodag/management.js +1 -1
  85. package/build/dist/api/modules/hoodag/public-reads.js +1 -1
  86. package/build/dist/api/modules/hoodag/reconstruct.d.ts +14 -0
  87. package/build/dist/api/modules/hoodag/reconstruct.js +1 -1
  88. package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
  89. package/build/dist/api/modules/hoodlock/buyback.js +1 -1
  90. package/build/dist/api/modules/hoodlock/commerce.js +1 -1
  91. package/build/dist/api/modules/hoodlock/fee.js +1 -1
  92. package/build/dist/api/modules/hoodlock/guard.js +1 -1
  93. package/build/dist/api/modules/hoodlock/index.js +1 -1
  94. package/build/dist/api/modules/hoodlock/lifecycle.js +1 -1
  95. package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
  96. package/build/dist/api/modules/hoodlock/public.js +1 -1
  97. package/build/dist/api/modules/hookr/actions.js +1 -1
  98. package/build/dist/api/modules/hookr/addons.js +1 -1
  99. package/build/dist/api/modules/hookr/agent-gate.js +1 -1
  100. package/build/dist/api/modules/hookr/contracts.js +1 -1
  101. package/build/dist/api/modules/hookr/create-cancel.js +1 -1
  102. package/build/dist/api/modules/hookr/discovery.js +1 -1
  103. package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
  104. package/build/dist/api/modules/hookr/index.js +1 -1
  105. package/build/dist/api/modules/hookr/launch-options.js +1 -1
  106. package/build/dist/api/modules/hookr/launch-receipt.js +1 -1
  107. package/build/dist/api/modules/hookr/launch.js +1 -1
  108. package/build/dist/api/modules/hookr/liquidity.js +1 -1
  109. package/build/dist/api/modules/hookr/lp-positions.js +1 -1
  110. package/build/dist/api/modules/hookr/lp-reads.js +1 -1
  111. package/build/dist/api/modules/hookr/lp-receipt.js +1 -1
  112. package/build/dist/api/modules/hookr/lp-state.js +1 -1
  113. package/build/dist/api/modules/hookr/public-reads.js +1 -1
  114. package/build/dist/api/modules/hookr/read-utils.js +1 -1
  115. package/build/dist/api/modules/hookr/relay.js +1 -1
  116. package/build/dist/api/modules/hookr/revenue.js +1 -1
  117. package/build/dist/api/modules/kyberswap/index.d.ts +2 -1
  118. package/build/dist/api/modules/kyberswap/index.js +1 -1
  119. package/build/dist/api/modules/kyberswap/source-pools.js +1 -1
  120. package/build/dist/api/modules/layerbank/abi.js +1 -1
  121. package/build/dist/api/modules/layerbank/actions.js +1 -1
  122. package/build/dist/api/modules/layerbank/checks.js +1 -1
  123. package/build/dist/api/modules/layerbank/index.js +1 -1
  124. package/build/dist/api/modules/layerbank/merkl.js +1 -1
  125. package/build/dist/api/modules/layerbank/reader.js +1 -1
  126. package/build/dist/api/modules/layerbank/reserve.js +1 -1
  127. package/build/dist/api/modules/lighter/index.js +1 -1
  128. package/build/dist/api/modules/longbow/administration.js +1 -1
  129. package/build/dist/api/modules/longbow/analytics.js +1 -1
  130. package/build/dist/api/modules/longbow/fixed.js +1 -1
  131. package/build/dist/api/modules/longbow/index.js +1 -1
  132. package/build/dist/api/modules/longbow/nft.js +1 -1
  133. package/build/dist/api/modules/longbow/rebates.js +1 -1
  134. package/build/dist/api/modules/longbow/staking.js +1 -1
  135. package/build/dist/api/modules/meridian/index.js +1 -1
  136. package/build/dist/api/modules/meridian/markets.js +1 -1
  137. package/build/dist/api/modules/meridian/predict-read.js +1 -1
  138. package/build/dist/api/modules/meridian/rfq.js +1 -1
  139. package/build/dist/api/modules/merkl/discovery.js +1 -1
  140. package/build/dist/api/modules/merkl/index.js +1 -1
  141. package/build/dist/api/modules/merkl/manage.js +1 -1
  142. package/build/dist/api/modules/merkl/protocol.js +1 -1
  143. package/build/dist/api/modules/morpho/allocator.js +1 -1
  144. package/build/dist/api/modules/morpho/bundles.js +1 -1
  145. package/build/dist/api/modules/morpho/in-kind.js +1 -1
  146. package/build/dist/api/modules/morpho/index.js +1 -1
  147. package/build/dist/api/modules/morpho/local-guard.d.ts +2 -1
  148. package/build/dist/api/modules/morpho/local-guard.js +1 -1
  149. package/build/dist/api/modules/morpho/midnight.js +1 -1
  150. package/build/dist/api/modules/morpho/protocol.js +1 -1
  151. package/build/dist/api/modules/morpho/surface.js +1 -1
  152. package/build/dist/api/modules/morpho/vault-management.js +1 -1
  153. package/build/dist/api/modules/morpho/vault-tools.js +1 -1
  154. package/build/dist/api/modules/morpho/vault-v2.js +1 -1
  155. package/build/dist/api/modules/netnet/card-plan.js +1 -1
  156. package/build/dist/api/modules/netnet/card-policy.d.ts +1 -0
  157. package/build/dist/api/modules/netnet/card-policy.js +1 -1
  158. package/build/dist/api/modules/netnet/card-read.js +1 -1
  159. package/build/dist/api/modules/netnet/card-recovery.js +1 -1
  160. package/build/dist/api/modules/netnet/desk-action.js +1 -1
  161. package/build/dist/api/modules/netnet/desk-read.js +1 -1
  162. package/build/dist/api/modules/netnet/financial.js +1 -1
  163. package/build/dist/api/modules/netnet/index.js +1 -1
  164. package/build/dist/api/modules/netnet/staking.js +1 -1
  165. package/build/dist/api/modules/orbio/index.d.ts +6 -0
  166. package/build/dist/api/modules/orbio/index.js +1 -1
  167. package/build/dist/api/modules/orbio/positions.js +1 -1
  168. package/build/dist/api/modules/pendle/costs.js +1 -1
  169. package/build/dist/api/modules/pendle/index.js +1 -1
  170. package/build/dist/api/modules/pendle/markets.js +1 -1
  171. package/build/dist/api/modules/pendle/positions.js +1 -1
  172. package/build/dist/api/modules/pendle/pricecheck.js +1 -1
  173. package/build/dist/api/modules/pendle/reader.js +1 -1
  174. package/build/dist/api/modules/pendle/redeem.js +1 -1
  175. package/build/dist/api/modules/pendle/trade.js +1 -1
  176. package/build/dist/api/modules/pendle/validate.js +1 -1
  177. package/build/dist/api/modules/pendle/verify.js +1 -1
  178. package/build/dist/api/modules/pons/claim.js +1 -1
  179. package/build/dist/api/modules/pons/index.js +1 -1
  180. package/build/dist/api/modules/pons/launch-status.js +1 -1
  181. package/build/dist/api/modules/pons/prices.js +1 -1
  182. package/build/dist/api/modules/pons/reads.js +1 -1
  183. package/build/dist/api/modules/pons/swap-terms.d.ts +2 -8
  184. package/build/dist/api/modules/pons/swap-terms.js +1 -1
  185. package/build/dist/api/modules/pons/trade.js +1 -1
  186. package/build/dist/api/modules/poolstrade/index.js +1 -1
  187. package/build/dist/api/modules/priors/coverage.js +1 -1
  188. package/build/dist/api/modules/priors/discovery.js +1 -1
  189. package/build/dist/api/modules/priors/features.js +1 -1
  190. package/build/dist/api/modules/priors/holdings.js +1 -1
  191. package/build/dist/api/modules/priors/index.js +1 -1
  192. package/build/dist/api/modules/priors/integration.js +1 -1
  193. package/build/dist/api/modules/priors/market.js +1 -1
  194. package/build/dist/api/modules/priors/pt.js +1 -1
  195. package/build/dist/api/modules/priors/savings-exit.js +1 -1
  196. package/build/dist/api/modules/priors/starter-line.js +1 -1
  197. package/build/dist/api/modules/priors/stock-swap.js +1 -1
  198. package/build/dist/api/modules/relay/api.js +1 -1
  199. package/build/dist/api/modules/relay/bootstrap.js +1 -1
  200. package/build/dist/api/modules/relay/discovery.js +1 -1
  201. package/build/dist/api/modules/relay/inbound.js +1 -1
  202. package/build/dist/api/modules/relay/index.js +1 -1
  203. package/build/dist/api/modules/relay/order.js +1 -1
  204. package/build/dist/api/modules/relay/outbound-status.js +1 -1
  205. package/build/dist/api/modules/relay/readiness.js +1 -1
  206. package/build/dist/api/modules/relay/reads.js +1 -1
  207. package/build/dist/api/modules/relay/vaults.js +1 -1
  208. package/build/dist/api/modules/spark/actions.js +1 -1
  209. package/build/dist/api/modules/spark/details.js +1 -1
  210. package/build/dist/api/modules/spark/index.js +1 -1
  211. package/build/dist/api/modules/spark/management.js +1 -1
  212. package/build/dist/api/modules/steakhouse/analytics.js +1 -1
  213. package/build/dist/api/modules/steakhouse/erc4626.js +1 -1
  214. package/build/dist/api/modules/steakhouse/index.js +1 -1
  215. package/build/dist/api/modules/steakhouse/local-guard.js +1 -1
  216. package/build/dist/api/modules/steakhouse/management.js +1 -1
  217. package/build/dist/api/modules/steakhouse/v2-exit.js +1 -1
  218. package/build/dist/api/modules/tickerspring/basket-routes.js +1 -1
  219. package/build/dist/api/modules/tickerspring/contract-reads.js +1 -1
  220. package/build/dist/api/modules/tickerspring/discovery.js +1 -1
  221. package/build/dist/api/modules/tickerspring/exit-preview.js +1 -1
  222. package/build/dist/api/modules/tickerspring/guards.js +1 -1
  223. package/build/dist/api/modules/tickerspring/index.js +1 -1
  224. package/build/dist/api/modules/tickerspring/journeys.js +1 -1
  225. package/build/dist/api/modules/tickerspring/ladder.js +1 -1
  226. package/build/dist/api/modules/tickerspring/maker.js +1 -1
  227. package/build/dist/api/modules/tickerspring/order-accounting.js +1 -1
  228. package/build/dist/api/modules/tickerspring/research.js +1 -1
  229. package/build/dist/api/modules/tickerspring/strategies.js +1 -1
  230. package/build/dist/api/modules/uniswap/auction-create.js +1 -1
  231. package/build/dist/api/modules/uniswap/auction.js +1 -1
  232. package/build/dist/api/modules/uniswap/batch.js +1 -1
  233. package/build/dist/api/modules/uniswap/common.js +1 -1
  234. package/build/dist/api/modules/uniswap/fees.js +1 -1
  235. package/build/dist/api/modules/uniswap/index.js +1 -1
  236. package/build/dist/api/modules/uniswap/local-guard.js +1 -1
  237. package/build/dist/api/modules/uniswap/oracle.js +1 -1
  238. package/build/dist/api/modules/uniswap/pool-math.js +1 -1
  239. package/build/dist/api/modules/uniswap/pools.js +1 -1
  240. package/build/dist/api/modules/uniswap/position.js +1 -1
  241. package/build/dist/api/modules/uniswap/protocol.js +1 -1
  242. package/build/dist/api/modules/uniswap/quote-guard.js +1 -1
  243. package/build/dist/api/modules/uniswap/token-jar.js +1 -1
  244. package/build/dist/api/modules/uniswap/trade-batch.js +1 -1
  245. package/build/dist/api/modules/uniswap/trade.js +1 -1
  246. package/build/dist/api/modules/uniswap/v2.js +1 -1
  247. package/build/dist/api/modules/uniswap/v3.js +1 -1
  248. package/build/dist/api/modules/uniswap/v4.js +1 -1
  249. package/build/dist/api/modules/uniswap/wrap.js +1 -1
  250. package/build/dist/api/modules/upoch/copy.d.ts +5 -0
  251. package/build/dist/api/modules/upoch/copy.js +1 -0
  252. package/build/dist/api/modules/upoch/index.d.ts +8 -0
  253. package/build/dist/api/modules/upoch/index.js +1 -0
  254. package/build/dist/api/modules/upoch/pins.d.ts +8 -0
  255. package/build/dist/api/modules/upoch/pins.js +1 -0
  256. package/build/dist/api/modules/upoch/reads.d.ts +509 -0
  257. package/build/dist/api/modules/upoch/reads.js +1 -0
  258. package/build/dist/api/modules/velora/claims.js +1 -1
  259. package/build/dist/api/modules/velora/delta-reads.js +1 -1
  260. package/build/dist/api/modules/velora/index.js +1 -1
  261. package/build/dist/api/modules/wormhole/index.js +1 -1
  262. package/build/dist/api/modules/wormhole/x402-client.d.ts +17 -1
  263. package/build/dist/api/modules/wormhole/x402-client.js +1 -1
  264. package/build/dist/api/positions.js +1 -1
  265. package/build/dist/api/pricenote.js +1 -1
  266. package/build/dist/api/prices.d.ts +5 -0
  267. package/build/dist/api/prices.js +1 -1
  268. package/build/dist/api/pricing.js +1 -1
  269. package/build/dist/api/rpc.js +1 -1
  270. package/build/dist/api/secret-fields.d.ts +2 -0
  271. package/build/dist/api/secret-fields.js +1 -1
  272. package/build/dist/api/send.js +1 -1
  273. package/build/dist/api/signing-registry.js +1 -1
  274. package/build/dist/api/signing.js +1 -1
  275. package/build/dist/api/simulate.js +1 -1
  276. package/build/dist/api/swap.d.ts +1 -0
  277. package/build/dist/api/swap.js +1 -1
  278. package/build/dist/api/tokens.js +1 -1
  279. package/build/dist/api/tool-policy.d.ts +1 -0
  280. package/build/dist/api/tool-policy.js +1 -1
  281. package/build/dist/api/universal-router.d.ts +45 -0
  282. package/build/dist/api/universal-router.js +1 -0
  283. package/build/dist/api/usd-estimate.js +1 -1
  284. package/build/dist/chunks/{ZOMFHTB2.js → 22TU5PFT.js} +1 -1
  285. package/build/dist/chunks/23HNDJ76.js +2 -0
  286. package/build/dist/chunks/{ZFU65MB4.js → 257N7343.js} +1 -1
  287. package/build/dist/chunks/{F3VDVTMS.js → 27PVS6BU.js} +1 -1
  288. package/build/dist/chunks/{N245WC5R.js → 2JWAFLJU.js} +1 -1
  289. package/build/dist/chunks/{GQYV4TFO.js → 2OVJ2BTJ.js} +1 -1
  290. package/build/dist/chunks/{JS53DQVT.js → 35LXCSHY.js} +1 -1
  291. package/build/dist/chunks/{V37L4DU4.js → 3A2IKFTV.js} +1 -1
  292. package/build/dist/chunks/{OYPAVXGQ.js → 3BMM3V4P.js} +1 -1
  293. package/build/dist/chunks/{ZKZUS3QU.js → 3FU6XP6S.js} +1 -1
  294. package/build/dist/chunks/{BB765L75.js → 3PHJUFU2.js} +1 -1
  295. package/build/dist/chunks/{FWIFTPSE.js → 3PU2SD3U.js} +1 -1
  296. package/build/dist/chunks/{SBY4RJ7I.js → 3ZH5SOC2.js} +1 -1
  297. package/build/dist/chunks/43BG2JRB.js +1 -0
  298. package/build/dist/chunks/{YTLH4M4Y.js → 47HSRR7G.js} +1 -1
  299. package/build/dist/chunks/4NBXBKOX.js +2 -0
  300. package/build/dist/chunks/{EZZM2GQT.js → 4NDIYRH5.js} +1 -1
  301. package/build/dist/chunks/{FOKEFXGP.js → 4PLLS6CT.js} +1 -1
  302. package/build/dist/chunks/4RCYYN6O.js +1 -0
  303. package/build/dist/chunks/{XHYFISVV.js → 4Z3IGMU6.js} +1 -1
  304. package/build/dist/chunks/4ZD5D2UP.js +1 -0
  305. package/build/dist/chunks/{CSDN4MYP.js → 5GQJVKVY.js} +1 -1
  306. package/build/dist/chunks/{QFSBDPLN.js → 65OITTDL.js} +1 -1
  307. package/build/dist/chunks/{4FPV4CRC.js → 6D3XNCOX.js} +1 -1
  308. package/build/dist/chunks/{DSTMEY5F.js → 6F527FLN.js} +1 -1
  309. package/build/dist/chunks/{O3JWCJIF.js → 6GWXPQZ6.js} +1 -1
  310. package/build/dist/chunks/{32RXFUOH.js → 73BZPPRS.js} +1 -1
  311. package/build/dist/chunks/75SULXNT.js +1 -0
  312. package/build/dist/chunks/{WU7XIAXB.js → 7EACRKFV.js} +1 -1
  313. package/build/dist/chunks/{SKEKXEUU.js → 7FIEBJOZ.js} +1 -1
  314. package/build/dist/chunks/{4GNUXN4K.js → 7FZXSYFD.js} +1 -1
  315. package/build/dist/chunks/{ZP36DSOD.js → 7TSIF3F4.js} +1 -1
  316. package/build/dist/chunks/{AMTRDPVO.js → 7U62MMUQ.js} +1 -1
  317. package/build/dist/chunks/{DW4V5PUY.js → 7VH6JQ2H.js} +1 -1
  318. package/build/dist/chunks/A3BJSQ23.js +1 -0
  319. package/build/dist/chunks/{YSMWCKIX.js → ADIPEGNN.js} +1 -1
  320. package/build/dist/chunks/AG2G7BHH.js +6 -0
  321. package/build/dist/chunks/AIYNFIG6.js +1 -0
  322. package/build/dist/chunks/ANIF3JMV.js +4 -0
  323. package/build/dist/chunks/{4JTTA3BX.js → AWV24X7F.js} +1 -1
  324. package/build/dist/chunks/{7QKYDNF6.js → AXHFNE6L.js} +1 -1
  325. package/build/dist/chunks/{WOGWLFAL.js → BGVC5NI6.js} +1 -1
  326. package/build/dist/chunks/BJK75C7G.js +1 -0
  327. package/build/dist/chunks/BSX4LFYI.js +1 -0
  328. package/build/dist/chunks/{OYJFXEDU.js → BZPFPQ2I.js} +1 -1
  329. package/build/dist/chunks/{5PI57UC2.js → C76D54YG.js} +1 -1
  330. package/build/dist/chunks/{TDZTC5WR.js → DBOGRUPS.js} +1 -1
  331. package/build/dist/chunks/{HHO5ISMM.js → DCGNVMKG.js} +1 -1
  332. package/build/dist/chunks/{Y77EVVT4.js → DGDMRATN.js} +1 -1
  333. package/build/dist/chunks/{EGZREEG2.js → DLNA5272.js} +1 -1
  334. package/build/dist/chunks/{TM7Z5SA4.js → DMDOSHV7.js} +1 -1
  335. package/build/dist/chunks/{WHVZ372B.js → DRLBTB4E.js} +1 -1
  336. package/build/dist/chunks/DXAPKN7H.js +1 -0
  337. package/build/dist/chunks/{FZ6IJZZM.js → E76Z2TT4.js} +1 -1
  338. package/build/dist/chunks/{67BWOVET.js → EHGH646D.js} +1 -1
  339. package/build/dist/chunks/{KKPMOAVI.js → ELHRXA5U.js} +1 -1
  340. package/build/dist/chunks/{PZEF5LBL.js → ETMD747Y.js} +1 -1
  341. package/build/dist/chunks/{XCKTE4ON.js → F7MGYRPU.js} +1 -1
  342. package/build/dist/chunks/{MRMR4QHA.js → FAH7FKUT.js} +1 -1
  343. package/build/dist/chunks/FXOFR432.js +1 -0
  344. package/build/dist/chunks/{VHV6WQ5F.js → G2AA73ZE.js} +1 -1
  345. package/build/dist/chunks/{JWR5XVP2.js → GBIBRYOV.js} +1 -1
  346. package/build/dist/chunks/{FNGIJKMZ.js → GDOHHXNH.js} +1 -1
  347. package/build/dist/chunks/{BZ34ZR65.js → GGMVT5A6.js} +1 -1
  348. package/build/dist/chunks/GK3D7OKG.js +1 -0
  349. package/build/dist/chunks/{2OKYXT25.js → GQITAJVF.js} +1 -1
  350. package/build/dist/chunks/GYPMUYB5.js +1 -0
  351. package/build/dist/chunks/H3E7UD2X.js +1 -0
  352. package/build/dist/chunks/{GDRQ2ANN.js → H64QC4QR.js} +1 -1
  353. package/build/dist/chunks/HFVXNKA5.js +1 -0
  354. package/build/dist/chunks/HHYE42JG.js +21 -0
  355. package/build/dist/chunks/{U363GQTF.js → HIG7JY3J.js} +1 -1
  356. package/build/dist/chunks/{XWKK75TO.js → HOBIXKGO.js} +1 -1
  357. package/build/dist/chunks/HQIS3QI7.js +3 -0
  358. package/build/dist/chunks/{UOCRYXAB.js → HRAHGYNK.js} +1 -1
  359. package/build/dist/chunks/{GLF7WEY2.js → HUKDISRE.js} +1 -1
  360. package/build/dist/chunks/{GSFHM5L3.js → HZSYMGJ2.js} +1 -1
  361. package/build/dist/chunks/{FJLJ7ZQ5.js → I4473OC6.js} +1 -1
  362. package/build/dist/chunks/IBL6TL2Q.js +1 -0
  363. package/build/dist/chunks/{3DNJTJ2X.js → IJ4HZIDG.js} +1 -1
  364. package/build/dist/chunks/{OARVU3RC.js → IPU656WB.js} +1 -1
  365. package/build/dist/chunks/{HCBX4NFM.js → IT2JLILU.js} +1 -1
  366. package/build/dist/chunks/{REWXG6X6.js → JDSSYT6R.js} +1 -1
  367. package/build/dist/chunks/{XRDXFHIK.js → JFWJBZ7M.js} +1 -1
  368. package/build/dist/chunks/{TPEKCXVE.js → JTPHZCO3.js} +1 -1
  369. package/build/dist/chunks/{CSOO4SW7.js → K4GUZ5QS.js} +1 -1
  370. package/build/dist/chunks/{BAIY32AV.js → KLEJ3W4T.js} +1 -1
  371. package/build/dist/chunks/{ACH4BSME.js → KOKLM63Q.js} +1 -1
  372. package/build/dist/chunks/{7D73A6KS.js → KVVBT43U.js} +1 -1
  373. package/build/dist/chunks/{CO4GCF4L.js → KXX7ZBFY.js} +1 -1
  374. package/build/dist/chunks/{I6PQW2JI.js → L2AE32SL.js} +1 -1
  375. package/build/dist/chunks/{WUT7TZYM.js → LCH6F5HT.js} +1 -1
  376. package/build/dist/chunks/LEV5SNNC.js +3 -0
  377. package/build/dist/chunks/{SPRVVJXI.js → LFSJDFMY.js} +1 -1
  378. package/build/dist/chunks/{6UVGQYZ3.js → LGLWEGPY.js} +1 -1
  379. package/build/dist/chunks/{PV4AK32X.js → LQSPWRHN.js} +1 -1
  380. package/build/dist/chunks/{C3WBHFLX.js → LTDF2LNP.js} +1 -1
  381. package/build/dist/chunks/{5HIHUYA4.js → M4AGEGWW.js} +1 -1
  382. package/build/dist/chunks/{ARI72OYT.js → M6SQPOOL.js} +1 -1
  383. package/build/dist/chunks/{SOTYQGPT.js → M7CQPTRK.js} +1 -1
  384. package/build/dist/chunks/{XPEDQBLI.js → MGVX5EUH.js} +1 -1
  385. package/build/dist/chunks/{C5ZZAYXD.js → MI5HZDMH.js} +1 -1
  386. package/build/dist/chunks/{APHNOGNS.js → MQ37QX6U.js} +1 -1
  387. package/build/dist/chunks/MQ5F2VOK.js +1 -0
  388. package/build/dist/chunks/{JKD2B6OX.js → MSRCJ2BS.js} +1 -1
  389. package/build/dist/chunks/{JKRBGAX2.js → NAO7VWZF.js} +1 -1
  390. package/build/dist/chunks/{RLMVA575.js → NDSNE6PS.js} +1 -1
  391. package/build/dist/chunks/{RT7IU6TI.js → NMJVQX5M.js} +1 -1
  392. package/build/dist/chunks/NQ4MTIU3.js +1 -0
  393. package/build/dist/chunks/{IEG6GLFR.js → NTUXDIY6.js} +1 -1
  394. package/build/dist/chunks/{F4UQEPJT.js → NUERUFH7.js} +1 -1
  395. package/build/dist/chunks/NV6FDIYT.js +1 -0
  396. package/build/dist/chunks/O2J5I4VA.js +1 -0
  397. package/build/dist/chunks/{XVJ7ILKK.js → O3CC5SRM.js} +1 -1
  398. package/build/dist/chunks/{2SUHQWND.js → O4S6XAYV.js} +1 -1
  399. package/build/dist/chunks/{TAEZTP4L.js → O5QTITN6.js} +1 -1
  400. package/build/dist/chunks/{NA424YAL.js → OB7BFDOV.js} +1 -1
  401. package/build/dist/chunks/{523ZIR3J.js → ODV3XT5U.js} +1 -1
  402. package/build/dist/chunks/{GW5IXLKU.js → OI3N4EW4.js} +1 -1
  403. package/build/dist/chunks/{FL5SSHUL.js → OIQTZOBN.js} +1 -1
  404. package/build/dist/chunks/OLDQV43V.js +1 -0
  405. package/build/dist/chunks/OOPMZIG7.js +1 -0
  406. package/build/dist/chunks/{XYPGLG6A.js → OSMOBKRQ.js} +1 -1
  407. package/build/dist/chunks/{OZ5MDUD2.js → OVM4QIET.js} +1 -1
  408. package/build/dist/chunks/{N4XNNXOJ.js → OY5W7ZSL.js} +1 -1
  409. package/build/dist/chunks/{GRSXWQWD.js → PDGYM2WG.js} +1 -1
  410. package/build/dist/chunks/{UQEEF5W5.js → PDPTJMTJ.js} +1 -1
  411. package/build/dist/chunks/PEHXHQVA.js +1 -0
  412. package/build/dist/chunks/{JOKL5L6X.js → PKYQ3XVA.js} +1 -1
  413. package/build/dist/chunks/PMFR47H3.js +1 -0
  414. package/build/dist/chunks/{N6GIC7HJ.js → PWJVC2FV.js} +1 -1
  415. package/build/dist/chunks/{753HZZTY.js → QBYV7NXH.js} +1 -1
  416. package/build/dist/chunks/QHV5GORV.js +1 -0
  417. package/build/dist/chunks/{2LWBN35N.js → QIB6OMQV.js} +1 -1
  418. package/build/dist/chunks/{TK55VASJ.js → QMNUB2GM.js} +1 -1
  419. package/build/dist/chunks/{HKVQ646Q.js → QN45T4N3.js} +1 -1
  420. package/build/dist/chunks/{J73ATSEQ.js → QPY6UTLU.js} +1 -1
  421. package/build/dist/chunks/{YUHNPUNK.js → R73R4KN3.js} +1 -1
  422. package/build/dist/chunks/{RLI4JDOL.js → RA7DOR7F.js} +1 -1
  423. package/build/dist/chunks/{VR344DAZ.js → RN3WUJIO.js} +1 -1
  424. package/build/dist/chunks/RUSXMQSJ.js +1 -0
  425. package/build/dist/chunks/{D742AYEV.js → RUTSEGGD.js} +1 -1
  426. package/build/dist/chunks/{4Q2ZBZXM.js → RXP7ZUPY.js} +1 -1
  427. package/build/dist/chunks/{TFDPEAVZ.js → S4JUFCT4.js} +1 -1
  428. package/build/dist/chunks/{DYYEA5HB.js → SMKO7GKX.js} +1 -1
  429. package/build/dist/chunks/{C75MT5SD.js → SNCV6HV7.js} +1 -1
  430. package/build/dist/chunks/{HIX5N25Z.js → SOJHYMD7.js} +1 -1
  431. package/build/dist/chunks/{JLRHM2DQ.js → SUNTJ6IU.js} +1 -1
  432. package/build/dist/chunks/{4JRXEN7C.js → THL4TMQW.js} +2 -2
  433. package/build/dist/chunks/TI727O2H.js +1 -0
  434. package/build/dist/chunks/{PV5FDT6O.js → TXGZ6NWN.js} +1 -1
  435. package/build/dist/chunks/{Q2ACLVWR.js → UBI3HBXD.js} +1 -1
  436. package/build/dist/chunks/{YMV5TL5C.js → UEHN2IDF.js} +1 -1
  437. package/build/dist/chunks/{ZF2VPDRQ.js → UHIJMDD2.js} +1 -1
  438. package/build/dist/chunks/UJQYOTO5.js +1 -0
  439. package/build/dist/chunks/{VTPT5544.js → USEF3QKG.js} +1 -1
  440. package/build/dist/chunks/{LR4XTZ37.js → UYULQHZJ.js} +1 -1
  441. package/build/dist/chunks/{YWZQJJYY.js → V4UJMUIB.js} +1 -1
  442. package/build/dist/chunks/{7VC53B5X.js → V5YSJKRH.js} +13 -13
  443. package/build/dist/chunks/{INOYMBWE.js → VC5ZCQYZ.js} +1 -1
  444. package/build/dist/chunks/{M7ZXDLKM.js → VDJPDIBV.js} +1 -1
  445. package/build/dist/chunks/{2FHELZ7Y.js → VFM2BICB.js} +1 -1
  446. package/build/dist/chunks/{TE6D3OIX.js → VOJULRNU.js} +1 -1
  447. package/build/dist/chunks/{UEDGYZOC.js → VVAM3EAK.js} +1 -1
  448. package/build/dist/chunks/VVJO6OYK.js +1 -0
  449. package/build/dist/chunks/{JESMX2UC.js → VXCGMALF.js} +1 -1
  450. package/build/dist/chunks/{NUFZUKYS.js → W32UECOL.js} +1 -1
  451. package/build/dist/chunks/{UUID2E22.js → W3DGFMQE.js} +1 -1
  452. package/build/dist/chunks/W7OCS4AM.js +6 -0
  453. package/build/dist/chunks/{DNNFKDZR.js → W7QNSNOH.js} +1 -1
  454. package/build/dist/chunks/{2MZXTOZU.js → WAKZWSHB.js} +1 -1
  455. package/build/dist/chunks/{HM72DH4V.js → WRUTW6CG.js} +1 -1
  456. package/build/dist/chunks/{VYYSL557.js → WSILNJS2.js} +1 -1
  457. package/build/dist/chunks/{L646YWDP.js → X24YTJST.js} +1 -1
  458. package/build/dist/chunks/{FOD34G2H.js → XL3W7DAQ.js} +1 -1
  459. package/build/dist/chunks/{2E4I7CJ7.js → XRDLMTBJ.js} +1 -1
  460. package/build/dist/chunks/{GG24LO2R.js → XVOW6UCI.js} +1 -1
  461. package/build/dist/chunks/XW3VGWXK.js +1 -0
  462. package/build/dist/chunks/{6WD4HHID.js → Y2QADJOB.js} +1 -1
  463. package/build/dist/chunks/Y64GFBTA.js +1 -0
  464. package/build/dist/chunks/Y7HBFQYG.js +1 -0
  465. package/build/dist/chunks/{ARLGF5MU.js → YGW4ODAP.js} +1 -1
  466. package/build/dist/chunks/YRSAZTTC.js +7 -0
  467. package/build/dist/chunks/YW4W3LPQ.js +1 -0
  468. package/build/dist/chunks/{3VBIRLU3.js → YXXK6EPI.js} +1 -1
  469. package/build/dist/chunks/{EH5G4O3U.js → Z2QV6EZY.js} +1 -1
  470. package/build/dist/chunks/Z3IBPCY4.js +2 -0
  471. package/build/dist/chunks/{H5DY7CNB.js → Z7FGEWO2.js} +1 -1
  472. package/build/dist/chunks/{KDGSYNOP.js → ZDCCFEVL.js} +1 -1
  473. package/build/dist/chunks/{4RQAOOO2.js → ZOLHVZDK.js} +1 -1
  474. package/build/dist/chunks/{AI3VAPA3.js → ZSVAGOF2.js} +1 -1
  475. package/build/dist/chunks/{EVBHQQQG.js → ZTKT3ZQK.js} +1 -1
  476. package/build/dist/chunks/{4BVP652W.js → ZZ6FZGHF.js} +1 -1
  477. package/package.json +1 -1
  478. package/build/dist/chunks/3K2N5VFH.js +0 -1
  479. package/build/dist/chunks/3ZABD6ZF.js +0 -2
  480. package/build/dist/chunks/44MB6SA6.js +0 -1
  481. package/build/dist/chunks/4D4ZRZUW.js +0 -1
  482. package/build/dist/chunks/4OVIMYNH.js +0 -2
  483. package/build/dist/chunks/6NUNCD5J.js +0 -1
  484. package/build/dist/chunks/6PZGDVHV.js +0 -1
  485. package/build/dist/chunks/7MBVTNLU.js +0 -1
  486. package/build/dist/chunks/7VNO46LV.js +0 -1
  487. package/build/dist/chunks/CAWTAR5V.js +0 -1
  488. package/build/dist/chunks/DPE7SPW7.js +0 -1
  489. package/build/dist/chunks/E3RACZUY.js +0 -1
  490. package/build/dist/chunks/EI6GGPDS.js +0 -20
  491. package/build/dist/chunks/FV4WZOTD.js +0 -1
  492. package/build/dist/chunks/FWD4L3CJ.js +0 -1
  493. package/build/dist/chunks/JBTOZ6IH.js +0 -1
  494. package/build/dist/chunks/KREBNL2D.js +0 -1
  495. package/build/dist/chunks/MVD3KWPP.js +0 -1
  496. package/build/dist/chunks/P6OMKZMR.js +0 -3
  497. package/build/dist/chunks/PXVREXCS.js +0 -1
  498. package/build/dist/chunks/QJNLLI6N.js +0 -1
  499. package/build/dist/chunks/RPB46QAC.js +0 -1
  500. package/build/dist/chunks/TID4C2KC.js +0 -1
  501. package/build/dist/chunks/U2YCQWZK.js +0 -1
  502. package/build/dist/chunks/UWBKAWX3.js +0 -7
  503. package/build/dist/chunks/V6SDKPZS.js +0 -1
  504. package/build/dist/chunks/WHTRPRRD.js +0 -1
  505. package/build/dist/chunks/WLMWWEP7.js +0 -2
  506. package/build/dist/chunks/XQ24RSEI.js +0 -1
  507. package/build/dist/chunks/YDNTY67T.js +0 -1
  508. package/build/dist/chunks/ZQAFFWDK.js +0 -1
@@ -1 +0,0 @@
1
- import{a as k}from"./ZOMFHTB2.js";import{e as P,i as O}from"./4FPV4CRC.js";import{a as g,b as f,f as E,g as S}from"./J73ATSEQ.js";import{a as h,w as M}from"./BAIY32AV.js";import{a as y}from"./66F5ZH34.js";import{c as v,g as C}from"./NWNYJ26T.js";import{a as b}from"./FWD4L3CJ.js";import{a as l}from"./XSD5NL7J.js";import{encodeFunctionData as c,parseAbi as H,zeroAddress as R}from"viem";var r=H(["function owner() view returns (address)","function feeTo() view returns (address)","function feeToSetter() view returns (address)","function protocolFeeController() view returns (address)","function setFeeTo(address)","function setFeeToSetter(address)","function setOwner(address)","function enableFeeAmount(uint24,int24)","function setFeeProtocol(uint8,uint8)","function collectProtocol(address,uint128,uint128) returns (uint128,uint128)","function transferOwnership(address)","function setProtocolFeeController(address)","function setProtocolFee((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks),uint24)","function collectProtocolFees(address recipient,address currency,uint256 amount) returns (uint256)"]),K=["set_fee_recipient","set_fee_setter","set_owner","enable_fee","set_pool_fee","collect_protocol","set_controller"],V={version:{description:'Uniswap version: "v2" for pairs, "v3" for concentrated liquidity or "v4" for PoolManager.',type:"string",enum:["v2","v3","v4"]},operation:{description:"set_fee_recipient/set_fee_setter: v2 roles; set_owner: owner; enable_fee: v3 tier; set_pool_fee: protocol fees; collect_protocol: collect fees; set_controller: v4 controller.",type:"string",enum:K},target:{...v,description:"Intended fee recipient, fee setter, owner or controller address for the selected administrative operation."},token0:{...v,description:"Lower sorted ERC-20 token address; use WETH for native ETH in v3."},token1:{...v,description:"Higher sorted ERC-20 token address."},fee:{description:"Pool fee in pips, hundredths of a basis point (3000 = 0.3%; 950000 = 95%).",type:"integer"},tickSpacing:{description:"Spacing between usable pool ticks, as an integer.",type:"integer"},fee0:{description:"Token0 or zero-for-one protocol fee: v3 divisor 0 (off) or 4\u201310; v4 pips, hundredths of a basis point, from 0 to 1000 (1000 = 0.1%).",type:"integer"},fee1:{description:"Token1 or one-for-zero protocol fee: v3 divisor 0 (off) or 4\u201310; v4 pips, hundredths of a basis point, from 0 to 1000 (1000 = 0.1%).",type:"integer"},currency:{...v,description:"Address of the currency whose protocol fees are collected; the zero address means native ETH."},amount:y('Amount of currency in base units; use currency decimals. Example: "1000000" = 1 currency at 6 decimals.'),amount0Max:y('Maximum amount of token0 in base units; use token0 decimals. Example: "1000000" = 1 token0 at 6 decimals.'),amount1Max:y('Maximum amount of token1 in base units; use token1 decimals. Example: "1000000" = 1 token1 at 6 decimals.'),poolKey:{description:"V4 pool key: sorted currencies, fee in pips, tick spacing and hook address.",type:"object"}};function G(_){let x=async e=>{let i=_.clientFor(b);if(e==="v2"){let[t,o]=await Promise.all([i.readContract({address:k,abi:r,functionName:"feeToSetter"}),i.readContract({address:k,abi:r,functionName:"feeTo"})]);return{version:e,contract:k,owner:t,feeRecipient:o}}if(e==="v3")return{version:e,contract:P.factory,owner:await i.readContract({address:P.factory,abi:r,functionName:"owner"})};if(e==="v4"){let[t,o]=await Promise.all([i.readContract({address:h,abi:r,functionName:"owner"}),i.readContract({address:h,abi:r,functionName:"protocolFeeController"})]);return{version:e,contract:h,owner:t,controller:o}}throw new l("Provide protocol version v2, v3 or v4.")};return{tools:[{name:"uniswap_protocol_status",inputSchema:{type:"object",additionalProperties:!1,required:["version"],properties:{version:V.version}},async execute(e){return S(e,["version"]),x(e.version)}},{name:"uniswap_protocol_admin",inputSchema:{type:"object",additionalProperties:!1,required:["version","operation"],properties:V},async execute(e,i){let{version:t,operation:o}=e,w=await x(t),I=_.clientFor(b),T=t==="v4"&&["set_pool_fee","collect_protocol"].includes(String(o))?"controller"in w?w.controller:void 0:w.owner;if(!T||!C(T,i))throw new l("The signing wallet does not hold the required Uniswap owner/controller role.");let N=w.contract,s,a,A=()=>{let n=f(e.target);if(n===R)throw new l("Administration target must be nonzero.");return n},d=(n,p,u,m)=>{if(typeof n!="number"||!Number.isInteger(n)||n<u||n>m)throw new l(`${p} must be an integer from ${u} to ${m}.`);return n};if(t==="v2"&&o==="set_fee_recipient")a=["target"],s=c({abi:r,functionName:"setFeeTo",args:[f(e.target)]});else if(t==="v2"&&o==="set_fee_setter")a=["target"],s=c({abi:r,functionName:"setFeeToSetter",args:[A()]});else if(t==="v3"&&o==="set_owner")a=["target"],s=c({abi:r,functionName:"setOwner",args:[A()]});else if(t==="v3"&&o==="enable_fee")a=["fee","tickSpacing"],s=c({abi:r,functionName:"enableFeeAmount",args:[d(e.fee,"fee",0,999999),d(e.tickSpacing,"tickSpacing",1,16383)]});else if(t==="v3"&&["set_pool_fee","collect_protocol"].includes(String(o))){a=["token0","token1","fee",...o==="set_pool_fee"?["fee0","fee1"]:["amount0Max","amount1Max"]];let n=f(e.token0),p=f(e.token1),u=d(e.fee,"fee",0,999999);if(N=await I.readContract({address:P.factory,abi:O,functionName:"getPool",args:[n,p,u]}),N===R)throw new l("No factory-verified v3 pool exists for these tokens and fee.");if(o==="set_pool_fee"){let m=z=>{let F=d(z,"fee divisor",0,10);if(F!==0&&F<4)throw new l("V3 protocol fee divisors must be zero or 4 through 10.");return F};s=c({abi:r,functionName:"setFeeProtocol",args:[m(e.fee0),m(e.fee1)]})}else s=c({abi:r,functionName:"collectProtocol",args:[i,g(e.amount0Max,"amount0Max",128,!0),g(e.amount1Max,"amount1Max",128,!0)]})}else if(t==="v4"&&o==="set_owner")a=["target"],s=c({abi:r,functionName:"transferOwnership",args:[A()]});else if(t==="v4"&&o==="set_controller")a=["target"],s=c({abi:r,functionName:"setProtocolFeeController",args:[f(e.target)]});else if(t==="v4"&&o==="set_pool_fee"){a=["poolKey","fee0","fee1"];let n=M(e.poolKey),p=d(e.fee0,"fee0 pips",0,1e3),u=d(e.fee1,"fee1 pips",0,1e3);s=c({abi:r,functionName:"setProtocolFee",args:[n,p+(u<<12)]})}else if(t==="v4"&&o==="collect_protocol")a=["currency","amount"],s=c({abi:r,functionName:"collectProtocolFees",args:[i,f(e.currency),g(e.amount,"amount",256,!0)]});else throw new l("This operation is not supported by the selected Uniswap protocol version.");return S(e,["version","operation",...a]),E(_,[_.unsignedTx({to:N,data:s,value:"0",chainId:b,description:`Uniswap ${t} protocol administration: ${o}. Role holder ${i}.`})],i,"Privileged protocol operation. Review the exact role/recipient/fee changes. Protocol fee collections pay the signing wallet; no wallet token approval is required.")}}]}}export{r as a,G as b};
@@ -1 +0,0 @@
1
- function c(r,t){return r==="hoodlock_airdrop_claim"&&!Object.hasOwn(t,"id")}var h=new Map([]),_="find_tool",l="run_tool",i=["oak_setup","oak_identity_unlink","oak_subscribe","oak_renew","oak_redeem","send","hoodlock_feature_buy","hoodlock_feature_claim","hoodlock_referral_register","heyresearch_token_facts","heyresearch_feed","heyresearch_follow","heyresearch_unfollow","heyresearch_position_context"],p={oak:["account","balances","find_token","price","quote","swap","positions","send","oak_setup","oak_subscribe","oak_renew","oak_identity_unlink","oak_redeem"],kyberswap:[],velora:[],steakhouse:["steakhouse_deposit","steakhouse_withdraw"],spark:["spark_deposit","spark_withdraw"],layerbank:["layerbank_deposit","layerbank_withdraw"],borro:["borro_deposit","borro_withdraw"],chop:["chop_wrap","chop_unwrap"],factor:["factor_sign_up","factor_open_jobs"],raeto:["raeto_status","raeto_join","raeto_ask"],gloam:["gloam_shield","gloam_pay","gloam_claim","gloam_cash_out"],pendle:["pendle_buy","pendle_sell","pendle_redeem"],earn:["earn_options"],netnet:["netnet_deposit","netnet_withdraw"],longbow:["longbow_list","longbow_deposit","longbow_withdraw"],grove:["grove_deposit","grove_withdraw"],beefy:["beefy_list","beefy_deposit","beefy_withdraw"],pons:["pons_browse","pons_buy","pons_sell","pons_launch"],orbio:["orbio_credit_status","orbio_buy_credit"],hoodlock:["hoodlock_list_locks","hoodlock_lock","hoodlock_withdraw"],merkl:["merkl_rewards","merkl_claim"],relay:["relay_bridge_in","relay_bridge_out","relay_status"],lighter:["lighter_funding"],wormhole:[],erc8004:["erc8004_identity"],hoodag:["hoodag_resolve","hoodag_register"],heyresearch:["heyresearch_research_project","heyresearch_token_facts","heyresearch_feed","heyresearch_follow","heyresearch_position_context"],priors:["priors_status","priors_lend","priors_withdraw","priors_borrow","priors_repay"],morpho:["morpho_status","morpho_supply","morpho_withdraw","morpho_supply_collateral","morpho_withdraw_collateral","morpho_borrow","morpho_repay"],uniswap:["uniswap_list_positions","uniswap_add","uniswap_remove","uniswap_collect"],hookr:["hookr_orders","hookr_create","hookr_cancel"],meridian:["meridian_browse","meridian_positions","meridian_sell","meridian_redeem"],tickerspring:["tickerspring_account","tickerspring_create","tickerspring_cancel","tickerspring_claim"],clanker:["clanker_browse","clanker_launch"],poolstrade:["poolstrade_status","poolstrade_buy","poolstrade_sell","poolstrade_launch"]};function w(r,t){let a=new Set(r),s=new Set;for(let[e,n]of Object.entries(p))for(let o of n){if(s.has(o))throw new Error(`Visible tool ${o} is listed twice.`);if(e!=="oak"&&!o.startsWith(`${e}_`))throw new Error(`Visible tool ${o} is filed under ${e}.`);if(i.includes(o)||a.has(o))s.add(o);else if(t==="mainnet")throw new Error(`Visible tool ${o} is not registered.`)}for(let e of[_,l,...i,"oak_playbook"])if(a.has(e))throw new Error(`Tool name ${e} is reserved for the add-on.`);return s}export{c as a,h as b,_ as c,l as d,i as e,p as f,w as g};
@@ -1 +0,0 @@
1
- import{b as V}from"./CQ5WRWV4.js";import{a as S,b as C,c as W,d as re}from"./IV4K7FMD.js";import{a as ae,d as se,e as ie}from"./ZQAFFWDK.js";import{d as ue}from"./FL5SSHUL.js";import{b as F}from"./H5DY7CNB.js";import{a as f,b as j,c as oe}from"./43LI5NKJ.js";import{c as G}from"./5TUXSOMI.js";import{b as o,e as ne}from"./IX3GZMTM.js";import{a as x,i as z,w as K,x as _,z as te}from"./FWD4L3CJ.js";import{a as r}from"./XSD5NL7J.js";import{decodeFunctionData as R,encodeFunctionData as M,parseAbi as ce}from"viem";var ve=60,Z=50,Ne=200;var he="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",J="0x0000000000000000000000000000000000000000",T=z[4663].routes.kyberswap.address,y=z[4663].routes.velora.address,q=K[4663].kyberswap.toLowerCase(),le=K[4663].velora.toLowerCase(),Se="0x0000000000000000000000000000000000000000000000000000000000000000",N=ce(["function swap((address callTarget, address approveTarget, bytes targetData, (address srcToken, address dstToken, address[] srcReceivers, uint256[] srcAmounts, address[] feeReceivers, uint256[] feeAmounts, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) desc, bytes clientData) execution) payable returns (uint256 returnAmount, uint256 gasUsed)"]),$=ce(["function swapExactAmountIn(address executor, (address srcToken, address destToken, uint256 fromAmount, uint256 toAmount, uint256 quotedAmount, bytes32 metadata, address beneficiary) swapData, uint256 partnerAndFee, bytes permit, bytes executorData) payable returns (uint256 receivedAmount, uint256 submittedAmount, uint256 augustusFeeAmount)"]),E=class extends r{name="NoRouteError";constructor(t="No swap route is available for this token pair and amount."){super(t)}},L=class extends r{name="ExpiredQuoteError";constructor(t="Quote has expired. Request a fresh quote."){super(t)}},be=1e3,k=new Map;function me(e){for(let[t,n]of k)BigInt(e)>=o(n.expiresAt)&&k.delete(t)}function Y(e){return{...e,...e.sourcePoolRoute!==void 0?{sourcePoolRoute:structuredClone(e.sourcePoolRoute)}:{},...e.txs?{txs:e.txs.map(t=>({...t}))}:{}}}function de(e){let t=Y(e);return t.txs&&(t.txs.forEach(Object.freeze),Object.freeze(t.txs)),Object.freeze(t)}var Oe=["router","from","to","wallet","amountIn","amountOut","minAmountOut","expiresAt","chainId","spender","value","ponsCurveToken","ponsPoolToken","blockNumber","calldataMinAmountOut","expectedSpend","expectedRefund","oakFee","oakFeeBps","oakFeeToken","grossAmountOut","venueFee","venueFeeBps"];function U(e,t,n=!1){for(let u of Oe)if(!(u==="expiresAt"&&n&&o(e.expiresAt)<=o(t.expiresAt))&&e[u]!==void 0&&String(e[u]).toLowerCase()!==String(t[u]).toLowerCase())throw new r(`Quote ${u} does not match the accepted quote.`)}function H(e=Date.now){let t=e();if(!Number.isFinite(t)||t<0)throw new r("Clock must return a non-negative timestamp.");return t>1e11?Math.floor(t/1e3):Math.floor(t)}function P(e){let t=e.toLowerCase();return t===he.toLowerCase()||t===J.toLowerCase()}function ke(e,t=Z){if(!Number.isInteger(t)||t<0||t>=1e4)throw new r("Slippage must be an integer from 0 to 9999 bps.");return ne(e,String(1e4-t),"10000","floor")}var Ie=200;function $e(e){if(typeof e!="number"||!Number.isFinite(e)||!/^\d+(?:\.\d{1,2})?$/.test(String(e)))throw new r("Velora returned an unsupported venue fee. Request a fresh quote.");let[t,n=""]=String(e).split("."),u=Number(t)*100+Number(n.padEnd(2,"0"));return ee(u),u}function ee(e){if(!Number.isInteger(e)||e<0||e>Ie)throw new r("Velora returned an unsupported venue fee. Request a fresh quote.")}function pe(e,t=S.bps){return ee(t),o(e)*10000n/BigInt(1e4-t)+1n}function xe(e,t){if(ee(t),t!==S.bps||e!==W)throw new r("Velora partnerAndFee must match the pinned Oak fee, recipient and flags.")}function fe(e){if(e.oakFeeBps===S.bps)return`${re()} ${e.provider==="velora"?"Oak\u2019s share is paid to the Oak treasury.":"Paid to the Oak treasury."} Venue fee: ${e.venueFee} base units (${e.venueFeeBps} bps) retained by ${e.provider??"venue"}. Output and minimum are net.${e.provider==="velora"?" Velora retains 15% of the partner fee; Oak receives 85% (about 21.25 bps).":""}`;if(e.oakFee!==void 0&&o(e.oakFee)!==0n)throw new r("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");let t=e.provider??"venue";return`Venue fee: ${e.venueFee} base units (${e.venueFeeBps} bps) retained by ${t}; Oak swap fee: 0 (venue fee is never Oak income).`}function Fe(e){f(e.from),f(e.to),f(e.wallet);let t=e.callTarget??_[x].kyberswap.address,n=e.approveTarget??J;f(t),f(n);let u=o(e.amountIn),a=o(e.minAmountOut);return M({abi:N,functionName:"swap",args:[{callTarget:t,approveTarget:n,targetData:e.targetData??"0x",desc:{srcToken:e.from,dstToken:e.to,srcReceivers:P(e.from)?[]:[t],srcAmounts:P(e.from)?[]:[u-BigInt(C(e.amountIn))],feeReceivers:[S.recipient],feeAmounts:[BigInt(S.bps)],dstReceiver:e.wallet,amount:u,minReturnAmount:a,flags:640n,permit:"0x"},clientData:e.clientData??"0x"}]})}function Ee(e){f(e.from),f(e.to),f(e.wallet);let t=e.executor??_[x].velora.address;return f(t),M({abi:$,functionName:"swapExactAmountIn",args:[t,{srcToken:e.from,destToken:e.to,fromAmount:o(e.amountIn),toAmount:o(e.minAmountOut),quotedAmount:o(e.amountOut),metadata:e.metadata??Se,beneficiary:e.wallet},e.partnerAndFee??W,"0x",e.executorData??"0x"]})}function De(e){if(typeof e!="string"||!/^0x([0-9a-fA-F]{2})+$/.test(e)||e.length<10)throw new r("Swap calldata must contain a 4-byte function selector.");let t=e.slice(0,10).toLowerCase();if(t===q)return R({abi:N,data:e}).args[0].desc.minReturnAmount;if(t===le)return R({abi:$,data:e}).args[1].toAmount;if(t==="0x3593564c")return se(e).swap.amountOutMinimum;let n=R({abi:ae,data:e});if(n.functionName==="buy"||n.functionName==="sell")return n.args[1];throw new r(`Unsupported swap router selector ${t}.`)}function we(e,t,n=!1){let u=o(t),a=De(e);if(a<=0n||u<=0n||a!==u&&!(n&&(a>u||e.slice(0,10).toLowerCase()===q&&a+1n===u)))throw new r(`Built swap calldata minimum output (${a}) does not match the accepted quote minimum (${u}).`);return a}function Ae(e,t){let{from:n,to:u,wallet:a,amountIn:d}=t;if(!n||!u||!a||d===void 0)throw new r("Accepted quote must include input, output, amount and wallet.");for(let i of[n,u,a,t.router,e.to])f(i);let p=(i,l,w)=>{if(i.toLowerCase()!==l.toLowerCase())throw new r(`Built swap ${w} does not match the accepted quote.`)};if(p(e.to,t.router,"router"),e.chainId!==(t.chainId??x))throw new r("Built swap chain does not match the accepted quote.");let g=P(n)?o(d):0n;if(o(e.value)!==g||t.value!==void 0&&o(t.value)!==g)throw new r("Built swap value does not match the accepted quote input.");let A=e.data.slice(0,10).toLowerCase(),s=t.router.toLowerCase();if(s===T.toLowerCase()||s===y.toLowerCase()){let i=s===T.toLowerCase(),l=i?d:t.grossAmountOut,w=i?n:u;if(t.oakFeeBps!==S.bps||l===void 0||t.oakFee!==C(l)||t.oakFeeToken?.toLowerCase()!==F(w).toLowerCase())throw new r("Oak fee must match the pinned rate, token and amount.")}let c;if(s===T.toLowerCase()&&A===q){p(t.spender??t.router,T,"spender");let i=R({abi:N,data:e.data});if(M({abi:N,...i}).toLowerCase()!==e.data.toLowerCase())throw new r("KyberSwap calldata must be canonically decodable.");let{callTarget:l,approveTarget:w,desc:m}=i.args[0];p(l,_[x].kyberswap.address,"executor"),p(w,J,"executor approval target");let I=P(n);if(m.srcReceivers.length!==m.srcAmounts.length||(I?m.srcReceivers.length!==0:m.srcReceivers.length===0||m.srcAmounts.some(v=>v<=0n)||m.srcAmounts.reduce((v,b)=>v+b,0n)!==o(d)-BigInt(C(d))))throw new r("KyberSwap source transfers must send the exact input less the pinned fee to the pinned executor or verified input pool.");for(let v of m.srcReceivers)if(v.toLowerCase()!==l.toLowerCase()&&!ue(n,v,e.data))throw new r(`KyberSwap source transfers: receiver ${v} is not a verified input pool or the pinned executor.`);if(m.feeReceivers.length!==1||m.feeAmounts.length!==1||m.feeReceivers[0].toLowerCase()!==S.recipient.toLowerCase()||m.feeAmounts[0]!==BigInt(S.bps)||m.flags!==640n||m.permit!=="0x")throw new r("KyberSwap fee recipients, fee amounts, flags and permit must match the pinned Oak input-fee policy.");c={from:m.srcToken,to:m.dstToken,wallet:m.dstReceiver,amount:m.amount}}else if(s===y.toLowerCase()&&A===le){p(t.spender??t.router,y,"spender");let i=R({abi:$,data:e.data});if(M({abi:$,...i}).toLowerCase()!==e.data.toLowerCase())throw new r("Velora calldata must be canonically decodable.");let[l,w,m,I]=i.args;if(!te.some(v=>v.toLowerCase()===l.toLowerCase()))throw new r("Built swap executor does not match the accepted quote.");if(I!=="0x")throw new r("Velora permit must match the pinned empty-permit policy.");if(xe(m,t.oakFeeBps??S.bps),t.calldataMinAmountOut!==void 0&&o(t.calldataMinAmountOut)!==pe(t.minAmountOut,S.bps))throw new r("Velora calldata minimum must cover the accepted net output, venue fee and router dust.");if(t.calldataMinAmountOut!==void 0&&(w.quotedAmount!==o(t.grossAmountOut??"0")||w.quotedAmount<o(t.calldataMinAmountOut)))throw new r("Velora quoted gross output must match the accepted quote and cover its calldata minimum.");if(m!==0n&&t.calldataMinAmountOut===void 0)throw new r("Velora venue fee requires a fee-adjusted calldata minimum.");c={from:w.srcToken,to:w.destToken,wallet:w.beneficiary,amount:w.fromAmount}}else if(t.provider==="pons"&&(t.ponsPoolToken||t.ponsCurveToken))c=ie(e,{...t,from:n,to:u,wallet:a});else throw new r("Built swap selector does not match the accepted router.");if(p(c.from,n,"input token"),p(c.to,u,"output token"),p(c.wallet,a,"recipient"),c.amount!==o(d))throw new r("Built swap input amount does not match the accepted quote.");we(e.data,t.calldataMinAmountOut??t.minAmountOut,s===T.toLowerCase())}function X(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new r("Quote must include a non-empty quoteId.");if(f(e.router),e.oakFeeBps!==void 0){let h=t.provider??e.provider,O=h==="kyberswap"?t.amountIn??e.amountIn:e.grossAmountOut,Q=h==="kyberswap"?t.from??e.from:t.to??e.to;if(!["kyberswap","velora"].includes(h??"")||e.oakFeeBps!==S.bps||O===void 0||e.oakFee!==C(O)||!Q||e.oakFeeToken?.toLowerCase()!==F(Q).toLowerCase())throw new r("Oak fee must match the pinned rate, token and amount.")}else if(e.oakFee!==void 0&&o(e.oakFee)!==0n)throw new r("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");let n=o(e.amountOut),u=e.destAmountAfterFee??e.netAmountOut,a,d,p;if(u!==void 0){if(d=o(u),a=e.grossAmountOut!==void 0?o(e.grossAmountOut):n>=d?n:d,a<d)throw new r("Gross output cannot be less than net output.");p=e.venueFee!==void 0?o(e.venueFee):a-d}else if(e.grossAmountOut!==void 0){if(a=o(e.grossAmountOut),d=n,a<d)throw new r("Gross output cannot be less than net output.");p=e.venueFee!==void 0?o(e.venueFee):a-d}else e.venueFee!==void 0?(p=o(e.venueFee),d=n,a=d+p):(d=n,a=n,p=0n);if(d<=0n)throw new E("Quote output amount must be positive.");let g=t.slippageBps??e.slippageBps??Z,A=e.minAmountOut!==void 0?o(e.minAmountOut):o(ke(d.toString(),g));if(A<=0n||A>a)throw new r("Quote minAmountOut must be positive and not exceed gross output.");if((t.provider??e.provider)==="velora"&&e.calldataMinAmountOut!==void 0){if(o(e.calldataMinAmountOut)!==pe(A.toString(),S.bps)||o(e.calldataMinAmountOut)>a)throw new r("Velora calldata minimum must cover the accepted net output, venue fee and router dust.")}else if(e.calldataMinAmountOut!==void 0||e.ponsCurveToken!==void 0){if((t.provider??e.provider)!=="pons"||!e.ponsCurveToken)throw new r("Curve minimum requires a Pons curve quote.");f(e.ponsCurveToken);let h=o(t.amountIn??e.amountIn??"0"),O=o(e.expectedSpend??"0"),Q=o(e.expectedRefund??"0"),ge=o(e.calldataMinAmountOut??"0");if(h<=0n||O<=0n||O+Q!==h||ge*O/h!==A)throw new r("Pons actual minimum and refund do not match the encoded minimum.")}let s=H(t.now),c=BigInt(s+ve),i=e.expiresAt!==void 0?o(e.expiresAt):c,l=(i>c?c:i).toString(),w=p.toString(),m=e.venueFeeBps??(a>0n&&p>0n?Number((p*10000n+a/2n)/a):0),I=t.provider??e.provider??(e.router.toLowerCase()===y.toLowerCase()?"velora":"kyberswap"),v=I==="pons"&&e.feeDisclosure?e.feeDisclosure:fe({provider:I,venueFee:w,venueFeeBps:m,oakFee:e.oakFee??"0",oakFeeBps:e.oakFeeBps}),b={...e,quoteId:e.quoteId,amountOut:d.toString(),minAmountOut:A.toString(),router:e.router,expiresAt:l,provider:I,grossAmountOut:a.toString(),destAmountAfterFee:d.toString(),netAmountOut:d.toString(),venueFee:w,venueFeeBps:m,oakFee:e.oakFee??"0",feeDisclosure:v,...t.from??e.from?{from:F(t.from??e.from)}:{},...t.to??e.to?{to:F(t.to??e.to)}:{},...t.amountIn??e.amountIn?{amountIn:t.amountIn??e.amountIn}:{},...t.wallet??e.wallet?{wallet:t.wallet??e.wallet}:{},slippageBps:g,chainId:t.chainId??e.chainId??x,spender:e.spender??e.router,...t.allowance??e.allowance?{allowance:t.allowance??e.allowance}:{}};if(BigInt(s)>=o(l))throw new L;if(t.cache===!1)return b;if(me(s),BigInt(s)>=o(l))throw new L;let B=k.get(b.quoteId);if(B){U(b,B,!0);let h=de({...B,expiresAt:b.expiresAt});return k.set(h.quoteId,h),Y(h)}for(;k.size>=be;)k.delete(k.keys().next().value);let D=de(b);return k.set(D.quoteId,D),Y(D)}async function Ue(e,t,n={}){e={...e},f(e.from),f(e.to),f(e.wallet),e.from=F(e.from),e.to=F(e.to);let u=o(e.amountIn);if(u<=0n)throw new r("Swap amountIn must be greater than zero.");let a=e.slippageBps??Z;if(!Number.isInteger(a)||a<0||a>=1e4)throw new r("Slippage must be an integer from 0 to 9999 bps.");if(!Array.isArray(t)||t.length===0)throw new E;let d={from:e.from,to:e.to,amountIn:u.toString(),slippageBps:a},p=await Promise.allSettled(t.map(async s=>{let c=await(s.quotePrices??s.quote).call(s,{...d},e.wallet);return{quote:X(c,{provider:s.name,from:e.from,to:e.to,amountIn:u.toString(),wallet:e.wallet,slippageBps:a,chainId:e.chainId??x,allowance:e.allowance,now:e.now,cache:!1}),provider:s}})),g,A=[];for(let s of p)s.status==="rejected"&&(g??=G(s.reason)),s.status==="fulfilled"&&o(s.value.quote.expiresAt)>BigInt(H(e.now))&&A.push(s.value);if(A.length===0){let s=p.some(c=>c.status==="rejected"&&c.reason instanceof Error&&c.reason.message===V)&&p.every(c=>c.status==="rejected"&&(c.reason instanceof E||c.reason instanceof Error&&c.reason.message===V));throw g??new E(s?V:void 0)}A.sort((s,c)=>{let l=o(c.quote.amountOut)-o(s.quote.amountOut)||o(c.quote.minAmountOut)-o(s.quote.minAmountOut);return l>0n?1:l<0n?-1:0});for(let{quote:s,provider:c}of A)try{if(BigInt(H(e.now))>=o(s.expiresAt))continue;if(n.deferBuild||!c.prepareQuote)return X(s,{now:e.now});let i=await c.prepareQuote(s.quoteId,e.wallet);if(i.quoteId!==s.quoteId)throw new r("Prepared quote ID does not match the selected route.");if(U(i,s,!0),!i.data)throw new r("Selected route did not return swap calldata.");let l={...s,expiresAt:i.expiresAt,data:i.data,value:i.value,allowance:i.allowance??s.allowance};return Ae(j({to:l.router,data:i.data,value:i.value??"0",chainId:l.chainId??x,description:"Selected swap route"}),l),X(l,{now:e.now})}catch(i){g??=G(i);continue}throw g??new E}function He(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new r("Provide a valid quote to build a swap.");f(e.router);let n=k.get(e.quoteId),u=H(t.now);if(me(u),!n||BigInt(u)>=o(n.expiresAt))throw k.delete(e.quoteId),new L;if(e.oakFeeBps===void 0&&e.oakFee!==void 0&&o(e.oakFee)!==0n)throw new r("Oak fee requires the pinned rate and token; venue fees must never be counted as Oak income.");U(e,n),U({...n,...t},n);let a=n.from,d=n.to,p=n.amountIn,g=n.wallet;if(!a||!d||!g||p===void 0)throw new r("Accepted quote must include input, output, amount and wallet.");let A=n.chainId??x,s=n.spender??n.router,c=t.allowance??e.allowance??n?.allowance??"0";f(a),f(d),f(g),f(s);let i=o(p);if(i<=0n)throw new r("Swap amountIn must be greater than zero.");let l=o(n.minAmountOut);if(l<=0n)throw new r("Swap minAmountOut must be greater than zero.");let w=e.router.toLowerCase()===y.toLowerCase(),m=t.data??e.data??n?.data??(w?Ee({from:a,to:d,amountIn:i.toString(),amountOut:n.grossAmountOut??n.amountOut,minAmountOut:n.calldataMinAmountOut??l.toString(),wallet:g}):Fe({from:a,to:d,amountIn:i.toString(),minAmountOut:l.toString(),wallet:g}));we(m,n.calldataMinAmountOut??l.toString(),n.router.toLowerCase()===T.toLowerCase());let I=n.venueFee??"0",v=n.venueFeeBps??0,b=n.provider??(w?"velora":"kyberswap"),B=n.feeDisclosure??fe({provider:b,venueFee:I,venueFeeBps:v,oakFee:n.oakFee??"0",oakFeeBps:n.oakFeeBps}),D=P(a),h=t.value??e.value??n?.value??(D?i.toString():"0"),O=j({to:e.router,data:m,value:h,chainId:A,description:`Swap ${i} base units of ${a} for at least ${l} base units of ${d} via ${b} (${e.router}). ${B}`});return Ae(O,n),D||o(c)>=i?[O]:[oe(a,s,i.toString(),A),O]}export{ve as a,Z as b,Ne as c,he as d,J as e,N as f,E as g,L as h,be as i,Y as j,de as k,U as l,H as m,P as n,ke as o,Ie as p,$e as q,pe as r,xe as s,fe as t,Fe as u,Ee as v,De as w,we as x,Ae as y,X as z,Ue as A,He as B};
@@ -1 +0,0 @@
1
- import{a as J,h as K}from"./UUID2E22.js";import{a as H}from"./43LI5NKJ.js";import{a as I}from"./66F5ZH34.js";import{c as D,d as Y,g as N,i as V,m as Q,n as z}from"./NWNYJ26T.js";import{a as p,i as R,j}from"./FWD4L3CJ.js";import{a as d}from"./XSD5NL7J.js";import{decodeFunctionData as X,encodeFunctionData as x,erc20Abi as F,getAddress as L,parseAbi as Z}from"viem";var e={router:L("0xf5198743240fac98db71868f34c70139b1eb0474"),factory:L("0xfa5429aeba338bea2bfcc1b9a889862ee395bc28"),pair:L("0x8697bb63743678640710b1270e98772a29642b3c"),weth:L("0x0bd7d308f8e1639fab988df18a8011f41eacad73"),up:L("0x57c0e45cb534413d1c20a4240955d6bb250bb4f1"),eth:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"},E=Z(["function token0() view returns (address)","function token1() view returns (address)","function factory() view returns (address)","function defaultFactory() view returns (address)","function stable() view returns (bool)","function getReserves() view returns (uint112,uint112,uint32)","function poolFor(address,address,bool,address) view returns (address)","function getPool(address,address,bool) view returns (address)","function getAmountsOut(uint256,(address from,address to,bool stable,address factory)[]) view returns (uint256[])","function quoteAddLiquidity(address,address,bool,address,uint256,uint256) view returns (uint256,uint256,uint256)","function addLiquidity(address,address,bool,uint256,uint256,uint256,uint256,address,uint256) returns (uint256,uint256,uint256)","function removeLiquidity(address,address,bool,uint256,uint256,uint256,address,uint256) returns (uint256,uint256)","function swapExactTokensForTokens(uint256,uint256,(address from,address to,bool stable,address factory)[],address,uint256) returns (uint256[])","function deposit() payable"]),ee=Z(["function want() view returns (address)"]),O={vault:{...D,description:"Address of the Beefy vault contract (from beefy_list)."},chainId:{const:p,description:"Chain id; only 4663 (Robinhood Chain mainnet) is supported. Optional."},slippageBps:{type:"integer",minimum:0,maximum:500,description:"Maximum slippage in basis points (50 = 0.5%), 0 to 500. Default 50."}},ue=["beefy_swap","beefy_add_liquidity","beefy_remove_liquidity"];function de(s,h){let f=()=>{throw new d("Beefy calldata differs from locally reconstructed inputs, recipient, route or minimums; nothing was signed.")};s.length!==h.length&&f();for(let q=0;q<s.length;q++){let P=s[q],v=h[q];if((P.chainId!==v.chainId||!N(P.to,v.to)||P.value!==v.value)&&f(),!N(P.data,v.data))try{let B=X({abi:E,data:P.data}),n=X({abi:E,data:v.data});(B.functionName!==n.functionName||!B.args||!n.args)&&f();let t=[...B.args],a=n.args,r=B.functionName==="swapExactTokensForTokens"?[1]:B.functionName==="addLiquidity"?[5,6]:B.functionName==="removeLiquidity"?[4,5]:f(),i=x({abi:E,functionName:B.functionName,args:t});N(i,P.data)||f();let u=t.length-1;(l(t[u])<=l(a[u])-600n||l(t[u])>l(a[u]))&&f(),t[u]=a[u];for(let o of r)l(t[o])<l(a[o])&&f(),t[o]=a[o];N(x({abi:E,functionName:B.functionName,args:t}),v.data)||f()}catch{f()}}}function y(s){return V(s,"Provide a token or vault address.",Y)}function G(s){return z(s,"Amount must be positive and fit in uint256.",{notString:"Provide a positive base-unit integer string.",positive:!0})}function l(s){return Q(s,"Invalid Beefy liquidity integer.")}function M(s){let h=s??50;if(typeof h!="number"||!Number.isInteger(h)||h<0||h>500)throw new d("Use integer slippageBps from 0 to 500.");return BigInt(h)}function W(s,h){let f=s*(10000n-h)/10000n;if(f===0n)throw new d("The liquidity amount is too small for a positive minimum output.");return f}var ce=s=>{async function h(n){try{return await n()}catch(t){throw new d(s.plainError(t))}}function f(n,t){if(n.chainId!==void 0&&n.chainId!==p)throw new d("Beefy requires chain 4663.");for(let a of Object.keys(n))if(!["vault","chainId",...t].includes(a))throw new d(`Unsupported Beefy input: ${a}.`);if(y(n.vault)!==L(R[p].vaults.beefyTestedLpVault.address))throw new d("Beefy LP routes are qualified only for up33-weth-up.")}async function q(){let n=s.clientFor(p);if(await n.getChainId()!==p)throw new d("The Beefy endpoint must report chain 4663.");let t=l(await n.getBlockNumber()),a=await n.getBlock({blockNumber:t}),r=l(a.timestamp)+600n,i=(S,g,A=[])=>n.readContract({address:S,abi:E,functionName:g,args:A,blockNumber:t}),[u,o,m,c,w,b]=await Promise.all([i(e.pair,"token0"),i(e.pair,"token1"),i(e.pair,"factory"),i(e.router,"defaultFactory"),i(e.pair,"stable"),n.readContract({address:R[p].vaults.beefyTestedLpVault.address,abi:ee,functionName:"want",blockNumber:t})]);if(y(u)!==e.weth||y(o)!==e.up||y(m)!==e.factory||y(c)!==e.factory||w!==!1||y(b)!==e.pair)throw new d("The Beefy LP, vault or router no longer matches the qualified route.");if(y(await i(e.router,"poolFor",[e.weth,e.up,!1,e.factory]))!==e.pair)throw new d("The router selects a different Beefy LP.");let k=async(S,g)=>l(await n.readContract({address:S,abi:F,functionName:"balanceOf",args:[g],blockNumber:t}));async function T(S){let[g,A]=await Promise.all([n.readContract({address:S,abi:F,functionName:"symbol",blockNumber:t}),n.readContract({address:S,abi:F,functionName:"decimals",blockNumber:t})]);if(typeof g!="string"||!g.trim()||typeof A!="number"||!Number.isInteger(A)||A<0||A>255)throw new d("Invalid Beefy constituent metadata.");return{address:S,symbol:g,decimals:A,chainId:p}}return{client:n,blockNumber:t,deadline:r,read:i,balance:k,token:T}}async function P(n,t,a){let r=await s.preview(n,t);return{txs:n,preview:r,summary:`${a} ${r.summary} Re-read balances after mining each step; these transactions are separate and earlier steps can remain mined if a later step fails. Gas is additional.`}}function v(n,t,a,r="0"){return s.unsignedTx({to:n,data:t,value:r,description:a,chainId:p})}return{tools:[{name:"beefy_lp",inputSchema:{type:"object",properties:{vault:{...D,description:"Address of the Beefy vault contract (from beefy_list)."},chainId:{const:p,description:"Chain id; only 4663 (Robinhood Chain mainnet) is supported. Optional."},amount:{...I(),description:'Optional CLM entry budget in base units of the bridge token (read its decimals). Example: "1000000" = 1 USDG at 6 decimals.'},slippageBps:O.slippageBps},required:["vault"],additionalProperties:!1},execute:(n,t)=>h(async()=>{if(J.some(b=>N(b.vault,y(n.vault))))return K(s).tools[0].execute(n,t);f(n,[]),H(t);let a=await q(),[r,i,u,o,m,c,w]=await Promise.all([a.token(e.weth),a.token(e.up),a.token(e.pair),a.read(e.pair,"getReserves"),a.balance(e.weth,t),a.balance(e.up,t),a.balance(e.pair,t)]);if(!Array.isArray(o)||o.length!==3)throw new d("Invalid Beefy LP reserves.");return{chainId:p,vault:y(n.vault),router:e.router,factory:e.factory,stable:!1,constituents:[{token:r,balance:m.toString(),reserve:l(o[0]).toString()},{token:i,balance:c.toString(),reserve:l(o[1]).toString()}],lp:{token:u,balance:w.toString()},block:a.blockNumber.toString(),summary:"Acquire WETH and UP with beefy_swap; add with beefy_add_liquidity, then deposit the mined LP balance with beefy_deposit. Withdraw moo shares, remove LP with beefy_remove_liquidity, then swap constituents to USDG. Every action requires its own preview and local confirmation."}})},{name:"beefy_swap",inputSchema:{type:"object",properties:{...O,from:{...D,description:"Address of the token to sell: native ETH placeholder, WETH, UP or USDG."},to:{...D,description:"Address of the token to receive: WETH, UP or USDG, different from the input token."},amount:I('Amount of the input token in base units of that token (read its decimals). Example: "1000000" = 1 USDG at 6 decimals; "1000000000000000000" = 1 WETH.')},required:["vault","from","to","amount"],additionalProperties:!1},execute:(n,t)=>h(async()=>{f(n,["from","to","amount","slippageBps"]),H(t);let a=y(n.from),r=y(n.to),i=G(n.amount),u=M(n.slippageBps),o=[e.weth,e.up,L(j)],m=a.toLowerCase()===e.eth;if(!m&&!o.includes(a)||!o.includes(r)||a===r)throw new d("Use ETH, WETH, UP or USDG as input and a different WETH, UP or USDG output.");let c=await q();if((m?await c.client.getBalance({address:t,blockNumber:c.blockNumber}):await c.balance(a,t))<i)throw new d("Insufficient Beefy swap input balance; keep ETH for gas.");let w=[];m&&w.push(v(e.weth,x({abi:E,functionName:"deposit"}),`Wrap ${i} ETH base units for the Beefy LP workflow.`,i.toString()));let b=m?e.weth:a,k=i,T=i;if(b!==r){let g=b===e.weth||r===e.weth?[b,r]:[b,e.weth,r],A=[];for(let U=0;U<g.length-1;U++){let C={from:g[U],to:g[U+1],stable:!1,factory:e.factory},$=y(await c.read(e.factory,"getPool",[C.from,C.to,!1]));if($==="0x0000000000000000000000000000000000000000"||$!==y(await c.read(e.router,"poolFor",[C.from,C.to,!1,e.factory])))throw new d("No verified Up33 route for these Beefy constituents.");A.push(C)}let _=await c.read(e.router,"getAmountsOut",[i,A]);if(!Array.isArray(_)||_.length!==g.length||l(_[0])!==i)throw new d("Invalid Beefy constituent quote.");for(let U of _)if(l(U)===0n)throw new d("No liquidity for this Beefy constituent swap.");k=l(_.at(-1)),T=W(k,u),w.push(s.approval(b,e.router,i.toString(),p)),w.push(v(e.router,x({abi:E,functionName:"swapExactTokensForTokens",args:[i,T,A,t,c.deadline]}),`Swap ${i} constituent base units; receive at least ${T} output base units.`))}let S=await c.token(r);return{...await P(w,t,"Prepare or convert Beefy LP constituents using the verified Up33 router."),output:{token:S,amount:k.toString()},minimumOutput:{token:S,amount:T.toString()},deadline:c.deadline.toString()}})},{name:"beefy_add_liquidity",inputSchema:{type:"object",properties:{...O,amount0:I('Amount of WETH to add in base units (WETH has 18 decimals). Example: "1000000000000000000" = 1 WETH.'),amount1:I('Amount of UP to add in base units of the UP token (read its decimals). Example: "1000000000000000000" = 1 UP at 18 decimals.')},required:["vault","amount0","amount1"],additionalProperties:!1},execute:(n,t)=>h(async()=>{f(n,["amount0","amount1","slippageBps"]),H(t);let a=G(n.amount0),r=G(n.amount1),i=M(n.slippageBps),u=await q();if(await u.balance(e.weth,t)<a||await u.balance(e.up,t)<r)throw new d("Acquire the WETH and UP constituents with beefy_swap, then retry with their mined balances.");let o=await u.read(e.router,"quoteAddLiquidity",[e.weth,e.up,!1,e.factory,a,r]);if(!Array.isArray(o)||o.length!==3)throw new d("Invalid Beefy add-liquidity quote.");let m=l(o[0]),c=l(o[1]),w=l(o[2]);if(m>a||c>r||w===0n)throw new d("Invalid Beefy add-liquidity amounts.");let b=W(m,i),k=W(c,i),T=[s.approval(e.weth,e.router,a.toString(),p),s.approval(e.up,e.router,r.toString(),p),v(e.router,x({abi:E,functionName:"addLiquidity",args:[e.weth,e.up,!1,a,r,b,k,t,u.deadline]}),"Mint the supported Beefy want LP directly to the calling wallet."),s.approval(e.weth,e.router,"0",p),s.approval(e.up,e.router,"0",p)];return{...await P(T,t,"Mint UP\u2013WETH LP. The router may use less than the approved desired amounts; final revocations clear unused allowances. Deposit the actual LP received in a separate beefy_deposit call."),output:{token:await u.token(e.pair),amount:w.toString()},minimumInputs:[{token:await u.token(e.weth),amount:b.toString()},{token:await u.token(e.up),amount:k.toString()}],deadline:u.deadline.toString()}})},{name:"beefy_remove_liquidity",inputSchema:{type:"object",properties:{...O,amount:{description:'Amount of UP-WETH LP tokens to remove, in base units of the LP token (18 decimals). Example: "1000000000000000000" = 1 LP token. "all" removes your full LP balance.',anyOf:[I(),{const:"all"}]}},required:["vault","amount"],additionalProperties:!1},execute:(n,t)=>h(async()=>{f(n,["amount","slippageBps"]),H(t);let a=M(n.slippageBps),r=n.amount==="all"?void 0:G(n.amount),i=await q(),u=await i.balance(e.pair,t),o=r??u;if(o===0n||o>u)throw new d("Withdraw your moo shares first, then provide a positive LP amount no greater than the fresh LP balance.");let[m,c,w]=await Promise.all([i.client.readContract({address:e.pair,abi:F,functionName:"totalSupply",blockNumber:i.blockNumber}),i.balance(e.weth,e.pair),i.balance(e.up,e.pair)]);if(l(m)===0n||o>m)throw new d("Invalid Beefy LP total supply.");let b=W(c*o/m,a),k=W(w*o/m,a),T=[s.approval(e.pair,e.router,o.toString(),p),v(e.router,x({abi:E,functionName:"removeLiquidity",args:[e.weth,e.up,!1,o,b,k,t,i.deadline]}),"Burn Beefy want LP and return WETH and UP to the calling wallet.")];return{...await P(T,t,"Remove UP\u2013WETH liquidity. Convert actual received constituents to USDG with beefy_swap after mining."),minimumOutputs:[{token:await i.token(e.weth),amount:b.toString()},{token:await i.token(e.up),amount:k.toString()}],deadline:i.deadline.toString()}})}]}};export{e as a,E as b,ue as c,de as d,ce as e};
@@ -1 +0,0 @@
1
- var c={chainId:4663,owner:"0x8A22d6e75e9427b9D57e42a7984200029e7E173C",curator:"0x8A22d6e75e9427b9D57e42a7984200029e7E173C",factory:{address:"0x0FBad98595b0186dA120E41f77C102beb49f803c",codeHash:"0xba55eb73d42937607d7e3c77f68353c2517c4fad4df02f0c9bbd2e4248475503",membershipFunction:"isVaultV2",creationEvent:"CreateVaultV2(address,address,bytes32,address)",fromBlock:"0",source:"https://github.com/morpho-org/vault-v2/blob/main/src/VaultV2Factory.sol",measuredAtBlock:"106289278"},assetRule:{usdg:{address:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",symbol:"USDG",decimals:6},officialStockRegistry:"https://api.robinhood.com/rhj/assets"},source:"https://borro.markets/contracts.json"},e=[{chainId:4663,symbol:"SPY",entry:"0xc3ed4a5a7db4102f4ed37af26ef0d3f21e2360c1",proxy:"0x117cc2133c37b721f49de2a7a74833232b3b4c0c",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"QQQ",entry:"0xbad8a97da1050092d6a14194d53e72d407d6cc17",proxy:"0xd5f3879160bc7c32ebb4dc785f8a4f505888de68",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"NVDA",entry:"0x508e23274c39c60c345e35b1f0188be180717cb9",proxy:"0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"TSLA",entry:"0x60b3d353e7e5bd12ed4ea2589c11b5603dd4c988",proxy:"0x322f0929c4625ed5bad873c95208d54e1c003b2d",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"MSTR",entry:"0x2b74f8f2b76cd4e97265bc37fb2578a04b8437e9",proxy:"0xec262a75e413fafd0df80480274532c79d42da09",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"COIN",entry:"0x7ba71bccecb12860ae7e141b6b6f1f8b96d31257",proxy:"0x6330d8c3178a418788df01a47479c0ce7ccf450b",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"PLTR",entry:"0xfe9419e70e5481f7a2ddddc18f856b09b3687b27",proxy:"0x894e1ec2d74ffe5aef8dc8a9e84686accb964f2a",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"SPCX",entry:"0x1261210e19052157fce2064d9aa9a2140bd89791",proxy:"0x4a0e65a3eccec6dbe60ae065f2e7bb85fae35eea",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"GME",entry:"0x328461fb01f54c2ab73909ea947c583d0dc24c3d",proxy:"0x1b0e319c6a659f002271b69db8a7df2f911c153e",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"AAPL",entry:"0x24fe7bcaeb75bc2202a42ecd48a177a27782c64a",proxy:"0xaf3d76f1834a1d425780943c99ea8a608f8a93f9",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"GOOGL",entry:"0xf0731b1022abd1e3f543cfd837c7eba42ed60e4f",proxy:"0x2e0847e8910a9732eb3fb1bb4b70a580adad4fe3",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"},{chainId:4663,symbol:"MSFT",entry:"0x8032c80a7817a3c4c401b096515b27b2ceda4e71",proxy:"0xe93237c50d904957cf27e7b1133b510c669c2e74",proxyCodeHash:"0x6c1fdd40002dcb440c7fff6a84171404d279ccb057803b65826f7546acd65630",implementation:"0xb35490d6f9163de4f80d88dc75c3516eb64c5ae2",codeHash:"0xdc07e86ee482f99641bdafb9a0d772846b167401e094d90a666b94dbdcd1eec7",measuredAtBlock:"106350992",source:"https://rpc.mainnet.chain.robinhood.com"}].flatMap(d=>[d,{...d,entry:d.proxy}]);export{c as a,e as b};
@@ -1,20 +0,0 @@
1
- import{a as w,b as r}from"./7VC53B5X.js";function n(e){return{text:e}}var h="borro.markets",k=n("Borro: lend your {symbol} to borrowers through Borro's vault."),R=n("Borro is an official Oak partner. Borro's own team runs its product and contracts; Oak didn't build them and doesn't run them."),E=n("Borro keeps {fee_pct}% of the interest as its fee."),A=n("Borro keeps part of the interest as its fee, and I couldn't read how much."),x=n("Reward: about {borro_rate}% a year today, which changes. {fee_clause} {comparison_clause}"),O=n("Reward: lending {symbol} pays about {borro_rate}% a year today, which changes. {fee_clause}"),S=n("Reward: lending {symbol} pays about {borro_rate}% a year today, which is close to nothing and changes. {fee_clause}"),g=n("I couldn't confirm Borro's rate in the last few minutes, so I can't tell you what this pays today. borro_list shows it when Borro's page is current."),T=n(`Reward: ${g.text} {fee_clause}`),_=n("The catch: you are lending {symbol}, a stock token, not dollars. If its price falls, what you get back is worth less in dollars, even though the {symbol} count is what you lent. The company that issues the token can also pause or restrict it."),N=n("LayerBank on Robinhood Chain pays about {lb_rate}% a year on USDG today, so LayerBank pays more."),C=n("LayerBank on Robinhood Chain pays about {lb_rate}% a year on USDG today, so Borro pays more."),I=n("LayerBank on Robinhood Chain pays about {lb_rate}% a year on USDG today, so they pay about the same."),B=n("I couldn't read {the_other} rate, so I can't compare them right now."),v=n("Borro is {age_phrase} old and has had no outside security check"),D=n("Borro's age couldn't be read, and it has had no outside security check"),L=n("A {threshold}-of-{owners} group wallet"),U=n("A wallet Oak could not inspect"),P=n("{age_clause}; its own page says only internal reviews were done. {controller_clause} controls the vault and can change where the money is lent. If Borro's code fails, or the people who control it make a harmful change, you could lose money."),F=n("Risk: {risk_clause}"),$=n(`Taking it out: you can take your money out when the vault has cash on hand. Right now about {ready} {symbol} of the {total} {symbol} lent in is ready; the rest is out with borrowers and can take time to come back. You can also take it out on ${h} with this wallet.`),K=n("Taking it out: you can take your money out when the vault has cash on hand. Right now all {total} {symbol} lent in is ready."),M=n(`Taking it out: you can take your money out when the vault has cash on hand. I couldn't read how much is ready to take out right now; money that is out with borrowers can take time to come back. You can also take it out on ${h} with this wallet.`),W=n("Cost: about {gas_in_usd} in network fees to put it in and about {gas_out_usd} to take it out."),Y=n("Cost: I couldn't read the network fees right now."),G=n("Cost: I couldn't price the network fees in dollars right now. The most you can pay, in ETH, is on the line below."),q=n("Rates shown leave out any $BORRO incentive."),H=n(`Lend {amount} {symbol} to Borro?
2
-
3
- Borro is an official Oak partner. Borro's own team runs its product and contracts; Oak didn't build them and doesn't run them.
4
- What you get: {reward_clause} {stock_catch_clause}
5
- What happens: {amount} {symbol} leaves your wallet and becomes about {shares} "{vault_symbol}" tokens, your receipt for money lent through Borro. Oak's preview checks that you would get at least {shares_min}, but Borro's contract doesn't enforce a minimum, so the final amount can differ slightly.
6
- The risk: {risk_clause}
7
- Taking it out: {taking_out_clause}
8
- {cost_line}
9
-
10
- Lend {amount} {symbol}? [Yes] [No]`),V=n("about {borro_rate}% a year at today's rate, which changes."),j=n(`when the vault has cash on hand. Right now about {ready} {symbol} is ready of the {total} {symbol} lent in. Also possible on ${h} with this wallet.`),z=n(`when the vault has cash on hand. I couldn't read how much is ready right now. Also possible on ${h} with this wallet.`),Z=n("Cost: about {gas_in_usd} in network fees now and about {gas_out_usd} to take it out."),Q=n(`Take {amount_or_all} {symbol} out of Borro?
11
-
12
- You get back about {out} {symbol} for {shares} "{vault_symbol}" tokens (what you lent plus interest so far). Oak's preview checks the amount, but the contract doesn't enforce a minimum, so it can differ slightly.
13
- {liquidity_note}
14
- {drift_notice}
15
- {cost_line}
16
-
17
- Take it out? [Yes] [No]`),J=n("Borro's vault only has about {ready} {symbol} ready right now, so I can take out {max_now} {symbol} today. Say so if you want that smaller amount."),X=n("Cost: about {gas_out_usd} in network fees."),tt=n("Borro's setup has changed since Oak checked it; the exit below was checked against the live contract."),et=n("I could not verify {vault_label} on chain, so Oak won't offer it. Nothing was signed."),ot=n("Borro's setup no longer matches what Oak checked. Nothing was signed."),nt=n("Borro only has {ready} {symbol} ready to take out right now, and you asked for {requested} {symbol}. I can take out {max_now} {symbol} now, or you can wait for more to come back."),rt=n("Borro only has {ready} {symbol} ready to take out right now, and you asked for {requested} {symbol}. None can be taken out today, so you can wait for more to come back."),st=n("This wallet has nothing lent on Borro for {symbol}."),at=n("Borro's vault wouldn't take this deposit right now (it may be full or paused). Nothing was signed."),it=n("New on Borro: the {symbol} vault. Oak checked it on the chain just now and it passes Oak's checks."),lt=n(`If you also borrowed, shorted or used credit on ${h}, Oak's view doesn't include that.`),At={CARD_INTRO:k,INDEPENDENCE:R,FEE_CLAUSE:E,FEE_CLAUSE_UNREADABLE:A,REWARD_USDG:x,REWARD_STOCK:O,REWARD_STOCK_LOW:S,RATE_UNREADABLE:g,REWARD_UNREADABLE:T,STOCK_CATCH:_,COMPARE_LAYERBANK_HIGHER:N,COMPARE_BORRO_HIGHER:C,COMPARE_SAME:I,COMPARE_UNREADABLE:B,AGE_CLAUSE:v,AGE_CLAUSE_UNKNOWN:D,CONTROLLER_SAFE:L,CONTROLLER_UNKNOWN:U,RISK_CLAUSE:P,RISK_LINE:F,TAKING_OUT:$,TAKING_OUT_ALL_READY:K,TAKING_OUT_UNREADABLE:M,CARD_COST:W,CARD_COST_UNREADABLE:Y,COST_UNREADABLE:G,NOTES_INCENTIVE:q,DEPOSIT_SCREEN:H,SCREEN_REWARD:V,SCREEN_TAKING_OUT:j,SCREEN_TAKING_OUT_UNREADABLE:z,DEPOSIT_COST:Z,WITHDRAW_SCREEN:Q,LIQUIDITY_NOTE:J,WITHDRAW_COST:X,DRIFT_NOTICE:tt,UNVERIFIED_REFUSAL:et,SETUP_MISMATCH:ot,TOO_LITTLE_READY:nt,NOTHING_READY:rt,NO_SHARES:st,DEPOSIT_WOULD_REVERT:at,NEW_VAULT_NOTICE:it,POSITIONS_NOTE:lt},xt=[/\bours?\b/i,/\bOak (?:owns?|runs?|operates?|built) Borro\b/i,/\bbuilt by\b/i,/\bOak's Borro\b/i,/\bour (?:vault|project)/i,/\bSafe\b/,/\bRobinhood\b(?! Chain)/,/\bfork\b/i,/\bpractice copy\b/i,/\banvil\b/i,/evm_increaseTime/i,/\bunlisted\b/i,/\bpinned\b/i];function y(e){return e.toFixed(2).replace(/\.?0+$/,"")}function l(e){return typeof e=="number"&&Number.isFinite(e)}var p=/^[A-Za-z0-9.$_-]{1,16}$/,yt=/^0x[0-9a-fA-F]{40}$/;function u(e){if(!p.test(e))throw new Error("Borro copy refused an asset symbol that is not a plain token symbol.");return e}function ut(e){return p.test(e)?e:"Borro vault shares"}function c(e,t){let o=t,s=[];for(let a of e.text.split(`
18
- `)){let i=/^\{([a-z][a-z0-9_]*)\}$/.exec(a);i&&o[i[1]]===""||s.push(r(n(a),o).trimEnd())}return s.join(`
19
- `)}var ht=86400,b=/^(\d+)(?:\.(\d+))?$/,mt=4;function d(e){let t=b.exec(e);if(!t)return e;let o=(t[2]??"").slice(0,mt).replace(/0+$/,"");return o?`${t[1]}.${o}`:t[1]}function bt(e,t){let o=b.exec(e),s=b.exec(t);if(!o||!s)return!1;let a=Math.max(o[2]?.length??0,s[2]?.length??0),i=m=>BigInt(m[1]+(m[2]??"").padEnd(a,"0"));return i(o)>=i(s)}function gt(e,t){if(!l(e)||!Number.isFinite(t)||e<=0)return;let o=(t-e)/ht;if(!(o<0)){if(o<1)return"under a day";if(o<14){let s=Math.floor(o);return s===1?"1 day":`${s} days`}return o<45?"about a month":`about ${Math.max(2,Math.round(o/30))} months`}}var _t=.05;function pt(e,t){let o=l(e),s=l(t);if(!o||!s)return r(B,{the_other:!o&&!s?"either":o?"LayerBank's":"Borro's"});let a=y(t),i=e-t;return Math.abs(i)<_t?r(I,{lb_rate:a}):r(i>0?C:N,{lb_rate:a})}function ct(e){let t=gt(e.deployedAtSeconds,e.nowSeconds),o=t===void 0?r(D,{}):r(v,{age_phrase:t}),a=Number.isInteger(e.threshold)&&Number.isInteger(e.owners)&&e.threshold>0&&e.owners>0&&e.threshold<=e.owners?r(L,{threshold:String(e.threshold),owners:String(e.owners)}):r(U,{});return r(P,{age_clause:o,controller_clause:a})}function ft(e){return l(e)?r(E,{fee_pct:y(e)}):r(A,{})}function f(e,t,o=G){let s={gas_in_usd:t.in,gas_out_usd:t.out};return w(e).some(i=>!s[i])?r(o,{}):r(e,s)}function wt(e){let t={...e,symbol:u(e.symbol)},o=l(t.borroRatePct),s=ft(t.feePct),a;o?t.kind==="usdg"?a=c(x,{borro_rate:y(t.borroRatePct),fee_clause:s,comparison_clause:pt(t.borroRatePct,t.layerbankRatePct)}):a=c(t.borroRatePct<1?S:O,{symbol:t.symbol,borro_rate:y(t.borroRatePct),fee_clause:s}):a=c(T,{fee_clause:s});let i;return t.readyAmount===void 0||t.totalAmount===void 0?i=r(M,{}):bt(t.readyAmount,t.totalAmount)?i=r(K,{total:d(t.totalAmount),symbol:t.symbol}):i=r($,{ready:d(t.readyAmount),total:d(t.totalAmount),symbol:t.symbol}),{intro:r(k,{symbol:t.symbol}),independence:r(R,{}),reward:a,...t.kind==="stock"?{catch:r(_,{symbol:t.symbol})}:{},risk:r(F,{risk_clause:ct(t)}),takingOut:i,cost:f(W,{in:t.gasInUsd,out:t.gasOutUsd},Y),notes:r(q,{})}}function Ot(e){let t=wt(e),{intro:o,independence:s,reward:a,risk:i,takingOut:m,cost:dt}=t;return[o,"",s,a,...t.catch?[t.catch]:[],i,m,dt].join(`
20
- `)}function St(e){let t={...e,symbol:u(e.symbol),vaultSymbol:ut(e.vaultSymbol)},o=l(t.borroRatePct),s=t.readyAmount!==void 0&&t.totalAmount!==void 0;return c(H,{amount:t.amount,symbol:t.symbol,reward_clause:o?r(V,{borro_rate:y(t.borroRatePct)}):r(g,{}),stock_catch_clause:t.kind==="stock"?r(_,{symbol:t.symbol}):"",shares:t.shares,vault_symbol:t.vaultSymbol,shares_min:t.sharesMin,risk_clause:ct(t),taking_out_clause:s?r(j,{ready:d(t.readyAmount),total:d(t.totalAmount),symbol:t.symbol}):r(z,{}),cost_line:f(Z,{in:t.gasInUsd,out:t.gasOutUsd})})}function Tt(e){let t={...e,symbol:u(e.symbol),vaultSymbol:ut(e.vaultSymbol)};return c(Q,{amount_or_all:t.isAll?`all ${t.amount}`:t.amount,symbol:t.symbol,out:t.out,shares:t.shares,vault_symbol:t.vaultSymbol,liquidity_note:t.liquidity?r(J,{ready:t.liquidity.ready,symbol:t.symbol,max_now:t.liquidity.maxNow}):"",drift_notice:t.drift?r(tt,{}):"",cost_line:f(X,{out:t.gasOutUsd})})}function Nt(e){return r(it,{symbol:u(e)})}function Ct(){return r(lt,{})}function kt(e){return e===void 0||/^[0.,\s]*$/.test(e)}function It(e,t){switch(e){case"unverified":{let o=t.vaultLabel,s=o&&yt.test(o)?`the vault at ${o}`:o&&p.test(o)?`the ${o} vault`:"this vault";return r(et,{vault_label:s})}case"setup-mismatch":return r(ot,{});case"too-little-ready":{let o=t,s=u(o.symbol);return kt(o.maxNow)?r(rt,{ready:o.ready,requested:o.requested,symbol:s}):r(nt,{ready:o.ready,requested:o.requested,max_now:o.maxNow,symbol:s})}case"no-shares":return r(st,{symbol:u(t.symbol)});case"deposit-would-revert":return r(at,{});default:throw new Error(`Unknown Borro refusal kind: ${String(e)}`)}}export{h as a,k as b,R as c,E as d,A as e,x as f,O as g,S as h,g as i,T as j,_ as k,N as l,C as m,I as n,B as o,v as p,D as q,L as r,U as s,P as t,F as u,$ as v,K as w,M as x,W as y,Y as z,G as A,q as B,H as C,V as D,j as E,z as F,Z as G,Q as H,J as I,X as J,tt as K,et as L,ot as M,nt as N,rt as O,st as P,at as Q,it as R,lt as S,At as T,xt as U,y as V,d as W,gt as X,_t as Y,pt as Z,ct as _,wt as $,Ot as aa,St as ba,Tt as ca,Nt as da,Ct as ea,It as fa};
@@ -1 +0,0 @@
1
- import{c as t}from"./WUT7TZYM.js";import{c as o}from"./DNNFKDZR.js";function s(e,n,a){return t(e,n,a,o)}export{s as a};
@@ -1 +0,0 @@
1
- import{a}from"./XSD5NL7J.js";var d=4663,r=46630,p=18,u=6,h=30,A="recipient",v="direct",P="totalSupply",o={4663:{layerbank:{pool:{address:"0x433e21dC2BF027910B1635653c2Eb630bC7dAD43",source:"https://docs.layerbank.finance/",pointer:"/robinhood/pool",block:null,blockKind:"read"},aToken:{address:"0xAd9b5C0ea95Cf998C1A31Aaa8aC7a24de94BeE69",source:"https://docs.layerbank.finance/",pointer:"/robinhood/USDG/aToken",block:null,blockKind:"read"}},pendle:{router:{address:"0x888888888889758F76e7103c6CbF23ABbF58F946",source:"https://docs.pendle.finance/",pointer:"/4663/router",block:null,blockKind:"read"},marketFactory:{address:"0x544BF81c855AE84c1e8b65d5E38770898D01EeE2",source:"https://docs.pendle.finance/",pointer:"/4663/marketFactory",block:null,blockKind:"read"}},pons:{factory:{address:"0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e",source:"Recorded chain and API observations",pointer:"/pons/factory",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},launchAndBuyRouter:{address:"0xe33E9E479dF8802cb0866d5d05258bEc4cF62948",source:"Recorded chain and API observations",pointer:"/pons/launchAndBuyRouter",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},memeHook:{address:"0xE5e702641Ea86F4ae6cC3cDaeD2B886f976Be044",source:"Recorded chain and API observations",pointer:"/pons/memeHook",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},feeEscrow:{address:"0xd3AFEB2a57f70eF218Aa82451c51B2fb0416Ac9e",source:"Recorded chain and API observations",pointer:"/pons/feeEscrow",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},buybackVault:{address:"0x42df2a798f82289E177311362e8f5ccC45c1219c",source:"Recorded chain and API observations",pointer:"/pons/buybackVault",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},locker:{address:"0x267444D099b10fB5Ed7c3Cc7B7c767AdcA574952",source:"Recorded chain and API observations",pointer:"/pons/locker",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},launchDeployer:{address:"0x3711ceA4feaDE896C913C68F01Eda97Cb06D1A42",source:"Recorded chain and API observations",pointer:"/pons/launchDeployer",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},graduationExecutor:{address:"0xC7819B64A1dAECD7eC19856d026cb14EfBd89046",source:"Recorded chain and API observations",pointer:"/pons/graduationExecutor",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},graduationGuard:{address:"0xf5695117b99B6f6401e67d4195BD653628176C6C",source:"Recorded chain and API observations",pointer:"/pons/graduationGuard",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},poolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/pons/poolManager",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"},positionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/pons/positionManager",block:"100307770",blockKind:"read",blockPointer:"/pinnedBlocks/ponsReads"}},oracle:{ethUsdgPool:{address:"0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca",source:"Recorded chain and API observations",pointer:"/ethUsdgPool/address",block:"100307735",blockKind:"read",blockPointer:"/ethUsdgPool/rawReading/block"}},tokens:{USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/usdg/address",block:null,blockKind:"latest",caveat:"Token reads around head 100305826; not individually pinned (Part B section 1.2)."},WETH:{address:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",source:"Recorded chain and API observations",pointer:"/routers/wrappedNative",block:null,blockKind:"latest"}},routes:{kyberswap:{address:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",source:"Recorded chain and API observations",pointer:"/routers/kyberswap/router",block:null,blockKind:"latest",caveat:"Historical API target; validate each fresh quote/build chain and target."},velora:{address:"0x6a000f20005980200259b80c5102003040001068",source:"Recorded chain and API observations",pointer:"/routers/velora/router",block:null,blockKind:"latest",caveat:"Historical API target; validate each fresh quote/build chain and target."}},ponsClaims:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",source:"Recorded chain and API observations",pointer:"/addresses/multicall3/address",block:null,blockKind:"unanchored",caveat:"Code present in the source snapshot; exact code-read block not recorded."}},ponsTrade:{universal_router:{address:"0x204faca1764b154221e35c0d20abb3c525710498",source:"Recorded chain and API observations",pointer:"/contracts/universal_router/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},pool_manager:{address:"0x8366a39cc670b4001a1121b8f6a443a643e40951",source:"Recorded chain and API observations",pointer:"/contracts/pool_manager/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},state_view:{address:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",source:"Recorded chain and API observations",pointer:"/contracts/state_view/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},quoter:{address:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",source:"Recorded chain and API observations",pointer:"/contracts/quoter/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"},permit2:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",source:"Recorded chain and API observations",pointer:"/contracts/permit2/address",block:"100372649",blockKind:"read",blockPointer:"/limitations/0"}},uniswap:{v3_factory:{address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",source:"Recorded chain and API observations",pointer:"/addresses/v3_factory/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},v3_position_manager:{address:"0x73991a25c818bf1f1128deaab1492d45638de0d3",source:"Recorded chain and API observations",pointer:"/addresses/v3_position_manager/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},v4_pool_manager:{address:"0x8366a39cc670b4001a1121b8f6a443a643e40951",source:"Recorded chain and API observations",pointer:"/addresses/v4_pool_manager/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},v4_position_manager:{address:"0x58daec3116aae6d93017baaea7749052e8a04fa7",source:"Recorded chain and API observations",pointer:"/addresses/v4_position_manager/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},v4_state_view:{address:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",source:"Recorded chain and API observations",pointer:"/addresses/v4_state_view/address",block:"100363029",blockKind:"snapshot",blockPointer:"/snapshots/v4_block"},swap_router02:{address:"0xcaf681a66d020601342297493863e78c959e5cb2",source:"Recorded chain and API observations",pointer:"/addresses/swap_router02/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},permit2:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",source:"Recorded chain and API observations",pointer:"/addresses/permit2/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},WETH:{address:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",source:"Recorded chain and API observations",pointer:"/addresses/WETH/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"},USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/addresses/USDG/address",block:"100361663",blockKind:"snapshot",blockPointer:"/snapshots/v3_block/number"}},clanker:{factory:{address:"0xD3f2cC1731b7Fd17f28798835C2E02f0a1839A94",source:"Recorded chain and API observations",pointer:"/contracts/factory/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},locker:{address:"0xE4910b09709423aFafD995dD76D8A81CF9134A09",source:"Recorded chain and API observations",pointer:"/contracts/locker/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},legacy_locker_v1:{address:"0x290f735f63824bb5836cde24a35f5103a5b5bc99",source:"Recorded chain and API observations",pointer:"/contracts/legacy_locker_v1/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_locker:{address:"0x88db2340bE5991B2b5Fca2Baee39B5CE048Cd70c",source:"Recorded chain and API observations",pointer:"/contracts/fee_locker/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_static_hook_v2:{address:"0x48B8F6AD3A1b4aA477314c9a23035b8F84dDe8cc",source:"Recorded chain and API observations",pointer:"/contracts/fee_static_hook_v2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},fee_dynamic_hook_v2:{address:"0x65efDF8Cce99b53C925DF878Df275Df21cB6E8Cc",source:"Recorded chain and API observations",pointer:"/contracts/fee_dynamic_hook_v2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},mev_module:{address:"0xEA1Fe197dF140e5d88fC6B49f2d21Ea05092299e",source:"Recorded chain and API observations",pointer:"/contracts/mev_module/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},devbuy:{address:"0xa27b1986e5c7e5371Cb6507f87918fBD0302fF5a",source:"Recorded chain and API observations",pointer:"/contracts/devbuy/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},vault:{address:"0x99B2a80ed21c7af1F5cc1A97383DADeEC7DD1427",source:"Recorded chain and API observations",pointer:"/contracts/vault/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},airdrop:{address:"0x6f27372FF493A3855E6746b9a4fe6Ed2Cc3034B5",source:"Recorded chain and API observations",pointer:"/contracts/airdrop/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},paired_weth:{address:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",source:"Recorded chain and API observations",pointer:"/contracts/paired_weth/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"}},clankerDependencies:{pool_manager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/pool_manager/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},position_manager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/position_manager/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},universal_router:{address:"0x53BF6B0684Ec7eF91e1387Da3D1a1769bC5A6F77",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/universal_router/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/contracts/uniswap_v4_dependencies/permit2/address",block:"100375756",blockKind:"fork",blockPointer:"/chain/fork_block_number"}},hoodag:{registry:{address:"0x3E717dc89AAF4605b607324329EEeB0a8B3C8A1c",source:"Recorded chain and API observations",pointer:"/contracts/registry/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},universalResolver:{address:"0xa9ed3C73F522875F18DAa631429125da893D8E53",source:"Recorded chain and API observations",pointer:"/contracts/universalResolver/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},registrar:{address:"0x9a122C54e15B6287c164b90833bcDA6E16520D50",source:"Recorded chain and API observations",pointer:"/contracts/registrar/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},publicResolver:{address:"0x072C7a66a6D52B23274470b86096AFCBF816CA0B",source:"Recorded chain and API observations",pointer:"/contracts/publicResolver/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},registrarController:{address:"0x7900b2B8Cc3f0616B18C68AdA7E115A9022Ca04a",source:"Recorded chain and API observations",pointer:"/contracts/registrarController/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"},reverseRegistrar:{address:"0x4be6D0379f56404B563afAe17c6b095b1dfcf479",source:"Recorded chain and API observations",pointer:"/contracts/reverseRegistrar/address",block:null,blockKind:"range",blockPointer:"/measuredBlockRange"}},hoodlock:{locker:{address:"0xd0f7d8c6e9f6d80c297bebe4f7fd1b9c8125c32f",source:"Recorded chain and API observations",pointer:"/contracts/locker/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},burner:{address:"0x6bf43ca706faa8ea46803299c191484e82280652",source:"Recorded chain and API observations",pointer:"/contracts/burner/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},airdrop:{address:"0x6B1fE7b821001144Ee74EEA258b0AafdE20102E8",source:"Recorded chain and API observations",pointer:"/contracts/airdrop/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"},liquidityLocker:{address:"0x91Aa2dA1956C77F8448E18DCaf53383bCc658e67",source:"Recorded chain and API observations",pointer:"/contracts/liquidityLocker/address",block:"100356379",blockKind:"read",blockPointer:"/chain/liveStateBlock"}},hookrLauncherV1:{launcherV1:{address:"0x70a66ADF39B5c9FfEE4A9F081C182edfbb7DBD0C",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/launcherV1",block:"104346779",blockKind:"read"},rootV1:{address:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/rootV1",block:"104346779",blockKind:"read"},rulesV1:{address:"0x342bAA22e202954593b04B7eD1663621E0565d46",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/rulesV1",block:"104346779",blockKind:"read"},agentGateV1:{address:"0x3b1aC66a6Fd9e9d8F063d145003cf29eac4Fb0C9",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/agentGateV1",block:"104346779",blockKind:"read"},familyRouterV1:{address:"0xbc56F48f873841d26a5a02575263d82f68e12864",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/familyRouterV1",block:"104346779",blockKind:"read"},familyLockV1:{address:"0x5248AF9139DaDEf0C5296342b7BE441deDf0adC2",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/familyLockV1",block:"104346779",blockKind:"read"},poolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/poolManager",block:"104346779",blockKind:"read"},positionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/positionManager",block:"104346779",blockKind:"read"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/permit2",block:"104346779",blockKind:"read"},registry:{address:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/registry",block:"104346779",blockKind:"read"},router:{address:"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/router",block:"104346779",blockKind:"read"},identity:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/identity",block:"104346779",blockKind:"read"},reputation:{address:"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",source:"Hookr verified sources and named-block runtime reads",pointer:"ops/growth/hookr-launch-lp-2026-11/DESIGN.md#deployments-and-release-boundaries/reputation",block:"104346779",blockKind:"read"}},hookr:{HookrLimitOrders:{address:"0x0c376cc30b1AC98b8ef80a4F516212D3B99402fA",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrLimitOrders/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRoot:{address:"0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRoot/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRouter:{address:"0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRouter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrQuoter:{address:"0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrQuoter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrLauncher:{address:"0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrLauncher/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRules:{address:"0x4a71c270b1520F94064268102AebD744b0DE7942",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRules/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRegistry:{address:"0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRegistry/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrTreasury:{address:"0x2242F7FC75606500503075f29ea8cDA684EfB4a9",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrTreasury/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrForwarder:{address:"0xe7863CC0E2Fb783b44c279aB159bcD812c2ceA1c",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrForwarder/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrOwnedRootFactory:{address:"0xA6c2a401597301dFf57A59bC8F70a9622499f3ec",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrOwnedRootFactory/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrRootFactory:{address:"0x21E438FaBE10770afb4407cF6b09d32369CBdCE4",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrRootFactory/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrFamilyRouter:{address:"0x854f3Fa7AC342B244DF0d9A8c8F597b051aAE559",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrFamilyRouter/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HookrFamilyLock:{address:"0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HookrFamilyLock/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},PoolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/PoolManager/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"},HOOKR_Token:{address:"0x18E674231A58c239Dc7DaeDcffE15Ec3A24cff5c",source:"Recorded chain and API observations",pointer:"/q1_liveness/contracts/HOOKR_Token/address",block:"100371423",blockKind:"fork",blockPointer:"/fork_block_number"}},merkl:{distributor:{address:"0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae",source:"Recorded chain and API observations",pointer:"/contracts/distributor/address",block:null,blockKind:"latest"},distributionCreator:{address:"0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd",source:"Recorded chain and API observations",pointer:"/contracts/distributionCreator/address",block:null,blockKind:"latest"},accessControlManager:{address:"0x5D36e13F076f34eE2Bf69fEAEa784887754465f8",source:"Recorded chain and API observations",pointer:"/contracts/accessControlManager/address",block:null,blockKind:"latest"}},poolsTrade:{liquidityLauncher:{address:"0x0000FffFBE8efE702c8703aE3477FF5dE3d319C0",source:"Recorded chain and API observations",pointer:"/contracts/liquidityLauncher/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},instantLaunchStrategyFeesOn:{address:"0x7c48DDe3B447381F4d986334679b3Afc7F2D35C2",source:"Recorded chain and API observations",pointer:"/contracts/instantLaunchStrategyFeesOn/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},instantLaunchStrategyFeesOff:{address:"0xC9566675b1Ea42861546f3c5B74Ace2c79c49572",source:"Recorded chain and API observations",pointer:"/contracts/instantLaunchStrategyFeesOff/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},feeSplitterFeesOn:{address:"0x9411fa7F956f64aa7981AA27cB3bC6eC0415449C",source:"Recorded chain and API observations",pointer:"/contracts/feeSplitterFeesOn/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},feeSplitterFeesOff:{address:"0x882Ae5e2095435A62Fd1BBDEfcb637f5CeAFc0ee",source:"Recorded chain and API observations",pointer:"/contracts/feeSplitterFeesOff/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},uerc20BeneficiaryVault:{address:"0x26d2F7AcB07707034406a0dC458351Bb63C02553",source:"Recorded chain and API observations",pointer:"/contracts/uerc20BeneficiaryVault/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},compoundingClaimRecipient:{address:"0xf585b5D728A8fdE743027307BF5F3556E3B9C58D",source:"Recorded chain and API observations",pointer:"/contracts/compoundingClaimRecipient/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},universalRouterStrategyApp:{address:"0x1242c9439d589cAE85E121B1f79f2aF51e91DCEE",source:"Recorded chain and API observations",pointer:"/contracts/universalRouterStrategyApp/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},uerc20Factory:{address:"0x000000e200088D55C39a11F609E5F667729ad49b",source:"Recorded chain and API observations",pointer:"/contracts/uerc20Factory/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},universalRouter:{address:"0x8876789976dEcBfCbBbe364623C63652db8C0904",source:"Recorded chain and API observations",pointer:"/contracts/universalRouter/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4PoolManager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/contracts/v4PoolManager/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4PositionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/contracts/v4PositionManager/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/contracts/permit2/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},v4Quoter:{address:"0x8Dc178eFB8111BB0973Dd9d722ebeFF267c98F94",source:"Recorded chain and API observations",pointer:"/contracts/v4Quoter/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"},protocolFeeController:{address:"0x6d0009504D129CF5002Dba61D9Ae8575AA79314c",source:"Recorded chain and API observations",pointer:"/contracts/protocolFeeController/address",block:"100369897",blockKind:"census",blockPointer:"/chain/headAtFirstCensus"}},priors:{pool:{address:"0x281210097f0de7A8FB6F87310AF0f089c9C8DE21",source:"Recorded chain and API observations",pointer:"/contracts/pool/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},lens:{address:"0x9d7035722bd42C551f82FEB9FDDd17453AEF3D9B",source:"Recorded chain and API observations",pointer:"/contracts/lens/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},usdg:{address:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",source:"Recorded chain and API observations",pointer:"/contracts/usdg/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},registry:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Recorded chain and API observations",pointer:"/contracts/registry/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"},stockVault:{address:"0xbEcd07EC689988e16b870C121756C4c2C8cb02B6",source:"Recorded chain and API observations",pointer:"/contracts/stockVault/address",block:null,blockKind:"latest",blockPointer:"/recorded-calls/8"}},morpho:{morpho_blue:{address:"0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010",source:"Recorded chain and API observations",pointer:"/addresses/morpho_blue/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},adaptive_curve_irm:{address:"0x2BD3d5965B26B51814AC95127B2b80dD6CcC0fa1",source:"Recorded chain and API observations",pointer:"/addresses/adaptive_curve_irm/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},USDG:{address:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",source:"Recorded chain and API observations",pointer:"/addresses/USDG/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"},WETH:{address:"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",source:"Recorded chain and API observations",pointer:"/addresses/WETH/address",block:"100362239",blockKind:"read",blockPointer:"/chain/read_block"}},tickerSpring:{limitOrderHook:{address:"0xa31729621a2280C0Ff9Aaff5B3F357cFF1bEC040",source:"Recorded chain and API observations",pointer:"/liveness/contracts/limitOrderHook/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},gridStrategy:{address:"0xd597785134307B5324f469A9506066fAd4827730",source:"Recorded chain and API observations",pointer:"/liveness/contracts/gridStrategy/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},ladderStrategy:{address:"0x23c7906D8fa3ede698A00AbE66D28605A41b4177",source:"Recorded chain and API observations",pointer:"/liveness/contracts/ladderStrategy/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},basketZap:{address:"0xFca65c50325b83F8f1E07cD103c00De0cEa4Fb39",source:"Recorded chain and API observations",pointer:"/liveness/contracts/basketZap/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"},usdg:{address:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",source:"Recorded chain and API observations",pointer:"/liveness/contracts/usdg/address",block:null,blockKind:"range",blockPointer:"/chain/verifiedAtBlockRange"}},orbio:{credit:{address:"0xe33322da1380e61e5ae5dfb21e7f62924c73004c",source:"Recorded chain and API observations",pointer:"/orbio/credit/address",block:"100313751",blockKind:"fork",caveat:"Fork anchor block recorded from chain observations; individual code reads were latest."},exchange:{address:"0x6951ffd32630b05e06f50062aea801625a58ebc0",source:"Recorded chain and API observations",pointer:"/orbio/exchange/address",block:"100313751",blockKind:"fork",caveat:"Fork anchor block recorded from chain observations; individual code reads were latest."}},vaults:{steakhouse:{address:"0xBeEff033F34C046626B8D0A041844C5d1A5409dd",source:"Recorded chain and API observations",pointer:"/vaults/eligible/0/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},spark:{address:"0xde770c84fe66e063336b31737cfe9790f18c4087",source:"Recorded chain and API observations",pointer:"/vaults/eligible/1/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},netnet:{address:"0x99347d5F70D3838763f6Bddcf80304C8aa953B57",source:"Recorded chain and API observations",pointer:"/vaults/eligible/2/address",block:"100320900",blockKind:"read",blockPointer:"/vaults/verifiedAtBlock",caveat:"Historical eligibility only; recheck asset and >=1e12 USDG totalAssets on every listing."},morphoV2Factory:{address:"0x0fbad98595b0186da120e41f77c102beb49f803c",source:"Recorded chain and API observations",pointer:"/vaults/morphoVaultV2Factory",block:null,blockKind:"latest"},longbowCore:{address:"0x026df18fbd2A7639089D0a16293383ec687A5Ca1",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/0/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/0/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},longbowFrontier:{address:"0x65dC90cd3a0BCDE967c8AE6019d6790b616E78F7",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/1/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/1/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},longbowEth:{address:"0xe129D4Cb2d454C4ACFAc909d1576453A9b835f61",source:"Recorded chain and API observations",pointer:"/projects/0/deployments/2/address",block:"100355967",blockKind:"read",blockPointer:"/projects/0/deployments/2/read_block",caveat:"Below USDG threshold or wrong asset at measurement; deployment context only."},beefyTestedLpVault:{address:"0xC447184BF75a84Ace3087515CCFFb54937838FC8",source:"Recorded chain and API observations",pointer:"/projects/1/tested_lp_vault",block:"100357163",blockKind:"fork",blockPointer:"/fork_environment/fork_block",caveat:"LP adapter only; not an eligible USDG ERC-4626 vault. Other per-vault/strategy addresses remain dynamic."},groveAlm:{address:"0xBEEff039907422219Fb367e525954DDC092854d9",source:"Recorded chain and API observations",pointer:"/projects/2/address",block:"100355967",blockKind:"read",blockPointer:"/raw_reads/longbow_grove_control/4/block",caveat:"Public Grove x Steakhouse USDG ERC-4626 vault; below $1M USDG threshold at measurement."}},identity:{identityRegistry:{address:"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",source:"Recorded chain and API observations",pointer:"/erc8004/identityRegistry",block:null,blockKind:"latest"},reputationRegistry:{address:"0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",source:"Recorded chain and API observations",pointer:"/erc8004/reputationRegistry",block:null,blockKind:"latest"},validationRegistry:{address:"0x8004Cc8439f36fd5F9F049D9fF86523Df6dAAB58",source:"Recorded chain and API observations",pointer:"/erc8004/validationRegistry",block:null,blockKind:"latest"}},meridian:{PredictionMarketEscrow:{address:"0xE4cea507b19796362A5a28Fa7cb705A3F1866213",source:"Recorded chain and API observations",pointer:"/addresses/PredictionMarketEscrow/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},SecondaryMarketEscrow:{address:"0x7E318ef37c3bC3d0cBA205Af2D1Fc9F9CeFEB5df",source:"Recorded chain and API observations",pointer:"/addresses/SecondaryMarketEscrow/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},MeridianRobinhoodVault:{address:"0x79cB914f3F336426E89FaB55A9488AB25770552D",source:"Recorded chain and API observations",pointer:"/addresses/MeridianRobinhoodVault/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."},CollateralToken_USDe:{address:"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34",source:"Recorded chain and API observations",pointer:"/addresses/CollateralToken_USDe/address",block:null,blockKind:"latest",caveat:"Code census not individually block-pinned; fork execution at 100370553 is separate."}},relay:{depository:{address:"0x4cd00e387622c35bddb9b4c962c136462338bc31",source:"Recorded chain and API observations",pointer:"/addresses/depository_4663",block:"100355691",blockKind:"fork",blockPointer:"/fork/fork_block",caveat:"Only quoted depositNative path fork-tested; bridge settlement is external and unmeasured."}},lighter:{settlement:{address:"0x94bAB9693Ba2f6358507eFfcbd372b0660AFfF9d",source:"Recorded chain and API observations",pointer:"/contracts_on_4663/lighter_rh_settlement_proxy/address",block:"100355574",blockKind:"read",blockPointer:"/block_number",caveat:"Settlement/custody metadata only; funding tool uses HTTP, not this contract."}},heyResearch:{heyToken:{address:"0xB33eb16782776b4D738c0Fd643577cb0284Db610",source:"Recorded chain and API observations",pointer:"/addresses/heyToken/address",block:null,blockKind:"unanchored",caveat:"API-only tools; source has time range but no block anchor."}}},46630:{deployments:{test_USDG:{address:"0x7E955252E15c84f5768B83c41a71F9eba181802F",source:"Recorded chain and API observations",pointer:"/code_probes/0/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/0/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_WETH:{address:"0x7943e237c7F95DA44E0301572D358911207852Fa",source:"Recorded chain and API observations",pointer:"/code_probes/1/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/1/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_gateway:{address:"0x77bF00A6A90c600f214b34BAFBB7918c0cF113A8",source:"Recorded chain and API observations",pointer:"/code_probes/2/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/2/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_identity:{address:"0x8004A818BFB912233c491871b3d84c89A494BD9e",source:"Recorded chain and API observations",pointer:"/code_probes/3/address",block:"144387817",blockKind:"read",blockPointer:"/code_probes/3/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_USDG_implementation:{address:"0xf0863d7a29a55d0c4263c11bfac754312ff078df",source:"Recorded chain and API observations",pointer:"/code_probes/15/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/15/block",caveat:"Code presence alone does not establish a complete testnet integration."},facet_0xef55bec6:{address:"0x08f560a85db40a7d4ac49b4F44f1D38e5B8aB811",source:"Recorded chain and API observations",pointer:"/code_probes/17/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/17/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_production_poolmanager:{address:"0x8366a39CC670B4001A1121B8F6A443A643e40951",source:"Recorded chain and API observations",pointer:"/code_probes/22/address",block:"144389821",blockKind:"read",blockPointer:"/code_probes/22/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v3_community_test_candidate:{address:"0xFECCB63CD759d768538458Ea56F47eA8004323c1",source:"Recorded chain and API observations",pointer:"/code_probes/50/address",block:"144389821",blockKind:"read",blockPointer:"/code_probes/50/block",caveat:"Community v3 is not canonically endorsed; v4 native stack is incomplete."},Uniswap_v4_PositionManager:{address:"0x58daec3116aae6D93017bAAea7749052E8a04fA7",source:"Recorded chain and API observations",pointer:"/code_probes/52/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/52/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_Quoter:{address:"0x8Dc178eFB8111BB0973Dd9d722ebeFF267c98F94",source:"Recorded chain and API observations",pointer:"/code_probes/54/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/54/block",caveat:"Code presence alone does not establish a complete testnet integration."},Uniswap_v4_StateView:{address:"0xF3334192D15450CdD385c8B70e03f9A6bD9E673b",source:"Recorded chain and API observations",pointer:"/code_probes/56/address",block:"144390120",blockKind:"read",blockPointer:"/code_probes/56/block",caveat:"Code presence alone does not establish a complete testnet integration."},test_Permit2:{address:"0x000000000022D473030F116dDEE9F6B43aC78BA3",source:"Recorded chain and API observations",pointer:"/code_probes/77/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/77/block",caveat:"Code presence alone does not establish a complete testnet integration."},v3_test_WETH9:{address:"0x37E402B8081eFcE1D82A09a066512278006e4691",source:"Recorded chain and API observations",pointer:"/code_probes/78/address",block:"latest",blockKind:"latest",blockPointer:"/code_probes/78/block",caveat:"Community v3 is not canonically endorsed; v4 native stack is incomplete."}}}},t=o[4663].tokens.USDG.address,i=o[46630].deployments.test_USDG.address,x=o[4663].pons.factory.address,m=o[4663].pons.memeHook.address,_=o[4663].pons.poolManager.address,R=o[4663].pons.feeEscrow.address,C=o[4663].oracle.ethUsdgPool.address,b={name:"Global Dollar",version:"1",chainId:d,verifyingContract:t},l={name:"Global Dollar",version:"1",chainId:r,verifyingContract:i},c={mainnet:{chainId:d,usdg:t,usdgDomain:b,weth:o[d].tokens.WETH.address,identityRegistry:o[d].identity.identityRegistry.address},testnet:{chainId:r,usdg:i,usdgDomain:l,weth:o[r].deployments.test_WETH.address,identityRegistry:o[r].deployments.test_identity.address}};function E(e="mainnet"){if(e!=="mainnet"&&e!=="testnet")throw new a("Set OAK_NETWORK to mainnet or testnet.");return e}function F(e,s){if(s.toLowerCase()!==c[e].usdg.toLowerCase())throw new a(`USDG does not match the pinned ${e} deployment on chain ${c[e].chainId}.`)}async function B(e,s){let n=await s.getChainId();if(n!==c[e].chainId)throw new a(`RPC chain ${n} does not match OAK_NETWORK ${e} (chain ${c[e].chainId}).`)}var y={4663:{kyberswap:"0xe21fd0e9",velora:"0xe3ead59e"}},k={4663:{kyberswap:{address:"0x8F10B468b06c6FD214B65F87778827F7D113f996",source:"https://raw.githubusercontent.com/KyberNetwork/kyberswap-documentation/main/developer-guide/aggregator-api/contracts.md",pointer:"Robinhood / AggregationExecutorProxy",block:"100861304",blockKind:"read",caveat:"Corroborated by successful transaction 0x4a2474960f846f412d4d1cbdebb86727c81f92a0859ad743425fdc544d8973e8; approveTarget is zero."},velora:{address:"0x006d0e0d006109f0020f3050000a713780b7b000",source:"https://rpc.mainnet.chain.robinhood.com",pointer:"eth_getTransactionByHash / 0x70bc411f8427d622798ff82e6088d6cf3c011ae04b063c731664215f982ecfba / input / executor",block:"100861280",blockKind:"read",caveat:"Observed v6.2 executor, corroborated by six fresh Velora builds on 2026-10-29; no vendor executor list for 4663. Inner route targets vary; this pin does not authenticate them."}}},D=BigInt("0x45a6e007c874ffc6321d6fb90eac272dd6864bfa")<<96n|1n<<92n|1n,g=[k[4663].velora.address,"0x082738d007001080a00099a000004f3006152085"],I=[{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x1266261289d815650a6bcdb308766be36efa8149",codeHash:"0xa38c335d383c1ac060df1f3f4687917a6da673bbf6e37a3b5241b49760194d6d"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x3e2db9ed1693964d599dfeba87181a36fffc8ed8",codeHash:"0xbc971642d398135438c4d2cf9f2229ffe5f8c321584673c4a2535b6df47c01ef"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x664aafe2bd40e581aa4f8c5a594c9ee168b92d4f",codeHash:"0xda9b31df9b098e520e7f6a5b94356920d32a66c736c8788cf2af3035781babc9"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0x9d215290f43366bbceff40a79fbac9dd23325379",codeHash:"0x8d15c4f2b99c6b24daa0f2383c0cfd998879b89b36e9359b18345fc9e7686333"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0xa685fc7cef9eb4c1e8337f11019aeba111e48c31",codeHash:"0xd5cb6ac468476cda0e4069cb53097412c45dc4fcc23d61db05426e8047aa7a9b"},{chainId:4663,proxy:"0x888888888889758f76e7103c6cbf23abbf58f946",proxyCodeHash:"0xbd969810d4bcf7417666e8692b6c73077a44516db4c4f62c35f70c83ff3c205f",implementation:"0xf475964cb5235641f23e99c8d7828996c4289ac4",codeHash:"0x399cd0fb5f0a36db2d3221fab8d04c78c88239a128c9463f6c27aa2120a1f6ff"}],K=[{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x0a48ea27489881d84288776d1e0588d633945ad6",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0xcf319d0021dfde8c676a54f8a36ead8fd2e48984",codeHash:"0x503caa96fd60bb34d6c4e290019d4f931bc36340b8e07b669f0e99059055d092"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0x50fa4b08d75586603d678fadbeabf1f4d8d2113b",codeHash:"0xa157bf9c94b218a72d8ebe2c4321817d5d53a58e81553928c2a8cbfaf9edb628"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxyCodeHash:"0xd460046af3bffad2aa81503173711d1b70a88a56155b8d0cd0ca53a3fee23078",implementation:"0xb8ea4704fe518c5ccbf429fc6db1b2c4c4ca7193",codeHash:"0x5577c0b6a060fce1ceffb8ef0c80305bf8391d7af789742c8d1f2d00457aa955"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x5685f0b21126d87f60810780ce23c43ea45cb61e",proxyCodeHash:"0xd8500e5bf9af5e118e73c61f9c78ad630740b50d86cf38aaa26543a239cb1db2",implementation:"0xb20e7d58987b2b606d242f220cdb8cd9c676b526",codeHash:"0xbccc9c0d786a46f9d9810fb887905cc89ba453c5d2a1d9846e2267f71bfa877d"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0xad9b5c0ea95cf998c1a31aaa8ac7a24de94bee69",proxyCodeHash:"0xd8500e5bf9af5e118e73c61f9c78ad630740b50d86cf38aaa26543a239cb1db2",implementation:"0x0a75d1a1800e98fb0df13cdb4ecee3e4ea1685ca",codeHash:"0xaac5c7ab1c270883872ca5817bc80aca7cdce1ad8500acbe02e2943465fe9d36"},{chainId:4663,entry:"0x433e21dc2bf027910b1635653c2eb630bc7dad43",proxy:"0x5fc5360d0400a0fd4f2af552add042d716f1d168",proxyCodeHash:"0x864cc9ad53b338b82da1f7cab85ab0b3d5c8861acb422b6fec63cf36234f36a6",implementation:"0x68184c449e1a8f34fa18d289737129fd27b66f8f",codeHash:"0x3a551ac5c744af57e68a1d1431ac403c0f516ffd7d224a75746aee11fc4f3baf"}];export{d as a,r as b,p as c,u as d,h as e,A as f,v as g,P as h,o as i,t as j,i as k,x as l,m,_ as n,R as o,C as p,b as q,l as r,c as s,E as t,F as u,B as v,y as w,k as x,D as y,g as z,I as A,K as B};
@@ -1 +0,0 @@
1
- import{d as o}from"./ARI72OYT.js";import{a as i}from"./SPRVVJXI.js";import{a}from"./FWD4L3CJ.js";var m=s=>({tools:i.map(e=>{let t=e==="netnet_blackjack_claim"?"seriesId":"sessionId";return{name:e,inputSchema:{description:"Self-only recovery on chain 4663, available without an active identity or subscription; every action requires local human confirmation. Card counts use whole units.",type:"object",additionalProperties:!1,required:[t],properties:{[t]:{type:"string",pattern:"^[1-9][0-9]{0,77}$",description:t==="seriesId"?'Card series id holding your parked blackjack chips, as a decimal string. Example: "1".':'Blackjack session id to settle, as a decimal string. Example: "1".'}}},execute:async(n,c)=>{let r=await o(e,n,c,s.clientFor(a));return{txs:r.txs,summary:r.decision}}}})});export{m as a};
@@ -1 +0,0 @@
1
- import{c as N,f as q,j as $,k as K}from"./U2YCQWZK.js";import{a as M}from"./6WD4HHID.js";import{a as B,i as I}from"./FWD4L3CJ.js";import{formatUnits as Z,getAddress as z,parseAbi as H}from"viem";var l={chainId:4663,usdg:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",v4:{poolManager:"0x8366a39CC670B4001A1121B8F6A443A643e40951",swapper:"0x7Cd4E04E433E69e588728c86A3832753B5F846d4",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",stateView:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b"},v3:{router:"0xCaf681a66D020601342297493863E78C959E5cb2",quoter:"0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7",factory:"0x1f7d7550B1b028f7571E69A784071F0205FD2EfA"},tokens:[{symbol:"AAPL",token:"0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9",pools:[{v:3,fee:500,pool:"0xAae0d815EE56e4092a5E5C2911E676Fea50B2d6D"},{v:4,fee:3e3,tickSpacing:60,id:"0xc748f4671a867db48b552f6b7650bf3255e05f80f00e3f7aad1b17ccb7898fdb"},{v:3,fee:3e3,pool:"0x783C9bbB765047CFdD2b84b92b2Ca9F11D34b7Ed"}]},{symbol:"AMD",token:"0x86923f96303D656E4aa86D9d42D1e57ad2023fdC",pools:[{v:3,fee:3e3,pool:"0x48D284A2A4d3DC1b3Da08231Fe44317e7e7Aa51f"}]},{symbol:"AMZN",token:"0x12f190a9F9d7D37a250758b26824B97CE941bF54",pools:[{v:3,fee:3e3,pool:"0x8AC92DA74AB5F3b1d024Dc1943Ad7e15Dc4179Ef"},{v:4,fee:2400,tickSpacing:24,id:"0xefc94885c96b02696b9b45de43eeeb8ac53c0199cab42b4daae4911b96fb8825"}]},{symbol:"ASML",token:"0x47F93d52cBeC7C6D2CfC080e154002370a60dAEA",pools:[{v:3,fee:1e4,pool:"0xedb22516B14Eb2d1C86927Db373B0E8bF70F5cD1"}]},{symbol:"BABA",token:"0xad25Ac6C84D497db898fa1E8387bf6Af3532a1c4",pools:[{v:4,fee:1e3,tickSpacing:10,id:"0x1791fc651cc794a282e5dbcb56d0b2b38eff8754b677c8876e86901521ecc439"},{v:3,fee:3e3,pool:"0xa57ab582b310dd6f9e934EA1EEEa152741545E6A"}]},{symbol:"COIN",token:"0x6330D8C3178a418788dF01a47479c0ce7CCF450b",pools:[{v:4,fee:2500,tickSpacing:25,id:"0xe2e1a0e32205e854525e0fb1d3667a53bd3b4919f032b9bcd2a038b6b6dac314"},{v:4,fee:1e4,tickSpacing:200,id:"0x007a13fa152f6dc383cad20a8eaab4e1e2538b606936eae2a424f8aa47d6db31"}]},{symbol:"CRCL",token:"0xdF0992E440dD0be65BD8439b609d6D4366bf1CB5",pools:[{v:3,fee:3e3,pool:"0x654E4143e82a5824445Ade0824351C2A9ACD95a8"},{v:4,fee:3e3,tickSpacing:30,id:"0x628c98ab436ee34a6a7decd606242890582591bdf7c9a35d90e0d08021c31ea0"},{v:4,fee:1500,tickSpacing:15,id:"0x5177eac8c2176468bbf15e44081e151d35c2e7d068e96d3db94f496a4dc944b2"}]},{symbol:"CRWV",token:"0x5f10A1C971B69e47e059e1dC91901B59b3fB49C3",pools:[{v:4,fee:9e3,tickSpacing:90,id:"0x237014478f7ef98afbe7412ac35b6a3f96b8fb111de48b7c4dbf49dba4bd9c4b"}]},{symbol:"DELL",token:"0x941AE714EC6D8130c7B75d67160Ca08f1e7d11Dd",pools:[{v:3,fee:1e4,pool:"0xc30c89cB7815A1488b7998D15eEC73961707Fc5a"}]},{symbol:"GME",token:"0x1b0E319c6A659F002271B69dB8A7df2F911c153E",pools:[{v:3,fee:500,pool:"0xE2b46c905E12Ab8E2f864e4821a4325884C1B126"}]},{symbol:"GOOGL",token:"0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3",pools:[{v:3,fee:500,pool:"0x34D0dC122CF9A8Eb296fC5e0D3A233625D7d19b7"},{v:4,fee:300,tickSpacing:3,id:"0x43fe16b75cabbf38f5b185d16142b02d1d9200d8f1ba17cb6cf899f562c6197f"},{v:4,fee:3e3,tickSpacing:60,id:"0xd4ecb79fdc521d7725d22b33ed43cb4e47aa96bfad76aa29577e3151f723ac5e"}]},{symbol:"INTC",token:"0xc72b96e0E48ecd4DC75E1e45396e26300BC39681",pools:[{v:3,fee:3e3,pool:"0x2e5a92f5013a64661A49312111be2e8aBd33F56a"}]},{symbol:"META",token:"0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35",pools:[{v:4,fee:310,tickSpacing:3,id:"0xc58bb68060bcb7b3ea0f6d4a4afef1e57f628722e808db12afb6d1733552872f"},{v:3,fee:3e3,pool:"0x107a7Cb40d8665360ba10E59471Af06150A50922"},{v:4,fee:3e3,tickSpacing:60,id:"0x5875d407a42965b0e768c8925cea290e06fa50603ef34fc99eb92a1050e6ae36"}]},{symbol:"MSFT",token:"0xe93237C50D904957Cf27E7B1133b510C669c2e74",pools:[{v:3,fee:3e3,pool:"0xeb60bCD1D920ad6E102690CCFC6fB488899E1510"},{v:4,fee:3e3,tickSpacing:60,id:"0x9194a557b6a6bb2236b49ea7e2bbccec5d3eeb705aef00903be4b3de1d949579"}]},{symbol:"MSTR",token:"0xec262a75e413fAfD0dF80480274532C79D42da09",pools:[{v:4,fee:2500,tickSpacing:25,id:"0x319bac87e616a89e241c10aeb8afd4892a852cdd8b373cd9765ecddc40b87cfe"},{v:4,fee:2400,tickSpacing:24,id:"0xc105b8300ff65d750a0e4e63c7a879e20504069b770713464a5315e797735326"}]},{symbol:"MU",token:"0xfF080c8ce2E5feadaCa0Da81314Ae59D232d4afD",pools:[{v:3,fee:3e3,pool:"0xd057B1Bc54917855BBee58eAd58647f47caB35E5"}]},{symbol:"NBIS",token:"0x9D9c6684F596F66a64C030B93A886D51Fd4D7931",pools:[{v:4,fee:9900,tickSpacing:99,id:"0x7c2f9ce1214ba9baf56d1b6a1fc640c1b63e9a711172c0c7d10e5a9c4a3d4f0c"}]},{symbol:"NVDA",token:"0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC",pools:[{v:3,fee:500,pool:"0xd4EB21209C4D6093f80B5b84f5C45cc093EA14a3"},{v:4,fee:100,tickSpacing:1,id:"0x6444a8e0b267406a15db74ca00c4a24bdfa81ed3180f5b6d0851f8ed6f4f29c5"},{v:4,fee:3e3,tickSpacing:60,id:"0x3bb34a44f1b2b5f32c034c38a53065a521a47b199700fa9bd19d60985ff24bf1"}]},{symbol:"ORCL",token:"0xb0992820E760d836549ba69BC7598b4af75dEE03",pools:[{v:4,fee:1e4,tickSpacing:200,id:"0xc2ce4784e1e72cf0221b51b30c8aaadf6c0b12863cf03ab3687854fb7b1d850a"}]},{symbol:"PLTR",token:"0x894E1EC2D74FFE5AEF8Dc8A9e84686acCB964F2A",pools:[{v:4,fee:1500,tickSpacing:15,id:"0xc59eaeda6d1a6f031bc7e1d039772f2d675e7b4de2c8668610f4471bd60b3802"},{v:3,fee:3e3,pool:"0x851680416A4f4E1c463d45171d61ACDdBc8554c0"}]},{symbol:"QQQ",token:"0xD5f3879160bc7c32ebb4dC785F8a4F505888de68",pools:[{v:3,fee:500,pool:"0xD60A5d14dB690B7Afad71F76B108071D7175597d"}]},{symbol:"SGOV",token:"0x92FD66527192E3e61d4DDd13322Aa222DE86F9B5",pools:[{v:3,fee:500,pool:"0x6Ba50150B17Ffd0972915Aaf04fFd5E8f4Fa49b4"},{v:3,fee:3e3,pool:"0xfAb520051f96F4D2a32c22B6a3dD7fFfdf231bFe"}]},{symbol:"SLV",token:"0x411eFb0E7f985935DAec3D4C3ebaEa0d0AD7D89f",pools:[{v:3,fee:3e3,pool:"0x8cB787e6c315D464775289BaD00FDD67d53Ecb3D"},{v:3,fee:1e4,pool:"0x0Fa7BC480885DCf58Ad2ef63eC7289cF2481D51c"}]},{symbol:"SNDK",token:"0xB90A19fF0Af67f7779afF50A882A9CfF42446400",pools:[{v:4,fee:1e4,tickSpacing:200,id:"0x2707cb88a6a40fa0f948f58958051ba097d6f6a3cf7f87929bd68ccc5becea24"}]},{symbol:"SPCX",token:"0x4a0E65A3EcceC6dBe60AE065F2e7bb85Fae35eEa",pools:[{v:3,fee:500,pool:"0xc61284332117c3FB23A2A56cceFFD07F7aF60029"},{v:3,fee:3e3,pool:"0xEb07d9587eFD1778dFb9c385Ec43EF6d5F9fE401"}]},{symbol:"SPY",token:"0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",pools:[{v:4,fee:100,tickSpacing:1,id:"0xe1ae6a4c6ccc9f037389a8d50a4f577bde1a9fe01d85d88ecbbd39955ce53288"},{v:3,fee:500,pool:"0xa7Bb1AC63BBaB0C44316E6c8C455213441689167"},{v:4,fee:500,tickSpacing:5,id:"0xe5923c8a8be481ec89a2ca784a2bbfa4235de6d88f92260fd66b660c4babf907"}]},{symbol:"TSLA",token:"0x322F0929c4625eD5bAd873c95208D54E1c003b2d",pools:[{v:3,fee:3e3,pool:"0xf4ACdAEEB7022862A763C9B1B885e11191c889E3"},{v:4,fee:3e3,tickSpacing:60,id:"0x8517f8071ae5b831b738052f12125e8e3d6c158b78728aa44ce3b25e5104d32e"}]},{symbol:"TSM",token:"0x58FfE4a942d3885bAa22D7520691F611EF09e7AA",pools:[{v:4,fee:7500,tickSpacing:75,id:"0x0ba5d53d2f6255f334b7c8ead4f56b6aef5af3402c5e4d11180afd38c6b85fb1"},{v:3,fee:1e4,pool:"0x07e8Ea83D4C1340774c8965125e26e12bf943bf1"}]},{symbol:"USAR",token:"0xd917B029C761D264c6A312BBbcDA868658eF86a6",pools:[{v:3,fee:3e3,pool:"0x04391780F519B7d3ba59c9590459D76e23d225C4"}]},{symbol:"USO",token:"0xa30FA36Db767ad9eD3f7a60fC79526fB4d56D344",pools:[{v:4,fee:1200,tickSpacing:15,id:"0x1f2ad5a274a776d8e1408292bde1d92d8fa7b6444acf14ad60b9c3e4e5b66420"},{v:3,fee:3e3,pool:"0x02175608F1b5E6b5ed221cCFdC7Be197D111D915"}]}],notOffered:{CLSK:"thin",EWY:"thin",IONQ:"thin",RGTI:"thin",RKLB:"thin"},sourceCommit:"02230282d8888e00794207ed271ee01b4ce30309"};var u=10n**18n,G=1n<<192n,V=H(["function slot0() view returns (uint160,int24,uint16,uint16,uint16,uint8,bool)","function liquidity() view returns (uint128)","function getSlot0(bytes32) view returns (uint160,int24,uint24,uint24)","function getLiquidity(bytes32) view returns (uint128)"]),ee=H(["function getLaunchedToken(address) view returns ((address token,address curve,address deployer,address creatorFeeRecipient,address pairToken,uint256 graduationThreshold,uint24 poolFee,int24 tickSpacing,uint16 creatorTaxBps,bool buybackEnabled,uint8 phase,uint256 sweptQuote,uint256 sweptTokens,uint256 sweptAt,bool exists))"]),c=d=>({usdEstimate:null,estimateLabel:"price unavailable",estimateReason:d}),p=d=>`${d.chainId}:${d.address.toLowerCase()}`;async function se(d,h,A={}){let E=Number.isFinite(A.budgetMs)?Math.min(3e3,Math.max(0,A.budgetMs)):3e3,C=`Oak stopped pricing after ${E===3e3?"3 seconds":`${E} milliseconds`}`,g=new Map,k=[...new Map(h.map(e=>[p(e.token),e.token])).values()],r=!1,x=0,D=[];async function v(e){if(r)throw new Error(C);if(x>=6?await new Promise(t=>D.push(t)):x++,r)throw new Error(C);try{return await e()}finally{let t=D.shift();t?t():x--}}let y=new Map,S=new Map,w=new Map,T;function m(e){let t=y.get(e);if(!t){let a=d.clientFor(e);t=new Proxy(a,{get(n,o,f){let s=Reflect.get(n,o,f);return o==="readContract"?(...i)=>v(async()=>Reflect.apply(s,n,i)):s}}),y.set(e,t)}return t}function P(e){let t=S.get(e);return t||(t=v(()=>m(e).getBlockNumber({cacheTime:0})),S.set(e,t)),t}function O(e,t){return T??=$(e,void 0,t).then(a=>{let n=BigInt(a);if(n<=0n)throw new Error("ETH average unavailable");return n}),T}function Q(e,t){let a=`${e}:${t}`,n=w.get(a);return n||(n=v(()=>m(e).getBlock({blockNumber:t})).then(o=>{if(!(o.number!==t||typeof o.timestamp!="bigint"||o.timestamp<=0n))return o.timestamp.toString()}).catch(()=>{}),w.set(a,n)),n}async function W(e,t){let a=m(e.chainId),n=await P(e.chainId),o;for(let s of t.pools)try{let i=s.v===3,b=z(i?s.pool:l.v4.stateView),J=await a.readContract({address:b,abi:V,functionName:i?"slot0":"getSlot0",args:i?[]:[s.id],blockNumber:n}),F=await a.readContract({address:b,abi:V,functionName:i?"liquidity":"getLiquidity",args:i?[]:[s.id],blockNumber:n}),U=J[0];U>0n&&F>0n&&(!o||F>o.liquidity)&&(o={liquidity:F,sqrt:U})}catch{}if(!o)return c("Oak has no pinned pool with in-range liquidity for this token");let f=BigInt(e.address)<BigInt(l.usdg);return{numerator:f?o.sqrt**2n:G,denominator:(f?G:o.sqrt**2n)*10n**6n,source:`current price in the Uniswap USDG/${t.symbol} pool; on-chain trading can differ from the stock market`,block:n}}async function _(e){if(N(e))return{numerator:1n,denominator:10n**6n,source:"USDG counted at $1.00"};if(e.chainId!==B)return c("Oak has no source for this token");if(A.chopShareTokens?.some(i=>i.toLowerCase()===e.address.toLowerCase()))return c("chop_logs shows this log's backing");let t=e.symbol;if(t.startsWith("untrusted "))try{let i=JSON.parse(t.slice(10));typeof i=="string"&&(t=i)}catch{}if(t==="CHOP")return c("Oak has no pinned market for CHOP. A quote is a sale for this amount only; Oak never uses it to value a balance.");let a=l.tokens.find(i=>i.token.toLowerCase()===e.address.toLowerCase());if(a)return W(e,a);if(Object.hasOwn(l.notOffered,t))return c("Oak has no pinned market for this token");let n=m(e.chainId),o=await P(e.chainId);if(q(e))return{numerator:await O(n,o),denominator:u*u,source:"30-minute average of the Uniswap ETH/USDG pool",block:o};let f=(d.oakTokenAddress??process.env.OAK_TOKEN_ADDRESS)?.toLowerCase()===e.address.toLowerCase();if(f)try{let i=d.resolvePrice?await d.resolvePrice(e,o):await K(e,{client:n,blockNumber:o,oakTokenAddress:e.address,officialStockTokens:[]}),b=BigInt(i.usdE18);if(b<=0n)throw new Error("OAK price unavailable");return{numerator:b,denominator:u*10n**BigInt(e.decimals),source:"OAK price",block:o}}catch{}if(f&&(await n.readContract({address:I[B].pons.factory.address,abi:ee,functionName:"getLaunchedToken",args:[e.address],blockNumber:o})).phase!==2)return c("Oak has no graduated Pons pool price for OAK");let s=await M(e,n,o);return s.numerator<=0n||s.denominator<=0n?c("Oak has no source for this token"):{numerator:await O(n,o)*s.numerator,denominator:u*s.denominator*10n**BigInt(e.decimals),source:f?"OAK's current Pons pool price; fewer than enough trades in 30 minutes for a price":"current Pons pool price",block:o}}let L=0;async function j(){for(;!r&&L<k.length;){let e=k[L++],t;try{if(!Number.isInteger(e.decimals)||e.decimals<0||e.decimals>255)throw new Error("Invalid decimals");if(t=await _(e),r||g.set(p(e),t),"numerator"in t&&t.block!==void 0){let a=await Q(e.chainId,t.block);r||(t.observedAt=a)}}catch{t=c("Oak has no source for this token")}r||g.set(p(e),t)}}let R,Y=new Promise(e=>{R=setTimeout(()=>{r=!0;for(let t of D.splice(0))t();e()},E)});try{await Promise.race([Promise.all(Array.from({length:Math.min(6,k.length)},j)),Y])}finally{clearTimeout(R),r=!0}return h.map(e=>{let t;try{if(!/^\d+$/.test(e.amount)||!Number.isInteger(e.token.decimals)||e.token.decimals<0||e.token.decimals>255)throw new Error("Invalid amount");t="humanAmount"in e&&typeof e.humanAmount=="string"?e.humanAmount:Z(BigInt(e.amount),e.token.decimals);let a=g.get(p(e.token));if(a&&"numerator"in a){let o=(BigInt(e.amount)*a.numerator*100n*2n+a.denominator)/(a.denominator*2n);return{...e,humanAmount:t,usdEstimate:`${o/100n}.${(o%100n).toString().padStart(2,"0")}`,estimateLabel:"estimate, not a quote",estimateSource:a.source,unitUsdE18:(a.numerator*10n**BigInt(e.token.decimals)*u/a.denominator).toString(),...a.observedAt===void 0?{}:{observedAt:a.observedAt},...a.block===void 0?{}:{estimateAsOf:a.block.toString()}}}return{...e,humanAmount:t,...a??c(C)}}catch{return{...e,...t===void 0?{}:{humanAmount:t},...c("Oak cannot format this token amount")}}})}export{se as a};
@@ -1 +0,0 @@
1
- import{a as xe}from"./XRDXFHIK.js";import{c as Se}from"./3K2N5VFH.js";import{a as $e,b as me,c as De}from"./4OVIMYNH.js";import{h as Re,i as t,j as R,k as d,l as Ae,m as W,n as k,o as ue,p as F,r as _,s as c,t as ce,u as le,v as pe,w as Ce,x as qe}from"./QJNLLI6N.js";import{a as ve,o as de}from"./CAWTAR5V.js";import{a as ke}from"./66F5ZH34.js";import{c as re,e as Q,g as M}from"./NWNYJ26T.js";import{a as l,i as be}from"./FWD4L3CJ.js";import{a as h}from"./XSD5NL7J.js";import{decodeFunctionData as Ue,erc20Abi as Me}from"viem";var z="0x0000000000000000000000000000000000000000",H=be[l].relay.depository.address.toLowerCase(),Te=30,ze=w=>{let L=qe(w);async function he(n){let e;try{e=await L(`/intents/status/v3?requestId=${encodeURIComponent(n)}`)}catch(C){if(w.plainError(C)!=="The request timed out. Please try again.")throw C;return{requestId:n,status:"unknown",timedOut:!0,fulfilled:!1,settled:!1,pollAgain:!0,needsAttention:!1,inTxHashes:[],txHashes:[],originChainId:void 0,destinationChainId:void 0,summary:"The status request timed out. Bridge settlement is unknown; poll again."}}if(typeof e.status!="string")throw new h("Relay returned an invalid bridge status.");let i=ce(e.inTxHashes),m=ce(e.txHashes),u=e.originChainId===void 0?void 0:W(e.originChainId),s=e.destinationChainId===void 0?void 0:W(e.destinationChainId),a=le(e.failReason),p=le(e.refundFailReason),r=e.status==="success"&&m.length>0&&s!==void 0,q=e.status==="refund"&&m.length>0&&u!==void 0,g=e.status==="failure"&&p!==void 0,A=["waiting","depositing","pending","submitted","failure","refund","success"].includes(e.status)?e.status==="failure"&&/TIMEOUT|EXPIRED/.test(typeof e.failReason=="string"?e.failReason:"")?"timeout":e.status:"unknown",v=r?"Relay reports destination fulfillment.":q?"Relay reports a refund on the origin chain; the destination was not fulfilled.":g?"The bridge failed and automatic refund is unavailable. Review the request with Relay.":"Bridge settlement is not confirmed. Poll Relay again; an origin receipt alone does not prove destination fulfillment.";return{requestId:n,status:A,relayStatus:e.status,fulfilled:r,settled:r||q,pollAgain:!r&&!q&&!g,needsAttention:g,timedOut:!1,inTxHashes:i,txHashes:m,originChainId:u,destinationChainId:s,failReason:a,refundFailReason:p,...e.updatedAt===void 0?{}:{updatedAt:k(String(e.updatedAt))},summary:v}}async function Ee(n,e){let i=a=>({destinationVerified:!1,destinationCheck:a}),m;try{if(m=w.clientFor(n),await m.getChainId()!==n)return i(`The configured RPC does not serve chain ${n}; destination receipts were not checked.`)}catch{return i(`No RPC is available for chain ${n}; destination receipts were not checked.`)}let u=[];for(let a of e)try{let p=await m.getTransactionReceipt({hash:a});u.push({hash:a,status:p.status,blockNumber:p.blockNumber.toString()})}catch{return{...i(`Receipt ${a} is not available on chain ${n} yet; poll again.`),destinationReceipts:u}}let s=u.length>0&&u.every(a=>a.status==="success");return{destinationVerified:s,destinationReceipts:u,destinationCheck:s?`Every Relay destination transaction has a successful receipt on chain ${n}. Amounts are not decoded here; compare the recipient balance for the exact delivered amount.`:`A Relay destination transaction did not succeed on chain ${n}; do not treat this bridge as delivered.`}}async function Pe(n){let e=await w.clientFor(l).readContract({address:n,abi:Me,functionName:"decimals"}),i=typeof e=="bigint"?Number(e):e;if(typeof i!="number"||!Number.isInteger(i)||i<0||i>255)throw new h("Could not read valid ERC-20 decimals() on-chain.");return i}async function Oe(n,e){let i=d(e),m=d(n.recipient??i),u=W(n.destinationChainId);if(u===l)throw new h("Choose a destination chain other than 4663.");let s=Ae(n.originCurrency??z),a=s!==z,p=d(n.destinationCurrency??z),r=k(n.amount);if(r==="0")throw new h("Provide a positive bridge amount.");let q=n.minAmountOut===void 0?void 0:k(n.minAmountOut),g=n.slippageBps??me;if(typeof g!="number")throw new h("Slippage must be an integer from 0 to 9999 bps.");de("0",g);let I=R((await L("/chains")).chains).map(t),A=I.find(o=>o.id===l),v=I.find(o=>o.id===u);if(!A||!v||A.disabled!==!1||v.disabled!==!1||A.depositEnabled!==!0||A.vmType!=="evm"||v.vmType!=="evm")throw new h("Relay does not currently support this outbound chain route.");if(!Se(u))throw new h(`Relay has no supported Oak return path from chain ${u}. Choose a destination supported by relay_bridge_in before bridge-out.`);let C=await $e(w.clientFor,u,i,"server"),b=a?await Pe(s):18,P=Math.floor(Date.now()/1e3)+ve,$=await L("/quote/v2",{user:i,recipient:m,originChainId:l,destinationChainId:u,originCurrency:s,destinationCurrency:p,amount:r,tradeType:"EXACT_INPUT",...a?{explicitDeposit:!0}:{}}),x=F($.requestId),T=t($.details),N=_(T.currencyIn),f=_(T.currencyOut),D={token:f.token,amount:k(t(T.currencyOut).minimumAmount)};if(c(d(T.sender)===i&&d(T.recipient)===m&&N.token.chainId===l&&N.token.address===s&&N.token.decimals===b&&N.amount===r&&f.token.chainId===u&&f.token.address===p&&BigInt(D.amount)>0n&&BigInt(D.amount)<=BigInt(f.amount)),p===z&&c(f.token.decimals===t(v.currency).decimals),q!==void 0){if(D.amount!==q)throw new h("Relay order minimum must exactly match minAmountOut. Request a new quote.")}else if(BigInt(D.amount)<BigInt(de(f.amount,g)))throw De(f.amount,D.amount);let J=t(t($.protocol).v2),G=F(J.orderId),Z=t(J.orderData),j=t(Z.output),ee=ue(j.deadline),Y=R(Z.inputs).map(t);c(Y.length>0);let te=Y.flatMap(o=>{let y=R(o.refunds).map(t);return c(y.length>0),y.map(we=>{if(d(we.recipient)!==i)throw new h("Relay refund recipient does not match the agent wallet. Request a new quote.");return ue(we.deadline)})}),_e=te.reduce((o,y)=>Math.min(o,y),ee),ne=Math.min(P,_e-Te),fe=()=>{if(Date.now()/1e3>=ne)throw new h("The Relay quote expired or its order/refund deadline leaves too little time to sign and send. Request a fresh bridge quote.")};fe();let B=R(j.payments).map(t),ie=t(t(A.protocol).v2),He=t(t(v.protocol).v2),K=t(J.paymentDetails);c(j.chainId===He.chainId&&B.length===1&&R(j.calls).length===0&&d(B[0].recipient)===m&&d(B[0].currency)===p&&k(B[0].minimumAmount)===D.amount&&k(B[0].expectedAmount)===f.amount&&K.chainId===ie.chainId&&d(K.currency)===s&&k(K.amount)===r),c(d(K.depository)===H&&d(ie.depository)===H);let oe=t(Y[0].payment);c(Y.length===1&&oe.chainId===ie.chainId&&d(oe.currency)===s&&k(oe.amount)===r);let U=R($.steps).map(t),O=a&&U.length===2?U[0]:void 0;c(U.length===(O?2:1));let V=U[U.length-1];c(V.kind==="transaction"&&V.id==="deposit"&&V.requestId===x);let X=R(V.items).map(t);c(X.length===1&&X[0].status==="incomplete");let S=t(X[0].data),ye=t(X[0].check);if(c(ye.method==="GET"&&ye.endpoint===`/intents/status/v3?requestId=${x}`&&S.chainId===l&&d(S.from)===i&&d(S.to)===H&&k(S.value)===(a?"0":r)),typeof S.data!="string"||!(a?/^0x[0-9a-fA-F]{264}$/:/^0x[0-9a-fA-F]{136}$/).test(S.data))throw new h(`Relay returned unexpected ${a?"ERC-20":"native"} deposit calldata.`);let E=Ue({abi:Re,data:S.data});E.functionName==="depositErc20"?c(a&&d(E.args[0])===i&&d(E.args[1])===s&&E.args[2]===BigInt(r)&&M(E.args[3],G)):c(!a&&d(E.args[0])===i&&M(E.args[1],G));let Ne=I.filter(o=>o.vmType==="evm"&&Q(o.protocol)&&Q(o.protocol.v2)).map(o=>t(t(o.protocol).v2).chainId).filter(o=>typeof o=="string");if(!M(xe(Z,Ne),G))throw new h("Relay order ID does not match the checked quote terms. Request a new quote.");let se=a?w.approval(s,H,r,l):void 0;if(O&&se){c(O.kind==="transaction"&&O.id==="approve"&&O.requestId===x);let o=R(O.items).map(t);c(o.length===1&&o[0].status==="incomplete");let y=t(o[0].data);c(y.chainId===l&&d(y.from)===i&&d(y.to)===s&&k(y.value)==="0"&&typeof y.data=="string"&&M(y.data,se.data))}let ge=[...se?await Ce(w,s,H,r,l,i):[],w.unsignedTx({to:H,data:S.data,value:a?"0":r,chainId:l,description:a?`Deposit ${r} base units of ${s} for Relay request ${x}.`:`Deposit native ETH for Relay request ${x}.`})],Ie=t($.fees);for(let o of Object.values(Ie))_(o);let ae=await w.preview(ge,i);fe();let Be=ae.changes.map(o=>{let y=o.amount.startsWith("-");return`${y?"-":""}${w.formatAmount(y?o.amount.slice(1):o.amount,o.token.decimals)} ${o.token.symbol}`}).join(", ");return{txs:ge,requestId:x,orderId:G,recipient:m,originChainId:l,destinationChainId:u,expiresAt:String(ne),orderDeadline:String(ee),refundDeadlines:te.map(String),returnPath:C,amountIn:N,amountOut:f,minAmountOut:D,fees:Ie,expandedPriceImpact:T.expandedPriceImpact,timeEstimate:T.timeEstimate,preview:ae,summary:`${C} Bridge to ${m} on chain ${u}; asset ${f.token.address} on chain ${f.token.chainId} (${pe(f.token.symbol)}); expected ${f.amount}, minimum ${D.amount} base units (${f.token.decimals} decimals). Order deadline ${ee} Unix seconds; refund deadlines ${te.join(", ")} Unix seconds; accept before ${ne} Unix seconds to reserve ${Te}s to sign and send. Origin preview: ${Be||ae.summary}. Relay route fees are included in the quote; origin gas is separate. Poll relay_status with requestId ${x} after local submission; destination fulfillment is not yet confirmed.`}}return{tools:[{name:"relay_bridge_out",inputSchema:{type:"object",required:["destinationChainId","amount"],additionalProperties:!1,properties:{destinationChainId:{type:"integer",minimum:1,description:"Destination chain ID."},amount:{type:"string",pattern:"^[1-9][0-9]*$",description:'Origin token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).'},recipient:{...re,description:"Destination recipient address; defaults to your wallet."},originCurrency:{...re,description:"Origin token address; defaults to native ETH."},slippageBps:{type:"integer",minimum:0,maximum:9999,default:me,description:"Slippage in basis points (50 = 0.5%)."},destinationCurrency:{type:"string",description:"Destination token address; defaults to the destination chain\u2019s native token."},minAmountOut:ke('Minimum destination token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).')}},execute:async(n,e)=>{try{return await Oe(n,e)}catch(i){throw new h(w.plainError(i))}}},{name:"relay_status",inputSchema:{type:"object",required:["requestId"],additionalProperties:!1,properties:{requestId:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"Relay request ID as a 0x-prefixed 32-byte hex string."},verifyDestination:{type:"boolean",description:"Check destination transactions on their chain when fulfilled."}}},execute:async n=>{let e=await he(F(n.requestId));return n.verifyDestination!==!0||!e.fulfilled||e.destinationChainId===void 0?e:{...e,...await Ee(e.destinationChainId,e.txHashes)}}}],positions:async n=>{let e=d(n);if(!process.env.OAK_RELAY_API_KEY?.trim())return[{module:"relay",id:"relay-discovery-unavailable",chainId:l,assets:[],incomplete:!0,description:'Relay pending bridge discovery requires OAK_RELAY_API_KEY on the server. The request-history API requires this key; no pending bridges were checked. Ask the operator to configure it, or check a known request with relay_status {"requestId":"<id>"}. Legacy vault shares on other chains can be checked with relay_vault_status {"chainId":1} or {"chainId":42161}.'}];let i=new Map;for(let m of["outbound","inbound"]){let u=new Set,s;do{let a=new URLSearchParams({user:e,[m==="outbound"?"originChainId":"destinationChainId"]:String(l),limit:"100",includePendingRequests:"true"});s&&a.set("continuation",s);let p=await L(`/requests/v3?${a}`);for(let r of R(p.requests).map(t)){let q=Q(r.depositAddress)?r.depositAddress.depositor:void 0;if(![r.user,r.sender,q].some($=>typeof $=="string"&&$.toLowerCase()===e))throw new h("Relay returned a request for another wallet.");let g=F(r.id);if(i.has(g))continue;let I=await he(g);if(I.settled)continue;let A=t(r.data),v=t(t(A.route).quoted),C=_(t(v.origin).inputCurrency),b={...C,token:{...C.token,symbol:pe(C.token.symbol)??"unknown"}},P=_(t(v.destination).outputCurrency);c(m==="outbound"?b.token.chainId===l&&P.token.chainId!==l:b.token.chainId!==l&&P.token.chainId===l),I.originChainId!==void 0&&c(I.originChainId===b.token.chainId),I.destinationChainId!==void 0&&c(I.destinationChainId===P.token.chainId),i.set(g,{module:"relay",id:g,chainId:b.token.chainId,assets:[b],description:`Relay ${m} ${I.status}: ${b.amount} ${b.token.symbol} base units (${b.token.decimals} decimals) from chain ${b.token.chainId} toward ${d(r.recipient)} on chain ${P.token.chainId}. ${I.summary} Track with relay_status requestId ${g}.`})}if(p.continuation!==void 0&&p.continuation!==null&&typeof p.continuation!="string")throw new h("Relay returned invalid pagination.");if(s=typeof p.continuation=="string"&&p.continuation?p.continuation:void 0,s){if(u.has(s))throw new h("Relay repeated its pagination cursor. Pending positions are incomplete.");u.add(s)}}while(s)}return[...i.values()]}}};export{ze as a};
@@ -1,3 +0,0 @@
1
- import{a as v}from"./VHV6WQ5F.js";import{ba as R,ca as M,fa as S}from"./EI6GGPDS.js";import{g as A,i as k,m as _,n as P}from"./NWNYJ26T.js";import{a as p}from"./FWD4L3CJ.js";import{a as n}from"./XSD5NL7J.js";import{encodeFunctionData as C}from"viem";var F={asset:{type:"string",pattern:"^[A-Za-z0-9.$_-]{1,32}$",description:"Official asset symbol; use vault if discovery is unavailable or ambiguous."},vault:{type:"string",pattern:"^0x[0-9a-fA-F]{40}$",description:"Vault address verified on chain on every call; required for a rebuild without HTTP."}};function U(c){return{type:"object",additionalProperties:!1,properties:{...F,amount:{type:"string",pattern:c==="withdraw"?"^(?:[0-9]+|max)$":"^[0-9]+$",description:'Selected vault asset amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG); withdraw also accepts max to redeem all shares.'}},required:["amount"],anyOf:[{required:["asset"]},{required:["vault"]}]}}function O(c){return P(c,"Borro amount must be positive and fit uint256.",{positive:!0,notString:"Borro amount must be an integer string in asset base units."})}function g(c){return _(c,"Borro returned an invalid uint256 read.")}var W=c=>c*9950n/10000n;function z(c,l,h,d,N){let x=0n,m=0n;for(let b of c.changes){let y=b.token;if(typeof b.amount!="string"||!/^-?\d+$/.test(b.amount))throw new n("Borro preview returned invalid token changes. Nothing was signed.");let e=BigInt(b.amount);g(e<0n?-e:e);let o=A(y.address,l.address)?l:A(y.address,d.address)?d:void 0;if(!o||y.chainId!==p||y.decimals!==o.decimals)throw new n("Borro preview showed an unexpected token movement. Nothing was signed.");if(o===l){if(e>0n)throw new n("Borro preview showed a reversed input movement. Nothing was signed.");x-=e}else{if(e<0n)throw new n("Borro preview showed a reversed output movement. Nothing was signed.");m+=e}}if(g(x),g(m),x!==h||m<N||m===0n)throw new n("Borro preview did not match the requested receipt. Nothing was signed.")}var K=c=>{let{client:l,context:h,wallet:d}=c;async function N(e,o,a){if(k(a,"Provide a valid wallet address."),!A(a,d))throw new n("Borro action wallet differs from the signing wallet. Nothing was signed.");if(h.network==="testnet"||await l.getChainId()!==p)throw new n("Borro requires chain 4663. Nothing was signed.");if(Object.keys(e).some(i=>!["asset","vault","amount"].includes(i)))throw new n("Unsupported Borro argument.");if(e.asset!==void 0&&(typeof e.asset!="string"||!/^[A-Za-z0-9.$_-]{1,32}$/.test(e.asset)||/^0x/i.test(e.asset)))throw new n("Provide an asset symbol, or put the vault address in vault.");let w=e.vault===void 0?void 0:k(e.vault,"Provide a valid Borro vault address.");if(!w&&e.asset===void 0)throw new n("Provide an asset symbol or a vault address.");let t=w?await c.verifyVault(l,w,o,{wallet:d}):await c.resolveVault(l,{asset:e.asset},o,d);if(w&&!A(w,t.vault)||e.asset!==void 0&&e.asset.toUpperCase()!==t.symbol.toUpperCase())throw new n("Borro vault and asset selectors do not match. Nothing was signed.");if(k(t.vault,"Borro returned an invalid vault address."),k(t.asset,"Borro returned an invalid asset address."),t.chainId!==p||t.shareDecimals!==18||A(t.asset,t.vault)||!Number.isInteger(t.assetDecimals)||t.assetDecimals<0||t.assetDecimals>255||t.mode!==o)throw new n(S("setup-mismatch",{}));let s=await c.verifySetup(l,t,o);if(!s.ok||o==="deposit"&&(!t.assetAllowed||s.drift.length>0))throw new n(S("setup-mismatch",{}));return{...t,setup:s}}function x(e){let o=e.mode==="withdraw"&&!/^[A-Za-z0-9.$_-]{1,16}$/.test(e.symbol)?"token":e.symbol;return{asset:{address:k(e.asset,"Borro returned an invalid asset."),symbol:o,decimals:e.assetDecimals,chainId:p},share:{address:k(e.vault,"Borro returned an invalid vault."),symbol:e.vaultSymbol,decimals:18,chainId:p}}}let m=(e,o)=>h.formatAmount(e.toString(),o),b="The minimum is checked in the preview; standard ERC-4626 calldata does not enforce it on chain. Re-preview before signing; execution output can change.",y=[{name:"borro_deposit",inputSchema:U("deposit"),execute:async(e,o)=>{let a=O(e.amount),w=await N(e,"deposit",o),{asset:t,share:s}=x(w),i=g(await l.readContract({address:t.address,abi:v,functionName:"balanceOf",args:[d]}));if(a>i)throw new n("This wallet does not hold enough of that asset for the Borro deposit.");let f=g(await l.readContract({address:s.address,abi:v,functionName:"previewDeposit",args:[a]}));if(f===0n)throw new n(S("deposit-would-revert",{}));let r=W(f),u=[h.approval(t.address,s.address,a.toString(),p),h.unsignedTx({to:s.address,data:C({abi:v,functionName:"deposit",args:[a,d]}),value:"0",chainId:p,description:`Deposit ${a} asset base units into Borro vault ${s.address}.`})],$;try{$=await h.preview(u,d),z($,t,a,s,r)}catch{throw new n(S("deposit-would-revert",{}))}let T=w.deployedAt===void 0?void 0:Date.parse(w.deployedAt)/1e3,B=R({amount:m(a,t.decimals),symbol:t.symbol,kind:t.symbol==="USDG"?"usdg":"stock",shares:m(f,18),sharesMin:m(r,18),vaultSymbol:s.symbol,deployedAtSeconds:T,nowSeconds:Math.floor(Date.now()/1e3)});return{txs:u,preview:$,vault:s.address,asset:t,shareToken:s,amount:a.toString(),shares:f.toString(),shares_min:r.toString(),summary:`${B}
2
- Base units: amount ${a} (${t.address}, decimals ${t.decimals}); shares ${f} (${s.address}, decimals 18); shares_min ${r}. ${b}`}}},{name:"borro_withdraw",inputSchema:U("withdraw"),execute:async(e,o)=>{let a=e.amount==="max",w=a?void 0:O(e.amount),t=await N(e,"withdraw",o),{asset:s,share:i}=x(t),f=g(await l.readContract({address:i.address,abi:v,functionName:"balanceOf",args:[d]}));if(f===0n)throw new n(S("no-shares",{symbol:s.symbol}));let r=a?f:g(await l.readContract({address:i.address,abi:v,functionName:"previewWithdraw",args:[w]}));if(r===0n||r>f)throw new n("This wallet does not hold enough Borro shares for that withdrawal.");let u=w??g(await l.readContract({address:i.address,abi:v,functionName:"previewRedeem",args:[r]}));if(u===0n)throw new n("Borro preview returned no assets for these shares. Nothing was signed.");let $=await c.readLiquidity(l,t).catch(()=>({kind:"unknown"})),T=$.kind!=="unknown"&&"readyBase"in $?$.readyBase:void 0,B=typeof T=="bigint"&&T>=0n&&T<1n<<256n?T:void 0;if(B!==void 0&&B<u)return{txs:[],vault:i.address,asset:s,shareToken:i,amount:u.toString(),shares:r.toString(),max_now:B.toString(),summary:S("too-little-ready",{ready:m(B,s.decimals),requested:m(u,s.decimals),maxNow:m(B,s.decimals),symbol:s.symbol})};let I=a?W(u):u,V=[h.unsignedTx({to:i.address,data:a?C({abi:v,functionName:"redeem",args:[r,d,d]}):C({abi:v,functionName:"withdraw",args:[u,d,d]}),value:"0",chainId:p,description:`Withdraw ${u} asset base units from Borro vault ${i.address}${a?` for ${r} share base units`:""}.`})],D=a?await h.preview(V,d):await h.preview(V,d,{reads:[{to:i.address,data:C({abi:v,functionName:"previewWithdraw",args:[u]}),chainId:p}]});if(!a){let q=D.readResults?.[0];if(D.readResults?.length!==1||typeof q!="string"||!/^0x[0-9a-fA-F]{64}$/.test(q))throw new n("Borro preview returned an invalid share quote. Nothing was signed.");if(r=g(BigInt(q)),r===0n||r>f)throw new n("This wallet does not hold enough Borro shares for that withdrawal.")}z(D,i,r,s,I);let E=M({amount:m(u,s.decimals),isAll:a,symbol:s.symbol,out:m(u,s.decimals),shares:m(r,18),vaultSymbol:i.symbol,drift:t.setup.drift.length>0});return{txs:V,preview:D,vault:i.address,asset:s,shareToken:i,amount:u.toString(),shares:r.toString(),assets_min:I.toString(),isMax:a,setup:t.setup,summary:`${E}
3
- Base units: amount ${u} (${s.address}, decimals ${s.decimals}); shares ${r} (${i.address}, decimals 18); assets_min ${I}. ${b}`}}}];for(let e of y){let o=e.execute;e.execute=async(a,w)=>{try{return await o(a,w)}catch(t){throw new n(h.plainError(t))}}}return y};export{K as a};
@@ -1 +0,0 @@
1
- import{a as g,b as p}from"./GQYV4TFO.js";import{a as y,b as D,c as m,d as T,e as I}from"./2OKYXT25.js";import{c as O,d as A,f as P,g as R}from"./OUROA7XR.js";import{b as k,c as x}from"./43LI5NKJ.js";import{a as b}from"./FWD4L3CJ.js";import{a as f}from"./XSD5NL7J.js";import{encodeFunctionData as C,zeroAddress as N}from"viem";function v(t=10){if(!Number.isInteger(t)||t<0||t>50)throw new f("Oak won't accept a cash-out reduction that big. Use a whole number from 0 to 50 bps (0.5%).");return t}async function z(t,e,a,u=10,r){let l=v(u);p(a,!0),m(e.tokensOut.some(n=>T(n,e.inputToken)),"the market input token cannot be redeemed from SY");try{let n=await t.client.getBlock();m(e.expired&&n.timestamp>=BigInt(e.expiry),"this term has not ended; wait for its end date");let h=p((await t.client.simulateContract({address:e.yt,abi:g,functionName:"pyIndexCurrent",blockNumber:n.number})).result,!0);for(let o of[e.syDecimals,e.ptDecimals])m(Number.isInteger(o)&&o>=0&&o<=77,"unreadable token decimals");let d=a*10n**18n*10n**BigInt(e.syDecimals)/(h*10n**BigInt(e.ptDecimals));p(d,!0);let i=p(await t.client.readContract({address:e.sy,abi:g,functionName:"previewRedeem",args:[e.inputToken,d],blockNumber:n.number}),!0),s=I(i,l);if(m(s>0n,"this cash-out amount is too small"),r&&(r.apiAmountOut>i?r.apiAmountOut-i:i-r.apiAmountOut)*10000n>i*50n)try{r.note("Pendle\u2019s API cash-out estimate differs from the chain by over 0.5%. Oak kept the chain estimate.")}catch{}let c={tokenOut:e.inputToken,minTokenOut:s,tokenRedeemSy:e.inputToken,pendleSwap:N,swapData:{swapType:0,extRouter:N,extCalldata:"0x",needScale:!1}},w=k({to:y,data:C({abi:D,functionName:"redeemPyToToken",args:[t.wallet,e.yt,a,c]}),value:"0",chainId:b,description:"Cash out ended Pendle PT to its input token."});return{txs:[x(e.pt,y,a.toString(),b),w],expected:i,minOut:s,summary:"Approve the exact PT amount, then cash out the ended term to its input token."}}catch(n){throw n instanceof f?n:new f("Oak could not read the Pendle cash-out amount from the chain. Try again.")}}async function F(t,e,a,u,r){let l=new AbortController,n;try{let h=new Promise(o=>{n=setTimeout(()=>{l.abort(),o(void 0)},1500)}),d=await Promise.race([R((o,B)=>t.http(o,{...B,signal:l.signal}),{inputToken:e.pt,outputToken:e.inputToken,amount:a,wallet:t.wallet,slippageBps:r}),h]);if(!d)return;let i=P(d.body).outputs;if(i.length!==1)return;let s=O(i[0]);if(!T(s.token,e.inputToken))return;let c=A(s.amount);return(c>u?c-u:u-c)*10000n>u*50n?"Pendle\u2019s API cash-out estimate differs from the chain by over 0.5%. Oak kept the chain estimate.":void 0}catch{return}finally{n!==void 0&&clearTimeout(n)}}export{v as a,z as b,F as c};
@@ -1 +0,0 @@
1
- import{a as x,c as I}from"./SCG5HWMN.js";import{d as k,e as g,f as b,j as R}from"./NWNYJ26T.js";import{a}from"./XSD5NL7J.js";import{a as w}from"./JXOEJPJ4.js";import{erc20Abi as _,parseAbi as P}from"viem";var q="https://api.relay.link",C="0x0000000000000000000000000000000000000000",d=Object.freeze({recipient:"0x856bb126188bDB5e425D3ac9D59E9ffBD12e6ECf",bps:25});function D(e){return{...s(e),includeProtocolData:!0,appFees:[{recipient:d.recipient,fee:String(d.bps)}]}}function l(){throw new a("Relay did not confirm the Oak fee of 0.25% to the treasury with matching amount and recipient. Request a fresh quote.")}function T(e){try{let n=s(e),r=y(s(n.details).currencyIn),t=s(s(n.fees).app),o=y(t),u=(BigInt(r.amount)*BigInt(d.bps)/10000n).toString();if((o.amount!==u||A(t.minimumAmount)!==u||o.token.address!==r.token.address||o.token.chainId!==r.token.chainId||o.token.decimals!==r.token.decimals||typeof t.amountUsd!="string"||!/^(0|[1-9]\d*)(?:\.\d+)?$/.test(t.amountUsd)||t.amountUsd.length>100)&&l(),(t.recipient!==void 0&&m(t.recipient)!==d.recipient.toLowerCase()||t.fee!==void 0&&t.fee!==String(d.bps))&&l(),n.appFees!==void 0){let i=h(n.appFees);(i.length!==1||m(s(i[0]).recipient)!==d.recipient.toLowerCase()||s(i[0]).fee!==String(d.bps))&&l()}let p=s(s(n.protocol).v2),c=h(s(p.orderData).fees);if(c.length>1&&l(),c.length===1){let i=s(c[0]),f=s(p.paymentDetails).chainId;(typeof f!="string"||i.currencyChainId!==f||typeof i.recipientChainId!="string"||m(i.recipient)!==d.recipient.toLowerCase()||m(i.currency)!==r.token.address||A(i.amount)!==u)&&l()}return{...o,recipient:d.recipient,bps:d.bps,amountUsd:t.amountUsd}}catch{return l()}}function $(e){return`Oak fee ${d.bps/100}% (\u2248 $${e.amountUsd})`}function V(e){let n=s(e),r=s(n.app),t={...y(r),recipient:d.recipient,bps:d.bps,amountUsd:String(r.amountUsd)};(!/^(0|[1-9]\d*)(?:\.\d+)?$/.test(t.amountUsd)||t.amountUsd.length>100)&&l();let o=y(n.relayer);return{oakFee:t,feeDisclosure:`Relay fee ${o.amount} base units of ${O(o.token.symbol)}; ${$(t)}. Output is already net of quoted fees; origin gas is separate.`}}var M=P(["function depositNative(address depositor, bytes32 id) payable","function depositErc20(address depositor, address token, uint256 amount, bytes32 id)"]),E=(1n<<256n)-1n;function s(e){return b(e,"Relay returned an unexpected response.")}function h(e){if(!Array.isArray(e))throw new a("Relay returned an unexpected list.");return e}function m(e){return R(e,"Provide a valid wallet or token address.",k)}function z(e){let n=m(e);return n==="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"?C:n}function F(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<=0)throw new a("Provide a positive integer chain ID.");return e}function A(e){if(typeof e!="string"||!/^(0|[1-9]\d*)$/.test(e)||BigInt(e)>E)throw new a("Amounts must be decimal base-unit strings within the uint256 range.");return e}function j(e){if(typeof e!="number"||!Number.isSafeInteger(e)||e<=0)throw new a("Relay returned an invalid order or refund deadline. Request a fresh quote.");return e}function v(e){if(typeof e!="string"||!/^0x[0-9a-fA-F]{64}$/.test(e))throw new a("Provide a valid Relay request or order ID.");return e}function L(e){let n=s(e);if(typeof n.symbol!="string"||!n.symbol.trim()||typeof n.decimals!="number"||!Number.isInteger(n.decimals)||n.decimals<0||n.decimals>255)throw new a("Relay returned invalid token metadata.");return{address:m(n.address),chainId:F(n.chainId),decimals:n.decimals,symbol:n.symbol}}function y(e){let n=s(e);return{token:L(n.currency),amount:A(n.amount)}}function H(e){if(!e)throw new a("Relay quote does not match the requested amount, chain, recipient, minimum or transaction.")}function J(e){return e===void 0?[]:h(e).map(v)}function Q(e){if(!(e==null||e==="N/A")){if(typeof e!="string")throw new a("Relay returned an invalid failure reason.");return w(e)}}function O(e,n="symbol"){if(!(typeof e!="string"||!e.trim()))return(n==="symbol"?/^[A-Za-z0-9._-]{1,32}$/:/^[A-Za-z0-9 ()+-]{1,32}$/).test(e)?e:w(e)}async function Z(e,n,r,t,o,u){let p=await e.clientFor(o).readContract({address:n,abi:_,functionName:"allowance",args:[u,r]});if(typeof p!="bigint"||p<0n||p>E)throw new a("Could not read the Relay token allowance.");return[...p>0n?[e.approval(n,r,"0",o)]:[],e.approval(n,r,t,o)]}function G(e){return async(n,r)=>s(await S(e)(n,r))}function S(e){return async(n,r)=>{let t=process.env.OAK_RELAY_API_KEY?.trim(),o=n.split("?")[0],u=o==="/quote/v2",p=o==="/requests/v3"||/^\/balance\/[^/]+\/events$/.test(o);if(!t&&p)throw new a("Configure OAK_RELAY_API_KEY on the server: Relay request history and balance events require an API key. A missing key does not mean this wallet has no requests or events. Check a saved request with relay_status.");if(!t&&u)throw new a("Configure the Relay API key (OAK_RELAY_API_KEY) on the server: Relay quote/v2 requires a valid API key since October 2, 2026. Status and chain reads remain available without it.");try{let c=await I(e.http,`${q}${n}`,{method:u||r!==void 0?"POST":"GET",headers:{...t?{"x-api-key":t}:{},"Content-Type":"application/json","User-Agent":"oak-relay/1.0"},...r===void 0&&!u?{}:{body:JSON.stringify(u?D(r):r)}},i=>g(i)||Array.isArray(i));return u&&T(c),c}catch(c){let i=c instanceof x?c.response.status:void 0,f=e.plainError(c);throw i===401||i===403||/HTTP (401|403)\b/.test(f)?new a("Relay requires an authorized API key for this endpoint. Ask the operator to configure a valid OAK_RELAY_API_KEY on the server with access to this resource; never pass keys in tool arguments."):o==="/prices/rates"&&(i!==void 0&&i>=500||/HTTP 5\d\d\b/.test(f))?new a("Relay exchange rates are unavailable because the upstream service failed. Retry later; no rates were returned. Use relay_token_price with chainId and address for an individual token."):new a(t?f.replaceAll(t,"[redacted]"):f)}}}export{q as a,C as b,d as c,D as d,T as e,$ as f,V as g,M as h,s as i,h as j,m as k,z as l,F as m,A as n,j as o,v as p,L as q,y as r,H as s,J as t,Q as u,O as v,Z as w,G as x,S as y};
@@ -1 +0,0 @@
1
- var f=.25,g=30,S=30,p=.5,U=1e9;function x(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?{usd:e,estimatedHigh:!1}:{usd:.5,estimatedHigh:!0}}function D(e){let{gross:n,costs:t}=e,r=n-t,s=n<=t||t*4>n,o=s?d(e):void 0;return{tooSmall:s,grossUsd:n,costsUsd:t,netUsd:r,...o===void 0?{}:{suggestUsd:o}}}function d(e){let{gross:n,costs:t,amount:r}=e;if(![n,t,r].every(Number.isFinite)||!(n>0)||!(r>0)||!(t>=0))return;let s=n/r,o=a=>{let m=s*a;return t<=m*(1+1e-9)&&t*4<=m*(1+1e-9)},i=Math.ceil(t*4/s-1e-9);if(!Number.isFinite(i)||i>1e9)return;let u=Math.max(1,i);for(let a=0;a<4&&!o(u);a+=1)u+=1;if(o(u)){for(let a=0;a<4&&u>1&&o(u-1);a+=1)u-=1;return u}}function c(e){return e.amountUsd*e.ratePct/100*(e.days/365)}function A(e){let{amountUsd:n,baseRatePct:t,bonusRatePct:r,days:s}=e,o=Math.min(s,Math.max(0,Number.isFinite(e.bonusDays)?e.bonusDays:0));if(o>=s)return c({amountUsd:n,ratePct:t+r,days:s});let i=c({amountUsd:n,ratePct:t,days:s});return o===0?i:i+c({amountUsd:n,ratePct:r,days:o})}function y(e){let n=e.redeemOutBase-e.amountBase,t=n<0n,r=t?-n:n,s=10n**BigInt(e.decimals),o=Number(r/s)+Number(r%s)/Number(s);return t?-o:o}function h(e){let{planPriceUsd:n,freeUntil:t}=e;return typeof n!="number"||!Number.isFinite(n)||n<=0||!(e.gross30d<n)?"none":typeof t=="number"&&Number.isFinite(t)&&t>e.nowSec&&t>=e.paidUntil?t>=e.horizonEndsAt?"none":"free_until":!(e.paidUntil>e.nowSec)||e.paidUntil<e.horizonEndsAt?"fee":"none"}function _(e,n){return Math.max(0,(n-e)/86400)}function N(e){let n=e<0?"-":"",t=Math.abs(e);if(t===0)return"$0.00";if(t<.001&&(t=.001),t>=.9995)return`${n}$${t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`;let r=t.toFixed(3);return`${n}$${r.endsWith("0")?t.toFixed(2):r}`}function $(e){return e.toFixed(2)}var b=["January","February","March","April","May","June","July","August","September","October","November","December"];function M(e){let n=new Date(e*1e3);return`${b[n.getUTCMonth()]} ${n.getUTCDate()}, ${n.getUTCFullYear()}`}var l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(e){let n=new Date(e*1e3);return`${l[n.getUTCMonth()]} ${n.getUTCDate()}, ${n.getUTCFullYear()}`}function E(e){let n=Math.max(1,Math.round(e));return n===1?"1 day":`${n} days`}function F(e,n,t=4){let r=e<0n,s=r?-e:e,o=10n**BigInt(n),i=s/o,u=(s%o).toString().padStart(n,"0").slice(0,t).replace(/0+$/,"");return`${r?"-":""}${i.toString()}${u?`.${u}`:""}`}export{f as a,g as b,S as c,p as d,U as e,x as f,D as g,d as h,c as i,A as j,y as k,h as l,_ as m,N as n,$ as o,M as p,P as q,E as r,F as s};
@@ -1 +0,0 @@
1
- import{b as Z}from"./SOTYQGPT.js";import{a as I,b as J,d as V}from"./D742AYEV.js";import{a as Q}from"./CEQNXF6A.js";import{a as E}from"./QYKXWBZC.js";import{K as y}from"./7QKYDNF6.js";import{c as $}from"./DNNFKDZR.js";import{a as H}from"./43LI5NKJ.js";import{a as N}from"./66F5ZH34.js";import{d as M,g as O,i as K}from"./NWNYJ26T.js";import{a as b}from"./FWD4L3CJ.js";import{a as e}from"./XSD5NL7J.js";import{encodeFunctionData as Y,erc20Abi as X,getAddress as W,parseAbi as ee,zeroAddress as te}from"viem";var v={address:W("0xCeF73866b088766DeD46Ba71d9Bd7591B5e931d2"),symbol:"tNET",decimals:9,chainId:b},_={pair_oracle:["checkpoint"],futures:["open","close","marginCall","accrueCarry","sweepCarrySkim"],underwriting:["subscribe","redeem"],prize:["enter","enterWithNet","exit","exitToUsdg","lockTranche","earlyUnlock","pokeRebase"]},fe=x=>({tools:[{name:"netnet_desk_action",inputSchema:{type:"object",additionalProperties:!1,required:["program","operation"],properties:{program:{type:"string",enum:Object.keys(_),description:"Desk program: pair_oracle (price checkpoint), futures, underwriting or prize (WinNET)."},operation:{type:"string",enum:[...new Set(Object.values(_).flat())],description:"Action to run; it must be one the chosen program supports (see the program list in this tool)."},amount:N('Amount in base units of the token the operation spends or moves: tNET 9 decimals for futures and underwriting, USDG 6 or NET 9 for prize. Example: "1000000000" = 1 NET.'),minAmountOut:N('Least output you must receive, in base units of the output token (USDG 6 decimals, NET 9, underwriting shares). Example: "1000000" = 1 USDG.'),maxPayment:N('Most tNET you will pay for futures open (margin plus fee), in tNET base units (9 decimals). Example: "1000000000" = 1 tNET.'),sizeUsdWad:N('Futures position notional in USD as an 18-decimal wad in base units (1e18 = 1 USD). Example: "100000000000000000000" = 100 USD.'),isLong:{type:"boolean",description:"Futures open only: true for a long position, false for a short."},account:{type:"string",description:"Futures marginCall only: address of the trader to margin-call; they must be liquidatable."},referrer:{type:"string",description:"Prize enter only: optional referrer address recorded at the first deposit; cannot be your own wallet."},trancheIndex:N('Zero-based index of your WinNET tranche to lock or unlock early, as a decimal string. Example: "0".'),lockDraws:{enum:["7","30"],description:"Prize lockTranche only: commit the tranche for 7 or 30 draws."},maxPenaltyAssets:N('Prize earlyUnlock only: highest forfeited principal you accept, in NET base units (9 decimals). Example: "1000000000" = 1 NET.')}},execute:async(t,m)=>{try{if(H(m),typeof t.program!="string"||!Object.hasOwn(_,t.program)||typeof t.operation!="string"||!_[t.program].includes(t.operation))throw new e("Choose a supported finite NetNet desk operation.");let p=t.program,r=t.operation,P=E[p],z=Q[p],T=x.clientFor(b);if(await T.getChainId()!==b)throw new e("NetNet desk actions require chain 4663.");let D=await T.getBlock(),q=new Set(["program","operation"]),u=(n,s=[])=>T.readContract({address:P.address,abi:z,functionName:n,args:s,blockNumber:D.number}),h=(...n)=>n.forEach(s=>q.add(s)),A=()=>(h("amount"),y(t.amount)),S=()=>(h("minAmountOut"),y(t.minAmountOut)),d=n=>K(n,"Provide an explicit checksummed account.",M),l=[],a,c=0n,w="",g;if(p==="pair_oracle"){if(d(await u("pairContract"))!==Z)throw new e("The oracle does not use the pinned canonical pair.");w="Permissionless oracle checkpoint; it sends no reward to this wallet and may not yet produce a valid TWAP."}else if(p==="futures"||p==="underwriting"){if(d(await u("token"))!==v.address||await T.readContract({address:v.address,abi:X,functionName:"decimals",blockNumber:D.number})!==9)throw new e("This desk does not use the pinned valueless 9-decimal tNET test collateral.");let n=E.futures.address,s=E.underwriting.address;if(p==="futures"?d(await u("vault"))!==s:d(await u("clearinghouse"))!==n)throw new e("Futures and underwriting counterparties do not match the published pins.");if(w="Experimental tNET test program; tNET has no monetary value. Futures margin and underwriting capital can be lost. Utilization/ADL can prevent redemption. Prices and fees are read from the contract oracle; these calls encode no price floor.",r==="open"){if(h("isLong","sizeUsdWad","maxPayment"),typeof t.isLong!="boolean")throw new e("Provide isLong as a boolean.");let o=A(),f=y(t.sizeUsdWad);if(o>=1n<<128n||f>=1n<<128n)throw new e("Position margin and notional must fit uint128.");let k=d(await u("oracle"));if(k!==W("0xc8a11E8793F8714a159061369173dc86A0A5E23F"))throw new e("The futures oracle is not the published deployment.");let C=await T.readContract({address:k,abi:ee(["function marginPriceWad() view returns (uint256)"]),functionName:"marginPriceWad",blockNumber:D.number});if(C<=0n)throw new e("Futures margin price is unavailable.");let i=f*5n/10000n*1000000000n/C;if(c=o+i,a=v,c>y(t.maxPayment))throw new e("Margin plus taker fee exceeds maxPayment.");l=[t.isLong,f,o],w+=` Entry fee ${i} tNET base units; exact approval caps price drift and may require a fresh preview.`}else if(r==="marginCall"){h("account");let o=d(t.account);if(await u("liquidatable",[o])!==!0)throw new e("The selected futures trader is not liquidatable.");l=[o]}else if(r==="subscribe"){c=A(),a=v,l=[c];let[o,f]=await Promise.all([u("totalShares"),u("equityTokens")]);if(typeof o!="bigint"||typeof f!="bigint"||o>0n&&f===0n)throw new e("Underwriting share price is invalid.");let k=o===0n?c:c*o/f;if(k===0n||k<S())throw new e("Underwriting subscription rounds to zero or misses the local share minimum.");w+=` Current quote ${k} underwriting share units; the share minimum is a local check, not encoded calldata.`}else if(r==="redeem"){let o=A();if(o>await u("sharesOf",[m]))throw new e("The wallet has insufficient underwriting shares.");l=[o],g={token:v,amount:S()}}}else{let[n,s,o,f,k,C]=await Promise.all(["net","usdg","staking","sNet","controller","book"].map(i=>u(i)));if(d(n)!==I.address||d(s)!==$.address||d(o)!==V||d(f)!==J.address||d(k)!==E.draw.address||d(C)!==E.bonus.address)throw new e("WinNET token, staking, book or controller does not match its published pins.");if(w="WinNET principal is a fixed NET claim, exposed to NET price changes. Entry commits through three staking epochs; locks commit for 7 or 30 draws. Early unlock forfeits 1% of principal and cancels streak credits. Pair buys and sells each incur the NET trading tax; no prize or return is guaranteed.",r==="enter"||r==="enterWithNet"){h("referrer");let i=t.referrer===void 0?te:d(t.referrer);if(i===W(m))throw new e("WinNET does not permit self-referral.");c=A(),a=r==="enter"?$:I,l=r==="enter"?[c,S(),i]:[c,i],w+=` Referrer ${i} is recorded at the first deposit and cannot later be changed.`}else if(r==="exit"||r==="exitToUsdg"){let i=A();if(i>await u("principalOf",[m]))throw new e("WinNET exit exceeds this wallet\u2019s fixed principal.");l=r==="exit"?[i,m]:[i,S(),m],g={token:r==="exit"?I:$,amount:r==="exit"?i:y(t.minAmountOut)}}else if(r==="lockTranche"||r==="earlyUnlock"){h("trancheIndex");let i=y(t.trancheIndex,!0),U=await u("trancheAt",[m,i]);if(!Array.isArray(U)||typeof U[0]!="bigint"||U[0]===0n)throw new e("Choose a nonempty WinNET tranche.");if(r==="lockTranche"){if(h("lockDraws"),t.lockDraws!=="7"&&t.lockDraws!=="30")throw new e("Choose a 7- or 30-draw lock.");l=[i,BigInt(t.lockDraws)]}else{h("maxPenaltyAssets");let j=(U[0]+99n)/100n;if(j>y(t.maxPenaltyAssets,!0))throw new e("Early unlock exceeds maxPenaltyAssets in NET base units.");l=[i],w+=` Current irreversible forfeiture ${j} NET base units.`}}}if(Object.keys(t).some(n=>!q.has(n)))throw new e("Unexpected fields for this desk operation.");if(a&&await T.readContract({address:a.address,abi:X,functionName:"balanceOf",args:[m],blockNumber:D.number})<c)throw new e(`Top up ${a.symbol}; this action needs ${c} base units.`);let F=`NetNet ${p}.${r}, contract ${P.address}, chain ${b}, ordered values ${JSON.stringify(l,(n,s)=>typeof s=="bigint"?String(s):s)}. ${a?`Approve exactly ${c} ${a.symbol} base units (token ${a.address}, decimals ${a.decimals}). `:""}${w}`,L=[...a?[x.approval(a.address,P.address,c.toString(),b)]:[],x.unsignedTx({to:P.address,data:Y({abi:z,functionName:r,args:l}),value:"0",chainId:b,description:F})],R=await x.preview(L,m),B=0n,G=0n;for(let n of R.changes){if(n.token.chainId!==b||!/^-?\d+$/.test(n.amount))throw new e("Invalid desk preview metadata.");let s=BigInt(n.amount);if(s<0n){if(!a||!O(n.token.address,a.address)||n.token.decimals!==a.decimals)throw new e("Desk preview spends an unexpected wallet asset.");B-=s}if(g&&O(n.token.address,g.token.address)){if(n.token.decimals!==g.token.decimals)throw new e("Desk receipt decimals mismatch.");G+=s}}if(B>c||g&&G<g.amount)throw new e("Desk preview exceeds its input budget or misses the requested receipt minimum.");return{txs:L,preview:R,summary:F}}catch(p){throw new e(x.plainError(p))}}}]});export{v as a,fe as b};
@@ -1 +0,0 @@
1
- import{m as v,n as F}from"./VYYSL557.js";import{b as A,i as U,n as X,o as V,q as j}from"./WU7XIAXB.js";import{a as $}from"./6WD4HHID.js";import{b as z,e as C,o as Y}from"./DNNFKDZR.js";import{a as w,b as S}from"./H5DY7CNB.js";import{a as k}from"./LIUXNOLP.js";import{a as P}from"./UEDGYZOC.js";import{a as B}from"./SPJCSEKP.js";import{b as q}from"./SCG5HWMN.js";import{b as T}from"./IX3GZMTM.js";import{p as y}from"./6NUNCD5J.js";import{a as m,b as f,c as H,d as N,i as g,j as W,k as R,p as K}from"./FWD4L3CJ.js";import{a as o}from"./XSD5NL7J.js";import{a as D,b as L}from"./JXOEJPJ4.js";import{getAddress as b,isAddress as Q,parseAbi as oe}from"viem";var J=[{inputs:[],name:"available",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"ethUsdE18",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"liquidityUsdgE6",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"phase",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"priceSigner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"signer",type:"address"}],name:"setPriceSigner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"spotOakPerEthE18",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"supplyNet",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"syncPhase",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"wallet",type:"address"},{internalType:"uint256",name:"oakPerEthE18",type:"uint256"},{internalType:"uint64",name:"timestamp",type:"uint64"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],internalType:"struct PriceNote",name:"n",type:"tuple"},{internalType:"bytes",name:"sig",type:"bytes"},{internalType:"address",name:"boundWallet",type:"address"}],name:"verifyNote",outputs:[{internalType:"uint256",name:"oakPerEthE18",type:"uint256"}],stateMutability:"view",type:"function"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"signer",type:"address"}],name:"PriceSignerSet",type:"event"},{inputs:[],name:"NotReady",type:"error"},{inputs:[],name:"NoteBadSignature",type:"error"},{inputs:[],name:"NoteExpired",type:"error"},{inputs:[],name:"NoteNotYetValid",type:"error"},{inputs:[{internalType:"uint256",name:"spot",type:"uint256"},{internalType:"uint256",name:"note",type:"uint256"}],name:"NoteOutsideGuard",type:"error"},{inputs:[],name:"NoteWrongWallet",type:"error"},{inputs:[{internalType:"address",name:"source",type:"address"}],name:"OracleUnreadable",type:"error"}];var M=300,de="1000000000000000000",te=b(g[m].tokens.USDG.address),ne=b(g[f].deployments.test_USDG.address),O=b(g[m].tokens.WETH.address),_=b(g[f].deployments.test_WETH.address);function re(n){let e=n.address.toLowerCase();return n.chainId===m?e===te.toLowerCase():n.chainId===f?e===ne.toLowerCase():!1}function ie(n){return n.chainId!==m&&n.chainId!==f?!1:S(n.address)===w}function ae(n){let e=n.address.toLowerCase();return n.chainId===m?e===O.toLowerCase():n.chainId===f?e===_.toLowerCase():!1}function ce(n){return ie(n)||ae(n)}var ue=-887272,me=887272,fe=(1n<<256n)-1n,le=oe(["function observe(uint32[] secondsAgos) view returns (int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s)","function slot0() view returns (uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)"]);function I(n,e){if(typeof n=="bigint")return n;if(typeof n=="number"){if(!Number.isSafeInteger(n))throw new o(`Invalid ${e} timestamp.`);return BigInt(n)}if(typeof n=="string"&&/^-?\d+$/.test(n.trim()))return BigInt(n.trim());throw new o(`Invalid ${e} timestamp.`)}function _e(n,e=BigInt(Math.floor(Date.now()/1e3)),t=M){try{return l(n,e,t),!0}catch{return!1}}function l(n,e=BigInt(Math.floor(Date.now()/1e3)),t=M){if(!Number.isInteger(t)||t<0)throw new o("Maximum price age must be a non-negative integer.");let s=I(n,"price"),a=I(e,"current");if(s<=0n)throw new o("Price timestamp must be positive.");if(s>a)throw new o("Price timestamp is in the future.");let i=a-s;if(i>BigInt(t))throw new o(`Price is stale: age ${i}s exceeds ${t}s.`);return s.toString()}function be(n){if(!Number.isInteger(n)||n<ue||n>me)throw new o(`Tick ${n} is outside valid Uniswap bounds.`);let e=BigInt(n<0?-n:n),t=(e&0x1n)!==0n?0xfffcb933bd6fad37aa2d162d1a594001n:0x100000000000000000000000000000000n;return(e&0x2n)!==0n&&(t=t*0xfff97272373d413259a46990580e213an>>128n),(e&0x4n)!==0n&&(t=t*0xfff2e50f5f656932ef12357cf3c7fdccn>>128n),(e&0x8n)!==0n&&(t=t*0xffe5caca7e10e4e61c3624eaa0941cd0n>>128n),(e&0x10n)!==0n&&(t=t*0xffcb9843d60f6159c9db58835c926644n>>128n),(e&0x20n)!==0n&&(t=t*0xff973b41fa98c081472e6896dfb254c0n>>128n),(e&0x40n)!==0n&&(t=t*0xff2ea16466c96a3843ec78b326b52861n>>128n),(e&0x80n)!==0n&&(t=t*0xfe5dee046a99a2a811c461f1969c3053n>>128n),(e&0x100n)!==0n&&(t=t*0xfcbe86c7900a88aedcffc83b479aa3a4n>>128n),(e&0x200n)!==0n&&(t=t*0xf987a7253ac413176f2b074cf7815e54n>>128n),(e&0x400n)!==0n&&(t=t*0xf3392b0822b70005940c7a398e4b70f3n>>128n),(e&0x800n)!==0n&&(t=t*0xe7159475a2c29b7443b29c7fa6e889d9n>>128n),(e&0x1000n)!==0n&&(t=t*0xd097f3bdfd2022b8845ad8f792aa5825n>>128n),(e&0x2000n)!==0n&&(t=t*0xa9f746462d870fdf8a65dc1f90e061e5n>>128n),(e&0x4000n)!==0n&&(t=t*0x70d869a156d2a1b890bb3df62baf32f7n>>128n),(e&0x8000n)!==0n&&(t=t*0x31be135f97d08fd981231505542fcfa6n>>128n),(e&0x10000n)!==0n&&(t=t*0x9aa508b5b7a84e1c677de54f3e99bc9n>>128n),(e&0x20000n)!==0n&&(t=t*0x5d6af8dedb81196699c329225ee604n>>128n),(e&0x40000n)!==0n&&(t=t*0x2216e584f5fa1ea926041bedfe98n>>128n),(e&0x80000n)!==0n&&(t=t*0x48a170391f7dc42444e8fa2n>>128n),n>0&&(t=fe/t),(t>>32n)+(t%(1n<<32n)===0n?0n:1n)}async function Z(n,e,t,s){let a=async()=>{throw new o("Price identity resolution is read-only.")},i=B({network:e===f?"testnet":"mainnet",clientFor:r=>t.client??y(t.rpcUrl,r),http:t.http??q(),preview:a,quoteSwap:a,buildSwap:a}),c=await Y(n,{context:i,oakTokenAddress:t.oakTokenAddress??process.env.OAK_TOKEN_ADDRESS,officialStockTokens:t.officialStockTokens,tokenMetadata:s,blockNumber:t.blockNumber,readMetadata:async r=>{let d=t.client??y(t.rpcUrl,e),[u,p]=await Promise.all([P(d,e,r,"symbol",t.blockNumber),P(d,e,r,"decimals",t.blockNumber)]);return{address:r,symbol:u,decimals:p,chainId:e}}});return{address:c.address,symbol:c.kind==="erc20"&&s?s.symbol:c.symbol,decimals:c.decimals,chainId:c.chainId}}async function pe(n,e,t){if(typeof n=="object"&&n!==null){let r=n.chainId??e,d=S(n.address)===w?w:b(n.address),u={address:d,symbol:n.symbol,decimals:n.decimals,chainId:r};return re(u)?{address:d,symbol:"USDG",decimals:N,chainId:r}:ie(u)?{address:w,symbol:"ETH",decimals:18,chainId:r}:ae(u)?{address:d,symbol:"WETH",decimals:18,chainId:r}:Z(u.address,r,t,u)}let s=n.trim(),a=s.toUpperCase(),i=s.toLowerCase();if(a==="ETH"||Q(s,{strict:!1})&&S(s)===w)return{...z,chainId:e};if(a==="WETH"||e===m&&i===O.toLowerCase()||e===f&&i===_.toLowerCase()){if(e!==m&&e!==f)throw new o(`No canonical WETH address configured for chain ${e}.`);return{address:e===f?_:O,symbol:"WETH",decimals:18,chainId:e}}if(a==="USDG"||e===m&&i===W.toLowerCase()||e===f&&i===R.toLowerCase()){if(e!==m&&e!==f)throw new o(`No canonical USDG address configured for chain ${e}.`);return{address:e===f?ne:te,symbol:"USDG",decimals:N,chainId:e}}if(e===m&&(a==="USDE"||i===C.address.toLowerCase()))return{...C,chainId:e};let c=t.oakTokenAddress??process.env.OAK_TOKEN_ADDRESS;if(a==="OAK"||c&&s.toLowerCase()===c.toLowerCase()){if(!c&&!Q(s,{strict:!1}))throw new o("OAK token address is required to price OAK.");return{address:b(c??s),symbol:"OAK",decimals:H,chainId:e}}return Z(n,e,t)}async function h(n,e,t){if(e)return(await n.readContract({address:e,abi:J,functionName:"ethUsdE18",blockNumber:t})).toString();let a=(await n.readContract({address:b(K),abi:le,functionName:"observe",args:[[A,0]],blockNumber:t}))[0];if(!a||a.length<2)throw new o("ETH/USDG pool observation returned insufficient tick cumulatives.");let i=X(a[0],a[1],A),c=be(i);return V(c)}async function x(n,e,t,s){if(n.timestamp!==void 0)return l(n.timestamp,t(),s);if(e&&typeof e.getBlock=="function"){let i=await k(e,n.blockNumber);return l(i.timestamp,t(),s)}let a=t();return l(a,a,s)}function ee(n){if(n.startsWith("untrusted "))try{let e=JSON.parse(n.slice(10));if(typeof e=="string"&&D(e)===n)return n}catch{}return D(n)}async function Ie(n,e={}){let t=e.chainId??m,s=e.maxAgeSeconds??M,a=()=>e.now!==void 0?I(e.now,"current"):BigInt(Math.floor(Date.now()/1e3)),i=await pe(n,t,e);if((L(i.symbol)||i.symbol.length>256)&&(i.symbol=ee(i.symbol)),e.signedNote||e.priceNote){let r=e.signedNote?e.signedNote.note:e.priceNote,d=l(r.timestamp,a(),s);if(e.spotOakPerEthE18!==void 0&&!v(r.oakPerEthE18,e.spotOakPerEthE18))throw new o("Price note is outside the 50% spot guard band.");let u=e.signedNote?.signature??e.signature,p=e.signedNote?.consumer??e.consumer;if(u&&p){let G=await F({note:r,signature:u,consumer:p,signer:e.signer,now:a(),spotOakPerEthE18:e.spotOakPerEthE18,chainId:t});if(!G.valid)throw new o(G.error??"Price note verification failed.")}let E=e.ethUsdE18!==void 0?e.ethUsdE18.toString():await h(e.client??y(e.rpcUrl,t),e.oracleAddress);return{token:i,usdE18:U(E,r.oakPerEthE18),timestamp:d}}if(e.trades){let r=await x(e,e.client,a,s),d=j(e.trades,{now:a(),windowStart:e.windowStart,windowEnd:e.windowEnd});if(e.spotOakPerEthE18!==void 0&&!v(d,e.spotOakPerEthE18))throw new o("30-minute average is outside the 50% spot guard band.");let u=e.ethUsdE18!==void 0?e.ethUsdE18.toString():await h(e.client??y(e.rpcUrl,t),e.oracleAddress);return{token:i,usdE18:U(u,d),timestamp:r}}if(e.usdE18!==void 0){let r=await x(e,e.client,a,s),d=T(e.usdE18.toString());if(d<=0n)throw new o("USD price must be positive.");return{token:i,usdE18:d.toString(),timestamp:r}}if(e.resolver){let r=await e.resolver(i),d=l(r.timestamp,a(),s),u=T(r.usdE18);if(u<=0n)throw new o("USD price must be positive.");return{token:i,usdE18:u.toString(),timestamp:d}}let c=e.client??y(e.rpcUrl,t);if(re(i)){let r=await x(e,c,a,s);return{token:i,usdE18:de,timestamp:r}}if(ce(i)){let r=await x(e,c,a,s),d=await h(c,e.oracleAddress,e.blockNumber);return{token:i,usdE18:d,timestamp:r}}if(i.chainId===m)try{let r=await k(c,e.blockNumber),d=l(r.timestamp,a(),s);if(r.number===null)throw new o("Pons reference requires a mined block.");let[u,p]=await Promise.all([$(i,c,r.number),h(c,e.oracleAddress,r.number)]),E=T(p)*u.numerator/u.denominator;if(E<=0n)throw new o("Pons USD reference price must be positive.");return{token:i,usdE18:E.toString(),timestamp:d}}catch{}throw new o(`Oak has no fresh on-chain trade price for ${ee(i.symbol)}, so it shows no price. balances and positions show a labeled estimate where one exists; an estimate is not a quote.`)}export{M as a,de as b,re as c,ie as d,ae as e,ce as f,_e as g,l as h,be as i,h as j,Ie as k};
@@ -1,7 +0,0 @@
1
- import{b as P,f as B,g as H,j as fe,k as $,l as pe,m as F,n as c,o as S,p as j,q as _e,r as I,s as ge}from"./RPB46QAC.js";import{Q as ae,R as ie,S as de,T as ue,U as w,V as ce,X as le,b as o,c as T,d as y,e as Y,f as Z,g as Q,m as V,n as v,o as J,p as W,q as R,r as D,s as X,t as ee,u as ne,v as te,w as se,x as oe,y as re}from"./7VC53B5X.js";import{a as C}from"./XSD5NL7J.js";var x=6,Ue=/^[A-Za-z0-9._-]{1,12}$/;function Ae(e){return Ue.test(e)?e:"the stock token"}function G(e){return e instanceof C?e.message:"unexpected error"}function O(e,n=x){return $({redeemOutBase:e,amountBase:0n,decimals:n})}function me(e,n,i){let d={amount_usd:c(n),gross_usd:c(e.grossUsd),horizon:i,costs_usd:c(e.costsUsd),net_usd:c(e.netUsd)};return e.suggestUsd===void 0?o(ie,d):o(ae,{...d,suggest_usd:`$${e.suggestUsd}`})}function M(e){return`${Number.isInteger(e)?e.toString():e.toFixed(2)} USDG`}function Ee(e,n,i,d){let u={id:"A",project:"layerbank"},s=O(n);if(!Number.isFinite(e.rateBasePct)||e.rateBasePct<0)return d.push("LayerBank rate was malformed"),{option:{...u,offered:!1,reason:"cant_check"},block:o(R,{})};if(!e.open)return{option:{...u,offered:!1,reason:"closed"},block:o(X,{})};if(e.capRoomBase<n)return{option:{...u,offered:!1,reason:"no_room"},block:o(ee,{cap_room_usd:c(O(e.capRoomBase)),amount_usd:c(s)})};let r=e.bonus,l=r!==void 0&&Number.isFinite(r.ratePct)&&r.ratePct>0&&r.endsAt>i,f=e.rateBasePct+(l?r.ratePct:0),b=l?F(i,r.endsAt):0,p=B(e.gasInUsd),_=B(e.gasOutUsd),g=p.usd+_.usd,h=p.estimatedHigh||_.estimatedHigh,m=fe({amountUsd:s,baseRatePct:e.rateBasePct,bonusRatePct:l?r.ratePct:0,bonusDays:b,days:30}),a=H({gross:m,costs:g,amount:s}),U=o(V,{lb_base_rate:S(e.rateBasePct),bonus_clause:l?o(v,{lb_bonus_rate:S(r.ratePct),bonus_days:I(b),lb_base_rate:S(e.rateBasePct)}):"",lb_cash_usd:c(O(e.cashUsdgBase)),lb_gas_in_usd:c(p.usd),lb_gas_out_usd:c(_.usd)});return h&&(U+=`
2
- ${o(w,{})}`),a.tooSmall&&(U+=`
3
- ${me(a,s,I(30))}`),{option:{...u,offered:!0,amountUsd:s,ratePct:f,grossUsd:m,costsUsd:g,netUsd:a.netUsd,tooSmall:a.tooSmall,...a.suggestUsd===void 0?{}:{suggestUsd:a.suggestUsd},estimatedHigh:h},block:U,gross30d:m,horizonEndsAt:i+30*86400}}function he(e,n,i){return e.filter(s=>s.kind==="stable"&&!s.matured&&s.endsAt>n).filter(s=>s.unitDecimals===x&&Number.isFinite(s.ratePct)?!0:(i.push(`Pendle term ${s.market} skipped: its USDG figures were not in the expected form`),!1)).sort((s,r)=>r.liquidityUsd-s.liquidityUsd||s.endsAt-r.endsAt)[0]}async function Oe(e,n,i,d,u){let s={id:"B",project:"pendle"};if(!n)return{option:{...s,offered:!1,reason:"no_term"},block:o(W,{})};let r={option:{...s,offered:!1,reason:"cant_check"},block:o(D,{})},l=O(i),f;try{f=await e.pendleQuoteCosts(n.market,i)}catch(z){return u.push(`Pendle quote failed: ${G(z)}`),r}if(typeof f.ptOutBase!="bigint"||f.ptOutBase<=0n)return u.push("Pendle quote was malformed"),r;let b=f.ptOutBase,p=$({redeemOutBase:b,amountBase:i,decimals:x}),_=B(n.gasInUsd),g=B(n.gasOutUsd),h=Number.isFinite(f.feeUsd)&&f.feeUsd>0?f.feeUsd:0,m=_.usd+g.usd,a=_.estimatedHigh||g.estimatedHigh,U=F(d,n.endsAt),E=H({gross:p,costs:m,amount:l}),N=j(n.endsAt),A=o(J,{pendle_end_date:N,pendle_rate:S(n.ratePct),pendle_payout_usd:c(O(b)),pendle_unit_usd:c(l),pendle_cost_in_usd:c(h+_.usd),pendle_gas_out_usd:c(g.usd)});return a&&(A+=`
4
- ${o(w,{})}`),E.tooSmall&&(A+=`
5
- ${me(E,l,`the ${I(U)} until ${N}`)}`),{option:{...s,offered:!0,amountUsd:l,ratePct:n.ratePct,market:n.market,endsAt:n.endsAt,grossUsd:p,costsUsd:m,netUsd:E.netUsd,tooSmall:E.tooSmall,...E.suggestUsd===void 0?{}:{suggestUsd:E.suggestUsd},estimatedHigh:a},block:A,gross30d:U>30?p*(30/U):p,horizonEndsAt:n.endsAt}}function ke(e){return e.filter(n=>n.matured&&n.ptBalanceBase>0n).map(n=>{let i=j(n.endsAt);if(n.kind==="stock")return o(le,{stock_symbol:Ae(n.unitSymbol),pendle_end_date:i});let d=ge(n.ptBalanceBase,n.unitDecimals);return o(ce,{pendle_end_date:i,pt_amount:d,usdg_out:d})})}function Pe(e){if(e!==void 0){if(!/^[0-9]+$/.test(e))throw new C("The amount must be a whole number of USDG base units (6 decimals), for example 50000000 for 50 USDG.");return BigInt(e)}}async function ye(e,n,i,d={}){let u=Pe(d.amount),s=n.nowSec(),r=[],[l,f]=await Promise.allSettled([e.layerbank(i),e.pendleTerms(i)]),b=l.status==="fulfilled"?l.value:void 0,p=f.status==="fulfilled"?f.value:void 0;l.status==="rejected"&&r.push(`LayerBank could not be read: ${G(l.reason)}`),f.status==="rejected"&&r.push(`Pendle could not be read: ${G(f.reason)}`),r.push(...b?.checks??[],...p?.flatMap(t=>t.checks)??[]);let _=b?.walletUsdgBase;if(_===void 0)try{_=await n.usdgBalance(i)}catch{r.push("wallet USDG balance could not be read")}let g=u??_,h=p?ke(p):[],m=(t,be)=>({card:[...h,...t].join(`
6
-
7
- `),options:be,notices:h,checks:[...new Set(r)]}),a=await Be(n,i,r),U=t=>a&&a.paidUntil<=s&&!(a.freeUntil!==void 0&&a.freeUntil>s)?[o(re,{plan_price:M(a.priceUsd),project_site:t.join(" or ")})]:[];if(g===void 0)return m([o(R,{}),o(D,{})],[{id:"A",project:"layerbank",offered:!1,reason:"cant_check"},{id:"B",project:"pendle",offered:!1,reason:"cant_check"}]);if(g===0n){let t=0n;try{t=await n.ethBalance(i)}catch{r.push("wallet ETH balance could not be read")}return t>0n?m([o(se,{}),...U([T,y])],[]):m([o(oe,{})],[])}let E=b?Ee(b,g,s,r):{option:{id:"A",project:"layerbank",offered:!1,reason:"cant_check"},block:o(R,{})},N=p?await Oe(e,he(p,s,r),g,s,r):{option:{id:"B",project:"pendle",offered:!1,reason:"cant_check"},block:o(D,{})},A=[E,N],k=[u===void 0||u===_?o(Y,{amount_usd:c(O(g))}):o(_!==void 0&&u<_?Z:Q,{amount_usd:c(O(g))}),...A.map(t=>t.block)],K=a?A.flatMap(t=>t.option.offered&&t.gross30d!==void 0&&t.horizonEndsAt!==void 0?[pe({gross30d:t.gross30d,planPriceUsd:a.priceUsd,paidUntil:a.paidUntil,...a.freeUntil===void 0?{}:{freeUntil:a.freeUntil},horizonEndsAt:t.horizonEndsAt,nowSec:s})]:[]):[];a&&K.includes("fee")?k.push(o(de,{plan_price:M(a.priceUsd)})):a?.freeUntil!==void 0&&K.includes("free_until")&&k.push(o(ue,{free_until:_e(a.freeUntil),plan_price:M(a.priceUsd)}));let L=A.filter(t=>t.option.offered&&!t.option.tooSmall).map(t=>t.option.id);if(L.length>0){let t=L.length===2?"A, B, or neither":`${L[0]}, or neither`;k.push(o(ne,{choices:t}))}else A.some(t=>t.option.offered)&&k.push(o(te,{}));let q=A.filter(t=>t.option.offered).map(t=>t.option.project==="layerbank"?T:y);return k.push(...U(q.length>0?q:[T,y])),m(k,A.map(t=>t.option))}async function Be(e,n,i){let d;try{d=await e.plan?.(n)}catch{d=void 0}if(!d||!Number.isFinite(d.priceUsd)||d.priceUsd<=0||!Number.isFinite(d.paidUntil)){i.push("plan price unavailable");return}let{freeUntil:u,...s}=d;return typeof u=="number"&&Number.isFinite(u)?{...s,freeUntil:u}:s}export{ye as a};
@@ -1 +0,0 @@
1
- var t=["morpho_midnight_status","morpho_allocator","morpho_protocol","netnet_desk_read","netnet_financial_status","netnet_details","netnet_analytics","netnet_staking_status","longbow_fixed_offers","longbow_nft_admin","longbow_referral","longbow_details","longbow_analytics","longbow_staking_status","longbow_rebates","longbow_nft_listings","longbow_nft_offers","longbow_nft_loan","longbow_nft_loans"],o=new Set(["netnet_desk_action","netnet_financial_action","netnet_in_kind_exit","longbow_manage_nft","longbow_in_kind_exit","morpho_bundle","morpho_midnight_take","morpho_midnight_action","morpho_midnight_manage","morpho_reallocate","morpho_manage_allocator","morpho_manage","morpho_liquidate","netnet_mint","netnet_redeem","netnet_manage","netnet_force_exit","netnet_stake","netnet_claim_stake","netnet_rebase","longbow_mint","longbow_withdraw_assets","longbow_manage","longbow_force_exit","longbow_stake","longbow_unstake","longbow_claim_rewards","longbow_manage_staking","longbow_claim_rebate","longbow_manage_rebates","longbow_nft_accept_offer","longbow_nft_repay"]),e=n=>n!==void 0&&o.has(n),_=n=>n==="longbow_nft_accept_offer"||n==="longbow_nft_repay";export{t as a,o as b,e as c,_ as d};