@oakagentkit/core 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/modules/beefy/clm.d.ts +9 -0
- package/build/dist/api/modules/beefy/clm.js +1 -1
- package/build/dist/api/modules/beefy/guard.js +1 -1
- package/build/dist/api/modules/beefy/index.js +1 -1
- package/build/dist/api/modules/beefy/liquidity.js +1 -1
- package/build/dist/api/modules/borro/index.js +1 -1
- package/build/dist/api/modules/borro/positions.js +1 -1
- package/build/dist/api/modules/borro/reader.js +1 -1
- package/build/dist/api/modules/chop/actions.js +1 -1
- package/build/dist/api/modules/chop/checks.js +1 -1
- package/build/dist/api/modules/chop/copy.js +1 -1
- package/build/dist/api/modules/chop/guard.js +1 -1
- package/build/dist/api/modules/chop/index.js +1 -1
- package/build/dist/api/modules/chop/pins.d.ts +13 -0
- package/build/dist/api/modules/chop/pins.js +1 -1
- package/build/dist/api/modules/chop/positions.js +1 -1
- package/build/dist/api/modules/chop/reader.js +1 -1
- package/build/dist/api/modules/clanker/index.js +1 -1
- package/build/dist/api/modules/earn/index.js +1 -1
- package/build/dist/api/modules/fobo/client.d.ts +9 -0
- package/build/dist/api/modules/fobo/client.js +1 -0
- package/build/dist/api/modules/fobo/index.d.ts +16 -0
- package/build/dist/api/modules/fobo/index.js +1 -0
- package/build/dist/api/modules/fobo/intent.d.ts +243 -0
- package/build/dist/api/modules/fobo/intent.js +1 -0
- package/build/dist/api/modules/fobo/pins.d.ts +178 -0
- package/build/dist/api/modules/fobo/pins.js +1 -0
- package/build/dist/api/modules/fobo/steps.d.ts +25 -0
- package/build/dist/api/modules/fobo/steps.js +1 -0
- package/build/dist/api/modules/fobo/verify.d.ts +89 -0
- package/build/dist/api/modules/fobo/verify.js +1 -0
- package/build/dist/api/modules/gloam/copy.d.ts +1 -1
- package/build/dist/api/modules/gloam/copy.js +1 -1
- package/build/dist/api/modules/gloam/index.js +1 -1
- package/build/dist/api/modules/grove/index.js +1 -1
- package/build/dist/api/modules/heyresearch/index.js +1 -1
- package/build/dist/api/modules/heyresearch/public-reads.js +1 -1
- package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
- package/build/dist/api/modules/hoodlock/fee.js +1 -1
- package/build/dist/api/modules/hoodlock/guard.js +1 -1
- package/build/dist/api/modules/hoodlock/index.js +1 -1
- package/build/dist/api/modules/hoodlock/lifecycle.js +1 -1
- package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
- package/build/dist/api/modules/hoodlock/public.js +1 -1
- package/build/dist/api/modules/hookr/actions.js +1 -1
- package/build/dist/api/modules/hookr/create-cancel.js +1 -1
- package/build/dist/api/modules/hookr/discovery.js +1 -1
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/launch-options.js +1 -1
- package/build/dist/api/modules/hookr/launch-receipt.js +1 -1
- package/build/dist/api/modules/hookr/launch.js +1 -1
- package/build/dist/api/modules/hookr/liquidity.js +1 -1
- package/build/dist/api/modules/hookr/lp-positions.js +1 -1
- package/build/dist/api/modules/hookr/lp-reads.js +1 -1
- package/build/dist/api/modules/hookr/lp-receipt.js +1 -1
- package/build/dist/api/modules/hookr/lp-state.js +1 -1
- package/build/dist/api/modules/hookr/public-reads.js +1 -1
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/layerbank/actions.js +1 -1
- package/build/dist/api/modules/layerbank/index.js +1 -1
- package/build/dist/api/modules/layerbank/reader.js +1 -1
- package/build/dist/api/modules/longbow/administration.js +1 -1
- package/build/dist/api/modules/longbow/fixed.js +1 -1
- package/build/dist/api/modules/longbow/index.js +1 -1
- package/build/dist/api/modules/meridian/index.js +1 -1
- package/build/dist/api/modules/meridian/rfq.js +1 -1
- package/build/dist/api/modules/merkl/discovery.js +1 -1
- package/build/dist/api/modules/merkl/index.js +1 -1
- package/build/dist/api/modules/merkl/manage.js +1 -1
- package/build/dist/api/modules/morpho/bundles.js +1 -1
- package/build/dist/api/modules/morpho/in-kind.js +1 -1
- package/build/dist/api/modules/morpho/index.d.ts +2 -1
- package/build/dist/api/modules/morpho/index.js +1 -1
- package/build/dist/api/modules/morpho/local-guard.d.ts +3 -2
- package/build/dist/api/modules/morpho/local-guard.js +1 -1
- package/build/dist/api/modules/morpho/midnight.js +1 -1
- package/build/dist/api/modules/morpho/protocol.js +1 -1
- package/build/dist/api/modules/morpho/surface.js +1 -1
- package/build/dist/api/modules/morpho/vault-tools.js +1 -1
- package/build/dist/api/modules/netnet/card-plan.js +1 -1
- package/build/dist/api/modules/netnet/card-read.js +1 -1
- package/build/dist/api/modules/netnet/card-recovery.js +1 -1
- package/build/dist/api/modules/netnet/desk-action.js +1 -1
- package/build/dist/api/modules/netnet/financial.js +1 -1
- package/build/dist/api/modules/netnet/index.js +1 -1
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/pendle/index.js +1 -1
- package/build/dist/api/modules/pendle/reader.js +1 -1
- package/build/dist/api/modules/pons/claim.js +1 -1
- package/build/dist/api/modules/pons/index.js +1 -1
- package/build/dist/api/modules/pons/launch-status.js +1 -1
- package/build/dist/api/modules/pons/reads.js +1 -1
- package/build/dist/api/modules/pons/swap-terms.d.ts +2 -8
- package/build/dist/api/modules/pons/swap-terms.js +1 -1
- package/build/dist/api/modules/pons/trade.js +1 -1
- package/build/dist/api/modules/poolstrade/index.js +1 -1
- package/build/dist/api/modules/priors/coverage.js +1 -1
- package/build/dist/api/modules/priors/discovery.js +1 -1
- package/build/dist/api/modules/priors/holdings.js +1 -1
- package/build/dist/api/modules/priors/index.js +1 -1
- package/build/dist/api/modules/priors/integration.js +1 -1
- package/build/dist/api/modules/priors/stock-swap.js +1 -1
- package/build/dist/api/modules/raeto/index.js +1 -1
- package/build/dist/api/modules/relay/discovery.js +1 -1
- package/build/dist/api/modules/relay/inbound.js +1 -1
- package/build/dist/api/modules/relay/index.js +1 -1
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/spark/index.js +1 -1
- package/build/dist/api/modules/steakhouse/analytics.js +1 -1
- package/build/dist/api/modules/steakhouse/index.js +1 -1
- package/build/dist/api/modules/steakhouse/local-guard.js +1 -1
- package/build/dist/api/modules/steakhouse/management.js +1 -1
- package/build/dist/api/modules/steakhouse/v2-exit.js +1 -1
- package/build/dist/api/modules/tickerspring/basket-routes.js +1 -1
- package/build/dist/api/modules/tickerspring/contract-reads.js +1 -1
- package/build/dist/api/modules/tickerspring/exit-preview.js +1 -1
- package/build/dist/api/modules/tickerspring/guards.js +1 -1
- package/build/dist/api/modules/tickerspring/index.js +1 -1
- package/build/dist/api/modules/tickerspring/journeys.js +1 -1
- package/build/dist/api/modules/tickerspring/ladder.js +1 -1
- package/build/dist/api/modules/tickerspring/maker.js +1 -1
- package/build/dist/api/modules/tickerspring/order-accounting.js +1 -1
- package/build/dist/api/modules/tickerspring/research.js +1 -1
- package/build/dist/api/modules/tickerspring/strategies.js +1 -1
- package/build/dist/api/modules/uniswap/auction-create.js +1 -1
- package/build/dist/api/modules/uniswap/auction.js +1 -1
- package/build/dist/api/modules/uniswap/batch.js +1 -1
- package/build/dist/api/modules/uniswap/common.js +1 -1
- package/build/dist/api/modules/uniswap/fees.js +1 -1
- package/build/dist/api/modules/uniswap/index.js +1 -1
- package/build/dist/api/modules/uniswap/local-guard.js +1 -1
- package/build/dist/api/modules/uniswap/oracle.js +1 -1
- package/build/dist/api/modules/uniswap/pool-math.js +1 -1
- package/build/dist/api/modules/uniswap/pools.js +1 -1
- package/build/dist/api/modules/uniswap/position.js +1 -1
- package/build/dist/api/modules/uniswap/protocol.js +1 -1
- package/build/dist/api/modules/uniswap/quote-guard.js +1 -1
- package/build/dist/api/modules/uniswap/token-jar.js +1 -1
- package/build/dist/api/modules/uniswap/trade-batch.js +1 -1
- package/build/dist/api/modules/uniswap/trade.js +1 -1
- package/build/dist/api/modules/uniswap/v2.js +1 -1
- package/build/dist/api/modules/uniswap/v3.js +1 -1
- package/build/dist/api/modules/uniswap/v4.js +1 -1
- package/build/dist/api/modules/uniswap/wrap.js +1 -1
- package/build/dist/api/modules/velora/claims.js +1 -1
- package/build/dist/api/modules/velora/index.js +1 -1
- package/build/dist/api/modules/wormhole/index.js +1 -1
- package/build/dist/api/prices.d.ts +5 -0
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/signing-registry.js +1 -1
- package/build/dist/api/swap.d.ts +1 -0
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/universal-router.d.ts +45 -0
- package/build/dist/api/universal-router.js +1 -0
- package/build/dist/api/usd-estimate.js +1 -1
- package/build/dist/chunks/{ROQQ62LP.js → 22TU5PFT.js} +1 -1
- package/build/dist/chunks/{2WRXH6BL.js → 257N7343.js} +1 -1
- package/build/dist/chunks/{B2HSLY5F.js → 27PVS6BU.js} +1 -1
- package/build/dist/chunks/{24Q3FNGX.js → 35LXCSHY.js} +1 -1
- package/build/dist/chunks/{OYDKAIS2.js → 3BMM3V4P.js} +1 -1
- package/build/dist/chunks/{VZVW5J7J.js → 3FU6XP6S.js} +1 -1
- package/build/dist/chunks/{KH4QFN72.js → 3PHJUFU2.js} +1 -1
- package/build/dist/chunks/{TMRAF2L2.js → 3UQXTZ5R.js} +1 -1
- package/build/dist/chunks/43BG2JRB.js +1 -0
- package/build/dist/chunks/{KMSAUFYV.js → 47HSRR7G.js} +1 -1
- package/build/dist/chunks/{M7BUKZW2.js → 4RCYYN6O.js} +1 -1
- package/build/dist/chunks/4ZD5D2UP.js +1 -0
- package/build/dist/chunks/{6OCLWSMZ.js → 5CPB33XA.js} +1 -1
- package/build/dist/chunks/{X5AL3DUK.js → 6D3XNCOX.js} +1 -1
- package/build/dist/chunks/{W4RYRLL5.js → 6GWXPQZ6.js} +1 -1
- package/build/dist/chunks/{D2IYA4LP.js → 72EV7TGI.js} +1 -1
- package/build/dist/chunks/{KBU3PYP7.js → 73BZPPRS.js} +1 -1
- package/build/dist/chunks/{XV3YJ4P6.js → 7FIEBJOZ.js} +1 -1
- package/build/dist/chunks/{CI5ENLYA.js → 7FZXSYFD.js} +1 -1
- package/build/dist/chunks/{K4P5VYDP.js → 7TSIF3F4.js} +1 -1
- package/build/dist/chunks/{KZA5GYZR.js → AWV24X7F.js} +1 -1
- package/build/dist/chunks/{WOGWLFAL.js → BGVC5NI6.js} +1 -1
- package/build/dist/chunks/BJK75C7G.js +1 -0
- package/build/dist/chunks/BSX4LFYI.js +1 -0
- package/build/dist/chunks/{OTYB6BHK.js → BZPFPQ2I.js} +1 -1
- package/build/dist/chunks/{XBNZ7GTY.js → CXH46MHJ.js} +1 -1
- package/build/dist/chunks/{PQXYTOV5.js → DCGNVMKG.js} +1 -1
- package/build/dist/chunks/{OTLUQWLF.js → DLNA5272.js} +1 -1
- package/build/dist/chunks/{VMZYFO6I.js → DXAPKN7H.js} +1 -1
- package/build/dist/chunks/{NMQBOBWJ.js → EHGH646D.js} +1 -1
- package/build/dist/chunks/{PZEF5LBL.js → ETMD747Y.js} +1 -1
- package/build/dist/chunks/{GP6YO24Z.js → FSYYD3OM.js} +1 -1
- package/build/dist/chunks/{XEBMS5KU.js → GGMVT5A6.js} +1 -1
- package/build/dist/chunks/GK3D7OKG.js +1 -0
- package/build/dist/chunks/GYPMUYB5.js +1 -0
- package/build/dist/chunks/{U7UPLF4F.js → H64QC4QR.js} +1 -1
- package/build/dist/chunks/{HS5HWBMU.js → HIG7JY3J.js} +1 -1
- package/build/dist/chunks/{65356YKW.js → HPY2ONAS.js} +1 -1
- package/build/dist/chunks/{C6VJAL5B.js → HUKDISRE.js} +1 -1
- package/build/dist/chunks/{XPWGPZ2C.js → HZSYMGJ2.js} +1 -1
- package/build/dist/chunks/{QMEGAKLI.js → I3ZBOSSH.js} +1 -1
- package/build/dist/chunks/{YARZE7SJ.js → I4473OC6.js} +1 -1
- package/build/dist/chunks/{DMB64UIN.js → IJ4HZIDG.js} +1 -1
- package/build/dist/chunks/{YBLJ75U5.js → IPU656WB.js} +1 -1
- package/build/dist/chunks/{QLAOBULN.js → JTPHZCO3.js} +1 -1
- package/build/dist/chunks/{CSOO4SW7.js → K4GUZ5QS.js} +1 -1
- package/build/dist/chunks/{WBNFRPAT.js → KLEJ3W4T.js} +1 -1
- package/build/dist/chunks/{ACH4BSME.js → KOKLM63Q.js} +1 -1
- package/build/dist/chunks/{VB36EHIR.js → KVVBT43U.js} +1 -1
- package/build/dist/chunks/{6MDYKE2O.js → KXX7ZBFY.js} +1 -1
- package/build/dist/chunks/{I6PQW2JI.js → L2AE32SL.js} +1 -1
- package/build/dist/chunks/{KOTGFD2V.js → LGLWEGPY.js} +1 -1
- package/build/dist/chunks/{2HN3U6OG.js → LQSPWRHN.js} +1 -1
- package/build/dist/chunks/{C3WBHFLX.js → LTDF2LNP.js} +1 -1
- package/build/dist/chunks/{RNCMXKKS.js → M4AGEGWW.js} +1 -1
- package/build/dist/chunks/{OODSXDIH.js → MGVX5EUH.js} +1 -1
- package/build/dist/chunks/NCAV7Q4C.js +6 -0
- package/build/dist/chunks/{CZQ2CGYV.js → NUERUFH7.js} +1 -1
- package/build/dist/chunks/NV6FDIYT.js +1 -0
- package/build/dist/chunks/{A2V4NFVA.js → O3CC5SRM.js} +1 -1
- package/build/dist/chunks/{JI5DXDMY.js → ODV3XT5U.js} +1 -1
- package/build/dist/chunks/{HVFMIURK.js → OFWTO4N6.js} +1 -1
- package/build/dist/chunks/{B7BNDW35.js → OY5W7ZSL.js} +1 -1
- package/build/dist/chunks/{CD2JQ32C.js → PDGYM2WG.js} +1 -1
- package/build/dist/chunks/PHGHJ7SN.js +1 -0
- package/build/dist/chunks/{5R576SDB.js → PKYQ3XVA.js} +1 -1
- package/build/dist/chunks/{FN6GNTPR.js → PWJVC2FV.js} +1 -1
- package/build/dist/chunks/{PSGRZWES.js → QN45T4N3.js} +1 -1
- package/build/dist/chunks/{LJJYYUEG.js → QPY6UTLU.js} +1 -1
- package/build/dist/chunks/{ATEVAJ5Y.js → RA7DOR7F.js} +1 -1
- package/build/dist/chunks/{U762746N.js → RUSXMQSJ.js} +1 -1
- package/build/dist/chunks/{UPKVD7WG.js → RXP7ZUPY.js} +1 -1
- package/build/dist/chunks/{2QGLPY2D.js → SMKO7GKX.js} +1 -1
- package/build/dist/chunks/{EHK7CDTU.js → SNCV6HV7.js} +1 -1
- package/build/dist/chunks/{Q7L3BX6U.js → SO6O7JK2.js} +1 -1
- package/build/dist/chunks/{2ZQ7X223.js → SOJHYMD7.js} +1 -1
- package/build/dist/chunks/SVKG4JOY.js +3 -0
- package/build/dist/chunks/{ORG6LVKJ.js → UBI3HBXD.js} +1 -1
- package/build/dist/chunks/{NWPAQER2.js → UCHJYWGU.js} +1 -1
- package/build/dist/chunks/{N64JJN37.js → UEHN2IDF.js} +1 -1
- package/build/dist/chunks/{FTMA24EC.js → UHIJMDD2.js} +1 -1
- package/build/dist/chunks/UJQYOTO5.js +1 -0
- package/build/dist/chunks/{MMCM3GSM.js → V4UJMUIB.js} +1 -1
- package/build/dist/chunks/{ZNPVBNC5.js → VC5ZCQYZ.js} +1 -1
- package/build/dist/chunks/{FGEGJOAA.js → VDJPDIBV.js} +1 -1
- package/build/dist/chunks/{TGFQQCRY.js → VFM2BICB.js} +1 -1
- package/build/dist/chunks/{MSMHS456.js → VOJULRNU.js} +1 -1
- package/build/dist/chunks/{5W74Z4WZ.js → W3DGFMQE.js} +1 -1
- package/build/dist/chunks/{QLFPAN6S.js → W7QNSNOH.js} +1 -1
- package/build/dist/chunks/{2ZBSE2LD.js → WCI3FHWT.js} +1 -1
- package/build/dist/chunks/X5I5EJ5T.js +6 -0
- package/build/dist/chunks/{JPPQDELB.js → XKLXVTSE.js} +3 -3
- package/build/dist/chunks/{OQFNUDMQ.js → XVOW6UCI.js} +1 -1
- package/build/dist/chunks/{P6OB2AFW.js → Y7HBFQYG.js} +1 -1
- package/build/dist/chunks/{25C4DTVA.js → YAVWSW3G.js} +1 -1
- package/build/dist/chunks/{LDJI2JAL.js → YGW4ODAP.js} +1 -1
- package/build/dist/chunks/{U243AWCH.js → YW4W3LPQ.js} +1 -1
- package/build/dist/chunks/{S4UJDZGN.js → ZDCCFEVL.js} +1 -1
- package/build/dist/chunks/{D7QXZM3S.js → ZOLHVZDK.js} +1 -1
- package/build/dist/chunks/{SMSXZ3FN.js → ZSVAGOF2.js} +1 -1
- package/package.json +1 -1
- package/build/dist/chunks/4R3G3H42.js +0 -1
- package/build/dist/chunks/LKX5WDOQ.js +0 -1
- package/build/dist/chunks/ND32LJWI.js +0 -1
- package/build/dist/chunks/URBEK2VV.js +0 -1
- package/build/dist/chunks/UVAR6BHU.js +0 -1
- package/build/dist/chunks/V6SDKPZS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as Q}from"../chunks/HS5HWBMU.js";import"../chunks/75SULXNT.js";import"../chunks/ADIPEGNN.js";import"../chunks/OB7BFDOV.js";import"../chunks/ANIF3JMV.js";import"../chunks/E76Z2TT4.js";import"../chunks/GBIBRYOV.js";import"../chunks/SUNTJ6IU.js";import"../chunks/3A2IKFTV.js";import{a as Y}from"../chunks/X5V2Z2NM.js";import"../chunks/UVAR6BHU.js";import"../chunks/7EACRKFV.js";import"../chunks/WSILNJS2.js";import"../chunks/Y2QADJOB.js";import"../chunks/QLFPAN6S.js";import"../chunks/KH4QFN72.js";import"../chunks/PQXYTOV5.js";import"../chunks/XPWGPZ2C.js";import"../chunks/2HN3U6OG.js";import"../chunks/LKX5WDOQ.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/URBEK2VV.js";import"../chunks/OIQTZOBN.js";import"../chunks/Z7FGEWO2.js";import"../chunks/LIUXNOLP.js";import"../chunks/ELHRXA5U.js";import"../chunks/DGDMRATN.js";import"../chunks/4Z3IGMU6.js";import"../chunks/C76D54YG.js";import"../chunks/TXGZ6NWN.js";import"../chunks/VVAM3EAK.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import{a as F}from"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/HFVXNKA5.js";import"../chunks/TRCP7X5P.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import{t as J}from"../chunks/MQ5F2VOK.js";import"../chunks/5RXALTDT.js";import{b as N,j as q,t as z}from"../chunks/TI727O2H.js";import{a as L,e as V}from"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";import{decodeEventLog as _,erc20Abi as ie,getAddress as x,isAddress as O,pad as ae,parseAbi as Z}from"viem";var X=[{inputs:[],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"expiresAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"grandfathered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"hasAccess",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"hasRecord",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"holderOpen",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"noteUsed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"paidUntil",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"plan",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"previous",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",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"}],name:"quoteHolder",outputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"uint256",name:"burn",type:"uint256"}],stateMutability:"view",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"}],name:"quoteNoHold",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renew",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"maxPrice",type:"uint256"},{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"}],name:"renewNoHold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"usdgAuth",type:"bytes"}],name:"renewWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"retire",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"retired",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"uint64",name:"deadline",type:"uint64"}],name:"setGrandfatherRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"burner",type:"address"},{internalType:"address",name:"treasury",type:"address"}],name:"setPayees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"signupOakCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"plan",type:"uint8"},{internalType:"uint256",name:"maxCount",type:"uint256"},{internalType:"uint256",name:"maxPrice",type:"uint256"},{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"}],name:"subscribe",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"subscribeGrandfathered",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"},{internalType:"bytes",name:"usdgAuth",type:"bytes"}],name:"subscribeGrandfatheredWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"maxCount",type:"uint256"},{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:"bytes",name:"usdgAuth",type:"bytes"}],name:"subscribeWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"sweepToTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint64",name:"at",type:"uint64"}],name:"Cancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"root",type:"bytes32"},{indexed:!1,internalType:"uint64",name:"deadline",type:"uint64"}],name:"GrandfatherRootSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint8",name:"plan",type:"uint8"},{indexed:!1,internalType:"uint64",name:"paidUntil",type:"uint64"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"Renewed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"at",type:"uint64"}],name:"Retired",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint8",name:"plan",type:"uint8"},{indexed:!1,internalType:"uint64",name:"paidUntil",type:"uint64"},{indexed:!1,internalType:"uint256",name:"signupOakCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oakBurned",type:"uint256"},{indexed:!1,internalType:"bool",name:"grandfathered",type:"bool"}],name:"Subscribed",type:"event"},{inputs:[],name:"HolderClosed",type:"error"},{inputs:[],name:"NoteUsed",type:"error"}];var oe=50,Ae=10000n;function He(e){let t=Object.values(z).find(s=>s.chainId===e);if(!t)throw new L("History modules are not configured for this chain.");let n=[{module:"erc8004",contracts:[t.identityRegistry],abi:Y}];if(e!==N)return n;let r=q[N],u=Z(["event Deposit(address indexed sender,address indexed owner,uint256 assets,uint256 shares)","event Withdraw(address indexed sender,address indexed receiver,address indexed owner,uint256 assets,uint256 shares)"]);for(let[s,g]of Object.entries(r.vaults)){if(s==="morphoV2Factory"||s==="beefyTestedLpVault")continue;let h=s.startsWith("longbow")?"longbow":s==="groveAlm"?"grove":s;n.push({module:h,contracts:[g.address],abi:u})}return n.push({module:"hookr",contracts:[r.hookr.HookrLimitOrders.address],abi:Q},{module:"orbio",contracts:[r.orbio.credit.address],abi:Z(["event Activated(uint256 indexed activationId,address indexed by,bytes32 indexed ref,uint256 amount)"])}),n}var ue=X,ee=new WeakMap;function E(e){if(e==null)return null;if(typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(typeof e=="bigint")return e.toString();if(Array.isArray(e))return e.map(E);if(typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=E(r);return t}return String(e)}function k(e,t="0"){return e===void 0?t:typeof e=="bigint"?e.toString():typeof e=="number"?BigInt(Math.trunc(e)).toString():BigInt(e).toString()}function le(e){let t=[];e.subscriptionAddress&&t.push(e.subscriptionAddress),e.retiredSubscriptionAddresses&&t.push(...e.retiredSubscriptionAddresses),e.subscriptionAddresses&&t.push(...e.subscriptionAddresses),process.env.OAK_SUBSCRIPTION_ADDRESS&&t.push(process.env.OAK_SUBSCRIPTION_ADDRESS),process.env.OAK_RETIRED_SUBSCRIPTION_ADDRESSES&&t.push(...process.env.OAK_RETIRED_SUBSCRIPTION_ADDRESSES.split(",").map(r=>r.trim()).filter(Boolean));let n=new Set;for(let r of t)O(r,{strict:!1})&&n.add(r.toLowerCase());return n}function te(e){let t=Number(e);return t===1?"holder":t===2?"nohold":t===0?"none":String(e)}function de(e,t,n,r){if(!e.topics.length)return null;try{let u=_({abi:ue,data:e.data,topics:e.topics}),s=u.args??{},g=x(e.address),h=k(e.blockNumber),o=t.toLowerCase();if(u.eventName==="Subscribed"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=te(s.plan),A=k(s.paidUntil),H=k(s.signupOakCount),C=k(s.oakBurned),S=!!s.grandfathered;return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Subscribed",args:{wallet:m,plan:p,paidUntil:A,signupOakCount:H,oakBurned:C,grandfathered:S},description:S?`Grandfathered ${p} subscription until ${A}.`:`Subscribed to ${p} plan until ${A}.`}}if(u.eventName==="Renewed"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=te(s.plan),A=k(s.paidUntil),H=k(s.amountPaid);return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Renewed",args:{wallet:m,plan:p,paidUntil:A,amountPaid:H},description:`Renewed ${p} subscription until ${A} for ${H} USDG base units.`}}if(u.eventName==="Cancelled"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=k(s.at);return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Cancelled",args:{wallet:m,at:p},description:`Cancelled subscription at ${p}.`}}return null}catch{return null}}function v(e,t){return typeof e=="string"?O(e,{strict:!1})&&e.toLowerCase()===t:Array.isArray(e)?e.some(n=>v(n,t)):e!==null&&typeof e=="object"?Object.values(e).some(n=>v(n,t)):!1}function D(e){return typeof e=="string"?O(e,{strict:!1}):Array.isArray(e)?e.some(t=>D(t)):e!==null&&typeof e=="object"?Object.values(e).some(t=>D(t)):!1}function ne(e,t){if(e.length<=1)return!1;let n=ae(t).toLowerCase(),r=t.slice(2).toLowerCase();return e.slice(1).some(u=>{let s=u.toLowerCase();return s===n||s.length===66&&s.startsWith("0x000000000000000000000000")&&s.endsWith(r)})}function ce(e,t){if(!e||e==="0x")return!1;let n=e.slice(2).toLowerCase(),r=`000000000000000000000000${t.slice(2).toLowerCase()}`;for(let u=0;u+64<=n.length;u+=64)if(n.slice(u,u+64)===r)return!0;return!1}function W(e,t){return e.module||e.name||`module_${t}`}function se(e,t,n,r,u,s){let g=W(t,n),h=r.toLowerCase();if(t.contracts&&t.contracts.length>0){let o=e.address.toLowerCase();if(!t.contracts.some(p=>p.toLowerCase()===o))return null}if(t.decodeLog){let o=t.decodeLog(e,{wallet:r,chainId:u,timestamp:s});if(!o||t.filterWallet&&!t.filterWallet(o.args,r))return null;if(D(o.args)){if(!v(o.args,h))return null}else if(!ne(e.topics,r)&&!ce(e.data,r)&&!o.description.toLowerCase().includes(h))return null;return{...o,timestamp:o.timestamp&&o.timestamp!=="0"?o.timestamp:s,module:o.module||g}}if(!t.abi||!e.topics.length)return null;try{let o=_({abi:t.abi,data:e.data,topics:e.topics}),m=o.args??{},p={};for(let[C,S]of Object.entries(m))/^\d+$/.test(C)||(p[C]=typeof S=="string"&&O(S,{strict:!1})?x(S):E(S));if(!(t.filterWallet?t.filterWallet(p,r):v(m,h)||ne(e.topics,r)))return null;let H=o.eventName??"Event";return{transactionHash:e.transactionHash,blockNumber:k(e.blockNumber),logIndex:e.logIndex,timestamp:s,chainId:u,contract:x(e.address),module:g,event:H,args:p,description:`${g} ${H} on ${x(e.address)}.`}}catch{return null}}function pe(e,t,n,r){if(e.topics.length!==3)return null;try{let u=_({abi:ie,data:e.data,topics:e.topics});if(u.eventName!=="Transfer")return null;let s=u.args,g=x(s.from),h=x(s.to),o=t.toLowerCase();if(g.toLowerCase()!==o&&h.toLowerCase()!==o)return null;let m=s.value.toString(),p=x(e.address);return{transactionHash:e.transactionHash,blockNumber:k(e.blockNumber),logIndex:e.logIndex,timestamp:r,chainId:n,contract:p,module:"token",event:"Transfer",args:{from:g,to:h,value:m},description:`Transferred ${m} token base units from ${g} to ${h}.`}}catch{return null}}function me(e,t){let n=BigInt(e.blockNumber),r=BigInt(t.blockNumber);return n<r?-1:n>r?1:e.logIndex-t.logIndex}function P(e,t,n,r){let u=V(t);return{transactionHash:"0x"+"0".repeat(64),blockNumber:"0",logIndex:0,timestamp:"0",chainId:n,contract:r?x(r):"0x"+"0".repeat(40),module:e,event:"error",args:{error:u},description:`${e}: ${u}`}}async function Se(e,t=oe,n={}){if(F(e),!Number.isInteger(t)||t<=0)throw new L("History limit must be a positive integer.");let r=x(e),u=r.toLowerCase(),s=n.chainId??N,g=le(n),h=n.readers??[],o=h.filter(i=>typeof i=="object"&&i!==null),m=h.filter(i=>typeof i=="function"),p=n.client,A=()=>(p||(p=J(n.rpcUrl,s)),p),H=n.logs??[];if(!n.logs){let i=[...new Set([...g,...o.flatMap(a=>a.contracts??[]).map(a=>a.toLowerCase())])].map(a=>x(a));if(i.length>0||o.some(a=>!!(a.contracts?.length||a.abi||a.decodeLog))||h.length===0||n.client!==void 0||n.rpcUrl!==void 0||n.fromBlock!==void 0||n.toBlock!==void 0){let a=A();if(typeof a.getLogs=="function"){let d=i.filter(b=>g.has(b.toLowerCase())),f=i.filter(b=>!g.has(b.toLowerCase())),T=[d,f].filter(b=>b.length);T.length||T.push([]);let w=[];if(n.fromBlock!==void 0&&n.toBlock!==void 0){if(n.fromBlock<0n||n.fromBlock>n.toBlock)throw new L("History block range is invalid.");for(let b=n.fromBlock;b<=n.toBlock;b+=10000n){let c=b+9999n;w.push({fromBlock:b,toBlock:c<n.toBlock?c:n.toBlock})}}else w.push({fromBlock:n.fromBlock,toBlock:n.toBlock});let R=[];for(let b of w)for(let c of T)R.push(...await a.getLogs({...c.length?{address:c}:{},...b}));H=R.map(b=>{let c=b;return{address:c.address,topics:c.topics??[],data:c.data,blockNumber:c.blockNumber??0n,logIndex:Number(c.logIndex??0),transactionHash:c.transactionHash??"0x"+"0".repeat(64),...c.timestamp!==void 0?{timestamp:c.timestamp}:c.blockTimestamp!==void 0?{timestamp:BigInt(c.blockTimestamp)}:{}}})}}}let C=new Map;if(n.blockTimestamps)for(let[i,l]of Object.entries(n.blockTimestamps)){let y=k(i),a=k(l,"0");BigInt(a)>0n&&C.set(y,a)}let S=new Map,M=async i=>{if(i.timestamp!==void 0){let w=k(i.timestamp,"0");if(BigInt(w)>0n)return w}let l=k(i.blockNumber),y=C.get(l);if(y&&BigInt(y)>0n)return y;let a=A(),d=ee.get(a);d||(d=new Map,ee.set(a,d));let f=d.get(l);if(f&&BigInt(f)>0n)return C.set(l,f),f;let T=S.get(l);return T||(T=(async()=>{let w=BigInt(l),R;if(typeof a.getBlock=="function")try{R=(await a.getBlock({blockNumber:w}))?.timestamp}catch(c){if(typeof a.request=="function"){let G=await a.request({method:"eth_getBlockByNumber",params:[`0x${w.toString(16)}`,!1]});if(G?.timestamp!==void 0)R=BigInt(G.timestamp);else throw c}else throw c}else if(typeof a.request=="function"){let c=await a.request({method:"eth_getBlockByNumber",params:[`0x${w.toString(16)}`,!1]});c?.timestamp!==void 0&&(R=BigInt(c.timestamp))}let b=k(R,"0");if(BigInt(b)<=0n)throw new L(`Could not resolve a positive timestamp for block ${l}.`);return C.set(l,b),d.set(l,b),b})(),S.set(l,T)),T},I=[],B=[],$=new Set;for(let i of H){let l=i.address.toLowerCase();if(g.has(l)){let d=de(i,r,s,"1");if(d){let f=await M(i);I.push({...d,timestamp:f});continue}}let y=!1;for(let d=0;d<o.length;d++){if($.has(d))continue;let f=o[d];if(!(f.contracts&&f.contracts.length>0&&!f.contracts.some(w=>w.toLowerCase()===l)))try{if(f.decodeLog){let T=await M(i),w=se(i,f,d,r,s,T);if(w){I.push(w),y=!0;break}}else{let T=se(i,f,d,r,s,"1");if(T){let w=await M(i);I.push({...T,timestamp:w}),y=!0;break}}}catch(T){$.add(d),B.push(P(W(f,d),T,s,f.contracts?.[0]))}}if(y)continue;let a=pe(i,r,s,"1");if(a){let d=await M(i);I.push({...a,timestamp:d})}}let U=[...m.map((i,l)=>({name:i.name||`reader_${l}`,run:()=>i(r,t)})),...o.flatMap((i,l)=>{let y=i.readHistory??i.history;if(typeof y!="function")return[];let a=W(i,l);return[{name:a,contract:i.contracts?.[0],run:async()=>{let d=await y.call(i,r,t);if(!Array.isArray(d))throw new L(`Module ${a} did not return a history list.`);return d.map(f=>({...f,module:f.module||a}))}}]})],j=await Promise.allSettled(U.map(i=>i.run()));for(let i=0;i<j.length;i++){let l=j[i],y=U[i];if(l.status==="fulfilled"){if(!Array.isArray(l.value)){B.push(P(y.name,new L(`Module ${y.name} did not return a history list.`),s,y.contract));continue}for(let a of l.value)D(a.args)&&!v(a.args,u)||I.push({...a,module:a.module||y.name})}else B.push(P(y.name,l.reason,s,y.contract))}if(I.sort(me),B.length===0)return I.slice(-t);let K=Math.max(0,t-B.length);return[...K?I.slice(-K):[],...B].slice(0,t)}export{oe as DEFAULT_HISTORY_LIMIT,Ae as HISTORY_LOOKBACK_BLOCKS,Se as getHistory,He as moduleHistoryReaders};
|
|
1
|
+
import{z as Q}from"../chunks/HIG7JY3J.js";import"../chunks/75SULXNT.js";import"../chunks/ADIPEGNN.js";import"../chunks/OB7BFDOV.js";import"../chunks/ANIF3JMV.js";import"../chunks/E76Z2TT4.js";import"../chunks/GBIBRYOV.js";import"../chunks/SUNTJ6IU.js";import"../chunks/3A2IKFTV.js";import{a as Y}from"../chunks/X5V2Z2NM.js";import"../chunks/NV6FDIYT.js";import"../chunks/WSILNJS2.js";import"../chunks/7EACRKFV.js";import"../chunks/Y2QADJOB.js";import"../chunks/W7QNSNOH.js";import"../chunks/DCGNVMKG.js";import"../chunks/3PHJUFU2.js";import"../chunks/HZSYMGJ2.js";import"../chunks/LQSPWRHN.js";import"../chunks/GYPMUYB5.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/GK3D7OKG.js";import"../chunks/OIQTZOBN.js";import"../chunks/Z7FGEWO2.js";import"../chunks/LIUXNOLP.js";import"../chunks/BSX4LFYI.js";import"../chunks/ELHRXA5U.js";import"../chunks/DGDMRATN.js";import"../chunks/4Z3IGMU6.js";import"../chunks/C76D54YG.js";import"../chunks/TXGZ6NWN.js";import"../chunks/L2AE32SL.js";import"../chunks/VVAM3EAK.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import{a as F}from"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/HFVXNKA5.js";import"../chunks/TRCP7X5P.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import{t as J}from"../chunks/MQ5F2VOK.js";import"../chunks/5RXALTDT.js";import{b as N,j as q,t as z}from"../chunks/TI727O2H.js";import{a as L,e as V}from"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";import{decodeEventLog as _,erc20Abi as ie,getAddress as x,isAddress as O,pad as ae,parseAbi as Z}from"viem";var X=[{inputs:[],name:"cancel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"expiresAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"grandfathered",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"hasAccess",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"hasRecord",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"holderOpen",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"},{internalType:"bytes32",name:"nonce",type:"bytes32"}],name:"noteUsed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"paidUntil",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"plan",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"previous",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",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"}],name:"quoteHolder",outputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"uint256",name:"burn",type:"uint256"}],stateMutability:"view",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"}],name:"quoteNoHold",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renew",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"maxPrice",type:"uint256"},{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"}],name:"renewNoHold",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"usdgAuth",type:"bytes"}],name:"renewWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"retire",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"retired",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"root",type:"bytes32"},{internalType:"uint64",name:"deadline",type:"uint64"}],name:"setGrandfatherRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"burner",type:"address"},{internalType:"address",name:"treasury",type:"address"}],name:"setPayees",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"signupOakCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"plan",type:"uint8"},{internalType:"uint256",name:"maxCount",type:"uint256"},{internalType:"uint256",name:"maxPrice",type:"uint256"},{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"}],name:"subscribe",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"subscribeGrandfathered",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"count",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"},{internalType:"bytes",name:"usdgAuth",type:"bytes"}],name:"subscribeGrandfatheredWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"maxCount",type:"uint256"},{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:"bytes",name:"usdgAuth",type:"bytes"}],name:"subscribeWithAuthorization",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"sweepToTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint64",name:"at",type:"uint64"}],name:"Cancelled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"root",type:"bytes32"},{indexed:!1,internalType:"uint64",name:"deadline",type:"uint64"}],name:"GrandfatherRootSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint8",name:"plan",type:"uint8"},{indexed:!1,internalType:"uint64",name:"paidUntil",type:"uint64"},{indexed:!1,internalType:"uint256",name:"amountPaid",type:"uint256"}],name:"Renewed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"at",type:"uint64"}],name:"Retired",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"wallet",type:"address"},{indexed:!1,internalType:"uint8",name:"plan",type:"uint8"},{indexed:!1,internalType:"uint64",name:"paidUntil",type:"uint64"},{indexed:!1,internalType:"uint256",name:"signupOakCount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oakBurned",type:"uint256"},{indexed:!1,internalType:"bool",name:"grandfathered",type:"bool"}],name:"Subscribed",type:"event"},{inputs:[],name:"HolderClosed",type:"error"},{inputs:[],name:"NoteUsed",type:"error"}];var oe=50,Ae=10000n;function He(e){let t=Object.values(z).find(s=>s.chainId===e);if(!t)throw new L("History modules are not configured for this chain.");let n=[{module:"erc8004",contracts:[t.identityRegistry],abi:Y}];if(e!==N)return n;let r=q[N],u=Z(["event Deposit(address indexed sender,address indexed owner,uint256 assets,uint256 shares)","event Withdraw(address indexed sender,address indexed receiver,address indexed owner,uint256 assets,uint256 shares)"]);for(let[s,g]of Object.entries(r.vaults)){if(s==="morphoV2Factory"||s==="beefyTestedLpVault")continue;let h=s.startsWith("longbow")?"longbow":s==="groveAlm"?"grove":s;n.push({module:h,contracts:[g.address],abi:u})}return n.push({module:"hookr",contracts:[r.hookr.HookrLimitOrders.address],abi:Q},{module:"orbio",contracts:[r.orbio.credit.address],abi:Z(["event Activated(uint256 indexed activationId,address indexed by,bytes32 indexed ref,uint256 amount)"])}),n}var ue=X,ee=new WeakMap;function E(e){if(e==null)return null;if(typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(typeof e=="bigint")return e.toString();if(Array.isArray(e))return e.map(E);if(typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=E(r);return t}return String(e)}function k(e,t="0"){return e===void 0?t:typeof e=="bigint"?e.toString():typeof e=="number"?BigInt(Math.trunc(e)).toString():BigInt(e).toString()}function le(e){let t=[];e.subscriptionAddress&&t.push(e.subscriptionAddress),e.retiredSubscriptionAddresses&&t.push(...e.retiredSubscriptionAddresses),e.subscriptionAddresses&&t.push(...e.subscriptionAddresses),process.env.OAK_SUBSCRIPTION_ADDRESS&&t.push(process.env.OAK_SUBSCRIPTION_ADDRESS),process.env.OAK_RETIRED_SUBSCRIPTION_ADDRESSES&&t.push(...process.env.OAK_RETIRED_SUBSCRIPTION_ADDRESSES.split(",").map(r=>r.trim()).filter(Boolean));let n=new Set;for(let r of t)O(r,{strict:!1})&&n.add(r.toLowerCase());return n}function te(e){let t=Number(e);return t===1?"holder":t===2?"nohold":t===0?"none":String(e)}function de(e,t,n,r){if(!e.topics.length)return null;try{let u=_({abi:ue,data:e.data,topics:e.topics}),s=u.args??{},g=x(e.address),h=k(e.blockNumber),o=t.toLowerCase();if(u.eventName==="Subscribed"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=te(s.plan),A=k(s.paidUntil),H=k(s.signupOakCount),C=k(s.oakBurned),S=!!s.grandfathered;return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Subscribed",args:{wallet:m,plan:p,paidUntil:A,signupOakCount:H,oakBurned:C,grandfathered:S},description:S?`Grandfathered ${p} subscription until ${A}.`:`Subscribed to ${p} plan until ${A}.`}}if(u.eventName==="Renewed"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=te(s.plan),A=k(s.paidUntil),H=k(s.amountPaid);return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Renewed",args:{wallet:m,plan:p,paidUntil:A,amountPaid:H},description:`Renewed ${p} subscription until ${A} for ${H} USDG base units.`}}if(u.eventName==="Cancelled"){let m=typeof s.wallet=="string"?x(s.wallet):void 0;if(!m||m.toLowerCase()!==o)return null;let p=k(s.at);return{transactionHash:e.transactionHash,blockNumber:h,logIndex:e.logIndex,timestamp:r,chainId:n,contract:g,module:"subscription",event:"Cancelled",args:{wallet:m,at:p},description:`Cancelled subscription at ${p}.`}}return null}catch{return null}}function v(e,t){return typeof e=="string"?O(e,{strict:!1})&&e.toLowerCase()===t:Array.isArray(e)?e.some(n=>v(n,t)):e!==null&&typeof e=="object"?Object.values(e).some(n=>v(n,t)):!1}function D(e){return typeof e=="string"?O(e,{strict:!1}):Array.isArray(e)?e.some(t=>D(t)):e!==null&&typeof e=="object"?Object.values(e).some(t=>D(t)):!1}function ne(e,t){if(e.length<=1)return!1;let n=ae(t).toLowerCase(),r=t.slice(2).toLowerCase();return e.slice(1).some(u=>{let s=u.toLowerCase();return s===n||s.length===66&&s.startsWith("0x000000000000000000000000")&&s.endsWith(r)})}function ce(e,t){if(!e||e==="0x")return!1;let n=e.slice(2).toLowerCase(),r=`000000000000000000000000${t.slice(2).toLowerCase()}`;for(let u=0;u+64<=n.length;u+=64)if(n.slice(u,u+64)===r)return!0;return!1}function W(e,t){return e.module||e.name||`module_${t}`}function se(e,t,n,r,u,s){let g=W(t,n),h=r.toLowerCase();if(t.contracts&&t.contracts.length>0){let o=e.address.toLowerCase();if(!t.contracts.some(p=>p.toLowerCase()===o))return null}if(t.decodeLog){let o=t.decodeLog(e,{wallet:r,chainId:u,timestamp:s});if(!o||t.filterWallet&&!t.filterWallet(o.args,r))return null;if(D(o.args)){if(!v(o.args,h))return null}else if(!ne(e.topics,r)&&!ce(e.data,r)&&!o.description.toLowerCase().includes(h))return null;return{...o,timestamp:o.timestamp&&o.timestamp!=="0"?o.timestamp:s,module:o.module||g}}if(!t.abi||!e.topics.length)return null;try{let o=_({abi:t.abi,data:e.data,topics:e.topics}),m=o.args??{},p={};for(let[C,S]of Object.entries(m))/^\d+$/.test(C)||(p[C]=typeof S=="string"&&O(S,{strict:!1})?x(S):E(S));if(!(t.filterWallet?t.filterWallet(p,r):v(m,h)||ne(e.topics,r)))return null;let H=o.eventName??"Event";return{transactionHash:e.transactionHash,blockNumber:k(e.blockNumber),logIndex:e.logIndex,timestamp:s,chainId:u,contract:x(e.address),module:g,event:H,args:p,description:`${g} ${H} on ${x(e.address)}.`}}catch{return null}}function pe(e,t,n,r){if(e.topics.length!==3)return null;try{let u=_({abi:ie,data:e.data,topics:e.topics});if(u.eventName!=="Transfer")return null;let s=u.args,g=x(s.from),h=x(s.to),o=t.toLowerCase();if(g.toLowerCase()!==o&&h.toLowerCase()!==o)return null;let m=s.value.toString(),p=x(e.address);return{transactionHash:e.transactionHash,blockNumber:k(e.blockNumber),logIndex:e.logIndex,timestamp:r,chainId:n,contract:p,module:"token",event:"Transfer",args:{from:g,to:h,value:m},description:`Transferred ${m} token base units from ${g} to ${h}.`}}catch{return null}}function me(e,t){let n=BigInt(e.blockNumber),r=BigInt(t.blockNumber);return n<r?-1:n>r?1:e.logIndex-t.logIndex}function P(e,t,n,r){let u=V(t);return{transactionHash:"0x"+"0".repeat(64),blockNumber:"0",logIndex:0,timestamp:"0",chainId:n,contract:r?x(r):"0x"+"0".repeat(40),module:e,event:"error",args:{error:u},description:`${e}: ${u}`}}async function Se(e,t=oe,n={}){if(F(e),!Number.isInteger(t)||t<=0)throw new L("History limit must be a positive integer.");let r=x(e),u=r.toLowerCase(),s=n.chainId??N,g=le(n),h=n.readers??[],o=h.filter(i=>typeof i=="object"&&i!==null),m=h.filter(i=>typeof i=="function"),p=n.client,A=()=>(p||(p=J(n.rpcUrl,s)),p),H=n.logs??[];if(!n.logs){let i=[...new Set([...g,...o.flatMap(a=>a.contracts??[]).map(a=>a.toLowerCase())])].map(a=>x(a));if(i.length>0||o.some(a=>!!(a.contracts?.length||a.abi||a.decodeLog))||h.length===0||n.client!==void 0||n.rpcUrl!==void 0||n.fromBlock!==void 0||n.toBlock!==void 0){let a=A();if(typeof a.getLogs=="function"){let d=i.filter(b=>g.has(b.toLowerCase())),f=i.filter(b=>!g.has(b.toLowerCase())),T=[d,f].filter(b=>b.length);T.length||T.push([]);let w=[];if(n.fromBlock!==void 0&&n.toBlock!==void 0){if(n.fromBlock<0n||n.fromBlock>n.toBlock)throw new L("History block range is invalid.");for(let b=n.fromBlock;b<=n.toBlock;b+=10000n){let c=b+9999n;w.push({fromBlock:b,toBlock:c<n.toBlock?c:n.toBlock})}}else w.push({fromBlock:n.fromBlock,toBlock:n.toBlock});let R=[];for(let b of w)for(let c of T)R.push(...await a.getLogs({...c.length?{address:c}:{},...b}));H=R.map(b=>{let c=b;return{address:c.address,topics:c.topics??[],data:c.data,blockNumber:c.blockNumber??0n,logIndex:Number(c.logIndex??0),transactionHash:c.transactionHash??"0x"+"0".repeat(64),...c.timestamp!==void 0?{timestamp:c.timestamp}:c.blockTimestamp!==void 0?{timestamp:BigInt(c.blockTimestamp)}:{}}})}}}let C=new Map;if(n.blockTimestamps)for(let[i,l]of Object.entries(n.blockTimestamps)){let y=k(i),a=k(l,"0");BigInt(a)>0n&&C.set(y,a)}let S=new Map,M=async i=>{if(i.timestamp!==void 0){let w=k(i.timestamp,"0");if(BigInt(w)>0n)return w}let l=k(i.blockNumber),y=C.get(l);if(y&&BigInt(y)>0n)return y;let a=A(),d=ee.get(a);d||(d=new Map,ee.set(a,d));let f=d.get(l);if(f&&BigInt(f)>0n)return C.set(l,f),f;let T=S.get(l);return T||(T=(async()=>{let w=BigInt(l),R;if(typeof a.getBlock=="function")try{R=(await a.getBlock({blockNumber:w}))?.timestamp}catch(c){if(typeof a.request=="function"){let G=await a.request({method:"eth_getBlockByNumber",params:[`0x${w.toString(16)}`,!1]});if(G?.timestamp!==void 0)R=BigInt(G.timestamp);else throw c}else throw c}else if(typeof a.request=="function"){let c=await a.request({method:"eth_getBlockByNumber",params:[`0x${w.toString(16)}`,!1]});c?.timestamp!==void 0&&(R=BigInt(c.timestamp))}let b=k(R,"0");if(BigInt(b)<=0n)throw new L(`Could not resolve a positive timestamp for block ${l}.`);return C.set(l,b),d.set(l,b),b})(),S.set(l,T)),T},I=[],B=[],$=new Set;for(let i of H){let l=i.address.toLowerCase();if(g.has(l)){let d=de(i,r,s,"1");if(d){let f=await M(i);I.push({...d,timestamp:f});continue}}let y=!1;for(let d=0;d<o.length;d++){if($.has(d))continue;let f=o[d];if(!(f.contracts&&f.contracts.length>0&&!f.contracts.some(w=>w.toLowerCase()===l)))try{if(f.decodeLog){let T=await M(i),w=se(i,f,d,r,s,T);if(w){I.push(w),y=!0;break}}else{let T=se(i,f,d,r,s,"1");if(T){let w=await M(i);I.push({...T,timestamp:w}),y=!0;break}}}catch(T){$.add(d),B.push(P(W(f,d),T,s,f.contracts?.[0]))}}if(y)continue;let a=pe(i,r,s,"1");if(a){let d=await M(i);I.push({...a,timestamp:d})}}let U=[...m.map((i,l)=>({name:i.name||`reader_${l}`,run:()=>i(r,t)})),...o.flatMap((i,l)=>{let y=i.readHistory??i.history;if(typeof y!="function")return[];let a=W(i,l);return[{name:a,contract:i.contracts?.[0],run:async()=>{let d=await y.call(i,r,t);if(!Array.isArray(d))throw new L(`Module ${a} did not return a history list.`);return d.map(f=>({...f,module:f.module||a}))}}]})],j=await Promise.allSettled(U.map(i=>i.run()));for(let i=0;i<j.length;i++){let l=j[i],y=U[i];if(l.status==="fulfilled"){if(!Array.isArray(l.value)){B.push(P(y.name,new L(`Module ${y.name} did not return a history list.`),s,y.contract));continue}for(let a of l.value)D(a.args)&&!v(a.args,u)||I.push({...a,module:a.module||y.name})}else B.push(P(y.name,l.reason,s,y.contract))}if(I.sort(me),B.length===0)return I.slice(-t);let K=Math.max(0,t-B.length);return[...K?I.slice(-K):[],...B].slice(0,t)}export{oe as DEFAULT_HISTORY_LIMIT,Ae as HISTORY_LOOKBACK_BLOCKS,Se as getHistory,He as moduleHistoryReaders};
|
|
@@ -273,6 +273,15 @@ export declare const clmV3SwapAbi: readonly [{
|
|
|
273
273
|
}];
|
|
274
274
|
}];
|
|
275
275
|
type Row = typeof BEEFY_CLMS[number];
|
|
276
|
+
export declare const BEEFY_CLM_INPUT_DELEGATIONS: {
|
|
277
|
+
readonly chainId: 4663;
|
|
278
|
+
readonly entry: `0x${string}`;
|
|
279
|
+
readonly entryCodeHash: `0x${string}`;
|
|
280
|
+
readonly proxy: `0x${string}`;
|
|
281
|
+
readonly proxyCodeHash: `0x${string}`;
|
|
282
|
+
readonly implementation: `0x${string}`;
|
|
283
|
+
readonly codeHash: `0x${string}`;
|
|
284
|
+
}[];
|
|
276
285
|
export declare function pinnedBeefyClm(value: unknown): Row;
|
|
277
286
|
export declare function clmAllocation(budget: bigint, bridgeIsToken0: boolean, price: bigint, balance0: bigint, balance1: bigint): [bigint, bigint];
|
|
278
287
|
export declare const createClmPart: CreateModulePart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../../chunks/W3DGFMQE.js";import"../../../chunks/4PLLS6CT.js";import"../../../chunks/PDPTJMTJ.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as BEEFY_CLMS,b as BEEFY_CLM_ACTIONS,f as BEEFY_CLM_INPUT_DELEGATIONS,k as assertBeefyClmIntent,c as clmAbi,h as clmAllocation,d as clmSwapAbi,e as clmV3SwapAbi,l as createClmActionPart,i as createClmPart,g as pinnedBeefyClm,j as rebuildBeefyClmIntent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"../../../chunks/
|
|
1
|
+
import{a as c}from"../../../chunks/JTPHZCO3.js";import"../../../chunks/NAO7VWZF.js";import"../../../chunks/4RCYYN6O.js";import"../../../chunks/W3DGFMQE.js";import"../../../chunks/4PLLS6CT.js";import"../../../chunks/PDPTJMTJ.js";import"../../../chunks/P4UQGWCP.js";import{a as l}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import{g as i}from"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import{a as r}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var u=["beefy_deposit","beefy_withdraw"];async function h(n,o,t,s){if(!u.includes(n))throw new r("Unknown Beefy vault action.");let e=async()=>{throw new r("Direct Beefy vault actions require no swap.")},d=l({clientFor:()=>s,http:fetch,preview:async a=>({txs:a,changes:[],summary:"Locally reconstructed Beefy vault intent."}),quoteSwap:e,buildSwap:e});return(await c(d).tools.find(a=>a.name===n).execute(o,t)).txs}function v(n,o){if(!o.length||n.length!==o.length||n.some((t,s)=>{let e=o[s];return t.chainId!==e.chainId||!i(t.to,e.to)||t.value!==e.value||!i(t.data,e.data)}))throw new r("Beefy vault calldata differs from the locally reconstructed request; nothing was signed.")}export{u as BEEFY_VAULT_ACTIONS,v as assertBeefyVaultIntent,h as rebuildBeefyVaultIntent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/JTPHZCO3.js";import"../../../chunks/NAO7VWZF.js";import"../../../chunks/4RCYYN6O.js";import"../../../chunks/W3DGFMQE.js";import"../../../chunks/4PLLS6CT.js";import"../../../chunks/PDPTJMTJ.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as createModule,a as createModulePart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e}from"../../../chunks/4RCYYN6O.js";import"../../../chunks/W3DGFMQE.js";import"../../../chunks/4PLLS6CT.js";import"../../../chunks/PDPTJMTJ.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{c as BEEFY_LIQUIDITY_ACTIONS,a as BEEFY_LP,d as assertBeefyLiquidityTransactions,e as createLiquidityPart,b as liquidityAbi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunks/
|
|
1
|
+
import{a,b,c}from"../../../chunks/7FZXSYFD.js";import"../../../chunks/3BMM3V4P.js";import"../../../chunks/2GXHYI23.js";import"../../../chunks/ZSVAGOF2.js";import"../../../chunks/MSRCJ2BS.js";import"../../../chunks/S4JUFCT4.js";import"../../../chunks/WAKZWSHB.js";import"../../../chunks/V74F6IDY.js";import"../../../chunks/LEV5SNNC.js";import"../../../chunks/JDSSYT6R.js";import"../../../chunks/VVJO6OYK.js";import"../../../chunks/IBL6TL2Q.js";import"../../../chunks/G2AA73ZE.js";import"../../../chunks/HHYE42JG.js";import"../../../chunks/V5YSJKRH.js";import"../../../chunks/NV6FDIYT.js";import"../../../chunks/WSILNJS2.js";import"../../../chunks/7EACRKFV.js";import"../../../chunks/Y2QADJOB.js";import"../../../chunks/W7QNSNOH.js";import"../../../chunks/DCGNVMKG.js";import"../../../chunks/3PHJUFU2.js";import"../../../chunks/HZSYMGJ2.js";import"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as createBorroDiscovery,c as createModule,b as createModulePart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/3BMM3V4P.js";import"../../../chunks/2GXHYI23.js";import"../../../chunks/ZSVAGOF2.js";import"../../../chunks/MSRCJ2BS.js";import"../../../chunks/S4JUFCT4.js";import"../../../chunks/WAKZWSHB.js";import"../../../chunks/V74F6IDY.js";import"../../../chunks/JDSSYT6R.js";import"../../../chunks/VVJO6OYK.js";import"../../../chunks/IBL6TL2Q.js";import"../../../chunks/G2AA73ZE.js";import"../../../chunks/HHYE42JG.js";import"../../../chunks/V5YSJKRH.js";import"../../../chunks/NV6FDIYT.js";import"../../../chunks/WSILNJS2.js";import"../../../chunks/7EACRKFV.js";import"../../../chunks/Y2QADJOB.js";import"../../../chunks/W7QNSNOH.js";import"../../../chunks/DCGNVMKG.js";import"../../../chunks/3PHJUFU2.js";import"../../../chunks/HZSYMGJ2.js";import"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as readPositions,a as shareBalances};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f}from"../../../chunks/ZSVAGOF2.js";import"../../../chunks/MSRCJ2BS.js";import"../../../chunks/S4JUFCT4.js";import"../../../chunks/WAKZWSHB.js";import"../../../chunks/V74F6IDY.js";import"../../../chunks/JDSSYT6R.js";import"../../../chunks/VVJO6OYK.js";import"../../../chunks/IBL6TL2Q.js";import"../../../chunks/G2AA73ZE.js";import"../../../chunks/HHYE42JG.js";import"../../../chunks/V5YSJKRH.js";import"../../../chunks/NV6FDIYT.js";import"../../../chunks/WSILNJS2.js";import"../../../chunks/7EACRKFV.js";import"../../../chunks/Y2QADJOB.js";import"../../../chunks/W7QNSNOH.js";import"../../../chunks/DCGNVMKG.js";import"../../../chunks/3PHJUFU2.js";import"../../../chunks/HZSYMGJ2.js";import"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as candidates,c as createDiscovery,f as listVaults,e as readVault,b as sortVaults,d as tokenAmount};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d}from"../../../chunks/BGVC5NI6.js";import"../../../chunks/KOKLM63Q.js";import"../../../chunks/ETMD747Y.js";import"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as actionFields,b as assertArgs,d as buildAction,c as prepareAction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as address,c as amount,j as anchoredCode,k as assertRegistryEntry,m as assertTransactions,g as batch,e as checkSignal,i as createAnchorMemo,d as hash,h as mainnetBlock,f as read,n as receipt,b as uint,l as verifyLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../../../chunks/ETMD747Y.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/63YRSLDK.js";export{d as farmingRisk,i as feeLine,g as harvestPayoutRisk,f as holderRisk,l as measurableSummary,m as nothingToUnwrap,k as plainSummary,a as providerBoundary,j as riskLines,h as roundTripPct,e as sharedRiskLines,n as unwrapAboveHolding,c as unwrapRisk,b as upgradeKeyRisk};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/6GWXPQZ6.js";import"../../../chunks/BGVC5NI6.js";import"../../../chunks/KOKLM63Q.js";import"../../../chunks/ETMD747Y.js";import"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as createChopGuard,a as rebuildChopAction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as O}from"../../../chunks/
|
|
1
|
+
import{a as O}from"../../../chunks/43BG2JRB.js";import{a as j,b as q,c as D,d as $,e as I,f as N}from"../../../chunks/OEZ7FCLF.js";import{a as i}from"../../../chunks/G2LAO23N.js";import{a as E}from"../../../chunks/LTDF2LNP.js";import{a as R,b as u,d as T}from"../../../chunks/BGVC5NI6.js";import{c as A,f as _,g as b,h as S,i as L,j as v,n as C,o as F}from"../../../chunks/KOKLM63Q.js";import{l as w}from"../../../chunks/ETMD747Y.js";import{a as p}from"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/2GXHYI23.js";import"../../../chunks/NV6FDIYT.js";import"../../../chunks/WSILNJS2.js";import"../../../chunks/7EACRKFV.js";import"../../../chunks/Y2QADJOB.js";import"../../../chunks/W7QNSNOH.js";import"../../../chunks/DCGNVMKG.js";import"../../../chunks/3PHJUFU2.js";import"../../../chunks/HZSYMGJ2.js";import"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import{a as y}from"../../../chunks/L2AE32SL.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/P4UQGWCP.js";import{b as M}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var U={type:"string"};function c(t,r){let g=r==="chop_wrap"?"underlying token":r==="chop_unfarm"?"staked LP token":"log token",e={log:i.address("verified Chop log on Robinhood Chain"),underlying:i.address("underlying token matching the verified log"),amount:i.amount(g),minLogOut:`Minimum log output. ${i.amount("log token")}`,quotedNet:`Net output from chop_quote_unwrap; checked again before unwrapping. ${i.amount("underlying token")}`,pairedAmount:i.amount("paired token"),minPaired:`Minimum paired input checked in the preview. ${i.amount("paired token")}`,minStakedLp:`Minimum staked LP output checked in the preview. ${i.amount("staked LP token")}`,minPairedOut:`Minimum paired output enforced on chain. ${i.amount("paired token")}`,slippageBps:`${i.bps()} From 0 to 1000 in multiples of 10.`,deadline:`${i.unixSeconds()} Must be in the next 20 minutes.`};return{type:"object",additionalProperties:!1,properties:Object.fromEntries(t.map(o=>[o,{...o==="slippageBps"?{type:"integer",minimum:0,maximum:1e3,multipleOf:10}:U,description:e[o]}])),required:t}}var x=["detail","fields","limit","offset"],B={type:"object",additionalProperties:!1,properties:{detail:j,fields:q,limit:D,offset:$},required:[]};function z(t){let r=A();return{tools:[{name:"chop_logs",inputSchema:B,execute:async e=>{u(e,Object.keys(e).filter(n=>x.includes(n)));let o=I(e),s=await _(t,r),a=await S(t,s.logs),h=await O({clientFor:t.clientFor,oakTokenAddress:p(y.oak)},a.flatMap(n=>[n.rewardPot,...n.reserves]),{budgetMs:3e3,chopShareTokens:a.map(n=>n.log.address)}),f={...s,logs:a.map(({reserves:n,...m},d)=>{let k=h[d*3],l=L(h.slice(d*3+1,d*3+1+n.length)),P=v(l.reserves,m.paired);return{...m,rewardPot:k,poolDepth:l,priceMovePer100Usd:P,plainSummary:w(m,k,l,P)}})};return o.detail==="full"||o.fields.length?N(f,{...o,keep:["warnings"]}).shaped:b(t,f,o)}},{name:"chop_position",inputSchema:c(["log"],"chop_position"),execute:async(e,o)=>(u(e,["log"]),C(t,p(e.log),o,r))},{name:"chop_quote_unwrap",inputSchema:c(["log","amount"],"chop_quote_unwrap"),execute:async(e,o)=>(u(e,["log","amount"]),F(t,p(e.log),o,e.amount))},...Object.entries(R).map(([e,o])=>({name:e,inputSchema:c(o,e),execute:(s,a)=>T(t,e,s,a)}))],positions:(e,o)=>E(t,e,o,r)}}var ee=t=>M("chop",t.network==="testnet"?[]:[z(t)]);export{ee as createModule,z as createModulePart};
|
|
@@ -51,3 +51,16 @@ export declare const CHOP_PINS: {
|
|
|
51
51
|
readonly measuredAtBlock: "106718816";
|
|
52
52
|
readonly source: "https://rpc.mainnet.chain.robinhood.com";
|
|
53
53
|
};
|
|
54
|
+
export declare const CHOP_REFERENCE_POOL: {
|
|
55
|
+
readonly poolId: "0x8111082d181841cbd123e82bced032b1331140332b6ce3da37f53a6b24ed736c";
|
|
56
|
+
readonly stateView: "0xf3334192d15450cdd385c8b70e03f9a6bd9e673b";
|
|
57
|
+
readonly poolManager: "0x8366a39cc670b4001a1121b8f6a443a643e40951";
|
|
58
|
+
readonly key: {
|
|
59
|
+
readonly currency0: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73";
|
|
60
|
+
readonly currency1: "0x100765a16f42636Bd84EE1e86Bc5107b84bCdBA3";
|
|
61
|
+
readonly fee: 8388608;
|
|
62
|
+
readonly tickSpacing: 200;
|
|
63
|
+
readonly hooks: "0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544";
|
|
64
|
+
};
|
|
65
|
+
readonly dustV2Pool: "0x32c9b1748b914fd740054518d9322240a14b8aec";
|
|
66
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/L2AE32SL.js";import"../../../chunks/63YRSLDK.js";export{a as CHOP_PINS,b as CHOP_REFERENCE_POOL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunks/
|
|
1
|
+
import{a}from"../../../chunks/LTDF2LNP.js";import"../../../chunks/KOKLM63Q.js";import"../../../chunks/ETMD747Y.js";import"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/2GXHYI23.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as readPositions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../../../chunks/KOKLM63Q.js";import"../../../chunks/ETMD747Y.js";import"../../../chunks/K4GUZ5QS.js";import"../../../chunks/K6D6SDIG.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as DISCOVERY_TTL_MS,k as POSITION_CHUNK_SIZE,c as createReadCache,f as listLogs,h as measureLogs,i as poolDepth,m as positionAt,l as positionsAt,j as priceMovePer100Usd,o as quoteUnwrap,n as readPosition,e as redemption,g as summarizeLogs,a as tokenAmount,d as unwrapTx};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunks/
|
|
1
|
+
import{a,b,c}from"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{c as createModule,b as createModulePart,a as readClankerTokens};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"../../../chunks/XL3W7DAQ.js";import
|
|
1
|
+
import{a as d}from"../../../chunks/XL3W7DAQ.js";import"../../../chunks/2OVJ2BTJ.js";import"../../../chunks/GQITAJVF.js";import"../../../chunks/OUROA7XR.js";import{c as l}from"../../../chunks/UEHN2IDF.js";import"../../../chunks/QMNUB2GM.js";import"../../../chunks/FAH7FKUT.js";import"../../../chunks/NMJVQX5M.js";import"../../../chunks/SK2VBNAU.js";import{h as s}from"../../../chunks/KVVBT43U.js";import"../../../chunks/OVM4QIET.js";import{a as f,b as y}from"../../../chunks/3PU2SD3U.js";import{a as o}from"../../../chunks/YRSAZTTC.js";import"../../../chunks/H3E7UD2X.js";import"../../../chunks/2GXHYI23.js";import"../../../chunks/MSRCJ2BS.js";import"../../../chunks/S4JUFCT4.js";import"../../../chunks/WAKZWSHB.js";import{ta as c}from"../../../chunks/V5YSJKRH.js";import"../../../chunks/NV6FDIYT.js";import"../../../chunks/WSILNJS2.js";import"../../../chunks/7EACRKFV.js";import"../../../chunks/Y2QADJOB.js";import"../../../chunks/W7QNSNOH.js";import"../../../chunks/DCGNVMKG.js";import"../../../chunks/3PHJUFU2.js";import"../../../chunks/HZSYMGJ2.js";import"../../../chunks/LQSPWRHN.js";import"../../../chunks/GYPMUYB5.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/GK3D7OKG.js";import"../../../chunks/OIQTZOBN.js";import"../../../chunks/Z7FGEWO2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/BSX4LFYI.js";import"../../../chunks/ELHRXA5U.js";import"../../../chunks/DGDMRATN.js";import"../../../chunks/4Z3IGMU6.js";import"../../../chunks/C76D54YG.js";import"../../../chunks/TXGZ6NWN.js";import"../../../chunks/L2AE32SL.js";import"../../../chunks/VVAM3EAK.js";import"../../../chunks/P4UQGWCP.js";import{b as m}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/IOYRL6AY.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import{b as i}from"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import{b as a,k as p}from"../../../chunks/TI727O2H.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";import{erc20Abi as E}from"viem";function b(e){return{nowSec:()=>Math.floor(Date.now()/1e3),usdgBalance:async t=>e.clientFor(a).readContract({address:p,abi:E,functionName:"balanceOf",args:[t]}),ethBalance:async t=>e.clientFor(a).getBalance({address:t})}}var C='Optional USDG amount in base units (6 decimals): "1000000" = 1 USDG; defaults to the wallet USDG balance.';function x(e,t={layerbank:s(e),pendleTerms:r=>l(e,r),pendleQuoteCosts:(r,n)=>d(e,r,n)},u={}){return m("earn",[{tools:[{name:"earn_options",inputSchema:{type:"object",properties:{amount:i(C)},additionalProperties:!1},execute:async(r,n)=>o(t,{...b(e),...u},n,typeof r.amount=="string"?{amount:r.amount}:{})}]}])}export{x as createModule,c as earnCopy,o as earnOptions,y as lpWarning,f as lpWarningParts};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FoboClient {
|
|
2
|
+
call<T>(tool: string, args: Record<string, unknown>): Promise<T>;
|
|
3
|
+
close(): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createFoboClient(options?: {
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
fetch?: typeof fetch;
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
}): FoboClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../../chunks/NCAV7Q4C.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as createFoboClient};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ModuleContext, ProjectModule } from '../../types.js';
|
|
2
|
+
import { type FoboClient } from './client.js';
|
|
3
|
+
export declare const FOBO_LOCAL_REFUSAL = "FOBO tools run in the local Oak add-on. Update Oak and use prepare, then execute after a yes in chat.";
|
|
4
|
+
export interface FoboLocal {
|
|
5
|
+
client?: () => FoboClient;
|
|
6
|
+
}
|
|
7
|
+
export declare function createModule(context: ModuleContext, local?: FoboLocal): ProjectModule;
|
|
8
|
+
export { createFoboClient } from './client.js';
|
|
9
|
+
export type { FoboClient } from './client.js';
|
|
10
|
+
export { prepareFoboIntent, FOBO_ACTION_KINDS, FOBO_SCHEMAS, FOBO_ACTION_LIFETIME } from './intent.js';
|
|
11
|
+
export type { FoboIntent, FoboToolName } from './intent.js';
|
|
12
|
+
export { runFoboIntent } from './steps.js';
|
|
13
|
+
export type { FoboIo, FoboStepResult, FoboTypedData } from './steps.js';
|
|
14
|
+
export { FOBO_PINS } from './pins.js';
|
|
15
|
+
export { verifyFoboTransaction, exactApprove, exactPermit, verifySignInMessage } from './verify.js';
|
|
16
|
+
export type { FoboUnsignedTx, FoboTxExpectation } from './verify.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as E}from"../../../chunks/PHGHJ7SN.js";import{a as U,c as n,d as p,f as d,g as w,h as b,i as B,j as x,q as m}from"../../../chunks/X5I5EJ5T.js";import"../../../chunks/DFM4T6ZE.js";import{b as v,c as P,d as M,e as L}from"../../../chunks/SVKG4JOY.js";import{a as q}from"../../../chunks/4ZD5D2UP.js";import{a as f}from"../../../chunks/NCAV7Q4C.js";import"../../../chunks/BSX4LFYI.js";import{b as u}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import{j as g}from"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/MQ5F2VOK.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/TI727O2H.js";import{a as c}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";import{formatUnits as D}from"viem";var K="FOBO tools run in the local Oak add-on. Update Oak and use prepare, then execute after a yes in chat.",j={fobo_token:"get_token",fobo_portfolio:"get_portfolio",fobo_leaderboard:"get_leaderboard",fobo_claims:"get_claims",fobo_limit_orders:"list_limit_orders",fobo_quote:"quote_trade",fobo_fee_schedule:"get_fee_schedule",fobo_limit_pay_tokens:"get_limit_pay_tokens",fobo_transaction:"get_transaction"},S={fobo_browse:"Browse FOBO launches; query searches tokens and traders.",fobo_token:"Read a FOBO token, current tax, floor, pair, vesting and risks by token address.",fobo_portfolio:"Read the local wallet\u2019s FOBO positions and profit/loss.",fobo_leaderboard:"Read FOBO trader rankings and the local wallet\u2019s rank.",fobo_claims:"Read the local wallet\u2019s creator fees, referral earnings and unlocked dev buys.",fobo_limit_orders:"Read the local wallet\u2019s limit orders, or a token\u2019s order book.",fobo_quote:"Quote a FOBO buy or sell. amount is a decimal integer of input base units; no signature.",fobo_fee_schedule:"Read FOBO pool taxes, fee splits, live launch fee and launch availability.",fobo_limit_pay_tokens:"Read the currencies accepted for FOBO limit-order escrow.",fobo_transaction:"Read a FOBO transaction status by its public transaction hash.",fobo_buy:"Prepare a FOBO token buy with exact input base units. Show the summary and wait for yes before oak_execute.",fobo_sell:"Prepare a FOBO token sell with exact input base units. Show the summary and wait for yes before oak_execute.",fobo_launch:"Prepare a FOBO coin launch. Optional initial buy needs a pair-token spending cap and can be locked. Public https image URL or none. Sign-in happens only after chat yes.",fobo_limit_order:"Prepare a FOBO buy/sell limit order. amount and maxFeePerFill are base units; limitMarketCapUsd is whole USD. Show summary and ask for yes.",fobo_cancel_limit_order:"Prepare cancellation of a local-wallet FOBO order; its remaining escrow returns to the wallet. Ask for yes.",fobo_claim:"Prepare a creator, referral or vesting claim. Referral currency is pair; only referral may specify to. Show summary and ask for yes."};function J(l,_){return l.network!==void 0&&l.network!=="mainnet"?u("fobo",[]):u("fobo",[{tools:Object.keys(n).map(e=>({name:e,description:S[e],inputSchema:{...n[e],description:S[e]},execute:async(I,O)=>{if(!_)throw new c(K);let o=w(e,g(n[e],I)),r=_.client?.()??f({fetch:l.http});try{let y=p[e];if(y)return await m(r,y,o,O);let s=j[e],t={...o};if(e==="fobo_browse"&&(o.query!==void 0?(s="search",t={query:o.query}):(s="list_launches",t=o.limit===void 0?{}:{limit:o.limit})),(["fobo_portfolio","fobo_leaderboard","fobo_claims"].includes(e)||e==="fobo_limit_orders"&&!o.token)&&(t.account=O),e==="fobo_quote"){let a=String(o.payWith??"pair");a==="pair"&&(a=String(d(await r.call("get_token",{token:o.token})).pair).replace(/^\$/,"").toLowerCase());let F=o.side==="sell"?18:b(a).decimals;t.slippageBps??=50,t.payWith??="pair",t.amount=D(BigInt(String(o.amount)),F);let i=d(await r.call(s,t)),C=o.side==="sell"?b(a).decimals:18,h=B(i.amountIn,F,"quote input");if(h!==o.amount||i.side!==o.side||String(i.token).toLowerCase()!==String(o.token).toLowerCase())throw new c("FOBO quote does not match the requested trade.");let{amountIn:R,expectedOut:A,minOut:N,...T}=i,k=x(i,C,Number(o.slippageBps??50),a);return{...T,chainId:4663,amountIn:h,amountOut:k.amountOut,minAmountOut:k.minimum}}return await r.call(s,t)}finally{await r.close()}}}))}])}export{p as FOBO_ACTION_KINDS,U as FOBO_ACTION_LIFETIME,K as FOBO_LOCAL_REFUSAL,q as FOBO_PINS,n as FOBO_SCHEMAS,f as createFoboClient,J as createModule,v as exactApprove,P as exactPermit,m as prepareFoboIntent,E as runFoboIntent,M as verifyFoboTransaction,L as verifySignInMessage};
|