@oakagentkit/core 0.2.7 → 0.3.0
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/addresses.d.ts +9 -0
- package/build/dist/api/addresses.js +1 -1
- package/build/dist/api/chain.d.ts +4 -0
- package/build/dist/api/chain.js +1 -1
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/identity-link.js +1 -1
- package/build/dist/api/metadata.js +1 -1
- package/build/dist/api/modules/beefy/boosts.js +1 -1
- 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/beefy/management.js +1 -1
- package/build/dist/api/modules/beefy/vaults.js +1 -1
- package/build/dist/api/modules/borro/abi.d.ts +54 -0
- package/build/dist/api/modules/borro/abi.js +1 -1
- package/build/dist/api/modules/borro/actions.d.ts +14 -1
- package/build/dist/api/modules/borro/actions.js +1 -1
- package/build/dist/api/modules/borro/checks.js +1 -1
- package/build/dist/api/modules/borro/copy.d.ts +10 -2
- package/build/dist/api/modules/borro/copy.js +1 -1
- package/build/dist/api/modules/borro/index.js +1 -1
- package/build/dist/api/modules/borro/liquidity.js +1 -1
- package/build/dist/api/modules/borro/pins.d.ts +30 -14
- package/build/dist/api/modules/borro/pins.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/borro/types.d.ts +1 -0
- 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/clanker/extensions.js +1 -1
- package/build/dist/api/modules/clanker/index.js +1 -1
- package/build/dist/api/modules/clanker/manage.js +1 -1
- package/build/dist/api/modules/clanker/pool-config.js +1 -1
- package/build/dist/api/modules/clanker/protocol.js +1 -1
- package/build/dist/api/modules/clanker/state.js +1 -1
- package/build/dist/api/modules/earn/copy.d.ts +6 -6
- package/build/dist/api/modules/earn/copy.js +1 -1
- package/build/dist/api/modules/earn/cost.d.ts +1 -1
- package/build/dist/api/modules/earn/cost.js +1 -1
- package/build/dist/api/modules/earn/index.js +1 -1
- package/build/dist/api/modules/earn/lp.js +1 -1
- package/build/dist/api/modules/earn/options.js +1 -1
- package/build/dist/api/modules/erc8004/common.js +1 -1
- package/build/dist/api/modules/erc8004/domain.js +1 -1
- package/build/dist/api/modules/erc8004/index.js +1 -1
- package/build/dist/api/modules/erc8004/management.js +1 -1
- package/build/dist/api/modules/erc8004/reputation.js +1 -1
- package/build/dist/api/modules/erc8004/services.js +1 -1
- package/build/dist/api/modules/erc8004/thesis.d.ts +61 -0
- package/build/dist/api/modules/erc8004/thesis.js +1 -0
- package/build/dist/api/modules/erc8004/validation.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/builder-feed.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/heyresearch/token-facts.js +1 -1
- package/build/dist/api/modules/hoodag/chain-reads.js +1 -1
- package/build/dist/api/modules/hoodag/index.d.ts +12 -1
- package/build/dist/api/modules/hoodag/index.js +1 -1
- package/build/dist/api/modules/hoodag/management.js +1 -1
- package/build/dist/api/modules/hoodag/public-reads.js +1 -1
- package/build/dist/api/modules/hoodag/reconstruct.d.ts +14 -0
- package/build/dist/api/modules/hoodag/reconstruct.js +1 -1
- package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
- package/build/dist/api/modules/hoodlock/buyback.js +1 -1
- package/build/dist/api/modules/hoodlock/commerce.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/addons.js +1 -1
- package/build/dist/api/modules/hookr/agent-gate.js +1 -1
- package/build/dist/api/modules/hookr/contracts.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/read-utils.js +1 -1
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/hookr/revenue.js +1 -1
- package/build/dist/api/modules/kyberswap/index.d.ts +2 -1
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/kyberswap/source-pools.js +1 -1
- package/build/dist/api/modules/layerbank/abi.js +1 -1
- package/build/dist/api/modules/layerbank/actions.js +1 -1
- package/build/dist/api/modules/layerbank/checks.js +1 -1
- package/build/dist/api/modules/layerbank/index.js +1 -1
- package/build/dist/api/modules/layerbank/merkl.js +1 -1
- package/build/dist/api/modules/layerbank/reader.js +1 -1
- package/build/dist/api/modules/layerbank/reserve.js +1 -1
- package/build/dist/api/modules/lighter/index.js +1 -1
- package/build/dist/api/modules/longbow/administration.js +1 -1
- package/build/dist/api/modules/longbow/analytics.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/longbow/nft.js +1 -1
- package/build/dist/api/modules/longbow/rebates.js +1 -1
- package/build/dist/api/modules/longbow/staking.js +1 -1
- package/build/dist/api/modules/meridian/index.js +1 -1
- package/build/dist/api/modules/meridian/markets.js +1 -1
- package/build/dist/api/modules/meridian/predict-read.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/merkl/protocol.js +1 -1
- package/build/dist/api/modules/morpho/allocator.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.js +1 -1
- 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/vault-management.js +1 -1
- package/build/dist/api/modules/morpho/vault-tools.js +1 -1
- package/build/dist/api/modules/morpho/vault-v2.js +1 -1
- package/build/dist/api/modules/netnet/card-plan.js +1 -1
- package/build/dist/api/modules/netnet/card-policy.d.ts +1 -0
- package/build/dist/api/modules/netnet/card-policy.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/desk-read.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/netnet/staking.js +1 -1
- package/build/dist/api/modules/orbio/index.d.ts +6 -0
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/orbio/positions.js +1 -1
- package/build/dist/api/modules/pendle/costs.js +1 -1
- package/build/dist/api/modules/pendle/index.js +1 -1
- package/build/dist/api/modules/pendle/markets.js +1 -1
- package/build/dist/api/modules/pendle/positions.js +1 -1
- package/build/dist/api/modules/pendle/pricecheck.js +1 -1
- package/build/dist/api/modules/pendle/reader.js +1 -1
- package/build/dist/api/modules/pendle/redeem.js +1 -1
- package/build/dist/api/modules/pendle/trade.js +1 -1
- package/build/dist/api/modules/pendle/validate.js +1 -1
- package/build/dist/api/modules/pendle/verify.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/prices.js +1 -1
- package/build/dist/api/modules/pons/reads.js +1 -1
- 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/features.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/market.js +1 -1
- package/build/dist/api/modules/priors/pt.js +1 -1
- package/build/dist/api/modules/priors/savings-exit.js +1 -1
- package/build/dist/api/modules/priors/starter-line.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/api.js +1 -1
- package/build/dist/api/modules/relay/bootstrap.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/order.js +1 -1
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/relay/readiness.js +1 -1
- package/build/dist/api/modules/relay/reads.js +1 -1
- package/build/dist/api/modules/relay/vaults.js +1 -1
- package/build/dist/api/modules/spark/actions.js +1 -1
- package/build/dist/api/modules/spark/details.js +1 -1
- package/build/dist/api/modules/spark/index.js +1 -1
- package/build/dist/api/modules/spark/management.js +1 -1
- package/build/dist/api/modules/steakhouse/analytics.js +1 -1
- package/build/dist/api/modules/steakhouse/erc4626.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/discovery.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/upoch/copy.d.ts +5 -0
- package/build/dist/api/modules/upoch/copy.js +1 -0
- package/build/dist/api/modules/upoch/index.d.ts +8 -0
- package/build/dist/api/modules/upoch/index.js +1 -0
- package/build/dist/api/modules/upoch/pins.d.ts +8 -0
- package/build/dist/api/modules/upoch/pins.js +1 -0
- package/build/dist/api/modules/upoch/reads.d.ts +509 -0
- package/build/dist/api/modules/upoch/reads.js +1 -0
- package/build/dist/api/modules/velora/claims.js +1 -1
- package/build/dist/api/modules/velora/delta-reads.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/modules/wormhole/x402-client.d.ts +17 -1
- package/build/dist/api/modules/wormhole/x402-client.js +1 -1
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/pricenote.js +1 -1
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/pricing.js +1 -1
- package/build/dist/api/rpc.js +1 -1
- package/build/dist/api/secret-fields.d.ts +2 -0
- package/build/dist/api/secret-fields.js +1 -1
- package/build/dist/api/send.js +1 -1
- package/build/dist/api/signing-registry.js +1 -1
- package/build/dist/api/signing.js +1 -1
- package/build/dist/api/simulate.js +1 -1
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.d.ts +1 -0
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/usd-estimate.js +1 -1
- package/build/dist/chunks/23HNDJ76.js +2 -0
- package/build/dist/chunks/{JS53DQVT.js → 24Q3FNGX.js} +1 -1
- package/build/dist/chunks/{N245WC5R.js → 25C4DTVA.js} +1 -1
- package/build/dist/chunks/{PV4AK32X.js → 2HN3U6OG.js} +1 -1
- package/build/dist/chunks/{GQYV4TFO.js → 2OVJ2BTJ.js} +1 -1
- package/build/dist/chunks/{DYYEA5HB.js → 2QGLPY2D.js} +1 -1
- package/build/dist/chunks/{ZFU65MB4.js → 2WRXH6BL.js} +1 -1
- package/build/dist/chunks/{EZZM2GQT.js → 2ZBSE2LD.js} +1 -1
- package/build/dist/chunks/{HIX5N25Z.js → 2ZQ7X223.js} +1 -1
- package/build/dist/chunks/{V37L4DU4.js → 3A2IKFTV.js} +1 -1
- package/build/dist/chunks/{FWIFTPSE.js → 3PU2SD3U.js} +1 -1
- package/build/dist/chunks/{SBY4RJ7I.js → 3ZH5SOC2.js} +1 -1
- package/build/dist/chunks/4NBXBKOX.js +2 -0
- package/build/dist/chunks/{FOKEFXGP.js → 4PLLS6CT.js} +1 -1
- package/build/dist/chunks/{KREBNL2D.js → 4R3G3H42.js} +1 -1
- package/build/dist/chunks/{XHYFISVV.js → 4Z3IGMU6.js} +1 -1
- package/build/dist/chunks/{CSDN4MYP.js → 5GQJVKVY.js} +1 -1
- package/build/dist/chunks/{JOKL5L6X.js → 5R576SDB.js} +1 -1
- package/build/dist/chunks/{UUID2E22.js → 5W74Z4WZ.js} +1 -1
- package/build/dist/chunks/{EH5G4O3U.js → 65356YKW.js} +1 -1
- package/build/dist/chunks/{QFSBDPLN.js → 65OITTDL.js} +1 -1
- package/build/dist/chunks/{DSTMEY5F.js → 6F527FLN.js} +1 -1
- package/build/dist/chunks/{CO4GCF4L.js → 6MDYKE2O.js} +1 -1
- package/build/dist/chunks/{IEG6GLFR.js → 6OCLWSMZ.js} +1 -1
- package/build/dist/chunks/75SULXNT.js +1 -0
- package/build/dist/chunks/{WU7XIAXB.js → 7EACRKFV.js} +1 -1
- package/build/dist/chunks/{AMTRDPVO.js → 7U62MMUQ.js} +1 -1
- package/build/dist/chunks/{DW4V5PUY.js → 7VH6JQ2H.js} +1 -1
- package/build/dist/chunks/{XVJ7ILKK.js → A2V4NFVA.js} +1 -1
- package/build/dist/chunks/A3BJSQ23.js +1 -0
- package/build/dist/chunks/{YSMWCKIX.js → ADIPEGNN.js} +1 -1
- package/build/dist/chunks/ANIF3JMV.js +4 -0
- package/build/dist/chunks/{RLI4JDOL.js → ATEVAJ5Y.js} +1 -1
- package/build/dist/chunks/{F3VDVTMS.js → B2HSLY5F.js} +1 -1
- package/build/dist/chunks/{N4XNNXOJ.js → B7BNDW35.js} +1 -1
- package/build/dist/chunks/{GLF7WEY2.js → C6VJAL5B.js} +1 -1
- package/build/dist/chunks/{5PI57UC2.js → C76D54YG.js} +1 -1
- package/build/dist/chunks/{GRSXWQWD.js → CD2JQ32C.js} +1 -1
- package/build/dist/chunks/{4GNUXN4K.js → CI5ENLYA.js} +1 -1
- package/build/dist/chunks/{F4UQEPJT.js → CZQ2CGYV.js} +1 -1
- package/build/dist/chunks/{APHNOGNS.js → D2IYA4LP.js} +1 -1
- package/build/dist/chunks/{4RQAOOO2.js → D7QXZM3S.js} +1 -1
- package/build/dist/chunks/{TDZTC5WR.js → DBOGRUPS.js} +1 -1
- package/build/dist/chunks/{Y77EVVT4.js → DGDMRATN.js} +1 -1
- package/build/dist/chunks/{3DNJTJ2X.js → DMB64UIN.js} +1 -1
- package/build/dist/chunks/{TM7Z5SA4.js → DMDOSHV7.js} +1 -1
- package/build/dist/chunks/{WHVZ372B.js → DRLBTB4E.js} +1 -1
- package/build/dist/chunks/{FZ6IJZZM.js → E76Z2TT4.js} +1 -1
- package/build/dist/chunks/{C75MT5SD.js → EHK7CDTU.js} +1 -1
- package/build/dist/chunks/{KKPMOAVI.js → ELHRXA5U.js} +1 -1
- package/build/dist/chunks/{XCKTE4ON.js → F7MGYRPU.js} +1 -1
- package/build/dist/chunks/{MRMR4QHA.js → FAH7FKUT.js} +1 -1
- package/build/dist/chunks/{M7ZXDLKM.js → FGEGJOAA.js} +1 -1
- package/build/dist/chunks/{N6GIC7HJ.js → FN6GNTPR.js} +1 -1
- package/build/dist/chunks/{ZF2VPDRQ.js → FTMA24EC.js} +1 -1
- package/build/dist/chunks/FXOFR432.js +1 -0
- package/build/dist/chunks/{VHV6WQ5F.js → G2AA73ZE.js} +1 -1
- package/build/dist/chunks/{JWR5XVP2.js → GBIBRYOV.js} +1 -1
- package/build/dist/chunks/{FNGIJKMZ.js → GDOHHXNH.js} +1 -1
- package/build/dist/chunks/{LR4XTZ37.js → GP6YO24Z.js} +1 -1
- package/build/dist/chunks/{2OKYXT25.js → GQITAJVF.js} +1 -1
- package/build/dist/chunks/H3E7UD2X.js +1 -0
- package/build/dist/chunks/HFVXNKA5.js +1 -0
- package/build/dist/chunks/HHYE42JG.js +21 -0
- package/build/dist/chunks/{UOCRYXAB.js → HRAHGYNK.js} +1 -1
- package/build/dist/chunks/{U363GQTF.js → HS5HWBMU.js} +1 -1
- package/build/dist/chunks/{ARI72OYT.js → HVFMIURK.js} +1 -1
- package/build/dist/chunks/IBL6TL2Q.js +1 -0
- package/build/dist/chunks/{HCBX4NFM.js → IT2JLILU.js} +1 -1
- package/build/dist/chunks/{REWXG6X6.js → JDSSYT6R.js} +1 -1
- package/build/dist/chunks/{XRDXFHIK.js → JFWJBZ7M.js} +1 -1
- package/build/dist/chunks/{523ZIR3J.js → JI5DXDMY.js} +1 -1
- package/build/dist/chunks/{7QKYDNF6.js → JPPQDELB.js} +1 -1
- package/build/dist/chunks/{ZP36DSOD.js → K4P5VYDP.js} +1 -1
- package/build/dist/chunks/{32RXFUOH.js → KBU3PYP7.js} +1 -1
- package/build/dist/chunks/{BB765L75.js → KH4QFN72.js} +1 -1
- package/build/dist/chunks/{YTLH4M4Y.js → KMSAUFYV.js} +1 -1
- package/build/dist/chunks/{6UVGQYZ3.js → KOTGFD2V.js} +1 -1
- package/build/dist/chunks/{4JTTA3BX.js → KZA5GYZR.js} +1 -1
- package/build/dist/chunks/{WUT7TZYM.js → LCH6F5HT.js} +1 -1
- package/build/dist/chunks/{ARLGF5MU.js → LDJI2JAL.js} +1 -1
- package/build/dist/chunks/LEV5SNNC.js +3 -0
- package/build/dist/chunks/{SPRVVJXI.js → LFSJDFMY.js} +1 -1
- package/build/dist/chunks/{J73ATSEQ.js → LJJYYUEG.js} +1 -1
- package/build/dist/chunks/{CAWTAR5V.js → LKX5WDOQ.js} +1 -1
- package/build/dist/chunks/M7BUKZW2.js +1 -0
- package/build/dist/chunks/{C5ZZAYXD.js → MI5HZDMH.js} +1 -1
- package/build/dist/chunks/{YWZQJJYY.js → MMCM3GSM.js} +1 -1
- package/build/dist/chunks/MQ5F2VOK.js +1 -0
- package/build/dist/chunks/{TE6D3OIX.js → MSMHS456.js} +1 -1
- package/build/dist/chunks/{JKD2B6OX.js → MSRCJ2BS.js} +1 -1
- package/build/dist/chunks/{YMV5TL5C.js → N64JJN37.js} +1 -1
- package/build/dist/chunks/{JKRBGAX2.js → NAO7VWZF.js} +1 -1
- package/build/dist/chunks/ND32LJWI.js +1 -0
- package/build/dist/chunks/{RT7IU6TI.js → NMJVQX5M.js} +1 -1
- package/build/dist/chunks/{67BWOVET.js → NMQBOBWJ.js} +1 -1
- package/build/dist/chunks/NQ4MTIU3.js +1 -0
- package/build/dist/chunks/{XWKK75TO.js → NWPAQER2.js} +1 -1
- package/build/dist/chunks/O2J5I4VA.js +1 -0
- package/build/dist/chunks/{2SUHQWND.js → O4S6XAYV.js} +1 -1
- package/build/dist/chunks/{TAEZTP4L.js → O5QTITN6.js} +1 -1
- package/build/dist/chunks/{NA424YAL.js → OB7BFDOV.js} +1 -1
- package/build/dist/chunks/{GW5IXLKU.js → OI3N4EW4.js} +1 -1
- package/build/dist/chunks/{FL5SSHUL.js → OIQTZOBN.js} +1 -1
- package/build/dist/chunks/{XPEDQBLI.js → OODSXDIH.js} +1 -1
- package/build/dist/chunks/OOPMZIG7.js +1 -0
- package/build/dist/chunks/{GG24LO2R.js → OQFNUDMQ.js} +1 -1
- package/build/dist/chunks/{Q2ACLVWR.js → ORG6LVKJ.js} +1 -1
- package/build/dist/chunks/{XYPGLG6A.js → OSMOBKRQ.js} +1 -1
- package/build/dist/chunks/{EGZREEG2.js → OTLUQWLF.js} +1 -1
- package/build/dist/chunks/{OYJFXEDU.js → OTYB6BHK.js} +1 -1
- package/build/dist/chunks/{OZ5MDUD2.js → OVM4QIET.js} +1 -1
- package/build/dist/chunks/{OYPAVXGQ.js → OYDKAIS2.js} +1 -1
- package/build/dist/chunks/P6OB2AFW.js +1 -0
- package/build/dist/chunks/{UQEEF5W5.js → PDPTJMTJ.js} +1 -1
- package/build/dist/chunks/PEHXHQVA.js +1 -0
- package/build/dist/chunks/PMFR47H3.js +1 -0
- package/build/dist/chunks/{HHO5ISMM.js → PQXYTOV5.js} +1 -1
- package/build/dist/chunks/{HKVQ646Q.js → PSGRZWES.js} +1 -1
- package/build/dist/chunks/Q7L3BX6U.js +1 -0
- package/build/dist/chunks/{753HZZTY.js → QBYV7NXH.js} +1 -1
- package/build/dist/chunks/{2LWBN35N.js → QIB6OMQV.js} +1 -1
- package/build/dist/chunks/{TPEKCXVE.js → QLAOBULN.js} +1 -1
- package/build/dist/chunks/{DNNFKDZR.js → QLFPAN6S.js} +1 -1
- package/build/dist/chunks/QMEGAKLI.js +1 -0
- package/build/dist/chunks/{TK55VASJ.js → QMNUB2GM.js} +1 -1
- package/build/dist/chunks/{YUHNPUNK.js → R73R4KN3.js} +1 -1
- package/build/dist/chunks/{VR344DAZ.js → RN3WUJIO.js} +1 -1
- package/build/dist/chunks/{5HIHUYA4.js → RNCMXKKS.js} +1 -1
- package/build/dist/chunks/{ZOMFHTB2.js → ROQQ62LP.js} +1 -1
- package/build/dist/chunks/{D742AYEV.js → RUTSEGGD.js} +1 -1
- package/build/dist/chunks/{TFDPEAVZ.js → S4JUFCT4.js} +1 -1
- package/build/dist/chunks/{KDGSYNOP.js → S4UJDZGN.js} +1 -1
- package/build/dist/chunks/{AI3VAPA3.js → SMSXZ3FN.js} +1 -1
- package/build/dist/chunks/{JLRHM2DQ.js → SUNTJ6IU.js} +1 -1
- package/build/dist/chunks/{2FHELZ7Y.js → TGFQQCRY.js} +1 -1
- package/build/dist/chunks/{4JRXEN7C.js → THL4TMQW.js} +2 -2
- package/build/dist/chunks/TI727O2H.js +1 -0
- package/build/dist/chunks/{RLMVA575.js → TMRAF2L2.js} +1 -1
- package/build/dist/chunks/{PV5FDT6O.js → TXGZ6NWN.js} +1 -1
- package/build/dist/chunks/U243AWCH.js +1 -0
- package/build/dist/chunks/U762746N.js +1 -0
- package/build/dist/chunks/{GDRQ2ANN.js → U7UPLF4F.js} +1 -1
- package/build/dist/chunks/{4Q2ZBZXM.js → UPKVD7WG.js} +1 -1
- package/build/dist/chunks/{ZQAFFWDK.js → URBEK2VV.js} +1 -1
- package/build/dist/chunks/{VTPT5544.js → USEF3QKG.js} +1 -1
- package/build/dist/chunks/{U2YCQWZK.js → UVAR6BHU.js} +1 -1
- package/build/dist/chunks/{7VC53B5X.js → V5YSJKRH.js} +13 -13
- package/build/dist/chunks/{7D73A6KS.js → VB36EHIR.js} +1 -1
- package/build/dist/chunks/VMZYFO6I.js +1 -0
- package/build/dist/chunks/{UEDGYZOC.js → VVAM3EAK.js} +1 -1
- package/build/dist/chunks/VVJO6OYK.js +1 -0
- package/build/dist/chunks/{JESMX2UC.js → VXCGMALF.js} +1 -1
- package/build/dist/chunks/{ZKZUS3QU.js → VZVW5J7J.js} +1 -1
- package/build/dist/chunks/{NUFZUKYS.js → W32UECOL.js} +1 -1
- package/build/dist/chunks/{O3JWCJIF.js → W4RYRLL5.js} +1 -1
- package/build/dist/chunks/{2MZXTOZU.js → WAKZWSHB.js} +1 -1
- package/build/dist/chunks/{BAIY32AV.js → WBNFRPAT.js} +1 -1
- package/build/dist/chunks/{HM72DH4V.js → WRUTW6CG.js} +1 -1
- package/build/dist/chunks/{VYYSL557.js → WSILNJS2.js} +1 -1
- package/build/dist/chunks/{L646YWDP.js → X24YTJST.js} +1 -1
- package/build/dist/chunks/{4FPV4CRC.js → X5AL3DUK.js} +1 -1
- package/build/dist/chunks/{SOTYQGPT.js → XBNZ7GTY.js} +1 -1
- package/build/dist/chunks/{BZ34ZR65.js → XEBMS5KU.js} +1 -1
- package/build/dist/chunks/{FOD34G2H.js → XL3W7DAQ.js} +1 -1
- package/build/dist/chunks/{GSFHM5L3.js → XPWGPZ2C.js} +1 -1
- package/build/dist/chunks/{2E4I7CJ7.js → XRDLMTBJ.js} +1 -1
- package/build/dist/chunks/{SKEKXEUU.js → XV3YJ4P6.js} +1 -1
- package/build/dist/chunks/XW3VGWXK.js +1 -0
- package/build/dist/chunks/{6WD4HHID.js → Y2QADJOB.js} +1 -1
- package/build/dist/chunks/Y64GFBTA.js +1 -0
- package/build/dist/chunks/{FJLJ7ZQ5.js → YARZE7SJ.js} +1 -1
- package/build/dist/chunks/{OARVU3RC.js → YBLJ75U5.js} +1 -1
- package/build/dist/chunks/YRSAZTTC.js +7 -0
- package/build/dist/chunks/{3VBIRLU3.js → YXXK6EPI.js} +1 -1
- package/build/dist/chunks/Z3IBPCY4.js +2 -0
- package/build/dist/chunks/{H5DY7CNB.js → Z7FGEWO2.js} +1 -1
- package/build/dist/chunks/{INOYMBWE.js → ZNPVBNC5.js} +1 -1
- package/build/dist/chunks/{EVBHQQQG.js → ZTKT3ZQK.js} +1 -1
- package/build/dist/chunks/{4BVP652W.js → ZZ6FZGHF.js} +1 -1
- package/package.json +1 -1
- package/build/dist/chunks/3K2N5VFH.js +0 -1
- package/build/dist/chunks/3ZABD6ZF.js +0 -2
- package/build/dist/chunks/44MB6SA6.js +0 -1
- package/build/dist/chunks/4D4ZRZUW.js +0 -1
- package/build/dist/chunks/4OVIMYNH.js +0 -2
- package/build/dist/chunks/6NUNCD5J.js +0 -1
- package/build/dist/chunks/6PZGDVHV.js +0 -1
- package/build/dist/chunks/7MBVTNLU.js +0 -1
- package/build/dist/chunks/7VNO46LV.js +0 -1
- package/build/dist/chunks/DPE7SPW7.js +0 -1
- package/build/dist/chunks/E3RACZUY.js +0 -1
- package/build/dist/chunks/EI6GGPDS.js +0 -20
- package/build/dist/chunks/FV4WZOTD.js +0 -1
- package/build/dist/chunks/FWD4L3CJ.js +0 -1
- package/build/dist/chunks/JBTOZ6IH.js +0 -1
- package/build/dist/chunks/MVD3KWPP.js +0 -1
- package/build/dist/chunks/P6OMKZMR.js +0 -3
- package/build/dist/chunks/PXVREXCS.js +0 -1
- package/build/dist/chunks/QJNLLI6N.js +0 -1
- package/build/dist/chunks/RPB46QAC.js +0 -1
- package/build/dist/chunks/TID4C2KC.js +0 -1
- package/build/dist/chunks/UWBKAWX3.js +0 -7
- package/build/dist/chunks/WHTRPRRD.js +0 -1
- package/build/dist/chunks/WLMWWEP7.js +0 -2
- package/build/dist/chunks/XQ24RSEI.js +0 -1
- package/build/dist/chunks/YDNTY67T.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{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{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,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
|
-
import{b as X}from"./YSMWCKIX.js";import{b as Z}from"./NA424YAL.js";import{a as Y}from"./FZ6IJZZM.js";import{b as z}from"./JWR5XVP2.js";import{c as Q}from"./JLRHM2DQ.js";import{a as D,b as k,c as R,d as N,g as V,h as I,k as _,l as x,n as B,p as W,r as $,s as U,t as q,v as E,x as J,y as G}from"./V37L4DU4.js";import{a as y}from"./X5V2Z2NM.js";import{b as K}from"./SPJCSEKP.js";import{a as O}from"./43LI5NKJ.js";import{c as L,e as T,g as w}from"./NWNYJ26T.js";import{a as g,d as j}from"./XSD5NL7J.js";import{a as A}from"./JXOEJPJ4.js";import{Buffer as ee}from"node:buffer";import{decodeEventLog as ne,encodeFunctionData as H,getAddress as oe,hexToString as se,parseAbiItem as de,toEventSelector as re}from"viem";var je={register:"erc8004_register"},ce="Oak now always adds the public oak.registrar marker when it registers an agent, so tag: false and --no-tag are no longer available. Remove the option and register again. To use an agent ID you already own without the marker, link it with oak setup link <agentId>.",ge="The registration went through, but Oak could not find its oak.registrar marker on Robinhood Chain. Nothing else was sent. Ask me to check the agent with erc8004_identity.",fe="One transaction registers your agent and writes the public marker oak.registrar = oak. Anyone can see on Robinhood Chain that this agent was registered through Oak. The marker is self-reported, not proof of anything, and the transaction stays in the public history even if the marker is changed later. It needs gas.",F="https://eips.ethereum.org/EIPS/eip-8004#registration-v1",le={type:"object",required:["type","name","description","image","services","x402Support","active","registrations"],properties:{type:{const:F,description:"ERC-8004 registration-v1 profile type URI."},name:{type:"string",minLength:1,description:"Short public name for the agent."},description:{type:"string",description:"Public text describing what the agent does; may be empty."},image:{type:"string",description:"Public HTTPS or IPFS image URI without credentials."},services:{type:"array",items:{type:"object",required:["name","endpoint"]},description:"Service endpoint objects with name and endpoint; use an empty list for none."},x402Support:{type:"boolean",description:"Whether the agent supports x402 payments."},active:{type:"boolean",description:"Whether this agent is active."},registrations:{type:"array",description:"Registry references with agentRegistry and agentId; leave empty before first registration."},tags:{type:"array",items:{type:"string"},description:"Optional public text labels for the agent."},supportedTrust:{type:"array",items:{type:"string"},description:"Optional trust mechanism labels supported by the agent."}}};function ue(t){if(typeof t!="string"||!t.trim())return!1;try{let e=new URL(t);return["https:","ipfs:"].includes(e.protocol)&&!!e.hostname&&!e.username&&!e.password}catch{return!1}}var pe=t=>Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.trim()),me=t=>t.replace(/\.$/,"");function he(t,e,a,n){let{registryId:d}=I(t);if(!T(e))throw new g("Provide a registration-v1 profile object.");if(a!==void 0&&typeof a!="boolean")throw new g("The tag option must be a boolean.");let o=[],r=(i,c)=>o.push(`${i}: ${c}`);e.type!==F&&r("type",`use "${F}"`),(typeof e.name!="string"||!e.name.trim())&&r("name",'a short name for your agent, such as "Oak Agent 1"'),typeof e.description!="string"&&r("description","a sentence about what your agent does (it may be empty text)"),ue(e.image)||r("image","an HTTPS or IPFS link to a picture, with no username or password in it"),typeof e.active!="boolean"&&r("active","true or false"),typeof e.x402Support!="boolean"&&r("x402Support","true or false"),Array.isArray(e.services)?e.services.forEach((i,c)=>{try{Z(i)}catch(p){if(!(p instanceof g))throw p;r(`services item ${c+1}`,me(p.message))}}):r("services","a list of endpoints, or [] for none");for(let i of["tags","supportedTrust"])e[i]!==void 0&&!pe(e[i])&&r(i,"a list of nonempty text labels, or leave it out");if(Array.isArray(e.registrations)?e.registrations.forEach((i,c)=>{let p=`registrations item ${c+1}`;if(!T(i)||typeof i.agentRegistry!="string"||!/^eip155:[1-9][0-9]*:0x[0-9a-fA-F]{40}$/.test(i.agentRegistry))return r(p,"an agentRegistry such as eip155:4663:0x\u2026 and its agentId");let f=typeof i.agentId=="number"&&Number.isSafeInteger(i.agentId)?String(i.agentId):i.agentId,b;try{b=x(f)}catch{return r(p,'an agentId as a whole number, such as "1"')}w(i.agentRegistry,d)&&(n===void 0?r(p,"remove the entry for this registry; its ID comes from the mined Registered receipt, and erc8004_update adds it afterwards"):b!==n&&r(p,`the agentId does not match the agent being updated; use "${n}" or remove the entry`))}):r("registrations","a list, or [] before the first registration"),o.length)throw new g(`This profile needs: ${o.join("; ")}. Fix all of these and try again.`);let u=e.registrations.map(i=>({...i}));n!==void 0&&!u.some(i=>w(i.agentRegistry,d))&&u.push({agentId:n.toString(),agentRegistry:d});let s=[...new Set((e.tags??[]).filter(i=>i!==k))];a!==!1&&s.push(k);let m={...e,registrations:u,...s.length?{tags:s}:{}};s.length||delete m.tags;let l;try{if(l=JSON.stringify(m),ee.byteLength(l)>65536)throw new Error;JSON.parse(l)}catch{throw new g("Profile must be JSON data no larger than 64 KiB.")}return`data:application/json;base64,${ee.from(l,"utf8").toString("base64")}`}async function M(t,e){try{let{chainId:a,registry:n}=I(t),d=x(e),o=t.clientFor(a),r=await o.readContract({address:n,abi:y,functionName:"ownerOf",args:[d]}).catch(l=>{throw j(l)?new g(`Agent ${d} does not exist in this ERC-8004 registry: the owner lookup reverted. Check the agent ID.`):l});O(r);let[u,s,m]=await Promise.all([o.readContract({address:n,abi:y,functionName:"tokenURI",args:[d]}),o.readContract({address:n,abi:y,functionName:"getAgentWallet",args:[d]}),o.readContract({address:n,abi:y,functionName:"getMetadata",args:[d,k]})]);if(O(s),typeof u!="string"||typeof m!="string"||!/^0x([0-9a-fA-F]{2})*$/.test(m))throw new g("The registry returned invalid identity data.");return{agentId:d.toString(),chainId:a,registry:n,owner:r,uri:u,agentWallet:s,registrarMetadata:m,registryValidated:!1,summary:D}}catch(a){throw new g(t.plainError(a))}}async function Le(t,e){let a=await M(t,e);return{...a,uri:A(a.uri)}}async function ye(t,e,a,n,d,o){let{registry:r}=I(t),u=await E(t,e,a,d),s=o===void 0?"Registered":"URIUpdated",m=re(o===void 0?"Registered(uint256,string,address)":"URIUpdated(uint256,string,address)"),l=u.logs.filter(v=>w(v.address,r)&&v.topics[0]===m&&!v.removed);if(l.length!==1)throw new g(`The receipt must contain one matching ${s} event.`);let i=l[0],c=ne({abi:y,eventName:s,topics:i.topics,data:i.data,strict:!0}),p=c.args.agentId,f=c.eventName==="Registered"?c.args.agentURI:c.args.newURI,b=c.eventName==="Registered"?c.args.owner:c.args.updatedBy;if(o!==void 0&&p!==o||f!==n||!w(b,a))throw new g("The registry event does not match the expected agent, URI and wallet.");let h=await M(t,p.toString());if(h.uri!==n||o===void 0&&!w(h.owner,a))throw new g("The current agent owner or URI does not match the confirmed operation.");return h}function we(t,e){let{chainId:a,registry:n}=I(t);return t.unsignedTx({to:n,chainId:a,value:"0",data:H({abi:y,functionName:"setMetadata",args:[e,k,R]}),description:`Set mutable oak.registrar metadata to oak for agent ${e}.`})}async function te(t,e,a,n){let{registry:d}=I(t),o=x(n.agentId),r=await E(t,e,a,H({abi:y,functionName:"setMetadata",args:[o,k,R]})),u=re("MetadataSet(uint256,string,string,bytes)"),s=r.logs.filter(c=>w(c.address,d)&&c.topics[0]===u&&!c.removed);if(s.length!==1)throw new g("The receipt must contain one matching MetadataSet event.");let m=s[0],{args:l}=ne({abi:y,eventName:"MetadataSet",topics:m.topics,data:m.data,strict:!0});if(l.agentId!==o||l.metadataKey!==k||l.metadataValue!==R)throw new g("The metadata event does not match this agent and registrar marker.");let i=await M(t,n.agentId);if(i.registrarMetadata!==R||i.uri!==n.uri||!w(i.owner,n.owner))throw new g("The current agent metadata, owner or URI does not match the confirmed operation.");return i}async function be(t,e){let{chainId:a,registry:n}=I(t),d=t.clientFor(a),o=await d.readContract({address:n,abi:y,functionName:"balanceOf",args:[e]});if(o===0n)return;if(typeof o!="bigint"||o<0n)throw new g("Registry balance is unavailable; registration was not built.");let r=await d.getBlockNumber({cacheTime:0}),u=new Set;for(;;){let s=r>9999999n?r-9999999n:0n,m=await d.getLogs({address:n,event:de("event Transfer(address indexed from,address indexed to,uint256 indexed tokenId)"),args:{to:e},fromBlock:s,toBlock:r,strict:!0});for(let l of m){let i=l.args.tokenId.toString();if(l.removed||u.has(i))continue;u.add(i);let c=await M(t,i);if(w(c.owner,e))return c}if(s===0n)throw new g("Owned identity could not be located; registration was not built. Run oak setup link <agentId>.");r=s-1n}}function ke(t){if(t===void 0)return[];if(!Array.isArray(t)||t.length>15)throw new g("Provide at most 15 user metadata entries as { key, value } with value as 0x hex or text.");let e=new Set;return t.map(a=>{if(!T(a))throw new g("Provide each metadata entry as { key, value } or { key, text }.");let n=J(a.key);if(n===k)throw new g("The key oak.registrar is reserved for the registration marker. Remove that metadata entry.");if(e.has(n))throw new g(`Metadata key ${A(n)} is repeated.`);return e.add(n),{metadataKey:n,metadataValue:G(a)}})}function ie(t,e,a){let n=$(e);if(!n)return;let{registryId:d}=I(t);return Array.isArray(n.registrations)&&n.registrations.some(o=>T(o)&&typeof o.agentRegistry=="string"&&w(o.agentRegistry,d)&&String(o.agentId)===a.toString())}function Ie(t,e,a){let n=ie(t,e.uri,BigInt(e.agentId));return n===!0?{...e,profileComplete:!0}:{...e,profileComplete:n===void 0?null:!1,nextStep:{tool:"erc8004_update",arguments:{agentId:e.agentId,profile:a??"a registration-v1 profile object"},why:"The minted profile does not list its own registry and agent ID yet (registrations is empty). erc8004_update appends it automatically. It is a normal action: it needs a verified identity link and an active subscription, so link with oak_setup first."}}}async function ae(t,e,a,n){let{chainId:d,registry:o}=I(t);O(n),B(t,a.chainId);let r=e?x(a.agentId):void 0;if(!e&&(a.tag===!1||a.noTag!==void 0||a["--no-tag"]!==void 0))throw new g(ce);if(a.tag!==void 0&&typeof a.tag!="boolean")throw new g("The tag option must be a boolean.");let s=!e&&a.profile===void 0?"":he(t,a.profile,a.tag,r),m=e?[]:ke(a.metadata),l=a.tag!==!1;if(e&&a.metadataTransactionHash!==void 0&&(!l||a.transactionHash===void 0))throw new g("A metadata transaction hash requires tagging and the profile transaction hash.");let i=r!==void 0?H({abi:y,functionName:"setAgentURI",args:[r,s]}):H({abi:y,functionName:"register",args:[s,[...m,{metadataKey:k,metadataValue:R}]]}),c=f=>r===void 0?Ie(t,f,a.profile):f;if(a.transactionHash!==void 0){let f=await ye(t,a.transactionHash,n,s,i,r);if(!e){if(!w(f.registrarMetadata,R))throw new g(ge);if(a.metadataTransactionHash!==void 0)throw new g("Registration already writes oak.registrar in one transaction. Omit metadataTransactionHash.");return c(f)}return l&&a.metadataTransactionHash!==void 0?c(await te(t,a.metadataTransactionHash,n,f)):c(f)}if(!e){let f=await be(t,n);if(f){let b={...f,registrationResumed:!0},h=$(f.uri),v=Array.isArray(h?.tags)&&h.tags.includes(k);if(a.metadataTransactionHash!==void 0){if(!v)throw new g("Only a legacy Oak profile can resume its registrar metadata. Link this agent with oak setup link <agentId>.");return c({...await te(t,a.metadataTransactionHash,n,f),registrationResumed:!0})}if(!v||f.registrarMetadata!=="0x")return c(b);let S=await U(t,[we(t,x(f.agentId))],n,`Resume registrar metadata for legacy Oak agent ${f.agentId}; no new identity will be minted. Submit locally, then repeat these arguments with metadataTransactionHash to verify the marker receipt.`);return{...b,...S}}if(a.metadataTransactionHash!==void 0)throw new g("No owned legacy Oak identity was found; no metadata transaction was built.")}r!==void 0&&await q(t,r,n);let p=[t.unsignedTx({to:o,data:i,value:"0",chainId:d,description:r===void 0?"Register an ERC-8004 agent profile.":`Update ERC-8004 agent ${r} profile.`})];return e?U(t,p,n,"Submit locally, then repeat the original arguments with transactionHash to verify the profile receipt and URI. The tag option changes the profile tag only; existing onchain metadata is unchanged."):U(t,p,n,`${fe} Submit locally, then repeat the original arguments with transactionHash to verify the registration receipt, URI and marker. Update the profile registrations with the mined ID afterward.`)}async function ve(t,e){let a=await M(t,e.agentId),{chainId:n,registry:d}=I(t),o=t.clientFor(n),r=BigInt(a.agentId),u=e.metadataKeys===void 0?[]:(()=>{if(!Array.isArray(e.metadataKeys)||e.metadataKeys.length>16)throw new g("Provide at most 16 metadata keys.");return e.metadataKeys.map(h=>W(h,"metadata key",128,!1))})(),s=e.operator===void 0?void 0:oe(String(e.operator)),[m,l,...i]=await Promise.allSettled([o.readContract({address:d,abi:y,functionName:"getApproved",args:[r]}),s?o.readContract({address:d,abi:y,functionName:"isApprovedForAll",args:[a.owner,s]}):Promise.resolve(void 0),...u.map(h=>o.readContract({address:d,abi:y,functionName:"getMetadata",args:[r,h]}))]),c=h=>h.status==="fulfilled"?h.value:void 0,p=c(m),f=_(a.agentWallet)?"unset":w(a.agentWallet,a.owner)?"owner":"verified-other",b=ie(t,a.uri,r);return{...a,approved:typeof p=="string"&&_(p)?null:p??"unavailable",...s?{operator:s,operatorApproved:c(l)??"unavailable"}:{},walletState:f,walletNote:f==="unset"?"No verified payment wallet: it starts as the minting owner, and any NFT transfer or erc8004_unset_wallet clears it. Re-verify with erc8004_wallet_proof then erc8004_set_wallet.":f==="owner"?"The payment wallet is the current owner.":"The payment wallet was proven by a signature from that wallet and is not the owner.",profile:{selfRegistered:b??null,fetched:!1,note:b===void 0?"The URI is external or not decodable; Oak does not fetch it.":void 0},...u.length?{metadata:Object.fromEntries(u.map((h,v)=>{let S=c(i[v]),P=typeof S=="string"&&/^0x([0-9a-fA-F]{2})*$/.test(S)?S:void 0,C;if(P&&P!=="0x")try{C=A(se(P))}catch{C=void 0}return[A(h),{hex:P??"unavailable",...C?{text:C}:{}}]}))}:{}}}var Re={type:"object",additionalProperties:!1,required:["key"],properties:{key:{type:"string",minLength:1,maxLength:128,description:"Metadata key; agentWallet and oak.registrar are reserved during registration."},value:{...V,description:"Metadata bytes as 0x-prefixed hex; provide value or text."},text:{type:"string",description:"Metadata as UTF-8 text; provide text or value."}}},Ae=t=>{let e=(n,d,o)=>({name:n,inputSchema:d,execute:async(r,u)=>{try{let s=await o(r,u);return T(s)&&typeof s.uri=="string"?{...s,uri:A(s.uri)}:s}catch(s){throw new g(t.plainError(s))}}}),a=n=>({type:"object",additionalProperties:!1,required:n?["agentId","profile"]:[],properties:{profile:{...le,description:n?"Registration-v1 profile object to publish for this agent.":"Omit for an empty URI; register(uri, metadata[]) still writes the public oak.registrar marker. Attach a profile later with erc8004_update."},tag:{type:"boolean",default:!0,description:n?"Set false to remove the profile tag. Profile updates leave existing onchain metadata unchanged.":"Accepted only as true. Oak always adds the oak.registrar marker when it registers."},transactionHash:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:n?"Verify the exact profile transaction, event and URI.":"After local submission, verify exact registration calldata, event, URI and oak.registrar marker."},metadataTransactionHash:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:n?"Optional legacy metadata transaction hash, supplied with transactionHash to verify a previously sent two-transaction update.":"Only for a resumed legacy Oak profile: verify its separate metadata transaction without transactionHash."},...n?{agentId:N}:{noTag:{type:"boolean",description:"Removed option: omit it and register again."},"--no-tag":{type:"boolean",description:"Removed option: omit it and register again."},metadata:{type:"array",maxItems:15,items:Re,description:"Up to 15 user entries plus the mandatory oak.registrar marker. The keys agentWallet and oak.registrar are reserved."}}}});return{tools:[e("erc8004_register",a(!1),(n,d)=>ae(t,!1,n,d)),e("erc8004_update",a(!0),(n,d)=>ae(t,!0,n,d)),e("erc8004_identity",{type:"object",additionalProperties:!1,required:["agentId"],properties:{agentId:N,metadataKeys:{type:"array",maxItems:16,items:{type:"string",minLength:1,maxLength:128},description:"Also read these onchain metadata keys."},operator:{...L,description:"Also report whether this address is approved for all of the owner's agents."}}},n=>ve(t,n))]}},Ke=t=>K("erc8004",[Ae(t),Q(t),X(t),Y(t),z(t)]);export{je as a,Le as b,ie as c,Ae as d,Ke as e};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as c}from"./NWNYJ26T.js";import{a,i as l}from"./FWD4L3CJ.js";import{a as f}from"./XSD5NL7J.js";import{formatUnits as b,getAddress as d,hashTypedData as w,parseAbi as I}from"viem";var p=d("0x8BE478c754D9124D11e78dB20F5bf4dA45403275"),h=d("0x0c5091235A25bBFD3F5a009cBe04120D0CBAD573"),x=6228n,_="https://priors.trade/prove",$="https://priors.trade/invite",m=1800,k=3600,S=/^[0-9a-f]{32}$/,A=/^priors-invite:(\d{1,10}):(\d{1,12}):(0x[0-9a-fA-F]{130})$/,g=I(["function amount() view returns (uint256)","function unusedAfter() view returns (uint64)","function bonds(uint256 agentId) view returns ((address depositor, uint64 at, uint256 amount, uint256 qualifiedAt))","function releasable(uint256 agentId) view returns (bool)","function unusedReleaseAt(uint256 agentId) view returns (uint256)","function progress(uint256 agentId) view returns (uint256 repaid, uint256 needed)","function deposit(uint256 agentId)","function release(uint256 agentId)","error AlreadyBonded(uint256 agentId)","error NotOwner(uint256 agentId)","error AgentDefaulted(uint256 agentId)","error NoBond(uint256 agentId)","error NotReleasable(uint256 agentId)"]);async function E(e,t){let r=e.clientFor(a),n=await r.getBlockNumber({cacheTime:0}),[i,o,s]=await Promise.all([r.readContract({address:p,abi:g,functionName:"amount",blockNumber:n}),r.readContract({address:p,abi:g,functionName:"unusedAfter",blockNumber:n}),r.readContract({address:p,abi:g,functionName:"unusedReleaseAt",args:[t],blockNumber:n})]);if(typeof i!="bigint"||i<0n||typeof o!="bigint"||o<0n||typeof s!="bigint"||s<0n)throw new f("Priors bond terms are unavailable. Read amount, unusedAfter and unusedReleaseAt again before posting a bond.");return{amount:i.toString(),unusedAfter:o.toString(),unusedReleaseAt:s.toString(),blockNumber:n.toString(),summary:`Bond first: the starter line requires ${b(i,6)} USDG locked for at least ${o} seconds (${Number(o)/86400} days) after posting${s?`; unusedReleaseAt(${t}) is ${s} Unix seconds`:"; the exact release time is read after posting"}. Release requires no line and no open loan; default can forfeit the bond. Invites are not guaranteed. The credit score can lag qualifying repayments.`}}var R="(uint256 agentId, uint256 sponsorId, address owner, uint256 maxPremiumBps, uint256 nonce, uint256 deadline)",B=I(["function agentId() view returns (uint256)","function firstLined(uint256 id) view returns (bool)","function inviteDigest(uint256 id, uint64 expiry) view returns (bytes32)","function inviters(address who) view returns (bool)","function inviteUsed(bytes32 digest) view returns (bool)","function epochRoom() view returns (uint256)","function rules() view returns (uint256 reserveBps, uint256 firstLine, uint256 secondLine, uint256 epochCap, uint64 epochLength, uint64 minSeasoning, uint256 minQualified, uint256 minScore, uint64 idleAfter)",`function firstLine(uint256 id, uint64 expiry, bytes invite, ${R} c, bytes consentSig)`,"error NotAdopted()","error AlreadyLined(uint256 agentId)","error OwnerDefaulted(address owner)","error EpochCapReached(uint256 wanted, uint256 left)","error NotInvited(uint256 agentId, address signer)","error InviteExpired(uint256 agentId, uint64 expiry)","error InviteUsed(uint256 agentId)","error BadConsent()","error ConsentExpired()","error PremiumTooHigh(uint256 bps, uint256 cap)","error InsufficientBacking(uint256 rootId, uint256 requested, uint256 free)","error AgentDefaulted(uint256 agentId)","error IsRoot(uint256 agentId)","error V1Busy(uint256 agentId)","error LoanOpen(uint256 agentId)","error InvalidAgent(uint256 id)","error Paused()","error ECDSAInvalidSignature()","error ECDSAInvalidSignatureLength(uint256 length)","error ECDSAInvalidSignatureS(bytes32 s)"]),v={Consent:[{name:"agentId",type:"uint256"},{name:"sponsorId",type:"uint256"},{name:"owner",type:"address"},{name:"maxPremiumBps",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]};function D(){return{name:"Priors Credit",version:"2",chainId:a,verifyingContract:d(l[4663].priors.pool.address)}}function q(e){return{domain:{...D()},types:{Consent:v.Consent.map(t=>({...t}))},primaryType:"Consent",message:{agentId:e.agentId,sponsorId:x.toString(),owner:d(e.owner),maxPremiumBps:"0",nonce:e.nonce,deadline:e.deadline}}}function L(e){return w(e)}function U(e,t){return w({domain:{name:"Priors Treasury",version:"4",chainId:a,verifyingContract:h},types:{Invite:[{name:"agentId",type:"uint256"},{name:"expiry",type:"uint64"}]},primaryType:"Invite",message:{agentId:e,expiry:t}})}function O(e,t,r){return["priors.trade seat request","",`I own agent #${e} on Robinhood Chain and I am asking for a seat.`,"Asked from the priors.trade start page","","This signature only proves ownership. It sends no transaction and moves no funds.","",`request: ${t}`,`expires: ${new Date(r*1e3).toISOString().replace(".000","")}`].join(`
|
|
2
|
-
`)}var u=e=>typeof e=="string"?JSON.stringify(e.length>80?`${e.slice(0,80)}...`:e):typeof e=="number"?String(e):e===null?"null":typeof e;function V(e,t){let r=o=>({ok:!1,why:o});if(!e||typeof e!="object"||Array.isArray(e))return r("its answer is not the bot's form");let n=e;if(n.ok!==!0)return{ok:!1,refused:!0,why:typeof n.error=="string"&&n.error?n.error:"it answered no, with no reason"};if(typeof n.agentId!="string"&&typeof n.agentId!="number"||String(n.agentId)!==t.agentId)return r(`it is for agent ${u(n.agentId)}, not agent #${t.agentId}`);if(typeof n.owner!="string"||!c(n.owner,t.owner))return r(`it names ${u(n.owner)} as the agent's owner, not this wallet (${t.owner})`);if(typeof n.n!="string"||!S.test(n.n))return r(`its request ${u(n.n)} is not the bot's form (32 hex digits)`);if(typeof n.exp!="number"||!Number.isSafeInteger(n.exp))return r(`its expiry ${u(n.exp)} is not a time`);if(n.exp<=t.now)return r(`its expiry (${new Date(n.exp*1e3).toISOString()}) has already passed`);if(n.exp>t.now+m+300)return r(`its expiry (${new Date(n.exp*1e3).toISOString()}) is further away than the bot's ${m/60} minutes`);let i=O(t.agentId,n.n,n.exp);if(typeof n.message!="string")return r("it carries no message");if(n.message!==i){let o=0;for(;o<i.length&&n.message[o]===i[o];)o++;return r(`its message is not the bot's own form for agent #${t.agentId}, request ${n.n} and that expiry: the two first differ at character ${o+1} of ${i.length}`)}return{ok:!0,n:n.n,exp:n.exp,message:i}}function H(e,t,r){let n=A.exec(typeof e=="string"?e:"");if(!n)return{ok:!1,why:"it is not an invite code (priors-invite:<id>:<expiry>:<signature>)"};if(n[1]!==t)return{ok:!1,why:`it is for agent #${n[1]}, not agent #${t}`};let i=Number(n[2]);return i<=r?{ok:!1,why:`it expired at ${new Date(i*1e3).toISOString()}`}:{ok:!0,expiry:BigInt(n[2]),signature:n[3]}}var y=e=>`${new Date(e*1e3).toISOString().slice(0,16).replace("T"," ")} UTC`;function F(e){let t=typeof e.reopensAt=="number"&&Number.isSafeInteger(e.reopensAt)&&e.reopensAt>0?e.reopensAt:null;switch(e.reason){case"default":return"A default on this wallet's record stops new lines for its agents, so a bond would bring no invite.";case"day":return"Today's automatic invites are taken. New ones open at 00:00 UTC: call priors_starter_line again after that.";case"room":return e.held===!0&&t?`This week's first lines are held by invites that haven't been used yet. One may be free after ${y(t)}: call priors_starter_line again then.`:`This week's first lines are taken.${t?` New ones open after ${y(t)}: call priors_starter_line again then.`:" Come back next week."}`;case"owner":return`This wallet already used its ${typeof e.perOwner=="number"&&Number.isSafeInteger(e.perOwner)&&e.perOwner>0?e.perOwner:2} automatic invites, so a bond would bring no invite.`;case"waiting":return"Another agent of this wallet has an invite waiting. Use it, or let it expire, before asking for this one.";case"backing":return"The treasury can't back a new line right now. Try again later.";default:return"Automatic invites aren't open right now, so a bond would bring no invite. Try again later."}}export{p as a,h as b,x as c,_ as d,$ as e,m as f,k as g,S as h,A as i,g as j,E as k,B as l,v as m,D as n,q as o,L as p,U as q,O as r,V as s,H as t,F as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./E3RACZUY.js";import{fa as S}from"./EI6GGPDS.js";import{h as c,i as R,l as N,m as x}from"./NWNYJ26T.js";import{a as n}from"./XSD5NL7J.js";import{erc20Abi as y,isHex as O,keccak256 as _,parseAbi as z}from"viem";var b=z(["function asset() view returns (address)","function decimals() view returns (uint8)","function symbol() view returns (string)","function owner() view returns (address)","function curator() view returns (address)","function adaptersLength() view returns (uint256)","function adapters(uint256) view returns (address)","function parentVault() view returns (address)","function isVaultV2(address) view returns (bool)","function totalAssets() view returns (uint256)","function totalSupply() view returns (uint256)","function convertToAssets(uint256) view returns (uint256)","function previewDeposit(uint256) view returns (uint256)","function performanceFee() view returns (uint256)","function getThreshold() view returns (uint256)","function getOwners() view returns (address[])"]),i=S("setup-mismatch",{}),m=e=>N(R(e,i),i),k=e=>x(e,i);function v(e){if(typeof e!="string"||!O(e,{strict:!0})||e.length<4||e.length%2!==0)throw new n(i);return _(e)}function V(e){if(typeof e!="number"||!Number.isInteger(e)||e<0||e>255)throw new n(i);return e}function I(e,t){return typeof e=="string"&&/^[A-Za-z0-9.$_-]{1,32}$/.test(e)?e:t}async function P(e,t){if(await e.getChainId()!==d.chainId)throw new n("Borro requires chain 4663.");return k(t??await e.getBlockNumber({cacheTime:0}))}async function B(e,t,f){let a=(r,s,p=[])=>e.readContract({address:r,abi:b,functionName:s,args:p,blockNumber:f}),o={ok:!0,drift:[]};for(let r of["owner","curator"])try{o[r]=m(await a(t,r)),c(o[r],d[r])||o.drift.push(r)}catch{o.drift.push(`${r} unreadable`)}try{let r=k(await a(t,"adaptersLength"));if(r>64n)throw new n(i);let s=await Promise.all(Array.from({length:Number(r)},async(p,u)=>{let h=m(await a(t,"adapters",[BigInt(u)]));if(v(await e.getCode({address:h,blockNumber:f})),!c(await a(h,"parentVault"),t))throw new n(i);return h}));if(new Set(s).size!==s.length)throw new n(i);o.adapters=s}catch{o.drift.push("adapters unreadable or invalid")}return o}function $(e=[]){return async(t,f)=>{let a=c(f,d.assetRule.usdg.address)?{...d.assetRule.usdg,chainId:d.chainId}:e.find(o=>o.chainId===d.chainId&&c(o.address,f));return a?{...a,address:m(a.address)}:void 0}}function L(e={resolveAllowedAsset:$()}){return async(t,f,a,o={})=>{try{let r=m(f),s=await P(t,o.blockNumber),[p,u,h,A,T]=await Promise.all([t.getCode({address:d.factory.address,blockNumber:s}),t.readContract({address:d.factory.address,abi:b,functionName:"isVaultV2",args:[r],blockNumber:s}),t.getCode({address:r,blockNumber:s}),t.readContract({address:r,abi:b,functionName:"asset",blockNumber:s}),t.readContract({address:r,abi:b,functionName:"decimals",blockNumber:s})]);if(!c(v(p),d.factory.codeHash)||u!==!0||V(T)!==18)throw new n(i);let D=v(h),g=m(A),C=V(await t.readContract({address:g,abi:y,functionName:"decimals",blockNumber:s})),w;try{w=await e.resolveAllowedAsset(t,g,s)}catch{}if(w&&(!c(w.address,g)||w.chainId!==4663||w.decimals!==C||I(w.symbol,"")===""))throw new n(i);let l=await B(t,r,s);if(w||l.drift.push("asset identity is outside the available official catalogue"),l.drift.length){if(a!=="withdraw"||!o.wallet)throw new n(i);if(k(await t.readContract({address:r,abi:y,functionName:"balanceOf",args:[m(o.wallet)],blockNumber:s}))===0n)throw new n(i)}let H=I(await t.readContract({address:r,abi:y,functionName:"symbol",blockNumber:s}).catch(()=>{}),"shares");return{vault:r,symbol:w?.symbol??"token",vaultSymbol:H,asset:g,assetDecimals:C,codeHash:D,chainId:4663,shareDecimals:18,...l.owner&&{owner:l.owner},...l.curator&&{curator:l.curator},...l.adapters&&{adapters:l.adapters},setup:l,assetAllowed:!!w,mode:a,source:d.factory.source,measuredAtBlock:s.toString(),provenance:{kind:"factory",factory:d.factory.address,isVaultV2:!0}}}catch(r){throw r instanceof n?r:new n(i)}}}var G=L(),J=async(e,t,f)=>{try{let a=await P(e),[o,r,s,p]=await Promise.all([e.getCode({address:t.vault,blockNumber:a}),e.readContract({address:t.vault,abi:b,functionName:"asset",blockNumber:a}),e.readContract({address:t.vault,abi:y,functionName:"decimals",blockNumber:a}),e.readContract({address:t.asset,abi:y,functionName:"decimals",blockNumber:a})]);if(!c(v(o),t.codeHash)||!c(m(r),t.asset)||V(s)!==18||V(p)!==t.assetDecimals)throw new n(i);let u=await B(e,t.vault,a);if(t.adapters&&u.adapters&&(t.adapters.length!==u.adapters.length||t.adapters.some((h,A)=>!c(h,u.adapters[A])))&&u.drift.push("adapters changed"),f==="deposit"&&u.drift.length)throw new n(i);return u}catch(a){throw a instanceof n?a:new n(i)}};export{b as a,i as b,m as c,k as d,v as e,V as f,I as g,P as h,$ as i,L as j,G as k,J as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./A3PN3PK3.js";import{g as P}from"./NWNYJ26T.js";import{a as b}from"./FWD4L3CJ.js";import{a as t}from"./XSD5NL7J.js";import{a as A}from"./JXOEJPJ4.js";import{getAddress as w,parseAbi as L}from"viem";var v={one_hour:3600n,six_hours:21600n,one_day:86400n,seven_days:604800n,thirty_days:2592000n,ninety_days:7776000n,one_year:31536000n},g=L(["function asset() view returns (address)","function decimals() view returns (uint8)","function previewRedeem(uint256) view returns (uint256)"]);async function C(u,o,i){let a=0n,s=i.number,e=await u.getBlock({blockNumber:a});if(e.timestamp>o)throw new t("Longbow has insufficient chain history for this window.");for(let n=0;a+1n<s&&n<64;n++){let r=(a+s)/2n,c=await u.getBlock({blockNumber:r});if(c.number!==r||c.timestamp<e.timestamp||c.timestamp>i.timestamp)throw new t("Longbow historical block response is inconsistent.");c.timestamp<=o?(a=r,e=c):s=r}if(a+1n<s||e.number!==a)throw new t("Longbow historical block search exceeded its bound.");return e}async function _(u,o,i,a="six_hours"){let s=v[a];if(!Object.hasOwn(v,a)||!s)throw new t("Choose a finite Longbow APY lookback from one_hour to one_year; inception is unavailable.");let e=u.clientFor(b);if(await e.getChainId()!==b)throw new t("Longbow APY assessment requires chain 4663.");let n=await e.getBlock({blockTag:"latest"});if(n.number===null||n.timestamp<s)throw new t("Longbow has insufficient chain history for this window.");let r=await C(e,n.timestamp-s,{number:n.number,timestamp:n.timestamp}),c=10n**27n,d=await Promise.all([r,n].map(async m=>{let[S,N,Y,f]=await Promise.all([e.readContract({address:o,abi:g,functionName:"asset",blockNumber:m.number}),e.readContract({address:o,abi:g,functionName:"decimals",blockNumber:m.number}),e.readContract({address:i.address,abi:g,functionName:"decimals",blockNumber:m.number}),e.readContract({address:o,abi:g,functionName:"previewRedeem",args:[c],blockNumber:m.number})]);if(w(S)!==w(i.address)||N!==18||Y!==i.decimals||typeof f!="bigint"||f<0n||f>=1n<<256n)throw new t("Longbow historical share price or token metadata is unavailable or invalid. No zero rate was inferred.");return f})),h=n.timestamp-r.timestamp;if(h<=0n||h>s+300n)throw new t("Longbow historical blocks do not cover the requested APY window within 300 seconds.");if(d[0]===0n)throw new t("Longbow starting share price is zero; a realized APY cannot be calculated.");let l=Number(d[1]-d[0])/Number(d[0]),p=Math.expm1(Math.log1p(l)*31536e3/Number(h));if(!Number.isFinite(p))throw new t("Longbow annualized share-price change is outside the supported numeric range.");let y=await k(e,o,n.number);return{chainId:b,vault:o,asset:{...i,address:w(i.address)},shareToken:{address:o,symbol:y,decimals:18,chainId:b},source:"Oak-computed on-chain",view:"apy",stale:!1,window:{lookback:a,requestedSeconds:s.toString(),elapsedSeconds:h.toString(),fromTimestamp:r.timestamp.toString(),toTimestamp:n.timestamp.toString(),fromBlock:r.number.toString(),toBlock:n.number.toString()},sharePrice:{shareUnits:c.toString(),startAssets:d[0].toString(),endAssets:d[1].toString(),assetDecimals:i.decimals},data:{annualYieldFraction:String(p),annualYieldPercent:String(p*100),lookback:a,basis:"Oak-computed realized APY: (end share price / start share price)^(31536000 / elapsed seconds) - 1, using ERC-4626 previewRedeem at two pinned blocks."},caveat:"Historical share-price change includes what the vault accounts for in previewRedeem, excludes external rewards and gas, and is not a promised return. Archive RPC history is required; missing history is not zero APY."}}async function I(u,o,i,a){if(Object.keys(a).some(d=>!["view","lookback"].includes(d)))throw new t("Longbow APY takes a lookback, not pagination.");let s=a.lookback??"six_hours";if(typeof s!="string"||!Object.hasOwn(v,s))throw new t("Choose a finite Longbow APY lookback from one_hour to one_year; inception is unavailable.");let[e,n]=await Promise.allSettled([O(u,o,i,{view:"published_apy"}),_(u,o,i,s)]),r=e.status==="fulfilled"&&!e.value.stale?e.value:void 0;if(!r&&n.status==="rejected")throw new t(`Longbow APY is unavailable: the vendor figure is unavailable or stale, and the on-chain window could not be measured. ${u.plainError(n.reason)}`);return{...r??(n.status==="fulfilled"?n.value:void 0),view:"apy",shown:r?"Longbow vendor":"Oak-computed on-chain",realized:n.status==="fulfilled"?n.value:null,published:e.status==="fulfilled"?e.value:null,warnings:[...r?[]:["Longbow vendor APY is unavailable or stale; showing Oak-computed realized APY."],...n.status==="rejected"?["Oak-computed APY is unavailable: the archive RPC window could not be measured."]:[]]}}async function O(u,o,i,a){if(Object.keys(a).some(m=>m!=="view")||a.view!=="published_apy")throw new t("published_apy takes no historical lookback, cursor or limit.");let s=u.clientFor(b);if(await s.getChainId()!==b)throw new t("Longbow APY assessment requires chain 4663.");let[e,n]=await Promise.all([s.getBlock(),s.readContract({address:o,abi:L(["function asset() view returns (address)"]),functionName:"asset"})]);if(w(n)!==w(i.address))throw new t("Longbow vault does not use the pinned asset.");let r="https://longbow.credit/api/v2/vaults",c=await u.http(r,{method:"GET",headers:{accept:"application/json"},redirect:"error",signal:AbortSignal.timeout(15e3)});if(!c.ok)throw new t(`Longbow published APY HTTP ${c.status}; the rate is unavailable.`);let d=await c.json();if(!d||typeof d!="object"||!Number.isSafeInteger(d.asOf)||Number(d.asOf)<0||!Array.isArray(d.vaults)||d.vaults.length>100)throw new t("Longbow published APY response has an invalid timestamp or vault inventory.");let h=d.vaults.filter(m=>m&&typeof m=="object"&&typeof m.address=="string"&&P(String(m.address),o));if(h.length!==1)throw new t("Longbow published APY omitted or duplicated this vault; no zero rate is inferred.");let l=h[0];if(l.error||typeof l.asset!="string"||w(l.asset)!==w(i.address)||l.decimals!==i.decimals||typeof l.apy!="number"||!Number.isFinite(l.apy)||l.apy<-100||typeof l.apyBasis!="string"||l.apyBasis.length>64)throw new t("Longbow published APY asset, units, basis or rate is invalid.");let p=BigInt(Number(d.asOf)),y=await k(s,o,e.number);return{chainId:b,vault:o,asset:{...i,address:w(i.address)},shareToken:{address:o,symbol:y,decimals:18,chainId:b},sourceUrl:r,view:"published_apy",asOf:p.toString(),stale:e.timestamp>p+900n||p>e.timestamp+60n,data:{annualYieldPercent:String(l.apy),annualYieldFraction:String(l.apy/100),basis:A(l.apyBasis)},caveat:"Longbow publisher quote, not a realized Morpho lookback series or a promised return. The app formats this field directly as percent (0.03 means 0.03%, not 3%). No bonus, future payout or fee inclusion is inferred. Onchain book and fees remain available through longbow_details."}}export{_ as a,I as b,O as c};
|