@oakagentkit/core 0.3.4 → 0.3.6
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 +14 -0
- package/build/dist/api/addresses.js +1 -1
- package/build/dist/api/chain.js +1 -1
- package/build/dist/api/history.d.ts +2 -0
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/identity-link.js +1 -1
- package/build/dist/api/metadata.js +1 -1
- package/build/dist/api/modules/beefy/boosts.js +1 -1
- package/build/dist/api/modules/beefy/clm.js +1 -1
- package/build/dist/api/modules/beefy/guard.js +1 -1
- package/build/dist/api/modules/beefy/index.js +1 -1
- package/build/dist/api/modules/beefy/liquidity.js +1 -1
- package/build/dist/api/modules/beefy/management.js +1 -1
- package/build/dist/api/modules/beefy/vaults.js +1 -1
- package/build/dist/api/modules/borro/actions.js +1 -1
- package/build/dist/api/modules/borro/index.js +1 -1
- package/build/dist/api/modules/borro/liquidity.js +1 -1
- package/build/dist/api/modules/borro/positions.js +1 -1
- package/build/dist/api/modules/borro/reader.js +1 -1
- package/build/dist/api/modules/chop/actions.d.ts +13 -1
- package/build/dist/api/modules/chop/actions.js +1 -1
- package/build/dist/api/modules/chop/checks.js +1 -1
- package/build/dist/api/modules/chop/copy.d.ts +1 -0
- package/build/dist/api/modules/chop/copy.js +1 -1
- package/build/dist/api/modules/chop/display.d.ts +36 -0
- package/build/dist/api/modules/chop/display.js +1 -0
- package/build/dist/api/modules/chop/guard.js +1 -1
- package/build/dist/api/modules/chop/index.js +1 -1
- package/build/dist/api/modules/chop/pins.d.ts +1 -0
- package/build/dist/api/modules/chop/pins.js +1 -1
- package/build/dist/api/modules/chop/positions.js +1 -1
- package/build/dist/api/modules/chop/reader.d.ts +6 -1
- package/build/dist/api/modules/chop/reader.js +1 -1
- package/build/dist/api/modules/chop/types.d.ts +7 -0
- package/build/dist/api/modules/chop/unfarm.d.ts +16 -0
- package/build/dist/api/modules/chop/unfarm.js +1 -0
- package/build/dist/api/modules/clanker/extensions.js +1 -1
- package/build/dist/api/modules/clanker/index.js +1 -1
- package/build/dist/api/modules/clanker/manage.js +1 -1
- package/build/dist/api/modules/clanker/pool-config.js +1 -1
- package/build/dist/api/modules/clanker/protocol.js +1 -1
- package/build/dist/api/modules/clanker/state.js +1 -1
- package/build/dist/api/modules/earn/index.js +1 -1
- package/build/dist/api/modules/erc8004/common.js +1 -1
- package/build/dist/api/modules/erc8004/domain.js +1 -1
- package/build/dist/api/modules/erc8004/index.js +1 -1
- package/build/dist/api/modules/erc8004/management.js +1 -1
- package/build/dist/api/modules/erc8004/reputation.js +1 -1
- package/build/dist/api/modules/erc8004/services.js +1 -1
- package/build/dist/api/modules/erc8004/thesis.js +1 -1
- package/build/dist/api/modules/erc8004/validation.js +1 -1
- package/build/dist/api/modules/factor/actions.js +1 -1
- package/build/dist/api/modules/factor/api.js +1 -1
- package/build/dist/api/modules/factor/checks.js +1 -1
- package/build/dist/api/modules/factor/copy.d.ts +11 -11
- package/build/dist/api/modules/factor/copy.js +1 -1
- package/build/dist/api/modules/factor/guard.js +1 -1
- package/build/dist/api/modules/factor/index.js +1 -1
- package/build/dist/api/modules/factor/reader.js +1 -1
- package/build/dist/api/modules/fobo/client.js +1 -1
- package/build/dist/api/modules/fobo/index.js +1 -1
- package/build/dist/api/modules/fobo/intent.js +1 -1
- package/build/dist/api/modules/fobo/steps.js +1 -1
- package/build/dist/api/modules/fobo/verify.js +1 -1
- package/build/dist/api/modules/gloam/index.js +1 -1
- package/build/dist/api/modules/grove/index.js +1 -1
- package/build/dist/api/modules/heyresearch/builder-feed.js +1 -1
- package/build/dist/api/modules/heyresearch/index.js +1 -1
- package/build/dist/api/modules/heyresearch/public-reads.js +1 -1
- package/build/dist/api/modules/heyresearch/scan.js +1 -1
- package/build/dist/api/modules/heyresearch/token-facts.js +1 -1
- package/build/dist/api/modules/hoodag/chain-reads.js +1 -1
- package/build/dist/api/modules/hoodag/index.js +1 -1
- package/build/dist/api/modules/hoodag/management.js +1 -1
- package/build/dist/api/modules/hoodag/public-reads.js +1 -1
- package/build/dist/api/modules/hoodag/reconstruct.js +1 -1
- package/build/dist/api/modules/hoodlock/airdrop.js +1 -1
- package/build/dist/api/modules/hoodlock/buyback.js +1 -1
- package/build/dist/api/modules/hoodlock/commerce.js +1 -1
- package/build/dist/api/modules/hoodlock/fee.js +1 -1
- package/build/dist/api/modules/hoodlock/guard.js +1 -1
- package/build/dist/api/modules/hoodlock/index.js +1 -1
- package/build/dist/api/modules/hoodlock/lifecycle.js +1 -1
- package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
- package/build/dist/api/modules/hoodlock/public.js +1 -1
- package/build/dist/api/modules/hookr/actions.d.ts +39 -2
- package/build/dist/api/modules/hookr/actions.js +1 -1
- package/build/dist/api/modules/hookr/addons.js +1 -1
- package/build/dist/api/modules/hookr/agent-gate.d.ts +14 -2
- package/build/dist/api/modules/hookr/agent-gate.js +1 -1
- package/build/dist/api/modules/hookr/agent-link.d.ts +17 -0
- package/build/dist/api/modules/hookr/agent-link.js +1 -0
- package/build/dist/api/modules/hookr/api-client.d.ts +9 -0
- package/build/dist/api/modules/hookr/api-client.js +1 -0
- package/build/dist/api/modules/hookr/blocks/advisory.d.ts +41 -0
- package/build/dist/api/modules/hookr/blocks/advisory.js +1 -0
- package/build/dist/api/modules/hookr/blocks/buy-sell-block.d.ts +7 -0
- package/build/dist/api/modules/hookr/blocks/buy-sell-block.js +1 -0
- package/build/dist/api/modules/hookr/blocks/core-settings.d.ts +6 -0
- package/build/dist/api/modules/hookr/blocks/core-settings.js +1 -0
- package/build/dist/api/modules/hookr/blocks/exit-clock.d.ts +14 -0
- package/build/dist/api/modules/hookr/blocks/exit-clock.js +1 -0
- package/build/dist/api/modules/hookr/blocks/holder-pot.d.ts +30 -0
- package/build/dist/api/modules/hookr/blocks/holder-pot.js +1 -0
- package/build/dist/api/modules/hookr/blocks/managed-fee.d.ts +96 -0
- package/build/dist/api/modules/hookr/blocks/managed-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/market-guard.d.ts +116 -0
- package/build/dist/api/modules/hookr/blocks/market-guard.js +1 -0
- package/build/dist/api/modules/hookr/blocks/market-hours-fee.d.ts +87 -0
- package/build/dist/api/modules/hookr/blocks/market-hours-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/pay-later.d.ts +199 -0
- package/build/dist/api/modules/hookr/blocks/pay-later.js +1 -0
- package/build/dist/api/modules/hookr/blocks/sandwich-guard.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/sandwich-guard.js +1 -0
- package/build/dist/api/modules/hookr/blocks/storm-fee.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/storm-fee.js +1 -0
- package/build/dist/api/modules/hookr/blocks/swap-cut.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/swap-cut.js +1 -0
- package/build/dist/api/modules/hookr/blocks/swap-reward-mint.d.ts +125 -0
- package/build/dist/api/modules/hookr/blocks/swap-reward-mint.js +1 -0
- package/build/dist/api/modules/hookr/blocks/wallet-cap.d.ts +3 -0
- package/build/dist/api/modules/hookr/blocks/wallet-cap.js +1 -0
- package/build/dist/api/modules/hookr/blocks/zap-source.d.ts +161 -0
- package/build/dist/api/modules/hookr/blocks/zap-source.js +1 -0
- package/build/dist/api/modules/hookr/blocks/zap-target.d.ts +51 -0
- package/build/dist/api/modules/hookr/blocks/zap-target.js +1 -0
- package/build/dist/api/modules/hookr/claims.d.ts +53 -0
- package/build/dist/api/modules/hookr/claims.js +1 -0
- package/build/dist/api/modules/hookr/contracts.d.ts +3 -1
- package/build/dist/api/modules/hookr/contracts.js +1 -1
- package/build/dist/api/modules/hookr/create-cancel.js +1 -1
- package/build/dist/api/modules/hookr/discovery.d.ts +2 -2
- package/build/dist/api/modules/hookr/discovery.js +1 -1
- package/build/dist/api/modules/hookr/fill-bounty.d.ts +2 -0
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/gas.d.ts +48 -0
- package/build/dist/api/modules/hookr/gas.js +1 -0
- package/build/dist/api/modules/hookr/gates.d.ts +51 -0
- package/build/dist/api/modules/hookr/gates.js +1 -0
- package/build/dist/api/modules/hookr/hook-blocks.d.ts +304 -0
- package/build/dist/api/modules/hookr/hook-blocks.js +1 -0
- package/build/dist/api/modules/hookr/index.d.ts +4 -2
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/jobs.d.ts +7 -0
- package/build/dist/api/modules/hookr/jobs.js +1 -0
- package/build/dist/api/modules/hookr/launch-options.d.ts +52 -3
- package/build/dist/api/modules/hookr/launch-options.js +1 -1
- package/build/dist/api/modules/hookr/launch-profile.d.ts +8 -0
- package/build/dist/api/modules/hookr/launch-profile.js +1 -1
- package/build/dist/api/modules/hookr/launch-receipt.js +1 -1
- package/build/dist/api/modules/hookr/launch.d.ts +24 -0
- package/build/dist/api/modules/hookr/launch.js +1 -1
- package/build/dist/api/modules/hookr/liquidity.js +1 -1
- package/build/dist/api/modules/hookr/lp-positions.js +1 -1
- package/build/dist/api/modules/hookr/lp-reads.js +1 -1
- package/build/dist/api/modules/hookr/lp-receipt.js +1 -1
- package/build/dist/api/modules/hookr/lp-state.d.ts +90 -2
- package/build/dist/api/modules/hookr/lp-state.js +1 -1
- package/build/dist/api/modules/hookr/pay-later-actions.d.ts +52 -0
- package/build/dist/api/modules/hookr/pay-later-actions.js +1 -0
- package/build/dist/api/modules/hookr/pins.d.ts +5 -0
- package/build/dist/api/modules/hookr/pins.js +1 -1
- package/build/dist/api/modules/hookr/pm-liquidity.d.ts +215 -0
- package/build/dist/api/modules/hookr/pm-liquidity.js +1 -0
- package/build/dist/api/modules/hookr/public-reads.d.ts +1 -1
- package/build/dist/api/modules/hookr/public-reads.js +1 -1
- package/build/dist/api/modules/hookr/read-utils.js +1 -1
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/hookr/revenue.d.ts +4 -1
- package/build/dist/api/modules/hookr/revenue.js +1 -1
- package/build/dist/api/modules/hookr/scan.d.ts +25 -0
- package/build/dist/api/modules/hookr/scan.js +1 -0
- package/build/dist/api/modules/hookr/swap.d.ts +161 -0
- package/build/dist/api/modules/hookr/swap.js +1 -0
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/kyberswap/source-pools.js +1 -1
- package/build/dist/api/modules/layerbank/abi.js +1 -1
- package/build/dist/api/modules/layerbank/actions.js +1 -1
- package/build/dist/api/modules/layerbank/checks.js +1 -1
- package/build/dist/api/modules/layerbank/index.js +1 -1
- package/build/dist/api/modules/layerbank/merkl.js +1 -1
- package/build/dist/api/modules/layerbank/reader.js +1 -1
- package/build/dist/api/modules/layerbank/reserve.js +1 -1
- package/build/dist/api/modules/lighter/index.js +1 -1
- package/build/dist/api/modules/longbow/administration.js +1 -1
- package/build/dist/api/modules/longbow/analytics.js +1 -1
- package/build/dist/api/modules/longbow/fixed.js +1 -1
- package/build/dist/api/modules/longbow/index.js +1 -1
- package/build/dist/api/modules/longbow/nft.js +1 -1
- package/build/dist/api/modules/longbow/rebates.js +1 -1
- package/build/dist/api/modules/longbow/staking.js +1 -1
- package/build/dist/api/modules/meridian/index.js +1 -1
- package/build/dist/api/modules/meridian/markets.js +1 -1
- package/build/dist/api/modules/meridian/rfq.js +1 -1
- package/build/dist/api/modules/merkl/discovery.js +1 -1
- package/build/dist/api/modules/merkl/index.js +1 -1
- package/build/dist/api/modules/merkl/manage.js +1 -1
- package/build/dist/api/modules/merkl/protocol.js +1 -1
- package/build/dist/api/modules/morpho/allocator.js +1 -1
- package/build/dist/api/modules/morpho/bundles.js +1 -1
- package/build/dist/api/modules/morpho/in-kind.js +1 -1
- package/build/dist/api/modules/morpho/index.js +1 -1
- package/build/dist/api/modules/morpho/local-guard.js +1 -1
- package/build/dist/api/modules/morpho/midnight.js +1 -1
- package/build/dist/api/modules/morpho/protocol.js +1 -1
- package/build/dist/api/modules/morpho/vault-management.js +1 -1
- package/build/dist/api/modules/morpho/vault-tools.js +1 -1
- package/build/dist/api/modules/morpho/vault-v2.js +1 -1
- package/build/dist/api/modules/netnet/card-plan.js +1 -1
- package/build/dist/api/modules/netnet/card-read.js +1 -1
- package/build/dist/api/modules/netnet/card-recovery.js +1 -1
- package/build/dist/api/modules/netnet/desk-action.js +1 -1
- package/build/dist/api/modules/netnet/desk-read.js +1 -1
- package/build/dist/api/modules/netnet/financial.js +1 -1
- package/build/dist/api/modules/netnet/index.js +1 -1
- package/build/dist/api/modules/netnet/staking.js +1 -1
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/orbio/positions.js +1 -1
- package/build/dist/api/modules/pendle/costs.js +1 -1
- package/build/dist/api/modules/pendle/index.js +1 -1
- package/build/dist/api/modules/pendle/markets.js +1 -1
- package/build/dist/api/modules/pendle/positions.js +1 -1
- package/build/dist/api/modules/pendle/pricecheck.js +1 -1
- package/build/dist/api/modules/pendle/reader.js +1 -1
- package/build/dist/api/modules/pendle/redeem.js +1 -1
- package/build/dist/api/modules/pendle/trade.js +1 -1
- package/build/dist/api/modules/pendle/validate.js +1 -1
- package/build/dist/api/modules/pendle/verify.js +1 -1
- package/build/dist/api/modules/pons/claim.js +1 -1
- package/build/dist/api/modules/pons/index.js +1 -1
- package/build/dist/api/modules/pons/launch-status.js +1 -1
- package/build/dist/api/modules/pons/prices.js +1 -1
- package/build/dist/api/modules/pons/reads.js +1 -1
- package/build/dist/api/modules/pons/swap-terms.js +1 -1
- package/build/dist/api/modules/pons/trade.js +1 -1
- package/build/dist/api/modules/poolstrade/index.js +1 -1
- package/build/dist/api/modules/priors/coverage.js +1 -1
- package/build/dist/api/modules/priors/discovery.js +1 -1
- package/build/dist/api/modules/priors/features.js +1 -1
- package/build/dist/api/modules/priors/holdings.js +1 -1
- package/build/dist/api/modules/priors/index.js +1 -1
- package/build/dist/api/modules/priors/integration.js +1 -1
- package/build/dist/api/modules/priors/market.js +1 -1
- package/build/dist/api/modules/priors/pt.js +1 -1
- package/build/dist/api/modules/priors/savings-exit.js +1 -1
- package/build/dist/api/modules/priors/starter-line.js +1 -1
- package/build/dist/api/modules/priors/stock-swap.js +1 -1
- package/build/dist/api/modules/raeto/index.js +1 -1
- package/build/dist/api/modules/relay/bootstrap.js +1 -1
- package/build/dist/api/modules/relay/discovery.js +1 -1
- package/build/dist/api/modules/relay/inbound.js +1 -1
- package/build/dist/api/modules/relay/index.js +1 -1
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/relay/reads.js +1 -1
- package/build/dist/api/modules/spark/actions.js +1 -1
- package/build/dist/api/modules/spark/details.js +1 -1
- package/build/dist/api/modules/spark/index.js +1 -1
- package/build/dist/api/modules/spark/management.js +1 -1
- package/build/dist/api/modules/steakhouse/analytics.js +1 -1
- package/build/dist/api/modules/steakhouse/erc4626.js +1 -1
- package/build/dist/api/modules/steakhouse/index.js +1 -1
- package/build/dist/api/modules/steakhouse/local-guard.js +1 -1
- package/build/dist/api/modules/steakhouse/management.js +1 -1
- package/build/dist/api/modules/steakhouse/v2-exit.js +1 -1
- package/build/dist/api/modules/tickerspring/basket-routes.js +1 -1
- package/build/dist/api/modules/tickerspring/contract-reads.js +1 -1
- package/build/dist/api/modules/tickerspring/discovery.js +1 -1
- package/build/dist/api/modules/tickerspring/exit-preview.js +1 -1
- package/build/dist/api/modules/tickerspring/guards.js +1 -1
- package/build/dist/api/modules/tickerspring/index.js +1 -1
- package/build/dist/api/modules/tickerspring/journeys.js +1 -1
- package/build/dist/api/modules/tickerspring/ladder.js +1 -1
- package/build/dist/api/modules/tickerspring/maker.js +1 -1
- package/build/dist/api/modules/tickerspring/order-accounting.js +1 -1
- package/build/dist/api/modules/tickerspring/research.js +1 -1
- package/build/dist/api/modules/tickerspring/strategies.js +1 -1
- package/build/dist/api/modules/uniswap/auction-create.js +1 -1
- package/build/dist/api/modules/uniswap/auction.js +1 -1
- package/build/dist/api/modules/uniswap/batch.js +1 -1
- package/build/dist/api/modules/uniswap/common.js +1 -1
- package/build/dist/api/modules/uniswap/fees.js +1 -1
- package/build/dist/api/modules/uniswap/index.js +1 -1
- package/build/dist/api/modules/uniswap/local-guard.js +1 -1
- package/build/dist/api/modules/uniswap/oracle.js +1 -1
- package/build/dist/api/modules/uniswap/pool-math.js +1 -1
- package/build/dist/api/modules/uniswap/pools.js +1 -1
- package/build/dist/api/modules/uniswap/position.js +1 -1
- package/build/dist/api/modules/uniswap/protocol.js +1 -1
- package/build/dist/api/modules/uniswap/quote-guard.js +1 -1
- package/build/dist/api/modules/uniswap/stock-prices.d.ts +25 -0
- package/build/dist/api/modules/uniswap/stock-prices.js +1 -1
- package/build/dist/api/modules/uniswap/stocks.js +1 -1
- package/build/dist/api/modules/uniswap/token-jar.js +1 -1
- package/build/dist/api/modules/uniswap/trade-batch.js +1 -1
- package/build/dist/api/modules/uniswap/trade.js +1 -1
- package/build/dist/api/modules/uniswap/v2.js +1 -1
- package/build/dist/api/modules/uniswap/v3.js +1 -1
- package/build/dist/api/modules/uniswap/v4.js +1 -1
- package/build/dist/api/modules/uniswap/wrap.js +1 -1
- package/build/dist/api/modules/velora/claims.js +1 -1
- package/build/dist/api/modules/velora/delta-reads.js +1 -1
- package/build/dist/api/modules/velora/index.js +1 -1
- package/build/dist/api/modules/wormhole/index.js +1 -1
- package/build/dist/api/modules/wormhole/scan-text.d.ts +1 -1
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/pricenote.js +1 -1
- package/build/dist/api/prices.d.ts +5 -0
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/rpc.js +1 -1
- package/build/dist/api/send.js +1 -1
- package/build/dist/api/signing-registry.js +1 -1
- package/build/dist/api/signing.js +1 -1
- package/build/dist/api/simulate.js +1 -1
- package/build/dist/api/swap.d.ts +2 -0
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.d.ts +10 -1
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/universal-router.js +1 -1
- package/build/dist/api/usd-estimate.d.ts +2 -0
- package/build/dist/api/usd-estimate.js +1 -1
- package/build/dist/chunks/{DMDOSHV7.js → 266VIESP.js} +1 -1
- package/build/dist/chunks/{KNBNKG7P.js → 2BKZLF5A.js} +1 -1
- package/build/dist/chunks/{HFVXNKA5.js → 2BM2WX2G.js} +1 -1
- package/build/dist/chunks/{OY5W7ZSL.js → 2H2OZE6X.js} +1 -1
- package/build/dist/chunks/{E76Z2TT4.js → 2QQ5CGQI.js} +1 -1
- package/build/dist/chunks/{4PLLS6CT.js → 2VYA6WIN.js} +1 -1
- package/build/dist/chunks/{LCH6F5HT.js → 342OZP53.js} +1 -1
- package/build/dist/chunks/{FQTO7VJG.js → 3HF6WE4L.js} +1 -1
- package/build/dist/chunks/3M7RMROZ.js +1 -0
- package/build/dist/chunks/3RGED2KO.js +1 -0
- package/build/dist/chunks/{RUSXMQSJ.js → 3XIJCHT7.js} +1 -1
- package/build/dist/chunks/3XY44BP5.js +1 -0
- package/build/dist/chunks/3YNXQ3EZ.js +1 -0
- package/build/dist/chunks/45QP74CE.js +1 -0
- package/build/dist/chunks/{NYHKIXJR.js → 4GAU3JLN.js} +1 -1
- package/build/dist/chunks/{Y2QADJOB.js → 4P6DRKY3.js} +1 -1
- package/build/dist/chunks/{W3DGFMQE.js → 4RTXP2YP.js} +1 -1
- package/build/dist/chunks/{7FYM7FJA.js → 4SXRXNHG.js} +1 -1
- package/build/dist/chunks/{ZTKT3ZQK.js → 53VBLEYS.js} +1 -1
- package/build/dist/chunks/5677LZOV.js +1 -0
- package/build/dist/chunks/{ADIPEGNN.js → 5AO2QPWE.js} +1 -1
- package/build/dist/chunks/{GQITAJVF.js → 5BPFF7NX.js} +1 -1
- package/build/dist/chunks/{PXUML7HJ.js → 5DWQUEBA.js} +1 -1
- package/build/dist/chunks/{WAKZWSHB.js → 5KKAN7XQ.js} +1 -1
- package/build/dist/chunks/{VVAM3EAK.js → 5N6YJFFA.js} +1 -1
- package/build/dist/chunks/{QIB6OMQV.js → 5O67QQIY.js} +1 -1
- package/build/dist/chunks/5PNFV7HH.js +1 -0
- package/build/dist/chunks/5RAZFRO4.js +1 -0
- package/build/dist/chunks/{FAH7FKUT.js → 5UWVXEPD.js} +1 -1
- package/build/dist/chunks/5VKVAUFQ.js +1 -0
- package/build/dist/chunks/5Y457HYC.js +1 -0
- package/build/dist/chunks/64LAWFBE.js +1 -0
- package/build/dist/chunks/{JJGZ7W3V.js → 6AS3TGOX.js} +1 -1
- package/build/dist/chunks/6EWSLHXL.js +1 -0
- package/build/dist/chunks/{6F527FLN.js → 6HNQAYBM.js} +1 -1
- package/build/dist/chunks/{FUP53K6G.js → 6LDC5D2S.js} +1 -1
- package/build/dist/chunks/{YR44GQG4.js → 6QXTL65K.js} +1 -1
- package/build/dist/chunks/6RVAV6BB.js +1 -0
- package/build/dist/chunks/{WSILNJS2.js → 6STUQOFL.js} +1 -1
- package/build/dist/chunks/{OKXKDDBX.js → 6Y2546JA.js} +1 -1
- package/build/dist/chunks/{4Z3IGMU6.js → 7AYP4ATZ.js} +1 -1
- package/build/dist/chunks/{YGW4ODAP.js → 7EPU3XGY.js} +1 -1
- package/build/dist/chunks/7GL547YZ.js +1 -0
- package/build/dist/chunks/7JTXYMNP.js +1 -0
- package/build/dist/chunks/{A3BJSQ23.js → 7VU5VCTL.js} +1 -1
- package/build/dist/chunks/{Z7FGEWO2.js → 7WXAS54T.js} +1 -1
- package/build/dist/chunks/{3D7FXI6G.js → 7X5JVF3F.js} +1 -1
- package/build/dist/chunks/{DRLBTB4E.js → A72ADVYF.js} +1 -1
- package/build/dist/chunks/{ANIF3JMV.js → AG66NM3J.js} +1 -1
- package/build/dist/chunks/{AOX6DKYU.js → AL6UXNGH.js} +1 -1
- package/build/dist/chunks/AODUTN65.js +1 -0
- package/build/dist/chunks/{PQG3ULRT.js → AONO47JX.js} +1 -1
- package/build/dist/chunks/{JTPHZCO3.js → AQJLEG6B.js} +1 -1
- package/build/dist/chunks/AZBTNUXF.js +1 -0
- package/build/dist/chunks/{O56EZB5Y.js → B5BU645H.js} +1 -1
- package/build/dist/chunks/{LQSPWRHN.js → B75SS7H6.js} +1 -1
- package/build/dist/chunks/{GBIBRYOV.js → B7HVPHSS.js} +1 -1
- package/build/dist/chunks/{LT5P6PZW.js → B7WZJHIJ.js} +1 -1
- package/build/dist/chunks/{3A2IKFTV.js → BIFANUTV.js} +1 -1
- package/build/dist/chunks/BM4KHOFB.js +1 -0
- package/build/dist/chunks/{X3YEDVRN.js → BSV65PCA.js} +1 -1
- package/build/dist/chunks/{HDBDBKEA.js → BW755PNH.js} +1 -1
- package/build/dist/chunks/{VXCGMALF.js → BWE5PXRE.js} +1 -1
- package/build/dist/chunks/{7U62MMUQ.js → BY2OWKZB.js} +1 -1
- package/build/dist/chunks/{SRHVSNPX.js → C2H3BWN5.js} +1 -1
- package/build/dist/chunks/{F7MGYRPU.js → CCPG6PRL.js} +1 -1
- package/build/dist/chunks/{ZTX4WT62.js → CFPJDLTZ.js} +1 -1
- package/build/dist/chunks/{OI3N4EW4.js → CG7ABZXH.js} +1 -1
- package/build/dist/chunks/CJMVRV34.js +1 -0
- package/build/dist/chunks/CQPIR6ER.js +1 -0
- package/build/dist/chunks/{FP7DHVK2.js → CR7DPGI6.js} +1 -1
- package/build/dist/chunks/{W5FM2OVB.js → CVVNAFUE.js} +1 -1
- package/build/dist/chunks/{LEHBRAZX.js → CW37EGPL.js} +1 -1
- package/build/dist/chunks/{MI5HZDMH.js → D6JOXK7Q.js} +1 -1
- package/build/dist/chunks/{SGHSCK22.js → DJRS3TR5.js} +1 -1
- package/build/dist/chunks/{IZFED3R2.js → DLNDJZR4.js} +1 -1
- package/build/dist/chunks/{SYERFEJ4.js → DPSFR3ZS.js} +1 -1
- package/build/dist/chunks/{2T6O77QZ.js → DV2HVFTM.js} +1 -1
- package/build/dist/chunks/{NMJVQX5M.js → DWRRIFXS.js} +1 -1
- package/build/dist/chunks/{3ZH5SOC2.js → EFOC337C.js} +1 -1
- package/build/dist/chunks/EHQRAA3R.js +1 -0
- package/build/dist/chunks/{WX7OYCNS.js → EJIP7RBG.js} +1 -1
- package/build/dist/chunks/EPOIAXCV.js +3 -0
- package/build/dist/chunks/EWZFZUVF.js +1 -0
- package/build/dist/chunks/{OB7BFDOV.js → EYE3ZAJB.js} +1 -1
- package/build/dist/chunks/{MQ5F2VOK.js → EZUQMTLE.js} +1 -1
- package/build/dist/chunks/F36IA5RI.js +1 -0
- package/build/dist/chunks/{DD47RZFU.js → F74ARK4H.js} +1 -1
- package/build/dist/chunks/{Q4HSQL65.js → FGGDAAHW.js} +1 -1
- package/build/dist/chunks/FMEO7RX7.js +1 -0
- package/build/dist/chunks/{V6EVQWAL.js → FN6XY6ET.js} +1 -1
- package/build/dist/chunks/G4IX4CYN.js +1 -0
- package/build/dist/chunks/G53U6Y4L.js +1 -0
- package/build/dist/chunks/{XHFAF5PZ.js → GBIL2I2K.js} +1 -1
- package/build/dist/chunks/{RKM62HC5.js → GCFHKJIO.js} +1 -1
- package/build/dist/chunks/{K7HTDKAT.js → GMMTHTCP.js} +1 -1
- package/build/dist/chunks/{O5QTITN6.js → GRHBE4MQ.js} +1 -1
- package/build/dist/chunks/GTJ6LBGB.js +1 -0
- package/build/dist/chunks/GV6Z3MET.js +1 -0
- package/build/dist/chunks/{GK3D7OKG.js → GVCNTGLC.js} +1 -1
- package/build/dist/chunks/GX2RCAHG.js +1 -0
- package/build/dist/chunks/{O3XWE4FO.js → H5KU4DUU.js} +1 -1
- package/build/dist/chunks/H7ZJ7LAB.js +1 -0
- package/build/dist/chunks/{DCGNVMKG.js → HC3QFA5I.js} +1 -1
- package/build/dist/chunks/{RK3PPFRX.js → HEQBTHFS.js} +1 -1
- package/build/dist/chunks/{C76D54YG.js → HGSFRN57.js} +1 -1
- package/build/dist/chunks/HJI7KO6F.js +1 -0
- package/build/dist/chunks/{L6CVMDWQ.js → HNBYPHTA.js} +1 -1
- package/build/dist/chunks/{MSRCJ2BS.js → HPBTSJW7.js} +1 -1
- package/build/dist/chunks/HPO673QQ.js +1 -0
- package/build/dist/chunks/{ZFRTBBIW.js → HRGLFGFL.js} +1 -1
- package/build/dist/chunks/{DGDMRATN.js → ICHT3H3W.js} +1 -1
- package/build/dist/chunks/IJVBCEA2.js +1 -0
- package/build/dist/chunks/{2TX7HP6M.js → IKVRFAUP.js} +1 -1
- package/build/dist/chunks/IM7ZF7XZ.js +1 -0
- package/build/dist/chunks/{I4473OC6.js → IMD33NQS.js} +1 -1
- package/build/dist/chunks/IR7KDBFU.js +1 -0
- package/build/dist/chunks/{X24YTJST.js → IY7FWTAL.js} +1 -1
- package/build/dist/chunks/IYOWMW5B.js +1 -0
- package/build/dist/chunks/J2J73XYU.js +1 -0
- package/build/dist/chunks/JCS24YBB.js +1 -0
- package/build/dist/chunks/JQVTHPUO.js +1 -0
- package/build/dist/chunks/{USZCTSPI.js → JTWJT2O3.js} +1 -1
- package/build/dist/chunks/{2YYKQGJZ.js → K4CYAWNL.js} +1 -1
- package/build/dist/chunks/{7VH6JQ2H.js → K5C6QBOO.js} +1 -1
- package/build/dist/chunks/K5OXLIPK.js +1 -0
- package/build/dist/chunks/{4PB6MSGZ.js → K6GECT3F.js} +1 -1
- package/build/dist/chunks/{HU2JXDLH.js → KB2JWQZ4.js} +1 -1
- package/build/dist/chunks/{EFESPGA2.js → KCZUJ57H.js} +1 -1
- package/build/dist/chunks/{YW4W3LPQ.js → KHLM6NIZ.js} +1 -1
- package/build/dist/chunks/{OIQTZOBN.js → KKGHXNM4.js} +1 -1
- package/build/dist/chunks/{SUNTJ6IU.js → KYANIEPX.js} +1 -1
- package/build/dist/chunks/{MOZBDCVV.js → L3IAEXQR.js} +1 -1
- package/build/dist/chunks/{ZZ6FZGHF.js → L4UFGM7M.js} +1 -1
- package/build/dist/chunks/{DMB64UIN.js → L76P6WIH.js} +1 -1
- package/build/dist/chunks/{QMNUB2GM.js → LBT6WR4U.js} +1 -1
- package/build/dist/chunks/LD3A2KLN.js +1 -0
- package/build/dist/chunks/{WRUTW6CG.js → LFSNAQ7V.js} +1 -1
- package/build/dist/chunks/{5ZVIAGLX.js → LKRAUTYI.js} +1 -1
- package/build/dist/chunks/{23HNDJ76.js → M2SWILNG.js} +1 -1
- package/build/dist/chunks/{IT2JLILU.js → MFKDNAHB.js} +1 -1
- package/build/dist/chunks/MFQTBUSD.js +1 -0
- package/build/dist/chunks/{V4UJMUIB.js → MLN5KTG7.js} +1 -1
- package/build/dist/chunks/{S4JUFCT4.js → MSQNOK3I.js} +1 -1
- package/build/dist/chunks/{FA3GBXQP.js → MXI7LX2F.js} +1 -1
- package/build/dist/chunks/N6YNJGEF.js +1 -0
- package/build/dist/chunks/{DXAPKN7H.js → NLC36QHL.js} +1 -1
- package/build/dist/chunks/NUTTPUYJ.js +1 -0
- package/build/dist/chunks/{O4S6XAYV.js → O7L55XM3.js} +1 -1
- package/build/dist/chunks/{NAO7VWZF.js → OCIEVYPR.js} +1 -1
- package/build/dist/chunks/{4NBXBKOX.js → OD7CY6BY.js} +1 -1
- package/build/dist/chunks/{RUTSEGGD.js → OHZHQSCA.js} +1 -1
- package/build/dist/chunks/{T3QEN3S6.js → OIGTTRN5.js} +1 -1
- package/build/dist/chunks/{5OTQCE2E.js → P6JE2NRA.js} +1 -1
- package/build/dist/chunks/PD5NXIRT.js +1 -0
- package/build/dist/chunks/{TXGZ6NWN.js → PG7HZIZL.js} +1 -1
- package/build/dist/chunks/{WXZ4LAKO.js → PXVF2SHU.js} +1 -1
- package/build/dist/chunks/{UBVE2U6X.js → Q43WPRYU.js} +1 -1
- package/build/dist/chunks/QA6Z2CYP.js +2 -0
- package/build/dist/chunks/QAAKUIWE.js +1 -0
- package/build/dist/chunks/{PQOWIRKQ.js → QAVP3CWL.js} +1 -1
- package/build/dist/chunks/{YXXK6EPI.js → QBHY2QRC.js} +1 -1
- package/build/dist/chunks/{ELHRXA5U.js → QFK335LC.js} +1 -1
- package/build/dist/chunks/{3PHJUFU2.js → QFUSCK5C.js} +1 -1
- package/build/dist/chunks/{IPU656WB.js → QKH7ED6B.js} +1 -1
- package/build/dist/chunks/{AHUCYDBC.js → QKIQ7ZKD.js} +1 -1
- package/build/dist/chunks/{XW3VGWXK.js → QMWHQRYC.js} +1 -1
- package/build/dist/chunks/{N6PHSHBE.js → QP2B7AYX.js} +1 -1
- package/build/dist/chunks/{VHK5AYC2.js → QZ6V6J6W.js} +1 -1
- package/build/dist/chunks/{MDLJFCT4.js → R5Z4HPCA.js} +1 -1
- package/build/dist/chunks/RKJFSDGV.js +1 -0
- package/build/dist/chunks/RKS3M7L5.js +1 -0
- package/build/dist/chunks/{GDOHHXNH.js → RLX6YTNT.js} +1 -1
- package/build/dist/chunks/RYEQIZ2H.js +1 -0
- package/build/dist/chunks/{USEF3QKG.js → S432S6NA.js} +1 -1
- package/build/dist/chunks/S47M3IPR.js +1 -0
- package/build/dist/chunks/S65KXMZ7.js +3 -0
- package/build/dist/chunks/{2OVJ2BTJ.js → SEXKWYUM.js} +1 -1
- package/build/dist/chunks/{2ILYVUFA.js → SRYX65GZ.js} +1 -1
- package/build/dist/chunks/{GNOHIL4Q.js → TMENUIBC.js} +1 -1
- package/build/dist/chunks/{BSX4LFYI.js → TNHU5UBQ.js} +1 -1
- package/build/dist/chunks/{PDPTJMTJ.js → TT2ST3Q3.js} +1 -1
- package/build/dist/chunks/TTBB6EFN.js +1 -0
- package/build/dist/chunks/{Z5YI6KLN.js → TWVDWNTG.js} +1 -1
- package/build/dist/chunks/TZG7HTVM.js +1 -0
- package/build/dist/chunks/{OVM4QIET.js → U4MSIH4G.js} +1 -1
- package/build/dist/chunks/UEOS6SHR.js +1 -0
- package/build/dist/chunks/{EIE2U4OX.js → UGFRBJDQ.js} +1 -1
- package/build/dist/chunks/{HUKDISRE.js → UIVOYAO2.js} +1 -1
- package/build/dist/chunks/{XRDLMTBJ.js → UMY6SP7C.js} +1 -1
- package/build/dist/chunks/UNBRUWSV.js +1 -0
- package/build/dist/chunks/{LGLWEGPY.js → UPX3OWKA.js} +1 -1
- package/build/dist/chunks/{MHONMLF6.js → URTQNYWU.js} +1 -1
- package/build/dist/chunks/{4RCYYN6O.js → V7HTGO23.js} +1 -1
- package/build/dist/chunks/{HZSYMGJ2.js → VS7ZA4OF.js} +1 -1
- package/build/dist/chunks/{BJ2U2VXJ.js → VTWAVH74.js} +1 -1
- package/build/dist/chunks/{5GQJVKVY.js → W5GWK72I.js} +1 -1
- package/build/dist/chunks/{65OITTDL.js → W73SLWBT.js} +1 -1
- package/build/dist/chunks/WRA3ZC6W.js +1 -0
- package/build/dist/chunks/{PRBIC3UK.js → WUONMIA2.js} +1 -1
- package/build/dist/chunks/{XL3W7DAQ.js → X3BB6WME.js} +1 -1
- package/build/dist/chunks/{K3TZYPSV.js → X53QVHBC.js} +1 -1
- package/build/dist/chunks/{LVFI74ST.js → XNJ6NDQQ.js} +1 -1
- package/build/dist/chunks/{GBPB7JIB.js → XSQJOOEY.js} +1 -1
- package/build/dist/chunks/XUDQYSPU.js +1 -0
- package/build/dist/chunks/{VKNKVUAA.js → XWZ5SL5Q.js} +1 -1
- package/build/dist/chunks/{365B4YEV.js → XXLQDQEX.js} +1 -1
- package/build/dist/chunks/{BDLV42SD.js → Y5T36EEU.js} +1 -1
- package/build/dist/chunks/{R73R4KN3.js → YBLJ2MCR.js} +1 -1
- package/build/dist/chunks/{WNWRF4HE.js → YZHJ4BAP.js} +1 -1
- package/build/dist/chunks/ZSGW2ZSO.js +1 -0
- package/build/dist/chunks/{HRAHGYNK.js → ZTNBX4VH.js} +1 -1
- package/package.json +1 -1
- package/build/dist/chunks/2QP6WGKZ.js +0 -1
- package/build/dist/chunks/3AOTYJPX.js +0 -1
- package/build/dist/chunks/4E7FJQLL.js +0 -1
- package/build/dist/chunks/4J245N3F.js +0 -1
- package/build/dist/chunks/4M6XBG6X.js +0 -1
- package/build/dist/chunks/BA66J5YQ.js +0 -1
- package/build/dist/chunks/BIY2F6MO.js +0 -1
- package/build/dist/chunks/CZ66MYKR.js +0 -1
- package/build/dist/chunks/DFM4T6ZE.js +0 -1
- package/build/dist/chunks/DGCJZ3HO.js +0 -1
- package/build/dist/chunks/DHX3Q5RV.js +0 -2
- package/build/dist/chunks/DWQJ7NSX.js +0 -1
- package/build/dist/chunks/EFUACKDK.js +0 -1
- package/build/dist/chunks/EQEMI54U.js +0 -1
- package/build/dist/chunks/GYPMUYB5.js +0 -1
- package/build/dist/chunks/JFC2QCMW.js +0 -1
- package/build/dist/chunks/JW7GLNLB.js +0 -3
- package/build/dist/chunks/MEB727X5.js +0 -1
- package/build/dist/chunks/MIKQWF6Q.js +0 -3
- package/build/dist/chunks/MQK6OP7S.js +0 -1
- package/build/dist/chunks/OSMOBKRQ.js +0 -1
- package/build/dist/chunks/P6MPKIU2.js +0 -1
- package/build/dist/chunks/P7C3TYI4.js +0 -1
- package/build/dist/chunks/RN3WUJIO.js +0 -1
- package/build/dist/chunks/TI727O2H.js +0 -1
- package/build/dist/chunks/UHIJMDD2.js +0 -1
- package/build/dist/chunks/VQJXQLFW.js +0 -1
- package/build/dist/chunks/W32UECOL.js +0 -1
- package/build/dist/chunks/WWNAGOCD.js +0 -1
- package/build/dist/chunks/ZNX3YVF2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,g as F,i as q,j as y}from"../chunks/OI3N4EW4.js";import{a as D}from"../chunks/HKHCN4A2.js";import"../chunks/UCFVPTE2.js";import"../chunks/C4XK764N.js";import"../chunks/FWOGOWUM.js";import{a as p,b}from"../chunks/3CH2IPQL.js";import"../chunks/Q4HSQL65.js";import"../chunks/2T6O77QZ.js";import"../chunks/OY5W7ZSL.js";import"../chunks/GDOHHXNH.js";import"../chunks/O4S6XAYV.js";import"../chunks/65OITTDL.js";import"../chunks/KNBNKG7P.js";import{b as N}from"../chunks/FP7DHVK2.js";import"../chunks/NYHKIXJR.js";import"../chunks/VXCGMALF.js";import{f as O,g as P,o as L}from"../chunks/4NBXBKOX.js";import{a as R,b as E}from"../chunks/LGLWEGPY.js";import{e as I}from"../chunks/O7HCEPQY.js";import{e as S}from"../chunks/46KWRAYK.js";import{a as h}from"../chunks/YXXK6EPI.js";import"../chunks/DFM4T6ZE.js";import"../chunks/G2LAO23N.js";import"../chunks/2GXHYI23.js";import{e as A}from"../chunks/ZFRTBBIW.js";import"../chunks/BA66J5YQ.js";import"../chunks/WSILNJS2.js";import"../chunks/KHOUBQJK.js";import"../chunks/JFC2QCMW.js";import"../chunks/Y2QADJOB.js";import"../chunks/4J245N3F.js";import"../chunks/3PHJUFU2.js";import"../chunks/DCGNVMKG.js";import"../chunks/HZSYMGJ2.js";import"../chunks/LQSPWRHN.js";import"../chunks/GYPMUYB5.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/GK3D7OKG.js";import"../chunks/OIQTZOBN.js";import"../chunks/Z7FGEWO2.js";import"../chunks/LIUXNOLP.js";import"../chunks/BSX4LFYI.js";import"../chunks/ELHRXA5U.js";import"../chunks/DGDMRATN.js";import"../chunks/4Z3IGMU6.js";import"../chunks/C76D54YG.js";import"../chunks/TXGZ6NWN.js";import"../chunks/ZTX4WT62.js";import"../chunks/VVAM3EAK.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/MQ5F2VOK.js";import"../chunks/5RXALTDT.js";import{b as s,j as f,t as c}from"../chunks/TI727O2H.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";import{zeroAddress as Q}from"viem";var e=(r,n)=>({...n,meaning:r}),x=f[s].meridian,V=x.CollateralToken_USDe.address,H={by:"server-continuation",reason:"Meridian Predict settles RFQ approvals over a WebSocket auction session that the Oak server holds."},M={none:"Single-use auction approval: it cannot be cancelled and lapses at its deadline.",staysExecutableUntilExpiry:!0},J={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:x.PredictionMarketEscrow.address},primaryType:"MintApproval",types:{MintApproval:R},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:V,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:M,submit:H,requireHuman:!0},Z={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:x.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:M,submit:H,requireHuman:!0},v=L({agentId:"1",owner:Q,nonce:"0",deadline:"0"}),$={id:"priors.consent",program:"Priors",purpose:"pool consent",tools:["priors_starter_line",...N],class:"consent",encoding:"eip712",domain:{...v.domain},primaryType:v.primaryType,types:v.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:P+300,submit:{by:"transaction"},requireHuman:!0},X={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:O+300,submit:{by:"server-continuation",reason:"The Priors invite bot receives the ownership proof through the Oak server session."},requireHuman:!1},Le=new Set(["factor_sign_up","factor_create_pay_link","factor_apply_to_job"]),T={by:"server-continuation",reason:"Oak hosts Factor API reads, pacing and engine posts; the module verifies the wallet signature before posting."},ee={id:"factor.agent-profile",program:"Factor",purpose:"agent profile",tools:["factor_sign_up"],class:"auth",encoding:"eip191-template",primaryType:"factor.agent-profile",types:{},fields:{address:e("This wallet, in lowercase",{role:"signer"}),name:e("Normalised agent name from your request",{role:"derived",rebuild:"factor.agent-profile.name"}),does:e("Normalised work description from your request",{role:"derived",rebuild:"factor.agent-profile.does"}),at:e("Factor state time, within 120 seconds of local creation; expiry is min(at + 600, createdAt + 600)",{role:"derived",rebuild:"factor.agent-profile.time",yields:["expiry"]})},maxLifetimeSeconds:600,requireHuman:!0,submit:T},re={id:"factor.pay-link",program:"Factor",purpose:"pay link",tools:["factor_create_pay_link"],class:"auth",encoding:"eip191-template",primaryType:"factor.pay-link",types:{},fields:{agent:e("This wallet, in lowercase",{role:"signer"}),price:e("Job price in ETH, formatted exactly from your decimal wei argument",{role:"derived",rebuild:"factor.pay-link.price"}),title:e("Normalised job title from your request",{role:"derived",rebuild:"factor.pay-link.title"}),brief:e("Hash of the normalised brief bytes, or none for an empty brief",{role:"derived",rebuild:"factor.pay-link.brief"}),due:e("Whole hours after payment from your request",{role:"derived",rebuild:"factor.pay-link.due"}),early:e("Whether up to half may be drawn before delivery, from your request",{role:"derived",rebuild:"factor.pay-link.early"}),expires:e("Link expiry clamped to at most 30 days from the local creation time",{role:"expiry"}),id:e("Fresh 16 lowercase hexadecimal link id, bound to the continuation",{role:"nonce",kind:"local-random"})},maxLifetimeSeconds:2592e3,requireHuman:!0,submit:T},ne={id:"factor.open-job-apply",program:"Factor",purpose:"open job application",tools:["factor_apply_to_job"],class:"auth",encoding:"eip191-template",primaryType:"factor.open-job-apply",types:{},fields:{open:e("Open job id from your request",{role:"derived",rebuild:"factor.open-job-apply.open"}),agent:e("This wallet, in lowercase",{role:"signer"}),pitch:e("Normalised pitch from your request, or none when empty",{role:"derived",rebuild:"factor.open-job-apply.pitch"}),at:e("Factor state time, within 120 seconds of local creation; expiry is min(at + 600, createdAt + 600)",{role:"derived",rebuild:"factor.open-job-apply.time",yields:["expiry"]})},maxLifetimeSeconds:600,requireHuman:!0,submit:T},te=[ee,re,ne],oe={AgentWalletSet:[{name:"agentId",type:"uint256"},{name:"newWallet",type:"address"},{name:"owner",type:"address"},{name:"deadline",type:"uint256"}]},ie={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"})},U=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:oe,fields:ie,maxLifetimeSeconds:420,submit:{by:"server-continuation",reason:"The proof is an argument of the setAgentWallet transaction the Oak server builds next."},requireHuman:!1}),ae=U("mainnet"),se=U("testnet"),de={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:f[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},pe=A,le="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.",ce={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."},W={subaccount:"primary",subaccountId:"00000000-0000-4000-8000-000000000000"},ue="0x0000000000000000000000000000000000000001";function i(r,n,t,o,G,B,K={}){let g=I(o,{...W,...G},ue,"1",1);return{id:r,program:"Meridian",purpose:n,tools:[`meridian_perps_${o}`],class:t,encoding:"eip712",domain:{...S},primaryType:g.primaryType,types:{[g.primaryType]:Object.entries(g.fields).map(([Y,z])=>({name:Y,type:z}))},fields:B,maxLifetimeSeconds:3600,submit:ce,requireHuman:t!=="auth"&&t!=="cancel",enabled:!1,disabledReason:le,...K}}var a=e("This wallet, the account owner",{role:"signer"}),u=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"}),m=e("Signing time; Meridian accepts the signature for at most one hour after it",{role:"derived",rebuild:"meridian.perps.signed-at",yields:["expiry"]}),C={revoke:{none:"One-shot request: it cannot be cancelled and lapses within one hour.",staysExecutableUntilExpiry:!0}},me=[i("meridian.perps.trade-order","perps order","order","order",{type:"LIMIT",quantity:"1",price:"1",side:0,onchainId:1,timeInForce:"GTD"},{sender:a,subaccount:u,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}}),i("meridian.perps.cancel-order","perps order cancel","cancel","cancel",{all:!0},{sender:a,subaccount:u,nonce:d},{expiryBinding:"cancel-only"}),i("meridian.perps.initiate-withdraw","perps withdrawal","order","withdraw",{token:"0x0000000000000000000000000000000000000002",tokenId:W.subaccountId,amount:"1"},{account:a,subaccount:u,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:m,destinationAddress:e("This wallet, padded to 32 bytes",{role:"recipient"}),destinationEndpointId:e("Same-chain withdrawal",{role:"pinned",value:0})},C),i("meridian.perps.convert-token","perps conversion","order","convert",{fromToken:"0x0000000000000000000000000000000000000002",toToken:"0x0000000000000000000000000000000000000003",amount:"1"},{sender:a,subaccount:u,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:m},C),i("meridian.perps.revoke-linked-signer","linked-signer revocation","cancel","signer",{mode:"revoke",signer:"0x0000000000000000000000000000000000000003"},{sender:a,signer:e("Linked signer revoked",{role:"delegate"}),subaccount:u,nonce:d,signedAt:m}),i("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:m},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),i("meridian.perps.extend-linked-signer","linked-signer extension","link","signer",{mode:"extend"},{sender:a,nonce:d,signedAt:m},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),i("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}})],ye={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},ge={id:"raeto.topup-transfer",program:"Raeto",purpose:"credit top-up",tools:["raeto_join","raeto_topup"],class:"order",encoding:"eip712",domain:p.usdgDomain,primaryType:"TransferWithAuthorization",types:D,fields:{from:e("This wallet, paying for credit",{role:"signer"}),to:e("Raeto payment recipient pinned by the local round validator",{role:"recipient"}),value:e("Exactly the approved whole-dollar amount in USDG base units",{role:"amount",side:"out",token:p.usdg,arg:"amount_usd"}),validAfter:e("Immediately valid",{role:"pinned",value:"0"}),validBefore:e("Payment deadline in chain Unix seconds",{role:"expiry"}),nonce:e("Fresh random 32-byte nonce; authorizationState must be false",{role:"nonce",kind:"local-random"})},maxLifetimeSeconds:300,nonceRead:"authorizationState",requireHuman:!0,revoke:{none:"One-shot payment authorization lapses within five minutes. Oak never signs cancellation.",staysExecutableUntilExpiry:!0},submit:{by:"addon",host:"api.raeto.cc",path:p.topupPath}},fe={id:"raeto.agent-signin",program:"Raeto",purpose:"agent sign-in",tools:["raeto_join","raeto_topup"],class:"auth",encoding:"eip191-template",primaryType:"raeto.agent-signin",types:{},fields:{wallet:e("This wallet, signing in",{role:"signer"}),nonce:e("Single-use nonce from the exact sign-in challenge",{role:"nonce",kind:"server-observed"})},expiry:{enforcedBy:"api",path:"challenge.expiresAt"},maxLifetimeSeconds:600,requireHuman:!1,submit:{by:"addon",host:"api.raeto.cc",path:"/v1/agents/login"}};function he(r){if(!r.pinned)return[];if(!r.endpoint)throw l("Raeto pairing endpoint is not pinned");if(!r.schema?.domain||!r.schema.types||!r.schema.fields)throw l("Raeto pairing typed-data schema is not pinned");return[{id:"raeto.record-pair",program:"Raeto",purpose:"public record pairing",tools:["raeto_join","raeto_topup"],class:"auth",encoding:"eip712",primaryType:b.primaryType,domain:r.schema.domain,types:r.schema.types,fields:r.schema.fields,maxLifetimeSeconds:600,requireHuman:!0,submit:{by:"addon",host:"api.raeto.cc",path:r.endpoint}}]}var Se=[ge,fe,...he(b)],w=[J,Z,$,X,ae,se,de,ye,...me,...Se,...te],be=[S.verifyingContract,pe,h,p.usdg,p.payTo],ve=q(w,F(be));if(ve.length)throw l("invalid signature registry");var k=new Map;for(let r of w)for(let n of r.tools)k.set(n,[...k.get(n)??[],r]);var j=new Map(w.map(r=>[y(r),r]));function _(r){return k.get(r)??[]}function Ne(r,n=_(r)){return n.some(t=>t.tools.includes(r)&&t.submit.by==="addon")}function De(r){return _(r).flatMap(n=>n.class==="relayed"&&n.enabled!==!1?n.relayedPaths??[]:[])}function Fe(r,n){let t=n?.domain?.chainId===c.testnet.chainId?"testnet":"mainnet",o=j.get(y({network:t==="testnet"?"testnet":void 0,encoding:"eip712",domain:n?.domain,primaryType:n?.primaryType}));if(!o||o.enabled===!1||!o.tools.includes(r)||o.class==="relayed")throw l("Oak has no signing contract for this request");return o}function qe(r){if(!r?.domain||typeof r.primaryType!="string")return;let n=r.domain.chainId===c.testnet.chainId?"testnet":void 0,t=j.get(y({network:n,encoding:"eip712",domain:r.domain,primaryType:r.primaryType}));return t?.class==="relayed"?void 0:t}function Ce(r){let n=_(r).find(t=>t.encoding==="eip191-template"&&t.enabled!==!1);if(!n)throw l("Oak has no signing contract for this request");return n}export{ae as ERC8004_WALLET_SET,se as ERC8004_WALLET_SET_TESTNET,ne as FACTOR_APPLICATION,re as FACTOR_PAY_LINK,ee as FACTOR_PROFILE,Le as FACTOR_SIGNATURE_TOOLS,te as FACTOR_SPECS,de as HOOKR_RELAYED_INTENT,ye as LONGBOW_RELAYED_OFFER,J as MERIDIAN_MINT_APPROVAL,me as MERIDIAN_PERPS_SPECS,Z as MERIDIAN_TRADE_APPROVAL,be as MODULE_PINS,$ as PRIORS_CONSENT,X as PRIORS_SEAT_PROOF,fe as RAETO_AGENT_SIGNIN,Se as RAETO_SIGNATURE_SPECS,ge as RAETO_TOPUP_TRANSFER,w as SIGNATURE_SPECS,De as relayedSignaturePaths,Ce as specForMessage,qe as specForStruct,Fe as specForTypedData,_ as specsForTool,Ne as submitsFromAddon};
|
|
1
|
+
import{d as l,g as F,i as q,j as y}from"../chunks/CG7ABZXH.js";import"../chunks/FGGDAAHW.js";import"../chunks/RLX6YTNT.js";import"../chunks/O7L55XM3.js";import"../chunks/W73SLWBT.js";import"../chunks/DV2HVFTM.js";import{a as D}from"../chunks/HKHCN4A2.js";import"../chunks/UCFVPTE2.js";import"../chunks/C4XK764N.js";import"../chunks/FWOGOWUM.js";import{a as p,b}from"../chunks/3CH2IPQL.js";import"../chunks/2BKZLF5A.js";import{b as N}from"../chunks/CR7DPGI6.js";import"../chunks/4GAU3JLN.js";import"../chunks/2H2OZE6X.js";import"../chunks/BWE5PXRE.js";import{f as O,g as P,o as L}from"../chunks/OD7CY6BY.js";import{a as R,b as E}from"../chunks/UPX3OWKA.js";import{e as I}from"../chunks/O7HCEPQY.js";import{e as S}from"../chunks/46KWRAYK.js";import{a as h}from"../chunks/QBHY2QRC.js";import"../chunks/UNBRUWSV.js";import"../chunks/G2LAO23N.js";import"../chunks/2GXHYI23.js";import{e as A}from"../chunks/HRGLFGFL.js";import"../chunks/IR7KDBFU.js";import"../chunks/KHOUBQJK.js";import"../chunks/6STUQOFL.js";import"../chunks/GV6Z3MET.js";import"../chunks/4P6DRKY3.js";import"../chunks/5PNFV7HH.js";import"../chunks/HC3QFA5I.js";import"../chunks/QFUSCK5C.js";import"../chunks/VS7ZA4OF.js";import"../chunks/B75SS7H6.js";import"../chunks/TTBB6EFN.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/GVCNTGLC.js";import"../chunks/KKGHXNM4.js";import"../chunks/3XY44BP5.js";import"../chunks/LD3A2KLN.js";import"../chunks/3RGED2KO.js";import"../chunks/UMY6SP7C.js";import"../chunks/CJMVRV34.js";import"../chunks/7WXAS54T.js";import"../chunks/LIUXNOLP.js";import"../chunks/B7WZJHIJ.js";import"../chunks/TNHU5UBQ.js";import"../chunks/HGSFRN57.js";import"../chunks/QFK335LC.js";import"../chunks/ICHT3H3W.js";import"../chunks/7AYP4ATZ.js";import"../chunks/PG7HZIZL.js";import"../chunks/S65KXMZ7.js";import"../chunks/CW37EGPL.js";import"../chunks/K6D6SDIG.js";import"../chunks/QA6Z2CYP.js";import"../chunks/CFPJDLTZ.js";import"../chunks/5N6YJFFA.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/EZUQMTLE.js";import"../chunks/5RXALTDT.js";import{b as s,j as f,t as c}from"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";import{zeroAddress as Q}from"viem";var e=(r,n)=>({...n,meaning:r}),x=f[s].meridian,V=x.CollateralToken_USDe.address,H={by:"server-continuation",reason:"Meridian Predict settles RFQ approvals over a WebSocket auction session that the Oak server holds."},M={none:"Single-use auction approval: it cannot be cancelled and lapses at its deadline.",staysExecutableUntilExpiry:!0},J={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:x.PredictionMarketEscrow.address},primaryType:"MintApproval",types:{MintApproval:R},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:V,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:M,submit:H,requireHuman:!0},Z={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:x.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:M,submit:H,requireHuman:!0},v=L({agentId:"1",owner:Q,nonce:"0",deadline:"0"}),$={id:"priors.consent",program:"Priors",purpose:"pool consent",tools:["priors_starter_line",...N],class:"consent",encoding:"eip712",domain:{...v.domain},primaryType:v.primaryType,types:v.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:P+300,submit:{by:"transaction"},requireHuman:!0},X={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:O+300,submit:{by:"server-continuation",reason:"The Priors invite bot receives the ownership proof through the Oak server session."},requireHuman:!1},Le=new Set(["factor_sign_up","factor_create_pay_link","factor_apply_to_job"]),T={by:"server-continuation",reason:"Oak hosts Factor API reads, pacing and engine posts; the module verifies the wallet signature before posting."},ee={id:"factor.agent-profile",program:"Factor",purpose:"agent profile",tools:["factor_sign_up"],class:"auth",encoding:"eip191-template",primaryType:"factor.agent-profile",types:{},fields:{address:e("This wallet, in lowercase",{role:"signer"}),name:e("Normalised agent name from your request",{role:"derived",rebuild:"factor.agent-profile.name"}),does:e("Normalised work description from your request",{role:"derived",rebuild:"factor.agent-profile.does"}),at:e("Factor state time, within 120 seconds of local creation; expiry is min(at + 600, createdAt + 600)",{role:"derived",rebuild:"factor.agent-profile.time",yields:["expiry"]})},maxLifetimeSeconds:600,requireHuman:!0,submit:T},re={id:"factor.pay-link",program:"Factor",purpose:"pay link",tools:["factor_create_pay_link"],class:"auth",encoding:"eip191-template",primaryType:"factor.pay-link",types:{},fields:{agent:e("This wallet, in lowercase",{role:"signer"}),price:e("Job price in ETH, formatted exactly from your decimal wei argument",{role:"derived",rebuild:"factor.pay-link.price"}),title:e("Normalised job title from your request",{role:"derived",rebuild:"factor.pay-link.title"}),brief:e("Hash of the normalised brief bytes, or none for an empty brief",{role:"derived",rebuild:"factor.pay-link.brief"}),due:e("Whole hours after payment from your request",{role:"derived",rebuild:"factor.pay-link.due"}),early:e("Whether up to half may be drawn before delivery, from your request",{role:"derived",rebuild:"factor.pay-link.early"}),expires:e("Link expiry clamped to at most 30 days from the local creation time",{role:"expiry"}),id:e("Fresh 16 lowercase hexadecimal link id, bound to the continuation",{role:"nonce",kind:"local-random"})},maxLifetimeSeconds:2592e3,requireHuman:!0,submit:T},ne={id:"factor.open-job-apply",program:"Factor",purpose:"open job application",tools:["factor_apply_to_job"],class:"auth",encoding:"eip191-template",primaryType:"factor.open-job-apply",types:{},fields:{open:e("Open job id from your request",{role:"derived",rebuild:"factor.open-job-apply.open"}),agent:e("This wallet, in lowercase",{role:"signer"}),pitch:e("Normalised pitch from your request, or none when empty",{role:"derived",rebuild:"factor.open-job-apply.pitch"}),at:e("Factor state time, within 120 seconds of local creation; expiry is min(at + 600, createdAt + 600)",{role:"derived",rebuild:"factor.open-job-apply.time",yields:["expiry"]})},maxLifetimeSeconds:600,requireHuman:!0,submit:T},te=[ee,re,ne],oe={AgentWalletSet:[{name:"agentId",type:"uint256"},{name:"newWallet",type:"address"},{name:"owner",type:"address"},{name:"deadline",type:"uint256"}]},ie={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"})},U=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:oe,fields:ie,maxLifetimeSeconds:420,submit:{by:"server-continuation",reason:"The proof is an argument of the setAgentWallet transaction the Oak server builds next."},requireHuman:!1}),ae=U("mainnet"),se=U("testnet"),de={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:f[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},pe=A,le="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.",ce={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."},W={subaccount:"primary",subaccountId:"00000000-0000-4000-8000-000000000000"},ue="0x0000000000000000000000000000000000000001";function i(r,n,t,o,G,B,K={}){let g=I(o,{...W,...G},ue,"1",1);return{id:r,program:"Meridian",purpose:n,tools:[`meridian_perps_${o}`],class:t,encoding:"eip712",domain:{...S},primaryType:g.primaryType,types:{[g.primaryType]:Object.entries(g.fields).map(([Y,z])=>({name:Y,type:z}))},fields:B,maxLifetimeSeconds:3600,submit:ce,requireHuman:t!=="auth"&&t!=="cancel",enabled:!1,disabledReason:le,...K}}var a=e("This wallet, the account owner",{role:"signer"}),u=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"}),m=e("Signing time; Meridian accepts the signature for at most one hour after it",{role:"derived",rebuild:"meridian.perps.signed-at",yields:["expiry"]}),C={revoke:{none:"One-shot request: it cannot be cancelled and lapses within one hour.",staysExecutableUntilExpiry:!0}},me=[i("meridian.perps.trade-order","perps order","order","order",{type:"LIMIT",quantity:"1",price:"1",side:0,onchainId:1,timeInForce:"GTD"},{sender:a,subaccount:u,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}}),i("meridian.perps.cancel-order","perps order cancel","cancel","cancel",{all:!0},{sender:a,subaccount:u,nonce:d},{expiryBinding:"cancel-only"}),i("meridian.perps.initiate-withdraw","perps withdrawal","order","withdraw",{token:"0x0000000000000000000000000000000000000002",tokenId:W.subaccountId,amount:"1"},{account:a,subaccount:u,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:m,destinationAddress:e("This wallet, padded to 32 bytes",{role:"recipient"}),destinationEndpointId:e("Same-chain withdrawal",{role:"pinned",value:0})},C),i("meridian.perps.convert-token","perps conversion","order","convert",{fromToken:"0x0000000000000000000000000000000000000002",toToken:"0x0000000000000000000000000000000000000003",amount:"1"},{sender:a,subaccount:u,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:m},C),i("meridian.perps.revoke-linked-signer","linked-signer revocation","cancel","signer",{mode:"revoke",signer:"0x0000000000000000000000000000000000000003"},{sender:a,signer:e("Linked signer revoked",{role:"delegate"}),subaccount:u,nonce:d,signedAt:m}),i("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:m},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),i("meridian.perps.extend-linked-signer","linked-signer extension","link","signer",{mode:"extend"},{sender:a,nonce:d,signedAt:m},{revoke:{offchainSpec:"meridian.perps.revoke-linked-signer",staysExecutableUntilExpiry:!1}}),i("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}})],ye={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},ge={id:"raeto.topup-transfer",program:"Raeto",purpose:"credit top-up",tools:["raeto_join","raeto_topup"],class:"order",encoding:"eip712",domain:p.usdgDomain,primaryType:"TransferWithAuthorization",types:D,fields:{from:e("This wallet, paying for credit",{role:"signer"}),to:e("Raeto payment recipient pinned by the local round validator",{role:"recipient"}),value:e("Exactly the approved whole-dollar amount in USDG base units",{role:"amount",side:"out",token:p.usdg,arg:"amount_usd"}),validAfter:e("Immediately valid",{role:"pinned",value:"0"}),validBefore:e("Payment deadline in chain Unix seconds",{role:"expiry"}),nonce:e("Fresh random 32-byte nonce; authorizationState must be false",{role:"nonce",kind:"local-random"})},maxLifetimeSeconds:300,nonceRead:"authorizationState",requireHuman:!0,revoke:{none:"One-shot payment authorization lapses within five minutes. Oak never signs cancellation.",staysExecutableUntilExpiry:!0},submit:{by:"addon",host:"api.raeto.cc",path:p.topupPath}},fe={id:"raeto.agent-signin",program:"Raeto",purpose:"agent sign-in",tools:["raeto_join","raeto_topup"],class:"auth",encoding:"eip191-template",primaryType:"raeto.agent-signin",types:{},fields:{wallet:e("This wallet, signing in",{role:"signer"}),nonce:e("Single-use nonce from the exact sign-in challenge",{role:"nonce",kind:"server-observed"})},expiry:{enforcedBy:"api",path:"challenge.expiresAt"},maxLifetimeSeconds:600,requireHuman:!1,submit:{by:"addon",host:"api.raeto.cc",path:"/v1/agents/login"}};function he(r){if(!r.pinned)return[];if(!r.endpoint)throw l("Raeto pairing endpoint is not pinned");if(!r.schema?.domain||!r.schema.types||!r.schema.fields)throw l("Raeto pairing typed-data schema is not pinned");return[{id:"raeto.record-pair",program:"Raeto",purpose:"public record pairing",tools:["raeto_join","raeto_topup"],class:"auth",encoding:"eip712",primaryType:b.primaryType,domain:r.schema.domain,types:r.schema.types,fields:r.schema.fields,maxLifetimeSeconds:600,requireHuman:!0,submit:{by:"addon",host:"api.raeto.cc",path:r.endpoint}}]}var Se=[ge,fe,...he(b)],w=[J,Z,$,X,ae,se,de,ye,...me,...Se,...te],be=[S.verifyingContract,pe,h,p.usdg,p.payTo],ve=q(w,F(be));if(ve.length)throw l("invalid signature registry");var k=new Map;for(let r of w)for(let n of r.tools)k.set(n,[...k.get(n)??[],r]);var j=new Map(w.map(r=>[y(r),r]));function _(r){return k.get(r)??[]}function Ne(r,n=_(r)){return n.some(t=>t.tools.includes(r)&&t.submit.by==="addon")}function De(r){return _(r).flatMap(n=>n.class==="relayed"&&n.enabled!==!1?n.relayedPaths??[]:[])}function Fe(r,n){let t=n?.domain?.chainId===c.testnet.chainId?"testnet":"mainnet",o=j.get(y({network:t==="testnet"?"testnet":void 0,encoding:"eip712",domain:n?.domain,primaryType:n?.primaryType}));if(!o||o.enabled===!1||!o.tools.includes(r)||o.class==="relayed")throw l("Oak has no signing contract for this request");return o}function qe(r){if(!r?.domain||typeof r.primaryType!="string")return;let n=r.domain.chainId===c.testnet.chainId?"testnet":void 0,t=j.get(y({network:n,encoding:"eip712",domain:r.domain,primaryType:r.primaryType}));return t?.class==="relayed"?void 0:t}function Ce(r){let n=_(r).find(t=>t.encoding==="eip191-template"&&t.enabled!==!1);if(!n)throw l("Oak has no signing contract for this request");return n}export{ae as ERC8004_WALLET_SET,se as ERC8004_WALLET_SET_TESTNET,ne as FACTOR_APPLICATION,re as FACTOR_PAY_LINK,ee as FACTOR_PROFILE,Le as FACTOR_SIGNATURE_TOOLS,te as FACTOR_SPECS,de as HOOKR_RELAYED_INTENT,ye as LONGBOW_RELAYED_OFFER,J as MERIDIAN_MINT_APPROVAL,me as MERIDIAN_PERPS_SPECS,Z as MERIDIAN_TRADE_APPROVAL,be as MODULE_PINS,$ as PRIORS_CONSENT,X as PRIORS_SEAT_PROOF,fe as RAETO_AGENT_SIGNIN,Se as RAETO_SIGNATURE_SPECS,ge as RAETO_TOPUP_TRANSFER,w as SIGNATURE_SPECS,De as relayedSignaturePaths,Ce as specForMessage,qe as specForStruct,Fe as specForTypedData,_ as specsForTool,Ne as submitsFromAddon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunks/CG7ABZXH.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{a as MAX_SIGNATURE_LIFETIME,b as MAX_SIGNED_AMOUNT,c as VALUE_CLASSES,p as assertAmount,n as assertExpiry,k as assertRequestMatchesSpec,o as assertSignatureTime,q as fieldRows,l as fieldValue,e as isValueClass,g as pinnedAddresses,i as registryViolations,m as roleTerms,d as signingRefusal,j as specKey,h as specViolations,f as typePaths};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunks/
|
|
1
|
+
import{a,b,c}from"../chunks/7WXAS54T.js";import"../chunks/LIUXNOLP.js";import"../chunks/5N6YJFFA.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/EZUQMTLE.js";import"../chunks/5RXALTDT.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{a as NATIVE_TOKEN_ADDRESS,c as createPreview,b as normalizeNativeTokenAddress};
|
package/build/dist/api/swap.d.ts
CHANGED
package/build/dist/api/swap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as B,B as C,C as D,a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t,t as u,u as v,v as w,w as x,x as y,y as z,z as A}from"../chunks/
|
|
1
|
+
import{A as B,B as C,C as D,a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p,p as q,q as r,r as s,s as t,t as u,u as v,v as w,w as x,x as y,y as z,z as A}from"../chunks/TTBB6EFN.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import{a}from"../chunks/GVCNTGLC.js";import"../chunks/KKGHXNM4.js";import"../chunks/3XY44BP5.js";import"../chunks/LD3A2KLN.js";import"../chunks/3RGED2KO.js";import"../chunks/UMY6SP7C.js";import"../chunks/CJMVRV34.js";import"../chunks/7WXAS54T.js";import"../chunks/LIUXNOLP.js";import"../chunks/B7WZJHIJ.js";import"../chunks/TNHU5UBQ.js";import"../chunks/5N6YJFFA.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/EZUQMTLE.js";import"../chunks/5RXALTDT.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{c as DEFAULT_SLIPPAGE_BPS,i as ExpiredQuoteError,A as FOBO_ROUTE_DISCLOSURE,j as MAX_RECENT_QUOTES,q as MAX_VELORA_FEE_BPS,e as NATIVE_ETH_ADDRESS,h as NoRouteError,d as PRICE_IMPACT_WARNING_BPS,b as QUOTE_TTL_SECONDS,f as ZERO_ADDRESS,y as assertCalldataMinAmountOut,m as assertQuoteBinding,z as assertSwapTransaction,t as assertVeloraPartnerAndFee,D as buildSwapFromQuote,p as computeMinAmountOut,k as copyQuote,x as decodeSwapMinAmountOut,v as encodeKyberSwapData,w as encodeVeloraSwapData,u as formatVenueFeeDisclosure,C as getQuote,o as isNativeToken,g as kyberSwapAbi,B as normalizeQuote,a as ponsCurveSwapAbi,n as resolveNowSeconds,l as snapshotQuote,s as veloraCalldataMinimum,r as veloraVenueFeeBps};
|
|
@@ -5,6 +5,7 @@ export declare const NATIVE_ETH_TOKEN: Token;
|
|
|
5
5
|
export declare const USDG_TOKEN: Token;
|
|
6
6
|
export declare const WETH_TOKEN: Token;
|
|
7
7
|
export declare const USDE_TOKEN: Token;
|
|
8
|
+
export declare const CHOP_TOKENS: readonly Token[];
|
|
8
9
|
export interface GetBalancesOptions {
|
|
9
10
|
client?: PublicClient;
|
|
10
11
|
http?: typeof fetch;
|
|
@@ -26,6 +27,7 @@ interface StockDiscoveryOptions {
|
|
|
26
27
|
}
|
|
27
28
|
type NamedToken = Token & {
|
|
28
29
|
name?: string;
|
|
30
|
+
notTradable?: string;
|
|
29
31
|
};
|
|
30
32
|
export declare function parseOfficialStockAssets(payload: unknown, chainId?: number, options?: StockDiscoveryOptions): NamedToken[];
|
|
31
33
|
export declare function verifyOfficialStockToken(candidate: {
|
|
@@ -77,6 +79,7 @@ export declare const MULTICALL3_ABI: readonly [{
|
|
|
77
79
|
}];
|
|
78
80
|
export type BalanceRow = Balance & {
|
|
79
81
|
discoveryNotice?: string;
|
|
82
|
+
stockNotice?: string;
|
|
80
83
|
verified?: false;
|
|
81
84
|
note?: string;
|
|
82
85
|
};
|
|
@@ -96,16 +99,22 @@ export declare function discoverReceivedTokenAddresses(wallet: Address, options:
|
|
|
96
99
|
incomplete: boolean;
|
|
97
100
|
notice: string;
|
|
98
101
|
}>;
|
|
102
|
+
export type ReceivedBalance = Balance & {
|
|
103
|
+
unreadable?: ('symbol' | 'decimals')[];
|
|
104
|
+
note?: string;
|
|
105
|
+
};
|
|
106
|
+
export declare function unreadableTokensNotice(rows: readonly ReceivedBalance[]): string;
|
|
99
107
|
export declare function getReceivedTokenBalances(wallet: Address, addresses: readonly Address[], options: {
|
|
100
108
|
client: PublicClient;
|
|
101
109
|
chainId: number;
|
|
102
|
-
}): Promise<
|
|
110
|
+
}): Promise<ReceivedBalance[]>;
|
|
103
111
|
export interface FoundToken extends Token {
|
|
104
112
|
name: string;
|
|
105
113
|
kind: 'native' | 'stablecoin' | 'wrapped' | 'oak' | 'official_stock' | 'launchpad' | 'erc20';
|
|
106
114
|
verified: boolean;
|
|
107
115
|
source: string;
|
|
108
116
|
identityNote?: string;
|
|
117
|
+
notTradable?: string;
|
|
109
118
|
launchpad?: 'clanker' | 'pons' | 'pools.trade';
|
|
110
119
|
creator?: Address;
|
|
111
120
|
creatorSource?: string;
|
package/build/dist/api/tokens.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"../chunks/5PNFV7HH.js";import"../chunks/HC3QFA5I.js";import"../chunks/QFUSCK5C.js";import"../chunks/VS7ZA4OF.js";import"../chunks/B75SS7H6.js";import"../chunks/TTBB6EFN.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/GVCNTGLC.js";import"../chunks/KKGHXNM4.js";import"../chunks/3XY44BP5.js";import"../chunks/LD3A2KLN.js";import"../chunks/3RGED2KO.js";import"../chunks/UMY6SP7C.js";import"../chunks/CJMVRV34.js";import"../chunks/7WXAS54T.js";import"../chunks/LIUXNOLP.js";import"../chunks/B7WZJHIJ.js";import"../chunks/TNHU5UBQ.js";import"../chunks/HGSFRN57.js";import"../chunks/QFK335LC.js";import"../chunks/ICHT3H3W.js";import"../chunks/7AYP4ATZ.js";import"../chunks/PG7HZIZL.js";import"../chunks/CFPJDLTZ.js";import"../chunks/5N6YJFFA.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/EZUQMTLE.js";import"../chunks/5RXALTDT.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{f as CHOP_TOKENS,l as MULTICALL3_ABI,b as NATIVE_ETH_TOKEN,a as STOCK_ASSETS_URL,e as USDE_TOKEN,c as USDG_TOKEN,d as WETH_TOKEN,i as assertOfficialStockIdentity,n as discoverReceivedTokenAddresses,k as fetchOfficialStockTokens,q as findToken,m as getBalances,j as getOfficialStockTokens,p as getReceivedTokenBalances,g as parseOfficialStockAssets,r as resolveQuoteToken,o as unreadableTokensNotice,h as verifyOfficialStockToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i}from"../chunks/M267JEDO.js";import{a}from"../chunks/
|
|
1
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i}from"../chunks/M267JEDO.js";import{a}from"../chunks/LFSNAQ7V.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{c as COMING_SOON,d as FIND_TOOL,g as LOCAL_TOOLS,e as RUN_TOOL,f as UPOCH_READ_TOOLS,h as VISIBLE_TOOLS,a as isFundingBootstrap,b as isReadDiscovery,i as visibleTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunks/TNHU5UBQ.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{e as FOBO_ETH_USDG_POOL,c as FOBO_HOOK,l as FOBO_PERMIT_WINDOW_SECONDS,f as FOBO_ROUTE_HOOKS,k as FOBO_SWAP_DEADLINE_SECONDS,b as PERMIT2,d as PINNED_V4_HOOKS,a as UNIVERSAL_ROUTER,m as assertFoboRoute,h as decodeUniversalRouterSwap,j as sameLegs,i as samePoolKey,g as v4Currency};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Address } from 'viem';
|
|
2
|
+
import type { VerifiedLog } from './modules/chop/types.js';
|
|
2
3
|
import type { ModuleContext, Token, TokenAmount } from './types.js';
|
|
3
4
|
export interface UsdEstimateFields {
|
|
4
5
|
usdEstimate: string | null;
|
|
@@ -19,5 +20,6 @@ export type UsdEstimateContext = Pick<ModuleContext, 'clientFor'> & {
|
|
|
19
20
|
export interface UsdEstimateOptions {
|
|
20
21
|
budgetMs?: number;
|
|
21
22
|
chopShareTokens?: readonly Address[];
|
|
23
|
+
chopShareFacts?: readonly VerifiedLog[];
|
|
22
24
|
}
|
|
23
25
|
export declare function estimateUsd<T extends TokenAmount>(context: UsdEstimateContext, rows: readonly T[], options?: UsdEstimateOptions): Promise<(T & UsdEstimateFields)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunks/
|
|
1
|
+
import{a}from"../chunks/K5OXLIPK.js";import"../chunks/IR7KDBFU.js";import"../chunks/KHOUBQJK.js";import"../chunks/6STUQOFL.js";import"../chunks/GV6Z3MET.js";import"../chunks/4P6DRKY3.js";import"../chunks/5PNFV7HH.js";import"../chunks/HC3QFA5I.js";import"../chunks/QFUSCK5C.js";import"../chunks/VS7ZA4OF.js";import"../chunks/B75SS7H6.js";import"../chunks/TTBB6EFN.js";import"../chunks/CQ5WRWV4.js";import"../chunks/IV4K7FMD.js";import"../chunks/GVCNTGLC.js";import"../chunks/KKGHXNM4.js";import"../chunks/3XY44BP5.js";import"../chunks/LD3A2KLN.js";import"../chunks/3RGED2KO.js";import"../chunks/UMY6SP7C.js";import"../chunks/CJMVRV34.js";import"../chunks/7WXAS54T.js";import"../chunks/LIUXNOLP.js";import"../chunks/B7WZJHIJ.js";import"../chunks/TNHU5UBQ.js";import"../chunks/HGSFRN57.js";import"../chunks/QFK335LC.js";import"../chunks/ICHT3H3W.js";import"../chunks/7AYP4ATZ.js";import"../chunks/PG7HZIZL.js";import"../chunks/S65KXMZ7.js";import"../chunks/CW37EGPL.js";import"../chunks/K6D6SDIG.js";import"../chunks/QA6Z2CYP.js";import"../chunks/CFPJDLTZ.js";import"../chunks/5N6YJFFA.js";import"../chunks/P4UQGWCP.js";import"../chunks/SPJCSEKP.js";import"../chunks/Z25UKUJF.js";import"../chunks/43LI5NKJ.js";import"../chunks/IOYRL6AY.js";import"../chunks/SCG5HWMN.js";import"../chunks/5TUXSOMI.js";import"../chunks/66F5ZH34.js";import"../chunks/NWNYJ26T.js";import"../chunks/IX3GZMTM.js";import"../chunks/5HCXZWUH.js";import"../chunks/EZUQMTLE.js";import"../chunks/5RXALTDT.js";import"../chunks/EWZFZUVF.js";import"../chunks/XSD5NL7J.js";import"../chunks/JXOEJPJ4.js";import"../chunks/63YRSLDK.js";export{a as estimateUsd};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./QYKXWBZC.js";import{b as c}from"./
|
|
1
|
+
import{a as p}from"./QYKXWBZC.js";import{b as c}from"./EWZFZUVF.js";import{a as n}from"./XSD5NL7J.js";import{a as f}from"./JXOEJPJ4.js";import{getAddress as k}from"viem";function y(e){return e.type.startsWith("tuple")?`(${("components"in e?e.components:[]).map(y).join(",")})${e.type.slice(5)}`:e.type}var m=e=>`${e.name}(${e.inputs.map(y).join(",")})`;function l(e,t,s=0){if(s>8)throw new n("Desk argument nesting exceeds eight levels.");let o=/^(.*)\[(\d*)\]$/.exec(e.type);if(o){if(!Array.isArray(t)||t.length>64||o[2]&&t.length!==Number(o[2]))throw new n("Desk arrays must match the ABI shape and contain at most 64 values.");return t.map(r=>l({...e,type:o[1]},r,s+1))}if(e.type==="tuple"){let r="components"in e?e.components:[];if(!Array.isArray(t)||t.length!==r.length)throw new n("Desk tuples use exact ordered value arrays.");return r.map((a,u)=>l(a,t[u],s+1))}if(e.type==="bool"){if(typeof t!="boolean")throw new n("Use boolean desk values.");return t}if(typeof t!="string"||t.length>8194)throw new n("Desk integers, addresses, bytes and text must be bounded strings.");if(e.type==="address")return k(t);if(/^u?int\d*$/.test(e.type)){let r=e.type.startsWith("int"),a=Number(e.type.replace(/^u?int/,"")||"256");if(!/^-?\d{1,78}$/.test(t))throw new n("Desk integers use decimal base-unit strings.");let u=BigInt(t),d=1n<<BigInt(r?a-1:a);if(u<(r?-d:0n)||u>=d)throw new n("Desk integer exceeds its ABI width.");return u}if(/^bytes\d*$/.test(e.type)){let r=Number(e.type.slice(5));if(!/^0x(?:[0-9a-f]{2})*$/i.test(t)||r&&t.length!==r*2+2)throw new n("Desk byte values must match the ABI width.");return t}if(e.type==="string")return t;throw new n("Unsupported desk read argument type.")}function h(e,t=0){if(t>12)throw new n("Desk result nesting exceeds the supported size.");if(typeof e=="bigint")return e.toString();if(typeof e=="string"){if(/^0x[0-9a-f]*$/i.test(e)){if(e.length>8194)throw new n("Desk byte result exceeds the supported size. Choose a bounded getter.");return e}return f(e)}if(Array.isArray(e)){if(e.length>4096)throw new n("Desk result is too large. Choose a paginated getter.");return e.map(s=>h(s,t+1))}return e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([s,o])=>[s,h(o,t+1)])):e}var B=e=>({tools:[{name:"netnet_desk_read",inputSchema:{type:"object",additionalProperties:!1,required:["program"],properties:{program:{type:"string",enum:Object.keys(p),description:"Published NetNet desk program to read (choose one of the enum values)."},method:{type:"string",description:"Exact ABI signature returned by the catalog. Omit to list all qualified reads."},values:{type:"array",maxItems:16,description:"Ordered ABI input values; integer strings, booleans, or bounded arrays/tuples. Wallet parameters are explicit public addresses."}}},execute:async t=>{try{if(Object.keys(t).some(i=>!["program","method","values"].includes(i))||typeof t.program!="string"||!Object.hasOwn(p,t.program))throw new n("Choose a published NetNet desk program.");let s=p[t.program],o=s.abi.filter(i=>i.type==="function"&&["view","pure"].includes(i.stateMutability));if(t.method===void 0){if(t.values!==void 0)throw new n("values requires an exact method signature.");return{chainId:c,program:t.program,contract:s.address,methods:o.map(i=>({method:m(i),inputs:i.inputs,outputs:i.outputs})),access:"Public read-only ABI. No transaction, approval, signature or external publication is available here."}}let r=o.find(i=>m(i)===t.method),a=t.values??[];if(!r||!Array.isArray(a)||a.length!==r.inputs.length)throw new n("Choose an exact catalog method and ordered values matching its inputs. State-changing methods are unavailable.");let u=r.inputs.map((i,w)=>l(i,a[w])),d=e.clientFor(c);if(await d.getChainId()!==c)throw new n("NetNet desk reads require chain 4663.");let g=await d.getBlock(),b=await d.readContract({address:s.address,abi:[r],functionName:r.name,args:u,blockNumber:g.number});return{chainId:c,program:t.program,contract:s.address,blockNumber:String(g.number),method:m(r),outputs:r.outputs,data:h(b),units:"ABI-native raw fields. Integers are decimal strings; check the output names and official program terms for token decimals, price scales and timestamps. A zero balance or unavailable getter does not establish a complete wallet inventory."}}catch(s){throw new n(e.plainError(s))}}}]});export{m as a,l as b,B as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b as o,d as r,e as i}from"./
|
|
1
|
+
import{a,b as o,d as r,e as i}from"./CR7DPGI6.js";import{c as s}from"./BWE5PXRE.js";import{b as t}from"./EWZFZUVF.js";var n=[{feature:"Ethos claim",source:"https://go.priors.trade/start-ethos.js",missing:"Public claim endpoint signs/sends the sponsor transaction remotely. No unsigned final transaction with a local preview/confirmation handoff is published. Use the owner Go Start workflow; Oak offers status and route discovery."},{feature:"x402 pay_url, paid reports, hire payments and pay_gateway",source:"https://github.com/priors-agents/priors/tree/02230282d8888e00794207ed271ee01b4ce30309/packages/x402",missing:"These hand EIP-3009 payment authorization to an external merchant/facilitator. The recipient settles remotely; no Oak-local unsigned transaction handoff is exposed. Oak discovery is supported; external payment-signature validation, recipient/invoice binding and preview semantics require a shared add-on protocol, beyond this module write scope. Gateway source also says its live 402 surface was not measured."},{feature:"Go Google/Privy account, gas sponsorship, recovery and agent001 approvals",source:"https://go.priors.trade/account",missing:"Authenticated smart-account/session and sponsored-operation APIs are not publicly specified as an unsigned plain-wallet contract. Owner uses Priors UI. Underlying pool, stock, savings and backing contracts are supported here."},{feature:"Publish merchant listings, job offers/results, board requests and signed public offers",source:"https://priors.trade/agent",missing:"Hosted MCP supplies discovery and signed board reads. A versioned authenticated mutation/withdrawal contract is not pinned from the inspected public SDK. Existing owner consent plus direct sponsor offer is supported on chain; creating external listings/messages remains an owner workflow."},{feature:"Create the X proof post",source:"https://go.priors.trade/xlink-core.js",missing:"Requires the human account owner to publish on X. Oak can set or clear the canonical proof URL as public ERC-8004 metadata, but does not publish posts or claim metadata alone verifies X ownership."}];function l(){return{tools:[{name:"priors_capabilities",inputSchema:{type:"object",properties:{},additionalProperties:!1},async execute(){return{chainId:t,sourceCommit:"02230282d8888e00794207ed271ee01b4ce30309",reads:[...a],actions:[...r],localOwnerSignatures:[...o],core:[...i],ownerOnly:s.filter(e=>e.owner).map(e=>e.name),blocked:n.map(e=>({...e,status:"BLOCKED"})),integration:"The shared bridge/server diffs must be integrated for open reads, local signing continuations, exact calldata reconstruction, action destinations and human confirmation. New core builders fail closed in older add-ons; a core-only install does not establish end-to-end feature availability.",safety:"Every local action previews its exact unsigned transaction bundle. Approvals equal inputs or explicit finite future budgets; never unlimited. Persistent autopay and bids authorize later third-party execution within the stated budget. Token backing is collateral and provides no promised returns."}}}]}}export{n as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./TRCP7X5P.js";import{t as o,u as y}from"./
|
|
1
|
+
import{a as u}from"./TRCP7X5P.js";import{t as o,u as y}from"./EWZFZUVF.js";import{a as r}from"./XSD5NL7J.js";import{getAddress as g,hashTypedData as l,isAddress as f,zeroAddress as k}from"viem";var w="Actions are paused until this wallet has an Oak identity (a one-time public on-chain profile). Registering costs a small ETH network fee and needs the person's OK. Run oak setup register, or oak setup link <agentId> for an existing ID. Reads still work.";function d(e,n,t){if(typeof e!="string"||!/^(0|[1-9][0-9]*)$/.test(e)||e.length>78)throw new r(`Identity link ${t} must be a canonical decimal integer string.`);let i=BigInt(e);if(i>=1n<<BigInt(n))throw new r(`Identity link ${t} exceeds uint${n}.`);return i}function c(e,n){if(typeof e!="string"||!f(e,{strict:!1})||g(e)===k)throw new r(`Identity link ${n} must be a nonzero address.`);return g(e)}function m(e,n="mainnet"){d(e,256,"agentId");let{chainId:t,identityRegistry:i}=o[y(n)];return{chainId:t,registry:i,agentId:e}}function h(e){if(e===o.mainnet.chainId)return"mainnet";if(e===o.testnet.chainId)return"testnet";throw new r("Wrong identity network. Select mainnet or testnet and run oak setup again.")}function S(e,n="mainnet"){if(!e||typeof e!="object"||Array.isArray(e))throw new r(w);let t=e,i=m(t.agentId,n);if(Object.keys(t).some(s=>!["chainId","registry","agentId","linkId"].includes(s))||t.chainId!==i.chainId||t.registry!==i.registry||t.linkId!==void 0&&(typeof t.linkId!="string"||!/^0x[0-9a-f]{64}$/.test(t.linkId)))throw new r(`Wrong identity network or registry. Select chain ${i.chainId} and run oak setup again.`);return{...i,...t.linkId!==void 0?{linkId:t.linkId}:{}}}function p(e){let n=h(e.chainId),{chainId:t,registry:i}=m(e.agentId,n);if(c(e.registry,"registry")!==i)throw new r(`Identity link must use the pinned registry on chain ${t}.`);if(typeof e.audience!="string"||!e.audience.trim())throw new r("Identity link audience must be a nonempty string.");if(typeof e.challenge!="string"||!/^0x[0-9a-fA-F]{64}$/.test(e.challenge))throw new r("Identity link challenge must be a 32-byte hex string.");let s=d(e.issuedAt,64,"issuedAt"),a=d(e.expiresAt,64,"expiresAt");if(s>=a)throw new r("Identity link expiry must be after its issue time.");return{domain:{name:"Oak Identity Link",version:"1",chainId:t,verifyingContract:i},primaryType:"OakIdentityLink",types:{OakIdentityLink:[{name:"agentId",type:"uint256"},{name:"agentWallet",type:"address"},{name:"registry",type:"address"},{name:"chainId",type:"uint256"},{name:"audience",type:"string"},{name:"challenge",type:"bytes32"},{name:"issuedAt",type:"uint64"},{name:"expiresAt",type:"uint64"}]},message:{agentId:d(e.agentId,256,"agentId"),agentWallet:c(e.agentWallet,"agentWallet"),registry:i,chainId:BigInt(t),audience:e.audience,challenge:e.challenge,issuedAt:s,expiresAt:a}}}async function L(e,n){try{let t=p(e.link),i=p(n.expected),s=l(t);if(s!==l(i))return!1;let a=d(n.now,64,"now");if(a<t.message.issuedAt||a>=t.message.expiresAt)return!1;let I=c(n.currentOwner,"currentOwner");return typeof n.blockNumber!="bigint"||n.blockNumber<0n?!1:u({digest:s,signature:e.signature,owner:I,client:n.client,blockNumber:n.blockNumber,policy:"identity-link-legacy"})}catch{return!1}}export{w as a,m as b,h as c,S as d,p as e,L as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./
|
|
1
|
+
import{a as n}from"./BWE5PXRE.js";import{a as P}from"./UNBRUWSV.js";import{g as $}from"./NWNYJ26T.js";import{b as s,e as v}from"./EWZFZUVF.js";import{getAddress as T,parseAbi as b}from"viem";var m={address:n.priors,symbol:"PRIORS",decimals:18,chainId:s},w=8,E="0x0000000000000000000000000000000000000000",x=b(["function balanceOf(address) view returns (uint256)"]),_=b(["function balanceOf(address) view returns (uint256)","function previewRedeem(uint256) view returns (uint256)"]),y=b(["function getPosition(uint256) view returns ((address depositor,address owner,address token,uint64 openedAt,bool closing,uint8 status,uint128 line,uint256 amount))","function assets(address) view returns (address feed,uint64 maxAge,uint8 tokenDecimals,uint8 feedDecimals,bool enabled,uint16 ltvBps,uint128 lineCap)"]),A=b(["function latestGen(uint256) view returns (uint32)","function position(uint256,uint32,uint8,address) view returns ((uint256 counted,uint256 checkpoint,uint256 a0,uint256 a1,uint32 d0,uint32 d1,bool autoAdd))"]);async function L(k,d,C,R){let e=k.clientFor(s),g=async(t,i,o,r)=>{try{return await r()}catch(a){return[{module:"priors",id:`priors:unreadable:${t}`,chainId:s,assets:[],incomplete:!0,description:`Priors ${i} read failed (${k.plainError(a)}). It is not zero: ${o}`}]}},l=(t,i)=>k.formatAmount(t.toString(),i),S=()=>g("savings","savings","check it with priors_savings_balance.",async()=>{let t=await e.readContract({address:n.savings,abi:_,functionName:"balanceOf",args:[d]});if(t===0n)return[];let i=await e.readContract({address:n.savings,abi:_,functionName:"previewRedeem",args:[t]});return[{module:"priors",id:`priors:savings:${d.toLowerCase()}`,chainId:s,assets:[{token:R,amount:i.toString()}],description:`Priors savings in the Morpho vault (${n.savings}): ${t} shares, ${l(i,v)} USDG redeemable now. Exit with priors_savings_withdraw or priors_savings_redeem; vault liquidity applies and no immediate exit is promised.`}]}),O=()=>g("priors-token","PRIORS token","check it with balances.",async()=>{let t=await e.readContract({address:n.priors,abi:x,functionName:"balanceOf",args:[d]});return t===0n?[]:[{module:"priors",id:`priors:token:${d.toLowerCase()}`,chainId:s,assets:[{token:m,amount:t.toString()}],description:`${l(t,m.decimals)} PRIORS held by this wallet (${n.priors}). Stock-collateral and backing stake are listed separately.`}]}),N=t=>g(`stock:${t}`,`stock (agent ${t})`,`check it with priors_stock_state {"agentId":"${t}"}.`,async()=>{let i=await e.readContract({address:n.stock,abi:y,functionName:"getPosition",args:[t]});if(i.amount===0n||i.token===E||!$(i.depositor,d))return[];let o=T(i.token),r=(await e.readContract({address:n.stock,abi:y,functionName:"assets",args:[o]}))[2],a=P.tokens.find(p=>$(p.token,o))?.symbol??"STOCK";return[{module:"priors",id:`priors:stock:${t}`,chainId:s,assets:[{token:{address:o,symbol:a,decimals:r,chainId:s},amount:i.amount.toString()}],description:`Priors stock collateral for agent ${t}: ${l(i.amount,r)} ${a} locked in the stock vault (${n.stock})${i.closing?"; the line is closing":""}. Close the line with priors_stock_close to return it, subject to any default or issuer shortfall.`}]}),I=t=>g(`backing:${t}`,`backing (agent ${t})`,`check it with priors_backing_position {"agentId":"${t}"}.`,async()=>{let i=BigInt(await e.readContract({address:n.backing,abi:A,functionName:"latestGen",args:[t]})),o=i>=BigInt(w)?i-BigInt(w-1):0n,r=[];for(let c=o;c<=i;c++)for(let u of[0,1,2])r.push(e.readContract({address:n.backing,abi:A,functionName:"position",args:[t,Number(c),u,d]}));let a=await Promise.all(r),p=a.reduce((c,u)=>c+u.counted,0n),f=a.reduce((c,u)=>c+u.a0+u.a1,0n),h=[];return o>0n&&h.push({module:"priors",id:`priors:unreadable:backing-generations:${t}`,chainId:s,assets:[],incomplete:!0,description:`Agent ${t} has ${i} backing generations; only the latest ${w} were read. Check older ones with priors_backing_position.`}),p+f>0n&&h.push({module:"priors",id:`priors:backing:${t}`,chainId:s,assets:[{token:m,amount:(p+f).toString()}],description:`Priors backing stake for agent ${t}: ${l(p,m.decimals)} PRIORS counted and ${l(f,m.decimals)} PRIORS pending. It is collateral that a default burns, not a return. Stake already leaving or settled is not included; check priors_backing_record and priors_backing_claimable.`}),h});return(await Promise.all([S(),O(),...C.flatMap(t=>[N(t),I(t)])])).flat()}export{m as a,L as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as k,e as V,f,h as _,j as b,k as E,l as P,m as q,n as j,o as g,p as S,q as x,t as F,w as U,z as $}from"./
|
|
1
|
+
import{d as k,e as V,f,h as _,j as b,k as E,l as P,m as q,n as j,o as g,p as S,q as x,t as F,w as U,z as $}from"./BIFANUTV.js";import{c as m}from"./X5V2Z2NM.js";import{a as M}from"./43LI5NKJ.js";import{c as R,g as v}from"./NWNYJ26T.js";import{a as n}from"./XSD5NL7J.js";import{a as I}from"./JXOEJPJ4.js";import{encodeFunctionData as N,keccak256 as G,toBytes as L}from"viem";var D=`0x${"00".repeat(32)}`,ae=d=>{let A=(e,t,s)=>({name:e,inputSchema:t,execute:async(r,a)=>{try{return M(a),j(d,r.chainId),await s(r,a)}catch(u){throw new n(d.plainError(u))}}}),C={transactionHash:{...V,description:"After local submission, repeat the same arguments with the mined hash to verify calldata, event and registry state."}},w=(e,t,s)=>d.clientFor(_(d).chainId).readContract({address:e,abi:m,functionName:t,args:s}),p=async(e,t)=>{try{return await w(e,"getValidationStatus",[t])}catch{return}},H=(e,t)=>({requestHash:e,validator:t[0],agentId:t[1].toString(),response:t[2],responseHash:t[3],tag:I(t[4]),lastUpdate:t[5].toString(),possiblyUnanswered:t[2]===0&&t[3]===D&&t[4]===""}),W=A("erc8004_validation_request",{type:"object",additionalProperties:!1,required:["agentId","validator","requestURI"],description:"Ask a validator (re-execution staker, zkML verifier, TEE oracle, judge) to check an agent's work (Validation Registry validationRequest). Owner or approved operator only.",properties:{agentId:k,validator:{...R,description:"The validator contract or wallet that will respond."},requestURI:{type:"string",description:"HTTPS/IPFS URI of the data the validator needs (inputs and outputs)."},requestHash:{...f,description:"keccak256 commitment to the request payload; provide this or requestContent."},requestContent:{type:"string",description:"The exact request payload text; Oak commits its keccak256 as requestHash."},...C}},async(e,t)=>{let{address:s}=b(d),r=P(e.agentId),a=q(e.validator,"validator");if(E(a))throw new n("Provide a real validator address.");let u=x(e.requestURI,"requestURI");if(e.requestHash===void 0==(e.requestContent===void 0))throw new n("Provide exactly one of requestHash or requestContent.");let l=e.requestHash!==void 0?g(e.requestHash,"requestHash"):G(L(S(e.requestContent,"requestContent",1e6,!1)));return $(d,t,e,{to:s,data:N({abi:m,functionName:"validationRequest",args:[a,r,u,l]}),description:`Request validation of ERC-8004 agent ${r} by ${a}.`,summary:`Asks ${a} to validate agent ${r}'s work: request ${l}, data at ${I(u)}. The request is public and permanent. Only the named validator can respond. Repeat with transactionHash to verify.`,authority:async()=>{if(await F(d,r,t,"request validation"),await p(s,l))throw new n("A validation request with that requestHash already exists; use a different payload commitment.")},verify:async h=>{let c=U(h,s,m,"ValidationRequest"),i=await p(s,l);if(!i||!v(String(c.validatorAddress),a)||c.agentId!==r||c.requestHash!==l||i[1]!==r||!v(i[0],a))throw new n("The registry event or stored request does not match.");return{...H(l,i),confirmed:!0}}})}),Z=A("erc8004_validation_response",{type:"object",additionalProperties:!1,required:["requestHash","response"],description:"As the named validator, record a validation result from 0 (failed) to 100 (passed) for a request. May be called again to update.",properties:{requestHash:f,response:{type:"integer",minimum:0,maximum:100,description:"Validation score from 0 (failed) to 100 (passed)."},responseURI:{type:"string",description:"Optional HTTPS/IPFS evidence or audit URI."},responseHash:{...f,description:"Optional commitment to the evidence content."},tag:{type:"string",description:"Optional category, e.g. soft-finality / hard-finality."},...C}},async(e,t)=>{let{address:s}=b(d),r=g(e.requestHash,"requestHash"),a=e.response;if(typeof a!="number"||!Number.isInteger(a)||a<0||a>100)throw new n("response must be an integer from 0 to 100.");let u=e.responseURI===void 0?"":x(e.responseURI,"responseURI"),l=e.responseHash===void 0?D:g(e.responseHash,"responseHash"),h=S(e.tag,"tag",128);return $(d,t,e,{to:s,data:N({abi:m,functionName:"validationResponse",args:[r,a,u,l,h]}),description:`Respond ${a}/100 to validation request ${r}.`,summary:`Records validation result ${a}/100${h?` (tag ${I(h)})`:""} for request ${r} as this wallet. It is public; a later response replaces the stored result but the event history stays. Repeat with transactionHash to verify.`,authority:async()=>{let c=await p(s,r);if(!c)throw new n("No validation request has that requestHash.");if(!v(c[0],t))throw new n("Only the validator named in the request can respond to it.")},verify:async c=>{let i=U(c,s,m,"ValidationResponse"),o=await p(s,r);if(!o||i.requestHash!==r||i.response!==a||!v(String(i.validatorAddress),t)||o[2]!==a)throw new n("The registry event or stored result does not match.");return{...H(r,o),confirmed:!0}}})}),z=A("erc8004_validation",{type:"object",additionalProperties:!1,description:"Read-only validation lookups. Provide exactly one of requestHash (one request), agentId (its requests and average) or validator (requests addressed to it).",properties:{requestHash:f,agentId:k,validator:{...R,description:"The validator contract or wallet that will respond."},validators:{type:"array",maxItems:50,items:R,description:"With agentId: average only these validators."},tag:{type:"string",description:"With agentId: average only this tag."},limit:{type:"integer",minimum:1,maximum:100,default:25,description:"Maximum validation requests to return, from 1 to 100."}}},async e=>{let{address:t}=b(d),s=["requestHash","agentId","validator"].filter(o=>e[o]!==void 0);if(s.length!==1)throw new n("Provide exactly one of requestHash, agentId or validator.");let r=typeof e.limit=="number"?Math.min(Math.max(1,Math.trunc(e.limit)),100):25,a=async o=>{let y=o.slice(-r).reverse(),B=await Promise.all(y.map(async T=>{let O=await p(t,T);return O?H(T,O):{requestHash:T,unavailable:!0}}));return{requestsTotal:o.length,requests:B,truncated:o.length>y.length,newestFirst:!0}};if(s[0]==="requestHash"){let o=g(e.requestHash,"requestHash"),y=await p(t,o);if(!y)throw new n("No validation request has that requestHash.");return{registry:t,...H(o,y)}}if(s[0]==="validator")return{registry:t,validator:q(e.validator,"validator"),...await a(await w(t,"getValidatorRequests",[q(e.validator,"validator")]))};let u=P(e.agentId),l=Array.isArray(e.validators)?e.validators.map(o=>q(o,"validator")):[],h=S(e.tag,"tag",128),[c,i]=await Promise.all([w(t,"getAgentValidations",[u]),w(t,"getSummary",[u,l,h])]);return{registry:t,agentId:u.toString(),answeredCount:i[0].toString(),averageResponse:i[0]===0n?null:i[1],...await a(c),note:"The average counts only answered requests and includes whatever validators were asked; judge a result by who the validator is."}});return{tools:[W,Z,z]}};export{ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,b as f}from"./
|
|
1
|
+
import{a as d,b as f}from"./TT2ST3Q3.js";import{a}from"./P4UQGWCP.js";import{g as s}from"./NWNYJ26T.js";import{a as n}from"./XSD5NL7J.js";import{getAddress as m,keccak256 as u}from"viem";var l=a.vaults;function c(t,o=!0){let e=l.find(r=>s(r.earnContractAddress,t));if(!e&&o)throw new n("This Beefy vault is not in the pinned chain 4663 standard-vault inventory.");return e}async function v(t,o,e){c(o);let[r,i]=await Promise.all([t.getCode({address:m(o),blockNumber:e}),t.getCode({address:d,blockNumber:e})]),p=`0x363d3d373d3d3d363d73${d.slice(2).toLowerCase()}5af43d82803e903d91602b57fd5bf3`;if(r?.toLowerCase()!==p||!i||u(i)!==f)throw new n("The Beefy standard vault or implementation no longer matches its verified code.")}export{l as a,c as b,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as f}from"./
|
|
1
|
+
import{b as f}from"./IY7FWTAL.js";import{a as p}from"./43LI5NKJ.js";import{b as u}from"./EWZFZUVF.js";import{a as n}from"./XSD5NL7J.js";import{encodeFunctionData as A,getAddress as w,parseAbi as T,parseAbiItem as F}from"viem";var R=[["setOwner(address newOwner)","owner"],["setCurator(address newCurator)","owner"],["setIsSentinel(address account,bool enabled)","owner"],["setName(string name)","owner"],["setSymbol(string symbol)","owner"],["setIsAllocator(address account,bool enabled)","timelock"],["setReceiveSharesGate(address gate)","timelock"],["setSendSharesGate(address gate)","timelock"],["setReceiveAssetsGate(address gate)","timelock"],["setSendAssetsGate(address gate)","timelock"],["setAdapterRegistry(address registry)","timelock"],["addAdapter(address adapter)","timelock"],["removeAdapter(address adapter)","timelock"],["increaseTimelock(bytes4 selector,uint256 duration)","timelock"],["decreaseTimelock(bytes4 selector,uint256 duration)","timelock"],["abdicate(bytes4 selector)","timelock"],["setPerformanceFee(uint256 fee)","timelock"],["setManagementFee(uint256 fee)","timelock"],["setPerformanceFeeRecipient(address recipient)","timelock"],["setManagementFeeRecipient(address recipient)","timelock"],["increaseAbsoluteCap(bytes idData,uint256 cap)","timelock"],["increaseRelativeCap(bytes idData,uint256 cap)","timelock"],["decreaseAbsoluteCap(bytes idData,uint256 cap)","curatorOrSentinel"],["decreaseRelativeCap(bytes idData,uint256 cap)","curatorOrSentinel"],["setForceDeallocatePenalty(address adapter,uint256 penalty)","timelock"],["allocate(address adapter,bytes data,uint256 assets)","allocator"],["deallocate(address adapter,bytes data,uint256 assets)","allocatorOrSentinel"],["setLiquidityAdapterAndData(address adapter,bytes data)","allocator"],["setMaxRate(uint256 rate)","allocator"],["accrueInterest()","any"]],S=R.map(([a,t])=>({abi:F(`function ${a}`),authority:t})),x=T(["function asset() view returns (address)","function owner() view returns (address)","function curator() view returns (address)","function isSentinel(address) view returns (bool)","function isAllocator(address) view returns (bool)","function executableAt(bytes) view returns (uint256)","function abdicated(bytes4) view returns (bool)","function submit(bytes data)","function revoke(bytes data)"]);function M(a,t){if(a==="bool"){if(typeof t!="boolean")throw new n("Boolean operation values must be booleans.");return t}if(typeof t!="string")throw new n("All address, byte, text and integer operation values must be strings.");if(a==="address")return p(t),w(t);if(a==="uint256"){if(!/^\d+$/.test(t)||BigInt(t)>=1n<<256n)throw new n("Integer operation values must be uint256 decimal base-unit strings.");return BigInt(t)}if((a==="bytes"||a==="bytes4")&&!(a==="bytes4"?/^0x[0-9a-f]{8}$/i:/^0x(?:[0-9a-f]{2})*$/i).test(t))throw new n("Invalid hexadecimal operation bytes.");return t}function V(a,t,m,O){return{name:t,inputSchema:{type:"object",additionalProperties:!1,required:["operation","values"],properties:{operation:{type:"string",enum:S.map(i=>i.abi.name),description:"Vault management function to call (role-gated curator, owner, allocator or sentinel actions); values supplies its arguments in order."},values:{type:"array",maxItems:3,items:{oneOf:[{type:"string"},{type:"boolean"}]},description:"Ordered ABI values. Integers are decimal base-unit strings; addresses and bytes are explicit strings."},mode:{enum:["call","submit","revoke"],default:"call",description:"Submit/revoke only for timelocked curator operations. Execution is a separate call after the delay."}}},execute:async(i,c)=>{try{if(p(c),Object.keys(i).some(e=>!["operation","values","mode"].includes(e)))throw new n("Unexpected vault management argument.");let r=S.find(e=>e.abi.name===i.operation);if(!r||!Array.isArray(i.values)||i.values.length!==r.abi.inputs.length)throw new n("Provide a supported operation and its exact ordered values.");let o=i.mode??"call";if(!["call","submit","revoke"].includes(String(o))||o!=="call"&&r.authority!=="timelock")throw new n("Submit/revoke is available only for timelocked curator operations.");let I=r.abi.inputs.map((e,d)=>M(e.type,i.values[d])),l=A({abi:[r.abi],functionName:r.abi.name,args:I}),b=a.clientFor(u);if(await b.getChainId()!==u)throw new n("Vault management requires chain 4663.");let s=(e,d=[])=>b.readContract({address:m,abi:x,functionName:e,args:d}),y=await s("asset");if(typeof y!="string"||w(y)!==w(O.address))throw new n("Vault management requires the pinned vault asset.");let g=e=>typeof e=="string"&&e.toLowerCase()===c.toLowerCase(),C=async e=>e==="any"?!0:e==="owner"?g(await s("owner")):e==="allocator"?await s("isAllocator",[c])===!0:e==="allocatorOrSentinel"?await s("isAllocator",[c])===!0||await s("isSentinel",[c])===!0:g(await s("curator"))||e==="curatorOrSentinel"&&await s("isSentinel",[c])===!0;if(r.authority==="timelock"&&o==="call"){let[e,d,D]=await Promise.all([s("executableAt",[l]),s("abdicated",[l.slice(0,10)]),b.getBlock()]);if(f(e)===0n||f(e)>D.timestamp||d!==!1)throw new n("This exact operation has not matured or its selector is abdicated. Submit it with the curator, then wait for its executable time.")}else if(!await C(o==="submit"?"timelock":o==="revoke"?"curatorOrSentinel":r.authority))throw new n("This wallet does not hold the required vault management role. No transaction was built.");let $=o==="call"?l:A({abi:x,functionName:o==="submit"?"submit":"revoke",args:[l]}),k=`${o} ${r.abi.name} on ${m}; ordered values ${JSON.stringify(i.values)}. ${r.abi.name==="abdicate"?"Abdication is irreversible.":""}`,h=[a.unsignedTx({to:m,data:$,value:"0",chainId:u,description:k})],v=await a.preview(h,c);return{txs:h,preview:v,summary:`${k} ${v.summary} ${o==="submit"?"Submission schedules this exact operation; it does not execute the configuration change.":"Role, cap and timing checks can change before execution."}`}}catch(r){throw new n(a.plainError(r))}}}}export{S as a,M as b,V as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as w}from"./2GXHYI23.js";import{c as A,d as B}from"./
|
|
1
|
+
import{h as w}from"./2GXHYI23.js";import{c as A,d as B}from"./FN6XY6ET.js";import{a as g,c as v,d}from"./4CEV4FDG.js";import{ia as u}from"./HHYE42JG.js";import{h as y}from"./NWNYJ26T.js";import{a as c}from"./XSD5NL7J.js";import{erc20Abi as C}from"viem";async function I(a,n,o,l){if(!o.length)return[];let t=await a.multicall({allowFailure:!1,contracts:o.map(p=>({address:p,abi:C,functionName:"balanceOf",args:[n]})),blockNumber:l});if(!Array.isArray(t)||t.length!==o.length)throw new c("Borro share balances could not be read completely. Please try again.");return t.map(d)}async function T(a,n,o={}){v(n);let l=()=>{if(o.signal?.aborted)throw new c("Borro read was cancelled.")};l();let t=a.clientFor(4663),s=await(o.discoverVaults??A(a,o).discoverVaults)(t,{wallet:n,heldOnly:!0,...o.signal?{signal:o.signal}:{}});if(s.incomplete)throw new c("Borro discovery is incomplete, so these positions cannot be shown as complete. Please try again.");let h=s.shareBalances?.map(e=>e.vault)??[...new Set([...s.vaults.map(e=>e.vault),...s.refused.flatMap(e=>e.vault?[e.vault]:[])])],b=s.shareBalances?.map(e=>d(BigInt(e.amount)))??await I(t,n,h,BigInt(s.measuredAtBlock));l();let P=h.flatMap((e,i)=>b[i]>0n?[{vault:e,balance:b[i]}]:[]);return Promise.all(P.map(async({vault:e,balance:i})=>{let r=s.vaults.find(O=>y(O.vault,e));if(!r)throw new c("This wallet holds Borro shares whose vault could not be verified. Check the vault address before withdrawing.");let m=d(await t.readContract({address:e,abi:g,functionName:"convertToAssets",args:[i],blockNumber:BigInt(s.measuredAtBlock)}));l();let k={address:e,symbol:r.vaultSymbol,decimals:18,chainId:4663},f={address:r.asset,symbol:r.symbol,decimals:r.assetDecimals,chainId:4663};return{module:"borro",id:`4663:${e}`,chainId:4663,assets:[B(k,i)],oakNotice:u(),economics:{principal:m===0n?[]:[w("redeemable",{token:f,amount:m.toString(),source:"borro.convertToAssets",heldAs:e,measuredAtBlock:s.measuredAtBlock})],debt:[],rewards:[],backing:[],coverage:{complete:!0}},description:`${a.formatAmount(i.toString(),18)} ${r.vaultSymbol} = about ${a.formatAmount(m.toString(),r.assetDecimals)} ${f.symbol} lent through Borro. ${u()}`}}))}export{I as a,T as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Y}from"./N6YNJGEF.js";import{c as X}from"./7GL547YZ.js";import{a as T}from"./RKS3M7L5.js";import{b as Z,c as $,d as z,e as J,g as K,h as v,j as n,k as S,l as G,m as M,o as a,p as t,q as l,r as p,s as y,v as W}from"./UMY6SP7C.js";import{b as s,h as _,i as D,j as N,k as U}from"./CJMVRV34.js";import{a as d}from"./XSD5NL7J.js";import{getAddress as i}from"viem";async function te(e,u,x,o=[],c=X){let r=await N(e,x);await D(e,r.number,[s.launcherV1,l,s.rulesV1]);let k=i(s.launcherV1),[b,B,F,L,O,R,q,I,C,V,g,m,w]=await Promise.all([Y(e,r.number,u,o,c),t(e,k,z,"launchFee",[],r.number),t(e,p,a("registry"),"rootOpenFor",[l,u],r.number),t(e,p,a("registry"),"newMarketsPaused",[],r.number),t(e,p,a("registry"),"isLauncher",[k],r.number),t(e,l,a("rootV1"),"poolManager",[],r.number),t(e,k,a("launcherV1"),"poolManager",[],r.number),t(e,k,a("launcherV1"),"registry",[],r.number),t(e,i(s.rulesV1),a("rulesV1"),"trustedRoot",[],r.number),t(e,i(s.rulesV1),a("rulesV1"),"poolManager",[],r.number),t(e,p,a("registry"),"admission",[l,i(s.rulesV1)],r.number),t(e,i(s.rulesV1),a("rulesV1"),"configSchemaHash",[],r.number),t(e,p,a("registry"),"quoteAssets",[],r.number)]);if(R!==y||q!==y||I!==p||C!==l||V!==y)throw new d("Hookr launch dependency wiring differs from the reviewed deployment.");v(m);let h=M(g),f=M(h.caps);if(h.implementation!==i(s.rulesV1)||n(h.kind,8)!==0n||h.codeHash!==_(s.rulesV1).codeHash||h.schemaHash!==m||n(h.gasLimit,32)===0n||n(f.maxLpFeePips,24)>600000n||n(f.maxQuoteTakePips,24)>=1000000n||n(f.maxSubjectTakeBps,16)>1000n)throw new d("Hookr core admission, schema or caps differ from the supported launch profile.");if(!Array.isArray(w)||w.length>32)throw new d("Hookr qualified quote list is incomplete or exceeds the bounded read.");let P=[];for(let H=0;H<w.length;H+=2)P.push(...await Promise.all(w.slice(H,H+2).map(oe=>W(e,i(String(oe)),r.number))));let ee=await W(e,i("0x0000000000000000000000000000000000000000"),r.number),A=G(B,5),re={token:ee,amount:n(A[0]).toString(),currency:"ETH",decimals:18,treasury:i(String(A[1])),pendingAmount:n(A[2]).toString(),pendingTreasury:i(String(A[3])),readyAt:n(A[4]).toString()},j=S(F),E=S(L),Q=S(O);return await U(e,r),{chainId:4663,blockNumber:r.number.toString(),blockHash:r.hash,timestamp:r.timestamp.toString(),version:"hookr-launcher-v1",launcher:k,root:l,core:i(s.rulesV1),poolManager:y,permissionMask:"0x2acc",launchFee:re,qualifiedQuotes:P,coreAdmission:{schemaHash:m,gasLimit:n(h.gasLimit,32).toString(),caps:{maxLpFeePips:n(f.maxLpFeePips,24).toString(),maxQuoteTakePips:n(f.maxQuoteTakePips,24).toString(),maxSubjectTakeBps:n(f.maxSubjectTakeBps,16).toString()}},gate:b,rootOpenForWallet:j,newMarketsPaused:E,launcherAdmitted:Q,launchAvailable:j&&!E&&Q&&b.healthyIdentityOnly&&b.walletAgent,scoreLaunchAvailable:j&&!E&&Q&&b.healthyForScores&&b.walletAgent,supportedSettings:{route:"launchAdvised",members:"1",tokenKinds:["new"],reservedTokenKinds:["existing"],tickSpacing:String(T.tickSpacing),baseLpFeePips:String(T.baseLpFeePips),deadlineSecondsMax:T.deadlineSeconds.toString(),guardEndBlock:"Explicit parent-block end through Anti-Snipe; default 0",burnBps:"0 to 1000 through Auto Burn",royaltyBps:"0",integrator:null,nameMaxUtf8Bytes:"48",symbolMaxUtf8Bytes:"12",supplyMaxBaseUnits:((1n<<108n)-1n).toString(),liquidityMax:((1n<<127n)-1n).toString(),fee:"8388608",tickSpacingMin:"1",tickSpacingMax:"32767",tickMin:"-887272",tickMax:"887272",requiresTickAlignment:!0,gateRequired:!0,gatePhases:"1",gateFailOpen:!1,arbitraryAdvisories:!1,devBuy:!1,locks:"Anti-Snipe guard only",hookBlocks:"Live list with verified field codecs; other blocks refused",minAgeSecondsRequired:!0,minAgeSecondsMax:"2592000",arbRecaptureDefault:!0,ownedRoot:!1,lpRewardsBpsMax:"1000",lpRewardsPlusBurnBpsMax:"1000",totalLpFeePipsMax:"600000",protocolShareBpsMin:"2000",protocolShareBpsMax:"5000",existingTokenFunding:"requires a separately qualified token route"},readStatus:"complete",warnings:["Read-only admission snapshot. hookr_launch supports one new-token agents-only pool; verified core Hook Blocks are optional, add/collect/remove require separate tools.","Oak identity linking alone does not establish on-chain Hookr gate eligibility.",b.reviewerSetsNotice]}}function pe(e){return[{name:"hookr_launch_options",inputSchema:{type:"object",additionalProperties:!1,properties:{...$,launchProfile:{type:"string",enum:["agents-only","open"],description:"Open uses exactly one advisory Hook Block and no agent identity gate."},reviewerSetIds:{type:"array",maxItems:8,uniqueItems:!0,items:Z,description:"Existing registered reviewer set IDs to inspect; no alias or arbitrary reviewer address."}}},execute:async(u,x)=>{if(J(u,["blockNumber","reviewerSetIds","launchProfile"]),u.launchProfile!==void 0&&u.launchProfile!=="agents-only"&&u.launchProfile!=="open")throw new d("Choose launchProfile agents-only or open.");if(e.network==="testnet")throw new d("Hookr launch reads are configured only on mainnet, chain 4663.");let o=u.reviewerSetIds??[];if(!Array.isArray(o)||o.length>8||new Set(o).size!==o.length)throw new d("Provide at most eight distinct reviewer set IDs.");let c=o.map(v);if(new Set(c).size!==c.length)throw new d("Provide distinct reviewer set IDs.");if(u.launchProfile==="open"){if(c.length)throw new d("An open launch does not use reviewer sets.");return ne(e.clientFor(4663),x,K(u))}try{return await te(e.clientFor(4663),x,K(u),c)}catch(r){throw r instanceof d?r:new d("Hookr launch settings are unavailable at the named block. Retry the complete read; no zero fee or healthy gate is implied.")}}}]}async function ne(e,u,x){let o=await N(e,x);await D(e,o.number,[s.launcherV1,l,s.rulesV1]);let c=i(s.launcherV1),r=i(s.rulesV1),[k,b,B,F,L,O,R,q,I,C,V]=await Promise.all([t(e,c,z,"launchFee",[],o.number),t(e,p,a("registry"),"rootOpenFor",[l,u],o.number),t(e,p,a("registry"),"newMarketsPaused",[],o.number),t(e,p,a("registry"),"isLauncher",[c],o.number),t(e,l,a("rootV1"),"poolManager",[],o.number),t(e,c,a("launcherV1"),"poolManager",[],o.number),t(e,c,a("launcherV1"),"registry",[],o.number),t(e,r,a("rulesV1"),"trustedRoot",[],o.number),t(e,r,a("rulesV1"),"poolManager",[],o.number),t(e,p,a("registry"),"admission",[l,r],o.number),t(e,r,a("rulesV1"),"configSchemaHash",[],o.number)]),g=M(C),m=M(g.caps);if(L!==y||O!==y||R!==p||q!==l||I!==y||g.implementation!==r||n(g.kind,8)!==0n||g.codeHash!==_(r).codeHash||g.schemaHash!==v(V)||n(g.gasLimit,32)===0n||n(m.maxLpFeePips,24)>600000n||n(m.maxQuoteTakePips,24)>=1000000n||n(m.maxSubjectTakeBps,16)>1000n)throw new d("Hookr open-launch dependency wiring or core admission differs from the reviewed profile.");let w=G(k,5),h=S(b),f=S(B),P=S(F);return await U(e,o),{chainId:4663,blockNumber:o.number.toString(),blockHash:o.hash,timestamp:o.timestamp.toString(),launcher:c,root:l,core:r,poolManager:y,launchProfile:"open",launchFee:{amount:n(w[0]).toString(),treasury:i(String(w[1]))},coreAdmission:{schemaHash:v(V),gasLimit:n(g.gasLimit,32).toString(),caps:{maxLpFeePips:n(m.maxLpFeePips,24).toString(),maxQuoteTakePips:n(m.maxQuoteTakePips,24).toString(),maxSubjectTakeBps:n(m.maxSubjectTakeBps,16).toString()}},rootOpenForWallet:h,newMarketsPaused:f,launcherAdmitted:P,launchAvailable:h&&!f&&P,supportedSettings:{gateRequired:!1,advisoryRequired:!0,advisoryCount:1,advisoryFailOpen:!1,tokenKinds:["new"],tickSpacing:200,baseLpFeePips:3e3},readStatus:"complete",warnings:["Admission snapshot only. The selected advisory, its terms, dependencies and full cap reservation must pass the same-block launch profile validator.","Zap Target admits buys only from its frozen feeder vaults; an open profile removes the agent identity requirement."]}}export{te as a,pe as b,ne as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./XSD5NL7J.js";var m="https://hookr.fun/api/mcp",g=4e3,_=5e3,y=1048576;function i(e){if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Invalid Hookr object");return e}function p(e,n=0){if(n>32)throw new Error("Hookr response nesting exceeds limit");if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"&&Number.isFinite(e))return;if(Array.isArray(e)){e.forEach(r=>p(r,n+1));return}let o=i(e);for(let[r,t]of Object.entries(o)){if(["__proto__","constructor","prototype"].includes(r))throw new Error("Unsafe Hookr key");p(t,n+1)}}async function H(e){let n=e.headers.get("content-length");if(n!==null&&(!/^\d+$/.test(n)||Number(n)>y))throw new Error("Hookr response too large");if(!e.body)throw new Error("Hookr response body missing");let o=e.body.getReader(),r=[],t=0;try{for(;;){let{done:u,value:l}=await o.read();if(u)break;if(t+=l.byteLength,t>y)throw new Error("Hookr response too large");r.push(l)}}finally{o.cancel().catch(()=>{}),o.releaseLock()}let s=new Uint8Array(t),c=0;for(let u of r)s.set(u,c),c+=u.byteLength;return new TextDecoder("utf-8",{fatal:!0}).decode(s)}async function b(e,n,o,r=!1,t=g){let s=new AbortController,c,u=new Promise((l,f)=>{c=setTimeout(()=>{s.abort(),f(new Error("Hookr request timed out"))},t)});try{return await Promise.race([u,(async()=>{let l=await e.http(n,{...o,redirect:"error",signal:s.signal});if(!l.ok||l.redirected)throw new Error("Hookr HTTP unavailable");let f=await H(l);if(r){if(!l.headers.get("content-type")?.startsWith("image/svg+xml")||!f.trim())throw new Error("Invalid Hookr mark");return null}let w=JSON.parse(f);return p(w),w})()])}finally{c!==void 0&&clearTimeout(c)}}function E(e,n){let o=i(n);if(o.status==="unavailable"||o.error!==void 0||Object.keys(o).length===0)throw new Error("Hookr data unavailable");if(e.startsWith("hookr_build_")){if(!["ok","refused","needs_approval"].includes(String(o.status))||!Array.isArray(o.calls)||o.calls.length>16)throw new Error("Invalid Hookr build result");if(o.status==="refused"&&(typeof o.reason!="string"||o.calls.length!==0))throw new Error("Invalid Hookr refusal");for(let r of o.calls){let t=i(r);if(t.chainId!==4663||!a(t.to)||typeof t.data!="string"||!/^0x(?:[\da-fA-F]{2})*$/.test(t.data)||!k(t.value)||t.gas!==void 0&&t.gas!==null&&!k(t.gas))throw new Error("Invalid Hookr call")}}if(e==="hookr_pools"&&(!Array.isArray(o.pools)||o.pools.length>50||o.nextCursor!==null&&o.nextCursor!==void 0&&(typeof o.nextCursor!="string"||!/^\d{1,6}$/.test(o.nextCursor))))throw new Error("Invalid Hookr pool page");if(e==="hookr_pools")for(let r of o.pools)h(r,!0);if(e==="hookr_pool"&&h(o.listing,!1),e==="hookr_release"){let r=i(o.contracts);if(o.status!=="verified"||o.chainId!==4663||!k(o.blockNumber)||["root","router","quoter","registry","poolManager"].some(t=>!a(r[t]))||Object.values(r).some(t=>!a(t)))throw new Error("Invalid Hookr release")}if(e==="hookr_open_orders"||e==="hookr_revenue_tokens"){let r=o[e==="hookr_open_orders"?"orders":"tokens"];if(o.status!=="ready"||!Array.isArray(r)||r.length>50||o.nextCursor!==null&&(typeof o.nextCursor!="string"||!(e==="hookr_open_orders"?/^[1-9][0-9]{0,19}$/:/^(v1|v1:[1-9][0-9]{0,19}|v2:[1-9][0-9]{0,19})$/).test(o.nextCursor)))throw new Error("Invalid Hookr directory page");if(e==="hookr_revenue_tokens"){for(let t of r)if(!a(i(t).address))throw new Error("Invalid Hookr revenue candidate")}}if(e==="hookr_scan"){let r=o.score===null||o.score===void 0?null:i(o.score);if(!a(o.address)||typeof o.verdict!="string"||!["not-a-hook","code-unavailable","review-signals","screened-with-limits"].includes(o.verdict)||r!==null&&(typeof r.score!="number"||!Number.isInteger(r.score)||r.score<0||r.score>100)||!Array.isArray(o.findings))throw new Error("Invalid Hookr scan")}return o}function a(e){return typeof e=="string"&&/^0x[\da-fA-F]{40}$/.test(e)}function k(e){return typeof e=="string"&&/^(0|[1-9][0-9]{0,77})$/.test(e)&&BigInt(e)<1n<<256n}function h(e,n){let o=i(e),r=i(o.key);if((n||o.poolId!==void 0)&&(typeof o.poolId!="string"||!/^0x[\da-fA-F]{64}$/.test(o.poolId))||!a(r.currency0)||!a(r.currency1)||!a(r.hooks)||typeof r.fee!="number"||!Number.isInteger(r.fee)||r.fee<0||r.fee>16777215||typeof r.tickSpacing!="number"||!Number.isInteger(r.tickSpacing)||r.tickSpacing<=0||r.tickSpacing>8388607)throw new Error("Invalid Hookr pool");for(let t of[o.token,o.quote]){let s=i(t);if(!a(s.address)||typeof s.symbol!="string"||!s.symbol.trim()||typeof s.decimals!="number"||!Number.isInteger(s.decimals)||s.decimals<0||s.decimals>255)throw new Error("Invalid Hookr token")}}async function x(e,n,o){try{if(!/^hookr_[a-z_]+$/.test(n))throw new Error("Invalid Hookr tool");let r=i(await b(e,m,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"tools/call",params:{name:n,arguments:o}})},!1,n==="hookr_scan"?_:g));if(r.jsonrpc!=="2.0"||r.id!==1||r.error!==void 0)throw new Error("Hookr RPC failure");let t=i(r.result);if(t.isError!==void 0&&t.isError!==!1)throw new Error("Hookr tool failure");return E(n,t.structuredContent)}catch{throw new d(`Hookr ${n} read is unavailable. Retry later; unavailable data is not an empty result.`)}}async function I(e,n,o=!1){try{if(!/^\/api\/(?:hooks\/catalog|protocol-stats|pool-apr|revenue-tokens(?:\/income|\/0x[\da-fA-F]{40}\/(?:doors|mark))?)$/.test(n))throw new Error("Unknown Hookr resource");let r=await b(e,`https://hookr.fun${n}`,{method:"GET"},o);if(o)return null;if(!r||typeof r!="object"||"error"in r||"status"in r&&r.status==="unavailable")throw new Error("Hookr resource unavailable");return r}catch{throw new d("Hookr public resource is unavailable. Retry later; no empty or zero result is implied.")}}export{m as a,g as b,_ as c,y as d,i as e,E as f,x as g,I as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Te}from"./JFWJBZ7M.js";import{c as Se}from"./DXAPKN7H.js";import{a as qe,b as me,c as De}from"./Z3IBPCY4.js";import{h as Re,i as t,j as A,k as d,l as Ce,m as J,n as k,o as ue,p as F,r as O,s as c,t as ce,u as le,v as pe,w as Ae,x as $e}from"./Y64GFBTA.js";import{a as ve,o as de}from"./GYPMUYB5.js";import{a as ke}from"./66F5ZH34.js";import{c as re,e as z,g as M}from"./NWNYJ26T.js";import{b as l,j as be}from"./TI727O2H.js";import{a as m}from"./XSD5NL7J.js";import{decodeFunctionData as Ue,erc20Abi as Me}from"viem";var K="0x0000000000000000000000000000000000000000",_=be[l].relay.depository.address.toLowerCase(),xe=30;function Fe(y){return/HTTP (400|401|403)\b|API key|\bhosted\b|authenticated wallet session/i.test(y)}var Ke=y=>{let L=$e(y);async function he(i){let e;try{e=await L(`/intents/status/v3?requestId=${encodeURIComponent(i)}`)}catch(D){if(y.plainError(D)!=="The request timed out. Please try again.")throw D;return{requestId:i,status:"unknown",timedOut:!0,fulfilled:!1,settled:!1,pollAgain:!0,needsAttention:!1,inTxHashes:[],txHashes:[],originChainId:void 0,destinationChainId:void 0,summary:"The status request timed out. Bridge settlement is unknown; poll again."}}if(typeof e.status!="string")throw new m("Relay returned an invalid bridge status.");let n=ce(e.inTxHashes),h=ce(e.txHashes),r=e.originChainId===void 0?void 0:J(e.originChainId),u=e.destinationChainId===void 0?void 0:J(e.destinationChainId),o=le(e.failReason),I=le(e.refundFailReason),s=e.status==="success"&&h.length>0&&u!==void 0,p=e.status==="refund"&&h.length>0&&r!==void 0,$=e.status==="failure"&&I!==void 0,f=["waiting","depositing","pending","submitted","failure","refund","success"].includes(e.status)?e.status==="failure"&&/TIMEOUT|EXPIRED/.test(typeof e.failReason=="string"?e.failReason:"")?"timeout":e.status:"unknown",q=s?"Relay reports destination fulfillment.":p?"Relay reports a refund on the origin chain; the destination was not fulfilled.":$?"The bridge failed and automatic refund is unavailable. Review the request with Relay.":"Bridge settlement is not confirmed. Poll Relay again; an origin receipt alone does not prove destination fulfillment.";return{requestId:i,status:f,relayStatus:e.status,fulfilled:s,settled:s||p,pollAgain:!s&&!p&&!$,needsAttention:$,timedOut:!1,inTxHashes:n,txHashes:h,originChainId:r,destinationChainId:u,failReason:o,refundFailReason:I,...e.updatedAt===void 0?{}:{updatedAt:k(String(e.updatedAt))},summary:q}}async function Ee(i,e){let n=o=>({destinationVerified:!1,destinationCheck:o}),h;try{if(h=y.clientFor(i),await h.getChainId()!==i)return n(`The configured RPC does not serve chain ${i}; destination receipts were not checked.`)}catch{return n(`No RPC is available for chain ${i}; destination receipts were not checked.`)}let r=[];for(let o of e)try{let I=await h.getTransactionReceipt({hash:o});r.push({hash:o,status:I.status,blockNumber:I.blockNumber.toString()})}catch{return{...n(`Receipt ${o} is not available on chain ${i} yet; poll again.`),destinationReceipts:r}}let u=r.length>0&&r.every(o=>o.status==="success");return{destinationVerified:u,destinationReceipts:r,destinationCheck:u?`Every Relay destination transaction has a successful receipt on chain ${i}. Amounts are not decoded here; compare the recipient balance for the exact delivered amount.`:`A Relay destination transaction did not succeed on chain ${i}; do not treat this bridge as delivered.`}}async function Pe(i){let e=await y.clientFor(l).readContract({address:i,abi:Me,functionName:"decimals"}),n=typeof e=="bigint"?Number(e):e;if(typeof n!="number"||!Number.isInteger(n)||n<0||n>255)throw new m("Could not read valid ERC-20 decimals() on-chain.");return n}async function Oe(i,e){let n=d(e),h=d(i.recipient??n),r=J(i.destinationChainId);if(r===l)throw new m("Choose a destination chain other than 4663.");let u=Ce(i.originCurrency??K),o=u!==K,I=d(i.destinationCurrency??K),s=k(i.amount);if(s==="0")throw new m("Provide a positive bridge amount.");let p=i.minAmountOut===void 0?void 0:k(i.minAmountOut),$=i.slippageBps??me;if(typeof $!="number")throw new m("Slippage must be an integer from 0 to 9999 bps.");de("0",$);let v=A((await L("/chains")).chains).map(t),f=v.find(a=>a.id===l),q=v.find(a=>a.id===r);if(!f||!q||f.disabled!==!1||q.disabled!==!1||f.depositEnabled!==!0||f.vmType!=="evm"||q.vmType!=="evm")throw new m("Relay does not currently support this outbound chain route.");if(!Se(r))throw new m(`Relay has no supported Oak return path from chain ${r}. Choose a destination supported by relay_bridge_in before bridge-out.`);let D=await qe(y.clientFor,r,n,"server"),H=o?await Pe(u):18,b=Math.floor(Date.now()/1e3)+ve,R=await L("/quote/v2",{user:n,recipient:h,originChainId:l,destinationChainId:r,originCurrency:u,destinationCurrency:I,amount:s,tradeType:"EXACT_INPUT",...o?{explicitDeposit:!0}:{}}),C=F(R.requestId),x=t(R.details),N=O(x.currencyIn),g=O(x.currencyOut),S={token:g.token,amount:k(t(x.currencyOut).minimumAmount)};if(c(d(x.sender)===n&&d(x.recipient)===h&&N.token.chainId===l&&N.token.address===u&&N.token.decimals===H&&N.amount===s&&g.token.chainId===r&&g.token.address===I&&BigInt(S.amount)>0n&&BigInt(S.amount)<=BigInt(g.amount)),I===K&&c(g.token.decimals===t(q.currency).decimals),p!==void 0){if(S.amount!==p)throw new m("Relay order minimum must exactly match minAmountOut. Request a new quote.")}else if(BigInt(S.amount)<BigInt(de(g.amount,$)))throw De(g.amount,S.amount);let Z=t(t(R.protocol).v2),G=F(Z.orderId),j=t(Z.orderData),V=t(j.output),ee=ue(V.deadline),X=A(j.inputs).map(t);c(X.length>0);let te=X.flatMap(a=>{let w=A(a.refunds).map(t);return c(w.length>0),w.map(Ie=>{if(d(Ie.recipient)!==n)throw new m("Relay refund recipient does not match the agent wallet. Request a new quote.");return ue(Ie.deadline)})}),_e=te.reduce((a,w)=>Math.min(a,w),ee),ne=Math.min(b,_e-xe),fe=()=>{if(Date.now()/1e3>=ne)throw new m("The Relay quote expired or its order/refund deadline leaves too little time to sign and send. Request a fresh bridge quote.")};fe();let B=A(V.payments).map(t),ie=t(t(f.protocol).v2),He=t(t(q.protocol).v2),Y=t(Z.paymentDetails);c(V.chainId===He.chainId&&B.length===1&&A(V.calls).length===0&&d(B[0].recipient)===h&&d(B[0].currency)===I&&k(B[0].minimumAmount)===S.amount&&k(B[0].expectedAmount)===g.amount&&Y.chainId===ie.chainId&&d(Y.currency)===u&&k(Y.amount)===s),c(d(Y.depository)===_&&d(ie.depository)===_);let oe=t(X[0].payment);c(X.length===1&&oe.chainId===ie.chainId&&d(oe.currency)===u&&k(oe.amount)===s);let U=A(R.steps).map(t),P=o&&U.length===2?U[0]:void 0;c(U.length===(P?2:1));let Q=U[U.length-1];c(Q.kind==="transaction"&&Q.id==="deposit"&&Q.requestId===C);let W=A(Q.items).map(t);c(W.length===1&&W[0].status==="incomplete");let T=t(W[0].data),ye=t(W[0].check);if(c(ye.method==="GET"&&ye.endpoint===`/intents/status/v3?requestId=${C}`&&T.chainId===l&&d(T.from)===n&&d(T.to)===_&&k(T.value)===(o?"0":s)),typeof T.data!="string"||!(o?/^0x[0-9a-fA-F]{264}$/:/^0x[0-9a-fA-F]{136}$/).test(T.data))throw new m(`Relay returned unexpected ${o?"ERC-20":"native"} deposit calldata.`);let E=Ue({abi:Re,data:T.data});E.functionName==="depositErc20"?c(o&&d(E.args[0])===n&&d(E.args[1])===u&&E.args[2]===BigInt(s)&&M(E.args[3],G)):c(!o&&d(E.args[0])===n&&M(E.args[1],G));let Ne=v.filter(a=>a.vmType==="evm"&&z(a.protocol)&&z(a.protocol.v2)).map(a=>t(t(a.protocol).v2).chainId).filter(a=>typeof a=="string");if(!M(Te(j,Ne),G))throw new m("Relay order ID does not match the checked quote terms. Request a new quote.");let ae=o?y.approval(u,_,s,l):void 0;if(P&&ae){c(P.kind==="transaction"&&P.id==="approve"&&P.requestId===C);let a=A(P.items).map(t);c(a.length===1&&a[0].status==="incomplete");let w=t(a[0].data);c(w.chainId===l&&d(w.from)===n&&d(w.to)===u&&k(w.value)==="0"&&typeof w.data=="string"&&M(w.data,ae.data))}let ge=[...ae?await Ae(y,u,_,s,l,n):[],y.unsignedTx({to:_,data:T.data,value:o?"0":s,chainId:l,description:o?`Deposit ${s} base units of ${u} for Relay request ${C}.`:`Deposit native ETH for Relay request ${C}.`})],we=t(R.fees);for(let a of Object.values(we))O(a);let se=await y.preview(ge,n);fe();let Be=se.changes.map(a=>{let w=a.amount.startsWith("-");return`${w?"-":""}${y.formatAmount(w?a.amount.slice(1):a.amount,a.token.decimals)} ${a.token.symbol}`}).join(", ");return{txs:ge,requestId:C,orderId:G,orderData:structuredClone(j),recipient:h,originChainId:l,destinationChainId:r,expiresAt:String(ne),orderDeadline:String(ee),refundDeadlines:te.map(String),returnPath:D,amountIn:N,amountOut:g,minAmountOut:S,fees:we,expandedPriceImpact:x.expandedPriceImpact,timeEstimate:x.timeEstimate,preview:se,summary:`${D} Bridge to ${h} on chain ${r}; asset ${g.token.address} on chain ${g.token.chainId} (${pe(g.token.symbol)}); expected ${g.amount}, minimum ${S.amount} base units (${g.token.decimals} decimals). Order deadline ${ee} Unix seconds; refund deadlines ${te.join(", ")} Unix seconds; accept before ${ne} Unix seconds to reserve ${xe}s to sign and send. Origin preview: ${Be||se.summary}. Relay route fees are included in the quote; origin gas is separate. Poll relay_status with requestId ${C} after local submission; destination fulfillment is not yet confirmed.`}}return{tools:[{name:"relay_bridge_out",inputSchema:{type:"object",required:["destinationChainId","amount"],additionalProperties:!1,properties:{destinationChainId:{type:"integer",minimum:1,description:"Destination chain ID."},amount:{type:"string",pattern:"^[1-9][0-9]*$",description:'Origin token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).'},recipient:{...re,description:"Destination recipient address; defaults to your wallet."},originCurrency:{...re,description:"Origin token address; defaults to native ETH."},slippageBps:{type:"integer",minimum:0,maximum:9999,default:me,description:"Slippage in basis points (50 = 0.5%)."},destinationCurrency:{type:"string",description:"Destination token address; defaults to the destination chain\u2019s native token."},minAmountOut:ke('Minimum destination token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).')}},execute:async(i,e)=>{try{return await Oe(i,e)}catch(n){throw new m(y.plainError(n))}}},{name:"relay_status",inputSchema:{type:"object",required:["requestId"],additionalProperties:!1,properties:{requestId:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"Relay request ID as a 0x-prefixed 32-byte hex string."},verifyDestination:{type:"boolean",description:"Check destination transactions on their chain when fulfilled."}}},execute:async i=>{let e=await he(F(i.requestId));return i.verifyDestination!==!0||!e.fulfilled||e.destinationChainId===void 0?e:{...e,...await Ee(e.destinationChainId,e.txHashes)}}}],positions:async i=>{let e=d(i),n=new Map,h={module:"relay",id:"relay-discovery-unavailable",chainId:l,assets:[],incomplete:!0,description:`Relay pending bridge discovery is unavailable: it needs the hosted Relay read (Oak's server-held Relay key), which is not available in this setup; no pending bridges were checked, which is not the same as none pending. Ask the operator to enable it, or check a known request with relay_status {"requestId":"<id>"}. Legacy vault shares on other chains can be checked with relay_vault_status {"chainId":1} or {"chainId":42161}.`};for(let r of["outbound","inbound"]){let u=new Set,o;do{let I=new URLSearchParams({user:e,[r==="outbound"?"originChainId":"destinationChainId"]:String(l),limit:"100",includePendingRequests:"true"});o&&I.set("continuation",o);let s;try{s=await L(`/requests/v3?${I}`)}catch(p){if(Fe(y.plainError(p)))return[...n.values(),h];throw p}for(let p of A(s.requests).map(t)){let $=z(p.depositAddress)?p.depositAddress.depositor:void 0;if(![p.user,p.sender,$].some(C=>typeof C=="string"&&C.toLowerCase()===e))throw new m("Relay returned a request for another wallet.");let v=F(p.id);if(n.has(v))continue;let f=await he(v);if(f.settled)continue;let q=t(p.data),D=t(t(q.route).quoted),H=O(t(D.origin).inputCurrency),b={...H,token:{...H.token,symbol:pe(H.token.symbol)??"unknown"}},R=O(t(D.destination).outputCurrency);c(r==="outbound"?b.token.chainId===l&&R.token.chainId!==l:b.token.chainId!==l&&R.token.chainId===l),f.originChainId!==void 0&&c(f.originChainId===b.token.chainId),f.destinationChainId!==void 0&&c(f.destinationChainId===R.token.chainId),n.set(v,{module:"relay",id:v,chainId:b.token.chainId,assets:[b],description:`Relay ${r} ${f.status}: ${b.amount} ${b.token.symbol} base units (${b.token.decimals} decimals) from chain ${b.token.chainId} toward ${d(p.recipient)} on chain ${R.token.chainId}. ${f.summary} Track with relay_status requestId ${v}.`})}if(s.continuation!==void 0&&s.continuation!==null&&typeof s.continuation!="string")throw new m("Relay returned invalid pagination.");if(o=typeof s.continuation=="string"&&s.continuation?s.continuation:void 0,o){if(u.has(o))throw new m("Relay repeated its pagination cursor. Pending positions are incomplete.");u.add(o)}}while(o)}return[...n.values()]}}};export{Ke as a};
|
|
1
|
+
import{c as Se}from"./NLC36QHL.js";import{a as qe,b as me,c as De}from"./Z3IBPCY4.js";import{a as Te}from"./JFWJBZ7M.js";import{h as Re,i as t,j as A,k as d,l as Ce,m as J,n as k,o as ue,p as F,r as O,s as c,t as ce,u as le,v as pe,w as Ae,x as $e}from"./Y64GFBTA.js";import{a as ve,o as de}from"./TTBB6EFN.js";import{a as ke}from"./66F5ZH34.js";import{c as re,e as z,g as M}from"./NWNYJ26T.js";import{b as l,j as be}from"./EWZFZUVF.js";import{a as m}from"./XSD5NL7J.js";import{decodeFunctionData as Ue,erc20Abi as Me}from"viem";var K="0x0000000000000000000000000000000000000000",_=be[l].relay.depository.address.toLowerCase(),xe=30;function Fe(y){return/HTTP (400|401|403)\b|API key|\bhosted\b|authenticated wallet session/i.test(y)}var Ke=y=>{let L=$e(y);async function he(i){let e;try{e=await L(`/intents/status/v3?requestId=${encodeURIComponent(i)}`)}catch(D){if(y.plainError(D)!=="The request timed out. Please try again.")throw D;return{requestId:i,status:"unknown",timedOut:!0,fulfilled:!1,settled:!1,pollAgain:!0,needsAttention:!1,inTxHashes:[],txHashes:[],originChainId:void 0,destinationChainId:void 0,summary:"The status request timed out. Bridge settlement is unknown; poll again."}}if(typeof e.status!="string")throw new m("Relay returned an invalid bridge status.");let n=ce(e.inTxHashes),h=ce(e.txHashes),r=e.originChainId===void 0?void 0:J(e.originChainId),u=e.destinationChainId===void 0?void 0:J(e.destinationChainId),o=le(e.failReason),I=le(e.refundFailReason),s=e.status==="success"&&h.length>0&&u!==void 0,p=e.status==="refund"&&h.length>0&&r!==void 0,$=e.status==="failure"&&I!==void 0,f=["waiting","depositing","pending","submitted","failure","refund","success"].includes(e.status)?e.status==="failure"&&/TIMEOUT|EXPIRED/.test(typeof e.failReason=="string"?e.failReason:"")?"timeout":e.status:"unknown",q=s?"Relay reports destination fulfillment.":p?"Relay reports a refund on the origin chain; the destination was not fulfilled.":$?"The bridge failed and automatic refund is unavailable. Review the request with Relay.":"Bridge settlement is not confirmed. Poll Relay again; an origin receipt alone does not prove destination fulfillment.";return{requestId:i,status:f,relayStatus:e.status,fulfilled:s,settled:s||p,pollAgain:!s&&!p&&!$,needsAttention:$,timedOut:!1,inTxHashes:n,txHashes:h,originChainId:r,destinationChainId:u,failReason:o,refundFailReason:I,...e.updatedAt===void 0?{}:{updatedAt:k(String(e.updatedAt))},summary:q}}async function Ee(i,e){let n=o=>({destinationVerified:!1,destinationCheck:o}),h;try{if(h=y.clientFor(i),await h.getChainId()!==i)return n(`The configured RPC does not serve chain ${i}; destination receipts were not checked.`)}catch{return n(`No RPC is available for chain ${i}; destination receipts were not checked.`)}let r=[];for(let o of e)try{let I=await h.getTransactionReceipt({hash:o});r.push({hash:o,status:I.status,blockNumber:I.blockNumber.toString()})}catch{return{...n(`Receipt ${o} is not available on chain ${i} yet; poll again.`),destinationReceipts:r}}let u=r.length>0&&r.every(o=>o.status==="success");return{destinationVerified:u,destinationReceipts:r,destinationCheck:u?`Every Relay destination transaction has a successful receipt on chain ${i}. Amounts are not decoded here; compare the recipient balance for the exact delivered amount.`:`A Relay destination transaction did not succeed on chain ${i}; do not treat this bridge as delivered.`}}async function Pe(i){let e=await y.clientFor(l).readContract({address:i,abi:Me,functionName:"decimals"}),n=typeof e=="bigint"?Number(e):e;if(typeof n!="number"||!Number.isInteger(n)||n<0||n>255)throw new m("Could not read valid ERC-20 decimals() on-chain.");return n}async function Oe(i,e){let n=d(e),h=d(i.recipient??n),r=J(i.destinationChainId);if(r===l)throw new m("Choose a destination chain other than 4663.");let u=Ce(i.originCurrency??K),o=u!==K,I=d(i.destinationCurrency??K),s=k(i.amount);if(s==="0")throw new m("Provide a positive bridge amount.");let p=i.minAmountOut===void 0?void 0:k(i.minAmountOut),$=i.slippageBps??me;if(typeof $!="number")throw new m("Slippage must be an integer from 0 to 9999 bps.");de("0",$);let v=A((await L("/chains")).chains).map(t),f=v.find(a=>a.id===l),q=v.find(a=>a.id===r);if(!f||!q||f.disabled!==!1||q.disabled!==!1||f.depositEnabled!==!0||f.vmType!=="evm"||q.vmType!=="evm")throw new m("Relay does not currently support this outbound chain route.");if(!Se(r))throw new m(`Relay has no supported Oak return path from chain ${r}. Choose a destination supported by relay_bridge_in before bridge-out.`);let D=await qe(y.clientFor,r,n,"server"),H=o?await Pe(u):18,b=Math.floor(Date.now()/1e3)+ve,R=await L("/quote/v2",{user:n,recipient:h,originChainId:l,destinationChainId:r,originCurrency:u,destinationCurrency:I,amount:s,tradeType:"EXACT_INPUT",...o?{explicitDeposit:!0}:{}}),C=F(R.requestId),x=t(R.details),N=O(x.currencyIn),g=O(x.currencyOut),S={token:g.token,amount:k(t(x.currencyOut).minimumAmount)};if(c(d(x.sender)===n&&d(x.recipient)===h&&N.token.chainId===l&&N.token.address===u&&N.token.decimals===H&&N.amount===s&&g.token.chainId===r&&g.token.address===I&&BigInt(S.amount)>0n&&BigInt(S.amount)<=BigInt(g.amount)),I===K&&c(g.token.decimals===t(q.currency).decimals),p!==void 0){if(S.amount!==p)throw new m("Relay order minimum must exactly match minAmountOut. Request a new quote.")}else if(BigInt(S.amount)<BigInt(de(g.amount,$)))throw De(g.amount,S.amount);let Z=t(t(R.protocol).v2),G=F(Z.orderId),j=t(Z.orderData),V=t(j.output),ee=ue(V.deadline),X=A(j.inputs).map(t);c(X.length>0);let te=X.flatMap(a=>{let w=A(a.refunds).map(t);return c(w.length>0),w.map(Ie=>{if(d(Ie.recipient)!==n)throw new m("Relay refund recipient does not match the agent wallet. Request a new quote.");return ue(Ie.deadline)})}),_e=te.reduce((a,w)=>Math.min(a,w),ee),ne=Math.min(b,_e-xe),fe=()=>{if(Date.now()/1e3>=ne)throw new m("The Relay quote expired or its order/refund deadline leaves too little time to sign and send. Request a fresh bridge quote.")};fe();let B=A(V.payments).map(t),ie=t(t(f.protocol).v2),He=t(t(q.protocol).v2),Y=t(Z.paymentDetails);c(V.chainId===He.chainId&&B.length===1&&A(V.calls).length===0&&d(B[0].recipient)===h&&d(B[0].currency)===I&&k(B[0].minimumAmount)===S.amount&&k(B[0].expectedAmount)===g.amount&&Y.chainId===ie.chainId&&d(Y.currency)===u&&k(Y.amount)===s),c(d(Y.depository)===_&&d(ie.depository)===_);let oe=t(X[0].payment);c(X.length===1&&oe.chainId===ie.chainId&&d(oe.currency)===u&&k(oe.amount)===s);let U=A(R.steps).map(t),P=o&&U.length===2?U[0]:void 0;c(U.length===(P?2:1));let Q=U[U.length-1];c(Q.kind==="transaction"&&Q.id==="deposit"&&Q.requestId===C);let W=A(Q.items).map(t);c(W.length===1&&W[0].status==="incomplete");let T=t(W[0].data),ye=t(W[0].check);if(c(ye.method==="GET"&&ye.endpoint===`/intents/status/v3?requestId=${C}`&&T.chainId===l&&d(T.from)===n&&d(T.to)===_&&k(T.value)===(o?"0":s)),typeof T.data!="string"||!(o?/^0x[0-9a-fA-F]{264}$/:/^0x[0-9a-fA-F]{136}$/).test(T.data))throw new m(`Relay returned unexpected ${o?"ERC-20":"native"} deposit calldata.`);let E=Ue({abi:Re,data:T.data});E.functionName==="depositErc20"?c(o&&d(E.args[0])===n&&d(E.args[1])===u&&E.args[2]===BigInt(s)&&M(E.args[3],G)):c(!o&&d(E.args[0])===n&&M(E.args[1],G));let Ne=v.filter(a=>a.vmType==="evm"&&z(a.protocol)&&z(a.protocol.v2)).map(a=>t(t(a.protocol).v2).chainId).filter(a=>typeof a=="string");if(!M(Te(j,Ne),G))throw new m("Relay order ID does not match the checked quote terms. Request a new quote.");let ae=o?y.approval(u,_,s,l):void 0;if(P&&ae){c(P.kind==="transaction"&&P.id==="approve"&&P.requestId===C);let a=A(P.items).map(t);c(a.length===1&&a[0].status==="incomplete");let w=t(a[0].data);c(w.chainId===l&&d(w.from)===n&&d(w.to)===u&&k(w.value)==="0"&&typeof w.data=="string"&&M(w.data,ae.data))}let ge=[...ae?await Ae(y,u,_,s,l,n):[],y.unsignedTx({to:_,data:T.data,value:o?"0":s,chainId:l,description:o?`Deposit ${s} base units of ${u} for Relay request ${C}.`:`Deposit native ETH for Relay request ${C}.`})],we=t(R.fees);for(let a of Object.values(we))O(a);let se=await y.preview(ge,n);fe();let Be=se.changes.map(a=>{let w=a.amount.startsWith("-");return`${w?"-":""}${y.formatAmount(w?a.amount.slice(1):a.amount,a.token.decimals)} ${a.token.symbol}`}).join(", ");return{txs:ge,requestId:C,orderId:G,orderData:structuredClone(j),recipient:h,originChainId:l,destinationChainId:r,expiresAt:String(ne),orderDeadline:String(ee),refundDeadlines:te.map(String),returnPath:D,amountIn:N,amountOut:g,minAmountOut:S,fees:we,expandedPriceImpact:x.expandedPriceImpact,timeEstimate:x.timeEstimate,preview:se,summary:`${D} Bridge to ${h} on chain ${r}; asset ${g.token.address} on chain ${g.token.chainId} (${pe(g.token.symbol)}); expected ${g.amount}, minimum ${S.amount} base units (${g.token.decimals} decimals). Order deadline ${ee} Unix seconds; refund deadlines ${te.join(", ")} Unix seconds; accept before ${ne} Unix seconds to reserve ${xe}s to sign and send. Origin preview: ${Be||se.summary}. Relay route fees are included in the quote; origin gas is separate. Poll relay_status with requestId ${C} after local submission; destination fulfillment is not yet confirmed.`}}return{tools:[{name:"relay_bridge_out",inputSchema:{type:"object",required:["destinationChainId","amount"],additionalProperties:!1,properties:{destinationChainId:{type:"integer",minimum:1,description:"Destination chain ID."},amount:{type:"string",pattern:"^[1-9][0-9]*$",description:'Origin token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).'},recipient:{...re,description:"Destination recipient address; defaults to your wallet."},originCurrency:{...re,description:"Origin token address; defaults to native ETH."},slippageBps:{type:"integer",minimum:0,maximum:9999,default:me,description:"Slippage in basis points (50 = 0.5%)."},destinationCurrency:{type:"string",description:"Destination token address; defaults to the destination chain\u2019s native token."},minAmountOut:ke('Minimum destination token amount in base units using its decimals (USDG has 6: "1000000" = 1 USDG).')}},execute:async(i,e)=>{try{return await Oe(i,e)}catch(n){throw new m(y.plainError(n))}}},{name:"relay_status",inputSchema:{type:"object",required:["requestId"],additionalProperties:!1,properties:{requestId:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"Relay request ID as a 0x-prefixed 32-byte hex string."},verifyDestination:{type:"boolean",description:"Check destination transactions on their chain when fulfilled."}}},execute:async i=>{let e=await he(F(i.requestId));return i.verifyDestination!==!0||!e.fulfilled||e.destinationChainId===void 0?e:{...e,...await Ee(e.destinationChainId,e.txHashes)}}}],positions:async i=>{let e=d(i),n=new Map,h={module:"relay",id:"relay-discovery-unavailable",chainId:l,assets:[],incomplete:!0,description:`Relay pending bridge discovery is unavailable: it needs the hosted Relay read (Oak's server-held Relay key), which is not available in this setup; no pending bridges were checked, which is not the same as none pending. Ask the operator to enable it, or check a known request with relay_status {"requestId":"<id>"}. Legacy vault shares on other chains can be checked with relay_vault_status {"chainId":1} or {"chainId":42161}.`};for(let r of["outbound","inbound"]){let u=new Set,o;do{let I=new URLSearchParams({user:e,[r==="outbound"?"originChainId":"destinationChainId"]:String(l),limit:"100",includePendingRequests:"true"});o&&I.set("continuation",o);let s;try{s=await L(`/requests/v3?${I}`)}catch(p){if(Fe(y.plainError(p)))return[...n.values(),h];throw p}for(let p of A(s.requests).map(t)){let $=z(p.depositAddress)?p.depositAddress.depositor:void 0;if(![p.user,p.sender,$].some(C=>typeof C=="string"&&C.toLowerCase()===e))throw new m("Relay returned a request for another wallet.");let v=F(p.id);if(n.has(v))continue;let f=await he(v);if(f.settled)continue;let q=t(p.data),D=t(t(q.route).quoted),H=O(t(D.origin).inputCurrency),b={...H,token:{...H.token,symbol:pe(H.token.symbol)??"unknown"}},R=O(t(D.destination).outputCurrency);c(r==="outbound"?b.token.chainId===l&&R.token.chainId!==l:b.token.chainId!==l&&R.token.chainId===l),f.originChainId!==void 0&&c(f.originChainId===b.token.chainId),f.destinationChainId!==void 0&&c(f.destinationChainId===R.token.chainId),n.set(v,{module:"relay",id:v,chainId:b.token.chainId,assets:[b],description:`Relay ${r} ${f.status}: ${b.amount} ${b.token.symbol} base units (${b.token.decimals} decimals) from chain ${b.token.chainId} toward ${d(p.recipient)} on chain ${R.token.chainId}. ${f.summary} Track with relay_status requestId ${v}.`})}if(s.continuation!==void 0&&s.continuation!==null&&typeof s.continuation!="string")throw new m("Relay returned invalid pagination.");if(o=typeof s.continuation=="string"&&s.continuation?s.continuation:void 0,o){if(u.has(o))throw new m("Relay repeated its pagination cursor. Pending positions are incomplete.");u.add(o)}}while(o)}return[...n.values()]}}};export{Ke as a};
|