@oakagentkit/core 0.1.2 → 0.2.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 +0 -1219
- package/build/dist/api/addresses.js +1 -1
- package/build/dist/api/amounts.d.ts +0 -1
- package/build/dist/api/amounts.js +1 -1
- package/build/dist/api/args.js +1 -1
- package/build/dist/api/canonical.d.ts +0 -1
- package/build/dist/api/canonical.js +1 -1
- package/build/dist/api/chain.d.ts +2 -0
- package/build/dist/api/chain.js +1 -1
- package/build/dist/api/deployments.d.ts +26 -0
- package/build/dist/api/deployments.js +1 -0
- package/build/dist/api/errors.js +1 -1
- package/build/dist/api/gas.js +1 -1
- package/build/dist/api/grandfather.js +1 -1
- package/build/dist/api/guards.d.ts +23 -0
- package/build/dist/api/guards.js +1 -0
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/http.js +1 -1
- package/build/dist/api/identity-link.js +1 -1
- package/build/dist/api/launch.d.ts +1 -0
- package/build/dist/api/launch.js +1 -1
- package/build/dist/api/merkle.js +1 -1
- package/build/dist/api/metadata.js +1 -1
- package/build/dist/api/module.js +1 -1
- package/build/dist/api/modules/beefy/boosts.d.ts +132 -0
- package/build/dist/api/modules/beefy/boosts.js +1 -0
- package/build/dist/api/modules/beefy/clm.d.ts +282 -0
- package/build/dist/api/modules/beefy/clm.js +1 -0
- package/build/dist/api/modules/beefy/guard.d.ts +5 -0
- package/build/dist/api/modules/beefy/guard.js +1 -0
- package/build/dist/api/modules/beefy/index.js +1 -1
- package/build/dist/api/modules/beefy/liquidity.d.ts +237 -0
- package/build/dist/api/modules/beefy/liquidity.js +1 -0
- package/build/dist/api/modules/beefy/management.d.ts +100 -0
- package/build/dist/api/modules/beefy/management.js +1 -0
- package/build/dist/api/modules/beefy/vaults.d.ts +14 -0
- package/build/dist/api/modules/beefy/vaults.js +1 -0
- package/build/dist/api/modules/clanker/extensions.d.ts +62 -0
- package/build/dist/api/modules/clanker/extensions.js +1 -0
- package/build/dist/api/modules/clanker/index.js +1 -1
- package/build/dist/api/modules/clanker/manage.d.ts +2 -0
- package/build/dist/api/modules/clanker/manage.js +1 -0
- package/build/dist/api/modules/clanker/pool-config.d.ts +96 -0
- package/build/dist/api/modules/clanker/pool-config.js +1 -0
- package/build/dist/api/modules/clanker/protocol.d.ts +2 -0
- package/build/dist/api/modules/clanker/protocol.js +1 -0
- package/build/dist/api/modules/clanker/state.d.ts +246 -0
- package/build/dist/api/modules/clanker/state.js +1 -0
- package/build/dist/api/modules/erc8004/abi.d.ts +808 -0
- package/build/dist/api/modules/erc8004/abi.js +1 -0
- package/build/dist/api/modules/erc8004/common.d.ts +69 -0
- package/build/dist/api/modules/erc8004/common.js +1 -0
- package/build/dist/api/modules/erc8004/domain.d.ts +3 -0
- package/build/dist/api/modules/erc8004/domain.js +1 -0
- package/build/dist/api/modules/erc8004/index.d.ts +3 -171
- package/build/dist/api/modules/erc8004/index.js +1 -1
- package/build/dist/api/modules/erc8004/management.d.ts +4 -0
- package/build/dist/api/modules/erc8004/management.js +1 -0
- package/build/dist/api/modules/erc8004/reputation.d.ts +3 -0
- package/build/dist/api/modules/erc8004/reputation.js +1 -0
- package/build/dist/api/modules/erc8004/services.d.ts +2 -0
- package/build/dist/api/modules/erc8004/services.js +1 -0
- package/build/dist/api/modules/erc8004/validation.d.ts +2 -0
- package/build/dist/api/modules/erc8004/validation.js +1 -0
- package/build/dist/api/modules/grove/index.js +1 -1
- package/build/dist/api/modules/heyresearch/freshness.d.ts +12 -0
- package/build/dist/api/modules/heyresearch/freshness.js +1 -0
- package/build/dist/api/modules/heyresearch/index.js +1 -1
- package/build/dist/api/modules/heyresearch/public-reads.d.ts +5 -0
- package/build/dist/api/modules/heyresearch/public-reads.js +1 -0
- package/build/dist/api/modules/hoodag/chain-reads.d.ts +33 -0
- package/build/dist/api/modules/hoodag/chain-reads.js +1 -0
- package/build/dist/api/modules/hoodag/index.d.ts +9 -1
- package/build/dist/api/modules/hoodag/index.js +1 -1
- package/build/dist/api/modules/hoodag/management.d.ts +2 -0
- package/build/dist/api/modules/hoodag/management.js +1 -0
- package/build/dist/api/modules/hoodag/public-reads.d.ts +2 -0
- package/build/dist/api/modules/hoodag/public-reads.js +1 -0
- package/build/dist/api/modules/hoodag/reconstruct.d.ts +14 -0
- package/build/dist/api/modules/hoodag/reconstruct.js +1 -0
- package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
- package/build/dist/api/modules/hoodlock/buyback.d.ts +28 -0
- package/build/dist/api/modules/hoodlock/buyback.js +1 -0
- package/build/dist/api/modules/hoodlock/commerce.d.ts +24 -0
- package/build/dist/api/modules/hoodlock/commerce.js +1 -0
- package/build/dist/api/modules/hoodlock/fee.d.ts +15 -0
- package/build/dist/api/modules/hoodlock/fee.js +1 -0
- package/build/dist/api/modules/hoodlock/guard.d.ts +5 -0
- package/build/dist/api/modules/hoodlock/guard.js +1 -0
- package/build/dist/api/modules/hoodlock/index.d.ts +4 -0
- package/build/dist/api/modules/hoodlock/index.js +1 -1
- package/build/dist/api/modules/hoodlock/lifecycle.d.ts +285 -0
- package/build/dist/api/modules/hoodlock/lifecycle.js +1 -0
- package/build/dist/api/modules/hoodlock/locks-burn.d.ts +3 -3
- package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
- package/build/dist/api/modules/hoodlock/public.d.ts +3 -0
- package/build/dist/api/modules/hoodlock/public.js +1 -0
- package/build/dist/api/modules/hookr/actions.d.ts +4 -0
- package/build/dist/api/modules/hookr/actions.js +1 -0
- package/build/dist/api/modules/hookr/addons.d.ts +4 -0
- package/build/dist/api/modules/hookr/addons.js +1 -0
- package/build/dist/api/modules/hookr/contracts.d.ts +30 -0
- package/build/dist/api/modules/hookr/contracts.js +1 -0
- package/build/dist/api/modules/hookr/create-cancel.d.ts +10 -73
- package/build/dist/api/modules/hookr/create-cancel.js +1 -1
- package/build/dist/api/modules/hookr/discovery.d.ts +3 -0
- package/build/dist/api/modules/hookr/discovery.js +1 -0
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/index.d.ts +0 -3
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/public-reads.d.ts +4 -0
- package/build/dist/api/modules/hookr/public-reads.js +1 -0
- package/build/dist/api/modules/hookr/relay.d.ts +304 -0
- package/build/dist/api/modules/hookr/relay.js +1 -0
- package/build/dist/api/modules/hookr/revenue.d.ts +5 -0
- package/build/dist/api/modules/hookr/revenue.js +1 -0
- package/build/dist/api/modules/kyberswap/index.d.ts +18 -2
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/kyberswap/source-pools.d.ts +28 -0
- package/build/dist/api/modules/kyberswap/source-pools.js +1 -0
- package/build/dist/api/modules/lighter/index.js +1 -1
- package/build/dist/api/modules/longbow/administration.d.ts +119 -0
- package/build/dist/api/modules/longbow/administration.js +1 -0
- package/build/dist/api/modules/longbow/analytics.d.ts +272 -0
- package/build/dist/api/modules/longbow/analytics.js +1 -0
- package/build/dist/api/modules/longbow/fixed.d.ts +126 -0
- package/build/dist/api/modules/longbow/fixed.js +1 -0
- package/build/dist/api/modules/longbow/index.d.ts +16 -0
- package/build/dist/api/modules/longbow/index.js +1 -1
- package/build/dist/api/modules/longbow/nft.d.ts +236 -0
- package/build/dist/api/modules/longbow/nft.js +1 -0
- package/build/dist/api/modules/longbow/rebates.d.ts +152 -0
- package/build/dist/api/modules/longbow/rebates.js +1 -0
- package/build/dist/api/modules/longbow/staking.d.ts +4 -0
- package/build/dist/api/modules/longbow/staking.js +1 -0
- 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/perps-batch.d.ts +4 -0
- package/build/dist/api/modules/meridian/perps-batch.js +1 -0
- package/build/dist/api/modules/meridian/perps-common.d.ts +56 -0
- package/build/dist/api/modules/meridian/perps-common.js +1 -0
- package/build/dist/api/modules/meridian/perps-guards.d.ts +3 -0
- package/build/dist/api/modules/meridian/perps-guards.js +1 -0
- package/build/dist/api/modules/meridian/perps-intents.d.ts +18 -0
- package/build/dist/api/modules/meridian/perps-intents.js +1 -0
- package/build/dist/api/modules/meridian/perps-stream.d.ts +3 -0
- package/build/dist/api/modules/meridian/perps-stream.js +1 -0
- package/build/dist/api/modules/meridian/perps.d.ts +3 -0
- package/build/dist/api/modules/meridian/perps.js +1 -0
- package/build/dist/api/modules/meridian/predict-read.d.ts +2 -0
- package/build/dist/api/modules/meridian/predict-read.js +1 -0
- package/build/dist/api/modules/meridian/rfq.d.ts +29 -0
- package/build/dist/api/modules/meridian/rfq.js +1 -1
- package/build/dist/api/modules/merkl/discovery.d.ts +2 -0
- package/build/dist/api/modules/merkl/discovery.js +1 -0
- package/build/dist/api/modules/merkl/index.d.ts +10 -1
- package/build/dist/api/modules/merkl/index.js +1 -1
- package/build/dist/api/modules/merkl/manage.d.ts +2 -0
- package/build/dist/api/modules/merkl/manage.js +1 -0
- package/build/dist/api/modules/merkl/protocol.d.ts +2 -0
- package/build/dist/api/modules/merkl/protocol.js +1 -0
- package/build/dist/api/modules/morpho/allocator.d.ts +308 -0
- package/build/dist/api/modules/morpho/allocator.js +1 -0
- package/build/dist/api/modules/morpho/bundles-abi.d.ts +705 -0
- package/build/dist/api/modules/morpho/bundles-abi.js +1 -0
- package/build/dist/api/modules/morpho/bundles.d.ts +3 -0
- package/build/dist/api/modules/morpho/bundles.js +1 -0
- package/build/dist/api/modules/morpho/in-kind.d.ts +85 -0
- package/build/dist/api/modules/morpho/in-kind.js +1 -0
- package/build/dist/api/modules/morpho/index.d.ts +10 -2
- package/build/dist/api/modules/morpho/index.js +1 -12
- package/build/dist/api/modules/morpho/local-guard.d.ts +26 -0
- package/build/dist/api/modules/morpho/local-guard.js +1 -0
- package/build/dist/api/modules/morpho/midnight-abi.d.ts +1690 -0
- package/build/dist/api/modules/morpho/midnight-abi.js +1 -0
- package/build/dist/api/modules/morpho/midnight.d.ts +179 -0
- package/build/dist/api/modules/morpho/midnight.js +1 -0
- package/build/dist/api/modules/morpho/protocol.d.ts +290 -0
- package/build/dist/api/modules/morpho/protocol.js +1 -0
- package/build/dist/api/modules/morpho/surface.d.ts +4 -0
- package/build/dist/api/modules/morpho/surface.js +1 -0
- package/build/dist/api/modules/morpho/vault-management.d.ts +10 -0
- package/build/dist/api/modules/morpho/vault-management.js +1 -0
- package/build/dist/api/modules/morpho/vault-tools.d.ts +6 -0
- package/build/dist/api/modules/morpho/vault-tools.js +1 -0
- package/build/dist/api/modules/morpho/vault-v2.d.ts +190 -0
- package/build/dist/api/modules/morpho/vault-v2.js +1 -0
- package/build/dist/api/modules/netnet/blackjack-hashes.d.ts +89 -0
- package/build/dist/api/modules/netnet/blackjack-hashes.js +1 -0
- package/build/dist/api/modules/netnet/card-abi.d.ts +3758 -0
- package/build/dist/api/modules/netnet/card-abi.js +1 -0
- package/build/dist/api/modules/netnet/card-plan.d.ts +43 -0
- package/build/dist/api/modules/netnet/card-plan.js +1 -0
- package/build/dist/api/modules/netnet/card-policy.d.ts +10 -0
- package/build/dist/api/modules/netnet/card-policy.js +1 -0
- package/build/dist/api/modules/netnet/card-read.d.ts +2 -0
- package/build/dist/api/modules/netnet/card-read.js +1 -0
- package/build/dist/api/modules/netnet/card-recovery.d.ts +2 -0
- package/build/dist/api/modules/netnet/card-recovery.js +1 -0
- package/build/dist/api/modules/netnet/desk-action-abi.d.ts +2 -0
- package/build/dist/api/modules/netnet/desk-action-abi.js +1 -0
- package/build/dist/api/modules/netnet/desk-action.d.ts +3 -0
- package/build/dist/api/modules/netnet/desk-action.js +1 -0
- package/build/dist/api/modules/netnet/desk-read.d.ts +5 -0
- package/build/dist/api/modules/netnet/desk-read.js +1 -0
- package/build/dist/api/modules/netnet/desk-registry.d.ts +5 -0
- package/build/dist/api/modules/netnet/desk-registry.js +1 -0
- package/build/dist/api/modules/netnet/financial-abi.d.ts +1764 -0
- package/build/dist/api/modules/netnet/financial-abi.js +1 -0
- package/build/dist/api/modules/netnet/financial.d.ts +13 -0
- package/build/dist/api/modules/netnet/financial.js +1 -0
- package/build/dist/api/modules/netnet/index.d.ts +1 -0
- package/build/dist/api/modules/netnet/index.js +1 -1
- package/build/dist/api/modules/netnet/staking.d.ts +8 -0
- package/build/dist/api/modules/netnet/staking.js +1 -0
- package/build/dist/api/modules/orbio/gateway.d.ts +24 -0
- package/build/dist/api/modules/orbio/gateway.js +1 -0
- package/build/dist/api/modules/orbio/index.d.ts +3 -1
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/orbio/pins.d.ts +457 -0
- package/build/dist/api/modules/orbio/pins.js +1 -0
- package/build/dist/api/modules/pons/claim.d.ts +33 -1
- package/build/dist/api/modules/pons/claim.js +1 -1
- package/build/dist/api/modules/pons/holder-directory.d.ts +35 -0
- package/build/dist/api/modules/pons/holder-directory.js +1 -0
- package/build/dist/api/modules/pons/index.js +1 -1
- package/build/dist/api/modules/pons/launch-status.d.ts +151 -5
- 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.d.ts +3 -0
- package/build/dist/api/modules/pons/reads.js +1 -0
- package/build/dist/api/modules/pons/swap-terms.d.ts +77 -0
- package/build/dist/api/modules/pons/swap-terms.js +1 -0
- package/build/dist/api/modules/pons/trade.d.ts +13 -2
- 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.d.ts +23 -0
- package/build/dist/api/modules/priors/coverage.js +1 -0
- package/build/dist/api/modules/priors/discovery.d.ts +4 -0
- package/build/dist/api/modules/priors/discovery.js +1 -0
- package/build/dist/api/modules/priors/features.d.ts +62 -0
- package/build/dist/api/modules/priors/features.js +1 -0
- package/build/dist/api/modules/priors/index.d.ts +9 -2
- package/build/dist/api/modules/priors/index.js +1 -1
- package/build/dist/api/modules/priors/integration.d.ts +6 -0
- package/build/dist/api/modules/priors/integration.js +1 -0
- package/build/dist/api/modules/priors/market.d.ts +10 -0
- package/build/dist/api/modules/priors/market.js +1 -0
- package/build/dist/api/modules/priors/pt.d.ts +421 -0
- package/build/dist/api/modules/priors/pt.js +1 -0
- package/build/dist/api/modules/priors/savings-exit.d.ts +85 -0
- package/build/dist/api/modules/priors/savings-exit.js +1 -0
- package/build/dist/api/modules/priors/starter-line.d.ts +495 -0
- package/build/dist/api/modules/priors/starter-line.js +1 -0
- package/build/dist/api/modules/priors/stock-swap.d.ts +101 -0
- package/build/dist/api/modules/priors/stock-swap.js +1 -0
- package/build/dist/api/modules/relay/api.d.ts +52 -0
- package/build/dist/api/modules/relay/api.js +1 -0
- package/build/dist/api/modules/relay/bootstrap.d.ts +2 -0
- package/build/dist/api/modules/relay/bootstrap.js +1 -0
- package/build/dist/api/modules/relay/discovery.d.ts +2 -0
- package/build/dist/api/modules/relay/discovery.js +1 -0
- package/build/dist/api/modules/relay/inbound.js +1 -1
- package/build/dist/api/modules/relay/index.d.ts +2 -0
- package/build/dist/api/modules/relay/index.js +1 -1
- package/build/dist/api/modules/relay/order.d.ts +2 -0
- package/build/dist/api/modules/relay/order.js +1 -0
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/relay/readiness.d.ts +5 -0
- package/build/dist/api/modules/relay/readiness.js +1 -0
- package/build/dist/api/modules/relay/reads.d.ts +3 -0
- package/build/dist/api/modules/relay/reads.js +1 -0
- package/build/dist/api/modules/relay/vaults.d.ts +24 -0
- package/build/dist/api/modules/relay/vaults.js +1 -0
- package/build/dist/api/modules/spark/actions.d.ts +2 -0
- package/build/dist/api/modules/spark/actions.js +1 -0
- package/build/dist/api/modules/spark/details.d.ts +3 -0
- package/build/dist/api/modules/spark/details.js +1 -0
- package/build/dist/api/modules/spark/index.js +1 -1
- package/build/dist/api/modules/spark/management.d.ts +7 -0
- package/build/dist/api/modules/spark/management.js +1 -0
- package/build/dist/api/modules/steakhouse/analytics.d.ts +2 -0
- package/build/dist/api/modules/steakhouse/analytics.js +1 -0
- package/build/dist/api/modules/steakhouse/erc4626.d.ts +2 -0
- package/build/dist/api/modules/steakhouse/erc4626.js +1 -0
- package/build/dist/api/modules/steakhouse/index.js +1 -1
- package/build/dist/api/modules/steakhouse/local-guard.d.ts +7 -0
- package/build/dist/api/modules/steakhouse/local-guard.js +1 -0
- package/build/dist/api/modules/steakhouse/management.d.ts +3 -0
- package/build/dist/api/modules/steakhouse/management.js +1 -0
- package/build/dist/api/modules/steakhouse/v2-exit.d.ts +19 -0
- package/build/dist/api/modules/steakhouse/v2-exit.js +1 -0
- package/build/dist/api/modules/tickerspring/basket-routes.d.ts +2 -0
- package/build/dist/api/modules/tickerspring/basket-routes.js +1 -0
- package/build/dist/api/modules/tickerspring/contract-reads.d.ts +2 -0
- package/build/dist/api/modules/tickerspring/contract-reads.js +1 -0
- package/build/dist/api/modules/tickerspring/discovery.d.ts +27 -0
- package/build/dist/api/modules/tickerspring/discovery.js +1 -0
- package/build/dist/api/modules/tickerspring/exit-preview.d.ts +14 -0
- package/build/dist/api/modules/tickerspring/exit-preview.js +1 -0
- package/build/dist/api/modules/tickerspring/guards.d.ts +7 -0
- package/build/dist/api/modules/tickerspring/guards.js +1 -0
- package/build/dist/api/modules/tickerspring/index.d.ts +80 -1
- package/build/dist/api/modules/tickerspring/index.js +1 -1
- package/build/dist/api/modules/tickerspring/journeys.d.ts +31 -0
- package/build/dist/api/modules/tickerspring/journeys.js +1 -0
- package/build/dist/api/modules/tickerspring/ladder.d.ts +8 -0
- package/build/dist/api/modules/tickerspring/ladder.js +1 -0
- package/build/dist/api/modules/tickerspring/maker.d.ts +8 -0
- package/build/dist/api/modules/tickerspring/maker.js +1 -0
- package/build/dist/api/modules/tickerspring/order-accounting.d.ts +4 -0
- package/build/dist/api/modules/tickerspring/order-accounting.js +1 -0
- package/build/dist/api/modules/tickerspring/research.d.ts +2 -0
- package/build/dist/api/modules/tickerspring/research.js +1 -0
- package/build/dist/api/modules/tickerspring/strategies.d.ts +17 -0
- package/build/dist/api/modules/tickerspring/strategies.js +1 -0
- package/build/dist/api/modules/uniswap/auction-create.d.ts +112 -0
- package/build/dist/api/modules/uniswap/auction-create.js +1 -0
- package/build/dist/api/modules/uniswap/auction.d.ts +212 -0
- package/build/dist/api/modules/uniswap/auction.js +1 -0
- package/build/dist/api/modules/uniswap/batch.d.ts +22 -0
- package/build/dist/api/modules/uniswap/batch.js +1 -0
- package/build/dist/api/modules/uniswap/common.d.ts +12 -0
- package/build/dist/api/modules/uniswap/common.js +1 -0
- package/build/dist/api/modules/uniswap/fees.d.ts +54 -0
- package/build/dist/api/modules/uniswap/fees.js +1 -0
- package/build/dist/api/modules/uniswap/index.d.ts +2 -1
- package/build/dist/api/modules/uniswap/index.js +1 -1
- package/build/dist/api/modules/uniswap/local-guard.d.ts +16 -0
- package/build/dist/api/modules/uniswap/local-guard.js +1 -0
- package/build/dist/api/modules/uniswap/oracle.d.ts +2 -0
- package/build/dist/api/modules/uniswap/oracle.js +1 -0
- package/build/dist/api/modules/uniswap/pool-math.d.ts +13 -0
- package/build/dist/api/modules/uniswap/pool-math.js +1 -0
- package/build/dist/api/modules/uniswap/pools.d.ts +30 -0
- package/build/dist/api/modules/uniswap/pools.js +1 -0
- package/build/dist/api/modules/uniswap/position.d.ts +69 -0
- package/build/dist/api/modules/uniswap/position.js +1 -0
- package/build/dist/api/modules/uniswap/protocol.d.ts +154 -0
- package/build/dist/api/modules/uniswap/protocol.js +1 -0
- package/build/dist/api/modules/uniswap/token-jar.d.ts +52 -0
- package/build/dist/api/modules/uniswap/token-jar.js +1 -0
- package/build/dist/api/modules/uniswap/trade-batch.d.ts +2 -0
- package/build/dist/api/modules/uniswap/trade-batch.js +1 -0
- package/build/dist/api/modules/uniswap/trade.d.ts +406 -0
- package/build/dist/api/modules/uniswap/trade.js +1 -0
- package/build/dist/api/modules/uniswap/v2.d.ts +180 -0
- package/build/dist/api/modules/uniswap/v2.js +1 -0
- package/build/dist/api/modules/uniswap/v3.d.ts +23 -2
- package/build/dist/api/modules/uniswap/v3.js +1 -1
- package/build/dist/api/modules/uniswap/v4.d.ts +17 -28
- package/build/dist/api/modules/uniswap/v4.js +1 -1
- package/build/dist/api/modules/uniswap/wrap.d.ts +17 -0
- package/build/dist/api/modules/uniswap/wrap.js +1 -0
- package/build/dist/api/modules/velora/claims.d.ts +86 -0
- package/build/dist/api/modules/velora/claims.js +1 -0
- package/build/dist/api/modules/velora/delta-reads.d.ts +2 -0
- package/build/dist/api/modules/velora/delta-reads.js +1 -0
- package/build/dist/api/modules/velora/index.js +1 -1
- package/build/dist/api/owner-signature.d.ts +29 -0
- package/build/dist/api/owner-signature.js +1 -0
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/pricenote.d.ts +0 -1
- package/build/dist/api/pricenote.js +1 -1
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/pricing.d.ts +1 -14
- package/build/dist/api/pricing.js +1 -1
- package/build/dist/api/routes.d.ts +2 -0
- package/build/dist/api/routes.js +1 -1
- package/build/dist/api/rpc.d.ts +23 -0
- package/build/dist/api/rpc.js +1 -0
- package/build/dist/api/secret-fields.js +1 -1
- package/build/dist/api/send.js +1 -1
- package/build/dist/api/signing-registry.d.ts +19 -0
- package/build/dist/api/signing-registry.js +1 -0
- package/build/dist/api/signing.d.ts +162 -0
- package/build/dist/api/signing.js +1 -0
- package/build/dist/api/simulate.js +1 -1
- package/build/dist/api/swap.d.ts +61 -27
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.d.ts +5 -0
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.d.ts +6 -0
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/tx.js +1 -1
- package/build/dist/api/types.d.ts +2 -0
- package/build/dist/api/vendor-limits.js +1 -1
- package/build/dist/chunks/2EDXKJ3B.js +1 -0
- package/build/dist/chunks/2NA6JLEC.js +1 -0
- package/build/dist/chunks/2SNQWKHA.js +1 -0
- package/build/dist/chunks/3ACEWCKZ.js +1 -0
- package/build/dist/chunks/3CCBUYUM.js +1 -0
- package/build/dist/chunks/3RFSGU2Y.js +1 -0
- package/build/dist/chunks/46ZA2R5L.js +1 -0
- package/build/dist/chunks/4IPW5WZ4.js +1 -0
- package/build/dist/chunks/53N7PNJH.js +1 -0
- package/build/dist/chunks/55NX776C.js +1 -0
- package/build/dist/chunks/5EHQM6DM.js +1 -0
- package/build/dist/chunks/5FTSKYQH.js +1 -0
- package/build/dist/chunks/5HW6JKME.js +1 -0
- package/build/dist/chunks/5VXNQFYJ.js +1 -0
- package/build/dist/chunks/5XFXH2JT.js +1 -0
- package/build/dist/chunks/5YS5V2LK.js +1 -0
- package/build/dist/chunks/64AF7ECA.js +1 -0
- package/build/dist/chunks/65QFM4JU.js +1 -0
- package/build/dist/chunks/67TJOOBI.js +1 -0
- package/build/dist/chunks/6HV5BR7P.js +1 -0
- package/build/dist/chunks/{A5ITAEUQ.js → 6IM6A5VA.js} +1 -1
- package/build/dist/chunks/6JCEJ66K.js +1 -0
- package/build/dist/chunks/6LLOTPH2.js +1 -0
- package/build/dist/chunks/6NR7SVRO.js +1 -0
- package/build/dist/chunks/6PU2CMQZ.js +1 -0
- package/build/dist/chunks/6SCCW74G.js +1 -0
- package/build/dist/chunks/73N3TOJL.js +1 -0
- package/build/dist/chunks/74BPMUAG.js +1 -0
- package/build/dist/chunks/7B5UH2VS.js +1 -0
- package/build/dist/chunks/7BTELNNI.js +1 -0
- package/build/dist/chunks/7LDAJ6BM.js +1 -0
- package/build/dist/chunks/7MR37STI.js +1 -0
- package/build/dist/chunks/7T4BYFD4.js +1 -0
- package/build/dist/chunks/7US6PD56.js +1 -0
- package/build/dist/chunks/7YU6DELJ.js +1 -0
- package/build/dist/chunks/7Z5IM2QZ.js +1 -0
- package/build/dist/chunks/A25P24G2.js +1 -0
- package/build/dist/chunks/AFHHRDPJ.js +1 -0
- package/build/dist/chunks/ANQ43XJA.js +1 -0
- package/build/dist/chunks/{UCMNB2UP.js → AXYOJBX6.js} +1 -1
- package/build/dist/chunks/AYM5L6L7.js +1 -0
- package/build/dist/chunks/BFVLBENV.js +1 -0
- package/build/dist/chunks/BV3AHLH5.js +1 -0
- package/build/dist/chunks/BXN3MDS4.js +1 -0
- package/build/dist/chunks/BYXBS45D.js +1 -0
- package/build/dist/chunks/C2FEXLMA.js +1 -0
- package/build/dist/chunks/C3TJLARP.js +1 -0
- package/build/dist/chunks/C3ZZSGSP.js +1 -0
- package/build/dist/chunks/CAU44UWP.js +1 -0
- package/build/dist/chunks/CBA776XQ.js +1 -0
- package/build/dist/chunks/CCEWSOBT.js +1 -0
- package/build/dist/chunks/CEQNXF6A.js +1 -0
- package/build/dist/chunks/{6SYTB6FB.js → D3OWLDVB.js} +1 -1
- package/build/dist/chunks/D6VP3N27.js +3 -0
- package/build/dist/chunks/DHXVYHT4.js +1 -0
- package/build/dist/chunks/DLIOZCEG.js +1 -0
- package/build/dist/chunks/EA6IYKIB.js +1 -0
- package/build/dist/chunks/EC5W3UZD.js +1 -0
- package/build/dist/chunks/{B4MLWDPM.js → EG6M6SSO.js} +1 -1
- package/build/dist/chunks/EVANKNJV.js +1 -0
- package/build/dist/chunks/EYYUWFUR.js +1 -0
- package/build/dist/chunks/F2YH72GF.js +1 -0
- package/build/dist/chunks/F3TJCOVV.js +1 -0
- package/build/dist/chunks/F6WBPPBN.js +1 -0
- package/build/dist/chunks/FSPNOVKB.js +1 -0
- package/build/dist/chunks/G4PDM3MX.js +1 -0
- package/build/dist/chunks/G7UKNO2I.js +1 -0
- package/build/dist/chunks/GHDDVBPK.js +1 -0
- package/build/dist/chunks/GSI5COTD.js +1 -0
- package/build/dist/chunks/GZ5TW3WB.js +1 -0
- package/build/dist/chunks/H4S2ZCWK.js +1 -0
- package/build/dist/chunks/H6ED3RHF.js +1 -0
- package/build/dist/chunks/HFQS5344.js +1 -0
- package/build/dist/chunks/{Y3P6SUNL.js → HIMVOTIU.js} +1 -1
- package/build/dist/chunks/HL2MLC3O.js +1 -0
- package/build/dist/chunks/HNMOB76J.js +1 -0
- package/build/dist/chunks/HQVC6X3T.js +1 -0
- package/build/dist/chunks/HRG2VVPY.js +1 -0
- package/build/dist/chunks/IHGVCPVA.js +2 -0
- package/build/dist/chunks/ITV52TIE.js +1 -0
- package/build/dist/chunks/IUXOUKQN.js +1 -0
- package/build/dist/chunks/IWALIX7Q.js +1 -0
- package/build/dist/chunks/JC4SYMBV.js +18 -0
- package/build/dist/chunks/JREVERSC.js +1 -0
- package/build/dist/chunks/JRO6WTK4.js +1 -0
- package/build/dist/chunks/JRVTSGAT.js +1 -0
- package/build/dist/chunks/K463HFGC.js +1 -0
- package/build/dist/chunks/KQFDLDHL.js +1 -0
- package/build/dist/chunks/L24EOVLT.js +1 -0
- package/build/dist/chunks/LBEMCOND.js +1 -0
- package/build/dist/chunks/LI7FYINH.js +1 -0
- package/build/dist/chunks/MRWCFTMS.js +1 -0
- package/build/dist/chunks/MYBDO5SA.js +1 -0
- package/build/dist/chunks/N6RL3SUZ.js +1 -0
- package/build/dist/chunks/N77ANGBT.js +1 -0
- package/build/dist/chunks/{SJ7HDRI4.js → NBRMUFJP.js} +1 -1
- package/build/dist/chunks/NCQFWPAW.js +1 -0
- package/build/dist/chunks/NHCRJC5X.js +1 -0
- package/build/dist/chunks/NIOBE2LK.js +1 -0
- package/build/dist/chunks/NMFVXBTL.js +1 -0
- package/build/dist/chunks/NO57NGRV.js +1 -0
- package/build/dist/chunks/O47JXRXN.js +1 -0
- package/build/dist/chunks/O5SU2I3G.js +1 -0
- package/build/dist/chunks/{GIBF3YJO.js → OG5HRQU4.js} +1 -1
- package/build/dist/chunks/OJLMF5AR.js +1 -0
- package/build/dist/chunks/OJMYESQU.js +1 -0
- package/build/dist/chunks/OW7GOYKA.js +1 -0
- package/build/dist/chunks/P4UQGWCP.js +1 -0
- package/build/dist/chunks/PJ65ZOQ7.js +1 -0
- package/build/dist/chunks/Q2VMH2LB.js +1 -0
- package/build/dist/chunks/QCD33HMD.js +1 -0
- package/build/dist/chunks/QHHZDXRG.js +1 -0
- package/build/dist/chunks/QNPEKNWM.js +1 -0
- package/build/dist/chunks/QQWF6A4P.js +1 -0
- package/build/dist/chunks/QRUC7EFE.js +1 -0
- package/build/dist/chunks/QYKXWBZC.js +1 -0
- package/build/dist/chunks/QZM7CWZW.js +1 -0
- package/build/dist/chunks/QZTUMSQY.js +1 -0
- package/build/dist/chunks/R7D256HG.js +1 -0
- package/build/dist/chunks/RETS2ZEK.js +1 -0
- package/build/dist/chunks/RFJCG4NA.js +1 -0
- package/build/dist/chunks/RRSODRGT.js +1 -0
- package/build/dist/chunks/RTBOMWCB.js +1 -0
- package/build/dist/chunks/SDICP7BT.js +1 -0
- package/build/dist/chunks/SLSPWXR6.js +1 -0
- package/build/dist/chunks/SPRVVJXI.js +1 -0
- package/build/dist/chunks/SQ5BNSXR.js +1 -0
- package/build/dist/chunks/SQH7A4O3.js +1 -0
- package/build/dist/chunks/SXX52Y27.js +1 -0
- package/build/dist/chunks/T3NPRRTY.js +1 -0
- package/build/dist/chunks/T6MTTMLQ.js +1 -0
- package/build/dist/chunks/TAI63P6E.js +1 -0
- package/build/dist/chunks/TCS3ICNE.js +2 -0
- package/build/dist/chunks/TNRDCBGO.js +1 -0
- package/build/dist/chunks/TRCP7X5P.js +1 -0
- package/build/dist/chunks/TWR7BF72.js +1 -0
- package/build/dist/chunks/U3FMCX3L.js +1 -0
- package/build/dist/chunks/UIIJWIR6.js +1 -0
- package/build/dist/chunks/UMK564HS.js +1 -0
- package/build/dist/chunks/UPPYXY74.js +1 -0
- package/build/dist/chunks/UWOFA6GV.js +1 -0
- package/build/dist/chunks/UXG67LH3.js +1 -0
- package/build/dist/chunks/V6SDKPZS.js +1 -0
- package/build/dist/chunks/{GDP4JSAX.js → VJ3W2V3B.js} +1 -1
- package/build/dist/chunks/{BOFA26WU.js → VXLJRRKV.js} +1 -1
- package/build/dist/chunks/VY3P34PY.js +1 -0
- package/build/dist/chunks/WCKMQFGS.js +1117 -0
- package/build/dist/chunks/WDGPCPQJ.js +1 -0
- package/build/dist/chunks/WIDTTGSH.js +1 -0
- package/build/dist/chunks/WQZLYX64.js +1 -0
- package/build/dist/chunks/X5V2Z2NM.js +1 -0
- package/build/dist/chunks/XKRWJCYE.js +1 -0
- package/build/dist/chunks/XPFVT2EA.js +1 -0
- package/build/dist/chunks/XV6F3RET.js +1 -0
- package/build/dist/chunks/XW7RH7YY.js +1 -0
- package/build/dist/chunks/Y2IWPNEW.js +1 -0
- package/build/dist/chunks/YHPOXAKA.js +1 -0
- package/build/dist/chunks/YR3QJVJQ.js +1 -0
- package/build/dist/chunks/ZCGVBK5K.js +1 -0
- package/build/dist/chunks/ZGXNTWYG.js +1 -0
- package/build/dist/chunks/ZPM2MFXZ.js +1 -0
- package/build/dist/chunks/ZT67OMLW.js +1 -0
- package/build/dist/chunks/ZYR5LSVB.js +1 -0
- package/package.json +13 -9
- package/build/dist/chunks/2IRORNOH.js +0 -1
- package/build/dist/chunks/3PA2XT75.js +0 -1
- package/build/dist/chunks/52TGAWSI.js +0 -1
- package/build/dist/chunks/66DWJWDA.js +0 -1
- package/build/dist/chunks/73EABRFC.js +0 -1
- package/build/dist/chunks/A5KSG6LW.js +0 -1
- package/build/dist/chunks/B4FOHEBE.js +0 -1
- package/build/dist/chunks/BHR46XNW.js +0 -3
- package/build/dist/chunks/CQNZWL7F.js +0 -1
- package/build/dist/chunks/GN4QZ4JA.js +0 -1
- package/build/dist/chunks/I5CQ64EU.js +0 -1
- package/build/dist/chunks/ICCJ3TOO.js +0 -1
- package/build/dist/chunks/KL5YE7JA.js +0 -1
- package/build/dist/chunks/KVVTKM6E.js +0 -1
- package/build/dist/chunks/M6JGTQRY.js +0 -1
- package/build/dist/chunks/MK6L6TGI.js +0 -1
- package/build/dist/chunks/MOVRI5IV.js +0 -1
- package/build/dist/chunks/NA7HV7BR.js +0 -1
- package/build/dist/chunks/NGAI6GTU.js +0 -1
- package/build/dist/chunks/OBX7IZG5.js +0 -1
- package/build/dist/chunks/OSQ4AAM2.js +0 -2
- package/build/dist/chunks/OWEUVFB6.js +0 -1
- package/build/dist/chunks/P4G3EKF7.js +0 -1
- package/build/dist/chunks/QGDHMVPE.js +0 -1
- package/build/dist/chunks/SPAKOCR7.js +0 -1
- package/build/dist/chunks/T6O2L6HF.js +0 -1
- package/build/dist/chunks/TEVKPJV5.js +0 -1
- package/build/dist/chunks/YX4NVVSX.js +0 -1
- package/build/dist/chunks/ZUC6ILK2.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as q}from"./SDICP7BT.js";import{b as S}from"./46ZA2R5L.js";import{b as le}from"./AXYOJBX6.js";import{a as _}from"./6IM6A5VA.js";import{g as B,i as ue}from"./73N3TOJL.js";import{a as H}from"./RETS2ZEK.js";import{a as u,i as N}from"./XPFVT2EA.js";import{a as c}from"./5YS5V2LK.js";import{a as ce}from"./JXOEJPJ4.js";import{encodeFunctionData as z,erc20Abi as me,getAddress as m,isAddress as he,parseAbi as U,zeroAddress as ke}from"viem";var T=m(N[u].hoodlock.locker.address),C=m(N[u].hoodlock.burner.address),v=m(N[u].hoodlock.liquidityLocker.address),j=m(N[u].uniswap.v3_position_manager.address),K=m(N[u].uniswap.v4_position_manager.address),qe="0x000000000000000000000000000000000000dEaD",Ae=3153600000n,Te=1000000000000n,fe=65535,D=U(["function fee() view returns (uint256)","function lock(address token, uint256 amount, uint256 unlockTime) payable returns (uint256 lockId)","function getLock(uint256 lockId) view returns (address owner, address token, uint256 amount, uint256 unlockTime, bool withdrawn)","function locksByOwner(address owner) view returns (uint256[])","function locksByToken(address token) view returns (uint256[])"]),ee=U(["function fee() view returns (uint256)","function burn(address token, uint256 amount) payable returns (uint256 burnId)","function DEAD() view returns (address)","function getBurn(uint256 burnId) view returns (address burner, address token, uint256 amount, uint256 timestamp)","function totalBurnedOf(address token) view returns (uint256)"]),O=U(["function fixedFee() view returns (uint256)","function collectFeeBps() view returns (uint16)","function paused() view returns (bool)","function lock(address manager, uint256 tokenId, uint256 unlockTime, address feeRecipient, bool acceptUnverifiedHook, uint16 maxCollectFeeBps) payable returns (uint256 lockId)","function lockIdOf(address manager, uint256 tokenId) view returns (uint256)","function getLock(uint256 lockId) view returns (address owner, uint40 unlockTime, uint16 collectFeeBps, bool isV4, bool hookVerified, bool withdrawn, address feeRecipient, address token0, address token1, uint256 tokenId)","function locksOf(address owner) view returns (uint256[])"]),ye=U(["function approve(address to, uint256 tokenId)"]);function $e(e,o,t){let a=o.trim();if(a.startsWith("-")){let k=a.slice(1),i=e(k,t);return i==="0"?"0":`-${i}`}return e(a,t)}function pe(e,o){return o.length===0?"no ERC-20 transfer deltas":o.map(t=>`${$e(e.formatAmount,t.amount,t.token.decimals)} ${t.token.symbol}`).join(", ")}function E(e,o="token"){if(typeof e!="string"||!e.trim())throw new c(`Provide a valid ${o} contract address.`);if(!he(e,{strict:!1}))throw new c(`Identify ${o} by chain and contract address, not by symbol.`);return m(e)}async function W(e,o){try{return await o()}catch(t){throw new c(e.plainError(t))}}function we(e){if(typeof e!="string")throw new c("Amount must be a non-negative integer string in base units.");let o=H(e);if(o<=0n)throw new c("Amount must be greater than zero.");return o}async function ge(e){let o=await e.getBlock();if(!o||typeof o.timestamp!="bigint")throw new c("Could not read the current chain timestamp. Please try again.");return o.timestamp}function ve(e,o){if(typeof e!="string"||!/^\d+$/.test(e.trim()))throw new c("unlockTime must be a non-negative integer string in Unix seconds.");let t=BigInt(e.trim());if(t>=Te)throw new c("unlockTime appears to be in milliseconds; provide Unix seconds at most 100 years (3153600000 seconds) in the future.");if(t<=o)throw new c(`unlockTime (${t}) must be in the future (greater than current timestamp ${o}).`);let a=o+Ae;if(t>a)throw new c(`unlockTime (${t}) exceeds the 100-year maximum lock duration (3153600000 seconds; max ${a}).`);return t}async function oe(e,o,t=u){let a=m(o),[k,i]=await Promise.all([e.readContract({address:a,abi:me,functionName:"symbol"}),e.readContract({address:a,abi:me,functionName:"decimals"})]);return{address:a,symbol:ce(String(k)),decimals:Number(i),chainId:t}}function Se(e,o){if(e==null)return o;let t=typeof e=="number"?e:typeof e=="string"&&/^\d+$/.test(e.trim())?Number(e.trim()):NaN;if(!Number.isInteger(t)||t<0||t>fe)throw new c("maxCollectFeeBps must be an integer between 0 and 65535.");if(t<o)throw new c(`Live collectFeeBps (${o}) exceeds maxCollectFeeBps (${t}): collect fee changed.`);return Math.min(t,o)}function Le(e){return e.tokenId!==void 0||e.manager!==void 0||e.feeRecipient!==void 0||e.maxCollectFeeBps!==void 0||e.acceptUnverifiedHook!==void 0||e.kind==="v3"||e.kind==="lp"||e.kind==="v4"||e.version==="v3"||e.version==="v4"}async function xe(e,o,t){_(t);let a=m(t),k=o.kind==="v4"||o.version==="v4",i=o.manager!==void 0?E(o.manager,"manager"):k?K:j,g=i===K;if(i!==j&&!g)throw new c(`Unsupported position manager ${i}; use the configured Uniswap v3 or v4 manager.`);if(k&&!g||g&&(o.kind==="v3"||o.version==="v3"))throw new c("The requested version disagrees with the position manager.");if(o.acceptUnverifiedHook!==void 0&&typeof o.acceptUnverifiedHook!="boolean")throw new c("acceptUnverifiedHook must be a boolean.");let b=o.acceptUnverifiedHook===!0;if(!g&&b)throw new c("Uniswap v3 has no hooks; omit acceptUnverifiedHook.");let s=g?"v4":"v3";if(typeof o.tokenId!="string")throw new c("Provide an NFT tokenId as a decimal string.");let f=String(o.tokenId).trim(),d=H(f),l=ue(o.feeRecipient,"Provide an explicit feeRecipient address for LP position locks."),p=e.clientFor(u),[x,I,h]=await Promise.all([ge(p),p.readContract({address:v,abi:O,functionName:"fixedFee"}),p.readContract({address:v,abi:O,functionName:"collectFeeBps"})]),y,$=!0;if(g){let P=U(["function getPoolAndPositionInfo(uint256 tokenId) view returns ((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey, uint256 info)","function getPositionLiquidity(uint256 tokenId) view returns (uint128)","function ownerOf(uint256 tokenId) view returns (address)"]),[Y,J,M]=await Promise.all([p.readContract({address:i,abi:P,functionName:"getPoolAndPositionInfo",args:[d]}),p.readContract({address:i,abi:P,functionName:"getPositionLiquidity",args:[d]}),p.readContract({address:i,abi:P,functionName:"ownerOf",args:[d]})]);if(m(M)!==a)throw new c("This wallet does not own that v4 position NFT.");if(J<=0n)throw new c("The v4 position has no liquidity to lock.");if(y=m(Y[0].hooks),$=y===ke||await p.readContract({address:v,abi:U(["function hookAllowed(address) view returns (bool)"]),functionName:"hookAllowed",args:[y]}),!$&&!b)throw new c(`Unverified v4 hook ${y}; review its risks and explicitly set acceptUnverifiedHook: true to proceed.`)}let A=ve(o.unlockTime,x),n=BigInt(I),r=Number(h);if(!Number.isInteger(r)||r<0||r>fe)throw new c(`Invalid on-chain collectFeeBps (${String(h)}).`);if(o.maxFee!==void 0){let P=H(String(o.maxFee));if(n>P)throw new c(`Live fixedFee (${n}) exceeds maxFee (${P}).`)}let w=Se(o.maxCollectFeeBps,r),L=(r/100).toString(),R=e.unsignedTx({to:i,data:z({abi:ye,functionName:"approve",args:[v,d]}),value:"0",chainId:u,description:`Approve Uniswap ${s} position NFT #${d} on ${i} for HoodLock LiquidityLocker ${v}.`}),F=e.unsignedTx({to:v,data:z({abi:O,functionName:"lock",args:[i,d,A,l,b,w]}),value:n.toString(),chainId:u,description:`Lock Uniswap ${s} NFT #${d} in HoodLock LiquidityLocker (${v}) until ${A} with feeRecipient ${l}, upfront fixedFee ${e.formatAmount(n.toString(),S.decimals)} ETH (${n} wei), and ongoing collect fee ${r} bps (${L}% of collected LP fees, frozen per lock).`}),X=[R,F],V=await e.preview(X,a),Q=`Approve and lock Uniswap ${s} NFT #${d} (manager ${i}) in HoodLock LiquidityLocker ${v} until Unix ${A}. Upfront fixedFee: ${e.formatAmount(n.toString(),S.decimals)} ETH (${n} wei). Ongoing LP fee share: ${r} bps (${L}% of collected LP fees, frozen per lock; maxCollectFeeBps=${w}) with feeRecipient ${l}. V4 hook: ${y??"none"}, reviewed: ${$}; acceptUnverifiedHook=${b}.`;return q(e,{txs:V.txs,summary:Q,preview:V,kind:s,contract:v,manager:i,tokenId:d.toString(),unlockTime:A.toString(),feeRecipient:l,acceptUnverifiedHook:b,collectFeeBps:r,maxCollectFeeBps:w,fixedFee:{token:S,amount:n.toString()}},v,n)}async function Ie(e,o,t){_(t);let a=m(t),k=E(o.token,"token"),i=e.clientFor(u),[g,b,s]=await Promise.all([ge(i),i.readContract({address:T,abi:D,functionName:"fee"}),oe(i,k,u)]),f=we(o.amount),d=ve(o.unlockTime,g),l=BigInt(b);if(o.maxFee!==void 0){let A=H(String(o.maxFee));if(l>A)throw new c(`Live lock fee (${l}) exceeds maxFee (${A}).`)}let p=e.approval(s.address,T,f.toString(),u),x=e.unsignedTx({to:T,data:z({abi:D,functionName:"lock",args:[s.address,f,d]}),value:l.toString(),chainId:u,description:`Lock ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) in HoodLock Locker ${T} until ${d} with exact fee ${e.formatAmount(l.toString(),S.decimals)} ETH (${l} wei).`}),I=[p,x],h=await e.preview(I,a),y=pe(e,h.changes),$=`Approve and lock ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) in HoodLock Locker ${T} until Unix ${d}. Exact fee: ${e.formatAmount(l.toString(),S.decimals)} ETH (${l} wei). Preview changes: ${y}.`;return q(e,{txs:h.txs,summary:$,preview:h,kind:"token",contract:T,token:s,amount:f.toString(),unlockTime:d.toString(),fee:{token:S,amount:l.toString()}},T,l)}function Pe(e){return{name:"hoodlock_lock",inputSchema:{type:"object",properties:{kind:{type:"string",enum:["token","v2","v3","v4"],description:"Lock mode: token/v2 LP via Locker, or Uniswap v3/v4 NFT via LiquidityLocker."},token:{type:"string",description:"ERC-20 token or v2 LP token contract address on chain 4663 (for token/v2 locks)."},amount:{type:"string",description:"Token amount as an integer string in base units (for token/v2 locks)."},manager:{type:"string",description:"Configured Uniswap v3 or v4 position manager; inferred from kind when omitted."},tokenId:{type:"string",description:"Uniswap NFT position tokenId as a decimal string."},feeRecipient:{type:"string",description:"Explicit recipient address for collected LP fees during a position lock."},acceptUnverifiedHook:{type:"boolean",description:"Explicit v4 unreviewed-hook consent; default false. A reviewed hook is not a safety guarantee."},maxFee:{type:"string",description:"Maximum upfront ETH fee in wei; the exact live fee is sent."},maxCollectFeeBps:{type:"number",description:"Maximum acceptable ongoing LP collect fee in bps (uint16, must be >= live collectFeeBps)."},unlockTime:{type:"string",description:"Unlock timestamp in Unix seconds (must be > now and <= now + 100 years)."}},required:["unlockTime"],additionalProperties:!1},async execute(o,t){return W(e,async()=>Le(o)?xe(e,o,t):Ie(e,o,t))}}}function Ce(e){return{name:"hoodlock_burn",inputSchema:{type:"object",properties:{token:{type:"string",description:"ERC-20 token contract address on chain 4663 to send to the dead address via HoodLock Burner."},amount:{type:"string",description:"Amount to burn as an integer string in base units."}},required:["token","amount"],additionalProperties:!1},async execute(o,t){return W(e,async()=>{_(t);let a=m(t),k=E(o.token,"token"),i=e.clientFor(u),[g,b,s]=await Promise.all([i.readContract({address:C,abi:ee,functionName:"fee"}),i.readContract({address:C,abi:ee,functionName:"DEAD"}),oe(i,k,u)]),f=we(o.amount),d=BigInt(g),l=m(b);if(o.maxFee!==void 0){let A=H(String(o.maxFee));if(d>A)throw new c(`Live burn fee (${d}) exceeds maxFee (${A}).`)}let p=e.approval(s.address,C,f.toString(),u),x=e.unsignedTx({to:C,data:z({abi:ee,functionName:"burn",args:[s.address,f]}),value:d.toString(),chainId:u,description:`Send ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) to the dead address (${l}) via HoodLock Burner ${C} (totalSupply is unchanged) with exact fee ${e.formatAmount(d.toString(),S.decimals)} ETH (${d} wei).`}),I=[p,x],h=await e.preview(I,a),y=pe(e,h.changes),$=`Approve and send ${e.formatAmount(f.toString(),s.decimals)} ${s.symbol} (${f} base units of ${s.address}) to the dead address (${l}) via HoodLock Burner ${C}. Note: tokens are transferred to ${l} and totalSupply is unchanged. Exact fee: ${e.formatAmount(d.toString(),S.decimals)} ETH (${d} wei). Preview changes: ${y}.`;return q(e,{txs:h.txs,summary:$,preview:h,contract:C,deadAddress:l,token:s,amount:f.toString(),fee:{token:S,amount:d.toString()},totalSupplyReduced:!1},C,d)})}}}async function be(e,o,t){_(o);let a=m(o),k=t?E(t,"token"):void 0,i=e.clientFor(u),g=[],b=new Set,s=n=>{for(let r of n){let w=r.toString();b.has(w)||(b.add(w),g.push(r))}};if(k){let[n,r]=await Promise.all([i.readContract({address:T,abi:D,functionName:"locksByToken",args:[k]}),i.readContract({address:T,abi:D,functionName:"locksByOwner",args:[a]})]);s(n),s(r)}else{let n=await i.readContract({address:T,abi:D,functionName:"locksByOwner",args:[a]});s(n)}let d=(await Promise.all(g.map(async n=>{let r=await i.readContract({address:T,abi:D,functionName:"getLock",args:[n]});return{id:n,owner:m(r[0]),token:m(r[1]),amount:BigInt(r[2]),unlockTime:BigInt(r[3]),withdrawn:!!r[4]}}))).filter(n=>!n.withdrawn&&n.amount>0n&&B(n.owner,a)&&(!k||B(n.token,k))),l=new Map,p=async n=>{let r=n.toLowerCase(),w=l.get(r);if(w)return w;let L=n===ke?S:await oe(i,n,u);return l.set(r,L),L},x=[],I=[];for(let n of d){let r=await p(n.token),w=n.amount.toString(),L=n.unlockTime.toString(),R={token:r,amount:w};x.push({lockId:n.id.toString(),kind:"token",contract:T,chainId:u,owner:n.owner,token:r,amount:w,asset:R,unlockTime:L,withdrawn:!1}),I.push({module:"hoodlock",id:`lock:${n.id.toString()}`,chainId:u,assets:[R],description:`HoodLock token lock #${n.id} of ${e.formatAmount(w,r.decimals)} ${r.symbol} (${r.address}) until Unix ${L}.`})}let h=await i.readContract({address:v,abi:O,functionName:"locksOf",args:[a]}),y=[...new Set(h.map(n=>n.toString()))].map(n=>BigInt(n)),$=[];for(let n of y){let r=await i.readContract({address:v,abi:O,functionName:"getLock",args:[n]}),[w,L,R,F,X,V,Q,P,Y,J]=r,M=m(w);if(V||!B(M,a))continue;let ne=m(P),te=m(Y);if(k&&!B(ne,k)&&!B(te,k))continue;let[ie,re]=await Promise.all([p(ne),p(te)]),se=m(Q),ae=Number(R),de=BigInt(L).toString(),Z=BigInt(J).toString();$.push({lockId:n.toString(),kind:F?"v4":"v3",contract:v,manager:F?K:j,chainId:u,owner:M,tokenId:Z,unlockTime:de,collectFeeBps:ae,feeRecipient:se,hookVerified:!!X,token0:ie,token1:re,withdrawn:!1}),I.push({module:"hoodlock",id:`lp-lock:${n.toString()}`,chainId:u,assets:[{token:{address:F?K:j,symbol:`UNI-${F?"V4":"V3"} #${Z}`,decimals:0,chainId:u},amount:"1"}],description:`HoodLock Uniswap ${F?"v4":"v3"} LP lock #${n} (NFT #${Z}, ${ie.symbol}/${re.symbol}, feeRecipient ${se}, collectFeeBps ${ae}) until Unix ${de}. One NFT held in LiquidityLocker custody for ${M}. Underlying token amounts are not valued.`})}let A=`Found ${x.length} active token lock(s) and ${$.length} active Uniswap v3/v4 LP lock(s) for ${a}.`;return{locks:x,lpLocks:$,positions:I,summary:A}}function Fe(e){return{name:"hoodlock_list_locks",inputSchema:{type:"object",properties:{owner:{type:"string",description:"Optional owner wallet address to query (defaults to the authenticated wallet)."},token:{type:"string",description:"Optional ERC-20 or LP token address to filter active locks owned by the wallet."}},additionalProperties:!1},async execute(o,t){let a=o.owner!==void 0?E(o.owner,"owner"):m(t),k=o.token!==void 0?E(o.token,"token"):void 0;return W(e,()=>be(e,a,k))}}}function Re(e){return async o=>(await W(e,()=>be(e,o))).positions}var G=e=>({tools:[Pe(e),Ce(e),Fe(e)],positions:Re(e)}),ze=G,je=G,Ke=e=>le("hoodlock",[G(e)]),We=G;export{T as a,C as b,v as c,j as d,K as e,qe as f,Ae as g,$e as h,Pe as i,Ce as j,Fe as k,Re as l,G as m,ze as n,je as o,Ke as p,We as q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as s,e as h,f as y,h as O,i as q,k as T,m as L,q as w,t as D}from"./53N7PNJH.js";import{b as E,c as I,e as x,g as S}from"./73N3TOJL.js";import{a as P}from"./XPFVT2EA.js";import{a as d}from"./5YS5V2LK.js";import{a as $}from"./JXOEJPJ4.js";import{getAddress as k}from"viem";var u={type:"integer",minimum:1},l={type:"string",minLength:1,maxLength:512},_={type:"string",pattern:"^0x[0-9a-fA-F]{64}$"},g={type:"integer",minimum:1,maximum:100},v={limit:g,cursor:l},j={relay_chain_health:"Read Relay service health. chainId is required.",relay_requests:"Page this wallet\u2019s requests. Requires server OAK_RELAY_API_KEY; the wallet filter is automatic. Optional id, chain and status filters narrow results.",relay_balance_events:"Page this wallet\u2019s balance events. Requires server OAK_RELAY_API_KEY with access to this resource.",relay_exchange_rates:"Read reference rates without a freshness guarantee. Relay may be unavailable; use relay_token_price for an individual token."};function C(n,r){if(r.type==="string"){if(typeof n!="string"||n.length<Number(r.minLength??0)||n.length>Number(r.maxLength??1024)||typeof r.pattern=="string"&&!new RegExp(r.pattern).test(n))throw new d("Provide a valid Relay search, address or cursor.")}else if(r.type==="integer"){if(typeof n!="number"||!Number.isSafeInteger(n)||n<Number(r.minimum??0)||n>Number(r.maximum??Number.MAX_SAFE_INTEGER))throw new d("Provide an integer within the Relay parameter bounds.")}else{if(r.type==="boolean"&&typeof n!="boolean")throw new d("Provide a boolean Relay filter.");if(r.type==="array"){if(!Array.isArray(n)||n.length>100)throw new d("Provide at most 100 Relay search values.");for(let a of n)C(a,s(r.items))}}if(Array.isArray(r.enum)&&!r.enum.includes(n))throw new d("Choose a supported Relay filter.")}function m(n){return new URLSearchParams(Object.entries(n).map(([r,a])=>[r==="cursor"?"continuation":r,String(a)])).toString()}function R(n){if(n!=null)return C(n,l),n}function p(n){return typeof n=="string"?E.test(n)?k(n.toLowerCase()):/^(?:0x[0-9a-fA-F]{64}|-?\d+(?:\.\d+)?)$/.test(n)?n:$(n):Array.isArray(n)?n.map(p):x(n)?Object.fromEntries(Object.entries(n).filter(([r])=>!/api.?key|signature|authorization|secret/i.test(r)).map(([r,a])=>[r,p(a)])):n}function A(n){return h(n).map(r=>{let a=s(r),e=a.decimals;if(typeof e!="number"||!Number.isInteger(e)||e<0||e>255||typeof a.address!="string")throw new d("Relay returned invalid currency metadata.");let t=a.vmType===void 0||a.vmType==="evm";return{chainId:O(a.chainId),address:t?k(y(a.address)):$(a.address),symbol:w(a.symbol)??"unknown",decimals:e,vmType:w(a.vmType),verified:x(a.metadata)&&a.metadata.verified===!0}})}var F=["relay_vault_status","relay_currencies","relay_token_price","relay_currency_classifications","relay_liquidity","relay_swap_sources","relay_requests","relay_app_fee_balance","relay_app_fee_claims","relay_balance_events","relay_deposit_address","relay_recovery_balances","relay_withdrawal_status","relay_chain_health","relay_token_details","relay_token_chart","relay_trending","relay_exchange_rates","relay_protocol_execution"],X=n=>{let r=D(n);function a(e,t,i,o){return{name:e,inputSchema:{type:"object",...j[e]?{description:j[e]}:{},additionalProperties:!1,properties:t,required:i},execute:async(c,b)=>{for(let f of i)if(c[f]===void 0)throw new d(`Provide ${f} for ${e}.`);for(let[f,N]of Object.entries(c)){if(!Object.hasOwn(t,f))throw new d(`Unsupported ${e} parameter ${f}.`);C(N,t[f])}return o(c,y(b))}}}return{tools:[a("relay_chain_health",{chainId:u},["chainId"],async e=>{let t=s(await r(`/chains/health?${m(e)}`));if(typeof t.healthy!="boolean")throw new d("Relay returned invalid chain health.");return{healthy:t.healthy,chainId:e.chainId}}),a("relay_token_details",{chainId:u,address:I},["chainId","address"],async e=>{let t=s(await r(`/chains/${e.chainId}/currencies/${y(e.address)}`));if(t.chainId!==e.chainId||y(t.address)!==y(e.address))throw new d("Relay returned another token.");return{token:A([t])[0],data:p(t)}}),a("relay_token_chart",{chainId:u,address:I,timeframe:{type:"string",enum:["5M","1H","4H","24H","7D","30D","MAX"]}},["chainId","address"],async e=>{let t=s(await r(`/chains/${e.chainId}/currencies/${y(e.address)}/chart?${m(e.timeframe===void 0?{}:{timeframe:e.timeframe})}`));return{chainId:e.chainId,address:k(y(e.address)),data:p(t),summary:"Relay historical market data. Chart prices and volumes are not token base-unit balances."}}),a("relay_trending",{chainId:u,limit:{...g,maximum:20},sortBy:{type:"string",enum:["relay24hBuyTxCount","relay24hBuyUsdVolume","coingecko6hTrending"]}},[],async e=>({currencies:A(await r(`/currencies/trending?${m(e)}`))})),a("relay_exchange_rates",{},[],async()=>({rates:p(s(await r("/prices/rates"))),summary:"Relay reference rates; timestamps are not supplied. These are prices, not token base-unit amounts."})),a("relay_protocol_execution",{id:_},["id"],async e=>{let t=s(await r(`/protocol/executions/${e.id}`)),i=s(t.execution);if(!S(T(i.idempotencyKey),String(e.id)))throw new d("Relay returned another protocol execution.");return{data:p(t),summary:"Oracle execution status only; this does not prove a destination bridge fill."}}),a("relay_currencies",{chainIds:{type:"array",items:u},term:{...l,maxLength:256},address:l,currencyId:l,symbol:l,groupID:l,tokens:{type:"array",items:l},verified:{type:"boolean"},defaultList:{type:"boolean"},includeAllChains:{type:"boolean"},useExternalSearch:{type:"boolean"},depositAddressOnly:{type:"boolean"},limit:g},[],async e=>({currencies:A(await r("/currencies/v2",{chainIds:[P],...e})),summary:"Relay currency search. Provider verification is not an Oak token endorsement; obtain a quote to check route availability."})),a("relay_token_price",{chainId:u,address:I},["chainId","address"],async e=>{let t=s(await r(`/currencies/token/price/v2?${m(e)}`));if(typeof t.price!="string"||!/^\d+(?:\.\d+)?$/.test(t.price))throw new d("Relay returned an invalid USD price.");return{chainId:e.chainId,address:k(y(e.address)),priceUsd:t.price,summary:"Relay USD price; freshness is not supplied by this endpoint."}}),a("relay_currency_classifications",{},[],async()=>{let e=s(await r("/currencies/classifications"));return{major:h(e.major).map(t=>w(t)??"unknown"),stable:h(e.stable).map(t=>w(t)??"unknown")}}),a("relay_liquidity",{chainId:u},["chainId"],async e=>{let t=s(await r(`/chains/liquidity?${m(e)}`));return{liquidity:h(t.liquidity).map(i=>{let o=s(i);if(o.chainId!==e.chainId)throw new d("Relay liquidity chain does not match the request.");return{...A([o])[0],amount:q(o.balance)}}),summary:"Relay solver balances are indicative capacity, not a reserved route or user funds."}}),a("relay_swap_sources",{chainId:u},[],async e=>({sources:h(s(await r(`/swap-sources?${m(e)}`)).sources).map(t=>w(t,"name")??"unknown")})),a("relay_requests",{...v,originChainId:u,destinationChainId:u,chainId:u,id:_,orderId:_,depositTxHash:_,fillTxHash:_,refundTxHash:_,status:{type:"string",enum:["success","failure","refund","pending","depositing"]},includeChildRequests:{type:"boolean"}},[],async(e,t)=>{let i=s(await r(`/requests/v3?${m({...e,user:t,includePendingRequests:!0})}`)),o=h(i.requests).map(s);for(let c of o){let b=x(c.depositAddress)?c.depositAddress.depositor:void 0;if(![c.user,c.sender,b].some(f=>typeof f=="string"&&f.toLowerCase()===t))throw new d("Relay returned a request for another wallet.");T(c.id)}return{requests:p(o),nextCursor:R(i.continuation),summary:"One page of this wallet\u2019s Relay requests, including pending requests. Pass nextCursor as cursor to resume; provider success is not destination receipt verification."}}),a("relay_app_fee_balance",{},[],async(e,t)=>{let i=s(await r(`/app-fees/${t}/balances`));return{balances:h(i.balances).map(o=>{let c=L(o);return{...c,token:{...c.token,address:k(c.token.address),symbol:w(c.token.symbol)??"unknown"}}}),summary:"Off-chain Relay app fee credits for this wallet. Claiming requires separate local signature integration."}}),a("relay_app_fee_claims",v,[],async(e,t)=>{let i=s(await r(`/app-fees/${t}/claims?${m(e)}`)),o=h(i.claims).map(s);for(let c of o)if(y(c.wallet)!==t)throw new d("Relay returned a fee claim for another wallet.");return{claims:p(o),nextCursor:R(i.continuation)}}),a("relay_balance_events",{...v,limit:{...g,maximum:50},requestId:_,chainId:u,currency:I,startTimestamp:{type:"integer",minimum:0},endTimestamp:{type:"integer",minimum:0},type:l},[],async(e,t)=>{let i=s(await r(`/balance/${t}/events?${m(e)}`));if(y(i.wallet)!==t)throw new d("Relay returned balance events for another wallet.");let o=h(i.events).map(s);for(let c of o)if(y(c.wallet)!==t)throw new d("Relay returned a balance event for another wallet.");return{events:p(o),nextCursor:R(i.continuation)}}),a("relay_deposit_address",{address:l,depositAddressId:l,pageSize:{...g,maximum:50},pageToken:l},[],async e=>{if(e.address===void 0==(e.depositAddressId===void 0))throw new d("Provide exactly one deposit address or depositAddressId.");let t=s(await r(`/deposit-addresses/v2?${m(e)}`)),i=s(t.data),o=s(i.depositAddress);if(e.address!==void 0&&o.address!==e.address||e.depositAddressId!==void 0&&o.id!==e.depositAddressId)throw new d("Relay returned another deposit address.");return{data:p(i),nextPageToken:R(i.nextPageToken),summary:"Deposit address monitoring only. Reading an address does not create, change, fund or recover it."}}),a("relay_recovery_balances",{...v,limit:{...g,maximum:50},ownerChainId:u},["ownerChainId"],async(e,t)=>{let i=s(await r(`/withdrawals/balances?${m({...e,recoveryAddress:t})}`)),o=h(i.balances).map(c=>{let b=s(c);return q(b.amount),b});return{balances:p(o),nextCursor:R(i.continuation),summary:"Credited recovery balances only. Empty balances do not prove that an unattested deposit has no recoverable funds. Withdrawal signing remains a separate action."}}),a("relay_withdrawal_status",{id:l},["id"],async e=>{let t=s(await r(`/withdrawals/status?${m(e)}`));if(typeof t.status!="string")throw new d("Relay returned an invalid withdrawal status.");return{status:w(t.status)??"unknown",data:p(t),summary:"Relay withdrawal job status; verify any reported transaction on its chain before treating funds as received."}})]}};export{F as a,X as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s}from"./OJMYESQU.js";import{a as o,c as t}from"./HNMOB76J.js";import{getAddress as i}from"viem";var u=new Set(["priors_status",...s,...t.filter(r=>r.read).map(r=>r.name),"priors_ethos_status","priors_request_borrow","priors_request_repay","priors_request_stock","priors_request_backing","priors_pt_quote","priors_pt_position","priors_stock_quote","priors_savings_liquidity","priors_market_origin","priors_market_pins","priors_capabilities"]),p=new Set(["priors_sign_consent",...t.filter(r=>r.consentRoot).map(r=>r.name)]),d=new Set([...p,"priors_starter_line"]),R=new Set([...t.filter(r=>!r.read).map(r=>r.name),"priors_root_offer","priors_autopay_on","priors_autopay_off","priors_pt_buy","priors_pt_sell","priors_pt_redeem","priors_savings_force_withdraw","priors_stock_swap","priors_market_clear_bid_budget","priors_market_revoke_nft","priors_x_link"]);function S(r){let _=t.find(e=>e.name===r);return _?[o[_.contract],..._.approval==="bid"?[o.bidSpender]:[]]:r==="priors_root_offer"?[o.pool]:r==="priors_autopay_on"||r==="priors_autopay_off"?[o.autopay]:r==="priors_savings_force_withdraw"?[o.savings]:r==="priors_stock_swap"?[i("0xCaf681a66D020601342297493863E78C959E5cb2"),i("0x7Cd4E04E433E69e588728c86A3832753B5F846d4")]:r==="priors_pt_buy"||r==="priors_pt_sell"||r==="priors_pt_redeem"?[i("0x888888888889758F76e7103c6CbF23ABbF58F946")]:r==="priors_market_clear_bid_budget"?[o.bidSpender]:r==="priors_market_revoke_nft"?[o.registry,"0x0000000000000000000000000000000000000000"]:r==="priors_x_link"?[o.registry]:[]}export{u as a,p as b,d as c,R as d,S as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseAbi as e}from"viem";var n=e(["function register() returns (uint256 agentId)","function register(string agentURI) returns (uint256 agentId)","function register(string agentURI,(string metadataKey,bytes metadataValue)[] metadata) returns (uint256 agentId)","function setMetadata(uint256 agentId,string metadataKey,bytes metadataValue)","event MetadataSet(uint256 indexed agentId,string indexed indexedMetadataKey,string metadataKey,bytes metadataValue)","function setAgentURI(uint256 agentId,string newURI)","function balanceOf(address owner) view returns (uint256)","function ownerOf(uint256 agentId) view returns (address)","function tokenURI(uint256 agentId) view returns (string)","function getApproved(uint256 agentId) view returns (address)","function isApprovedForAll(address owner,address operator) view returns (bool)","function getAgentWallet(uint256 agentId) view returns (address)","function setAgentWallet(uint256 agentId,address newWallet,uint256 deadline,bytes signature)","function unsetAgentWallet(uint256 agentId)","function getMetadata(uint256 agentId,string metadataKey) view returns (bytes)","function safeTransferFrom(address from,address to,uint256 tokenId)","function approve(address to,uint256 tokenId)","function setApprovalForAll(address operator,bool approved)","function isAuthorizedOrOwner(address spender,uint256 agentId) view returns (bool)","event Registered(uint256 indexed agentId,string agentURI,address indexed owner)","event URIUpdated(uint256 indexed agentId,string newURI,address indexed updatedBy)","event Transfer(address indexed from,address indexed to,uint256 indexed tokenId)","event Approval(address indexed owner,address indexed approved,uint256 indexed tokenId)","event ApprovalForAll(address indexed owner,address indexed operator,bool approved)"]),s=e(["function getIdentityRegistry() view returns (address)","function giveFeedback(uint256 agentId,int128 value,uint8 valueDecimals,string tag1,string tag2,string endpoint,string feedbackURI,bytes32 feedbackHash)","function revokeFeedback(uint256 agentId,uint64 feedbackIndex)","function appendResponse(uint256 agentId,address clientAddress,uint64 feedbackIndex,string responseURI,bytes32 responseHash)","function getLastIndex(uint256 agentId,address clientAddress) view returns (uint64)","function readFeedback(uint256 agentId,address clientAddress,uint64 feedbackIndex) view returns (int128 value,uint8 valueDecimals,string tag1,string tag2,bool isRevoked)","function getSummary(uint256 agentId,address[] clientAddresses,string tag1,string tag2) view returns (uint64 count,int128 summaryValue,uint8 summaryValueDecimals)","function readAllFeedback(uint256 agentId,address[] clientAddresses,string tag1,string tag2,bool includeRevoked) view returns (address[] clients,uint64[] feedbackIndexes,int128[] values,uint8[] valueDecimals,string[] tag1s,string[] tag2s,bool[] revokedStatuses)","function getResponseCount(uint256 agentId,address clientAddress,uint64 feedbackIndex,address[] responders) view returns (uint64 count)","function getClients(uint256 agentId) view returns (address[])","event NewFeedback(uint256 indexed agentId,address indexed clientAddress,uint64 feedbackIndex,int128 value,uint8 valueDecimals,string indexed indexedTag1,string tag1,string tag2,string endpoint,string feedbackURI,bytes32 feedbackHash)","event FeedbackRevoked(uint256 indexed agentId,address indexed clientAddress,uint64 indexed feedbackIndex)","event ResponseAppended(uint256 indexed agentId,address indexed clientAddress,uint64 feedbackIndex,address indexed responder,string responseURI,bytes32 responseHash)"]),d=e(["function getIdentityRegistry() view returns (address)","function validationRequest(address validatorAddress,uint256 agentId,string requestURI,bytes32 requestHash)","function validationResponse(bytes32 requestHash,uint8 response,string responseURI,bytes32 responseHash,string tag)","function getValidationStatus(bytes32 requestHash) view returns (address validatorAddress,uint256 agentId,uint8 response,bytes32 responseHash,string tag,uint256 lastUpdate)","function getSummary(uint256 agentId,address[] validatorAddresses,string tag) view returns (uint64 count,uint8 avgResponse)","function getAgentValidations(uint256 agentId) view returns (bytes32[])","function getValidatorRequests(address validatorAddress) view returns (bytes32[])","event ValidationRequest(address indexed validatorAddress,uint256 indexed agentId,string requestURI,bytes32 indexed requestHash)","event ValidationResponse(address indexed validatorAddress,uint256 indexed agentId,bytes32 indexed requestHash,uint8 response,string responseURI,bytes32 responseHash,string tag)"]),i=e(["function isValidSignature(bytes32 hash,bytes signature) view returns (bytes4 magicValue)"]);export{n as a,s as b,d as c,i as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as j}from"./46ZA2R5L.js";import{c as z}from"./MYBDO5SA.js";import{d as O}from"./VXLJRRKV.js";import{g as $}from"./73N3TOJL.js";import{a as D,b as M}from"./RETS2ZEK.js";import{a as F,i as q}from"./XPFVT2EA.js";import{a as i}from"./5YS5V2LK.js";import{encodeAbiParameters as le,encodeFunctionData as Y,erc20Abi as K,getAddress as G,isAddress as se,keccak256 as W,parseAbi as ce,parseAbiParameters as me,zeroAddress as J}from"viem";var x=F,S=G(q[x].hoodlock.airdrop.address),Z="https://hoodlock.tech",P=25e4,ue=256,ye=604800n,ge=30n,V=250000000000000000n,X=0xffffffffn,fe=(1n<<64n)-1n,ee=(1n<<128n)-1n,oe="0x0000000000000000000000000000000000000000000000000000000000000000",pe="0x1111111111111111111111111111111111111111",be=me("uint256, address, uint256"),H=ce(["function quote(uint32 maxClaims) view returns (uint256)","function create(address token, bytes32 merkleRoot, uint256 total, uint32 maxClaims, uint64 endTime, string uri) payable returns (uint256 id)","function claim(uint256 id, uint256 index, address account, uint256 amount, bytes32[] proof)","function getAirdrop(uint256 id) view returns (address creator, uint64 endTime, uint32 maxClaims, address token, uint32 claims, bool swept, bytes32 merkleRoot, uint128 total, uint128 remaining)","function isClaimed(uint256 id, uint256 index) view returns (bool)"]);function xe(o,e,t){let n=e.trim();if(n.startsWith("-")){let r=n.slice(1);return`-${o.formatAmount(r,t)}`}let d=n.startsWith("+")?n.slice(1):n;return o.formatAmount(d,t)}function ne(o,e){if(!e.changes.length)return e.summary;let t=e.changes.map(n=>`${xe(o,n.amount,n.token.decimals)} ${n.token.symbol}`).join(", ");return`${e.summary} (${t})`}async function Ae(o,e){try{let[t,n]=await Promise.all([o.readContract({address:e,abi:K,functionName:"symbol"}),o.readContract({address:e,abi:K,functionName:"decimals"})]),d=typeof t=="string"&&t.trim()?t.trim():"TOKEN",r=Number(n);return{symbol:d,decimals:Number.isInteger(r)&&r>=0&&r<=255?r:18}}catch{return{symbol:"TOKEN",decimals:18}}}function w(o,e,t){if(typeof e=="string"&&e.includes(".")){if(t?.decimals===void 0)throw new i(`Decimal string amount "${e}" requires explicit token decimals; amount inputs are base-unit integer strings by default.`);let d=t.rounding!==void 0?M(e,t.decimals,t.rounding):o?o.parseAmount(e,t.decimals):M(e,t.decimals),r=D(d);if(r<=0n)throw new i("Airdrop entry amount must be positive.");return r}let n;try{if(typeof e=="bigint")n=e;else if(typeof e=="string")n=D(e.trim());else throw new i("Amount must be a non-negative integer string in base units.")}catch(d){throw d instanceof i?d:new i(`Invalid airdrop amount "${String(e)}".`,{cause:d})}if(n<=0n)throw new i("Airdrop entry amount must be strictly positive (> 0).");return n}function I(o,e){try{let t=typeof o=="bigint"?o:BigInt(String(o).trim());if(t<0n)throw new i(`${e} must be non-negative.`);return t}catch(t){throw t instanceof i?t:new i(`Invalid ${e}: ${String(o)}`,{cause:t})}}function A(o,e){if(typeof o!="string"||!se(o,{strict:!1}))throw new i(`Invalid ${e} address "${String(o)}": token/account must be a valid EVM address, never a symbol.`);return G(o)}function N(o,e,t){let n=typeof o=="bigint"?o:BigInt(o);if(n<0n||n>X)throw new i(`Airdrop leaf index must be in 0..${X.toString()}.`);let d=A(e,"account"),r=w(void 0,t),s=le(be,[n,d,r]);return W(W(s))}function te(o,e){let t=o;for(let n of e)t=O(t,n);return t}function De(o){try{let e=N(o.index,o.account,o.amount),t=te(e,o.proof);return $(t,o.root)}catch{return!1}}function L(o,e){if(!Array.isArray(o)||o.length===0)throw new i("Airdrop entries list cannot be empty; maxClaims must be in 1..250000.");if(o.length>P)throw new i(`Airdrop entries length (${o.length}) exceeds maxClaims limit of ${P}.`);let t=[],n=0n;for(let a=0;a<o.length;a+=1){let l=o[a];if(!l)throw new i(`Missing airdrop entry at position ${a}.`);let c=l.index??a;if(!Number.isInteger(c)||c!==a)throw new i(`Airdrop entry index at position ${a} must be contiguous ${a} (got ${String(c)}).`);let u=A(l.account,`entries[${a}].account`),g=w(e?.context,l.amount,e);n+=g,t.push({index:c,account:u,amount:g.toString()})}if(n<=0n||n>ee)throw new i("Airdrop total amount must be > 0 and fit in uint128.");let d=t.map(a=>N(a.index,a.account,a.amount)),r=[d];for(;r[r.length-1].length>1;){let a=r[r.length-1],l=[];for(let c=0;c<a.length;c+=2){let u=a[c],g=a[c+1];g===void 0?l.push(u):l.push(O(u,g))}r.push(l)}let s=r[r.length-1][0];if(s.toLowerCase()===oe)throw new i("Computed Merkle root cannot be zero.");let f=r.length>1?r[1]:r[0],m=t.map((a,l)=>{let c=[],u=l;for(let g=0;g<r.length-1;g+=1){let y=r[g],b=u^1;b<y.length&&c.push(y[b]),u=Math.floor(u/2)}return{index:a.index,account:a.account,amount:a.amount,leaf:d[l],proof:c}}),p={format:"openzeppelin-standard-merkle-tree-v1",leafEncoding:["uint256","address","uint256"],root:s,totalAmount:n.toString(),maxClaims:t.length,values:t.map(a=>[a.index,a.account,a.amount]),entries:t};return{root:s,leaves:d,level1:f,totalAmount:n.toString(),maxClaims:t.length,entries:t,proofs:m,list:p}}function he(o){if(!o||!Array.isArray(o.entries)&&!Array.isArray(o.values))throw new i("Saved airdrop list is missing entries/values.");let e=Array.isArray(o.entries)&&o.entries.length>0?o.entries:o.values.map(([n,d,r])=>({index:n,account:d,amount:r})),t=L(e);if(o.root&&!$(t.root,o.root))throw new i(`Rebuilt tree root ${t.root} does not match saved list root ${o.root}.`);if(o.maxClaims!==void 0&&t.maxClaims!==o.maxClaims)throw new i(`Rebuilt maxClaims (${t.maxClaims}) does not match saved list maxClaims (${o.maxClaims}).`);if(o.totalAmount!==void 0&&t.totalAmount!==o.totalAmount)throw new i(`Rebuilt totalAmount (${t.totalAmount}) does not match saved list totalAmount (${o.totalAmount}).`);return t}async function re(o,e){return z(o.http,e,{method:"GET"},t=>t!==null&&typeof t=="object")}async function we(o,e,t){let n=A(e.token,"token");if(n===J)throw new i("Airdrop token cannot be the zero address.");let d=L(e.entries,{decimals:e.decimals,rounding:e.rounding,context:o}),r=e.maxClaims??d.maxClaims;if(!Number.isInteger(r)||r<1||r>P||r!==d.maxClaims)throw new i(`maxClaims (${String(r)}) must equal entries.length (${d.maxClaims}) and be in 1..${P}.`);let s=BigInt(d.totalAmount),f=e.total!==void 0?w(o,e.total,{decimals:e.decimals,rounding:e.rounding}):s;if(f<s)throw new i(`Airdrop total (${f.toString()}) is less than the sum of entry amounts (${s.toString()}).`);if(f<=0n||f>ee)throw new i("Airdrop total must be positive and fit in uint128.");let m=e.uri??"",p=new TextEncoder().encode(m).byteLength;if(p>ue)throw new i(`Airdrop URI length (${p} bytes) exceeds 256-byte limit.`);let a=e.endTime!==void 0?I(e.endTime,"endTime"):0n;if(a>fe)throw new i("endTime exceeds uint64 maximum.");let l=o.clientFor(x),c=await l.getCode({address:n});if(!c||c==="0x")throw new i(`Token ${n} has no contract code on chain ${x}.`);let u;if(a!==0n){let R=(await l.getBlock()).timestamp,U=e.inclusionMargin!==void 0?I(e.inclusionMargin,"inclusionMargin"):ge;if(U<=0n)throw new i("inclusionMargin must be at least 1 second to leave room for signing and inclusion after the already-mined block.");let _=R+U,v=e.inclusionTime!==void 0?I(e.inclusionTime,"inclusionTime"):_;if(v<_)throw new i(`inclusionTime (${v.toString()}) must be after the already-mined block (${R.toString()}) with room for signing and inclusion (>= ${_.toString()}).`);u=v;let B=v+ye;if(a<B)throw new i(`endTime (${a.toString()}) is too short (window too short): must be 0 or at least inclusion time (${v.toString()}) + 604800 (7 days >= ${B.toString()}, after already-mined block.timestamp ${R.toString()}).`)}let g=await l.readContract({address:S,abi:H,functionName:"quote",args:[r]}),y=typeof g=="bigint"?g:BigInt(String(g));if(y<0n||y>V)throw new i(`HoodLock quote(uint32) fee (${y.toString()}) exceeds max fee cap (${V.toString()}).`);let b=o.formatAmount(y.toString(),j.decimals),h=o.approval(n,S,f.toString(),x),k=o.unsignedTx({chainId:x,to:S,data:Y({abi:H,functionName:"create",args:[n,d.root,f,r,a,m]}),value:y.toString(),description:`Create HoodLock airdrop (${r} claims, total ${f.toString()}, quote fee ${b} ETH (${y.toString()} wei))`}),C=[h,k],T=A(e.account??t??pe,"wallet"),E=await o.preview(C,T),ae=y>0n?` Quote fee: -${b} ETH (${b} ETH / ${y.toString()} wei).`:" Quote fee: 0 ETH (0 wei).",de=`${ne(o,E)}${ae}`;return{kind:"hoodlock_airdrop_create",chainId:x,token:n,merkleRoot:d.root,totalAmount:d.totalAmount,total:f.toString(),maxClaims:r,endTime:a,...u!==void 0?{inclusionTime:u}:{},uri:m,quoteFee:y,list:d.list,proofs:d.proofs,txs:C,preview:E,summary:de}}async function Q(o,e,t,n){if(n.savedProof){let m=A(n.savedProof.account,"savedProof.account");if(m!==t)throw new i(`savedProof account (${m}) does not match claim account (${t}).`);return{index:n.savedProof.index,amount:w(o,n.savedProof.amount),proof:n.savedProof.proof}}if(n.proof!==void 0&&n.index!==void 0&&n.amount!==void 0){let m=Number(n.index);if(!Number.isInteger(m)||m<0)throw new i(`Invalid claim index: ${String(n.index)}`);return{index:m,amount:w(o,n.amount),proof:n.proof}}if(n.list||n.entries){let p=(n.list?he(n.list):L(n.entries,{context:o})).proofs.find(a=>!(!$(a.account,t)||n.index!==void 0&&a.index!==Number(n.index)));if(!p)throw new i(`Account ${t} was not found in the saved airdrop list.`);return{index:p.index,amount:w(o,p.amount),proof:p.proof}}let d=`${Z}/api/airdrop/${e.toString()}/proof?address=${t}`,r=await re(o,d),s=r?.data??r;if(!s||s.index===void 0||s.amount===void 0||!Array.isArray(s.proof))throw new i(`No valid proof returned from HoodLock API for airdrop ${e.toString()} and account ${t}.`);let f=Number(s.index);if(!Number.isInteger(f)||f<0)throw new i(`Invalid index in API proof: ${String(s.index)}`);return{index:f,amount:w(o,s.amount),proof:s.proof}}async function ie(o,e){let t=o.clientFor(x),n=await t.readContract({address:S,abi:H,functionName:"getAirdrop",args:[e.id]}),[d,r,s,f,m,p,a,,l]=n,c=BigInt(r),u=Number(s),g=Number(m),y=BigInt(l),b=A(f,"airdrop.token");if(d===J||a.toLowerCase()===oe)throw new i(`Airdrop ${e.id.toString()} does not exist.`);if(p)throw new i(`Airdrop ${e.id.toString()} has already been swept.`);if(c>0n&&(await t.getBlock()).timestamp>=c)throw new i(`Airdrop ${e.id.toString()} expired at timestamp ${c.toString()}.`);if(g>=u)throw new i(`Airdrop ${e.id.toString()} has reached maxClaims (${u}).`);let[h,k]=await Promise.all([t.readContract({address:S,abi:H,functionName:"isClaimed",args:[e.id,BigInt(e.index)]}),Ae(t,b)]);if(h)throw new i(`Airdrop ${e.id.toString()} index ${e.index} has already been claimed.`);if(y<e.amount)throw new i(`Airdrop ${e.id.toString()} remaining balance (${y.toString()}) is less than claim amount (${e.amount.toString()}).`);let C=N(e.index,e.account,e.amount),T=te(C,e.proof);if(!$(T,a))throw new i(`Computed Merkle root ${T} does not match on-chain airdrop root ${a} (bad proof).`);return{tokenAddress:b,tokenMeta:k,merkleRoot:a,leaf:C}}async function ke(o,e){let{tokenAddress:t,tokenMeta:n,merkleRoot:d,leaf:r}=await ie(o,e),s=e.caller??e.account,f=!$(s,e.account),m=o.formatAmount(e.amount.toString(),n.decimals),p=o.unsignedTx({chainId:x,to:S,data:Y({abi:H,functionName:"claim",args:[e.id,BigInt(e.index),e.account,e.amount,[...e.proof]]}),value:"0",description:f?`Claim ${m} ${n.symbol} (${e.amount.toString()} base units) from HoodLock airdrop #${e.id.toString()} for recipient ${e.account} (caller ${s} pays gas only, token delta 0)`:`Claim ${m} ${n.symbol} (${e.amount.toString()} base units) from HoodLock airdrop #${e.id.toString()} for ${e.account}`}),a=[p],l=await o.preview(a,s),c,u,g=e.amount.toString(),y;if(f){let b=l.changes.filter(h=>h.amount.trim().startsWith("-"));c={...l,changes:b,summary:`${l.summary} Recipient ${e.account} receives ${m} ${n.symbol} (${e.amount.toString()} base units); caller ${s} change is 0 (gas only).`},u=`Third-party claim from HoodLock airdrop #${e.id.toString()} (index ${e.index}): recipient ${e.account} receives ${m} ${n.symbol} (${e.amount.toString()} base units of ${t}); caller ${s} own token change is 0 (gas only). ${l.summary}`,y="0"}else c=l,u=`Claim ${m} ${n.symbol} (${e.amount.toString()} base units of ${t}) from HoodLock airdrop #${e.id.toString()} (index ${e.index}) for recipient ${e.account}. ${ne(o,c)}`,y=e.amount.toString();return{kind:"hoodlock_airdrop_claim",chainId:x,id:e.id,index:e.index,account:e.account,recipient:e.account,caller:e.caller,token:t,amount:e.amount.toString(),recipientDelta:g,senderDelta:y,leaf:r,merkleRoot:d,proof:[...e.proof],tx:p,txs:a,preview:c,summary:u}}async function $e(o,e,t){let n=A(e.account??t??"","account"),d=e.caller!==void 0?A(e.caller,"caller"):t!==void 0?A(t,"wallet"):void 0;if(e.id!==void 0){let l=I(e.id,"id"),c=await Q(o,l,n,e);return ke(o,{id:l,index:c.index,account:n,caller:d,amount:c.amount,proof:c.proof})}let r=`${Z}/api/airdrop/eligible?address=${n}`,s=await re(o,r),f=Array.isArray(s)?s:s?.claimable??s?.eligible??s?.airdrops??s?.claims??[],m=[];for(let l of f){let c=l.id??l.airdropId;if(c!==void 0)try{let u=I(c,"eligible.id"),g,y,b;if(l.index!==void 0&&l.amount!==void 0&&Array.isArray(l.proof))g=Number(l.index),y=w(o,l.amount),b=l.proof;else{let k=await Q(o,u,n,{id:u,account:n});g=k.index,y=k.amount,b=k.proof}let h=await ie(o,{id:u,index:g,account:n,amount:y,proof:b});m.push({id:u.toString(),index:g,account:n,token:h.tokenAddress,amount:y.toString(),proof:[...b],merkleRoot:h.merkleRoot})}catch{continue}}let p=m.length===0?`No verified eligible HoodLock airdrops were returned by the index for ${n}. Discovery can lag after creation; this does not prove there are no claims. If you know the airdrop id, call hoodlock_airdrop_claim with id and account to resolve its list/proof and verify it on-chain.`:`Found ${m.length} eligible HoodLock airdrop(s) for ${n}: ${m.map(l=>`#${l.id}`).join(", ")}. Discovery can lag after creation. Choose an id, or pass a known new id, to hoodlock_airdrop_claim to verify and build a claim transaction.`;return{kind:"hoodlock_airdrop_eligible",chainId:x,account:n,recipient:n,caller:d,recipientDelta:"0",senderDelta:"0",eligible:m,claims:[],tx:void 0,txs:[],preview:{txs:[],changes:[],summary:p},summary:p}}var Se=o=>({tools:[{name:"hoodlock_airdrop_create",inputSchema:{type:"object",required:["token","entries"],additionalProperties:!1,properties:{token:{type:"string",description:"ERC-20 token contract address on chain 4663"},entries:{type:"array",description:"Ordered airdrop entries [{ index?, account, amount }] with base-unit integer string amounts"},total:{type:"string",description:"Optional total funded token amount as a base-unit integer string (>= sum of entries)"},maxClaims:{type:"number",description:"Optional claim count (must equal entries.length in 1..250000)"},endTime:{type:"number",description:"Unix timestamp in seconds (0 for non-sweepable or >= inclusion time + 604800)"},inclusionTime:{type:"number",description:"Optional expected transaction inclusion Unix timestamp in seconds (> already-mined block.timestamp)"},inclusionMargin:{type:"number",description:"Optional signing and inclusion margin in seconds above the already-mined block.timestamp (>= 1, default 30)"},uri:{type:"string",description:"Metadata URI (<= 256 UTF-8 bytes)"},decimals:{type:"number",description:"Optional token decimals when converting human decimal entry amounts via parseAmount"},rounding:{type:"string",enum:["floor","ceil"],description:"Optional rounding mode (floor or ceil) when converting decimal amounts"},account:{type:"string",description:"Optional creator wallet address for preview simulation"}}},execute:async(e,t)=>we(o,e,t)},{name:"hoodlock_airdrop_claim",inputSchema:{type:"object",required:["account"],additionalProperties:!1,properties:{id:{type:"string",description:"Optional airdrop ID (omit to query eligible airdrops)"},account:{type:"string",description:"Leaf recipient address that receives the tokens"},caller:{type:"string",description:"Optional caller/relayer address submitting the tx (pays gas only, receives 0 tokens)"},index:{type:"number",description:"Optional leaf index when supplying proof directly or selecting from list/entries"},amount:{type:"string",description:"Optional leaf amount as a base-unit integer string"},proof:{type:"array",items:{type:"string"},description:"Optional Merkle sibling proof array of 32-byte hex strings"},savedProof:{type:"object",description:"Optional saved proof item ({ index, account, amount, leaf?, proof }) from hoodlock_airdrop_create"},list:{type:"object",description:"Optional saved airdrop list ({ format, leafEncoding, root, totalAmount, maxClaims, values, entries }) to rebuild proof locally"},entries:{type:"array",description:"Optional airdrop entries array ([{ index?, account, amount }]) to rebuild proof locally"}}},execute:async(e,t)=>$e(o,e,t)}]}),Me=Se;export{K as a,x as b,S as c,Z as d,P as e,ue as f,ye as g,ge as h,V as i,H as j,xe as k,N as l,te as m,De as n,L as o,he as p,Se as q,Me as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./5YS5V2LK.js";var s=4663,a=46630,p=18,f=6,A=30,h="recipient",v="direct",P="totalSupply",o={4663:{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"}},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,_=o[4663].pons.factory.address,R=o[4663].pons.memeHook.address,F=o[4663].pons.poolManager.address,x=o[4663].pons.feeEscrow.address,C=o[4663].oracle.ethUsdgPool.address,l={name:"Global Dollar",version:"1",chainId:s,verifyingContract:t},b={name:"Global Dollar",version:"1",chainId:a,verifyingContract:i},d={mainnet:{chainId:s,usdg:t,usdgDomain:l,weth:o[s].tokens.WETH.address,identityRegistry:o[s].identity.identityRegistry.address},testnet:{chainId:a,usdg:i,usdgDomain:b,weth:o[a].deployments.test_WETH.address,identityRegistry:o[a].deployments.test_identity.address}};function m(e="mainnet"){if(e!=="mainnet"&&e!=="testnet")throw new r("Set OAK_NETWORK to mainnet or testnet.");return e}function E(e,c){if(c.toLowerCase()!==d[e].usdg.toLowerCase())throw new r(`USDG does not match the pinned ${e} deployment on chain ${d[e].chainId}.`)}async function B(e,c){let n=await c.getChainId();if(n!==d[e].chainId)throw new r(`RPC chain ${n} does not match OAK_NETWORK ${e} (chain ${d[e].chainId}).`)}var g={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,I=[k[4663].velora.address,"0x082738d007001080a00099a000004f3006152085"];export{s as a,a as b,p as c,f as d,A as e,h as f,v as g,P as h,o as i,t as j,i as k,_ as l,R as m,F as n,x as o,C as p,l as q,b as r,d as s,m as t,E as u,B as v,g as w,k as x,D as y,I as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getAddress as t}from"viem";var e=[{name:"CARD_TARGET_USD_WAD",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"MAX_CONVERT_DEV_BPS",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"allSalesHalted",type:"function",inputs:[],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"asset0",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"asset1",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"asset2",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"balanceOf",type:"function",inputs:[{name:"",type:"address"},{name:"",type:"uint256"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"balanceOfBatch",type:"function",inputs:[{name:"owners",type:"address[]"},{name:"ids",type:"uint256[]"}],outputs:[{name:"balances",type:"uint256[]"}],stateMutability:"view"},{name:"basisOf",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"wallet",type:"address"}],outputs:[{name:"costUsdgRaw",type:"uint256"},{name:"count",type:"uint256"}],stateMutability:"view"},{name:"bookOf",type:"function",inputs:[{name:"asset",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"potUnits",type:"uint256"},{name:"reservedUnits",type:"uint256"},{name:"putPotUsdg",type:"uint256"},{name:"putReservedUsdg",type:"uint256"},{name:"premiumUsdg",type:"uint256"},{name:"feeManagerTok",type:"uint256"},{name:"feeSleeveTok",type:"uint256"}]}],stateMutability:"view"},{name:"buy",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"},{name:"maxPriceUsdg",type:"uint256"}],outputs:[{name:"paidUsdgRaw",type:"uint256"}],stateMutability:"nonpayable"},{name:"cashOut",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"},{name:"minOut",type:"uint256"}],outputs:[{name:"paidOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"claimExpiry",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"}],outputs:[{name:"paidOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"clearKnock",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"convertPremiums",type:"function",inputs:[{name:"asset",type:"address"},{name:"minTokensOut",type:"uint256"},{name:"swapCalldata",type:"bytes"}],outputs:[{name:"tokensOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"convertSleeveFees",type:"function",inputs:[{name:"asset",type:"address"},{name:"minTokensOut",type:"uint256"},{name:"swapCalldata",type:"bytes"}],outputs:[{name:"tokensOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"createSeries",type:"function",inputs:[{name:"asset",type:"address"},{name:"side",type:"uint8"},{name:"strikeWad",type:"uint256"},{name:"unitsPerCard",type:"uint256"},{name:"expiry",type:"uint64"},{name:"maxCards",type:"uint32"}],outputs:[{name:"seriesId",type:"uint256"}],stateMutability:"nonpayable"},{name:"depositHouse",type:"function",inputs:[{name:"asset",type:"address"},{name:"amount",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"depositPutPot",type:"function",inputs:[{name:"asset",type:"address"},{name:"usdgRaw",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"feedAdapter",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"haltSales",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"halter",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"isApprovedForAll",type:"function",inputs:[{name:"",type:"address"},{name:"",type:"address"}],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"liquidate",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"roundId",type:"uint80"}],outputs:[],stateMutability:"nonpayable"},{name:"liquidateKnock",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"manager",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"markAge",type:"function",inputs:[{name:"asset",type:"address"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"markVoid",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"offHoursWindowLeft",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"quoteBuy",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"}],outputs:[{name:"totalUsdgRaw",type:"uint256"},{name:"rung",type:"uint8"},{name:"markWad",type:"uint256"}],stateMutability:"view"},{name:"quoteCashOut",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"},{name:"holder",type:"address"}],outputs:[{name:"netOut",type:"uint256"},{name:"perfFee",type:"uint256"},{name:"rung",type:"uint8"},{name:"markWad",type:"uint256"}],stateMutability:"view"},{name:"recordDrift",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"recordKnock",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"refund",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"}],outputs:[{name:"refunded",type:"uint256"}],stateMutability:"nonpayable"},{name:"resumeSales",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"routerSource",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"rung2Available",type:"function",inputs:[{name:"asset",type:"address"}],outputs:[{name:"ok",type:"bool"},{name:"twapWad",type:"uint256"}],stateMutability:"view"},{name:"safeBatchTransferFrom",type:"function",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"ids",type:"uint256[]"},{name:"amounts",type:"uint256[]"},{name:"data",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"safeTransferFrom",type:"function",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"seriesCount",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"seriesLive",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[{name:"rung",type:"uint8"},{name:"markWad",type:"uint256"},{name:"haircutBps",type:"uint256"},{name:"effLeverageWad",type:"uint256"},{name:"distanceBps",type:"uint256"}],stateMutability:"view"},{name:"seriesOf",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"asset",type:"address"},{name:"side",type:"uint8"},{name:"state",type:"uint8"},{name:"salesHalted",type:"bool"},{name:"expiry",type:"uint64"},{name:"createdAt",type:"uint64"},{name:"maxCards",type:"uint32"},{name:"sold",type:"uint32"},{name:"outstanding",type:"uint32"},{name:"strikeWad",type:"uint256"},{name:"unitsPerCard",type:"uint256"},{name:"baseUiMultiplier",type:"uint256"},{name:"listLeverageWad",type:"uint256"},{name:"premiumUsdgRaw",type:"uint256"},{name:"settleMarkWad",type:"uint256"},{name:"settlePerCard",type:"uint256"},{name:"liqRoundId",type:"uint80"},{name:"settleRoundId",type:"uint80"},{name:"knockCheckpointAt",type:"uint64"},{name:"driftOnsetAt",type:"uint64"},{name:"offHoursWindowId",type:"uint80"},{name:"soldInWindow",type:"uint32"},{name:"windowCapCards",type:"uint32"}]}],stateMutability:"view"},{name:"servingRung",type:"function",inputs:[{name:"asset",type:"address"}],outputs:[{name:"rung",type:"uint8"},{name:"markWad",type:"uint256"}],stateMutability:"view"},{name:"setApprovalForAll",type:"function",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[],stateMutability:"nonpayable"},{name:"settle",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"roundId",type:"uint80"}],outputs:[],stateMutability:"nonpayable"},{name:"skim",type:"function",inputs:[{name:"token",type:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"sleeve",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"supportsInterface",type:"function",inputs:[{name:"interfaceId",type:"bytes4"}],outputs:[{name:"",type:"bool"}],stateMutability:"pure"},{name:"sweepFees",type:"function",inputs:[],outputs:[],stateMutability:"nonpayable"},{name:"unrealizedProfitUsdWad",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"wallet",type:"address"}],outputs:[{name:"",type:"int256"}],stateMutability:"view"},{name:"uri",type:"function",inputs:[{name:"id",type:"uint256"}],outputs:[{name:"",type:"string"}],stateMutability:"view"},{name:"usdg",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"usdgFees",type:"function",inputs:[],outputs:[{name:"",type:"tuple",components:[{name:"feeManager",type:"uint256"},{name:"feeSleeve",type:"uint256"}]}],stateMutability:"view"},{name:"withdrawHouse",type:"function",inputs:[{name:"asset",type:"address"},{name:"amount",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"withdrawPutPot",type:"function",inputs:[{name:"asset",type:"address"},{name:"usdgRaw",type:"uint256"}],outputs:[],stateMutability:"nonpayable"}],n=[{name:"BASE_FLOAT_CHIPS",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"CONVERSION_MAX_FEED_AGE",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"DOMAIN_SEPARATOR",type:"function",inputs:[],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"MAX_CONVERT_DEV_BPS",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"MIN_OPERATING_USDG",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"SEAT_OPEN_TYPEHASH",type:"function",inputs:[],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"SHOE_COMMIT_TYPEHASH",type:"function",inputs:[],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"STATE_TYPEHASH",type:"function",inputs:[],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"bandAlarm",type:"function",inputs:[],outputs:[{name:"tripped",type:"bool"},{name:"reserved",type:"uint256"},{name:"ceiling",type:"uint256"}],stateMutability:"view"},{name:"cards",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"challenge",type:"function",inputs:[{name:"state",type:"tuple",components:[{name:"sessionId",type:"uint256"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"staked",type:"uint128"},{name:"shoeCursor",type:"uint16"},{name:"logHash",type:"bytes32"},{name:"isFinal",type:"bool"}]},{name:"houseSig",type:"bytes"},{name:"playerSig",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"claimUnclaimedChips",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"closeCooperative",type:"function",inputs:[{name:"state",type:"tuple",components:[{name:"sessionId",type:"uint256"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"staked",type:"uint128"},{name:"shoeCursor",type:"uint16"},{name:"logHash",type:"bytes32"},{name:"isFinal",type:"bool"}]},{name:"houseSig",type:"bytes"},{name:"playerSig",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"closeUnilateral",type:"function",inputs:[{name:"state",type:"tuple",components:[{name:"sessionId",type:"uint256"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"staked",type:"uint128"},{name:"shoeCursor",type:"uint16"},{name:"logHash",type:"bytes32"},{name:"isFinal",type:"bool"}]},{name:"houseSig",type:"bytes"},{name:"playerSig",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"commitShoe",type:"function",inputs:[{name:"sessionId",type:"uint256"},{name:"shoeIndex",type:"uint32"},{name:"houseCommit",type:"bytes32"},{name:"clientEntropy",type:"bytes32"},{name:"round",type:"uint64"},{name:"houseSig",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"convertProceeds",type:"function",inputs:[{name:"minUsdgOut",type:"uint256"},{name:"swapCalldata",type:"bytes"}],outputs:[{name:"usdgOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"coverageOk",type:"function",inputs:[],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"depositHouseUsdg",type:"function",inputs:[{name:"amount",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"escrowedChips",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"expireSession",type:"function",inputs:[{name:"sessionId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"feedAdapter",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"finalize",type:"function",inputs:[{name:"sessionId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"floatBand",type:"function",inputs:[],outputs:[{name:"low",type:"uint256"},{name:"high",type:"uint256"}],stateMutability:"view"},{name:"floatBuy",type:"function",inputs:[{name:"count",type:"uint256"},{name:"maxUsdgSpend",type:"uint256"}],outputs:[{name:"usdgSpent",type:"uint256"}],stateMutability:"nonpayable"},{name:"floatChips",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"floatSell",type:"function",inputs:[{name:"count",type:"uint256"},{name:"minUnitsOut",type:"uint256"}],outputs:[{name:"unitsOut",type:"uint256"}],stateMutability:"nonpayable"},{name:"freeHouseUsdg",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"halt",type:"function",inputs:[],outputs:[],stateMutability:"nonpayable"},{name:"halted",type:"function",inputs:[],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"halter",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"houseSigners",type:"function",inputs:[{name:"",type:"address"}],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"houseUsdg",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"manager",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"maxBet",type:"function",inputs:[{name:"sessionId",type:"uint256"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"nextSessionId",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"onERC1155BatchReceived",type:"function",inputs:[{name:"",type:"address"},{name:"",type:"address"},{name:"",type:"uint256[]"},{name:"",type:"uint256[]"},{name:"",type:"bytes"}],outputs:[{name:"",type:"bytes4"}],stateMutability:"pure"},{name:"onERC1155Received",type:"function",inputs:[{name:"",type:"address"},{name:"from",type:"address"},{name:"id",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes4"}],stateMutability:"nonpayable"},{name:"openSessionOf",type:"function",inputs:[{name:"",type:"address"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"openSessions",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"proceedsUnits",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"rakeChipsHeld",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"rakeHalvesManager",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"rakeHalvesSleeve",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"rebalanceTarget",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"recordState",type:"function",inputs:[{name:"state",type:"tuple",components:[{name:"sessionId",type:"uint256"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"staked",type:"uint128"},{name:"shoeCursor",type:"uint16"},{name:"logHash",type:"bytes32"},{name:"isFinal",type:"bool"}]},{name:"houseSig",type:"bytes"},{name:"playerSig",type:"bytes"}],outputs:[],stateMutability:"nonpayable"},{name:"reservedChips",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"revealShoe",type:"function",inputs:[{name:"sessionId",type:"uint256"},{name:"shoeIndex",type:"uint32"},{name:"houseSecret",type:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{name:"routerSource",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"seatOpenDigest",type:"function",inputs:[{name:"player",type:"address"},{name:"sessionKey",type:"address"},{name:"houseCommit",type:"bytes32"},{name:"clientEntropy",type:"bytes32"},{name:"round",type:"uint64"}],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"seatTicketUsed",type:"function",inputs:[{name:"",type:"bytes32"}],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"sessionOf",type:"function",inputs:[{name:"sessionId",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"player",type:"address"},{name:"openedAt",type:"uint64"},{name:"state",type:"uint8"},{name:"sessionKey",type:"address"},{name:"deadline",type:"uint64"},{name:"shoeCount",type:"uint32"},{name:"houseSigner",type:"address"},{name:"closeAt",type:"uint64"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"cap",type:"uint128"},{name:"staked",type:"uint128"},{name:"deposited",type:"uint128"}]}],stateMutability:"view"},{name:"setHalt",type:"function",inputs:[{name:"halted_",type:"bool"}],outputs:[],stateMutability:"nonpayable"},{name:"setHouseSigner",type:"function",inputs:[{name:"signer",type:"address"},{name:"allowed",type:"bool"}],outputs:[],stateMutability:"nonpayable"},{name:"setTableSeries",type:"function",inputs:[{name:"seriesId",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"shoeCommitDigest",type:"function",inputs:[{name:"sessionId",type:"uint256"},{name:"shoeIndex",type:"uint32"},{name:"houseCommit",type:"bytes32"},{name:"clientEntropy",type:"bytes32"},{name:"round",type:"uint64"}],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"shoeOf",type:"function",inputs:[{name:"sessionId",type:"uint256"},{name:"shoeIndex",type:"uint32"}],outputs:[{name:"",type:"tuple",components:[{name:"houseCommit",type:"bytes32"},{name:"clientEntropy",type:"bytes32"},{name:"round",type:"uint64"},{name:"committedAt",type:"uint64"},{name:"revealedSecret",type:"bytes32"}]}],stateMutability:"view"},{name:"sigRegistry",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"skim",type:"function",inputs:[{name:"token",type:"address"}],outputs:[],stateMutability:"nonpayable"},{name:"sleeve",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"stateDigest",type:"function",inputs:[{name:"state",type:"tuple",components:[{name:"sessionId",type:"uint256"},{name:"nonce",type:"uint64"},{name:"chips",type:"uint128"},{name:"staked",type:"uint128"},{name:"shoeCursor",type:"uint16"},{name:"logHash",type:"bytes32"},{name:"isFinal",type:"bool"}]}],outputs:[{name:"",type:"bytes32"}],stateMutability:"view"},{name:"sweepFees",type:"function",inputs:[],outputs:[],stateMutability:"nonpayable"},{name:"tableOpen",type:"function",inputs:[],outputs:[{name:"",type:"bool"}],stateMutability:"view"},{name:"tableSeries",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"tableStrikeWad",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"tableUnitsPerCard",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"totalCapChips",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"totalCoverageChips",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"turbo",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"unclaimedChips",type:"function",inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"unclaimedTotal",type:"function",inputs:[],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"unclaimedTotalOf",type:"function",inputs:[{name:"",type:"uint256"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"underlying",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"underlyingFeed",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"usdg",type:"function",inputs:[],outputs:[{name:"",type:"address"}],stateMutability:"view"},{name:"withdrawHouseCards",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"count",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"withdrawHouseUsdg",type:"function",inputs:[{name:"amount",type:"uint256"}],outputs:[],stateMutability:"nonpayable"},{name:"writeOffUnclaimed",type:"function",inputs:[{name:"seriesId",type:"uint256"},{name:"player",type:"address"}],outputs:[],stateMutability:"nonpayable"}],a=[{name:"priceWad",type:"function",inputs:[{name:"feed",type:"address"},{name:"token",type:"address"}],outputs:[{name:"",type:"uint256"}],stateMutability:"view"},{name:"sessionOpen",type:"function",inputs:[{name:"timestamp",type:"uint256"}],outputs:[{name:"",type:"bool"}],stateMutability:"pure"}],u={turbo:{address:t("0x757122439420900ca44A80c390d586011FD72C8a"),codeHash:"0x8d985a093656b2491685ee8492f0470c28f775c9cb41ee8465d9e8db83387a4a",abi:e},blackjack:{address:t("0x712F52Fd42D7b89fd444e0cc4430020fAA9cfb26"),codeHash:"0x3512523f146b85bfbfadec1d8f6c62b4db79f0beada1e9edb3be3ea36f22f0fd",abi:n},feed:{address:t("0x115E5779Ce2f7BC265EAAbcAcaf7b06f01d5D471"),codeHash:"0x2dea1da93cb5cc3312cb21f2bd7cfe849a937ae136cae85ce40b9099f4fe2504",abi:a}},s={turbo:{address:"0x48acba9933ac953e0428fe7fe7e3ac242ae0dd8a",codeHash:"0x2983e8c9febc3c34eb67139ca9c5e312eddada141727610082b5ff398f66e89d"},blackjack:{address:"0xf2d7268d753bb48d784c93d944ce1279957d8510",codeHash:"0x72e140956074a08ea8812bbc4bf6ac808e5b7761a3e9a5d38f6995711b97fc76"}};export{e as a,n as b,a as c,u as d,s as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as S}from"./6IM6A5VA.js";import{a as N}from"./RETS2ZEK.js";import{a,j as p}from"./XPFVT2EA.js";import{a as t}from"./5YS5V2LK.js";import{encodeFunctionData as $,erc20Abi as U,getAddress as m,parseAbi as _}from"viem";var f=_(["function asset() view returns (address)","function decimals() view returns (uint8)","function previewMint(uint256) view returns (uint256)","function previewRedeem(uint256) view returns (uint256)","function previewWithdraw(uint256) view returns (uint256)","function mint(uint256 shares,address receiver) returns (uint256)","function redeem(uint256 shares,address receiver,address owner) returns (uint256)","function withdraw(uint256 assets,address receiver,address owner) returns (uint256)"]);function M(e){if(typeof e!="string")throw new t("Amount must be a positive base-unit integer string.");let s=N(e);if(s<=0n||s>=1n<<256n)throw new t("Amount must be positive and fit uint256.");return s}function G(e){if(typeof e!="bigint"||e<0n||e>=1n<<256n)throw new t("Invalid vault amount read.");return e}function H(e,s,o){return["mint",s==="steakhouse"?"redeem":"withdraw_assets"].map(l=>{let n=l==="mint",w=l==="redeem",h=n||w?"shares":"amount",C={type:"string",pattern:"^[0-9]+$"};return{name:`${s}_${l}`,inputSchema:{type:"object",additionalProperties:!1,required:n?["shares","maxAssets"]:[h],properties:{[h]:C,...n?{maxAssets:C}:{}}},execute:async(y,r)=>{try{if(S(r),Object.keys(y).some(b=>![h,...n?["maxAssets"]:[]].includes(b)))throw new t("Unexpected vault amount argument.");let i=M(y[h]),E=n?M(y.maxAssets):void 0,u=e.clientFor(a);if(await u.getChainId()!==a)throw new t("Vault amount actions require chain 4663.");let[T,O,P]=await Promise.all([u.readContract({address:o,abi:f,functionName:"asset"}),u.readContract({address:o,abi:f,functionName:"decimals"}),u.readContract({address:m(p),abi:U,functionName:"decimals"})]);if(typeof T!="string"||m(T)!==m(p)||O!==18||P!==6)throw new t("Vault amount actions require canonical USDG and the evidenced 18-decimal shares.");let c=G(await u.readContract({address:o,abi:f,functionName:n?"previewMint":w?"previewRedeem":"previewWithdraw",args:[i]}));if(c===0n)throw new t("The vault returned a zero amount quote.");if(n&&c>E)throw new t("The mint quote exceeds maxAssets.");let D=n?void 0:G(await u.readContract({address:o,abi:U,functionName:"balanceOf",args:[r]}));if(!n&&(w?i:c)>D)throw new t("The wallet share balance cannot cover this exit.");let R=n?$({abi:f,functionName:"mint",args:[i,r]}):w?$({abi:f,functionName:"redeem",args:[i,r,r]}):$({abi:f,functionName:"withdraw",args:[i,r,r]}),I=`${l} ${i} ${h==="shares"?"18-decimal share":"6-decimal USDG"} base units from ${s}; beneficiary ${r}.`,k=[...n?[e.approval(m(p),o,c.toString(),a)]:[],e.unsignedTx({to:o,data:R,value:"0",chainId:a,description:I})],x=await e.preview(k,r),A={address:m(p),chainId:a,symbol:"USDG",decimals:6},v={address:m(o),chainId:a,symbol:`${s} shares`,decimals:18},d=b=>x.changes.filter(g=>g.token.chainId===a&&g.token.address.toLowerCase()===b.address.toLowerCase()).reduce((g,q)=>{if(q.token.decimals!==b.decimals||!/^-?\d+$/.test(q.amount))throw new t("Invalid vault preview metadata.");return g+BigInt(q.amount)},0n);if(n?d(A)!==-c||d(v)!==i:w?d(v)!==-i||d(A)<=0n:d(A)!==i||-d(v)<=0n||-d(v)>D)throw new t("The preview does not match the requested vault amount and share balance.");return{txs:k,preview:x,summary:`${I} Quoted counterpart ${c} base units. ${x.summary} Standard ERC-4626 encodes no receipt minimum. Mint approvals use the exact current quote; accrual can require a new quote. Plain exits depend on available liquidity; use a separately previewed full force exit if required.`}}catch(i){throw new t(e.plainError(i))}}}})}export{H as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A}from"./N6RL3SUZ.js";import{a,b as g,c as b,e as w,f as x,g as h}from"./64AF7ECA.js";import{a as r}from"./UWOFA6GV.js";import{c as y}from"./73N3TOJL.js";import{a as m}from"./XPFVT2EA.js";import{a as i}from"./5YS5V2LK.js";import{encodeAbiParameters as S,encodeFunctionData as B,encodePacked as T,erc20Abi as I,getAddress as q,parseAbi as C,parseAbiParameters as N,zeroAddress as R}from"viem";var O=q("0x0000ffffbe8efe702c8703ae3477ff5de3d319c0"),$=N("(address currency,address tokensRecipient,address fundsRecipient,uint64 startBlock,uint64 endBlock,uint64 claimBlock,uint256 tickSpacing,address validationHook,uint256 floorPrice,uint128 requiredCurrencyRaised,bytes auctionStepsData)"),P=C(["function create(address token,uint256 amount,bytes configData,bytes32 salt) returns (address)","function getAddress(address token,uint256 amount,bytes configData,bytes32 salt,address sender) view returns (address)"]),Q=C(["function distributeToken(address token,(address strategy,uint128 amount,bytes configData) distribution,bytes32 salt) payable"]),v={token:y,amount:r(),currency:y,startBlock:r(),endBlock:r(),claimBlock:r(),tickSpacing:r(),floorPrice:r(),requiredCurrencyRaised:r(),salt:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$"},steps:{type:"array",minItems:1,maxItems:100,items:{type:"object",additionalProperties:!1,required:["mps","duration"],properties:{mps:r(),duration:r()}}}};function D(e,t){let s=a(e.startBlock,"startBlock",64),o=a(e.endBlock,"endBlock",64),c=a(e.claimBlock,"claimBlock",64);if(o<=s||c<o)throw new i("Auction needs startBlock < endBlock <= claimBlock.");if(!Array.isArray(e.steps)||e.steps.length<1||e.steps.length>100)throw new i("Provide 1 to 100 issuance steps.");let u="0x",p=0n,l=0n;for(let d of e.steps){if(!d||typeof d!="object"||Array.isArray(d))throw new i("Each step requires mps and duration decimal strings.");h(d,["mps","duration"]);let n=d,k=a(n.mps,"mps",24,!0),f=a(n.duration,"duration",40);u=`${u}${T(["uint24","uint40"],[Number(k),Number(f)]).slice(2)}`,l+=k*f,p+=f}if(l!==10000000n||p!==o-s)throw new i("Issuance must total exactly 10000000 MPS and its durations must equal endBlock - startBlock.");return S($,[{currency:b(e.currency),tokensRecipient:t,fundsRecipient:t,startBlock:s,endBlock:o,claimBlock:c,tickSpacing:a(e.tickSpacing,"tickSpacing"),validationHook:R,floorPrice:a(e.floorPrice,"floorPrice"),requiredCurrencyRaised:a(e.requiredCurrencyRaised??"0","requiredCurrencyRaised",128,!0),auctionStepsData:u}])}function U(e){return{tools:[{name:"uniswap_create_auction",inputSchema:{type:"object",additionalProperties:!1,required:["token","amount","currency","startBlock","endBlock","claimBlock","tickSpacing","floorPrice","steps","salt"],properties:v},async execute(t,s){h(t,Object.keys(v));let o=g(t.token),c=a(t.amount,"amount",128);if(o===R||o===b(t.currency))throw new i("Auction sale token must be an ERC-20 distinct from its payment currency.");let u=D(t,s);if(typeof t.salt!="string"||!/^0x[0-9a-fA-F]{64}$/.test(t.salt))throw new i("Provide a 32-byte deployment salt.");let p=t.salt,l=e.clientFor(m),d=await l.getBlockNumber();if(BigInt(String(t.startBlock))<=d)throw new i("Choose a future auction startBlock with time for confirmation and approvals.");let n=await l.readContract({address:A,abi:P,functionName:"getAddress",args:[o,c,u,p,s]});if((await l.getCode({address:n})??"0x")!=="0x")throw new i("This auction already exists; choose a fresh salt or configuration.");let k=await w(e,o),f=[e.unsignedTx({to:A,data:B({abi:P,functionName:"create",args:[o,c,u,p]}),value:"0",chainId:m,description:`Create CCA ${n}; proceeds and unsold tokens go to ${s}.`}),e.unsignedTx({to:o,data:B({abi:I,functionName:"transfer",args:[n,c]}),value:"0",chainId:m,description:`Fund the factory-predicted auction ${n} with exactly ${c} base units of ${o}.`}),e.unsignedTx({to:n,data:B({abi:C(["function onTokensReceived()"]),functionName:"onTokensReceived"}),value:"0",chainId:m,description:`Activate CCA ${n} after its sale tokens arrive.`})];return{...await x(e,f,s,"Create/fund/activate a standalone CCA in three separately confirmed transactions, not an LBP-managed liquidity launch. If interrupted, inspect the predicted address and journal before recovery; do not transfer tokens twice. Raw prices are payment-base-units per sale-token-base-unit in Q96. No validation hook or off-chain signature; all proceeds and unsold tokens go to the signing wallet."),auction:n,sale:{token:k,amount:c.toString()}}}}]}}export{O as a,$ as b,P as c,Q as d,D as e,U as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as s,g as u,k as v}from"./C3TJLARP.js";import{a as y}from"./5YS5V2LK.js";var k=["L2Book","Ticker","TradeFill","SubaccountLiquidation","PositionUpdate","OrderUpdate","OrderFill","TokenTransfer"],A=p=>({tools:[{name:"meridian_perps_stream",inputSchema:{type:"object",additionalProperties:!1,required:["stream"],description:"Read a bounded sample of an official perps WebSocket stream, then close. Empty timed-out samples do not prove no activity. L2Book starts with up to 100 levels per side, followed by deltas.",properties:{stream:{type:"string",enum:k},symbol:{type:"string",pattern:"^[A-Za-z0-9]{1,32}$"},subaccountId:{type:"string",format:"uuid"},maxEvents:{type:"integer",minimum:1,maximum:20,default:1},timeoutSeconds:{type:"integer",minimum:1,maximum:30,default:10}}},execute:async e=>{try{p.network==="testnet"&&s("Meridian perps streams require mainnet."),(Object.keys(e).some(c=>!["stream","symbol","subaccountId","maxEvents","timeoutSeconds"].includes(c))||!k.includes(e.stream))&&s("Choose a Meridian perps stream from the schema.");let i=["L2Book","Ticker","TradeFill"].includes(String(e.stream)),M=i?{type:e.stream,symbol:e.symbol}:{type:e.stream,subaccountId:v(e.subaccountId)};(i?e.subaccountId!==void 0||typeof e.symbol!="string"||!/^[A-Za-z0-9]{1,32}$/.test(e.symbol):e.symbol!==void 0)&&s("Market streams need symbol only; account streams need subaccountId only.");let o=e.maxEvents??1,d=e.timeoutSeconds??10;return(typeof o!="number"||!Number.isInteger(o)||o<1||o>20||typeof d!="number"||!Number.isInteger(d)||d<1||d>30)&&s("Choose 1\u201320 events and a timeout of 1\u201330 seconds."),await new Promise((c,S)=>{let n=new globalThis.WebSocket("wss://ws.meridian.xyz/v1/stream"),l=[],h=!1,f=!1,b,m=(a,r=!1)=>{if(!f){f=!0,clearTimeout(I);try{n.readyState<2&&n.close()}catch{}a?S(new y(a)):c({chainId:4663,stream:e.stream,events:l,timedOut:r,scope:"Bounded event sample; no durable subscription or complete history. L2Book events after the first are absolute-quantity deltas; zero removes a level."})}},I=setTimeout(()=>m(h?void 0:"Meridian perps stream did not connect.",!0),d*1e3);n.addEventListener("open",()=>{h=!0,n.send(JSON.stringify({event:"subscribe",data:M}))}),n.addEventListener("error",()=>m("Meridian perps stream is unavailable; retry or inspect the HTTP history.")),n.addEventListener("close",()=>m("Meridian perps stream closed before the requested sample completed.")),n.addEventListener("message",a=>{if(!f)try{(typeof a.data!="string"||a.data.length>262144)&&s("Meridian perps stream returned an oversized or invalid message.");let r=u(JSON.parse(a.data));if(r.ok===!1&&s("Meridian perps stream rejected the subscription. Verify the symbol, subaccount and subscription limits."),r.e==="pong"||r.ok===!0&&r.e===void 0)return;(r.e!==e.stream||typeof r.t!="number"||!Number.isSafeInteger(r.t))&&s("Meridian perps stream returned a different or invalid event.");let t=u(r.data);if(i&&t.s!==e.symbol&&s("Meridian perps stream returned a different product."),!i){let w=Array.isArray(t.d)?t.d.map(u):[t];(!(e.stream==="SubaccountLiquidation"?t.sid===e.subaccountId:w.every(E=>E.sid===e.subaccountId))||t.sid!==void 0&&t.sid!==e.subaccountId)&&s("Meridian perps stream returned a different subaccount.")}e.stream==="L2Book"&&((typeof t.t!="number"||!Number.isSafeInteger(t.t)||t.t<0||!Array.isArray(t.a)||!Array.isArray(t.b))&&s("Meridian perps book snapshot is malformed."),b!==void 0&&t.pt!==void 0&&t.pt!==b&&s("Meridian perps book updates have a gap. Request a fresh snapshot."),b=t.t),l.push(r),l.length>=o&&m()}catch(r){m(p.plainError(r))}})})}catch(i){throw new y(p.plainError(i))}}}]});export{k as a,A as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as M}from"./7LDAJ6BM.js";import{a as U}from"./6HV5BR7P.js";import{b as I}from"./ZPM2MFXZ.js";import{b as C}from"./AXYOJBX6.js";import{a as W}from"./6IM6A5VA.js";import{a as P}from"./UWOFA6GV.js";import{g as $}from"./73N3TOJL.js";import{a as R}from"./RETS2ZEK.js";import{a as h,d as D,i as T,j as b}from"./XPFVT2EA.js";import{a as p}from"./5YS5V2LK.js";import{encodeFunctionData as A,erc20Abi as O,parseAbi as E}from"viem";var f=T[h].vaults.spark.address,i={address:b,chainId:h,symbol:"USDG",decimals:D},u={address:f,chainId:h,symbol:"spUSDG",decimals:6},G=(1n<<256n)-1n,k=E(["function asset() view returns (address)","function decimals() view returns (uint8)","function totalAssets() view returns (uint256)","function balanceOf(address owner) view returns (uint256)","function maxDeposit(address receiver) view returns (uint256)","function maxWithdraw(address owner) view returns (uint256)","function maxRedeem(address owner) view returns (uint256)","function previewDeposit(uint256 assets) view returns (uint256)","function previewWithdraw(uint256 assets) view returns (uint256)","function previewRedeem(uint256 shares) view returns (uint256)","function deposit(uint256 assets,address receiver) returns (uint256 shares)","function withdraw(uint256 assets,address receiver,address owner) returns (uint256 shares)","function redeem(uint256 shares,address receiver,address owner) returns (uint256 assets)"]),t=(s,l)=>({token:{...s},amount:l.toString()});function y(s,l,v=!1){if(!s||typeof s!="object"||Array.isArray(s)||Object.keys(s).some(S=>!l||S!=="amount"))throw new p(l?"Provide only the amount for this Spark action.":"Spark listing takes no arguments.");if(!l)return 0n;if(v&&s.amount==="max")return"max";if(typeof s.amount!="string")throw new p("Amount must be a positive integer string in base units.");let n=R(s.amount);if(n===0n||n>G)throw new p("Amount must be positive and within the uint256 range.");return n}var N=s=>{async function l(a){try{return await a()}catch(e){throw new p(s.plainError(e))}}async function v(a){W(a);let e=s.clientFor(h);if(await e.getChainId()!==h)throw new p("Spark requires an endpoint on chain 4663.");let[r,c,o]=await Promise.all([e.readContract({address:f,abi:k,functionName:"asset"}),e.readContract({address:f,abi:k,functionName:"decimals"}),e.readContract({address:b,abi:O,functionName:"decimals"})]);if(typeof r!="string"||!$(r,b))throw new p("Spark does not report the expected USDG asset on chain 4663.");if(c!==u.decimals||o!==i.decimals)throw new p("Spark shares and USDG must both have 6 decimals.");return async(d,x=[])=>{let m=await e.readContract({address:f,abi:k,functionName:d,args:x});if(typeof m!="bigint"||m<0n||m>G)throw new p(`Spark returned an invalid ${d} value.`);return m}}function n(a){let e=a.amount.startsWith("-"),r=e?a.amount.slice(1):a.amount;return`${e?"-":""}${s.formatAmount(r,a.token.decimals)} ${a.token.symbol}`}async function S(a,e,r,c){let o=await s.preview(a,e),d=o.changes.map(n).join(", ");return{txs:a,amounts:r,preview:o,summary:`${c} Preview values can change before execution. ${o.summary}${d?` Changes: ${d}.`:""}`}}return{positions:a=>l(async()=>{let e=await v(a),r=await e("balanceOf",[a]);if(r===0n)return[];let[c,o,d]=await Promise.all([e("previewRedeem",[r]),e("maxRedeem",[a]),e("maxWithdraw",[a])]);return[{module:"spark",id:`${h}:${f}`,chainId:h,assets:[t(u,r)],description:`${n(t(u,r))}; redeem preview ${n(t(i,c))} (rounded down). Current maximum redeem ${n(t(u,o))}; maximum withdrawal ${n(t(i,d))}.`}]}),tools:[I(s),...M(s),...U(s),{name:"spark_list",inputSchema:{type:"object",properties:{},additionalProperties:!1},execute:(a,e)=>l(async()=>{y(a,!1);let r=await v(e),c=await r("totalAssets"),[o,d,x,m,w]=await Promise.all([r("balanceOf",[e]),r("maxDeposit",[e]),r("maxWithdraw",[e]),r("maxRedeem",[e]),r("previewDeposit",[1000000n])]),g=await r("previewRedeem",[o]);return[{chainId:h,address:f,name:"Spark Savings USDG",asset:{...i},shareToken:{...u},totalAssets:t(i,c),balance:t(u,o),maxDeposit:t(i,d),maxWithdraw:t(i,x),maxRedeem:t(u,m),previewDepositAssets:t(i,1000000n),previewDeposit:t(u,w),previewRedeemShares:t(u,o),previewRedeem:t(i,g),rounding:"Deposit shares and redeemed assets round down; exact-asset withdrawals round shares up. Previews can change before execution."}]})},{name:"spark_deposit",inputSchema:{type:"object",properties:{amount:P("Positive USDG base-unit integer (6 decimals).")},required:["amount"],additionalProperties:!1},execute:(a,e)=>l(async()=>{let r=y(a,!0),c=await v(e),[o,d]=await Promise.all([c("maxDeposit",[e]),c("previewDeposit",[r])]);if(r>o)throw new p("The deposit exceeds Spark\u2019s current maximum deposit.");if(d===0n)throw new p("This deposit would return zero Spark shares.");let x=[s.approval(b,f,r.toString(),h),s.unsignedTx({to:f,data:A({abi:k,functionName:"deposit",args:[r,e]}),value:"0",chainId:h,description:`Deposit ${n(t(i,r))} into Spark for this wallet.`})];return S(x,e,{assets:t(i,r),shares:t(u,d),maxDeposit:t(i,o)},`Approve exactly ${n(t(i,r))} for Spark ${f}, then deposit. Expected ${n(t(u,d))}, rounded down; current maximum deposit ${n(t(i,o))}.`)})},{name:"spark_withdraw",inputSchema:{type:"object",properties:{amount:{type:"string",anyOf:[{pattern:"^[0-9]+$"},{const:"max"}],description:"Positive USDG base-unit integer (6 decimals), or max to redeem all held shares."}},required:["amount"],additionalProperties:!1},execute:(a,e)=>l(async()=>{let r=y(a,!0,!0),c=await v(e),[o,d,x]=await Promise.all([c("balanceOf",[e]),c("maxWithdraw",[e]),c("maxRedeem",[e])]);if(o===0n)throw new p("This wallet has no Spark shares to withdraw.");let m,w,g;if(r==="max"){if(w=o,w>x)throw new p("The full share balance exceeds Spark\u2019s current maximum redeem. Request an asset amount within the current maximum withdrawal.");m=await c("previewRedeem",[w]),g=A({abi:k,functionName:"redeem",args:[w,e,e]})}else{if(m=r,m>d)throw new p("The withdrawal exceeds Spark\u2019s current maximum withdrawal.");if(w=await c("previewWithdraw",[m]),w>o)throw new p("This wallet has insufficient Spark shares for the withdrawal.");g=A({abi:k,functionName:"withdraw",args:[m,e,e]})}if(m===0n||w===0n)throw new p("Spark returned a zero asset or share preview for this withdrawal.");let _=r==="max"?`Redeem all ${n(t(u,w))} from Spark to this wallet.`:`Withdraw ${n(t(i,m))} from Spark to this wallet.`,j=[s.unsignedTx({to:f,data:g,value:"0",chainId:h,description:_})];return S(j,e,{assets:t(i,m),shares:t(u,w),maxWithdraw:t(i,d),maxRedeem:t(u,x)},r==="max"?`Redeem all ${n(t(u,w))} for an expected ${n(t(i,m))}, rounded down. Current maximum redeem ${n(t(u,x))}.`:`Withdraw ${n(t(i,m))} using an expected ${n(t(u,w))}, rounded up. Current maximum withdrawal ${n(t(i,d))}.`)})}]}};function Z(s){return C("spark",[N(s)])}export{N as a,Z as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k,h as V}from"./R7D256HG.js";import{a as h}from"./FSPNOVKB.js";import{a as P,v as O}from"./ANQ43XJA.js";import{a as g,b as f,f as M,g as A}from"./64AF7ECA.js";import{a as b}from"./UWOFA6GV.js";import{c as _,g as T}from"./73N3TOJL.js";import{a as y}from"./XPFVT2EA.js";import{a as l}from"./5YS5V2LK.js";import{encodeFunctionData as c,parseAbi as j,zeroAddress as I}from"viem";var n=j(["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)"]),E=["set_fee_recipient","set_fee_setter","set_owner","enable_fee","set_pool_fee","collect_protocol","set_controller"],R={version:{type:"string",enum:["v2","v3","v4"]},operation:{type:"string",enum:E},target:_,token0:_,token1:_,fee:{type:"integer"},tickSpacing:{type:"integer"},fee0:{type:"integer"},fee1:{type:"integer"},currency:_,amount:b(),amount0Max:b(),amount1Max:b(),poolKey:{type:"object"}};function L(w){let x=async e=>{let i=w.clientFor(y);if(e==="v2"){let[o,t]=await Promise.all([i.readContract({address:h,abi:n,functionName:"feeToSetter"}),i.readContract({address:h,abi:n,functionName:"feeTo"})]);return{version:e,contract:h,owner:o,feeRecipient:t}}if(e==="v3")return{version:e,contract:k.factory,owner:await i.readContract({address:k.factory,abi:n,functionName:"owner"})};if(e==="v4"){let[o,t]=await Promise.all([i.readContract({address:P,abi:n,functionName:"owner"}),i.readContract({address:P,abi:n,functionName:"protocolFeeController"})]);return{version:e,contract:P,owner:o,controller:t}}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:R.version}},async execute(e){return A(e,["version"]),x(e.version)}},{name:"uniswap_protocol_admin",inputSchema:{type:"object",additionalProperties:!1,required:["version","operation"],properties:R},async execute(e,i){let{version:o,operation:t}=e,v=await x(o),K=w.clientFor(y),C=o==="v4"&&["set_pool_fee","collect_protocol"].includes(String(t))?"controller"in v?v.controller:void 0:v.owner;if(!C||!T(C,i))throw new l("The signing wallet does not hold the required Uniswap owner/controller role.");let N=v.contract,s,a,F=()=>{let r=f(e.target);if(r===I)throw new l("Administration target must be nonzero.");return r},u=(r,d,p,m)=>{if(typeof r!="number"||!Number.isInteger(r)||r<p||r>m)throw new l(`${d} must be an integer from ${p} to ${m}.`);return r};if(o==="v2"&&t==="set_fee_recipient")a=["target"],s=c({abi:n,functionName:"setFeeTo",args:[f(e.target)]});else if(o==="v2"&&t==="set_fee_setter")a=["target"],s=c({abi:n,functionName:"setFeeToSetter",args:[F()]});else if(o==="v3"&&t==="set_owner")a=["target"],s=c({abi:n,functionName:"setOwner",args:[F()]});else if(o==="v3"&&t==="enable_fee")a=["fee","tickSpacing"],s=c({abi:n,functionName:"enableFeeAmount",args:[u(e.fee,"fee",0,999999),u(e.tickSpacing,"tickSpacing",1,16383)]});else if(o==="v3"&&["set_pool_fee","collect_protocol"].includes(String(t))){a=["token0","token1","fee",...t==="set_pool_fee"?["fee0","fee1"]:["amount0Max","amount1Max"]];let r=f(e.token0),d=f(e.token1),p=u(e.fee,"fee",0,999999);if(N=await K.readContract({address:k.factory,abi:V,functionName:"getPool",args:[r,d,p]}),N===I)throw new l("No factory-verified v3 pool exists for these tokens and fee.");if(t==="set_pool_fee"){let m=$=>{let S=u($,"fee divisor",0,10);if(S!==0&&S<4)throw new l("V3 protocol fee divisors must be zero or 4 through 10.");return S};s=c({abi:n,functionName:"setFeeProtocol",args:[m(e.fee0),m(e.fee1)]})}else s=c({abi:n,functionName:"collectProtocol",args:[i,g(e.amount0Max,"amount0Max",128,!0),g(e.amount1Max,"amount1Max",128,!0)]})}else if(o==="v4"&&t==="set_owner")a=["target"],s=c({abi:n,functionName:"transferOwnership",args:[F()]});else if(o==="v4"&&t==="set_controller")a=["target"],s=c({abi:n,functionName:"setProtocolFeeController",args:[f(e.target)]});else if(o==="v4"&&t==="set_pool_fee"){a=["poolKey","fee0","fee1"];let r=O(e.poolKey),d=u(e.fee0,"fee0 pips",0,1e3),p=u(e.fee1,"fee1 pips",0,1e3);s=c({abi:n,functionName:"setProtocolFee",args:[r,d+(p<<12)]})}else if(o==="v4"&&t==="collect_protocol")a=["currency","amount"],s=c({abi:n,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 A(e,["version","operation",...a]),M(w,[w.unsignedTx({to:N,data:s,value:"0",chainId:y,description:`Uniswap ${o} protocol administration: ${t}. 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{n as a,L as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ie,b as le,c as ce,d as Z}from"./AFHHRDPJ.js";import{a as E,b as Y}from"./D6VP3N27.js";import{c as ae}from"./MYBDO5SA.js";import{a as X}from"./UWOFA6GV.js";import{b as B,c as C,d as se,e as h,g as v,i as oe}from"./73N3TOJL.js";import{a as w,i as ne,l as F,n as re}from"./XPFVT2EA.js";import{a as T}from"./5YS5V2LK.js";import{a as I}from"./JXOEJPJ4.js";import{erc20Abi as M,getAddress as f,parseAbi as L,zeroAddress as ee}from"viem";var x="https://ponsfamily.com/api",de="https://balancesapi.ponsfamily.com/v1",Q=L(["function sellableTokens() view returns (uint256)","function reservedTokens() view returns (uint256)","function readyToGraduate() view returns (bool)","function graduated() view returns (bool)","function currentSnipeTaxBps(address) view returns (uint256)"]),be=L(["event CurveBuy(address indexed buyer, address indexed recipient, uint256 quoteIn, uint256 tokensOut, uint256 fee, uint256 tax)","event CurveSell(address indexed seller, address indexed recipient, uint256 tokensIn, uint256 quoteOut, uint256 fee, uint256 tax)"]),ye=L(["function pendingCreatorFeeRecipient(address) view returns (address,uint256,uint256)"]),he=L(["function getTokenInfo() view returns (address,string,string,(string,string,string,string,string))"]),ue=L(["function totalLocked(address) view returns (uint256)","function totalReleased(address) view returns (uint256)","function vestedAmount(address) view returns (uint256)","function releasable(address) view returns (uint256)","function vestingStart(address) view returns (uint256)","function VESTING_DURATION() view returns (uint256)"]),ge=10000n,me=2000n,ke=/^[0-9]{1,78}$/,m=e=>typeof e=="number"&&Number.isFinite(e)?e:null,$=(e,t=80)=>typeof e=="string"?I(e.slice(0,t)):null;function P(e,t="address"){return oe(e,`Provide a ${t}.`,se)}function j(e,t,o){let s=e??t;if(typeof s!="number"||!Number.isInteger(s)||s<1||s>o)throw new T(`Choose a limit from 1 to ${o}.`);return s}function O(e,t=0){return e===null||typeof e=="boolean"?e:typeof e=="number"?Number.isFinite(e)?e:null:typeof e=="string"?I(e.slice(0,80)):t>=3?null:Array.isArray(e)?{total:e.length,items:e.slice(0,10).map(o=>O(o,t+1))}:h(e)?Object.fromEntries(Object.entries(e).filter(([o])=>/^[A-Za-z0-9_]{1,40}$/.test(o)).slice(0,40).map(([o,s])=>[o,O(s,t+1)])):null}async function U(e,t,o){return ae(e.http,t,{method:"GET",redirect:"error",headers:{accept:"application/json"}},o)}async function J(e,t,o){let s=e.clientFor(w),[c,a]=await Promise.all([s.readContract({address:t,abi:M,functionName:"symbol",blockNumber:o}),s.readContract({address:t,abi:M,functionName:"decimals",blockNumber:o})]);return{address:t,chainId:w,symbol:I(c),decimals:a}}async function we(e,t){let o=P(t.token,"Pons launch token address"),s=t.holder===void 0?void 0:P(t.holder,"holder address"),c=j(t.limit,20,50),{offset:a,fingerprint:l}=ce(t.cursor),r=e.clientFor(w),p=await r.getBlockNumber({cacheTime:0}),g=await E(e,o,p),i=await le(e,o),n=await r.getBlockNumber({cacheTime:0});if(l&&l!==i.fingerprint)throw new T("The Pons holder index changed. Retry pons_holders without a cursor.");let u=i.body,k=[{wallet:ee,reason:"burn (zero address)"},{wallet:f("0x000000000000000000000000000000000000dead"),reason:"burn (dead address)"},{wallet:f(g.curve),reason:"Pons bonding curve"},{wallet:f(re),reason:"Uniswap v4 pool manager (shared pool custody)"}],N=new Map(k.map(d=>[d.wallet,d.reason])),R=i.rows.filter(d=>!N.has(f(d.wallet))),[G,q]=await Promise.all([J(e,o,n),r.readContract({address:o,abi:M,functionName:"totalSupply",blockNumber:n})]),W=d=>1+R.filter(b=>BigInt(b.balance)>BigInt(d)).length,_=async(d,b)=>{let D=await r.readContract({address:o,abi:M,functionName:"balanceOf",args:[d],blockNumber:n});return{wallet:d,indexedBalance:b,indexedRank:b===null||N.has(d)?null:W(b),indexedShareOfSupply:b===null?null:Z(b,u.supply),shareOfSupply:Z(D.toString(),q.toString()),balance:{token:G,amount:D.toString()},matchesIndex:b===null?null:D.toString()===b}},A=await Promise.all(R.slice(a,a+c).map(async d=>({...await _(f(d.wallet),d.balance),share:m(d.share),label:$(d.label,40)}))),V=s?i.rows.find(d=>v(d.wallet,s)):void 0,H=s?{...await _(s,V?.balance??null),excluded:N.get(s)??null,rankStatus:N.has(s)?"excluded":V?"ranked by indexed balance":"absent from index; rank unknown"}:void 0;return{token:G,statusBlock:n.toString(),totalSupply:q.toString(),holderCount:R.length,indexHolderCount:u.holders,indexSupply:u.supply,burned:u.burned,circulating:u.circulating,page:A,nextCursor:a+c<R.length?`holders_${a+c}_${i.fingerprint}`:null,...H?{wallet:H}:{},exclusions:k.map(d=>({...d,indexedBalance:i.rows.find(b=>v(b.wallet,d.wallet))?.balance??"0",countedInIndex:i.rows.some(b=>v(b.wallet,d.wallet))})),indexAsOf:{rollupBucket:u.as_of.rollup_bucket,tailFromBlock:u.as_of.tail_from_block},indexFetchedAt:i.fetchedAt,source:`${ie}/tokens/{token}/holders`,sources:{holderCount:"Pons balances index, excluding the labelled system addresses",rank:"Pons balances index, descending balance; equal balances share a rank, system addresses excluded",indexedShareOfSupply:"Pons indexed balance / indexed total supply",balance:`on-chain balanceOf at block ${n}`,totalSupply:`on-chain totalSupply at block ${n}`,shareOfSupply:`on-chain balanceOf / totalSupply at block ${n}`,burned:"Pons balances index",circulating:"Pons balances index"},note:"Counts, ranking, burned and circulating supply come from Pons\u2019s balances index, not on-chain truth. The API does not pin pages to a block; its rollup/tail markers are not an exact snapshot block. Each listed balance was re-read on chain at statusBlock. matchesIndex false indicates disagreement, not proof of which source is wrong. A wallet absent from the index has unknown rank even if its on-chain balance is positive. Labels are untrusted."}}var ve=e=>h(e)&&Array.isArray(e.items)&&e.items.length<=500&&e.items.every(t=>h(t)&&typeof t.token=="string"&&B.test(t.token)&&typeof t.amountTokens=="number");async function xe(e,t,o){let s=P(t.holder??o,"holder address"),c=j(t.limit,20,40),a=e.clientFor(w),l=await U(e,`${x}/profile/${s.toLowerCase()}?view=positions`,ve),r=await a.getBlockNumber({cacheTime:0}),p=[...new Map(l.items.filter(n=>n.amountTokens>0||n.state==="open").map(n=>[n.token.toLowerCase(),n])).values()],g=await Promise.all(p.slice(0,c).map(async n=>{let u=f(n.token);try{await E(e,u,r);let[k,N]=await Promise.all([J(e,u,r),a.readContract({address:u,abi:M,functionName:"balanceOf",args:[s],blockNumber:r})]);return{ok:!0,token:u,meta:k,balance:N,item:n}}catch{return{ok:!1}}})),i=g.filter(n=>n.ok);return{holder:s,statusBlock:r.toString(),source:`${x}/profile/{holder}?view=positions`,holdings:i.map(n=>({token:n.meta,balance:{token:n.meta,amount:n.balance.toString()},index:{state:$(n.item.state,20),valueUsd:m(n.item.valueUsd),investedUsd:m(n.item.investedUsd),totalPnlUsd:m(n.item.totalPnlUsd),totalPnlPct:m(n.item.totalPnlPct),buys:m(n.item.buys),sells:m(n.item.sells),lastTradeAt:m(n.item.lastTradeAt)}})),excludedUnverified:g.length-i.length,truncated:p.length>c,note:"Discovery through Pons\u2019s positions index; every launch was re-read from the pinned factory and every balance is an on-chain read. USD value and profit and loss are index estimates, not execution quotes. Sell the on-chain balance with pons_sell."}}var Ae=e=>h(e)&&Array.isArray(e.items)&&e.items.length<=100&&e.items.every(t=>h(t)&&h(t.launch)&&typeof t.launch.address=="string"&&B.test(t.launch.address)&&typeof t.launch.factory=="string"&&B.test(t.launch.factory));async function Se(e,t){let o=j(t.limit,10,20),s=await U(e,`${x}/launches/trending`,Ae),c=s.items.filter(r=>v(r.launch.factory,F)).slice(0,o),a=await e.clientFor(w).getBlockNumber({cacheTime:0});return{items:await Promise.all(c.map(async r=>({status:await Y(e,f(r.launch.address),a),index:{volumeUsd:m(r.volumeUsd),trades:m(r.trades),traders:m(r.traders),change:m(r.change)}}))),statusBlock:a.toString(),source:`${x}/launches/trending`,excludedOtherFactories:s.items.length-s.items.filter(r=>v(r.launch.factory,F)).length,note:"Ranking is Pons\u2019s own trending list (discovery only); each launch was re-read on chain from the pinned factory."}}var z={overview:"analytics",burn:"analytics/burn",buyback:"analytics/buyback"};async function Te(e,t){let o=t.view??"overview";if(typeof o!="string"||!Object.hasOwn(z,o))throw new T("Choose view overview, burn or buyback.");let s=await U(e,`${x}/${z[o]}`,h);if(o==="overview"){let c=Array.isArray(s.series)?s.series:[];return{view:o,source:`${x}/analytics`,generatedAt:m(s.generatedAt),latestDay:m(s.latestDay),latest:O(c.at(-1)),seriesDays:c.length,today:O(s.today),earnings:O(s.earnings),indexer:O(s.indexer),note:"Protocol-wide figures from Pons\u2019s analytics index; unaudited aggregates, not a quote."}}return{view:o,source:`${x}/${z[o]}`,data:O(s),note:"Protocol-wide figures from Pons\u2019s analytics index; unaudited aggregates, not a quote."}}var Ce=e=>h(e)&&typeof e.wallet=="string"&&Array.isArray(e.items)&&e.items.length<=100&&e.items.every(t=>h(t)&&typeof t.kind=="string")&&(e.next===null||e.next===void 0||typeof e.next=="string");async function Pe(e,t,o){let s=P(t.wallet??o,"wallet address"),c=`${de}/wallets/${s.toLowerCase()}/activity`;if(t.cursor!==void 0){if(typeof t.cursor!="string"||!/^[0-9]{1,12}-[0-9]{1,6}$/.test(t.cursor))throw new T("Use the nextCursor returned by the previous pons_activity page.");c+=`/before/${t.cursor}`}let a=await U(e,c,Ce),l=typeof a.next=="string"?/\/before\/([0-9]{1,12}-[0-9]{1,6})$/.exec(a.next):null;return{wallet:s,source:`${de}/wallets/{wallet}/activity`,nextCursor:l?.[1]??null,items:a.items.map(r=>({kind:$(r.kind,24),block:m(r.block),time:m(r.time),tx:typeof r.tx=="string"&&/^0x[0-9a-fA-F]{64}$/.test(r.tx)?r.tx:null,token:typeof r.token=="string"&&B.test(r.token)?f(r.token):null,symbol:$(r.symbol,24),amount:typeof r.amount=="string"&&ke.test(r.amount)?r.amount:null,decimals:m(r.decimals),usd:m(r.usd),counterparty:typeof r.counterparty=="string"&&B.test(r.counterparty)?f(r.counterparty):null,counterpartyLabel:$(r.counterparty_label,40)})),note:"Wallet history from Pons\u2019s balances index (discovery and bookkeeping, not proof); USD figures are index estimates. Verify a transaction by hash before relying on it."}}async function Ne(e,t,o){let s=P(t.address??o,"wallet address"),c=j(t.limit,10,20),a=await U(e,`${x}/profile/${s.toLowerCase()}?view=card`,h),l=h(a.identity)?a.identity:{},r=await U(e,`${x}/launches?deployer=${s.toLowerCase()}&limit=${c}`,i=>h(i)&&Array.isArray(i.items)&&i.items.length<=100&&i.items.every(n=>h(n)&&typeof n.address=="string"&&B.test(n.address)&&typeof n.factory=="string"&&B.test(n.factory))),p=await e.clientFor(w).getBlockNumber({cacheTime:0}),g=r.items.filter(i=>v(i.factory,F)).slice(0,c);return{address:s,hidden:a.hidden===!0,source:`${x}/profile/{address}?view=card`,identity:{username:$(l.username,40),displayName:$(l.displayName,60),description:$(l.description,200),joinedAt:m(l.joinedAt)},launches:await Promise.all(g.map(i=>Y(e,f(i.address),p))),statusBlock:p.toString(),note:"Profile text is user-supplied and untrusted. Created launches come from Pons\u2019s index and were re-read on chain from the pinned factory."}}async function _e(e,t,o){let s=P(t.token,"Pons launch token address"),c=P(t.holder??o,"holder address"),a=e.clientFor(w),l=await a.getBlockNumber({cacheTime:0}),r=await E(e,s,l),p=ne[w].pons.buybackVault.address,g=[],i=async(y,K)=>{try{return await K()}catch{return g.push(y),null}},n=y=>i(y,()=>a.readContract({address:r.curve,abi:Q,functionName:y,blockNumber:l})),u=y=>i(y,()=>a.readContract({address:r.curve,abi:Q,functionName:y,blockNumber:l})),k=y=>i(y,()=>a.readContract({address:p,abi:ue,functionName:y,args:[s],blockNumber:l})),[N,R,G,q,W,_,A,V,H,d,b,D,pe,fe]=await Promise.all([n("sellableTokens"),n("reservedTokens"),u("readyToGraduate"),u("graduated"),i("currentSnipeTaxBps",()=>a.readContract({address:r.curve,abi:Q,functionName:"currentSnipeTaxBps",args:[c],blockNumber:l})),i("getTokenInfo",()=>a.readContract({address:s,abi:he,functionName:"getTokenInfo",blockNumber:l})),i("pendingCreatorFeeRecipient",()=>a.readContract({address:F,abi:ye,functionName:"pendingCreatorFeeRecipient",args:[s],blockNumber:l})),k("totalLocked"),k("totalReleased"),k("vestedAmount"),k("releasable"),k("vestingStart"),i("VESTING_DURATION",()=>a.readContract({address:p,abi:ue,functionName:"VESTING_DURATION",blockNumber:l})),J(e,s,l)]),S=y=>y===null?null:y.toString(),te=A&&!v(A[0],ee)&&A[1]>0n?{proposedRecipient:f(A[0]),effectiveAt:A[1].toString(),expiresAt:A[2].toString(),note:"A protocol-proposed creator fee recipient change. Holders may react before it takes effect; anyone can execute it after the timelock, within the window."}:A?null:void 0;return{token:fe,phase:r.phase,statusBlock:l.toString(),curve:r.curve,creatorFeeRecipient:r.creatorFeeRecipient,curveCapacity:{sellableTokens:S(N),reservedTokens:S(R),readyToGraduate:G,graduated:q},snipeTaxBps:{recipient:c,current:S(W),note:"Keyed to the wallet that receives the tokens; buys only, large in the opening seconds."},creatorMetadata:_?{deployer:f(_[0]),logo:I(_[1].slice(0,300)),description:I(_[2].slice(0,500)),socials:Object.fromEntries(["twitter","telegram","discord","website","farcaster"].map((y,K)=>[y,I(_[3][K].slice(0,300))]))}:null,pendingTakeover:te===void 0?"unavailable":te,buybackVest:{vault:p,enabled:r.buybackEnabled,locked:S(V),released:S(H),vested:S(d),releasable:S(b),vestingStart:S(D),vestingDurationSeconds:S(pe),note:"Amounts are launch-token base units; releasing is for the vest beneficiaries only (see pons_claim)."},unavailable:g}}async function Be(e,t){let o=P(t.token,"Pons launch token address"),s=j(t.limit,25,100),c=e.clientFor(w),a=await c.getBlockNumber({cacheTime:0}),l=await E(e,o,a),r=t.toBlock===void 0?a:BigInt(String(t.toBlock)),p=t.fromBlock===void 0?r>=me?r-me+1n:0n:BigInt(String(t.fromBlock));if(p<0n||p>r||r>a||r-p+1n>ge)throw new T("Choose an ordered range of at most 10000 mined blocks.");let i=(await c.getLogs({address:l.curve,events:be,fromBlock:p,toBlock:r,strict:!0})).filter(n=>v(n.address,l.curve)&&!n.removed&&n.blockNumber!==null).sort((n,u)=>n.blockNumber===u.blockNumber?(u.logIndex??0)-(n.logIndex??0):n.blockNumber>u.blockNumber?-1:1);return{token:await J(e,o,a),curve:l.curve,fromBlock:p.toString(),toBlock:r.toString(),statusBlock:a.toString(),truncated:i.length>s,total:i.length,trades:i.slice(0,s).map(n=>n.eventName==="CurveBuy"?{side:"buy",block:n.blockNumber.toString(),tx:n.transactionHash,trader:f(n.args.buyer),recipient:f(n.args.recipient),pairIn:n.args.quoteIn.toString(),tokensOut:n.args.tokensOut.toString(),fee:n.args.fee.toString(),creatorTax:n.args.tax.toString()}:{side:"sell",block:n.blockNumber.toString(),tx:n.transactionHash,trader:f(n.args.seller),recipient:f(n.args.recipient),tokensIn:n.args.tokensIn.toString(),pairOut:n.args.quoteOut.toString(),fee:n.args.fee.toString(),creatorTax:n.args.tax.toString()}),coverage:"Curve-phase trades in the requested block window only. Graduated-pool swaps are Uniswap v4 events and are not listed here; pons_activity and pons_status cover a wallet and the pool price."}}var Le=e=>{function t(o,s,c){return{name:o,inputSchema:{type:"object",properties:s,required:["pons_holders","pons_launch_info","pons_trades"].includes(o)?["token"]:[],additionalProperties:!1},execute:async(a,l)=>{try{if(!P(l)||v(l,ee))throw new T("Provide a wallet address.");for(let r of Object.keys(a))if(!(r in s))throw new T(`Unknown ${o} input: ${r}.`);return await c(a,l)}catch(r){throw new T(e.plainError(r))}}}}return{tools:[t("pons_holders",{token:C,holder:{...C,description:"Optional wallet for an on-chain balance and indexed rank after system exclusions."},limit:{type:"integer",minimum:1,maximum:50},cursor:{type:"string",maxLength:128,description:"Filtered-directory nextCursor from pons_holders; restart if the index changes."}},o=>we(e,o)),t("pons_holdings",{holder:C,limit:{type:"integer",minimum:1,maximum:40}},(o,s)=>xe(e,o,s)),t("pons_trending",{limit:{type:"integer",minimum:1,maximum:20}},o=>Se(e,o)),t("pons_analytics",{view:{type:"string",enum:Object.keys(z)}},o=>Te(e,o)),t("pons_activity",{wallet:C,cursor:{type:"string",maxLength:32}},(o,s)=>Pe(e,o,s)),t("pons_launch_info",{token:C,holder:C},(o,s)=>_e(e,o,s)),t("pons_trades",{token:C,fromBlock:X(),toBlock:X(),limit:{type:"integer",minimum:1,maximum:100}},o=>Be(e,o)),t("pons_profile",{address:C,limit:{type:"integer",minimum:1,maximum:20}},(o,s)=>Ne(e,o,s))]}};export{O as a,Le as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y}from"./6IM6A5VA.js";import{m as b}from"./73N3TOJL.js";import{a as i,i as w,j as l}from"./XPFVT2EA.js";import{a as c}from"./5YS5V2LK.js";import{erc20Abi as v,getAddress as u,parseAbi as G}from"viem";var d=10n**27n,I=1000000021979553151239153027n,a=u(w[i].vaults.spark.address),U="https://docs.spark.finance/dev/savings/spark-vaults-v2",g=G(["function asset() view returns (address)","function vsr() view returns (uint256)","function totalAssets() view returns (uint256)","function depositCap() view returns (uint256)","function minVsr() view returns (uint256)","function maxVsr() view returns (uint256)","function convertToAssets(uint256) view returns (uint256)"]);function n(e){return b(e,"Spark returned an invalid unsigned integer.")}function q(e){if(e<d||e>I)throw new c("Spark savings rate is outside the documented bounds.");let r=31536000n,s=e,t=d;for(;r>0n;)r%2n&&(t=t*s/d),r/=2n,r>0n&&(s=s*s/d);return t-d}function j(e){return{name:"spark_details",inputSchema:{type:"object",properties:{},additionalProperties:!1},execute:async(r,s)=>{try{if(y(s),Object.keys(r).length)throw new c("Spark details takes no arguments.");let t=e.clientFor(i);if(await t.getChainId()!==i)throw new c("Spark details requires chain 4663.");let o=await t.getBlockNumber({cacheTime:0}),h=await t.readContract({address:a,abi:g,functionName:"asset",blockNumber:o});if(typeof h!="string"||u(h)!==u(l))throw new c("Spark does not report canonical USDG.");let[k,A,C,D,x,N,R]=await Promise.all([...["vsr","totalAssets","depositCap","minVsr","maxVsr"].map(V=>t.readContract({address:a,abi:g,functionName:V,blockNumber:o})),t.readContract({address:u(l),abi:v,functionName:"balanceOf",args:[a],blockNumber:o}),t.readContract({address:a,abi:v,functionName:"balanceOf",args:[s],blockNumber:o})]),f=n(k),p=n(A),m=n(N),S=n(R),T=n(await t.readContract({address:a,abi:g,functionName:"convertToAssets",args:[S],blockNumber:o}));return{chainId:i,vault:a,blockNumber:o.toString(),asset:{address:u(l),symbol:"USDG",decimals:6,chainId:i},shareToken:{address:a,symbol:"spUSDG",decimals:6,chainId:i},rate:{vsrRay:f.toString(),scale:d.toString(),annualYieldRay:q(f).toString(),secondsPerYear:"31536000",minVsrRay:n(D).toString(),maxVsrRay:n(x).toString(),caveat:"Projection with the current per-second rate held constant; governance can change it. Not a promised return."},totalAssets:p.toString(),idleAssets:m.toString(),depositCapAssets:n(C).toString(),outstandingAssets:(p>m?p-m:0n).toString(),heldShares:S.toString(),positionAssets:T.toString(),backing:{source:U,mechanism:"The permissioned taker deploys liquidity through the Spark Liquidity Layer. totalAssets is share-implied accounting; idle USDG alone funds immediate redemptions.",composition:null,compositionStatus:"Current strategy-by-strategy backing was not measured on this chain; inspect the official Spark app."},risk:["Liquidity deployed by the taker may be unavailable for immediate withdrawal.","Vault upgrades and role-controlled rate/cap changes affect behavior.","Share value and the USDG peg can change; conversion does not prove exit liquidity."]}}catch(t){throw new c(e.plainError(t))}}}}export{q as a,j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as r}from"./XPFVT2EA.js";var t='Use query (token name, symbol or address) or category to narrow tickerspring_tokens. Unfiltered requests and sort:"volume" alone can return an incomplete or inconsistent provider response; retry with a query or category filter.';function i(){return{summary:"Minimums: limit orders 10 USDG; independent ladder levels 10 USDG each; grids 11 USDG; ladder planner 55 USDG. Vaults use current minDepositUnits from tickerspring_vaults (not a fixed 25 USDG). Basket creation first deposit 25 USDG; check current basket quote for trade minimums.",minimums:{denomination:{address:r[e].tokens.USDG.address,symbol:"USDG",decimals:6,chainId:e},limitOrderNotional:"10000000",independentLadderLevelNotional:"10000000",gridBudget:"11000000",ladderPlannerBudget:"55000000",vaultDeposit:{source:"tickerspring_vaults",field:"minDepositUnits",policy:"Per-vault current minimum; do not assume the 25 USDG example is a minimum."},basketCreationFirstDepositNotional:"25000000",basketTrade:{source:"tickerspring_baskets and current prepare quote",policy:"Check current provider minimum for the selected basket and payment token."}},tokenFilterGuidance:t}}export{t as a,i as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as N}from"./XW7RH7YY.js";import{a as E}from"./G4PDM3MX.js";import{b as q,c as _,d as O,e as R}from"./KQFDLDHL.js";import{a as I}from"./JRVTSGAT.js";import{c as M}from"./EC5W3UZD.js";import{b as G}from"./AXYOJBX6.js";import{a as b}from"./6IM6A5VA.js";import{a as x}from"./RETS2ZEK.js";import{a as o,d as P,i as U,j as y}from"./XPFVT2EA.js";import{a as r}from"./5YS5V2LK.js";import{encodeFunctionData as g,erc20Abi as k,parseAbi as L}from"viem";var i=U[o].vaults.steakhouse.address,j=(1n<<256n)-1n,l=L(["function asset() view returns (address)","function totalAssets() view returns (uint256)","function convertToAssets(uint256 shares) view returns (uint256 assets)","function previewWithdraw(uint256 assets) view returns (uint256 shares)","function deposit(uint256 assets,address receiver) returns (uint256 shares)","function withdraw(uint256 assets,address receiver,address owner) returns (uint256 shares)","function redeem(uint256 shares,address receiver,address owner) returns (uint256 assets)"]);function A(e){if(typeof e!="bigint"||e<0n||e>j)throw new r("The vault returned an invalid base-unit amount.");return e}function T(e){if(typeof e!="string")throw new r("Amount must be an integer string in base units.");let c=x(e);if(c===0n)throw new r("Amount must be positive.");if(c>j)throw new r("Amount exceeds the uint256 range.");return c}function D(e,c,h=!1){if(!e||typeof e!="object"||Array.isArray(e)||Object.keys(e).some(w=>!c||!["amount",...h?["force","maxPenaltyAssets","minAmountOut"]:[]].includes(w)))throw new r("Unexpected Steakhouse argument.")}var W=e=>{async function c(t){try{return await t()}catch(s){throw new r(e.plainError(s))}}async function h(){let t=e.clientFor(o);if(await t.getChainId()!==o)throw new r("Steakhouse requires chain 4663.");let s=await t.readContract({address:i,abi:l,functionName:"asset"});if(typeof s!="string"||s.toLowerCase()!==y.toLowerCase())throw new r("The Steakhouse vault asset does not match USDG on chain 4663.");let[a,n]=await Promise.all([t.readContract({address:y,abi:k,functionName:"decimals"}),t.readContract({address:i,abi:k,functionName:"decimals"})]);if(a!==P||!Number.isInteger(n)||n<0||n>255)throw new r("The vault returned invalid asset or share decimals.");return{client:t,asset:{address:y,symbol:"USDG",decimals:a,chainId:o},shares:{address:i,symbol:"steakUSDG",decimals:n,chainId:o}}}async function w(t,s){return A(await t.readContract({address:i,abi:k,functionName:"balanceOf",args:[s]}))}async function C(t,s,a){let n=await e.preview(t,s);if(n.changes.length===0)throw new r("The Steakhouse simulation returned no token balance changes.");let u=n.changes.map(({token:m,amount:d})=>{let f=d.startsWith("-"),p=e.formatAmount(f?d.slice(1):d,m.decimals);return`${f?"-":""}${p} ${m.symbol} (${m.address}, chain ${m.chainId}, decimals ${m.decimals})`});return{txs:t,summary:`${a} ${n.summary} Changes: ${u.join("; ")}.`}}return{tools:[_(e,"steakhouse_details",i),I(e,"steakhouse_analytics",i),E(e,"steakhouse_manage",i),...N(e,"steakhouse",i),{name:"steakhouse_list",inputSchema:{type:"object",properties:{},additionalProperties:!1},execute:async t=>c(async()=>{D(t,!1);let{client:s,asset:a,shares:n}=await h(),u=A(await s.readContract({address:i,abi:l,functionName:"totalAssets"}));return[{name:"Steakhouse USDG",vault:n,asset:a,totalAssets:{token:a,amount:u.toString()}}]})},{name:"steakhouse_deposit",inputSchema:$(!1),execute:async(t,s)=>c(async()=>{D(t,!0);let a=T(t.amount);b(s);let{asset:n}=await h(),u=[e.approval(n.address,i,a.toString(),o),e.unsignedTx({to:i,data:g({abi:l,functionName:"deposit",args:[a,s]}),value:"0",chainId:o,description:`Deposit ${e.formatAmount(a.toString(),n.decimals)} USDG into Steakhouse.`})];return C(u,s,"Approve the exact USDG amount, then deposit into Steakhouse.")})},{name:"steakhouse_withdraw",inputSchema:{...$(!0),properties:{...$(!0).properties,force:{type:"boolean",description:"Explicitly plan a full Morpho V2 force exit with penalty disclosure."},maxPenaltyAssets:{type:"string",pattern:"^[0-9]+$"},minAmountOut:{type:"string",pattern:"^[0-9]+$"}}},execute:async(t,s)=>c(async()=>{D(t,!0,!0);let a=t.amount==="max"?null:T(t.amount);b(s);let{client:n,asset:u,shares:m}=await h(),d=await w(n,s);if(d===0n)throw new r("The wallet has no Steakhouse shares to withdraw.");if(t.force!==void 0&&typeof t.force!="boolean")throw new r("force must be a boolean.");if(t.force===!0){if(a!==null)throw new r("Force exit currently requires amount max.");let p=M(t.maxPenaltyAssets),F=T(t.minAmountOut),v=await q(e,n,i,s,d,p),S=await e.preview([v.tx],s);return R(S.changes,i,d,F),{txs:[v.tx],preview:S,summary:`${O(v.plan)} ${S.summary}`}}if(t.maxPenaltyAssets!==void 0||t.minAmountOut!==void 0)throw new r("Penalty and output limits require force true.");let f;if(a===null)f=e.unsignedTx({to:i,data:g({abi:l,functionName:"redeem",args:[d,s,s]}),value:"0",chainId:o,description:`Redeem all ${e.formatAmount(d.toString(),m.decimals)} steakUSDG shares.`});else{let p=A(await n.readContract({address:i,abi:l,functionName:"previewWithdraw",args:[a]}));if(p===0n||p>d)throw new r("The withdrawal exceeds the available share balance or has an invalid share quote.");f=e.unsignedTx({to:i,data:g({abi:l,functionName:"withdraw",args:[a,s,s]}),value:"0",chainId:o,description:`Withdraw ${e.formatAmount(a.toString(),u.decimals)} USDG from Steakhouse.`})}return C([f],s,a===null?"Redeem the current full share balance from Steakhouse.":"Withdraw the requested USDG amount from Steakhouse.")})}],positions:t=>c(async()=>{b(t);let{client:s,asset:a,shares:n}=await h(),u=await w(s,t);if(u===0n)return[];let m=A(await s.readContract({address:i,abi:l,functionName:"convertToAssets",args:[u]}));return[{module:"steakhouse",id:`${o}:${i.toLowerCase()}`,chainId:o,assets:[{token:a,amount:m.toString()}],description:`${e.formatAmount(u.toString(),n.decimals)} steakUSDG shares (${i}, chain ${o}, decimals ${n.decimals}); USDG conversion is indicative, not guaranteed exit liquidity.`}]})}};function $(e){return{type:"object",additionalProperties:!1,required:["amount"],properties:{amount:{type:"string",pattern:e?"^(?:[0-9]+|max)$":"^[0-9]+$",description:`USDG base-unit integer string (6 decimals)${e?", or max to redeem every share":""}.`}}}}var te=e=>G("steakhouse",[W(e)]);export{W as a,te as b};
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oakagentkit/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22"
|
|
8
8
|
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"lint": "eslint \"src/**/*.{js,mjs,cjs,ts,mts,cts,tsx}\" \"test/**/*.{js,mjs,cjs,ts,mts,cts,tsx}\" --no-error-on-unmatched-pattern --global AbortSignal --max-warnings 0",
|
|
11
|
+
"typecheck": "pnpm --workspace-root run typecheck:package packages/core/tsconfig.json",
|
|
12
|
+
"test": "pnpm run build && vitest run --passWithNoTests --config ../../scripts/release/vitest-core.config.mjs",
|
|
13
|
+
"build": "node ../../scripts/release/build.mjs core",
|
|
14
|
+
"prepack": "node ../../scripts/release/prepare.mjs core",
|
|
15
|
+
"postpack": "node ../../scripts/release/prepare.mjs core --postpack",
|
|
16
|
+
"prepublishOnly": "node ../../scripts/release/prepare.mjs core --verify",
|
|
17
|
+
"postpublish": "node ../../scripts/release/prepare.mjs core --restore"
|
|
18
|
+
},
|
|
9
19
|
"exports": {
|
|
10
20
|
"./abi/*.json": "./build/dist/abi/*.json",
|
|
11
21
|
"./*": {
|
|
@@ -30,11 +40,5 @@
|
|
|
30
40
|
"oak",
|
|
31
41
|
"mcp",
|
|
32
42
|
"robinhood-chain"
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
"lint": "eslint \"src/**/*.{js,mjs,cjs,ts,mts,cts,tsx}\" \"test/**/*.{js,mjs,cjs,ts,mts,cts,tsx}\" --no-error-on-unmatched-pattern --global AbortSignal --max-warnings 0",
|
|
36
|
-
"typecheck": "pnpm --workspace-root run typecheck:package packages/core/tsconfig.json",
|
|
37
|
-
"test": "pnpm run build && vitest run --passWithNoTests --config ../../scripts/release/vitest-core.config.mjs",
|
|
38
|
-
"build": "node ../../scripts/release/build.mjs core"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as F}from"./GDP4JSAX.js";import{c as j}from"./Y3P6SUNL.js";import{a as w,b as X,c as ae}from"./A5ITAEUQ.js";import{a as r,d as re}from"./I5CQ64EU.js";import{A as R,B as ne,C as oe,a as h,i as D,z as G}from"./ZUC6ILK2.js";import{a as o}from"./NGAI6GTU.js";import{decodeAbiParameters as B,decodeFunctionData as y,encodeAbiParameters as Q,encodeFunctionData as L,parseAbi as z,parseAbiParameters as J}from"viem";var ve=60,q=50,_e=200,ce=z(["function buy(uint256 quoteIn,uint256 minTokensOut,address recipient) payable returns (uint256)","function sell(uint256 tokensIn,uint256 minQuoteOut,address recipient) returns (uint256)"]),Se="0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",N="0x0000000000000000000000000000000000000000",M=D[4663].routes.kyberswap.address,V=D[4663].routes.velora.address,ee=G[4663].kyberswap.toLowerCase(),le=G[4663].velora.toLowerCase(),be="0x0000000000000000000000000000000000000000000000000000000000000000",H=z(["function swap((address callTarget, address approveTarget, bytes targetData, (address srcToken, address dstToken, address[] srcReceivers, uint256[] srcAmounts, address[] feeReceivers, uint256[] feeAmounts, address dstReceiver, uint256 amount, uint256 minReturnAmount, uint256 flags, bytes permit) desc, bytes clientData) execution) payable returns (uint256 returnAmount, uint256 gasUsed)"]),K=z(["function swapExactAmountIn(address executor, (address srcToken, address destToken, uint256 fromAmount, uint256 toAmount, uint256 quotedAmount, bytes32 metadata, address beneficiary) swapData, uint256 partnerAndFee, bytes permit, bytes executorData) payable returns (uint256 receivedAmount, uint256 submittedAmount, uint256 augustusFeeAmount)"]),C=class extends o{name="NoRouteError";constructor(t="No swap route is available for this token pair and amount."){super(t)}},P=class extends o{name="ExpiredQuoteError";constructor(t="Quote has expired. Request a fresh quote."){super(t)}},Oe=1e3,S=new Map;function me(e){for(let[t,n]of S)BigInt(e)>=r(n.expiresAt)&&S.delete(t)}function Y(e){return{...e,...e.txs?{txs:e.txs.map(t=>({...t}))}:{}}}function se(e){let t=Y(e);return t.txs&&(t.txs.forEach(Object.freeze),Object.freeze(t.txs)),Object.freeze(t)}var xe=["router","from","to","wallet","amountIn","amountOut","minAmountOut","expiresAt","chainId","spender","value","ponsCurveToken","ponsPoolToken","blockNumber","calldataMinAmountOut","expectedSpend","expectedRefund"];function $(e,t,n=!1){for(let i of xe)if(!(i==="expiresAt"&&n&&r(e.expiresAt)<=r(t.expiresAt))&&e[i]!==void 0&&String(e[i]).toLowerCase()!==String(t[i]).toLowerCase())throw new o(`Quote ${i} does not match the accepted quote.`)}function U(e=Date.now){let t=e();if(!Number.isFinite(t)||t<0)throw new o("Clock must return a non-negative timestamp.");return t>1e11?Math.floor(t/1e3):Math.floor(t)}function O(e){let t=e.toLowerCase();return t===Se.toLowerCase()||t===N.toLowerCase()}function Ie(e,t=q){if(!Number.isInteger(t)||t<0||t>=1e4)throw new o("Slippage must be an integer from 0 to 9999 bps.");return re(e,String(1e4-t),"10000","floor")}var ye=200;function Me(e){if(typeof e!="number"||!Number.isFinite(e)||!/^\d+(?:\.\d{1,2})?$/.test(String(e)))throw new o("Velora returned an unsupported venue fee. Request a fresh quote.");let[t,n=""]=String(e).split("."),i=Number(t)*100+Number(n.padEnd(2,"0"));return te(i),i}function te(e){if(!Number.isInteger(e)||e<0||e>ye)throw new o("Velora returned an unsupported venue fee. Request a fresh quote.")}function pe(e,t=1){return te(t),r(e)*10000n/BigInt(1e4-t)+1n}function ke(e,t){te(t);let n=e>>96n,i=ne>>96n,a=0x3fffn,c=1n<<92n,u=e&(1n<<96n)-1n;if(n!==i&&!(n===0n&&t===0)||(u&a)!==BigInt(t)||(u&~(c|a))!==0n)throw new o("Velora partnerAndFee must match the accepted venue fee and recipient.")}function fe(e){if(e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak charges 0 swap fee; venue fees must never be counted as Oak income.");let t=e.provider??"venue";return`Venue fee: ${e.venueFee} base units (${e.venueFeeBps} bps) retained by ${t}; Oak swap fee: 0 (venue fee is never Oak income).`}function De(e){w(e.from),w(e.to),w(e.wallet);let t=e.callTarget??R[h].kyberswap.address,n=e.approveTarget??N;w(t),w(n);let i=r(e.amountIn),a=r(e.minAmountOut);return L({abi:H,functionName:"swap",args:[{callTarget:t,approveTarget:n,targetData:e.targetData??"0x",desc:{srcToken:e.from,dstToken:e.to,srcReceivers:O(e.from)?[]:[t],srcAmounts:O(e.from)?[]:[i],feeReceivers:[],feeAmounts:[],dstReceiver:e.wallet,amount:i,minReturnAmount:a,flags:0n,permit:"0x"},clientData:e.clientData??"0x"}]})}function Ce(e){w(e.from),w(e.to),w(e.wallet);let t=e.executor??R[h].velora.address;return w(t),L({abi:K,functionName:"swapExactAmountIn",args:[t,{srcToken:e.from,destToken:e.to,fromAmount:r(e.amountIn),toAmount:r(e.minAmountOut),quotedAmount:r(e.amountOut),metadata:e.metadata??be,beneficiary:e.wallet},e.partnerAndFee??0n,"0x",e.executorData??"0x"]})}var ie=z(["function execute(bytes commands,bytes[] inputs,uint256 deadline) payable"]),ue=J("((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey,bool zeroForOne,uint128 amountIn,uint128 amountOutMinimum,uint256 minHopPriceX36,bytes hookData)"),de=J("bytes,bytes[]"),_=J("address,uint256");function Z(e){let t=y({abi:ie,data:e}),[n,i,a]=t.args;if(n!=="0x10"||i.length!==1||L({abi:ie,...t}).toLowerCase()!==e.toLowerCase())throw new o("Pons router must contain one canonical v4 swap command.");let[c,u]=B(de,i[0]);if(c!=="0x060c0f"||u.length!==3||Q(de,[c,u]).toLowerCase()!==i[0].toLowerCase())throw new o("Pons router actions must swap, settle the exact input and take all output to the sender.");let m=B(ue,u[0])[0],A=B(_,u[1]),d=B(_,u[2]);if(Q(ue,[m]).toLowerCase()!==u[0].toLowerCase()||Q(_,A).toLowerCase()!==u[1].toLowerCase()||Q(_,d).toLowerCase()!==u[2].toLowerCase()||m.hookData!=="0x"||m.minHopPriceX36!==0n||A[0].toLowerCase()!==(m.zeroForOne?m.poolKey.currency0:m.poolKey.currency1).toLowerCase()||A[1]!==m.amountIn||d[0].toLowerCase()!==(m.zeroForOne?m.poolKey.currency1:m.poolKey.currency0).toLowerCase()||d[1]!==m.amountOutMinimum)throw new o("Pons router settlement and receipt must match the single swap.");return{swap:m,deadline:a}}function Te(e){if(typeof e!="string"||!/^0x([0-9a-fA-F]{2})+$/.test(e)||e.length<10)throw new o("Swap calldata must contain a 4-byte function selector.");let t=e.slice(0,10).toLowerCase();if(t===ee)return y({abi:H,data:e}).args[0].desc.minReturnAmount;if(t===le)return y({abi:K,data:e}).args[1].toAmount;if(t==="0x3593564c")return Z(e).swap.amountOutMinimum;let n=y({abi:ce,data:e});if(n.functionName==="buy"||n.functionName==="sell")return n.args[1];throw new o(`Unsupported swap router selector ${t}.`)}function we(e,t,n=!1){let i=r(t),a=Te(e);if(a<=0n||i<=0n||a!==i&&!(n&&(a>i||e.slice(0,10).toLowerCase()===ee&&a+1n===i)))throw new o(`Built swap calldata minimum output (${a}) does not match the accepted quote minimum (${i}).`);return a}function Ae(e,t){let{from:n,to:i,wallet:a,amountIn:c}=t;if(!n||!i||!a||c===void 0)throw new o("Accepted quote must include input, output, amount and wallet.");for(let s of[n,i,a,t.router,e.to])w(s);let u=(s,l,g)=>{if(s.toLowerCase()!==l.toLowerCase())throw new o(`Built swap ${g} does not match the accepted quote.`)};if(u(e.to,t.router,"router"),e.chainId!==(t.chainId??h))throw new o("Built swap chain does not match the accepted quote.");let m=O(n)?r(c):0n;if(r(e.value)!==m||t.value!==void 0&&r(t.value)!==m)throw new o("Built swap value does not match the accepted quote input.");let A=e.data.slice(0,10).toLowerCase(),d=t.router.toLowerCase(),f;if(d===M.toLowerCase()&&A===ee){u(t.spender??t.router,M,"spender");let s=y({abi:H,data:e.data});if(L({abi:H,...s}).toLowerCase()!==e.data.toLowerCase())throw new o("KyberSwap calldata must be canonically decodable.");let{callTarget:l,approveTarget:g,desc:p}=s.args[0];u(l,R[h].kyberswap.address,"executor"),u(g,N,"executor approval target");let v=O(n);if(p.srcReceivers.length!==(v?0:1)||p.srcAmounts.length!==(v?0:1)||!v&&(p.srcReceivers[0].toLowerCase()!==l.toLowerCase()||p.srcAmounts[0]!==r(c)))throw new o("KyberSwap source transfers must send the exact input to the pinned executor.");if(p.feeReceivers.length||p.feeAmounts.length||p.flags!==0n&&p.flags!==512n||p.permit!=="0x")throw new o("KyberSwap fee recipients, fee amounts, flags and permit must match the pinned zero-fee policy.");f={from:p.srcToken,to:p.dstToken,wallet:p.dstReceiver,amount:p.amount}}else if(d===V.toLowerCase()&&A===le){u(t.spender??t.router,V,"spender");let s=y({abi:K,data:e.data});if(L({abi:K,...s}).toLowerCase()!==e.data.toLowerCase())throw new o("Velora calldata must be canonically decodable.");let[l,g,p,v]=s.args;if(!oe.some(T=>T.toLowerCase()===l.toLowerCase()))throw new o("Built swap executor does not match the accepted quote.");if(v!=="0x")throw new o("Velora permit must match the pinned empty-permit policy.");if((t.calldataMinAmountOut!==void 0||p!==0n)&&ke(p,t.venueFeeBps??0),t.calldataMinAmountOut!==void 0&&r(t.calldataMinAmountOut)!==pe(t.minAmountOut,t.venueFeeBps??1))throw new o("Velora calldata minimum must cover the accepted net output, venue fee and router dust.");if(t.calldataMinAmountOut!==void 0&&(g.quotedAmount!==r(t.grossAmountOut??"0")||g.quotedAmount<r(t.calldataMinAmountOut)))throw new o("Velora quoted gross output must match the accepted quote and cover its calldata minimum.");if(p!==0n&&t.calldataMinAmountOut===void 0)throw new o("Velora venue fee requires a fee-adjusted calldata minimum.");f={from:g.srcToken,to:g.destToken,wallet:g.beneficiary,amount:g.fromAmount}}else if(t.provider==="pons"&&t.ponsPoolToken){if(u(t.router,D[h].ponsTrade.universal_router.address,"Pons router"),u(t.spender??t.router,D[h].ponsTrade.permit2.address,"Pons spender"),!t.data)throw new o("Pons pool quote must include locally reconstructed calldata.");let{swap:s,deadline:l}=Z(e.data),g=Z(t.data),p=O(n);if(u(s.poolKey.currency0,N,"pool native currency"),u(s.poolKey.currency1,t.ponsPoolToken,"pool token"),u(s.poolKey.hooks,D[h].pons.memeHook.address,"pool hook"),s.zeroForOne!==p||!O(p?n:i)||s.poolKey.fee!==g.swap.poolKey.fee||s.poolKey.tickSpacing!==g.swap.poolKey.tickSpacing||l!==g.deadline)throw new o("Pons pool direction, parameters or deadline differ from the accepted quote.");u(p?i:n,t.ponsPoolToken,"pool token"),f={from:n,to:i,wallet:a,amount:s.amountIn}}else if(t.provider==="pons"&&t.ponsCurveToken){let s=y({abi:ce,data:e.data}),l=O(n);if(s.functionName!==(l?"buy":"sell")||!O(l?n:i))throw new o("Pons curve direction does not match the accepted quote.");u(l?i:n,t.ponsCurveToken,"curve token"),u(t.spender??t.router,t.router,"curve spender"),f={from:n,to:i,wallet:s.args[2],amount:s.args[0]}}else throw new o("Built swap selector does not match the accepted router.");if(u(f.from,n,"input token"),u(f.to,i,"output token"),u(f.wallet,a,"recipient"),f.amount!==r(c))throw new o("Built swap input amount does not match the accepted quote.");we(e.data,t.calldataMinAmountOut??t.minAmountOut,d===M.toLowerCase())}function W(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new o("Quote must include a non-empty quoteId.");if(w(e.router),e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak charges 0 swap fee; venue fees must never be counted as Oak income.");let n=r(e.amountOut),i=e.destAmountAfterFee??e.netAmountOut,a,c,u;if(i!==void 0){if(c=r(i),a=e.grossAmountOut!==void 0?r(e.grossAmountOut):n>=c?n:c,a<c)throw new o("Gross output cannot be less than net output.");u=e.venueFee!==void 0?r(e.venueFee):a-c}else if(e.grossAmountOut!==void 0){if(a=r(e.grossAmountOut),c=n,a<c)throw new o("Gross output cannot be less than net output.");u=e.venueFee!==void 0?r(e.venueFee):a-c}else e.venueFee!==void 0?(u=r(e.venueFee),c=n,a=c+u):(c=n,a=n,u=0n);if(c<=0n)throw new C("Quote output amount must be positive.");let m=t.slippageBps??e.slippageBps??q,A=e.minAmountOut!==void 0?r(e.minAmountOut):r(Ie(c.toString(),m));if(A<=0n||A>a)throw new o("Quote minAmountOut must be positive and not exceed gross output.");if((t.provider??e.provider)==="velora"&&e.calldataMinAmountOut!==void 0){if(r(e.calldataMinAmountOut)!==pe(A.toString(),e.venueFeeBps??1)||r(e.calldataMinAmountOut)>a)throw new o("Velora calldata minimum must cover the accepted net output, venue fee and router dust.")}else if(e.calldataMinAmountOut!==void 0||e.ponsCurveToken!==void 0){if((t.provider??e.provider)!=="pons"||!e.ponsCurveToken)throw new o("Curve minimum requires a Pons curve quote.");w(e.ponsCurveToken);let b=r(t.amountIn??e.amountIn??"0"),I=r(e.expectedSpend??"0"),ge=r(e.expectedRefund??"0"),he=r(e.calldataMinAmountOut??"0");if(b<=0n||I<=0n||I+ge!==b||he*I/b!==A)throw new o("Pons actual minimum and refund do not match the encoded minimum.")}let d=U(t.now),f=BigInt(d+ve),s=e.expiresAt!==void 0?r(e.expiresAt):f,l=(s>f?f:s).toString(),g=u.toString(),p=e.venueFeeBps??(a>0n&&u>0n?Number((u*10000n+a/2n)/a):0),v=t.provider??e.provider??(e.router.toLowerCase()===V.toLowerCase()?"velora":"kyberswap"),T=v==="pons"&&e.feeDisclosure?e.feeDisclosure:fe({provider:v,venueFee:g,venueFeeBps:p,oakFee:"0"}),x={...e,quoteId:e.quoteId,amountOut:c.toString(),minAmountOut:A.toString(),router:e.router,expiresAt:l,provider:v,grossAmountOut:a.toString(),destAmountAfterFee:c.toString(),netAmountOut:c.toString(),venueFee:g,venueFeeBps:p,oakFee:"0",feeDisclosure:T,...t.from??e.from?{from:F(t.from??e.from)}:{},...t.to??e.to?{to:F(t.to??e.to)}:{},...t.amountIn??e.amountIn?{amountIn:t.amountIn??e.amountIn}:{},...t.wallet??e.wallet?{wallet:t.wallet??e.wallet}:{},slippageBps:m,chainId:t.chainId??e.chainId??h,spender:e.spender??e.router,...t.allowance??e.allowance?{allowance:t.allowance??e.allowance}:{}};if(BigInt(d)>=r(l))throw new P;if(t.cache===!1)return x;if(me(d),BigInt(d)>=r(l))throw new P;let E=S.get(x.quoteId);if(E){$(x,E,!0);let b=se({...E,expiresAt:x.expiresAt});return S.set(b.quoteId,b),Y(b)}for(;S.size>=Oe;)S.delete(S.keys().next().value);let k=se(x);return S.set(k.quoteId,k),Y(k)}async function Ne(e,t,n={}){e={...e},w(e.from),w(e.to),w(e.wallet),e.from=F(e.from),e.to=F(e.to);let i=r(e.amountIn);if(i<=0n)throw new o("Swap amountIn must be greater than zero.");let a=e.slippageBps??q;if(!Number.isInteger(a)||a<0||a>=1e4)throw new o("Slippage must be an integer from 0 to 9999 bps.");if(!Array.isArray(t)||t.length===0)throw new C;let c={from:e.from,to:e.to,amountIn:i.toString(),slippageBps:a},u=await Promise.allSettled(t.map(async d=>{let f=await(d.quotePrices??d.quote).call(d,{...c},e.wallet);return{quote:W(f,{provider:d.name,from:e.from,to:e.to,amountIn:i.toString(),wallet:e.wallet,slippageBps:a,chainId:e.chainId??h,allowance:e.allowance,now:e.now,cache:!1}),provider:d}})),m,A=[];for(let d of u)d.status==="rejected"&&(m??=j(d.reason)),d.status==="fulfilled"&&r(d.value.quote.expiresAt)>BigInt(U(e.now))&&A.push(d.value);if(A.length===0)throw m??new C;A.sort((d,f)=>{let l=r(f.quote.amountOut)-r(d.quote.amountOut)||r(f.quote.minAmountOut)-r(d.quote.minAmountOut);return l>0n?1:l<0n?-1:0});for(let{quote:d,provider:f}of A)try{if(BigInt(U(e.now))>=r(d.expiresAt))continue;if(n.deferBuild||!f.prepareQuote)return W(d,{now:e.now});let s=await f.prepareQuote(d.quoteId,e.wallet);if(s.quoteId!==d.quoteId)throw new o("Prepared quote ID does not match the selected route.");if($(s,d,!0),!s.data)throw new o("Selected route did not return swap calldata.");let l={...d,expiresAt:s.expiresAt,data:s.data,value:s.value,allowance:s.allowance??d.allowance};return Ae(X({to:l.router,data:s.data,value:s.value??"0",chainId:l.chainId??h,description:"Selected swap route"}),l),W(l,{now:e.now})}catch(s){m??=j(s);continue}throw m??new C}function Ve(e,t={}){if(!e||typeof e.quoteId!="string"||!e.quoteId.trim())throw new o("Provide a valid quote to build a swap.");w(e.router);let n=S.get(e.quoteId),i=U(t.now);if(me(i),!n||BigInt(i)>=r(n.expiresAt))throw S.delete(e.quoteId),new P;if(e.oakFee!==void 0&&r(e.oakFee)!==0n)throw new o("Oak charges 0 swap fee; venue fees must never be counted as Oak income.");$(e,n),$({...n,...t},n);let a=n.from,c=n.to,u=n.amountIn,m=n.wallet;if(!a||!c||!m||u===void 0)throw new o("Accepted quote must include input, output, amount and wallet.");let A=n.chainId??h,d=n.spender??n.router,f=t.allowance??e.allowance??n?.allowance??"0";w(a),w(c),w(m),w(d);let s=r(u);if(s<=0n)throw new o("Swap amountIn must be greater than zero.");let l=r(n.minAmountOut);if(l<=0n)throw new o("Swap minAmountOut must be greater than zero.");let g=e.router.toLowerCase()===V.toLowerCase(),p=t.data??e.data??n?.data??(g?Ce({from:a,to:c,amountIn:s.toString(),amountOut:n.amountOut,minAmountOut:l.toString(),wallet:m}):De({from:a,to:c,amountIn:s.toString(),minAmountOut:l.toString(),wallet:m}));we(p,n.calldataMinAmountOut??l.toString(),n.router.toLowerCase()===M.toLowerCase());let v=n.venueFee??"0",T=n.venueFeeBps??0,x=n.provider??(g?"velora":"kyberswap"),E=n.feeDisclosure??fe({provider:x,venueFee:v,venueFeeBps:T,oakFee:"0"}),k=O(a),b=t.value??e.value??n?.value??(k?s.toString():"0"),I=X({to:e.router,data:p,value:b,chainId:A,description:`Swap ${s} base units of ${a} for at least ${l} base units of ${c} via ${x} (${e.router}). ${E}`});return Ae(I,n),k||r(f)>=s?[I]:[ae(a,d,s.toString(),A),I]}export{ve as a,q as b,_e as c,ce as d,Se as e,N as f,C as g,P as h,Oe as i,Y as j,se as k,$ as l,U as m,O as n,Ie as o,ye as p,Me as q,pe as r,ke as s,fe as t,De as u,Ce as v,Te as w,we as x,Ae as y,W as z,Ne as A,Ve as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,i as d}from"./ZUC6ILK2.js";import{a as n}from"./NGAI6GTU.js";import{encodeAbiParameters as y,keccak256 as g,parseAbi as p,zeroAddress as w}from"viem";var u=d[i].pons,m=p(["function getLaunchedToken(address) view returns ((address token,address curve,address deployer,address creatorFeeRecipient,address pairToken,uint256 graduationThreshold,uint24 poolFee,int24 tickSpacing,uint16 creatorTaxBps,bool buybackEnabled,uint8 phase,uint256 sweptQuote,uint256 sweptTokens,uint256 sweptAt,bool exists))","function memeHook() view returns (address)"]),h=p(["function factory() view returns (address)","function getReserves() view returns (uint256 quoteReserve,uint256 tokenReserve)"]),l=p(["function getSlot0(bytes32) view returns (uint160,int24,uint24,uint24)","function getLiquidity(bytes32) view returns (uint128)"]);async function P(t,r,s){if(t.chainId!==i||!Number.isInteger(t.decimals)||t.decimals<0||t.decimals>255)throw new n("No supported Pons reference price on this chain or for these token decimals.");let e=await r.readContract({address:u.factory.address,abi:m,functionName:"getLaunchedToken",args:[t.address],blockNumber:s});if(!e.exists||e.token.toLowerCase()!==t.address.toLowerCase()||e.pairToken.toLowerCase()!==w)throw new n("No supported native-ETH Pons launch reference price.");let f=10n**BigInt(t.decimals);if(e.phase===0){let[c,[a,o]]=await Promise.all([r.readContract({address:e.curve,abi:h,functionName:"factory",blockNumber:s}),r.readContract({address:e.curve,abi:h,functionName:"getReserves",blockNumber:s})]);if(c.toLowerCase()!==u.factory.address.toLowerCase()||a<=0n||o<=0n)throw new n("The Pons curve reference price is unavailable.");return{numerator:a*f,denominator:o*10n**18n}}if(e.phase===2){let c=await r.readContract({address:u.factory.address,abi:m,functionName:"memeHook",blockNumber:s}),a=g(y([{type:"address"},{type:"address"},{type:"uint24"},{type:"int24"},{type:"address"}],[w,t.address,e.poolFee,e.tickSpacing,c])),[o,v]=await Promise.all([r.readContract({address:d[i].ponsTrade.state_view.address,abi:l,functionName:"getSlot0",args:[a],blockNumber:s}),r.readContract({address:d[i].ponsTrade.state_view.address,abi:l,functionName:"getLiquidity",args:[a],blockNumber:s})]);if(o[0]<=0n||v<=0n)throw new n("The graduated Pons pool reference price is unavailable.");return{numerator:(1n<<192n)*f,denominator:o[0]**2n*10n**18n}}throw new n("The Pons launch has no active reference price in this phase.")}export{P as a};
|