@oakagentkit/core 0.1.1 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts +19 -0
- package/build/dist/api/args.js +1 -0
- 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/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 +9 -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 +20 -2
- 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 +11 -3
- 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 +15 -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 +6 -15
- package/build/dist/api/pricing.js +1 -1
- 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.d.ts +45 -0
- package/build/dist/api/send.js +1 -0
- 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 +62 -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 +7 -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 +12 -0
- package/build/dist/api/untrusted.js +1 -1
- package/build/dist/api/vendor-limits.js +1 -1
- package/build/dist/chunks/2EDXKJ3B.js +1 -0
- package/build/dist/chunks/2EGFALNH.js +1 -0
- package/build/dist/chunks/2LM5C7FQ.js +1 -0
- package/build/dist/chunks/2NA6JLEC.js +1 -0
- package/build/dist/chunks/2O6A6WEX.js +1 -0
- package/build/dist/chunks/37QNUNED.js +1 -0
- package/build/dist/chunks/3CCBUYUM.js +1 -0
- package/build/dist/chunks/3RFSGU2Y.js +1 -0
- package/build/dist/chunks/{XTUXR43N.js → 3Z3U4YPA.js} +1 -1
- package/build/dist/chunks/4CDR7F4I.js +1 -0
- package/build/dist/chunks/4X6JEMSF.js +1 -0
- package/build/dist/chunks/53N7PNJH.js +1 -0
- package/build/dist/chunks/5EHQM6DM.js +1 -0
- package/build/dist/chunks/5H3MQWH7.js +18 -0
- package/build/dist/chunks/5XFXH2JT.js +1 -0
- package/build/dist/chunks/5YS5V2LK.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/{VBWJOG3N.js → 6IM6A5VA.js} +1 -1
- package/build/dist/chunks/6JCEJ66K.js +1 -0
- package/build/dist/chunks/6NR7SVRO.js +1 -0
- package/build/dist/chunks/6SB3FB3P.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/7LDAJ6BM.js +1 -0
- package/build/dist/chunks/7MR37STI.js +1 -0
- package/build/dist/chunks/7US6PD56.js +1 -0
- package/build/dist/chunks/7YU6DELJ.js +1 -0
- package/build/dist/chunks/AFHHRDPJ.js +1 -0
- package/build/dist/chunks/AIWZGIZ6.js +1 -0
- package/build/dist/chunks/AXYOJBX6.js +1 -0
- package/build/dist/chunks/AYM5L6L7.js +1 -0
- package/build/dist/chunks/B72Q2EQ2.js +1 -0
- package/build/dist/chunks/B7V7AA5A.js +1 -0
- package/build/dist/chunks/BBQVTEYB.js +1 -0
- package/build/dist/chunks/BQLLTY4L.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/C5LR6F4B.js +1 -0
- package/build/dist/chunks/CAYBSVA6.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/CS55ERS3.js +1 -0
- package/build/dist/chunks/CXMC3T6B.js +1 -0
- package/build/dist/chunks/{PQHU5A3U.js → D3OWLDVB.js} +1 -1
- package/build/dist/chunks/DHXVYHT4.js +1 -0
- package/build/dist/chunks/E2IVNGLC.js +1 -0
- package/build/dist/chunks/E2Q5IA67.js +1 -0
- package/build/dist/chunks/{RYOVSHKO.js → E7ASOYQI.js} +1 -1
- package/build/dist/chunks/EAEQOS7Y.js +1 -0
- package/build/dist/chunks/EC5W3UZD.js +1 -0
- package/build/dist/chunks/{XAB4OIE3.js → EG6M6SSO.js} +1 -1
- package/build/dist/chunks/EHVPRQHS.js +1 -0
- package/build/dist/chunks/EKGHKEKV.js +1 -0
- package/build/dist/chunks/EVANKNJV.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/FL3EF72E.js +1 -0
- package/build/dist/chunks/FLXID6I3.js +1 -0
- package/build/dist/chunks/FYTF2QMS.js +1 -0
- package/build/dist/chunks/G7UKNO2I.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/HACP2Q6D.js +3 -0
- package/build/dist/chunks/HF2AGJZC.js +1 -0
- package/build/dist/chunks/HFQS5344.js +1 -0
- package/build/dist/chunks/{74X7PXPR.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/HYIEQG4X.js +1 -0
- package/build/dist/chunks/HZUWK5B2.js +1 -0
- package/build/dist/chunks/IHGVCPVA.js +2 -0
- package/build/dist/chunks/IKP3Z3RX.js +1 -0
- package/build/dist/chunks/ITIIHCZK.js +1 -0
- package/build/dist/chunks/IWALIX7Q.js +1 -0
- package/build/dist/chunks/JOMK32QW.js +1 -0
- package/build/dist/chunks/JRO6WTK4.js +1 -0
- package/build/dist/chunks/JRVTSGAT.js +1 -0
- package/build/dist/chunks/JRZLKIYB.js +1 -0
- package/build/dist/chunks/JVTVOK6P.js +1 -0
- package/build/dist/chunks/{XN4WDN3O.js → JXOEJPJ4.js} +1 -1
- package/build/dist/chunks/K2LWX3PZ.js +1 -0
- package/build/dist/chunks/KEPQXFHU.js +1 -0
- package/build/dist/chunks/L24EOVLT.js +1 -0
- package/build/dist/chunks/L2MTPRU7.js +1 -0
- package/build/dist/chunks/LBEMCOND.js +1 -0
- package/build/dist/chunks/LFKSXD3S.js +1 -0
- package/build/dist/chunks/MRWCFTMS.js +1 -0
- package/build/dist/chunks/MWWYIFXJ.js +1 -0
- package/build/dist/chunks/MYBDO5SA.js +1 -0
- package/build/dist/chunks/N77ANGBT.js +1 -0
- package/build/dist/chunks/NCQFWPAW.js +1 -0
- package/build/dist/chunks/NHCRJC5X.js +1 -0
- package/build/dist/chunks/NNZ4SZZ4.js +1 -0
- package/build/dist/chunks/NUWL6TJM.js +1 -0
- package/build/dist/chunks/O47JXRXN.js +1 -0
- package/build/dist/chunks/{MEZH7RPA.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/OJP7Y4AM.js +1 -0
- package/build/dist/chunks/OK3TQFXZ.js +1 -0
- package/build/dist/chunks/OW7GOYKA.js +1 -0
- package/build/dist/chunks/P4UQGWCP.js +1 -0
- package/build/dist/chunks/P6ELT4ZV.js +1 -0
- package/build/dist/chunks/PHXWBC4O.js +1 -0
- package/build/dist/chunks/Q2VMH2LB.js +1 -0
- package/build/dist/chunks/QH3AL3UN.js +1 -0
- package/build/dist/chunks/QHHZDXRG.js +1 -0
- package/build/dist/chunks/QNPEKNWM.js +1 -0
- package/build/dist/chunks/QOY4AANB.js +1 -0
- package/build/dist/chunks/QRUC7EFE.js +1 -0
- package/build/dist/chunks/QYKXWBZC.js +1 -0
- package/build/dist/chunks/REGJY5RC.js +1 -0
- package/build/dist/chunks/RETS2ZEK.js +1 -0
- package/build/dist/chunks/RFJCG4NA.js +1 -0
- package/build/dist/chunks/RNEMTLQG.js +1 -0
- package/build/dist/chunks/RRSODRGT.js +1 -0
- package/build/dist/chunks/SEW7UP5U.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/SS7U3CMZ.js +1 -0
- package/build/dist/chunks/SXX52Y27.js +1 -0
- package/build/dist/chunks/SYZ55RCX.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/TRCP7X5P.js +1 -0
- package/build/dist/chunks/TWR7BF72.js +1 -0
- package/build/dist/chunks/UEYFMXV3.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/VCWDJQDE.js +1 -0
- package/build/dist/chunks/{6YQ2RX5I.js → VXLJRRKV.js} +1 -1
- package/build/dist/chunks/W6G2QGYF.js +1 -0
- package/build/dist/chunks/WCKMQFGS.js +1117 -0
- package/build/dist/chunks/WHT45EFX.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/{Z53DADZ4.js → XCFA73P2.js} +1 -1
- 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/YHPOXAKA.js +1 -0
- package/build/dist/chunks/YONRUWN7.js +1 -0
- package/build/dist/chunks/YR3QJVJQ.js +1 -0
- package/build/dist/chunks/Z4LJ2GTX.js +1 -0
- package/build/dist/chunks/ZL3KVABO.js +1 -0
- package/build/dist/chunks/ZPM2MFXZ.js +1 -0
- package/build/dist/chunks/ZPNGV34U.js +1 -0
- package/build/dist/chunks/ZQI7B2Z7.js +1 -0
- package/build/dist/chunks/ZT67OMLW.js +1 -0
- package/package.json +13 -9
- package/build/dist/chunks/5B3UVWMV.js +0 -1
- package/build/dist/chunks/5BP72XOA.js +0 -1
- package/build/dist/chunks/5SH3C7XP.js +0 -1
- package/build/dist/chunks/7I6TXFXR.js +0 -1
- package/build/dist/chunks/A5O3SRHY.js +0 -1
- package/build/dist/chunks/B2LA6VVF.js +0 -3
- package/build/dist/chunks/CWQ5WXZQ.js +0 -1
- package/build/dist/chunks/F3TOOLFQ.js +0 -1
- package/build/dist/chunks/GOIVHR4B.js +0 -1
- package/build/dist/chunks/M643PYHO.js +0 -1
- package/build/dist/chunks/NDHEJGWR.js +0 -1
- package/build/dist/chunks/NNJLMS7F.js +0 -1
- package/build/dist/chunks/R5CBH2CR.js +0 -1
- package/build/dist/chunks/SUQ6PIAV.js +0 -1
- package/build/dist/chunks/SXBGOGYQ.js +0 -1
- package/build/dist/chunks/T4IYMYZD.js +0 -1
- package/build/dist/chunks/TFYLOWFO.js +0 -1
- package/build/dist/chunks/TU3KHOZK.js +0 -1
- package/build/dist/chunks/UB5U6SI2.js +0 -1
- package/build/dist/chunks/UIJWIFGV.js +0 -1
- package/build/dist/chunks/WFE3NXBF.js +0 -2
- package/build/dist/chunks/XEN45QST.js +0 -1
- package/build/dist/chunks/XKZOMGC3.js +0 -1
- package/build/dist/chunks/Y2SGXWFM.js +0 -1
- package/build/dist/chunks/Z3FZWNAJ.js +0 -1
- package/build/dist/chunks/ZJUNO5N7.js +0 -1
- package/build/dist/chunks/ZZLHDHOT.js +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PublicClient } from 'viem';
|
|
1
2
|
import type { Address, CreateModulePart, DecimalString, Hex, ModuleContext, Position, Token, TokenAmount, UnsignedTx } from '../../types.js';
|
|
2
3
|
export declare const V4_POOL_MANAGER: Address;
|
|
3
4
|
export declare const V4_POSITION_MANAGER: Address;
|
|
@@ -11,17 +12,6 @@ export declare const V4_DYNAMIC_FEE_FLAG: 8388608;
|
|
|
11
12
|
export declare const MIN_TICK: -887272;
|
|
12
13
|
export declare const MAX_TICK: 887272;
|
|
13
14
|
export declare const DEEPEST_V4_POOL_ID: Hex;
|
|
14
|
-
export declare const V4_ACTIONS: {
|
|
15
|
-
readonly DECREASE_LIQUIDITY: 1;
|
|
16
|
-
readonly MINT_POSITION: 2;
|
|
17
|
-
readonly BURN_POSITION: 3;
|
|
18
|
-
readonly SWAP_EXACT_IN_SINGLE: 6;
|
|
19
|
-
readonly SETTLE_ALL: 12;
|
|
20
|
-
readonly SETTLE_PAIR: 13;
|
|
21
|
-
readonly TAKE_ALL: 15;
|
|
22
|
-
readonly TAKE_PAIR: 17;
|
|
23
|
-
readonly SWEEP: 20;
|
|
24
|
-
};
|
|
25
15
|
export interface V4PoolKey {
|
|
26
16
|
currency0: Address;
|
|
27
17
|
currency1: Address;
|
|
@@ -39,6 +29,10 @@ export interface MeasuredV4Pool {
|
|
|
39
29
|
lpFee: number;
|
|
40
30
|
}
|
|
41
31
|
export declare const MEASURED_V4_POOLS: readonly MeasuredV4Pool[];
|
|
32
|
+
export declare const VOLATILE_PAIR_HOOK: `0x${string}`;
|
|
33
|
+
export declare const VOLATILE_PAIR_POOL_ID: Hex;
|
|
34
|
+
export declare const VOLATILE_PAIR_KEY: V4PoolKey;
|
|
35
|
+
export declare const ALLOWED_V4_HOOK_ADDRESSES: Set<string>;
|
|
42
36
|
export declare function isNativeV4Currency(currency: Address): boolean;
|
|
43
37
|
export declare function computePoolId(key: V4PoolKey): Hex;
|
|
44
38
|
export declare function isDynamicFeePool(keyOrFee: V4PoolKey | number): boolean;
|
|
@@ -55,21 +49,6 @@ export declare function fullRangeTicks(tickSpacing: number): {
|
|
|
55
49
|
};
|
|
56
50
|
export declare function validateTickRange(tickLower: number, tickUpper: number, tickSpacing: number): void;
|
|
57
51
|
export declare function encodePermit2Approve(token: Address, spender: Address, amount: DecimalString, expiration: DecimalString | number, chainId?: number): UnsignedTx;
|
|
58
|
-
export declare function encodeV4UniversalRouterFeeSwap(params: {
|
|
59
|
-
poolKey: V4PoolKey;
|
|
60
|
-
zeroForOne: boolean;
|
|
61
|
-
amountIn: DecimalString;
|
|
62
|
-
amountOutMinimum: DecimalString;
|
|
63
|
-
deadline: DecimalString | number;
|
|
64
|
-
hookData?: Hex;
|
|
65
|
-
chainId?: number;
|
|
66
|
-
}): UnsignedTx;
|
|
67
|
-
export declare function encodePackedPositionInfo(params: {
|
|
68
|
-
poolId: Hex;
|
|
69
|
-
tickLower: number;
|
|
70
|
-
tickUpper: number;
|
|
71
|
-
hasSubscriber?: boolean;
|
|
72
|
-
}): bigint;
|
|
73
52
|
export declare function decodePackedPositionInfo(info: bigint): {
|
|
74
53
|
poolIdBytes25: Hex;
|
|
75
54
|
tickLower: number;
|
|
@@ -95,15 +74,25 @@ export declare function liquidityForAmounts(params: {
|
|
|
95
74
|
}): bigint;
|
|
96
75
|
export declare function formatSignedPreviewChanges(changes: readonly TokenAmount[], formatAmount: ModuleContext['formatAmount']): string[];
|
|
97
76
|
export declare function tokenForCurrency(currency: Address, chainId?: number): Token;
|
|
77
|
+
export declare function resolveCurrencyToken(client: PublicClient, currency: Address, chainId?: number): Promise<Token>;
|
|
78
|
+
export declare function resolvePositionPoolKey(client: PublicClient, tokenId: bigint, args: Record<string, unknown>): Promise<{
|
|
79
|
+
poolKey: V4PoolKey;
|
|
80
|
+
poolId: Hex;
|
|
81
|
+
tickLower: number;
|
|
82
|
+
tickUpper: number;
|
|
83
|
+
}>;
|
|
98
84
|
export declare function readV4Positions(context: ModuleContext, wallet: Address, options?: {
|
|
99
85
|
tokenIds?: readonly (string | number | bigint)[];
|
|
100
86
|
includeZero?: boolean;
|
|
101
87
|
}): Promise<Position[]>;
|
|
102
88
|
export declare const V4_ADD_SCHEMA: Record<string, unknown>;
|
|
89
|
+
export declare const V4_CREATE_POOL_SCHEMA: Record<string, unknown>;
|
|
103
90
|
export declare const V4_COLLECT_SCHEMA: Record<string, unknown>;
|
|
104
91
|
export declare const V4_REMOVE_SCHEMA: Record<string, unknown>;
|
|
105
92
|
export declare const V4_LIST_POSITIONS_SCHEMA: Record<string, unknown>;
|
|
93
|
+
export declare function v4ReferencePrices(client: PublicClient, key: V4PoolKey): Promise<{
|
|
94
|
+
label: string;
|
|
95
|
+
sqrtPriceX96: bigint;
|
|
96
|
+
}[]>;
|
|
106
97
|
export declare const createV4Part: CreateModulePart;
|
|
107
|
-
export declare const createPart: CreateModulePart;
|
|
108
98
|
export declare const createModulePart: CreateModulePart;
|
|
109
|
-
export declare const createUniswapV4Part: CreateModulePart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../../chunks/
|
|
1
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../../chunks/FL3EF72E.js";import"../../../chunks/FYTF2QMS.js";import"../../../chunks/E7ASOYQI.js";import"../../../chunks/D3OWLDVB.js";import"../../../chunks/CCEWSOBT.js";import"../../../chunks/RFJCG4NA.js";import"../../../chunks/HZUWK5B2.js";import"../../../chunks/WHT45EFX.js";import"../../../chunks/HACP2Q6D.js";import"../../../chunks/FLXID6I3.js";import"../../../chunks/NNZ4SZZ4.js";import"../../../chunks/EAEQOS7Y.js";import"../../../chunks/HQVC6X3T.js";import"../../../chunks/ZQI7B2Z7.js";import"../../../chunks/XCFA73P2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/HFQS5344.js";import"../../../chunks/G7UKNO2I.js";import"../../../chunks/BYXBS45D.js";import"../../../chunks/GZ5TW3WB.js";import"../../../chunks/5EHQM6DM.js";import"../../../chunks/AXYOJBX6.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/6IM6A5VA.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/MYBDO5SA.js";import"../../../chunks/HIMVOTIU.js";import"../../../chunks/OG5HRQU4.js";import"../../../chunks/UWOFA6GV.js";import"../../../chunks/73N3TOJL.js";import"../../../chunks/RETS2ZEK.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/IWALIX7Q.js";import"../../../chunks/XPFVT2EA.js";import"../../../chunks/EG6M6SSO.js";import"../../../chunks/5YS5V2LK.js";import"../../../chunks/JXOEJPJ4.js";export{q as ALLOWED_V4_HOOK_ADDRESSES,l as DEEPEST_V4_POOL_ID,k as MAX_TICK,m as MEASURED_V4_POOLS,j as MIN_TICK,d as PERMIT2_ADDRESS,g as USDG_ADDRESS,H as V4_ADD_SCHEMA,J as V4_COLLECT_SCHEMA,I as V4_CREATE_POOL_SCHEMA,i as V4_DYNAMIC_FEE_FLAG,L as V4_LIST_POSITIONS_SCHEMA,a as V4_POOL_MANAGER,b as V4_POSITION_MANAGER,K as V4_REMOVE_SCHEMA,c as V4_STATE_VIEW,e as V4_UNIVERSAL_ROUTER,n as VOLATILE_PAIR_HOOK,p as VOLATILE_PAIR_KEY,o as VOLATILE_PAIR_POOL_ID,f as WETH_ADDRESS,h as ZERO_ADDRESS,A as amountsForLiquidity,s as computePoolId,O as createModulePart,N as createV4Part,z as decodePackedPositionInfo,u as describeV4FeeBehavior,y as encodePermit2Approve,C as formatSignedPreviewChanges,w as fullRangeTicks,t as isDynamicFeePool,r as isNativeV4Currency,B as liquidityForAmounts,G as readV4Positions,E as resolveCurrencyToken,F as resolvePositionPoolKey,D as tokenForCurrency,M as v4ReferencePrices,x as validateTickRange,v as validateV4PoolKey};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ModuleContext, ProjectModulePart } from '../../types.js';
|
|
2
|
+
export declare const wethAbi: readonly [{
|
|
3
|
+
readonly name: "deposit";
|
|
4
|
+
readonly type: "function";
|
|
5
|
+
readonly stateMutability: "payable";
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly outputs: readonly [];
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "withdraw";
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
readonly stateMutability: "nonpayable";
|
|
12
|
+
readonly inputs: readonly [{
|
|
13
|
+
readonly type: "uint256";
|
|
14
|
+
}];
|
|
15
|
+
readonly outputs: readonly [];
|
|
16
|
+
}];
|
|
17
|
+
export declare function createWrapPart(context: ModuleContext): ProjectModulePart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../../../chunks/UEYFMXV3.js";import"../../../chunks/FL3EF72E.js";import"../../../chunks/ITIIHCZK.js";import"../../../chunks/FYTF2QMS.js";import"../../../chunks/E7ASOYQI.js";import"../../../chunks/D3OWLDVB.js";import"../../../chunks/CCEWSOBT.js";import"../../../chunks/RFJCG4NA.js";import"../../../chunks/HZUWK5B2.js";import"../../../chunks/WHT45EFX.js";import"../../../chunks/HACP2Q6D.js";import"../../../chunks/FLXID6I3.js";import"../../../chunks/NNZ4SZZ4.js";import"../../../chunks/EAEQOS7Y.js";import"../../../chunks/HQVC6X3T.js";import"../../../chunks/ZQI7B2Z7.js";import"../../../chunks/XCFA73P2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/HFQS5344.js";import"../../../chunks/G7UKNO2I.js";import"../../../chunks/BYXBS45D.js";import"../../../chunks/GZ5TW3WB.js";import"../../../chunks/5EHQM6DM.js";import"../../../chunks/AXYOJBX6.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/6IM6A5VA.js";import"../../../chunks/P4UQGWCP.js";import"../../../chunks/MYBDO5SA.js";import"../../../chunks/HIMVOTIU.js";import"../../../chunks/OG5HRQU4.js";import"../../../chunks/UWOFA6GV.js";import"../../../chunks/73N3TOJL.js";import"../../../chunks/RETS2ZEK.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/IWALIX7Q.js";import"../../../chunks/XPFVT2EA.js";import"../../../chunks/EG6M6SSO.js";import"../../../chunks/5YS5V2LK.js";import"../../../chunks/JXOEJPJ4.js";export{b as createWrapPart,a as wethAbi};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { Address, ModuleContext, ToolArgs, ToolDefinition, UnsignedTx } from '../../types.js';
|
|
2
|
+
export declare const VELORA_DELTA: `0x${string}`;
|
|
3
|
+
export declare const VELORA_DETH: `0x${string}`;
|
|
4
|
+
export declare const VELORA_FEE_CLAIMER: `0x${string}`;
|
|
5
|
+
export declare const veloraClaimsAbi: readonly [{
|
|
6
|
+
readonly name: "getCollectedFees";
|
|
7
|
+
readonly type: "function";
|
|
8
|
+
readonly stateMutability: "view";
|
|
9
|
+
readonly inputs: readonly [{
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
readonly name: "partner";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
readonly name: "token";
|
|
15
|
+
}];
|
|
16
|
+
readonly outputs: readonly [{
|
|
17
|
+
readonly type: "uint256";
|
|
18
|
+
}];
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "withdrawAllFees";
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly stateMutability: "nonpayable";
|
|
23
|
+
readonly inputs: readonly [{
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
readonly name: "token";
|
|
26
|
+
}, {
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
readonly name: "recipient";
|
|
29
|
+
}];
|
|
30
|
+
readonly outputs: readonly [{
|
|
31
|
+
readonly type: "uint256";
|
|
32
|
+
readonly name: "amount";
|
|
33
|
+
}];
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "getBalance";
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
readonly stateMutability: "view";
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
readonly name: "token";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly name: "partner";
|
|
44
|
+
}];
|
|
45
|
+
readonly outputs: readonly [{
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
}];
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "withdrawAllERC20";
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly stateMutability: "nonpayable";
|
|
52
|
+
readonly inputs: readonly [{
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
readonly name: "token";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "address";
|
|
57
|
+
readonly name: "recipient";
|
|
58
|
+
}];
|
|
59
|
+
readonly outputs: readonly [{
|
|
60
|
+
readonly type: "bool";
|
|
61
|
+
}];
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "withdrawNative";
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
readonly stateMutability: "nonpayable";
|
|
66
|
+
readonly inputs: readonly [{
|
|
67
|
+
readonly type: "uint256";
|
|
68
|
+
readonly name: "amount";
|
|
69
|
+
}, {
|
|
70
|
+
readonly type: "address";
|
|
71
|
+
readonly name: "owner";
|
|
72
|
+
}, {
|
|
73
|
+
readonly type: "address";
|
|
74
|
+
readonly name: "receiver";
|
|
75
|
+
}];
|
|
76
|
+
readonly outputs: readonly [];
|
|
77
|
+
}];
|
|
78
|
+
export declare function veloraClaimTerms(name: string, args: ToolArgs, wallet: Address): {
|
|
79
|
+
tx: UnsignedTx;
|
|
80
|
+
inputs: {
|
|
81
|
+
token: Address;
|
|
82
|
+
amount: string;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
export declare function assertVeloraClaimTransactions(txs: UnsignedTx[], name: string, args: ToolArgs, wallet: Address): void;
|
|
86
|
+
export declare function createVeloraClaimTools(context: ModuleContext): ToolDefinition[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../../../chunks/AIWZGIZ6.js";import"../../../chunks/EAEQOS7Y.js";import"../../../chunks/HQVC6X3T.js";import"../../../chunks/ZQI7B2Z7.js";import"../../../chunks/XCFA73P2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/6IM6A5VA.js";import"../../../chunks/HIMVOTIU.js";import"../../../chunks/OG5HRQU4.js";import"../../../chunks/UWOFA6GV.js";import"../../../chunks/73N3TOJL.js";import"../../../chunks/RETS2ZEK.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/IWALIX7Q.js";import"../../../chunks/XPFVT2EA.js";import"../../../chunks/EG6M6SSO.js";import"../../../chunks/5YS5V2LK.js";import"../../../chunks/JXOEJPJ4.js";export{a as VELORA_DELTA,b as VELORA_DETH,c as VELORA_FEE_CLAIMER,f as assertVeloraClaimTransactions,g as createVeloraClaimTools,e as veloraClaimTerms,d as veloraClaimsAbi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../../chunks/QHHZDXRG.js";import"../../../chunks/6IM6A5VA.js";import"../../../chunks/MYBDO5SA.js";import"../../../chunks/HIMVOTIU.js";import"../../../chunks/73N3TOJL.js";import"../../../chunks/RETS2ZEK.js";import"../../../chunks/XPFVT2EA.js";import"../../../chunks/5YS5V2LK.js";import"../../../chunks/JXOEJPJ4.js";export{a as createDeltaReadTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as we}from"../../../chunks/XTUXR43N.js";import{a as re,b as J,e as b,h as se,i as ae,m as O,n as ie,o as G,q as ue,r as de,t as ce,w as me,y as pe,z as le}from"../../../chunks/XEN45QST.js";import{b as H}from"../../../chunks/Z53DADZ4.js";import"../../../chunks/LIUXNOLP.js";import{a as z}from"../../../chunks/MEZH7RPA.js";import{c as ne}from"../../../chunks/TU3KHOZK.js";import"../../../chunks/74X7PXPR.js";import{a as _}from"../../../chunks/VBWJOG3N.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/R5CBH2CR.js";import{a as m,i as oe}from"../../../chunks/5BP72XOA.js";import"../../../chunks/XAB4OIE3.js";import{a as j}from"../../../chunks/7I6TXFXR.js";import{a as t}from"../../../chunks/Z3FZWNAJ.js";import"../../../chunks/XN4WDN3O.js";import{randomUUID as Se}from"node:crypto";import{decodeFunctionData as Te,erc20Abi as be,parseAbi as xe}from"viem";var Q=oe[m].routes.velora.address,Pe="https://api.velora.xyz/prices",Ve="https://api.velora.xyz/transactions/4663?ignoreChecks=true",Ae=(1n<<256n)-1n,qe=new Set(["from","to","amountIn","slippageBps"]),Ce=xe(["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)"]);function V(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function x(e){if(typeof e!="string")throw new t("Provide a token or wallet address.");if(_(e),/^0x0{40}$/i.test(e))throw new t("Use the native ETH token address, not the zero address.");return e}function fe(e){if(typeof e!="string")throw new t("Provide a token address.");return _(e),H(e)}function D(e){return ie(e)?b:e}function v(e,n,p){if(x(e).toLowerCase()!==n.toLowerCase())throw new t(`Velora ${p} does not match the requested swap.`)}function P(e){if(typeof e!="string")throw new t("Amount must be an integer string in base units.");let n=j(e);if(n>Ae)throw new t("Amount exceeds the uint256 range.");return n.toString()}function he(e){if(!V(e))throw new t("Swap arguments must be an object.");for(let q of Object.keys(e))if(!qe.has(q))throw new t(`Unsupported Velora quote argument: ${q}.`);let n=fe(e.from),p=fe(e.to);if(n.toLowerCase()===p.toLowerCase())throw new t("Choose two different token addresses.");let A=P(e.amountIn);if(A==="0")throw new t("Swap amountIn must be greater than zero.");let y=e.slippageBps??J;if(typeof y!="number")throw new t("Slippage must be an integer number of bps.");return G(A,y),{from:n,to:p,amountIn:A,slippageBps:y}}function Be(e){if(!V(e))throw new t("Swap arguments must be an object.");for(let n of Object.keys(e))if(n!=="quoteId")throw new t(`Unsupported Velora swap argument: ${n}.`);if(typeof e.quoteId!="string"||!e.quoteId.trim())throw new t("Provide a Velora quoteId.");return e.quoteId}function ge(e,n){pe(e,n);let p=Te({abi:Ce,data:e.data}),[,A,,y]=p.args;if(A.toAmount.toString()!==n.calldataMinAmountOut)throw new t("Velora calldata minimum output does not match the accepted quote.");if(A.quotedAmount.toString()!==n.grossAmountOut)throw new t("Velora calldata quotedAmount does not match the quoted gross output.");if(y!=="0x")throw new t("Velora calldata must not include a permit payload.")}var $e={type:"object",additionalProperties:!1,required:["from","to","amountIn"],properties:{from:{type:"string",pattern:"^0x[0-9a-fA-F]{40}$"},to:{type:"string",pattern:"^0x[0-9a-fA-F]{40}$"},amountIn:{type:"string",pattern:"^[0-9]+$",description:"Positive integer amount in input-token base units."},slippageBps:{type:"integer",minimum:0,maximum:9999,default:J}}};function Fe(e){let n=new Map;async function p(o){try{return await o()}catch(s){throw new t(e.plainError(s))}}async function A(){let o=e.clientFor(m);if(await o.getChainId()!==m)throw new t("Velora requires an RPC on chain 4663.");return o}async function y(o,s){if(o.toLowerCase()===b.toLowerCase())return{address:o,symbol:"ETH",decimals:18,chainId:m};let[a,r]=await Promise.all([z(s,m,o,"symbol"),z(s,m,o,"decimals")]);if(typeof a!="string"||!a.trim()||!Number.isInteger(r)||r<0||r>255)throw new t("The token returned invalid symbol or decimals metadata.");return{address:o,symbol:a,decimals:r,chainId:m}}async function q(o,s,a,r){if(o.toLowerCase()===b.toLowerCase())return 0n;let d=await r.readContract({address:o,abi:be,functionName:"allowance",args:[s,a]});if(typeof d!="bigint"||d<0n||d>Ae)throw new t("The token returned an invalid allowance.");return d}function ye(){let o=BigInt(O());for(let[s,a]of n)o>=BigInt(a.quote.expiresAt)&&n.delete(s)}function I(o){if(BigInt(O())>=BigInt(o.expiresAt))throw n.delete(o.quoteId),new se}async function M(o,s,a=!1){return p(async()=>{let r=he(o),d=x(s),u=String(O()+re),C=await A(),[c,l]=await Promise.all([y(r.from,C),y(r.to,C)]),B=new URLSearchParams({network:String(m),srcToken:D(c.address),srcDecimals:String(c.decimals),destToken:D(l.address),destDecimals:String(l.decimals),amount:r.amountIn,side:"SELL"}),S=await we(e.http,`${Pe}?${B}`,V),i=S.value.priceRoute;if(!V(i))throw new t("Velora returned no usable price route.");v(i.srcToken,c.address,"input token"),v(i.destToken,l.address,"output token"),v(i.contractAddress,Q,"router"),v(i.tokenTransferProxy,Q,"token transfer proxy");let f=x(i.tokenTransferProxy);if(i.network!==m||i.srcDecimals!==c.decimals||i.destDecimals!==l.decimals||P(i.srcAmount)!==r.amountIn||i.side!=="SELL"||i.contractMethod!=="swapExactAmountIn"||i.version!=="6.2")throw new t("Velora returned a route that does not match the requested swap.");if(i.maxImpactReached===!0)throw new t("Velora reports that this route exceeds its price impact limit.");if(i.partner!=="anon")throw new t("Velora returned an unsupported venue fee. Request a fresh quote.");let w=ue(i.partnerFee);if(i.destAmountAfterFee===void 0&&w!==0)throw new t("Velora price route is missing destAmountAfterFee.");let h=P(i.destAmount),$=BigInt(P(i.destAmountAfterFee??h)),Ie=BigInt(h)*BigInt(1e4-w)/10000n,ve=(BigInt(h)*BigInt(1e4-w)+9999n)/10000n;if($<Ie||$>ve)throw new t("Velora output after fees does not match its disclosed venue fee.");let T=(BigInt(h)-BigInt(h)*BigInt(w)/10000n-1n).toString();if(BigInt(T)<=0n)throw new t("Velora returned no positive swap output.");let F=G(T,r.slippageBps);if(F==="0")throw new t("Velora minimum output must be positive.");let E=de(F,w).toString();if(BigInt(E)>BigInt(h))throw new t("Velora output is too small to cover router dust.");let U=(BigInt(h)-BigInt(T)).toString(),Y=ce({provider:"velora",venueFee:U,venueFeeBps:w,oakFee:"0"}),Z=F,g={quoteId:`velora:${Se()}`,router:Q,expiresAt:String(Math.min(Number(u),S.expiresAt)),amountOut:T,minAmountOut:Z,calldataMinAmountOut:E,provider:"velora",from:c.address,to:l.address,amountIn:r.amountIn,wallet:d,chainId:m,slippageBps:r.slippageBps,spender:f,value:c.address.toLowerCase()===b.toLowerCase()?r.amountIn:"0",grossAmountOut:h,destAmountAfterFee:T,venueFee:U,venueFeeBps:w,oakFee:"0",feeDisclosure:Y,input:{token:c,amount:r.amountIn},output:{token:l,amount:T},minimumOutput:{token:l,amount:Z},fee:{token:l,amount:U}},L={quote:g,wallet:d,spender:f,prepare:async()=>{if(I(g),L.tx)return structuredClone(g);let k=await ne(e.http,Ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({srcToken:D(c.address),destToken:D(l.address),srcAmount:r.amountIn,destAmount:E,priceRoute:i,userAddress:d,receiver:d,srcDecimals:c.decimals,destDecimals:l.decimals})},V);if(v(k.from,d,"transaction sender"),k.chainId!==m)throw new t("Velora built a transaction for a different chain.");if(typeof k.data!="string"||!/^0x(?:[a-fA-F0-9]{2})+$/.test(k.data))throw new t("Velora returned invalid swap calldata.");let te=k.data,ke=P(k.value);if(me(te).toString()!==E)throw new t("Velora calldata minimum does not match the net output and slippage.");let N=e.unsignedTx({to:x(k.to),data:te,value:ke,chainId:m,description:`Swap ${r.amountIn} base units of ${c.address} for at least ${F} base units of ${l.address} via velora (${Q}). ${Y}`});return ge(N,g),g.data=N.data,I(g),L.tx=N,structuredClone(g)}};for(I(g),ye();n.size>=ae;)n.delete(n.keys().next().value);if(n.set(g.quoteId,L),a)return structuredClone(g);let ee=await L.prepare();return{...ee,...le(ee)}})}async function K(o,s){return p(async()=>{let a=n.get(o);if(!a)throw new t("Quote is unknown or expired. Request a fresh Velora quote.");return v(s,a.wallet,"wallet"),a.prepare()})}async function W(o,s){return p(async()=>{let a=n.get(o);if(!a)throw new t("Quote is unknown or expired. Request a fresh Velora quote.");v(s,a.wallet,"wallet"),I(a.quote);let r=await A(),d=await q(a.quote.input.token.address,s,a.spender,r);return I(a.quote),d.toString()})}async function X(o,s,a={}){return p(async()=>{if(typeof o!="string"||!o.trim())throw new t("Provide a Velora quoteId.");let r=x(s),d=n.get(o);if(!d)throw new t("Quote is unknown or expired. Request a fresh Velora quote.");let{quote:u,spender:C}=d;I(u),v(r,d.wallet,"wallet"),await K(o,r);let c=[],l=j(a.allowance??await W(o,r));u.input.token.address.toLowerCase()!==b.toLowerCase()&&l<BigInt(u.input.amount)&&c.push(e.approval(u.input.token.address,C,u.input.amount,m));let B={...d.tx};ge(B,u),c.push(B),I(u);let S=await e.preview(c,r);I(u);let R=0n,i=S.changes.map(({token:f,amount:w})=>{if(f={...f,address:H(f.address)},!/^-?\d+$/.test(w))throw new t("Preview returned an invalid token amount.");f.address.toLowerCase()===u.output.token.address.toLowerCase()&&(R+=BigInt(w));let h=w.startsWith("-"),$=e.formatAmount(h?w.slice(1):w,f.decimals);return`${h?"-":"+"}${$} ${f.symbol} (${f.address}, chain ${f.chainId}, ${f.decimals} decimals)`});if(R<BigInt(u.minimumOutput.amount))throw new t("Preview retained output is below the accepted minimum.");return{txs:c,preview:S,summary:`Unsigned Velora swap. Minimum output: ${u.minimumOutput.amount} base units of ${u.output.token.address} (${u.output.token.decimals} decimals, chain ${m}). ${u.feeDisclosure} Fee token: ${u.fee.token.address} (${u.fee.token.decimals} decimals). ${S.summary} ${i.join("; ")}`}})}return{name:"velora",swapProvider:{name:"velora",quote:M,build:X,prepareQuote:K,readAllowance:W,quotePrices:(o,s)=>M(o,s,!0)},tools:[{name:"velora_quote",inputSchema:$e,execute:(o,s)=>p(()=>M(he(o),s))},{name:"velora_swap",inputSchema:{type:"object",additionalProperties:!1,required:["quoteId"],properties:{quoteId:{type:"string",minLength:1}}},execute:(o,s)=>p(()=>X(Be(o),s))}]}}var Je=e=>({tools:Fe(e).tools});export{Fe as createModule,Je as createModulePart};
|
|
1
|
+
import{g as ke}from"../../../chunks/AIWZGIZ6.js";import{a as Te}from"../../../chunks/QHHZDXRG.js";import{a as Se}from"../../../chunks/3Z3U4YPA.js";import{a as pe,b as X,d as V,h as le,i as we,m as R,n as fe,o as Y,q as he,r as ge,t as Ae,w as ve,y as ye,z as Ie}from"../../../chunks/EAEQOS7Y.js";import"../../../chunks/HQVC6X3T.js";import"../../../chunks/ZQI7B2Z7.js";import{b as W}from"../../../chunks/XCFA73P2.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/6IM6A5VA.js";import{c as me}from"../../../chunks/MYBDO5SA.js";import"../../../chunks/HIMVOTIU.js";import{a as K}from"../../../chunks/OG5HRQU4.js";import{a as ce}from"../../../chunks/UWOFA6GV.js";import{c as H,d as G,e as P,g as h,k as J,l as ue,n as de}from"../../../chunks/73N3TOJL.js";import{a as ie}from"../../../chunks/RETS2ZEK.js";import"../../../chunks/5HCXZWUH.js";import"../../../chunks/IWALIX7Q.js";import{a as d,i as z}from"../../../chunks/XPFVT2EA.js";import"../../../chunks/EG6M6SSO.js";import{a as o}from"../../../chunks/5YS5V2LK.js";import"../../../chunks/JXOEJPJ4.js";import{randomUUID as De}from"node:crypto";import{decodeFunctionData as Fe,erc20Abi as Ee,parseAbi as Ce}from"viem";var U=z[d].routes.velora.address,Oe="https://api.velora.xyz/prices",Qe="https://api.velora.xyz/transactions/4663?ignoreChecks=true",Me=(1n<<256n)-1n,Re=new Set(["from","to","amountIn","slippageBps"]),Ue=Ce(["function swapExactAmountIn(address executor, (address srcToken, address destToken, uint256 fromAmount, uint256 toAmount, uint256 quotedAmount, bytes32 metadata, address beneficiary) swapData, uint256 partnerAndFee, bytes permit, bytes executorData) payable returns (uint256 receivedAmount, uint256 submittedAmount, uint256 augustusFeeAmount)"]);function B(e){let s=J(e,"Provide a token or wallet address.",G);return ue(s,"Use the native ETH token address, not the zero address.")}function be(e){return W(J(e,"Provide a token address.",G))}function N(e){return fe(e)?V:e}function S(e,s,p){if(!h(B(e),s))throw new o(`Velora ${p} does not match the requested swap.`)}function $(e){return de(e,"Amount exceeds the uint256 range.",{notString:"Amount must be an integer string in base units."}).toString()}function xe(e){if(!P(e))throw new o("Swap arguments must be an object.");for(let D of Object.keys(e))if(!Re.has(D))throw new o(`Unsupported Velora quote argument: ${D}.`);let s=be(e.from),p=be(e.to);if(h(s,p))throw new o("Choose two different token addresses.");let g=$(e.amountIn);if(g==="0")throw new o("Swap amountIn must be greater than zero.");let v=e.slippageBps??X;if(typeof v!="number")throw new o("Slippage must be an integer number of bps.");return Y(g,v),{from:s,to:p,amountIn:g,slippageBps:v}}function Ne(e){if(!P(e))throw new o("Swap arguments must be an object.");for(let s of Object.keys(e))if(s!=="quoteId")throw new o(`Unsupported Velora swap argument: ${s}.`);if(typeof e.quoteId!="string"||!e.quoteId.trim())throw new o("Provide a Velora quoteId.");return e.quoteId}function Pe(e,s){ye(e,s);let p=Fe({abi:Ue,data:e.data}),[,g,,v]=p.args;if(g.toAmount.toString()!==s.calldataMinAmountOut)throw new o("Velora calldata minimum output does not match the accepted quote.");if(g.quotedAmount.toString()!==s.grossAmountOut)throw new o("Velora calldata quotedAmount does not match the quoted gross output.");if(v!=="0x")throw new o("Velora calldata must not include a permit payload.")}var _e={type:"object",additionalProperties:!1,required:["from","to","amountIn"],properties:{from:H,to:H,amountIn:ce("Positive integer amount in input-token base units."),slippageBps:{type:"integer",minimum:0,maximum:9999,default:X}}};function Le(e){let s=new Map;async function p(t){try{return await t()}catch(a){throw new o(e.plainError(a))}}async function g(){let t=e.clientFor(d);if(await t.getChainId()!==d)throw new o("Velora requires an RPC on chain 4663.");return t}async function v(t,a){if(h(t,V))return{address:t,symbol:"ETH",decimals:18,chainId:d};let[i,n]=await Promise.all([K(a,d,t,"symbol"),K(a,d,t,"decimals")]);if(typeof i!="string"||!i.trim()||!Number.isInteger(n)||n<0||n>255)throw new o("The token returned invalid symbol or decimals metadata.");return{address:t,symbol:i,decimals:n,chainId:d}}async function D(t,a,i,n){if(h(t,V))return 0n;let m=await n.readContract({address:t,abi:Ee,functionName:"allowance",args:[a,i]});if(typeof m!="bigint"||m<0n||m>Me)throw new o("The token returned an invalid allowance.");return m}function Ve(){let t=BigInt(R());for(let[a,i]of s)t>=BigInt(i.quote.expiresAt)&&s.delete(a)}function y(t){if(BigInt(R())>=BigInt(t.expiresAt))throw s.delete(t.quoteId),new le}async function _(t,a,i=!1){return p(async()=>{let n=xe(t),m="0xca9c78dd337a67f6e0077f65f5e9218719d30edf",u=z[d].tokens.USDG.address;if(n.from.toLowerCase()===m&&h(n.to,u)||h(n.from,u)&&n.to.toLowerCase()===m)throw new o("Velora NET/USDG routing is unavailable: its pool execution reverts with UniswapV2: K and the cause is unverified. Request a fresh kyberswap_quote for this pair instead.");let k=B(a),b=String(R()+pe),F=await g(),[l,c]=await Promise.all([v(n.from,F),v(n.to,F)]),E=new URLSearchParams({network:String(d),srcToken:N(l.address),srcDecimals:String(l.decimals),destToken:N(c.address),destDecimals:String(c.decimals),amount:n.amountIn,side:"SELL"}),C=await Se(e.http,`${Oe}?${E}`,P),r=C.value.priceRoute;if(!P(r))throw new o("Velora returned no usable price route.");S(r.srcToken,l.address,"input token"),S(r.destToken,c.address,"output token"),S(r.contractAddress,U,"router"),S(r.tokenTransferProxy,U,"token transfer proxy");let q=B(r.tokenTransferProxy);if(r.network!==d||r.srcDecimals!==l.decimals||r.destDecimals!==c.decimals||$(r.srcAmount)!==n.amountIn||r.side!=="SELL"||r.contractMethod!=="swapExactAmountIn"||r.version!=="6.2")throw new o("Velora returned a route that does not match the requested swap.");if(r.maxImpactReached===!0)throw new o("Velora reports that this route exceeds its price impact limit.");if(r.partner!=="anon")throw new o("Velora returned an unsupported venue fee. Request a fresh quote.");let A=he(r.partnerFee);if(r.destAmountAfterFee===void 0&&A!==0)throw new o("Velora price route is missing destAmountAfterFee.");let I=$(r.destAmount),oe=BigInt($(r.destAmountAfterFee??I)),qe=BigInt(I)*BigInt(1e4-A)/10000n,Be=(BigInt(I)*BigInt(1e4-A)+9999n)/10000n;if(oe<qe||oe>Be)throw new o("Velora output after fees does not match its disclosed venue fee.");let x=(BigInt(I)-BigInt(I)*BigInt(A)/10000n-1n).toString();if(BigInt(x)<=0n)throw new o("Velora returned no positive swap output.");let O=Y(x,n.slippageBps);if(O==="0")throw new o("Velora minimum output must be positive.");let Q=ge(O,A).toString();if(BigInt(Q)>BigInt(I))throw new o("Velora output is too small to cover router dust.");let L=(BigInt(I)-BigInt(x)).toString(),ne=Ae({provider:"velora",venueFee:L,venueFeeBps:A,oakFee:"0"}),re=O,f={quoteId:`velora:${De()}`,router:U,expiresAt:String(Math.min(Number(b),C.expiresAt)),amountOut:x,minAmountOut:re,calldataMinAmountOut:Q,provider:"velora",from:l.address,to:c.address,amountIn:n.amountIn,wallet:k,chainId:d,slippageBps:n.slippageBps,spender:q,value:h(l.address,V)?n.amountIn:"0",grossAmountOut:I,destAmountAfterFee:x,venueFee:L,venueFeeBps:A,oakFee:"0",feeDisclosure:ne,input:{token:l,amount:n.amountIn},output:{token:c,amount:x},minimumOutput:{token:c,amount:re},fee:{token:c,amount:L}},M={quote:f,wallet:k,spender:q,prepare:async()=>{if(y(f),M.tx)return structuredClone(f);let T=await me(e.http,Qe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({srcToken:N(l.address),destToken:N(c.address),srcAmount:n.amountIn,destAmount:Q,priceRoute:r,userAddress:k,receiver:k,srcDecimals:l.decimals,destDecimals:c.decimals})},P);if(S(T.from,k,"transaction sender"),T.chainId!==d)throw new o("Velora built a transaction for a different chain.");if(typeof T.data!="string"||!/^0x(?:[a-fA-F0-9]{2})+$/.test(T.data))throw new o("Velora returned invalid swap calldata.");let ae=T.data,$e=$(T.value);if(ve(ae).toString()!==Q)throw new o("Velora calldata minimum does not match the net output and slippage.");let j=e.unsignedTx({to:B(T.to),data:ae,value:$e,chainId:d,description:`Swap ${n.amountIn} base units of ${l.address} for at least ${O} base units of ${c.address} via velora (${U}). ${ne}`});return Pe(j,f),f.data=j.data,y(f),M.tx=j,structuredClone(f)}};for(y(f),Ve();s.size>=we;)s.delete(s.keys().next().value);if(s.set(f.quoteId,M),i)return structuredClone(f);let se=await M.prepare();return{...se,...Ie(se)}})}async function Z(t,a){return p(async()=>{let i=s.get(t);if(!i)throw new o("Quote is unknown or expired. Request a fresh Velora quote.");return S(a,i.wallet,"wallet"),i.prepare()})}async function ee(t,a){return p(async()=>{let i=s.get(t);if(!i)throw new o("Quote is unknown or expired. Request a fresh Velora quote.");S(a,i.wallet,"wallet"),y(i.quote);let n=await g(),m=await D(i.quote.input.token.address,a,i.spender,n);return y(i.quote),m.toString()})}async function te(t,a,i={}){return p(async()=>{if(typeof t!="string"||!t.trim())throw new o("Provide a Velora quoteId.");let n=B(a),m=s.get(t);if(!m)throw new o("Quote is unknown or expired. Request a fresh Velora quote.");let{quote:u,spender:k}=m;y(u),S(n,m.wallet,"wallet"),await Z(t,n);let b=[],F=ie(i.allowance??await ee(t,n));!h(u.input.token.address,V)&&F<BigInt(u.input.amount)&&b.push(e.approval(u.input.token.address,k,u.input.amount,d));let l={...m.tx};Pe(l,u),b.push(l),y(u);let c=await e.preview(b,n);y(u);let E=0n,C=c.changes.map(({token:w,amount:r})=>{if(w={...w,address:W(w.address)},!/^-?\d+$/.test(r))throw new o("Preview returned an invalid token amount.");h(w.address,u.output.token.address)&&(E+=BigInt(r));let q=r.startsWith("-"),A=e.formatAmount(q?r.slice(1):r,w.decimals);return`${q?"-":"+"}${A} ${w.symbol} (${w.address}, chain ${w.chainId}, ${w.decimals} decimals)`});if(E<BigInt(u.minimumOutput.amount))throw new o("Preview retained output is below the accepted minimum.");return{txs:b,preview:c,summary:`Unsigned Velora swap. Minimum output: ${u.minimumOutput.amount} base units of ${u.output.token.address} (${u.output.token.decimals} decimals, chain ${d}). ${u.feeDisclosure} Fee token: ${u.fee.token.address} (${u.fee.token.decimals} decimals). ${c.summary} ${C.join("; ")}`}})}return{name:"velora",swapProvider:{name:"velora",quote:_,build:te,prepareQuote:Z,readAllowance:ee,quotePrices:(t,a)=>_(t,a,!0)},tools:[{name:"velora_quote",inputSchema:_e,execute:(t,a)=>p(()=>_(xe(t),a))},{name:"velora_swap",inputSchema:{type:"object",additionalProperties:!1,required:["quoteId"],properties:{quoteId:{type:"string",minLength:1}}},execute:(t,a)=>p(()=>te(Ne(t),a))},...Te(e),...ke(e)]}}var at=e=>({tools:Le(e).tools});export{Le as createModule,at as createModulePart};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PublicClient } from 'viem';
|
|
2
|
+
import type { Address, Hex } from './types.js';
|
|
3
|
+
export interface OwnerSignatureOptions {
|
|
4
|
+
digest: Hex;
|
|
5
|
+
signature: Hex;
|
|
6
|
+
owner: Address;
|
|
7
|
+
client: Pick<PublicClient, 'request'>;
|
|
8
|
+
blockNumber: bigint;
|
|
9
|
+
caller?: Address;
|
|
10
|
+
policy?: 'strict' | 'identity-link-legacy';
|
|
11
|
+
}
|
|
12
|
+
export declare function verifyOwnerSignature(options: OwnerSignatureOptions): Promise<boolean>;
|
|
13
|
+
export interface OwnerSignatureEvidence {
|
|
14
|
+
blockNumber: bigint;
|
|
15
|
+
blockHash: Hex;
|
|
16
|
+
codehash: Hex;
|
|
17
|
+
caller: Address;
|
|
18
|
+
digest: Hex;
|
|
19
|
+
}
|
|
20
|
+
export interface PreparedOwnerSignature {
|
|
21
|
+
readonly evidence: Readonly<OwnerSignatureEvidence>;
|
|
22
|
+
submit<T>(send: (evidence: Readonly<OwnerSignatureEvidence>) => Promise<T>): Promise<T>;
|
|
23
|
+
}
|
|
24
|
+
type StrictOptions = Omit<OwnerSignatureOptions, 'blockNumber' | 'policy' | 'caller'> & {
|
|
25
|
+
caller: Address;
|
|
26
|
+
readIdentity?: (blockNumber: bigint) => Promise<string>;
|
|
27
|
+
};
|
|
28
|
+
export declare function prepareOwnerSignature(input: StrictOptions): Promise<PreparedOwnerSignature>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunks/TRCP7X5P.js";export{b as prepareOwnerSignature,a as verifyOwnerSignature};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"../chunks/
|
|
1
|
+
import{a as P}from"../chunks/6IM6A5VA.js";import{a as f}from"../chunks/RETS2ZEK.js";import{a as p}from"../chunks/XPFVT2EA.js";import{a as m,d as u}from"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";import{getAddress as h}from"viem";function y(i){let t=Array.isArray(i)?i.map((o,e)=>[void 0,o,e]):Object.entries(i).map(([o,e],s)=>[o,e,s]),n=[];for(let[o,e,s]of t){if(typeof e=="function"){let a=o||e.name||`module_${s}`;n.push({name:a,read:e});continue}if(e&&typeof e=="object"){let a=o||e.name||("module"in e?e.module:void 0)||`module_${s}`;typeof e.positions=="function"?n.push({name:a,read:e.positions.bind(e)}):"read"in e&&typeof e.read=="function"&&n.push({name:a,read:e.read.bind(e)})}}return n}function w(i,t){if(!i||typeof i!="object")throw new m(`Module ${t} returned an invalid position.`);if(typeof i.id!="string"||!i.id.trim())throw new m(`Module ${t} returned a position without an id.`);if(!Number.isSafeInteger(i.chainId)||i.chainId<=0)throw new m(`Module ${t} returned a position with an invalid chainId.`);if(!Array.isArray(i.assets))throw new m(`Module ${t} returned a position with invalid assets.`);let n=i.assets.map(o=>({token:{address:o.token.address,symbol:o.token.symbol,decimals:o.token.decimals,chainId:o.token.chainId},amount:f(o.amount).toString()}));return{module:i.module||t,id:i.id,chainId:i.chainId,assets:n,description:i.description,...i.incomplete?{incomplete:!0}:{}}}async function $(i,t=[],n={}){P(i);let o=h(i),e=n.chainId??p,s=y(t),a=await Promise.allSettled(s.map(async r=>{let d=await r.read(o);if(!Array.isArray(d))throw new m(`Module ${r.name} did not return a position list.`);return d.map(c=>w(c,r.name))})),l=[];for(let r=0;r<a.length;r++){let d=a[r],c=s[r];d.status==="fulfilled"?l.push(...d.value):l.push({module:c.name,id:"error",chainId:e,assets:[],description:`${c.name}: ${u(d.reason)}`})}return l}export{$ as getPositions};
|
|
@@ -51,4 +51,3 @@ export declare function signNote(note: PriceNote, consumer: Address, signerOrPri
|
|
|
51
51
|
export declare function recoverNoteSigner(note: PriceNote, signature: Hex, consumer: Address, chainId?: number | DecimalString | bigint, version?: string): Promise<Address>;
|
|
52
52
|
export declare function isWithinNoteGuard(oakPerEthE18: DecimalString | bigint, spotOakPerEthE18: DecimalString | bigint): boolean;
|
|
53
53
|
export declare function verifyNoteOffchain(first: VerifyNoteOptions | SignedPriceNote | PriceNote, second?: unknown, third?: unknown, fourth?: unknown): Promise<VerifyNoteResult>;
|
|
54
|
-
export declare const verifyNote: typeof verifyNoteOffchain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunks/D3OWLDVB.js";import"../chunks/RETS2ZEK.js";import"../chunks/XPFVT2EA.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{d as BURNER_NOTE_WALLET,c as NOTE_TTL,a as PRICE_NOTE_NAME,e as PRICE_NOTE_TYPEHASH,b as PRICE_NOTE_VERSION,f as eip712DomainSeparator,m as isWithinNoteGuard,j as noteDigest,g as priceNoteDomain,h as priceNoteDomainSeparator,i as priceNoteStructHash,l as recoverNoteSigner,k as signNote,n as verifyNoteOffchain};
|
package/build/dist/api/prices.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../chunks/E7ASOYQI.js";import"../chunks/D3OWLDVB.js";import"../chunks/CCEWSOBT.js";import"../chunks/RFJCG4NA.js";import"../chunks/HZUWK5B2.js";import"../chunks/WHT45EFX.js";import"../chunks/HACP2Q6D.js";import"../chunks/FLXID6I3.js";import"../chunks/NNZ4SZZ4.js";import"../chunks/EAEQOS7Y.js";import"../chunks/HQVC6X3T.js";import"../chunks/ZQI7B2Z7.js";import"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import"../chunks/HFQS5344.js";import"../chunks/G7UKNO2I.js";import"../chunks/BYXBS45D.js";import"../chunks/GZ5TW3WB.js";import"../chunks/5EHQM6DM.js";import"../chunks/AXYOJBX6.js";import"../chunks/Z25UKUJF.js";import"../chunks/6IM6A5VA.js";import"../chunks/P4UQGWCP.js";import"../chunks/MYBDO5SA.js";import"../chunks/HIMVOTIU.js";import"../chunks/OG5HRQU4.js";import"../chunks/UWOFA6GV.js";import"../chunks/73N3TOJL.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as MAX_PRICE_AGE_SECONDS,b as USD_PARITY_E18,h as assertFreshPrice,j as getPrice,f as isCanonicalEthOrWeth,d as isCanonicalNativeEth,c as isCanonicalUsdg,e as isCanonicalWeth,g as isPriceFresh,i as sqrtRatioAtTick};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DecimalString, SwapTrade } from './types.js';
|
|
2
2
|
export declare const NOHOLD_FLOOR: DecimalString;
|
|
3
|
-
export declare const HOLDER_PRICE_BASE: DecimalString;
|
|
4
|
-
export declare const ENTRY_FLOOR_USD_E18: DecimalString;
|
|
5
|
-
export declare const ENTRY_CAP_USD_E18: DecimalString;
|
|
6
|
-
export declare const CONTINUITY_BREAKPOINTS_USD_E18: readonly DecimalString[];
|
|
7
3
|
export declare const ORACLE_WINDOW_SECONDS = 1800;
|
|
4
|
+
export declare const MIN_BURNER_FLOOR_BPS = 9000n;
|
|
5
|
+
export declare const MAX_BURNER_FLOOR_BPS = 9607n;
|
|
6
|
+
export declare const BURNER_IMPACT_ALLOWANCE_BPS = 150n;
|
|
8
7
|
export type SwapTradeInput = SwapTrade | {
|
|
9
8
|
blockNumber?: DecimalString | bigint;
|
|
10
9
|
logIndex?: number;
|
|
@@ -21,21 +20,13 @@ export interface AverageWindowOptions {
|
|
|
21
20
|
}
|
|
22
21
|
export declare function entryUsdE18(marketCapUsdE18: DecimalString | bigint): DecimalString;
|
|
23
22
|
export declare function noHoldPriceBase(entryE18: DecimalString | bigint): DecimalString;
|
|
24
|
-
export declare function splitBurn(amount: DecimalString | bigint): {
|
|
25
|
-
burn: DecimalString;
|
|
26
|
-
treasury: DecimalString;
|
|
27
|
-
};
|
|
28
23
|
export declare function signupBurn(count: DecimalString | bigint): DecimalString;
|
|
29
|
-
export declare function signupTrackedCount(count: DecimalString | bigint): DecimalString;
|
|
30
24
|
export declare function oakUsdE18(ethUsdE18: DecimalString | bigint, oakPerEthE18: DecimalString | bigint): DecimalString;
|
|
31
25
|
export declare function requiredCount(entryE18: DecimalString | bigint, oakUsdE18Value: DecimalString | bigint, oakDecimals?: number | DecimalString): DecimalString;
|
|
32
26
|
export declare function marketCapUsdE18(supplyNet: DecimalString | bigint, oakUsdE18Value: DecimalString | bigint, oakDecimals?: number | DecimalString): DecimalString;
|
|
33
|
-
export declare function
|
|
27
|
+
export declare function burnerFloorBps(hookFeeBps: DecimalString | bigint, creatorTaxBps: DecimalString | bigint): DecimalString;
|
|
28
|
+
export declare function burnerMinOut(usdgIn: DecimalString | bigint, oakPerEthE18: DecimalString | bigint, ethUsdE18: DecimalString | bigint, oakDecimals: number | DecimalString, floorBps: DecimalString | bigint): DecimalString;
|
|
34
29
|
export declare function meanTickFromCumulatives(tickCumulative0: DecimalString | bigint, tickCumulative1: DecimalString | bigint, seconds?: number | DecimalString | bigint): number;
|
|
35
|
-
export declare function decodeObserveTickCumulatives(callSuccess: boolean, returnData: Hex): readonly [DecimalString, DecimalString];
|
|
36
30
|
export declare function ethUsdFromSqrtRatioX96(sqrtRatioX96: DecimalString | bigint): DecimalString;
|
|
37
31
|
export declare function spotOakPerEthFromSqrtPriceX96(sqrtPriceX96: DecimalString | bigint): DecimalString;
|
|
38
32
|
export declare function averageOakEth30m(trades: readonly SwapTradeInput[], options?: AverageWindowOptions): DecimalString;
|
|
39
|
-
export declare function averageWindowOakEth30m(trades: readonly SwapTradeInput[], windowEnd: DecimalString | number | bigint, windowSeconds?: number | DecimalString | bigint): Average;
|
|
40
|
-
export declare function checkMaxCount(count: DecimalString | bigint, maxCount: DecimalString | bigint): boolean;
|
|
41
|
-
export declare function checkMaxPrice(price: DecimalString | bigint, maxPrice: DecimalString | bigint): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunks/CCEWSOBT.js";import"../chunks/RETS2ZEK.js";import"../chunks/XPFVT2EA.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{e as BURNER_IMPACT_ALLOWANCE_BPS,d as MAX_BURNER_FLOOR_BPS,c as MIN_BURNER_FLOOR_BPS,a as NOHOLD_FLOOR,b as ORACLE_WINDOW_SECONDS,q as averageOakEth30m,l as burnerFloorBps,m as burnerMinOut,f as entryUsdE18,o as ethUsdFromSqrtRatioX96,k as marketCapUsdE18,n as meanTickFromCumulatives,g as noHoldPriceBase,i as oakUsdE18,j as requiredCount,h as signupBurn,p as spotOakPerEthFromSqrtPriceX96};
|
package/build/dist/api/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunks/
|
|
1
|
+
import{a}from"../chunks/3Z3U4YPA.js";import"../chunks/MYBDO5SA.js";import"../chunks/HIMVOTIU.js";import"../chunks/5HCXZWUH.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as sharedRoute};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Transport } from 'viem';
|
|
2
|
+
import { OakError } from './errors.js';
|
|
3
|
+
export declare class RpcFailure extends OakError {
|
|
4
|
+
}
|
|
5
|
+
export interface RpcRetryOptions {
|
|
6
|
+
retries?: number;
|
|
7
|
+
retryDelayMs?: number;
|
|
8
|
+
maxRetryDelayMs?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function rpcFailure(error: unknown): RpcFailure | undefined;
|
|
11
|
+
export declare function retryRpc<T>(operation: () => Promise<T>, method: string, options?: RpcRetryOptions, signal?: AbortSignal): Promise<T>;
|
|
12
|
+
export declare function rpcFallbackUrls(value: string | undefined): string[];
|
|
13
|
+
export declare function withInteractiveRpc<T>(urls: readonly string[], run: () => Promise<T>): Promise<T>;
|
|
14
|
+
export declare function withBackgroundRpc<T>(url: string, run: () => Promise<T>, sleep?: (ms: number) => Promise<void>): Promise<T>;
|
|
15
|
+
export interface RpcTransportOptions extends RpcRetryOptions {
|
|
16
|
+
url: string;
|
|
17
|
+
chainId: number;
|
|
18
|
+
fallbackUrls?: readonly string[];
|
|
19
|
+
fetch?: typeof fetch;
|
|
20
|
+
timeoutMs?: number;
|
|
21
|
+
userAgent?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createRpcTransport(options: RpcTransportOptions): Transport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunks/IWALIX7Q.js";import"../chunks/XPFVT2EA.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as RpcFailure,g as createRpcTransport,c as retryRpc,b as rpcFailure,d as rpcFallbackUrls,f as withBackgroundRpc,e as withInteractiveRpc};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import{a}from"../chunks/MRWCFTMS.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";export{a as rejectWalletSecrets};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type PublicClient } from 'viem';
|
|
2
|
+
import type { Address, Token, ToolArgs, UnsignedTx } from './types.js';
|
|
3
|
+
export type SendClient = Pick<PublicClient, 'getChainId' | 'getBalance' | 'getCode' | 'readContract'>;
|
|
4
|
+
export interface SendTerms {
|
|
5
|
+
token: Token;
|
|
6
|
+
amount: string;
|
|
7
|
+
to: Address;
|
|
8
|
+
contractRecipient: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const SEND_TOOL: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object";
|
|
15
|
+
additionalProperties: boolean;
|
|
16
|
+
required: string[];
|
|
17
|
+
properties: {
|
|
18
|
+
token: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
amount: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
to: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
confirmContract: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare function sendToken(value: unknown, chainId?: number, oakTokenAddress?: Address): Token;
|
|
38
|
+
export declare function sendTerms(args: ToolArgs, wallet: Address, chainId?: number, oakTokenAddress?: Address): SendTerms;
|
|
39
|
+
export declare function sendDescription(terms: SendTerms): string;
|
|
40
|
+
export declare function sendTransaction(terms: SendTerms): UnsignedTx;
|
|
41
|
+
export declare function prepareSend(args: ToolArgs, wallet: Address, client: SendClient, chainId?: number, oakTokenAddress?: Address): Promise<{
|
|
42
|
+
terms: SendTerms;
|
|
43
|
+
args: ToolArgs;
|
|
44
|
+
txs: UnsignedTx[];
|
|
45
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import{b as h}from"../chunks/6IM6A5VA.js";import"../chunks/OG5HRQU4.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import{i as u,s as l}from"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";import{encodeFunctionData as T,erc20Abi as f,formatUnits as y,getAddress as c,isAddress as g,zeroAddress as C}from"viem";var O={name:"send",description:"Send ETH or a pinned token from the local wallet. Requires human confirmation, verified identity and subscription. Full recipient and fee shown before signing. ETH all is refused.",inputSchema:{type:"object",additionalProperties:!1,required:["token","amount","to"],properties:{token:{type:"string",description:"ETH, USDG, WETH, USDe, configured OAK, or their pinned token address."},amount:{type:"string",description:"Positive decimal base-unit integer; all is allowed only for ERC-20 tokens."},to:{type:"string",description:"Full EIP-55 checksummed recipient address."},confirmContract:{type:"boolean",description:"Set true only when the user explicitly intends a contract recipient; the human must still approve the full transfer."}}}};function E(e,t=4663,s){let r=t===4663?l.mainnet:t===46630?l.testnet:void 0;if(!r)throw new Error("Send requires an Oak network.");let o=[{address:c(m),symbol:"ETH",decimals:18,chainId:t},{address:c(r.usdg),symbol:"USDG",decimals:6,chainId:t},{address:c(r.weth),symbol:"WETH",decimals:18,chainId:t},...t===4663?[{address:c(u[4663].meridian.CollateralToken_USDe.address),symbol:"USDe",decimals:18,chainId:t}]:[]];if(s&&o.some(d=>d.address.toLowerCase()===s.toLowerCase()))throw new Error("The configured OAK token address is the address of another pinned token. Fix OAK_TOKEN_ADDRESS in your own terminal; nothing was sent.");let n=[...o,...s?[{address:c(s),symbol:"OAK",decimals:18,chainId:t}]:[]],i=typeof e=="string"&&n.find(d=>d.address.toLowerCase()===e.toLowerCase()||d.symbol.toUpperCase()===e.replace(/^\$/,"").toUpperCase());if(!i)throw new Error("Send supports only ETH and pinned USDG, WETH, USDe or configured OAK tokens. Unknown tokens are refused.");return i}function b(e,t,s=4663,r){if(Object.keys(e).some(i=>!["token","amount","to","confirmContract"].includes(i))||e.confirmContract!==void 0&&typeof e.confirmContract!="boolean")throw new Error("Provide only token, amount, to and optional confirmContract.");if(typeof e.to!="string"||!g(e.to,{strict:!1})||c(e.to)!==e.to)throw new Error("Provide the full EIP-55 checksummed recipient address.");let o=c(e.to);if(o===C)throw new Error("Cannot send to the zero address.");if(o.toLowerCase()===t.toLowerCase())throw new Error("Cannot send to this wallet itself.");let n=E(e.token,s,r);if(e.amount==="all"&&n.symbol==="ETH")throw new Error("ETH all is refused. Specify base units and leave ETH for network fees.");if(typeof e.amount!="string"||e.amount.length>78||!/^[0-9]+$/.test(e.amount)||BigInt(e.amount)<=0n||BigInt(e.amount)>=2n**256n)throw new Error("Provide a positive decimal base-unit amount string.");return{token:n,amount:BigInt(e.amount).toString(),to:o,contractRecipient:e.confirmContract===!0}}function k(e){return`Send ${y(BigInt(e.amount),e.token.decimals)} ${e.token.symbol} to ${e.to}. Token: ${e.token.address} (${e.token.symbol}, decimals ${e.token.decimals}); amount: ${e.amount} base units; chain ${e.token.chainId}.${e.contractRecipient?" Contract recipient intended: approve this transfer to the full address shown.":""}`}function S(e){let t=e.token.symbol==="ETH";return h({to:t?e.to:e.token.address,data:t?"0x":T({abi:f,functionName:"transfer",args:[e.to,BigInt(e.amount)]}),value:t?e.amount:"0",chainId:e.token.chainId,description:k(e)})}function x(e,t,s){let r=[],o=n=>{typeof n=="string"&&g(n,{strict:!1})?r.push(n.toLowerCase()):n&&typeof n=="object"&&Object.values(n).forEach(o)};return o(t===4663?u[4663]:u[46630]),o(t===4663?l.mainnet:l.testnet),s&&r.push(s.toLowerCase()),r.push(m.toLowerCase()),r.includes(e.toLowerCase())||BigInt(e)<=0x100n}async function R(e,t,s,r=4663,o){let n=structuredClone(e),i=E(n.token,r,o);if(n.amount==="all"&&i.symbol==="ETH")throw new Error("ETH all is refused. Specify base units and leave ETH for network fees.");if(b({...n,amount:n.amount==="all"?"1":n.amount},t,r,o),await s.getChainId()!==r)throw new Error("RPC chain does not match the send network.");if(o&&i.address.toLowerCase()===o.toLowerCase()){let w=await s.readContract({address:i.address,abi:f,functionName:"decimals",blockTag:"pending"});if(w!==i.decimals)throw new Error(`The configured OAK token reports ${String(w)} decimals, not ${i.decimals}. Refusing to show an amount at the wrong scale; nothing was sent.`)}let d=i.symbol==="ETH"?await s.getBalance({address:t,blockTag:"pending"}):await s.readContract({address:i.address,abi:f,functionName:"balanceOf",args:[t],blockTag:"pending"});n.amount==="all"&&(n.amount=d.toString());let a=b(n,t,r,o);if(BigInt(a.amount)>d)throw new Error(`Send amount exceeds the ${i.symbol} balance.`);let p=await s.getCode({address:a.to,blockTag:"pending"})??"0x";if(!/^0x(?:[0-9a-fA-F]{2})*$/.test(p))throw new Error("Recipient code is unavailable; retry with a code-capable RPC.");if((p!=="0x"||x(a.to,r,o))&&!a.contractRecipient)throw new Error(`Recipient ${a.to} is a contract or known protocol address. Ask the user to confirm this is intended, then set confirmContract true.`);return{terms:a,args:{...n,token:i.address,amount:a.amount},txs:[S(a)]}}export{O as SEND_TOOL,R as prepareSend,k as sendDescription,b as sendTerms,E as sendToken,S as sendTransaction};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SignatureSpec } from './signing.js';
|
|
2
|
+
import type { TypedDataRequest } from './types.js';
|
|
3
|
+
export declare const MERIDIAN_MINT_APPROVAL: SignatureSpec;
|
|
4
|
+
export declare const MERIDIAN_TRADE_APPROVAL: SignatureSpec;
|
|
5
|
+
export declare const PRIORS_CONSENT: SignatureSpec;
|
|
6
|
+
export declare const PRIORS_SEAT_PROOF: SignatureSpec;
|
|
7
|
+
export declare const ERC8004_WALLET_SET: SignatureSpec;
|
|
8
|
+
export declare const ERC8004_WALLET_SET_TESTNET: SignatureSpec;
|
|
9
|
+
export declare const HOOKR_RELAYED_INTENT: SignatureSpec;
|
|
10
|
+
export declare const MERIDIAN_PERPS_SPECS: readonly SignatureSpec[];
|
|
11
|
+
export declare const LONGBOW_RELAYED_OFFER: SignatureSpec;
|
|
12
|
+
export declare const SIGNATURE_SPECS: readonly SignatureSpec[];
|
|
13
|
+
export declare const MODULE_PINS: readonly string[];
|
|
14
|
+
export declare function specsForTool(name: string): readonly SignatureSpec[];
|
|
15
|
+
export declare function submitsFromAddon(name: string, specs?: readonly SignatureSpec[]): boolean;
|
|
16
|
+
export declare function relayedSignaturePaths(name: string): readonly string[];
|
|
17
|
+
export declare function specForTypedData(name: string, request: TypedDataRequest): SignatureSpec;
|
|
18
|
+
export declare function specForStruct(request: TypedDataRequest): SignatureSpec | undefined;
|
|
19
|
+
export declare function specForMessage(name: string): SignatureSpec;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as u,g as P,i as D,j as m}from"../chunks/67TJOOBI.js";import"../chunks/BQLLTY4L.js";import"../chunks/H6ED3RHF.js";import"../chunks/74BPMUAG.js";import"../chunks/SQH7A4O3.js";import{b as O}from"../chunks/WQZLYX64.js";import"../chunks/OJMYESQU.js";import"../chunks/NHCRJC5X.js";import"../chunks/OW7GOYKA.js";import"../chunks/HNMOB76J.js";import{f as A,g as _,o as R}from"../chunks/TCS3ICNE.js";import{a as T,b as E}from"../chunks/RNEMTLQG.js";import{e as I}from"../chunks/LBEMCOND.js";import{e as f}from"../chunks/C3TJLARP.js";import{a as h}from"../chunks/O47JXRXN.js";import{e as w}from"../chunks/CAYBSVA6.js";import"../chunks/E7ASOYQI.js";import"../chunks/D3OWLDVB.js";import"../chunks/CCEWSOBT.js";import"../chunks/RFJCG4NA.js";import"../chunks/HZUWK5B2.js";import"../chunks/WHT45EFX.js";import"../chunks/HACP2Q6D.js";import"../chunks/FLXID6I3.js";import"../chunks/NNZ4SZZ4.js";import"../chunks/EAEQOS7Y.js";import"../chunks/HQVC6X3T.js";import"../chunks/ZQI7B2Z7.js";import"../chunks/XCFA73P2.js";import"../chunks/LIUXNOLP.js";import"../chunks/HFQS5344.js";import"../chunks/G7UKNO2I.js";import"../chunks/BYXBS45D.js";import"../chunks/GZ5TW3WB.js";import"../chunks/5EHQM6DM.js";import"../chunks/AXYOJBX6.js";import"../chunks/Z25UKUJF.js";import"../chunks/6IM6A5VA.js";import"../chunks/P4UQGWCP.js";import"../chunks/MYBDO5SA.js";import"../chunks/HIMVOTIU.js";import"../chunks/OG5HRQU4.js";import"../chunks/UWOFA6GV.js";import"../chunks/73N3TOJL.js";import"../chunks/RETS2ZEK.js";import"../chunks/5HCXZWUH.js";import"../chunks/IWALIX7Q.js";import{a as s,i as y,s as c}from"../chunks/XPFVT2EA.js";import"../chunks/EG6M6SSO.js";import"../chunks/5YS5V2LK.js";import"../chunks/JXOEJPJ4.js";import{zeroAddress as G}from"viem";var e=(r,n)=>({...n,meaning:r}),v=y[s].meridian,Y=v.CollateralToken_USDe.address,N={by:"server-continuation",reason:"Meridian Predict settles RFQ approvals over a WebSocket auction session that the Oak server holds."},q={none:"Single-use auction approval: it cannot be cancelled and lapses at its deadline.",staysExecutableUntilExpiry:!0},Q={id:"meridian.rfq.mint-approval",program:"Meridian",purpose:"prediction buy approval",tools:["meridian_buy"],class:"order",encoding:"eip712",domain:{name:"PredictionMarketEscrow",version:"1",chainId:s,verifyingContract:v.PredictionMarketEscrow.address},primaryType:"MintApproval",types:{MintApproval:T},fields:{predictionHash:e("Hash of your picks, stake, the counterparty and its collateral, rebuilt locally from your request and the winning bid",{role:"derived",rebuild:"meridian.rfq.prediction-hash",yields:["counterparty"]}),signer:e("This wallet, the approving trader",{role:"signer"}),collateral:e("Your stake: the most USDe the escrow can take",{role:"amount",side:"out",token:Y,arg:"stake"}),nonce:e("Escrow nonce chosen by the auction",{role:"nonce",kind:"server-observed"}),deadline:e("Approval deadline (Unix seconds)",{role:"expiry"})},maxLifetimeSeconds:3600,revoke:q,submit:N,requireHuman:!0},V={id:"meridian.rfq.trade-approval",program:"Meridian",purpose:"prediction sale approval",tools:["meridian_sell"],class:"order",encoding:"eip712",domain:{name:"SecondaryMarketEscrow",version:"1",chainId:s,verifyingContract:v.SecondaryMarketEscrow.address},primaryType:"TradeApproval",types:{TradeApproval:E},fields:{tradeHash:e("Hash of the position token and amount you sell, the buyer and the USDe price, rebuilt locally",{role:"derived",rebuild:"meridian.rfq.trade-hash",yields:["token-out","amount-out","token-in","amount-in","counterparty"]}),signer:e("This wallet, the seller",{role:"signer"}),nonce:e("Escrow nonce chosen by the auction",{role:"nonce",kind:"server-observed"}),deadline:e("Approval deadline (Unix seconds)",{role:"expiry"})},maxLifetimeSeconds:3600,revoke:q,submit:N,requireHuman:!0},S=R({agentId:"1",owner:G,nonce:"0",deadline:"0"}),z={id:"priors.consent",program:"Priors",purpose:"pool consent",tools:["priors_starter_line",...O],class:"consent",encoding:"eip712",domain:{...S.domain},primaryType:S.primaryType,types:S.types,fields:{agentId:e("Your agent ID the consent is for",{role:"observed",check:"equals the agentId argument"}),sponsorId:e("Sponsor root that may use this consent",{role:"observed",check:"treasury v4 root, or the feature root or sponsorId argument"}),owner:e("This wallet, the agent owner",{role:"account"}),maxPremiumBps:e("Largest premium the sponsor may charge, in basis points",{role:"observed",check:"equals the maxPremiumBps argument (starter line: 0)"}),nonce:e("Priors pool nonce for this agent",{role:"nonce",kind:"program-counter"}),deadline:e("Consent deadline (Unix seconds)",{role:"expiry"})},maxLifetimeSeconds:_+300,submit:{by:"transaction"},requireHuman:!0},j={id:"priors.seat-proof",program:"Priors",purpose:"agent ownership proof",tools:["priors_starter_line"],class:"auth",encoding:"eip191-template",primaryType:"priors.seat-request",types:{},fields:{agentId:e("Your agent ID",{role:"observed",check:"equals the agentId argument"}),n:e("Invite bot nonce",{role:"nonce",kind:"server-observed"}),exp:e("Proof expiry (Unix seconds)",{role:"expiry"})},maxLifetimeSeconds:A+300,submit:{by:"server-continuation",reason:"The Priors invite bot receives the ownership proof through the Oak server session."},requireHuman:!1},$={AgentWalletSet:[{name:"agentId",type:"uint256"},{name:"newWallet",type:"address"},{name:"owner",type:"address"},{name:"deadline",type:"uint256"}]},J={agentId:e("Agent whose payment wallet becomes this wallet",{role:"observed",check:"equals the agentId argument and the continuation"}),newWallet:e("This wallet, the new payment wallet",{role:"signer"}),owner:e("Current agent owner named by the registry",{role:"observed",check:"the registry checks it on chain"}),deadline:e("Proof deadline (Unix seconds)",{role:"expiry"})},F=r=>({id:r==="mainnet"?"erc8004.agent-wallet-set":"erc8004.agent-wallet-set.testnet",program:"ERC-8004",purpose:"payment-wallet proof",tools:["erc8004_set_wallet"],class:"auth",encoding:"eip712",...r==="testnet"?{network:r}:{},domain:{name:"ERC8004IdentityRegistry",version:"1",chainId:c[r].chainId,verifyingContract:c[r].identityRegistry},primaryType:"AgentWalletSet",types:$,fields:J,maxLifetimeSeconds:420,submit:{by:"server-continuation",reason:"The proof is an argument of the setAgentWallet transaction the Oak server builds next."},requireHuman:!1}),X=F("mainnet"),Z=F("testnet"),ee={id:"hookr.relay.swap-intent",program:"Hookr",purpose:"relayed trader swap intent",tools:["hookr_relay"],class:"relayed",encoding:"eip712",domain:{name:"Permit2",chainId:s,verifyingContract:y[s].ponsTrade.permit2.address},primaryType:"HookrSwapIntent",types:{},fields:{owner:e("The trader who signed; never this wallet",{role:"counterparty"}),intent:e("The trader-signed swap terms; every calldata byte is rebuilt from them",{role:"derived",rebuild:"hookr.relay.calldata"}),signature:e("The trader Permit2 witness signature; the forwarder verifies it in a simulation from this relayer",{role:"observed",check:"forwarder execute simulation at a pinned block"})},maxLifetimeSeconds:2592e3,contractHash:{fn:"hashIntent"},nonceRead:"isNonceUsed",submit:{by:"transaction"},relayedPaths:["signature"],requireHuman:!1},re=w,ne="Meridian perps activation requires protocol-verified signing and submission vectors. TradeOrder has unsigned expiry and execution flags; delegate authority is unbounded. These candidates remain disabled.",te={by:"server-continuation",reason:"Today the Oak server holds the perps_sign round and posts to the Meridian API; local submission is adopted with the pending patch."},M={subaccount:"primary",subaccountId:"00000000-0000-4000-8000-000000000000"},ie="0x0000000000000000000000000000000000000001";function o(r,n,t,i,H,U,W={}){let g=I(i,{...M,...H},ie,"1",1);return{id:r,program:"Meridian",purpose:n,tools:[`meridian_perps_${i}`],class:t,encoding:"eip712",domain:{...f},primaryType:g.primaryType,types:{[g.primaryType]:Object.entries(g.fields).map(([B,K])=>({name:B,type:K}))},fields:U,maxLifetimeSeconds:3600,submit:te,requireHuman:t!=="auth"&&t!=="cancel",enabled:!1,disabledReason:ne,...W}}var a=e("This wallet, the account owner",{role:"signer"}),l=e("Subaccount name (bytes32) from your request",{role:"derived",rebuild:"meridian.perps.subaccount"}),d=e("Nanosecond nonce from the add-on clock; Meridian accepts it within 25 minutes",{role:"nonce",kind:"local-time"}),p=e("Signing time; Meridian accepts the signature for at most one hour after it",{role:"derived",rebuild:"meridian.perps.signed-at",yields:["expiry"]}),L={revoke:{none:"One-shot request: it cannot be cancelled and lapses within one hour.",staysExecutableUntilExpiry:!0}},oe=[o("meridian.perps.trade-order","perps order","order","order",{type:"LIMIT",quantity:"1",price:"1",side:0,onchainId:1,timeInForce:"GTD"},{sender:a,subaccount:l,quantity:e("Order size in D9 contract units: the most this order can trade",{role:"amount",side:"out",token:"productId",arg:"quantity"}),price:e("Limit price (D9) from your request; 0 for market orders",{role:"derived",rebuild:"meridian.perps.intent"}),reduceOnly:e("Only reduces an open position",{role:"derived",rebuild:"meridian.perps.intent"}),side:e("0 buy, 1 sell",{role:"derived",rebuild:"meridian.perps.intent"}),engineType:e("Order engine",{role:"pinned",value:0}),productId:e("Meridian product traded",{role:"token",side:"out",arg:"onchainId"}),nonce:d,signedAt:e("Signing time (the resting-order expiry is the API option expiresAt)",{role:"observed",check:"within the Meridian acceptance window"})},{maxLifetimeSeconds:2592e3,expiry:{enforcedBy:"api",path:"data.expiresAt"},revoke:{offchainSpec:"meridian.perps.cancel-order",staysExecutableUntilExpiry:!0}}),o("meridian.perps.cancel-order","perps order cancel","cancel","cancel",{all:!0},{sender:a,subaccount:l,nonce:d},{expiryBinding:"cancel-only"}),o("meridian.perps.initiate-withdraw","perps withdrawal","order","withdraw",{token:"0x0000000000000000000000000000000000000002",tokenId:M.subaccountId,amount:"1"},{account:a,subaccount:l,token:e("Token withdrawn",{role:"token",side:"out",arg:"token"}),amount:e("Amount withdrawn (D9)",{role:"amount",side:"out",token:"token",arg:"amount"}),nonce:d,signedAt:p,destinationAddress:e("This wallet, padded to 32 bytes",{role:"recipient"}),destinationEndpointId:e("Same-chain withdrawal",{role:"pinned",value:0})},L),o("meridian.perps.convert-token","perps conversion","order","convert",{fromToken:"0x0000000000000000000000000000000000000002",toToken:"0x0000000000000000000000000000000000000003",amount:"1"},{sender:a,subaccount:l,fromToken:e("Quote token converted from",{role:"token",side:"out",arg:"fromToken"}),toToken:e("Quote token converted to",{role:"token",side:"in",arg:"toToken"}),amount:e("Amount converted (D9)",{role:"amount",side:"out",token:"fromToken",arg:"amount"}),nonce:d,signedAt:p},L),o("meridian.perps.revoke-linked-signer","linked-signer revocation","cancel","signer",{mode:"revoke",signer:"0x0000000000000000000000000000000000000003"},{sender:a,signer:e("Linked signer revoked",{role:"delegate"}),subaccount:l,nonce:d,signedAt:p}),o("meridian.perps.refresh-linked-signer","linked-signer refresh","link","signer",{mode:"refresh",signer:"0x0000000000000000000000000000000000000003"},{sender:a,signer:e("Linked signer refreshed",{role:"delegate"}),nonce:d,signedAt:p},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),o("meridian.perps.extend-linked-signer","linked-signer extension","link","signer",{mode:"extend"},{sender:a,nonce:d,signedAt:p},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),o("meridian.perps.referral-auth","referral API authentication","auth","referral",{mode:"activate"},{sender:a,intent:e("Referral action: 0 activate, 1 claim, 2 read",{role:"derived",rebuild:"meridian.perps.intent"}),signedAt:e("Signed time; the local round accepts now minus 120 through now plus 10 seconds",{role:"derived",rebuild:"meridian.perps.auth-time",yields:["expiry"]})},{expiryBinding:"auth-window",authWindow:{field:"signedAt",maxAgeSeconds:120,maxFutureSeconds:10}})],ae={id:"longbow.nft.lender-offer",program:"Longbow",purpose:"existing NFT lender offer",tools:["longbow_nft_accept_offer"],class:"relayed",encoding:"eip191-packed-hash",primaryType:"longbow.nft.fixed-offer",types:{},fields:{chainId:e("Robinhood Chain, included in the packed offer hash",{role:"pinned",value:s}),contract:e("DirectLoanFixedOffer, included in the packed offer hash",{role:"pinned",value:h}),offer:e("Exact loan, payoff, NFT, currency and fee terms rebuilt by nftOfferDigest",{role:"derived",rebuild:"longbow.nft.offer-digest"}),"lenderSignature.signer":e("Existing lender who signed the offer",{role:"counterparty"}),"lenderSignature.expiry":e("Existing lender offer expiry",{role:"expiry"}),"lenderSignature.nonce":e("Lender nonce checked against the pinned loan contract",{role:"nonce",kind:"program-counter"}),"lenderSignature.signature":e("Existing lender signature, verified by recovery or pinned-block ERC-1271 before preview",{role:"observed",check:"nftOfferDigest and lender verification in the local loan builder"})},maxLifetimeSeconds:2592e3,submit:{by:"transaction"},relayedPaths:["lenderSignature.signature"],requireHuman:!1},k=[Q,V,z,j,X,Z,ee,ae,...oe],se=[f.verifyingContract,re,h],de=D(k,P(se));if(de.length)throw u("invalid signature registry");var b=new Map;for(let r of k)for(let n of r.tools)b.set(n,[...b.get(n)??[],r]);var C=new Map(k.map(r=>[m(r),r]));function x(r){return b.get(r)??[]}function Se(r,n=x(r)){return n.some(t=>t.tools.includes(r)&&t.submit.by==="addon")}function be(r){return x(r).flatMap(n=>n.class==="relayed"&&n.enabled!==!1?n.relayedPaths??[]:[])}function ve(r,n){let t=n?.domain?.chainId===c.testnet.chainId?"testnet":"mainnet",i=C.get(m({network:t==="testnet"?"testnet":void 0,encoding:"eip712",domain:n?.domain,primaryType:n?.primaryType}));if(!i||i.enabled===!1||!i.tools.includes(r)||i.class==="relayed")throw u("Oak has no signing contract for this request");return i}function ke(r){if(!r?.domain||typeof r.primaryType!="string")return;let n=r.domain.chainId===c.testnet.chainId?"testnet":void 0,t=C.get(m({network:n,encoding:"eip712",domain:r.domain,primaryType:r.primaryType}));return t?.class==="relayed"?void 0:t}function xe(r){let n=x(r).find(t=>t.encoding==="eip191-template"&&t.enabled!==!1);if(!n)throw u("Oak has no signing contract for this request");return n}export{X as ERC8004_WALLET_SET,Z as ERC8004_WALLET_SET_TESTNET,ee as HOOKR_RELAYED_INTENT,ae as LONGBOW_RELAYED_OFFER,Q as MERIDIAN_MINT_APPROVAL,oe as MERIDIAN_PERPS_SPECS,V as MERIDIAN_TRADE_APPROVAL,se as MODULE_PINS,z as PRIORS_CONSENT,j as PRIORS_SEAT_PROOF,k as SIGNATURE_SPECS,be as relayedSignaturePaths,xe as specForMessage,ke as specForStruct,ve as specForTypedData,x as specsForTool,Se as submitsFromAddon};
|