@oakagentkit/core 0.2.6 → 0.2.7
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/abort-scope.d.ts +2 -0
- package/build/dist/api/abort-scope.js +1 -0
- package/build/dist/api/chain.js +1 -1
- package/build/dist/api/history.js +1 -1
- package/build/dist/api/http.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/checks.js +1 -1
- package/build/dist/api/modules/borro/copy.d.ts +15 -10
- package/build/dist/api/modules/borro/copy.js +1 -1
- package/build/dist/api/modules/borro/index.js +1 -1
- package/build/dist/api/modules/borro/liquidity.js +1 -1
- package/build/dist/api/modules/borro/positions.js +1 -1
- package/build/dist/api/modules/borro/reader.js +1 -1
- package/build/dist/api/modules/chop/abi.d.ts +31 -0
- package/build/dist/api/modules/chop/abi.js +1 -1
- package/build/dist/api/modules/chop/actions.js +1 -1
- package/build/dist/api/modules/chop/checks.d.ts +13 -5
- package/build/dist/api/modules/chop/checks.js +1 -1
- package/build/dist/api/modules/chop/copy.d.ts +11 -1
- package/build/dist/api/modules/chop/copy.js +1 -1
- package/build/dist/api/modules/chop/guard.js +1 -1
- package/build/dist/api/modules/chop/index.js +1 -1
- package/build/dist/api/modules/chop/positions.js +1 -1
- package/build/dist/api/modules/chop/reader.d.ts +132 -7
- package/build/dist/api/modules/chop/reader.js +1 -1
- package/build/dist/api/modules/chop/types.d.ts +12 -0
- package/build/dist/api/modules/clanker/extensions.d.ts +9 -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.d.ts +15 -0
- 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/earn/copy.d.ts +32 -10
- package/build/dist/api/modules/earn/copy.js +1 -1
- package/build/dist/api/modules/earn/cost.d.ts +11 -1
- package/build/dist/api/modules/earn/cost.js +1 -1
- package/build/dist/api/modules/earn/index.js +1 -1
- package/build/dist/api/modules/earn/lp.d.ts +14 -1
- package/build/dist/api/modules/earn/lp.js +1 -1
- package/build/dist/api/modules/earn/options.d.ts +6 -4
- package/build/dist/api/modules/earn/options.js +1 -1
- package/build/dist/api/modules/erc8004/common.d.ts +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/validation.js +1 -1
- package/build/dist/api/modules/factor/abi.d.ts +642 -0
- package/build/dist/api/modules/factor/abi.js +1 -0
- package/build/dist/api/modules/factor/actions.d.ts +15 -0
- package/build/dist/api/modules/factor/actions.js +1 -0
- package/build/dist/api/modules/factor/api.d.ts +7 -0
- package/build/dist/api/modules/factor/api.js +1 -0
- package/build/dist/api/modules/factor/checks.d.ts +11 -0
- package/build/dist/api/modules/factor/checks.js +1 -0
- package/build/dist/api/modules/factor/copy.d.ts +33 -0
- package/build/dist/api/modules/factor/copy.js +1 -0
- package/build/dist/api/modules/factor/guard.d.ts +12 -0
- package/build/dist/api/modules/factor/guard.js +1 -0
- package/build/dist/api/modules/factor/index.d.ts +16 -0
- package/build/dist/api/modules/factor/index.js +8 -0
- package/build/dist/api/modules/factor/messages.d.ts +46 -0
- package/build/dist/api/modules/factor/messages.js +1 -0
- package/build/dist/api/modules/factor/pins.d.ts +64 -0
- package/build/dist/api/modules/factor/pins.js +1 -0
- package/build/dist/api/modules/factor/reader.d.ts +17 -0
- package/build/dist/api/modules/factor/reader.js +1 -0
- package/build/dist/api/modules/factor/types.d.ts +18 -0
- package/build/dist/api/modules/factor/types.js +0 -0
- package/build/dist/api/modules/gloam/copy.d.ts +4 -3
- package/build/dist/api/modules/gloam/copy.js +2 -2
- 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.d.ts +29 -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/status-labels.d.ts +2 -0
- package/build/dist/api/modules/heyresearch/status-labels.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/commerce.js +1 -1
- package/build/dist/api/modules/hoodlock/fee.js +1 -1
- package/build/dist/api/modules/hoodlock/guard.js +1 -1
- package/build/dist/api/modules/hoodlock/index.js +1 -1
- package/build/dist/api/modules/hoodlock/lifecycle.js +1 -1
- package/build/dist/api/modules/hoodlock/locks-burn.js +1 -1
- package/build/dist/api/modules/hoodlock/public.js +1 -1
- package/build/dist/api/modules/hookr/actions.js +1 -1
- package/build/dist/api/modules/hookr/addons.js +1 -1
- package/build/dist/api/modules/hookr/agent-gate.js +1 -1
- package/build/dist/api/modules/hookr/contracts.d.ts +2 -1
- package/build/dist/api/modules/hookr/contracts.js +1 -1
- package/build/dist/api/modules/hookr/create-cancel.js +1 -1
- package/build/dist/api/modules/hookr/discovery.js +1 -1
- package/build/dist/api/modules/hookr/fill-bounty.js +1 -1
- package/build/dist/api/modules/hookr/index.js +1 -1
- package/build/dist/api/modules/hookr/launch-options.js +1 -1
- package/build/dist/api/modules/hookr/launch-receipt.js +1 -1
- package/build/dist/api/modules/hookr/launch.js +1 -1
- package/build/dist/api/modules/hookr/liquidity.js +1 -1
- package/build/dist/api/modules/hookr/lp-positions.js +1 -1
- package/build/dist/api/modules/hookr/lp-reads.d.ts +2 -0
- package/build/dist/api/modules/hookr/lp-reads.js +1 -1
- package/build/dist/api/modules/hookr/lp-receipt.js +1 -1
- package/build/dist/api/modules/hookr/lp-state.js +1 -1
- package/build/dist/api/modules/hookr/public-reads.js +1 -1
- package/build/dist/api/modules/hookr/read-utils.js +1 -1
- package/build/dist/api/modules/hookr/relay.js +1 -1
- package/build/dist/api/modules/hookr/revenue.js +1 -1
- package/build/dist/api/modules/kyberswap/index.js +1 -1
- package/build/dist/api/modules/kyberswap/source-pools.js +1 -1
- package/build/dist/api/modules/layerbank/actions.js +1 -1
- package/build/dist/api/modules/layerbank/index.js +1 -1
- package/build/dist/api/modules/layerbank/merkl.js +1 -1
- package/build/dist/api/modules/layerbank/reader.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/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/perps-batch.js +1 -1
- package/build/dist/api/modules/meridian/perps-stream.js +1 -1
- package/build/dist/api/modules/meridian/perps.js +1 -1
- package/build/dist/api/modules/meridian/predict-read.js +1 -1
- package/build/dist/api/modules/meridian/rfq.js +1 -1
- package/build/dist/api/modules/merkl/discovery.js +1 -1
- package/build/dist/api/modules/merkl/index.js +1 -1
- package/build/dist/api/modules/merkl/manage.js +1 -1
- package/build/dist/api/modules/merkl/protocol.js +1 -1
- package/build/dist/api/modules/morpho/allocator.js +1 -1
- package/build/dist/api/modules/morpho/bundles.js +1 -1
- package/build/dist/api/modules/morpho/in-kind.js +1 -1
- package/build/dist/api/modules/morpho/index.js +1 -1
- package/build/dist/api/modules/morpho/local-guard.js +1 -1
- package/build/dist/api/modules/morpho/midnight.js +1 -1
- package/build/dist/api/modules/morpho/protocol.js +1 -1
- package/build/dist/api/modules/morpho/vault-management.js +1 -1
- package/build/dist/api/modules/morpho/vault-tools.js +1 -1
- package/build/dist/api/modules/morpho/vault-v2.d.ts +2 -0
- 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/gateway.js +1 -1
- package/build/dist/api/modules/orbio/index.js +1 -1
- package/build/dist/api/modules/pendle/convert.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/pons/claim.js +1 -1
- package/build/dist/api/modules/pons/holder-directory.js +1 -1
- package/build/dist/api/modules/pons/index.js +1 -1
- package/build/dist/api/modules/pons/launch-status.js +1 -1
- package/build/dist/api/modules/pons/reads.js +1 -1
- package/build/dist/api/modules/pons/trade.d.ts +3 -2
- package/build/dist/api/modules/pons/trade.js +1 -1
- package/build/dist/api/modules/poolstrade/index.js +1 -1
- package/build/dist/api/modules/priors/coverage.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.d.ts +1 -0
- 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/stock-swap.js +1 -1
- package/build/dist/api/modules/raeto/authorization.d.ts +30 -0
- package/build/dist/api/modules/raeto/authorization.js +1 -0
- package/build/dist/api/modules/raeto/copy.d.ts +46 -0
- package/build/dist/api/modules/raeto/copy.js +1 -0
- package/build/dist/api/modules/raeto/errors.d.ts +4 -0
- package/build/dist/api/modules/raeto/errors.js +1 -0
- package/build/dist/api/modules/raeto/estimate.d.ts +2 -0
- package/build/dist/api/modules/raeto/estimate.js +1 -0
- package/build/dist/api/modules/raeto/index.d.ts +16 -0
- package/build/dist/api/modules/raeto/index.js +1 -0
- package/build/dist/api/modules/raeto/pairing.d.ts +40 -0
- package/build/dist/api/modules/raeto/pairing.js +1 -0
- package/build/dist/api/modules/raeto/pins.d.ts +24 -0
- package/build/dist/api/modules/raeto/pins.js +1 -0
- package/build/dist/api/modules/raeto/templates.d.ts +22 -0
- package/build/dist/api/modules/raeto/templates.js +1 -0
- package/build/dist/api/modules/raeto/terms.d.ts +8 -0
- package/build/dist/api/modules/raeto/terms.js +1 -0
- package/build/dist/api/modules/raeto/types.d.ts +64 -0
- package/build/dist/api/modules/raeto/types.js +0 -0
- package/build/dist/api/modules/relay/api.d.ts +16 -0
- package/build/dist/api/modules/relay/api.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.d.ts +1 -0
- package/build/dist/api/modules/relay/index.js +1 -1
- package/build/dist/api/modules/relay/order.js +1 -1
- package/build/dist/api/modules/relay/outbound-status.js +1 -1
- package/build/dist/api/modules/relay/readiness.d.ts +1 -0
- package/build/dist/api/modules/relay/readiness.js +1 -1
- package/build/dist/api/modules/relay/reads.js +1 -1
- package/build/dist/api/modules/relay/vaults.js +1 -1
- package/build/dist/api/modules/spark/actions.js +1 -1
- package/build/dist/api/modules/spark/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/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.d.ts +1 -0
- 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/fee-percent.d.ts +4 -0
- package/build/dist/api/modules/uniswap/fee-percent.js +1 -0
- 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.d.ts +2 -0
- 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.d.ts +2 -0
- 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.d.ts +38 -0
- package/build/dist/api/modules/uniswap/quote-guard.js +1 -0
- 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.d.ts +10 -3
- 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.d.ts +6 -0
- 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.js +1 -1
- package/build/dist/api/modules/wormhole/swap-token-verdict.js +1 -1
- package/build/dist/api/modules/wormhole/third-party-text.d.ts +14 -3
- package/build/dist/api/modules/wormhole/third-party-text.js +1 -1
- package/build/dist/api/modules/wormhole/token-check.js +1 -1
- package/build/dist/api/modules/wormhole/x402-client.js +1 -1
- package/build/dist/api/oak-fee.d.ts +12 -0
- package/build/dist/api/oak-fee.js +1 -0
- package/build/dist/api/param-text.d.ts +22 -0
- package/build/dist/api/param-text.js +1 -0
- package/build/dist/api/position-economics.d.ts +70 -0
- package/build/dist/api/position-economics.js +1 -0
- package/build/dist/api/positions.d.ts +8 -5
- package/build/dist/api/positions.js +1 -1
- package/build/dist/api/prices.d.ts +3 -0
- package/build/dist/api/prices.js +1 -1
- package/build/dist/api/progress.d.ts +7 -0
- package/build/dist/api/progress.js +1 -0
- package/build/dist/api/read-budgets.d.ts +4 -0
- package/build/dist/api/read-budgets.js +1 -0
- package/build/dist/api/read-shape.d.ts +45 -0
- package/build/dist/api/read-shape.js +1 -0
- package/build/dist/api/revert.d.ts +23 -0
- package/build/dist/api/revert.js +1 -0
- package/build/dist/api/routes.js +1 -1
- package/build/dist/api/rpc.d.ts +1 -0
- package/build/dist/api/rpc.js +1 -1
- package/build/dist/api/secret-fields.js +1 -1
- package/build/dist/api/send.js +1 -1
- package/build/dist/api/signing-registry.d.ts +8 -0
- package/build/dist/api/signing-registry.js +1 -1
- package/build/dist/api/simulate.js +1 -1
- package/build/dist/api/swap.d.ts +4 -0
- package/build/dist/api/swap.js +1 -1
- package/build/dist/api/tokens.d.ts +1 -0
- package/build/dist/api/tokens.js +1 -1
- package/build/dist/api/tool-policy.js +1 -1
- package/build/dist/api/types.d.ts +3 -0
- package/build/dist/api/untrusted-unwrap.d.ts +1 -0
- package/build/dist/api/untrusted-unwrap.js +1 -0
- package/build/dist/api/usd-estimate.d.ts +23 -0
- package/build/dist/api/usd-estimate.js +1 -0
- package/build/dist/api/vendor-limits.js +1 -1
- package/build/dist/chunks/{T7TFUH5K.js → 2E4I7CJ7.js} +1 -1
- package/build/dist/chunks/2FHELZ7Y.js +1 -0
- package/build/dist/chunks/2GXHYI23.js +1 -0
- package/build/dist/chunks/2LWBN35N.js +1 -0
- package/build/dist/chunks/{4HG6FRVH.js → 2OKYXT25.js} +1 -1
- package/build/dist/chunks/2SUHQWND.js +1 -0
- package/build/dist/chunks/2ZWKIBJT.js +1 -0
- package/build/dist/chunks/32RXFUOH.js +1 -0
- package/build/dist/chunks/3CH2IPQL.js +1 -0
- package/build/dist/chunks/3DNJTJ2X.js +1 -0
- package/build/dist/chunks/3K2N5VFH.js +1 -0
- package/build/dist/chunks/3VBIRLU3.js +1 -0
- package/build/dist/chunks/3ZABD6ZF.js +2 -0
- package/build/dist/chunks/44MB6SA6.js +1 -0
- package/build/dist/chunks/4D4ZRZUW.js +1 -0
- package/build/dist/chunks/{IPN6Z4JM.js → 4FPV4CRC.js} +1 -1
- package/build/dist/chunks/4GNUXN4K.js +1 -0
- package/build/dist/chunks/{K4DHHQBI.js → 4JRXEN7C.js} +2 -2
- package/build/dist/chunks/4JTTA3BX.js +1 -0
- package/build/dist/chunks/4OVIMYNH.js +2 -0
- package/build/dist/chunks/{7QIO77VE.js → 4Q2ZBZXM.js} +1 -1
- package/build/dist/chunks/4RQAOOO2.js +1 -0
- package/build/dist/chunks/4TTDAF4B.js +1 -0
- package/build/dist/chunks/523ZIR3J.js +1 -0
- package/build/dist/chunks/5DPJQCKJ.js +68 -0
- package/build/dist/chunks/5HIHUYA4.js +1 -0
- package/build/dist/chunks/5PI57UC2.js +1 -0
- package/build/dist/chunks/5RXALTDT.js +1 -0
- package/build/dist/chunks/5TUXSOMI.js +1 -0
- package/build/dist/chunks/5UAXLWJ2.js +1 -0
- package/build/dist/chunks/5XAXJEWM.js +5 -0
- package/build/dist/chunks/67BWOVET.js +1 -0
- package/build/dist/chunks/6NUNCD5J.js +1 -0
- package/build/dist/chunks/{FJ4S4GHY.js → 6PZGDVHV.js} +1 -1
- package/build/dist/chunks/{RTAHNWHN.js → 6UVGQYZ3.js} +1 -1
- package/build/dist/chunks/753HZZTY.js +1 -0
- package/build/dist/chunks/7D73A6KS.js +1 -0
- package/build/dist/chunks/7MBVTNLU.js +1 -0
- package/build/dist/chunks/7QKYDNF6.js +18 -0
- package/build/dist/chunks/7VC53B5X.js +70 -0
- package/build/dist/chunks/7VNO46LV.js +1 -0
- package/build/dist/chunks/ACH4BSME.js +3 -0
- package/build/dist/chunks/AHUCYDBC.js +1 -0
- package/build/dist/chunks/AI3VAPA3.js +1 -0
- package/build/dist/chunks/AMTRDPVO.js +1 -0
- package/build/dist/chunks/APHNOGNS.js +1 -0
- package/build/dist/chunks/{BND2UFVW.js → ARI72OYT.js} +1 -1
- package/build/dist/chunks/ARLGF5MU.js +1 -0
- package/build/dist/chunks/BAIY32AV.js +1 -0
- package/build/dist/chunks/BB765L75.js +3 -0
- package/build/dist/chunks/BE3A7677.js +1 -0
- package/build/dist/chunks/{PAY5PD4H.js → BX46C5ZP.js} +1 -1
- package/build/dist/chunks/{XL3LLGIR.js → BZ34ZR65.js} +1 -1
- package/build/dist/chunks/C3WBHFLX.js +1 -0
- package/build/dist/chunks/C75MT5SD.js +1 -0
- package/build/dist/chunks/CAWTAR5V.js +1 -0
- package/build/dist/chunks/CNLL4NCR.js +1 -0
- package/build/dist/chunks/CO4GCF4L.js +1 -0
- package/build/dist/chunks/{P5PYFK7L.js → CQ5WRWV4.js} +1 -1
- package/build/dist/chunks/{SJJR4ZBZ.js → CSDN4MYP.js} +1 -1
- package/build/dist/chunks/CSOO4SW7.js +1 -0
- package/build/dist/chunks/CZL6T2ZQ.js +1 -0
- package/build/dist/chunks/D742AYEV.js +1 -0
- package/build/dist/chunks/DGCJZ3HO.js +1 -0
- package/build/dist/chunks/DNNFKDZR.js +1 -0
- package/build/dist/chunks/DPE7SPW7.js +1 -0
- package/build/dist/chunks/DSTMEY5F.js +1 -0
- package/build/dist/chunks/{FUDAXV5X.js → DYYEA5HB.js} +1 -1
- package/build/dist/chunks/EFESPGA2.js +1 -0
- package/build/dist/chunks/EGZREEG2.js +1 -0
- package/build/dist/chunks/EH5G4O3U.js +1 -0
- package/build/dist/chunks/EI6GGPDS.js +20 -0
- package/build/dist/chunks/EVBHQQQG.js +1 -0
- package/build/dist/chunks/EZZM2GQT.js +2 -0
- package/build/dist/chunks/F3VDVTMS.js +1 -0
- package/build/dist/chunks/F4UQEPJT.js +1 -0
- package/build/dist/chunks/FHTNMGFR.js +1 -0
- package/build/dist/chunks/FJLJ7ZQ5.js +1 -0
- package/build/dist/chunks/{WP6RHXGN.js → FL5SSHUL.js} +1 -1
- package/build/dist/chunks/FNGIJKMZ.js +1 -0
- package/build/dist/chunks/{KIFZ5ZSK.js → FOD34G2H.js} +1 -1
- package/build/dist/chunks/{WV3A3OUU.js → FOKEFXGP.js} +1 -1
- package/build/dist/chunks/FV4WZOTD.js +1 -0
- package/build/dist/chunks/FWIFTPSE.js +2 -0
- package/build/dist/chunks/FZ6IJZZM.js +1 -0
- package/build/dist/chunks/G2LAO23N.js +1 -0
- package/build/dist/chunks/GDRQ2ANN.js +1 -0
- package/build/dist/chunks/GG24LO2R.js +1 -0
- package/build/dist/chunks/GLF7WEY2.js +1 -0
- package/build/dist/chunks/GQ3XZFRL.js +1 -0
- package/build/dist/chunks/{QU5XKRGK.js → GQYV4TFO.js} +1 -1
- package/build/dist/chunks/GRSXWQWD.js +1 -0
- package/build/dist/chunks/{DL6AEWEM.js → GSFHM5L3.js} +1 -1
- package/build/dist/chunks/{QHBS3PVU.js → H5DY7CNB.js} +1 -1
- package/build/dist/chunks/HCBX4NFM.js +1 -0
- package/build/dist/chunks/HHO5ISMM.js +1 -0
- package/build/dist/chunks/HIX5N25Z.js +1 -0
- package/build/dist/chunks/HKVQ646Q.js +1 -0
- package/build/dist/chunks/IEG6GLFR.js +1 -0
- package/build/dist/chunks/INOYMBWE.js +1 -0
- package/build/dist/chunks/IV4K7FMD.js +1 -0
- package/build/dist/chunks/{PIIHOXWF.js → J73ATSEQ.js} +1 -1
- package/build/dist/chunks/JBTOZ6IH.js +1 -0
- package/build/dist/chunks/JESMX2UC.js +1 -0
- package/build/dist/chunks/JJGZ7W3V.js +1 -0
- package/build/dist/chunks/JKRBGAX2.js +1 -0
- package/build/dist/chunks/JLRHM2DQ.js +1 -0
- package/build/dist/chunks/JOKL5L6X.js +1 -0
- package/build/dist/chunks/JS53DQVT.js +1 -0
- package/build/dist/chunks/{WIRBCS4W.js → JWR5XVP2.js} +1 -1
- package/build/dist/chunks/{JFYBH3DX.js → K6D6SDIG.js} +1 -1
- package/build/dist/chunks/K7HTDKAT.js +1 -0
- package/build/dist/chunks/{2VXLVXIB.js → KDGSYNOP.js} +1 -1
- package/build/dist/chunks/KKPMOAVI.js +1 -0
- package/build/dist/chunks/KREBNL2D.js +1 -0
- package/build/dist/chunks/L646YWDP.js +1 -0
- package/build/dist/chunks/{GSBIERZD.js → LR4XTZ37.js} +1 -1
- package/build/dist/chunks/LVFI74ST.js +1 -0
- package/build/dist/chunks/{QBIY6FQN.js → M7ZXDLKM.js} +1 -1
- package/build/dist/chunks/MVD3KWPP.js +1 -0
- package/build/dist/chunks/N245WC5R.js +1 -0
- package/build/dist/chunks/{WTXC3XKW.js → N4XNNXOJ.js} +1 -1
- package/build/dist/chunks/N6GIC7HJ.js +1 -0
- package/build/dist/chunks/{RUC7KH7A.js → NA424YAL.js} +1 -1
- package/build/dist/chunks/NUFZUKYS.js +1 -0
- package/build/dist/chunks/{XD6X3KTC.js → O3JWCJIF.js} +1 -1
- package/build/dist/chunks/OARVU3RC.js +1 -0
- package/build/dist/chunks/OEZ7FCLF.js +1 -0
- package/build/dist/chunks/{H43RNCX2.js → OUROA7XR.js} +1 -1
- package/build/dist/chunks/{2MT3G7YZ.js → OYJFXEDU.js} +1 -1
- package/build/dist/chunks/OYPAVXGQ.js +1 -0
- package/build/dist/chunks/{SMYWWIE6.js → OZ5MDUD2.js} +1 -1
- package/build/dist/chunks/P6OMKZMR.js +3 -0
- package/build/dist/chunks/PV4AK32X.js +1 -0
- package/build/dist/chunks/{HKEMQBFA.js → PXVREXCS.js} +1 -1
- package/build/dist/chunks/PZEF5LBL.js +2 -0
- package/build/dist/chunks/Q2ACLVWR.js +1 -0
- package/build/dist/chunks/QFSBDPLN.js +1 -0
- package/build/dist/chunks/QJNLLI6N.js +1 -0
- package/build/dist/chunks/QMZEGT5B.js +1 -0
- package/build/dist/chunks/{PNA6UIE5.js → REWXG6X6.js} +1 -1
- package/build/dist/chunks/{ALLLYOUG.js → RLI4JDOL.js} +1 -1
- package/build/dist/chunks/{UD2XMNIT.js → RLMVA575.js} +1 -1
- package/build/dist/chunks/RPB46QAC.js +1 -0
- package/build/dist/chunks/{Q42YI3EP.js → RT7IU6TI.js} +1 -1
- package/build/dist/chunks/{ER47KGRM.js → SBY4RJ7I.js} +1 -1
- package/build/dist/chunks/SCG5HWMN.js +1 -0
- package/build/dist/chunks/{XQA5LCL6.js → SENOU5JR.js} +1 -1
- package/build/dist/chunks/SKEKXEUU.js +1 -0
- package/build/dist/chunks/SOTYQGPT.js +1 -0
- package/build/dist/chunks/SZ466I5X.js +1 -0
- package/build/dist/chunks/{GNC6RXLT.js → TDZTC5WR.js} +1 -1
- package/build/dist/chunks/TE6D3OIX.js +1 -0
- package/build/dist/chunks/TID4C2KC.js +1 -0
- package/build/dist/chunks/TK55VASJ.js +2 -0
- package/build/dist/chunks/TM7Z5SA4.js +1 -0
- package/build/dist/chunks/TNJTET4G.js +1 -0
- package/build/dist/chunks/TPEKCXVE.js +1 -0
- package/build/dist/chunks/TVIMP5CK.js +1 -0
- package/build/dist/chunks/U2YCQWZK.js +1 -0
- package/build/dist/chunks/U363GQTF.js +1 -0
- package/build/dist/chunks/{U4JGEMKT.js → UEDGYZOC.js} +1 -1
- package/build/dist/chunks/UOCRYXAB.js +1 -0
- package/build/dist/chunks/UQEEF5W5.js +1 -0
- package/build/dist/chunks/{QQECG3WP.js → UUID2E22.js} +1 -1
- package/build/dist/chunks/UWBKAWX3.js +7 -0
- package/build/dist/chunks/V37L4DU4.js +1 -0
- package/build/dist/chunks/VR344DAZ.js +1 -0
- package/build/dist/chunks/{TX2EOIRS.js → VST6LFUB.js} +1 -1
- package/build/dist/chunks/VTPT5544.js +1 -0
- package/build/dist/chunks/VVWFB53Q.js +1 -0
- package/build/dist/chunks/WHTRPRRD.js +1 -0
- package/build/dist/chunks/WHVZ372B.js +1 -0
- package/build/dist/chunks/{AFBEZXNV.js → WNWRF4HE.js} +1 -1
- package/build/dist/chunks/{4DP2VPXR.js → WOGWLFAL.js} +1 -1
- package/build/dist/chunks/WUT7TZYM.js +1 -0
- package/build/dist/chunks/XCKTE4ON.js +1 -0
- package/build/dist/chunks/XEPCDGN2.js +1 -0
- package/build/dist/chunks/XHYFISVV.js +1 -0
- package/build/dist/chunks/XPEDQBLI.js +1 -0
- package/build/dist/chunks/{QFNT73OF.js → XQ24RSEI.js} +1 -1
- package/build/dist/chunks/XRDXFHIK.js +1 -0
- package/build/dist/chunks/XTFRPI4G.js +1 -0
- package/build/dist/chunks/XVJ7ILKK.js +1 -0
- package/build/dist/chunks/XWKK75TO.js +1 -0
- package/build/dist/chunks/{CBLMQ5UU.js → XYPGLG6A.js} +1 -1
- package/build/dist/chunks/Y77EVVT4.js +1 -0
- package/build/dist/chunks/YEIM6BZQ.js +1 -0
- package/build/dist/chunks/{XSKFKBDR.js → YMV5TL5C.js} +1 -1
- package/build/dist/chunks/YSMWCKIX.js +1 -0
- package/build/dist/chunks/YTLH4M4Y.js +1 -0
- package/build/dist/chunks/YUHNPUNK.js +1 -0
- package/build/dist/chunks/YWZQJJYY.js +1 -0
- package/build/dist/chunks/{EGYVRQUR.js → ZF2VPDRQ.js} +1 -1
- package/build/dist/chunks/ZFU65MB4.js +1 -0
- package/build/dist/chunks/ZKZUS3QU.js +1 -0
- package/build/dist/chunks/ZOMFHTB2.js +1 -0
- package/build/dist/chunks/{OLSP46ZD.js → ZP36DSOD.js} +1 -1
- package/build/dist/chunks/ZQ6AF3VX.js +1 -0
- package/package.json +1 -1
- package/build/dist/chunks/2THSW4QN.js +0 -1
- package/build/dist/chunks/2TK3ETUO.js +0 -1
- package/build/dist/chunks/35KR3VSS.js +0 -1
- package/build/dist/chunks/3GQ7A3VB.js +0 -1
- package/build/dist/chunks/3XNZUIRU.js +0 -1
- package/build/dist/chunks/46547QT3.js +0 -1
- package/build/dist/chunks/4EN6MQEI.js +0 -1
- package/build/dist/chunks/4I3OU56B.js +0 -1
- package/build/dist/chunks/52ELWNXJ.js +0 -2
- package/build/dist/chunks/5AXWBSPG.js +0 -1
- package/build/dist/chunks/5N3O42X6.js +0 -1
- package/build/dist/chunks/5SMVQCAP.js +0 -1
- package/build/dist/chunks/5SZPNZG4.js +0 -1
- package/build/dist/chunks/64GOINYS.js +0 -1
- package/build/dist/chunks/6I4NTKB2.js +0 -1
- package/build/dist/chunks/6JAXZNZ3.js +0 -1
- package/build/dist/chunks/6O3Q5B6M.js +0 -1
- package/build/dist/chunks/6OGDTEGH.js +0 -1
- package/build/dist/chunks/6WZX7C4T.js +0 -2
- package/build/dist/chunks/6YB3VOUL.js +0 -1
- package/build/dist/chunks/7GJ6SLEV.js +0 -1
- package/build/dist/chunks/7KWZ5QJU.js +0 -1
- package/build/dist/chunks/7QZOTRSA.js +0 -2
- package/build/dist/chunks/7WSHW7KW.js +0 -1
- package/build/dist/chunks/A7I4IWUB.js +0 -1
- package/build/dist/chunks/ABPL3ZZI.js +0 -1
- package/build/dist/chunks/ACW63WIL.js +0 -20
- package/build/dist/chunks/AEL62KCG.js +0 -1
- package/build/dist/chunks/AKYF5264.js +0 -7
- package/build/dist/chunks/AW7AXQCZ.js +0 -1
- package/build/dist/chunks/AXRL3REN.js +0 -1
- package/build/dist/chunks/BBTPRZ6T.js +0 -1
- package/build/dist/chunks/BOVMED7R.js +0 -1
- package/build/dist/chunks/BTPXJAUX.js +0 -1
- package/build/dist/chunks/C7AXJHBT.js +0 -1
- package/build/dist/chunks/CBG5HARQ.js +0 -2
- package/build/dist/chunks/CDPSMI3Z.js +0 -1
- package/build/dist/chunks/CHXBOXOD.js +0 -1
- package/build/dist/chunks/CQEJSCFQ.js +0 -1
- package/build/dist/chunks/DBNTZEAJ.js +0 -1
- package/build/dist/chunks/DHUDSOGR.js +0 -18
- package/build/dist/chunks/DJN3JAWB.js +0 -1
- package/build/dist/chunks/FEYAY6OZ.js +0 -1
- package/build/dist/chunks/GG6Y4OCJ.js +0 -1
- package/build/dist/chunks/GGHBFLRC.js +0 -1
- package/build/dist/chunks/GGSAKCND.js +0 -1
- package/build/dist/chunks/GRQYTVNT.js +0 -1
- package/build/dist/chunks/H6T5FXEX.js +0 -1
- package/build/dist/chunks/HHXBUYHO.js +0 -1
- package/build/dist/chunks/HQUVB7Z5.js +0 -3
- package/build/dist/chunks/HU7IMNBI.js +0 -1
- package/build/dist/chunks/HWX36XJI.js +0 -1
- package/build/dist/chunks/I26DMNJG.js +0 -1
- package/build/dist/chunks/I55MURSJ.js +0 -1
- package/build/dist/chunks/IMO3GDA5.js +0 -1
- package/build/dist/chunks/IPRVIKYC.js +0 -1
- package/build/dist/chunks/IVX4R5OL.js +0 -1
- package/build/dist/chunks/JQOQMFWD.js +0 -3
- package/build/dist/chunks/JUZ5JU6D.js +0 -70
- package/build/dist/chunks/JZS3E66E.js +0 -1
- package/build/dist/chunks/K3RDPI5J.js +0 -1
- package/build/dist/chunks/KBKK7UNY.js +0 -1
- package/build/dist/chunks/KVFZKPJT.js +0 -1
- package/build/dist/chunks/L5BLHY34.js +0 -1
- package/build/dist/chunks/LKXO2BQS.js +0 -1
- package/build/dist/chunks/LKZX4CAA.js +0 -1
- package/build/dist/chunks/LYMNHO5T.js +0 -1
- package/build/dist/chunks/M2UXYCKH.js +0 -1
- package/build/dist/chunks/M37654RL.js +0 -1
- package/build/dist/chunks/M6LC6DRE.js +0 -1
- package/build/dist/chunks/MOE3EVAL.js +0 -1
- package/build/dist/chunks/N4Q6GN65.js +0 -1
- package/build/dist/chunks/NAZPDRIF.js +0 -1
- package/build/dist/chunks/NKX3FE34.js +0 -1
- package/build/dist/chunks/NKZKKCK2.js +0 -1
- package/build/dist/chunks/NOFUKKP5.js +0 -1
- package/build/dist/chunks/O6ROOKY2.js +0 -1
- package/build/dist/chunks/OJ4WJUPP.js +0 -1
- package/build/dist/chunks/OOZSE2R7.js +0 -1
- package/build/dist/chunks/OTXSKFUD.js +0 -1
- package/build/dist/chunks/P5AJSLZ7.js +0 -1
- package/build/dist/chunks/PACN53TR.js +0 -1
- package/build/dist/chunks/PAHXBLCS.js +0 -1
- package/build/dist/chunks/PK66GCDT.js +0 -1
- package/build/dist/chunks/PSBQWDYI.js +0 -1
- package/build/dist/chunks/PXT5YTWU.js +0 -1
- package/build/dist/chunks/PZGGE5D3.js +0 -1
- package/build/dist/chunks/QA2RRIES.js +0 -1
- package/build/dist/chunks/QA3UHEO3.js +0 -1
- package/build/dist/chunks/QW2OPEYJ.js +0 -1
- package/build/dist/chunks/QYVREJYC.js +0 -1
- package/build/dist/chunks/ROFPXEQ5.js +0 -2
- package/build/dist/chunks/RTGS7RIO.js +0 -1
- package/build/dist/chunks/RUX3RY7Y.js +0 -1
- package/build/dist/chunks/RVDUSNWW.js +0 -1
- package/build/dist/chunks/S5CBVFHY.js +0 -1
- package/build/dist/chunks/SIYUNOLI.js +0 -1
- package/build/dist/chunks/TEJ7W534.js +0 -1
- package/build/dist/chunks/TPBAFS7K.js +0 -1
- package/build/dist/chunks/TVWMTMEF.js +0 -1
- package/build/dist/chunks/U2RMUVVY.js +0 -1
- package/build/dist/chunks/U5PMVP56.js +0 -1
- package/build/dist/chunks/V5JWGWXC.js +0 -1
- package/build/dist/chunks/VCOTCVKN.js +0 -1
- package/build/dist/chunks/VEQBHI6O.js +0 -1
- package/build/dist/chunks/VNV6ZISN.js +0 -1
- package/build/dist/chunks/VYAJXLND.js +0 -1
- package/build/dist/chunks/WCNHZYQQ.js +0 -1
- package/build/dist/chunks/X2P55AC3.js +0 -1
- package/build/dist/chunks/XBE3B6Y2.js +0 -1
- package/build/dist/chunks/XKSVTN5X.js +0 -1
- package/build/dist/chunks/XSRIJUFU.js +0 -1
- package/build/dist/chunks/YCZPSMZ5.js +0 -1
- package/build/dist/chunks/YN56C7PN.js +0 -1
- package/build/dist/chunks/YRNXGQJC.js +0 -1
- package/build/dist/chunks/YWRLY5EA.js +0 -1
- package/build/dist/chunks/YWSX6IE6.js +0 -1
- package/build/dist/chunks/YXTSWRV5.js +0 -1
- package/build/dist/chunks/Z6LZGCVW.js +0 -1
- package/build/dist/chunks/ZQWZGH7V.js +0 -1
- package/build/dist/chunks/ZSN4IRI5.js +0 -1
- package/build/dist/chunks/ZV5HIQXC.js +0 -1
- package/build/dist/chunks/ZXJ24B4L.js +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const FACTOR_COPY: {
|
|
2
|
+
readonly partner: "Factor is an official Oak partner. Factor's own team runs its product and contracts; Oak didn't build them and doesn't run them.";
|
|
3
|
+
readonly trust: "Factor's desk contract has no owner, and its rules are fixed in its code. Factor's website and API are run by Factor and can lag the chain.";
|
|
4
|
+
readonly fees: "An advance costs a 1% fee taken from the advance, paid to Factor's burn pot contract. A settled job pays Factor's 2% job fee from the agent's payout.";
|
|
5
|
+
readonly half: "At most half of a job's price can be advanced before delivery.";
|
|
6
|
+
readonly poolBar: "If a job you drew on isn't delivered within 12 hours after its due time, anyone can refund it, and this wallet can never draw from Factor's pool again.";
|
|
7
|
+
readonly decline: "You can decline a job only before drawing on it. A rejected job settles at half, with no appeal.";
|
|
8
|
+
readonly payLink: "A signed pay link can't be revoked; anyone holding it can pay it until it expires.";
|
|
9
|
+
readonly names: "Names are first come, and a fixed-price application can't be withdrawn.";
|
|
10
|
+
readonly privateWork: "Your work text stays on this computer; only its fingerprint (a hash) goes on chain.";
|
|
11
|
+
readonly publicWork: "Your work text will be public on Factor's job page and can't be edited.";
|
|
12
|
+
readonly walletCode: "This wallet has contract code, so Factor would hold its payouts until they are collected, which Oak can't do yet. Nothing was sent.";
|
|
13
|
+
readonly compute: "Oak doesn't send compute advances: that ETH goes to Factor's gateway as off-chain credit Oak can't check. Nothing was sent.";
|
|
14
|
+
readonly lineAccount: "This wallet uses a Factor credit line, which Oak doesn't support yet. Nothing was sent.";
|
|
15
|
+
readonly offers: "This Factor job takes offers, which Oak can't send yet. Nothing was signed.";
|
|
16
|
+
readonly deskOnly: "Desk figures only; jobs and limits held through a Factor credit line are not shown.";
|
|
17
|
+
readonly stateMismatch: "Factor's site names a different desk than the one Oak checked on chain. Nothing was signed or sent.";
|
|
18
|
+
readonly stateUnavailable: "Factor's site isn't answering, so Oak can't date this message. Nothing was signed.";
|
|
19
|
+
readonly apiLabel: "Factor API (can lag the chain)";
|
|
20
|
+
};
|
|
21
|
+
export declare const FACTOR_TOOL_DESCRIPTIONS: {
|
|
22
|
+
readonly factor_sign_up: "Register this wallet as a Factor agent on Robinhood Chain, then sign its public profile with a name and description. Gas for registration; identity, active plan and human confirmation required. Factor is an official Oak partner. Factor's own team runs its product and contracts; Oak didn't build them and doesn't run them. Factor's desk contract has no owner, and its rules are fixed in its code. Factor's website and API are run by Factor and can lag the chain. Names are first come, and a fixed-price application can't be withdrawn.";
|
|
23
|
+
readonly factor_create_pay_link: "Sign a pay link for a fixed-price ETH job on Robinhood Chain. Price is a wei string; expiry is 1-30 days. No payment now; a customer pays later. Identity, active plan and human confirmation required. A signed pay link can't be revoked; anyone holding it can pay it until it expires. At most half of a job's price can be advanced before delivery. An advance costs a 1% fee taken from the advance, paid to Factor's burn pot contract. A settled job pays Factor's 2% job fee from the agent's payout.";
|
|
24
|
+
readonly factor_apply_to_job: "Sign an application for a fixed-price Factor open job. Identity, active plan and human confirmation required. This Factor job takes offers, which Oak can't send yet. Nothing was signed. Names are first come, and a fixed-price application can't be withdrawn.";
|
|
25
|
+
readonly factor_draw: "Draw an early or pool advance to this wallet on Robinhood Chain, with amount in integer wei. Identity, active plan and human confirmation required. At most half of a job's price can be advanced before delivery. An advance costs a 1% fee taken from the advance, paid to Factor's burn pot contract. A settled job pays Factor's 2% job fee from the agent's payout. If a job you drew on isn't delivered within 12 hours after its due time, anyone can refund it, and this wallet can never draw from Factor's pool again. Oak doesn't send compute advances: that ETH goes to Factor's gateway as off-chain credit Oak can't check. Nothing was sent.";
|
|
26
|
+
readonly factor_deliver: "Deliver a work fingerprint on Robinhood Chain. Show defaults to false; public posting follows successful delivery only when requested. Identity, active plan and human confirmation required. Your work text stays on this computer; only its fingerprint (a hash) goes on chain. With show true: Your work text will be public on Factor's job page and can't be edited.";
|
|
27
|
+
readonly factor_decline: "Decline a Factor job on Robinhood Chain and return its price to the customer. Identity, active plan and human confirmation required. You can decline a job only before drawing on it. A rejected job settles at half, with no appeal.";
|
|
28
|
+
readonly factor_job: "Read a Factor job and its public details from the Factor API (can lag the chain). API data does not authorize an action. No identity or plan required.";
|
|
29
|
+
readonly factor_can_draw: "Read the desk's early and pool advance amounts in wei on Robinhood Chain; these amounts share the same half-price cap. No identity or plan required. Desk figures only; jobs and limits held through a Factor credit line are not shown.";
|
|
30
|
+
readonly factor_my_jobs: "Read at most 50 Factor jobs for this wallet as agent or customer from the Factor API (can lag the chain). No identity or plan required. Desk figures only; jobs and limits held through a Factor credit line are not shown.";
|
|
31
|
+
readonly factor_open_jobs: "Read at most 25 Factor open-job listings from the Factor API (can lag the chain). Filter by this wallet or verified owners when requested. No identity or plan required.";
|
|
32
|
+
readonly factor_open_job: "Read a Factor open-job listing and public application details from the Factor API (can lag the chain). No identity or plan required.";
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../../../chunks/DGCJZ3HO.js";import"../../../chunks/63YRSLDK.js";export{a as FACTOR_COPY,b as FACTOR_TOOL_DESCRIPTIONS};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PublicClient } from 'viem';
|
|
2
|
+
import type { Address, ToolArgs, UnsignedTx } from '../../types.js';
|
|
3
|
+
export interface FactorGuardRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
args: ToolArgs;
|
|
6
|
+
chainId?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FactorGuardDeps {
|
|
9
|
+
client: PublicClient;
|
|
10
|
+
http?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
export declare function rebuildFactorAction(request: FactorGuardRequest, wallet: Address, deps: FactorGuardDeps): Promise<UnsignedTx[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../../chunks/EFESPGA2.js";import"../../../chunks/LVFI74ST.js";import"../../../chunks/5XAXJEWM.js";import"../../../chunks/AHUCYDBC.js";import"../../../chunks/JJGZ7W3V.js";import"../../../chunks/CZL6T2ZQ.js";import"../../../chunks/ZQ6AF3VX.js";import"../../../chunks/K7HTDKAT.js";import"../../../chunks/DGCJZ3HO.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as rebuildFactorAction};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CreateModule, UnsignedTx } from '../../types.js';
|
|
2
|
+
export { buildRegister, buildDraw, buildDeliver, buildDecline } from './actions.js';
|
|
3
|
+
export { rebuildFactorAction } from './guard.js';
|
|
4
|
+
export type FactorStep = {
|
|
5
|
+
kind: 'tx';
|
|
6
|
+
tx: UnsignedTx;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'message';
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export interface FactorStepResult {
|
|
12
|
+
steps: FactorStep[];
|
|
13
|
+
continuation: Record<string, unknown>;
|
|
14
|
+
summary: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const createModule: CreateModule;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as be}from"../../../chunks/EFESPGA2.js";import{b as we,c as ge,d as me,e as ye,f as R,g as D}from"../../../chunks/LVFI74ST.js";import{b as v,c as K,d as O,e as I,f as Q,g as X,h as Z,i as ee,j as te}from"../../../chunks/5XAXJEWM.js";import{a as E,b,d as P,e as C,f as Y}from"../../../chunks/AHUCYDBC.js";import{d as V}from"../../../chunks/JJGZ7W3V.js";import{c as S}from"../../../chunks/CZL6T2ZQ.js";import"../../../chunks/ZQ6AF3VX.js";import{b as q,c as z,d as G,e as $}from"../../../chunks/K7HTDKAT.js";import{a as c,b as U}from"../../../chunks/DGCJZ3HO.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import{a as W}from"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import{b as m}from"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import{a as r}from"../../../chunks/XSD5NL7J.js";import{a as B}from"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";import{randomBytes as _e}from"node:crypto";import{formatEther as L,getAddress as ae,isAddressEqual as oe,recoverMessageAddress as ke}from"viem";var k='Factor job ID, a decimal string. Example: "1".',je="https://factoragents.fun/api/v1",ce={type:"string",pattern:"^0x[0-9a-f]{64}$",description:"Open job listing ID: 0x followed by 64 lowercase hex digits, from factor_open_jobs."},Fe={continuation:{type:"object",description:"The continuation object returned by the previous call of this tool. Pass it back unchanged with the signature; leave it out on the first call."},signature:{type:"string",pattern:"^0x[0-9a-fA-F]{130}$",description:"This wallet's signature of the message returned by the previous call (0x plus 130 hex digits). Needs the continuation. Leave out on the first call."}},ne={factor_sign_up:"profile",factor_create_pay_link:"pay-link",factor_apply_to_job:"application"},ie={factor_sign_up:{name:{type:"string",description:"Public agent name for the Factor profile. Trimmed and lowercased; names are first come."},does:{type:"string",description:"One-line public description of what this agent does (3 to 80 characters)."}},factor_create_pay_link:{price:m("Job price in wei, from 0.001 to 1000 ETH."),title:{type:"string",description:"Short public title of the job (3 to 80 characters, one line)."},brief:{type:"string",maxLength:2e3,description:"Public description of the work the customer gets (up to 2000 characters)."},due_in_hours:{type:"integer",minimum:1,maximum:720,default:24,description:"Hours allowed to deliver after payment, 1 to 720. Defaults to 24."},allow_early:{type:"boolean",default:!1,description:"True lets this agent draw an early advance before delivery. Defaults to false."},expires_in_days:{type:"integer",minimum:1,maximum:30,default:30,description:"Days until the signed pay link expires, 1 to 30. Defaults to 30."}},factor_apply_to_job:{open:ce,pitch:{type:"string",description:"Optional one-line pitch shown with the application (3 to 280 characters). Leave out for none."}}};function j(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function pe(e,o){if(e===void 0)return!1;if(typeof e!="boolean")throw new r(`${o} must be a boolean.`);return e}function re(e,o,n,t){if(e===void 0)return o;if(typeof e!="number"||!Number.isSafeInteger(e)||e<1||e>n)throw new r(`${t} must be a whole number from 1 to ${n}.`);return e}function ue(e){if(typeof e!="string"||!/^0x[0-9a-f]{64}$/.test(e))throw new r("Provide an open job ID of 64 lowercase hexadecimal digits after 0x.");return e}function Ae(e,o){if(e==="factor_sign_up")return O("name",o.name),O("does",o.does),{name:o.name.trim().toLowerCase(),does:v(o.does,3,80)};if(e==="factor_apply_to_job"){if(o.pitch!==void 0&&typeof o.pitch!="string")throw new r("Provide pitch as text.");return O("pitch",o.pitch),{open:ue(o.open),pitch:o.pitch===void 0||o.pitch.trim()===""?"":v(o.pitch,3,280)}}if(typeof o.price!="string")throw new r("Provide price as a decimal wei string.");let n=b(o.price,"price");if(n<S.MIN_JOB||n>1000n*10n**18n)throw new r("Factor job price must be from 1000000000000000 to 1000000000000000000000 wei.");return{price:n.toString(),title:v(o.title,3,80),brief:K(o.brief),due_in_hours:re(o.due_in_hours,24,720,"due_in_hours"),allow_early:pe(o.allow_early,"allow_early"),expires_in_days:re(o.expires_in_days,30,30,"expires_in_days")}}function fe(e,o){if(e.continuation===void 0){if(e.signature!==void 0)throw new r("A Factor signature requires its continuation. Start the tool again.");return}let n=e.continuation;if(!j(n)||n.wallet!==o||n.chainId!==4663||typeof n.stage!="string"||!j(n.args))throw new r("Invalid Factor continuation wallet, chain or stage. Start the tool again.");return E(n,["stage","wallet","chainId","args","at","createdAt","expiresAt","exp","id","message"]),n}function de(e,o){let n=e.args;if(!j(n)||Object.keys(n).length!==Object.keys(o).length||Object.entries(o).some(([t,i])=>n[t]!==i))throw new r("Factor continuation arguments changed. Start the tool again.")}async function x(e,o,n){let t=await e.http(`${je}${o}`,{method:"POST",redirect:"error",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!t.ok)throw new W(t);return t.json()}function M(e){return typeof e=="string"?B(e):Array.isArray(e)?e.map(M):j(e)?Object.fromEntries(Object.entries(e).map(([o,n])=>[o,M(n)])):e}function se(e,o){if(!Array.isArray(e.data.items))throw new r("Factor API returned a list without an items array.");return{...e,data:{...e.data,items:e.data.items.slice(0,o)}}}async function le(e,o,n,t){let i=Ae(o,n),s=fe(n,t);if(s&&de(s,i),o==="factor_sign_up"&&(!s||s.stage==="register")){if(n.signature!==void 0)throw new r("The Factor registration stage takes no signature.");if(s&&!(await C(e.clientFor(4663),t)).registered)throw new r("This wallet is not registered yet. Wait for registration, then retry.");let l=await D(e,o,i,t);if(l.length)return await e.preview(l,t),{steps:l.map(y=>({kind:"tx",tx:y})),continuation:{stage:"register",wallet:t,chainId:4663,args:i},summary:`${c.partner}
|
|
2
|
+
${c.trust}
|
|
3
|
+
Register this wallet, then sign its Factor profile.`}}if(s&&s.stage!=="register"&&s.stage!==ne[o])throw new r("Unknown Factor signature continuation. Start the tool again.");let d=await P(e,t,!0);if(d==="unreachable")throw new r(c.stateUnavailable);let p=Math.floor(Date.now()/1e3);if(I(d.asOf,p),!(await C(e.clientFor(4663),t)).registered)throw new r("This wallet has not registered as a Factor agent. Run factor_sign_up first.");if(o==="factor_apply_to_job"){let l=await $(e.http,i.open),y=l.data.open;if(!j(y))throw new r("Factor API returned no open job listing.");if(y.offers!==!1)throw new r(c.offers);if(typeof y.customer!="string")throw new r("Factor API returned no open job customer.");if(oe(ae(y.customer),t))throw new r("A customer cannot apply for its own Factor job.");if(y.applying!==!0)throw new r("This Factor job is not taking applications now.")}let u=s!==void 0&&s.stage!=="register",a=u?s.at:d.asOf,f=u?s.createdAt:p;if(typeof a!="number"||typeof f!="number"||!Number.isSafeInteger(f)||f>p)throw new r("Invalid Factor message time. Start the tool again.");I(a,f);let h,w,F,g;if(o==="factor_sign_up")h=X({address:t,name:i.name,does:i.does,at:a});else if(o==="factor_apply_to_job")h=ee({open:i.open,address:t,pitch:i.pitch,at:a});else{if(w=Q(a,f,i.expires_in_days),F=u?s.id:_e(8).toString("hex"),u&&s.exp!==w)throw new r("Factor link expiry changed. Start the tool again.");g={v:1,agent:t.toLowerCase(),price:i.price,title:i.title,brief:i.brief,due:i.due_in_hours,early:i.allow_early,exp:w,id:F},h=Z({address:t,priceWei:g.price,title:g.title,brief:g.brief,dueHours:g.due,allowEarly:g.early,exp:w,id:F})}let A=w??Math.min(a+600,f+600);if(A<=p||A>p+2592e3||w===void 0&&Math.abs(d.asOf-a)>600)throw new r("The Factor message expired. Start the tool again.");let he={stage:ne[o],wallet:t,chainId:4663,args:i,at:a,createdAt:f,expiresAt:A,message:h,...w===void 0?{}:{exp:w,id:F}};if(u&&(s.message!==h||s.expiresAt!==A))throw new r("Factor message continuation changed. Start the tool again.");let _=o==="factor_create_pay_link"?`${c.payLink}
|
|
4
|
+
${c.half}
|
|
5
|
+
${c.fees}`:c.names;if(n.signature===void 0)return{steps:[{kind:"message",message:h}],continuation:he,summary:_};if(!u||typeof n.signature!="string"||!/^0x[0-9a-fA-F]{130}$/.test(n.signature))throw new r("Provide this wallet\u2019s signature and Factor message continuation.");let H;try{H=await ke({message:h,signature:n.signature})}catch{throw new r("The Factor message signature is invalid. Nothing was posted.")}if(!oe(H,t))throw new r("The Factor message signature does not match this wallet and its arguments. Nothing was posted.");if(o==="factor_sign_up"){try{await x(e,"/agents/profile",{address:t.toLowerCase(),name:i.name,does:i.does,at:a,signature:n.signature})}catch(l){throw new r(`This wallet is registered on chain, but its Factor profile post failed: ${e.plainError(l)} Run factor_sign_up again to retry its profile.`)}return{registered:!0,profiled:!0,summary:_}}if(o==="factor_apply_to_job"){let l=await x(e,"/openjobs/apply",{open:i.open,agent:t.toLowerCase(),pitch:i.pitch,at:a,signature:n.signature});return{open:i.open,applied:!0,source:c.apiLabel,data:M(l),summary:_}}let T=te(g,n.signature),J={url:`https://factoragents.fun/pay/${T}`,x402:`https://factoragents.fun/api/v1/x402/${T}`,token:T,link:g};try{return await x(e,"/pay/links",{link:T}),{...J,published:!0,summary:_}}catch(l){return{...J,published:!1,publicationError:e.plainError(l),summary:_}}}async function N(e,o,n,t){if(o==="factor_sign_up")return le(e,o,n,t);let i=fe(n,t);if(o==="factor_deliver"&&i){if(typeof n.work!="string")throw new r("Public delivery requires the work text before publication.");let a=R(n),f={job:b(n.job,"job").toString(),proof:a,show:!0};if(i.stage!=="delivery"||n.show!==!0)throw new r("Invalid public Factor delivery continuation.");de(i,f),await P(e,t,!1);let h=await Y(e.clientFor(4663),f.job,t);if(![3,4,5].includes(h.state))throw new r("Factor delivery is not confirmed on chain yet.");if(h.proof.toLowerCase()!==a)throw new r("The delivered proof does not match this work fingerprint. Nothing was posted.");try{return await x(e,"/jobs/delivery",{job:f.job,work:n.work}),{proof:a,shown:!0,summary:c.publicWork}}catch(w){return{proof:a,shown:!1,publicationError:e.plainError(w),summary:c.publicWork}}}if(i)throw new r("This Factor write takes no continuation.");let s=Object.fromEntries(Object.entries(n).filter(([a])=>a!=="continuation")),d=await D(e,o,s,t);if(await e.preview(d,t),o==="factor_deliver"){let a=R(n),f=n.show===!0;return{txs:d,proof:a,show:f,summary:f?c.publicWork:c.privateWork,...f?{continuation:{stage:"delivery",wallet:t,chainId:4663,args:{job:b(n.job,"job").toString(),proof:a,show:!0}}}:{}}}if(o==="factor_decline")return{txs:d,summary:c.decline};let p=b(n.amount,"amount"),u=p*S.ADVANCE_FEE_BPS/S.BPS;return{txs:d,amount:p.toString(),fee:u.toString(),net:(p-u).toString(),summary:`Draw ${L(p)} ETH [${p} wei]; fee ${L(u)} ETH [${u} wei]; net ${L(p-u)} ETH [${p-u} wei].
|
|
6
|
+
${c.half}
|
|
7
|
+
${c.fees}
|
|
8
|
+
${c.poolBar}`}}var Ne=e=>{if(e.network==="testnet")return{name:"factor",tools:[]};function o(t,i,s,d){return{name:t,inputSchema:{type:"object",additionalProperties:!1,properties:i,required:s,description:U[t]},async execute(p,u){return E(p,Object.keys(i),s),d(p,ae(u))}}}let n=Object.keys(ie).map(t=>o(t,{...ie[t],...Fe},t==="factor_sign_up"?["name","does"]:t==="factor_create_pay_link"?["price","title"]:["open"],(i,s)=>le(e,t,i,s)));return n.push(o("factor_draw",{job:m(k),amount:m('Advance amount of ETH in base units (wei; ETH has 18 decimals). Example: "1000000000000000" = 0.001 ETH.'),from:{type:"string",enum:["early","pool"],description:'"early": advance the customer allowed on this job; "pool": advance from the desk pool. Check factor_can_draw first.'}},["job","amount","from"],(t,i)=>N(e,"factor_draw",t,i)),o("factor_deliver",{job:m(k),work:{type:"string",description:"The work text. Its keccak256 hash goes on chain; the text is published only if show is true. Give work or proof."},proof:{type:"string",pattern:"^0x[0-9a-fA-F]{64}$",description:"Work fingerprint: 0x plus 64 hex digits, the keccak256 of the work text. Alternative to work; must match it if both are given."},show:{type:"boolean",default:!1,description:"True publishes the work text on the Factor job page after delivery. Defaults to false (private)."},continuation:{type:"object",description:"The continuation returned by the delivery call when show is true. Pass it back unchanged, with work, to publish; leave out otherwise."}},["job"],(t,i)=>N(e,"factor_deliver",t,i)),o("factor_decline",{job:m(k)},["job"],(t,i)=>N(e,"factor_decline",t,i)),o("factor_job",{job:m(k)},["job"],t=>q(e.http,b(t.job,"job"))),o("factor_can_draw",{job:m(k)},["job"],async t=>({...await V(e.clientFor(4663),b(t.job,"job")),note:c.deskOnly})),o("factor_my_jobs",{as:{type:"string",enum:["agent","customer"],default:"agent",description:'List jobs where this wallet is the "agent" (worker, default) or the "customer" (payer).'}},[],async(t,i)=>{if(t.as!==void 0&&t.as!=="agent"&&t.as!=="customer")throw new r("Choose agent or customer for Factor jobs.");return{...se(await z(e.http,i,t.as??"agent"),50),wallet:i,note:`${c.deskOnly} Shows at most 50 jobs for this wallet.`}}),o("factor_open_jobs",{show:{type:"string",enum:["open","all"],default:"open",description:'"open": only open listings (default); "all": every listing, not only open ones.'},mine:{type:"string",enum:["agent","customer"],description:'Only listings where this wallet is the "agent" or the "customer". Leave out for all listings.'},verified_only:{type:"boolean",default:!1,description:"True limits results to verified owners. Defaults to false."}},[],async(t,i)=>{if(t.show!==void 0&&t.show!=="open"&&t.show!=="all")throw new r("Choose open or all listings.");if(t.mine!==void 0&&t.mine!=="agent"&&t.mine!=="customer")throw new r("Choose agent or customer for mine.");let s=new URLSearchParams;return t.show!==void 0&&s.set("show",t.show),t.mine!==void 0&&s.set(t.mine,i.toLowerCase()),pe(t.verified_only,"verified_only")&&s.set("verified","1"),{...se(await G((p,u)=>e.http(`${p}${s.size?`?${s}`:""}`,u)),25),note:"Shows at most 25 listings."}}),o("factor_open_job",{open:ce},["open"],t=>$(e.http,ue(t.open)))),{name:"factor",tools:n}};export{ye as buildDecline,me as buildDeliver,ge as buildDraw,we as buildRegister,Ne as createModule,be as rebuildFactorAction};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare class FactorTextError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export type FactorTextKind = 'name' | 'does' | 'title' | 'pitch' | 'brief';
|
|
5
|
+
export interface FactorProfileMessage {
|
|
6
|
+
address: string;
|
|
7
|
+
name: string;
|
|
8
|
+
does: string;
|
|
9
|
+
at: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FactorPayLinkMessage {
|
|
12
|
+
address: string;
|
|
13
|
+
priceWei: string;
|
|
14
|
+
title: string;
|
|
15
|
+
brief?: string;
|
|
16
|
+
dueHours: number;
|
|
17
|
+
allowEarly: boolean;
|
|
18
|
+
exp: number;
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface FactorApplyMessage {
|
|
22
|
+
open: string;
|
|
23
|
+
address: string;
|
|
24
|
+
pitch?: string;
|
|
25
|
+
at: number;
|
|
26
|
+
}
|
|
27
|
+
export interface FactorPayLinkFacts {
|
|
28
|
+
v: 1;
|
|
29
|
+
agent: string;
|
|
30
|
+
price: string;
|
|
31
|
+
title: string;
|
|
32
|
+
brief: string;
|
|
33
|
+
due: number;
|
|
34
|
+
early: boolean;
|
|
35
|
+
exp: number;
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function normaliseOneLine(value: unknown, min: number, max: number): string;
|
|
39
|
+
export declare function normaliseBrief(value: unknown): string;
|
|
40
|
+
export declare function checkText(kind: FactorTextKind, value: unknown): void;
|
|
41
|
+
export declare function assertAtWindow(asOf: number, now: number): void;
|
|
42
|
+
export declare function payLinkExpiry(asOf: number, now: number, days: number): number;
|
|
43
|
+
export declare function profileMessage({ address, name, does, at }: FactorProfileMessage): string;
|
|
44
|
+
export declare function payLinkMessage({ address, priceWei, title, brief, dueHours, allowEarly, exp, id }: FactorPayLinkMessage): string;
|
|
45
|
+
export declare function applyMessage({ open, address, pitch, at }: FactorApplyMessage): string;
|
|
46
|
+
export declare function payLinkToken(facts: FactorPayLinkFacts, signature: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../../../chunks/5XAXJEWM.js";import"../../../chunks/63YRSLDK.js";export{a as FactorTextError,i as applyMessage,e as assertAtWindow,d as checkText,c as normaliseBrief,b as normaliseOneLine,f as payLinkExpiry,h as payLinkMessage,j as payLinkToken,g as profileMessage};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const FACTOR_SNAPSHOT: {
|
|
2
|
+
readonly chainId: 4663;
|
|
3
|
+
readonly blockNumber: 107272178n;
|
|
4
|
+
readonly blockHash: "0x1a641b0acfca30a12686f032664231ed6c0b21b6eefd2c080585c5f797335e11";
|
|
5
|
+
readonly packCommit: "7faf3ad594ddd19ae8700b02f3efc9d9006eface";
|
|
6
|
+
readonly sourceCommit: "713df4eca1f41ef27434a7eb8edf484a4c7cdc83";
|
|
7
|
+
};
|
|
8
|
+
export declare const FACTOR_PINS: {
|
|
9
|
+
readonly desk: {
|
|
10
|
+
readonly address: `0x${string}`;
|
|
11
|
+
readonly codeHash: "0x62f56fb1f0e0ebf6371132f36d3b8b134f6ac1913a27697cd064ee51ae90eafc";
|
|
12
|
+
};
|
|
13
|
+
readonly burnPot: {
|
|
14
|
+
readonly address: `0x${string}`;
|
|
15
|
+
readonly codeHash: "0xb186b2d260e86cd1b200eaf2843bc61a00c42a650458ec7325278fd35ba3ab60";
|
|
16
|
+
};
|
|
17
|
+
readonly gateway: {
|
|
18
|
+
readonly address: `0x${string}`;
|
|
19
|
+
readonly codeHash: "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470";
|
|
20
|
+
};
|
|
21
|
+
readonly line: {
|
|
22
|
+
readonly address: `0x${string}`;
|
|
23
|
+
readonly codeHash: "0x83926b11b8c0522bb06955b943bb2f9272edf6636495024cc21e6b396114b231";
|
|
24
|
+
};
|
|
25
|
+
readonly lineAccountImplementation: {
|
|
26
|
+
readonly address: `0x${string}`;
|
|
27
|
+
readonly codeHash: "0x7086ac2f1b2af935c98c6140d9fb3eebd24d5e5dd698cd9a9dba3328e6a7ace3";
|
|
28
|
+
};
|
|
29
|
+
readonly accounts: {
|
|
30
|
+
readonly address: `0x${string}`;
|
|
31
|
+
readonly codeHash: "0x560df7e0b37e4551c4d3047a5c2284a22e6fb9eccd0fced5c5918fd111a265b2";
|
|
32
|
+
};
|
|
33
|
+
readonly accountImplementation: {
|
|
34
|
+
readonly address: `0x${string}`;
|
|
35
|
+
readonly codeHash: "0xb957ce9c0530ebfe458eafb7b2cd4a00bb9572c4c922ecbd9466cdea924da133";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const FACTOR_CONSTANTS: {
|
|
39
|
+
readonly BPS: 10000n;
|
|
40
|
+
readonly ADVANCE_MAX_BPS: 5000n;
|
|
41
|
+
readonly ADVANCE_FEE_BPS: 100n;
|
|
42
|
+
readonly JOB_FEE_BPS: 200n;
|
|
43
|
+
readonly REJECTED_BPS: 5000n;
|
|
44
|
+
readonly POOL_OUT_MAX_BPS: 8000n;
|
|
45
|
+
readonly MIN_JOB: 1000000000000000n;
|
|
46
|
+
readonly MIN_DUE: 3600n;
|
|
47
|
+
readonly MAX_DUE: 2592000n;
|
|
48
|
+
readonly GRACE: 43200n;
|
|
49
|
+
readonly REVIEW: 86400n;
|
|
50
|
+
readonly CUSTOMER_FEES_MIN: 1000000000000000n;
|
|
51
|
+
};
|
|
52
|
+
export declare const FACTOR_SELECTORS: {
|
|
53
|
+
readonly 'register()': "0x1aa3a008";
|
|
54
|
+
readonly 'draw(uint256,uint256,uint8)': "0xe895a7a7";
|
|
55
|
+
readonly 'deliver(uint256,bytes32)': "0xd9b42a7f";
|
|
56
|
+
readonly 'decline(uint256)': "0xa0355f4e";
|
|
57
|
+
readonly 'job(uint256)': "0x2329e48c";
|
|
58
|
+
readonly 'agent(address)': "0x92e423b5";
|
|
59
|
+
readonly 'canDrawOn(uint256)': "0xdf9343f0";
|
|
60
|
+
readonly 'owed(address)': "0xdf18e047";
|
|
61
|
+
readonly 'keyOf(address)': "0xfa073d76";
|
|
62
|
+
readonly 'burnPot()': "0xdd428d4d";
|
|
63
|
+
readonly 'gateway()': "0x116191b6";
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"../../../chunks/CZL6T2ZQ.js";import"../../../chunks/63YRSLDK.js";export{c as FACTOR_CONSTANTS,b as FACTOR_PINS,d as FACTOR_SELECTORS,a as FACTOR_SNAPSHOT};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
+
import type { FactorCanDraw, FactorJob } from './types.js';
|
|
3
|
+
export { readState } from './api.js';
|
|
4
|
+
export interface DeskCheck {
|
|
5
|
+
codeHash: Hex;
|
|
6
|
+
burnPot: Address;
|
|
7
|
+
gateway: Address;
|
|
8
|
+
stateDesk: Address | 'unreachable';
|
|
9
|
+
}
|
|
10
|
+
type ReaderClient = Pick<PublicClient, 'getChainId' | 'getCode' | 'readContract'>;
|
|
11
|
+
type JobId = string | bigint;
|
|
12
|
+
export declare function assertDesk(check: DeskCheck, needsState: boolean): void;
|
|
13
|
+
export declare function readDesk(client: ReaderClient): Promise<Omit<DeskCheck, 'stateDesk'>>;
|
|
14
|
+
export declare function readJob(client: ReaderClient, job: JobId): Promise<FactorJob>;
|
|
15
|
+
export declare function canDrawOn(client: ReaderClient, job: JobId): Promise<FactorCanDraw>;
|
|
16
|
+
export declare function lineKeyOf(client: ReaderClient, account: Address): Promise<Address>;
|
|
17
|
+
export declare function walletHasCode(client: ReaderClient, wallet: Address): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g}from"../../../chunks/JJGZ7W3V.js";import"../../../chunks/CZL6T2ZQ.js";import"../../../chunks/ZQ6AF3VX.js";import{a}from"../../../chunks/K7HTDKAT.js";import"../../../chunks/DGCJZ3HO.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as assertDesk,e as canDrawOn,f as lineKeyOf,c as readDesk,d as readJob,a as readState,g as walletHasCode};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Address, ContractFunctionReturnType } from 'viem';
|
|
2
|
+
import type { FACTOR_DESK_ABI } from './abi.js';
|
|
3
|
+
export type FactorJob = ContractFunctionReturnType<typeof FACTOR_DESK_ABI, 'view', 'job'>;
|
|
4
|
+
export type FactorAgent = ContractFunctionReturnType<typeof FACTOR_DESK_ABI, 'view', 'agent'>;
|
|
5
|
+
export type FactorDrawKind = 'early' | 'pool';
|
|
6
|
+
export type FactorJobState = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
7
|
+
export interface FactorSiteState {
|
|
8
|
+
desk: Address;
|
|
9
|
+
asOf: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FactorCanDraw {
|
|
12
|
+
early: string;
|
|
13
|
+
pool: string;
|
|
14
|
+
}
|
|
15
|
+
export interface FactorApiRecord {
|
|
16
|
+
source: 'Factor API (can lag the chain)';
|
|
17
|
+
data: Readonly<Record<string, unknown>>;
|
|
18
|
+
}
|
|
File without changes
|
|
@@ -3,13 +3,14 @@ export declare const GLOAM_COPY: {
|
|
|
3
3
|
readonly partner: "Gloam is an official Oak partner. Gloam's own team runs its product and contracts; Oak didn't build them and doesn't run them.";
|
|
4
4
|
readonly beta: "Gloam is in Mainnet Beta. Deposits are capped: {deposit_room} USDG can go in right now.";
|
|
5
5
|
readonly custody: "Your private balance is held as secret notes saved on this computer, encrypted with your wallet. If those notes and your backup are both lost, the money is lost; Oak and Gloam cannot recover it.";
|
|
6
|
-
readonly claim: "Until a payment sent to you is claimed, the sender
|
|
6
|
+
readonly claim: "Until a payment sent to you is claimed, the sender still holds its secret and could take it back. Oak claims it right away into a new note only you know.";
|
|
7
|
+
readonly noUndo: "Oak has no tool to take a payment back. Check the receive tag before you confirm; a payment to a mistyped tag cannot be undone through Oak.";
|
|
7
8
|
readonly fee: "Cashing out costs {fee_pct}% ({fee} USDG), read from Gloam's contract just now. You receive {receives} USDG in {wallet}.";
|
|
8
9
|
readonly exit: "Cashing out to your wallet shows on chain that this wallet received {receives} USDG from Gloam. It does not show where the money came from inside Gloam.";
|
|
9
10
|
readonly admin: "One Gloam wallet can lower deposit limits or the cash-out fee at once; raising the fee (up to 1%) or the limits takes a 3-day public wait.";
|
|
10
11
|
readonly freeze: "USDG's issuer can freeze tokens, including tokens held by Gloam's vault.";
|
|
11
|
-
readonly relay: "Oak's server passes your proof to Gloam's relay, which submits it and pays the network fee, so your wallet does not send that transaction. Oak's server sees your computer's internet address and the public proof, which for a cash-out names your wallet as the recipient. It never sees your notes.";
|
|
12
|
-
readonly shield: "After your deposit lands, Oak's server sends its public transaction hash to Gloam so Gloam counts it toward Oak.";
|
|
12
|
+
readonly relay: "Oak's server passes your proof to Gloam's relay, which submits it and pays the network fee, so your wallet does not send that transaction. Oak's server sees your computer's internet address and the public proof, which for a cash-out names your wallet as the recipient. It never sees your notes. If Oak's server can't be reached, Oak sends this through Gloam's public relay instead, and Gloam then sees your computer's internet address.";
|
|
13
|
+
readonly shield: "After your deposit lands, Oak's server sends its public transaction hash to Gloam so Gloam counts it toward Oak. That public hash can be linked to your wallet on chain.";
|
|
13
14
|
readonly fallback: "Oak's server couldn't be reached, so Gloam's public relay submitted this; Gloam saw your computer's internet address.";
|
|
14
15
|
};
|
|
15
16
|
export interface GloamRiskFacts {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../chunks/63YRSLDK.js";var e={partner:"Gloam is an official Oak partner. Gloam's own team runs its product and contracts; Oak didn't build them and doesn't run them.",beta:"Gloam is in Mainnet Beta. Deposits are capped: {deposit_room} USDG can go in right now.",custody:"Your private balance is held as secret notes saved on this computer, encrypted with your wallet. If those notes and your backup are both lost, the money is lost; Oak and Gloam cannot recover it.",claim:"Until a payment sent to you is claimed, the sender
|
|
2
|
-
`).replace(/\{(deposit_room|fee_pct|fee|receives|wallet)\}/g,(
|
|
1
|
+
import"../../../chunks/63YRSLDK.js";var e={partner:"Gloam is an official Oak partner. Gloam's own team runs its product and contracts; Oak didn't build them and doesn't run them.",beta:"Gloam is in Mainnet Beta. Deposits are capped: {deposit_room} USDG can go in right now.",custody:"Your private balance is held as secret notes saved on this computer, encrypted with your wallet. If those notes and your backup are both lost, the money is lost; Oak and Gloam cannot recover it.",claim:"Until a payment sent to you is claimed, the sender still holds its secret and could take it back. Oak claims it right away into a new note only you know.",noUndo:"Oak has no tool to take a payment back. Check the receive tag before you confirm; a payment to a mistyped tag cannot be undone through Oak.",fee:"Cashing out costs {fee_pct}% ({fee} USDG), read from Gloam's contract just now. You receive {receives} USDG in {wallet}.",exit:"Cashing out to your wallet shows on chain that this wallet received {receives} USDG from Gloam. It does not show where the money came from inside Gloam.",admin:"One Gloam wallet can lower deposit limits or the cash-out fee at once; raising the fee (up to 1%) or the limits takes a 3-day public wait.",freeze:"USDG's issuer can freeze tokens, including tokens held by Gloam's vault.",relay:"Oak's server passes your proof to Gloam's relay, which submits it and pays the network fee, so your wallet does not send that transaction. Oak's server sees your computer's internet address and the public proof, which for a cash-out names your wallet as the recipient. It never sees your notes. If Oak's server can't be reached, Oak sends this through Gloam's public relay instead, and Gloam then sees your computer's internet address.",shield:"After your deposit lands, Oak's server sends its public transaction hash to Gloam so Gloam counts it toward Oak. That public hash can be linked to your wallet on chain.",fallback:"Oak's server couldn't be reached, so Gloam's public relay submitted this; Gloam saw your computer's internet address."};function l(t,a,s=!1){let n={deposit_room:t.depositRoom,fee_pct:t.feePct,fee:t.fee,receives:t.receives,wallet:t.wallet},o=[e.partner,e.beta,e.custody,e.claim];return a==="gloam_pay"&&o.push(e.noUndo),o.push(e.fee,e.exit,e.admin,e.freeze),a==="gloam_shield"?o.push(e.shield):(a==="gloam_pay"||a==="gloam_claim"||a==="gloam_cash_out")&&o.push(s?e.fallback:e.relay),o.join(`
|
|
2
|
+
`).replace(/\{(deposit_room|fee_pct|fee|receives|wallet)\}/g,(i,r)=>n[r])}export{e as GLOAM_COPY,l as renderGloamRisk};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as i}from"../../../chunks/FIO6VC2J.js";import{a as d}from"../../../chunks/APQYLJGS.js";import{b as a}from"../../../chunks/HS4DZPYT.js";import"../../../chunks/77CLMPM7.js";import"../../../chunks/3VWVW7PX.js";import{b as o}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var u="Gloam runs on your computer; the Oak server never handles Gloam notes. Nothing was sent.",n={type:"string",pattern:"^[0-9]+$",description:'USDG amount in base units (6 decimals): "1000000" = 1 USDG.'},l={gloam_status:{type:"object",additionalProperties:!1,properties:{},required:[]},gloam_shield:{type:"object",additionalProperties:!1,properties:{amount:n},required:["amount"]},gloam_pay:{type:"object",additionalProperties:!1,properties:{to:{type:"string",pattern:"^gloamr1\\.",description:"Recipient\u2019s Gloam receiving code, beginning gloamr1."},amount:n},required:["to","amount"]},gloam_claim:{type:"object",additionalProperties:!1,properties:{ticket:{type:"string",pattern:"^gloam2t\\.",description:"Optional Gloam payment ticket beginning gloam2t.; omit to scan for payments."}},required:[]},gloam_cash_out:{type:"object",additionalProperties:!1,properties:{note:{type:"string",pattern:"^(note_[0-9]+|all)$",description:"Local note identifier (note_ followed by digits), or all to cash out every eligible note."}},required:["note"]}},g=Object.keys(l);function b(s,t){if(s.network==="testnet")return o("gloam",[]);let p=g.map(e=>({name:e,inputSchema:l[e],...e==="gloam_claim"?{free:!0}:{},execute:async(m,c)=>{if(!t)throw new Error(u);let r=await t.plan(e,a(e,m),c);return i(r),r}}));return o("gloam",[{tools:p}])}export{d as GLOAM_ENGINE_API,u as GLOAM_LOCAL_REFUSAL,b as createModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/4JTTA3BX.js";import"../../../chunks/M7ZXDLKM.js";import"../../../chunks/DSTMEY5F.js";import"../../../chunks/FV4WZOTD.js";import"../../../chunks/OARVU3RC.js";import"../../../chunks/WUT7TZYM.js";import"../../../chunks/A3PN3PK3.js";import"../../../chunks/L646YWDP.js";import"../../../chunks/DNNFKDZR.js";import"../../../chunks/BB765L75.js";import"../../../chunks/HHO5ISMM.js";import"../../../chunks/GSFHM5L3.js";import"../../../chunks/PV4AK32X.js";import"../../../chunks/CAWTAR5V.js";import"../../../chunks/CQ5WRWV4.js";import"../../../chunks/IV4K7FMD.js";import"../../../chunks/ZQAFFWDK.js";import"../../../chunks/FL5SSHUL.js";import"../../../chunks/H5DY7CNB.js";import"../../../chunks/LIUXNOLP.js";import"../../../chunks/KKPMOAVI.js";import"../../../chunks/Y77EVVT4.js";import"../../../chunks/XHYFISVV.js";import"../../../chunks/5PI57UC2.js";import"../../../chunks/PV5FDT6O.js";import"../../../chunks/UEDGYZOC.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/6NUNCD5J.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/FWD4L3CJ.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{b as createModule,a as createModulePart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U}from"../../../chunks/SJJR4ZBZ.js";import{b as I}from"../../../chunks/AFBEZXNV.js";import{c as L,e as D}from"../../../chunks/46547QT3.js";import"../../../chunks/HOEQVPY7.js";import"../../../chunks/VEQBHI6O.js";import"../../../chunks/OTXSKFUD.js";import{b as w,e as u}from"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import{a as R}from"../../../chunks/FWD4L3CJ.js";import{a as F}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var me=["release","contract","commit","docs","correction","other"],O=20,$=4,x=48,Y=4,Z=3,N=6,K=3e5,M=600,B=512,v=/^[a-z0-9][a-z0-9-]{0,79}$/,V=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/,S=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,q=/\.(?:localhost|local|localdomain|internal|intranet|lan|home|corp|private|home\.arpa)$/,H=Object.freeze({FEATURE_RELEASE:"release",PRODUCT_LAUNCH:"release",APP_RELEASE:"release",GITHUB_RELEASE:"release",API_RELEASE:"release",SDK_RELEASE:"release",DEMO_RELEASE:"release",DESIGN_RELEASE:"release",CONTRACT_DEPLOY:"contract",CONTRACT_UPGRADE:"contract",CONTRACT_DEPLOY_FOLLOWUP:"contract",CODE_ACTIVITY:"commit",DOCS_UPDATE:"docs",CORRECTION:"correction",RETRACTION:"correction"}),J=new Set(["listProjects","getProjectTimeline","getPartnerScanCard","listChanges"]),Q=new Set(["pons_launch_info","pons_holders"]);function ee(e){return{async hey(t,n){if(!J.has(t))throw new Error(`Blocked HEY read ${t}`);let o=await e("heyresearch_read",{operation:t,parameters:n});if(!u(o)||o.operation!==t||!u(o.data))throw new Error("Unexpected HEY response");return o.data},async oak(t,n){if(!Q.has(t))throw new Error(`Blocked read ${t}`);return e(t,n)}}}function T(e){return typeof e=="string"&&e.trim().length>0}function A(e){if(typeof e!="string"||!V.test(e))return;let t=Date.parse(e);return Number.isFinite(t)&&new Date(t).toISOString().slice(0,19)===e.slice(0,19)?t:void 0}function z(e){if(!(typeof e!="string"||e.length>2048||/[\s<>\\]/.test(e)||S.test(e)))try{let t=new URL(e),n=t.hostname.toLowerCase().replace(/\.$/,"");return t.protocol!=="https:"||t.username||t.password||!n||n.startsWith("[")||/^[\d.]+$/.test(n)||!n.includes(".")||n==="localhost"||q.test(n)||!/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/.test(n)||!/[a-z]/.test(n.slice(n.lastIndexOf(".")+1))?void 0:t}catch{return}}function y(e){throw new F(e)}function te(e){return Array.isArray(e)||y("Provide the follow list as an array."),e.map(t=>((!u(t)||t.chainId!==R)&&y("Only Robinhood Chain mainnet (4663) follows can be checked."),(typeof t.token!="string"||!w.test(t.token))&&y("Each follow needs a full token address."),(typeof t.projectSlug!="string"||!v.test(t.projectSlug))&&y("Each follow needs a valid HEY project slug."),t.lastCheckedAt!==null&&A(t.lastCheckedAt)===void 0&&y("lastCheckedAt must be null or a UTC time such as 2026-11-02T12:00:00.000Z."),t.after!==void 0&&t.after!==null&&!P(t.after)&&y("Each follow cursor must be null or a cursor HEY returned."),t))}function P(e){return typeof e=="string"&&e.length>0&&e.length<=B&&!S.test(e)}function ne(e){return e===void 0?{}:((!u(e)||Object.values(e).some(t=>!P(t)))&&y("Continuation cursors must be the strings a previous page returned."),Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])))}function G(e,t,n){let o=i=>{n.push({code:"item_omitted",detail:i,slug:t.slug})};if(!u(e))return o("A row was not an object.");if(!T(e.id)||e.id.length>240)return o("A row had no usable receipt id.");let r=A(e.at);if(r===void 0)return o(`Receipt ${e.id} has no valid UTC publication time.`);if(r>t.reference+K)return o(`Receipt ${e.id} is dated in the future.`);if(!T(e.title)||e.title.length>M||S.test(e.title))return o(`Receipt ${e.id} has unusable text.`);let c=z(e.source);if(!c)return o(`Receipt ${e.id} has no public HTTPS source.`);let d=typeof e.eventType=="string"?e.eventType:void 0,g=e.withdrawn===!0?"correction":d!==void 0&&Object.hasOwn(H,d)?H[d]:"other";return{at:r,recorded:A(e.recordedAt),key:`${t.slug}|${g==="correction"?"correction:":""}${e.id}`,item:{project_slug:t.slug,project_name:t.name,hey_status:t.status,update_type:g,update_text:e.title,published_at:e.at,source_host:c.hostname,source_url:e.source}}}function X(e){return e.map((t,n)=>({candidate:t,index:n})).sort((t,n)=>n.candidate.at-t.candidate.at||t.index-n.index).map(({candidate:t})=>t.item)}function se(e,t){let n=e.nextCursor;if(!u(e.project)||e.project.slug!==t||!Array.isArray(e.items)||!(n==null||typeof n=="string"&&n.length>0&&n.length<=B))throw new Error("Unexpected timeline");return{items:e.items,next:n??null}}async function oe(e,t,n){let o=e.offset??0;(!Number.isSafeInteger(o)||o<0)&&y("offset must be a whole number from zero.");let r=new Date(n()).toISOString(),c=[],d=[],l=new Set,g=!0,i=o,_,k=0;for(;i!==void 0&&k<Y&&_===void 0;){let p;try{p=await t.hey("listProjects",{has:["token"],sort:"newest",limit:x,offset:i})}catch{return c.push({code:"unavailable",detail:"The HEY project list could not be read."}),{mode:"browse",items:[],oak:{},coverage:c,complete:!1,continuation:{offset:i},checkedThrough:r}}if(!Array.isArray(p.items)||!(p.nextOffset===void 0||Number.isSafeInteger(p.nextOffset)&&p.nextOffset>i))return c.push({code:"bad_pagination",detail:"HEY returned a project list whose paging could not be followed."}),{mode:"browse",items:[],oak:{},coverage:c,complete:!1,continuation:{offset:i},checkedThrough:r};k++;let E=i;for(let[f,s]of p.items.entries()){let a=u(s)&&u(s.token)?s.token:void 0;if(!u(s)||typeof s.slug!="string"||!v.test(s.slug)||!T(s.name)||s.name.length>M||S.test(s.name)||!a||a.chainId!==R||typeof a.contractAddress!="string"||!w.test(a.contractAddress)){c.push({code:"project_skipped",detail:"A listed project has no Robinhood Chain mainnet token HEY can bind to it.",...u(s)&&typeof s.slug=="string"&&v.test(s.slug)?{slug:s.slug}:{}});continue}if(!l.has(s.slug)){if(d.length>=x){_=E+f;break}l.add(s.slug),d.push({slug:s.slug,name:s.name,token:a.contractAddress})}}i=p.nextOffset}let b=[];for(let p=0;p<d.length;p+=N){let E=d.slice(p,p+N),f=await Promise.all(E.map(async s=>{let a=await W(t,{chainId:R,token:s.token,projectSlug:s.slug,lastCheckedAt:null}),C={...s,status:a.status==="tied"?a.line:a.status==="untied"&&a.statusLine?a.statusLine:"HEY Research Lab context unavailable"};try{let m=await t.hey("getProjectTimeline",{slug:C.slug,lens:"build",limit:Z});return{project:C,...se(m,C.slug)}}catch{return{project:C,failed:!0}}}));for(let s of f){if("failed"in s){g=!1,c.push({code:"unavailable",detail:"This project's updates could not be read.",slug:s.project.slug});continue}let a={slug:s.project.slug,name:s.project.name,status:s.project.status,reference:n()};for(let C of s.items){let m=G(C,a,c);m&&!l.has(m.key)&&(l.add(m.key),b.push(m))}}}let h=_??i;return h!==void 0&&(g=!1),{mode:"browse",items:X(b),oak:{},coverage:c,complete:g,continuation:h===void 0?null:{offset:h},checkedThrough:r}}async function W(e,t){let n;try{n=await e.hey("getPartnerScanCard",{chain:R,token:t.token})}catch{return{status:"unavailable"}}let o=n.found===!1&&n.contractAddress===void 0?{...n,contractAddress:t.token}:n,r=I(o,R,t.token);if(!r)return{status:"unavailable"};if(!r.found)return{status:"untied",detail:"HEY has no published project for this token. An empty feed proves nothing.",statusLine:L};let c=u(n.project)?n.project:void 0,d="";try{d=new URL(r.project_link).pathname.split("/")[2]??""}catch{}let l=c?.slug===t.projectSlug&&d===t.projectSlug,g=D(r.status_label,r.status_help);return r.token_verification!=="VERIFIED"||!r.activity_applies_to_token||!l?{status:"untied",detail:"HEY does not tie this token to the followed project, so no builder history is shown for it.",...l?{statusLine:g}:{}}:{status:"tied",line:g,name:T(c?.name)?String(c?.name):t.projectSlug}}function re(e,t,n){if(!u(e.query)||e.query.project!==t||e.query.mode!=="sync"||!Array.isArray(e.items)||typeof e.hasMore!="boolean"||!(P(e.nextCursor)||e.nextCursor===null&&e.hasMore===!1&&e.items.length===0)||e.ignoredParameters!==void 0&&(!Array.isArray(e.ignoredParameters)||e.ignoredParameters.length>0))throw new Error("Unexpected change ledger page");if(e.items.some(o=>u(o)&&(o.op!=="retract"||o.project!==void 0)&&(!u(o.project)||o.project.slug!==t)))throw new Error("Change belongs to another project");return{items:e.items,next:e.nextCursor===null?n:e.nextCursor,more:e.hasMore}}function ie(e,t,n){if(u(e)&&e.op==="retract"&&T(e.id)&&e.id.length<=240&&!S.test(e.id))return n.push({code:"retraction",slug:t.slug,detail:`HEY retracted ${e.id}. Empty fields were not supplied by the tombstone.`}),{at:A(e.recordedAt)??0,recorded:A(e.recordedAt),key:`${t.slug}|${e.id}|${String(e.revision)}|retract`,item:{project_slug:t.slug,project_name:t.name,hey_status:t.status,update_type:"correction",update_text:"",published_at:A(e.recordedAt)===void 0?"":e.recordedAt,source_host:"",source_url:""}};if(!u(e)||e.op!=="upsert"){n.push({code:"item_omitted",slug:t.slug,detail:"A change had no supported ledger operation."});return}let o=Array.isArray(e.evidence)?e.evidence.find(l=>u(l)&&z(l.url)):void 0,r=u(e.facts)?e.facts:{},c=typeof r.eventType=="string"?r.eventType:typeof e.type=="string"&&e.type.startsWith("build.")?e.type.slice(6).toUpperCase():void 0,d=G({id:e.id,at:e.occurredAt??e.detectedAt??e.recordedAt,recordedAt:e.recordedAt,title:e.summary,eventType:c,source:u(o)?o.url:void 0},t,n);return d&&(d.key=`${t.slug}|${String(e.id)}|${String(e.revision)}|upsert`),d}async function ae(e,t,n,o){let r=[],c=[],d={},l={},g=!0,i=e.token.toLowerCase(),_={launch_info:null,addresses:null};for(let[E,f,s]of[["launch_info","pons_launch_info",{token:e.token}],["addresses","pons_holders",{token:e.token,limit:1}]])try{let a=await t.oak(f,s);if(E==="addresses"){let C=U(a,e.token);_.addresses=C?.addresses??null,C||r.push({code:"oak_unavailable",detail:"Address figures were not read for this token.",token:i})}else _.launch_info=a}catch{r.push({code:"oak_unavailable",detail:`${f} could not be read for this token; it is unknown, not empty.`,token:i})}let k=await W(t,e);if(k.status==="unavailable")return g=!1,r.push({code:"unavailable",detail:"HEY's scan for this token could not be read.",slug:e.projectSlug,token:i}),o[i]&&(d[i]=o[i]),{key:i,facts:_,coverage:r,candidates:c,nextCursors:d,after:l,complete:g};if(k.status==="untied")return r.push({code:"tie_not_verified",detail:k.detail,slug:e.projectSlug,token:i,...k.statusLine?{statusLine:k.statusLine,statusNote:"show exactly"}:{}}),{key:i,facts:_,coverage:r,candidates:c,nextCursors:d,after:l,complete:g};let b={slug:e.projectSlug,name:k.name,status:k.line,reference:n},h=o[i]??e.after??"c1.0",p=new Set([h]);for(let E=0;;E++){if(E>=Y){g=!1,d[i]=h;break}let f;try{f=re(await t.hey("listChanges",{project:e.projectSlug,after:h,limit:x}),e.projectSlug,h)}catch{g=!1,r.push({code:"unavailable",detail:"This project's change ledger could not be read.",slug:e.projectSlug,token:i}),d[i]=h;break}if(p.has(f.next)&&(f.more||f.items.length>0)){g=!1,r.push({code:"bad_pagination",detail:"HEY repeated a continuation cursor.",slug:e.projectSlug,token:i}),d[i]=h;break}for(let s of f.items){let a=ie(s,b,r);a&&c.push(a)}if(!f.more){l[i]=f.next;break}p.add(f.next),h=f.next}return{key:i,facts:_,coverage:r,candidates:c,nextCursors:d,after:l,complete:g}}async function ce(e,t,n){let o=te(e.entries),r=A(e.until);r===void 0&&y("until must be a UTC time such as 2026-11-02T12:00:00.000Z.");let c=ne(e.cursors),d=Object.keys(c).length>0,l=[],g={},i=[],_=new Set,k={},b={},h=!0,p=o.filter(a=>!d||Object.hasOwn(c,a.token.toLowerCase())),E=p.slice(0,O),f=p.slice(O);f.length&&(h=!1,l.push({code:"follow_limit",detail:`At most ${O} followed tokens are read at once; ${f.length} remain.`})),o.length||l.push({code:"no_follows",detail:"The follow list is empty. An empty feed proves nothing."});for(let a=0;a<E.length;a+=$){let C=await Promise.all(E.slice(a,a+$).map(m=>ae(m,t,Math.max(r,n()),c)));for(let m of C){g[m.key]=m.facts,l.push(...m.coverage),Object.assign(k,m.nextCursors),Object.assign(b,m.after),m.complete||(h=!1);for(let j of m.candidates)_.has(j.key)||(_.add(j.key),i.push(j))}}let s={};return Object.keys(k).length&&(s.cursors=k),f.length&&(s.remainingTokens=f.map(a=>a.token)),{mode:"updates",items:X(i),oak:g,coverage:l,complete:h,after:b,continuation:Object.keys(s).length?s:null,checkedThrough:e.until}}async function he(e,t,n={}){let o=ee(t);return u(e)&&e.mode==="browse"?oe(e,o,n.now??Date.now):u(e)&&e.mode==="updates"?ce(e,o,n.now??Date.now):y("Choose browse or updates.")}export{me as UPDATE_TYPES,he as readBuilderFeed};
|
|
1
|
+
import{b as O}from"../../../chunks/CNLL4NCR.js";import{a as H}from"../../../chunks/CSDN4MYP.js";import{b as U}from"../../../chunks/WNWRF4HE.js";import{c as D,g as I}from"../../../chunks/GQ3XZFRL.js";import"../../../chunks/HOEQVPY7.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import{b as w,e as u}from"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import{a as A}from"../../../chunks/FWD4L3CJ.js";import{a as L}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var Ee=["release","contract","commit","docs","correction","other"],x=20,$=4,M=48,N=12,B=4,J=3,P=6,V=3e5,z=600,G=512,v=/^[a-z0-9][a-z0-9-]{0,79}$/,q=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/,S=/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u,Q=/\.(?:localhost|local|localdomain|internal|intranet|lan|home|corp|private|home\.arpa)$/,Y=Object.freeze({FEATURE_RELEASE:"release",PRODUCT_LAUNCH:"release",APP_RELEASE:"release",GITHUB_RELEASE:"release",API_RELEASE:"release",SDK_RELEASE:"release",DEMO_RELEASE:"release",DESIGN_RELEASE:"release",CONTRACT_DEPLOY:"contract",CONTRACT_UPGRADE:"contract",CONTRACT_DEPLOY_FOLLOWUP:"contract",CODE_ACTIVITY:"commit",DOCS_UPDATE:"docs",CORRECTION:"correction",RETRACTION:"correction"}),ee=new Set(["listProjects","getProjectTimeline","getPartnerScanCard","listChanges"]),te=new Set(["pons_launch_info","pons_holders"]);function ne(e){return{async hey(t,n){if(!ee.has(t))throw new Error(`Blocked HEY read ${t}`);let o=await e("heyresearch_read",{operation:t,parameters:n,detail:"full"});if(!u(o)||o.operation!==t||!u(o.data))throw new Error("Unexpected HEY response");return o.data},async oak(t,n){if(!te.has(t))throw new Error(`Blocked read ${t}`);return e(t,n)}}}function T(e){return typeof e=="string"&&e.trim().length>0}function R(e){if(typeof e!="string"||!q.test(e))return;let t=Date.parse(e);return Number.isFinite(t)&&new Date(t).toISOString().slice(0,19)===e.slice(0,19)?t:void 0}function W(e){if(!(typeof e!="string"||e.length>2048||/[\s<>\\]/.test(e)||S.test(e)))try{let t=new URL(e),n=t.hostname.toLowerCase().replace(/\.$/,"");return t.protocol!=="https:"||t.username||t.password||!n||n.startsWith("[")||/^[\d.]+$/.test(n)||!n.includes(".")||n==="localhost"||Q.test(n)||!/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/.test(n)||!/[a-z]/.test(n.slice(n.lastIndexOf(".")+1))?void 0:t}catch{return}}function b(e){throw new L(e)}function se(e){return Array.isArray(e)||b("Provide the follow list as an array."),e.map(t=>((!u(t)||t.chainId!==A)&&b("Only Robinhood Chain mainnet (4663) follows can be checked."),(typeof t.token!="string"||!w.test(t.token))&&b("Each follow needs a full token address."),(typeof t.projectSlug!="string"||!v.test(t.projectSlug))&&b("Each follow needs a valid HEY project slug."),t.lastCheckedAt!==null&&R(t.lastCheckedAt)===void 0&&b("lastCheckedAt must be null or a UTC time such as 2026-11-02T12:00:00.000Z."),t.after!==void 0&&t.after!==null&&!F(t.after)&&b("Each follow cursor must be null or a cursor HEY returned."),t))}function F(e){return typeof e=="string"&&e.length>0&&e.length<=G&&!S.test(e)}function oe(e){return e===void 0?{}:((!u(e)||Object.values(e).some(t=>!F(t)))&&b("Continuation cursors must be the strings a previous page returned."),Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])))}function X(e,t,n){let o=i=>{n.push({code:"item_omitted",detail:i,slug:t.slug})};if(!u(e))return o("A row was not an object.");if(!T(e.id)||e.id.length>240)return o("A row had no usable receipt id.");let r=R(e.at);if(r===void 0)return o(`Receipt ${e.id} has no valid UTC publication time.`);if(r>t.reference+V)return o(`Receipt ${e.id} is dated in the future.`);if(!T(e.title)||e.title.length>z||S.test(e.title))return o(`Receipt ${e.id} has unusable text.`);let d=W(e.source);if(!d)return o(`Receipt ${e.id} has no public HTTPS source.`);let a=typeof e.eventType=="string"?e.eventType:void 0,g=e.withdrawn===!0?"correction":a!==void 0&&Object.hasOwn(Y,a)?Y[a]:"other";return{at:r,recorded:R(e.recordedAt),key:`${t.slug}|${g==="correction"?"correction:":""}${e.id}`,item:{project_slug:t.slug,project_name:t.name,hey_status:t.status,update_type:g,update_text:e.title,published_at:e.at,source_host:d.hostname,source_url:e.source}}}function Z(e){return e.map((t,n)=>({candidate:t,index:n})).sort((t,n)=>n.candidate.at-t.candidate.at||t.index-n.index).map(({candidate:t})=>t.item)}function re(e,t){let n=e.nextCursor;if(!u(e.project)||e.project.slug!==t||!Array.isArray(e.items)||!(n==null||typeof n=="string"&&n.length>0&&n.length<=G))throw new Error("Unexpected timeline");return{items:e.items,next:n??null}}async function ie(e,t,n){let o=e.offset??0;(!Number.isSafeInteger(o)||o<0)&&b("offset must be a whole number from zero.");let r=new Date(n()).toISOString(),d=[],a=[],l=new Set,g=!0,i=o,E,k=0;for(O(0,void 0,"Reading HEY Research Lab projects");i!==void 0&&k<B&&E===void 0&&a.length<N;){let p;try{p=await t.hey("listProjects",{has:["token"],sort:"newest",limit:M,offset:i})}catch{return d.push({code:"unavailable",detail:"The HEY project list could not be read."}),{mode:"browse",items:[],oak:{},coverage:d,complete:!1,continuation:{offset:i},checkedThrough:r}}if(!Array.isArray(p.items)||!(p.nextOffset===void 0||Number.isSafeInteger(p.nextOffset)&&p.nextOffset>i))return d.push({code:"bad_pagination",detail:"HEY returned a project list whose paging could not be followed."}),{mode:"browse",items:[],oak:{},coverage:d,complete:!1,continuation:{offset:i},checkedThrough:r};k++;let _=i;for(let[f,s]of p.items.entries()){let c=u(s)&&u(s.token)?s.token:void 0;if(!u(s)||typeof s.slug!="string"||!v.test(s.slug)||!T(s.name)||s.name.length>z||S.test(s.name)||!c||c.chainId!==A||typeof c.contractAddress!="string"||!w.test(c.contractAddress)){d.push({code:"project_skipped",detail:"A listed project has no Robinhood Chain mainnet token HEY can bind to it.",...u(s)&&typeof s.slug=="string"&&v.test(s.slug)?{slug:s.slug}:{}});continue}if(!l.has(s.slug)){if(a.length>=N){E=_+f;break}l.add(s.slug),a.push({slug:s.slug,name:s.name,token:c.contractAddress})}}i=p.nextOffset}let y=[];for(let p=0;p<a.length;p+=P){let _=a.slice(p,p+P),f=await Promise.all(_.map(async s=>{let c=await K(t,{chainId:A,token:s.token,projectSlug:s.slug,lastCheckedAt:null}),C={...s,status:c.status==="tied"?c.line:c.status==="untied"&&c.statusLine?c.statusLine:"HEY Research Lab context unavailable"};try{let m=await t.hey("getProjectTimeline",{slug:C.slug,lens:"build",limit:J});return{project:C,...re(m,C.slug)}}catch{return{project:C,failed:!0}}}));for(let s of f){if("failed"in s){g=!1,d.push({code:"unavailable",detail:"This project's updates could not be read.",slug:s.project.slug});continue}let c={slug:s.project.slug,name:s.project.name,status:s.project.status,reference:n()};for(let C of s.items){let m=X(C,c,d);m&&!l.has(m.key)&&(l.add(m.key),y.push(m))}}O(Math.min(p+P,a.length),a.length,"Read HEY Research Lab project updates")}let h=E??i;return h!==void 0&&(g=!1),{mode:"browse",items:Z(y),oak:{},coverage:d,complete:g,continuation:h===void 0?null:{offset:h},checkedThrough:r}}async function K(e,t){let n;try{n=await e.hey("getPartnerScanCard",{chain:A,token:t.token})}catch{return{status:"unavailable"}}let o=n.found===!1&&n.contractAddress===void 0?{...n,contractAddress:t.token}:n,r=U(o,A,t.token);if(!r)return{status:"unavailable"};if(!r.found)return{status:"untied",detail:"HEY has no published project for this token. An empty feed proves nothing.",statusLine:D};let d=u(n.project)?n.project:void 0,a="";try{a=new URL(r.project_link).pathname.split("/")[2]??""}catch{}let l=d?.slug===t.projectSlug&&a===t.projectSlug,g=I(r.status_label,r.status_help);return r.token_verification!=="VERIFIED"||!r.activity_applies_to_token||!l?{status:"untied",detail:"HEY does not tie this token to the followed project, so no builder history is shown for it.",...l?{statusLine:g}:{}}:{status:"tied",line:g,name:T(d?.name)?String(d?.name):t.projectSlug}}function ae(e,t,n){if(!u(e.query)||e.query.project!==t||e.query.mode!=="sync"||!Array.isArray(e.items)||typeof e.hasMore!="boolean"||!(F(e.nextCursor)||e.nextCursor===null&&e.hasMore===!1&&e.items.length===0)||e.ignoredParameters!==void 0&&(!Array.isArray(e.ignoredParameters)||e.ignoredParameters.length>0))throw new Error("Unexpected change ledger page");if(e.items.some(o=>u(o)&&(o.op!=="retract"||o.project!==void 0)&&(!u(o.project)||o.project.slug!==t)))throw new Error("Change belongs to another project");return{items:e.items,next:e.nextCursor===null?n:e.nextCursor,more:e.hasMore}}function ce(e,t,n){if(u(e)&&e.op==="retract"&&T(e.id)&&e.id.length<=240&&!S.test(e.id))return n.push({code:"retraction",slug:t.slug,detail:`HEY retracted ${e.id}. Empty fields were not supplied by the tombstone.`}),{at:R(e.recordedAt)??0,recorded:R(e.recordedAt),key:`${t.slug}|${e.id}|${String(e.revision)}|retract`,item:{project_slug:t.slug,project_name:t.name,hey_status:t.status,update_type:"correction",update_text:"",published_at:R(e.recordedAt)===void 0?"":e.recordedAt,source_host:"",source_url:""}};if(!u(e)||e.op!=="upsert"){n.push({code:"item_omitted",slug:t.slug,detail:"A change had no supported ledger operation."});return}let o=Array.isArray(e.evidence)?e.evidence.find(l=>u(l)&&W(l.url)):void 0,r=u(e.facts)?e.facts:{},d=typeof r.eventType=="string"?r.eventType:typeof e.type=="string"&&e.type.startsWith("build.")?e.type.slice(6).toUpperCase():void 0,a=X({id:e.id,at:e.occurredAt??e.detectedAt??e.recordedAt,recordedAt:e.recordedAt,title:e.summary,eventType:d,source:u(o)?o.url:void 0},t,n);return a&&(a.key=`${t.slug}|${String(e.id)}|${String(e.revision)}|upsert`),a}async function de(e,t,n,o){let r=[],d=[],a={},l={},g=!0,i=e.token.toLowerCase(),E={launch_info:null,addresses:null};for(let[_,f,s]of[["launch_info","pons_launch_info",{token:e.token}],["addresses","pons_holders",{token:e.token,limit:1}]])try{let c=await t.oak(f,s);if(_==="addresses"){let C=H(c,e.token);E.addresses=C?.addresses??null,C||r.push({code:"oak_unavailable",detail:"Address figures were not read for this token.",token:i})}else E.launch_info=c}catch{r.push({code:"oak_unavailable",detail:`${f} could not be read for this token; it is unknown, not empty.`,token:i})}let k=await K(t,e);if(k.status==="unavailable")return g=!1,r.push({code:"unavailable",detail:"HEY's scan for this token could not be read.",slug:e.projectSlug,token:i}),o[i]&&(a[i]=o[i]),{key:i,facts:E,coverage:r,candidates:d,nextCursors:a,after:l,complete:g};if(k.status==="untied")return r.push({code:"tie_not_verified",detail:k.detail,slug:e.projectSlug,token:i,...k.statusLine?{statusLine:k.statusLine,statusNote:"show exactly"}:{}}),{key:i,facts:E,coverage:r,candidates:d,nextCursors:a,after:l,complete:g};let y={slug:e.projectSlug,name:k.name,status:k.line,reference:n},h=o[i]??e.after??"c1.0",p=new Set([h]);for(let _=0;;_++){if(_>=B){g=!1,a[i]=h;break}let f;try{f=ae(await t.hey("listChanges",{project:e.projectSlug,after:h,limit:M}),e.projectSlug,h)}catch{g=!1,r.push({code:"unavailable",detail:"This project's change ledger could not be read.",slug:e.projectSlug,token:i}),a[i]=h;break}if(p.has(f.next)&&(f.more||f.items.length>0)){g=!1,r.push({code:"bad_pagination",detail:"HEY repeated a continuation cursor.",slug:e.projectSlug,token:i}),a[i]=h;break}for(let s of f.items){let c=ce(s,y,r);c&&d.push(c)}if(!f.more){l[i]=f.next;break}p.add(f.next),h=f.next}return{key:i,facts:E,coverage:r,candidates:d,nextCursors:a,after:l,complete:g}}async function ue(e,t,n){let o=se(e.entries),r=R(e.until);r===void 0&&b("until must be a UTC time such as 2026-11-02T12:00:00.000Z.");let d=oe(e.cursors),a=Object.keys(d).length>0,l=[],g={},i=[],E=new Set,k={},y={},h=!0,p=o.filter(c=>!a||Object.hasOwn(d,c.token.toLowerCase())),_=p.slice(0,x),f=p.slice(x);f.length&&(h=!1,l.push({code:"follow_limit",detail:`At most ${x} followed tokens are read at once; ${f.length} remain.`})),o.length||l.push({code:"no_follows",detail:"The follow list is empty. An empty feed proves nothing."});for(let c=0;c<_.length;c+=$){let C=await Promise.all(_.slice(c,c+$).map(m=>de(m,t,Math.max(r,n()),d)));for(let m of C){g[m.key]=m.facts,l.push(...m.coverage),Object.assign(k,m.nextCursors),Object.assign(y,m.after),m.complete||(h=!1);for(let j of m.candidates)E.has(j.key)||(E.add(j.key),i.push(j))}}let s={};return Object.keys(k).length&&(s.cursors=k),f.length&&(s.remainingTokens=f.map(c=>c.token)),{mode:"updates",items:Z(i),oak:g,coverage:l,complete:h,after:y,continuation:Object.keys(s).length?s:null,checkedThrough:e.until}}async function _e(e,t,n={}){let o=ne(t);return u(e)&&e.mode==="browse"?ie(e,o,n.now??Date.now):u(e)&&e.mode==="updates"?ue(e,o,n.now??Date.now):b("Choose browse or updates.")}export{Ee as UPDATE_TYPES,_e as readBuilderFeed};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as N}from"../../../chunks/6JAXZNZ3.js";import{a as L}from"../../../chunks/AFBEZXNV.js";import{b as R}from"../../../chunks/46547QT3.js";import{a as O}from"../../../chunks/HOEQVPY7.js";import{a as $}from"../../../chunks/TWR7BF72.js";import"../../../chunks/TMVO2DAK.js";import{b as Y}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import{a as q}from"../../../chunks/VEQBHI6O.js";import"../../../chunks/OTXSKFUD.js";import"../../../chunks/66F5ZH34.js";import{b,e as c,g as T}from"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import{a as m}from"../../../chunks/FWD4L3CJ.js";import{a as u,e as M}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var I="https://heyresearch.xyz",U=6e4,F=120,D=/^[a-z0-9][a-z0-9-]{0,79}$/,K=`${R} HEY Research Lab records public activity. These records are not investment advice, a buy or sell signal, or a safety verdict. Null means not measured.`,z=`${R} Keyed research, not advice. Preserve per-item found/error states and input order. The server key is not returned. Private responses are not cached.`,G=`${R} Stateless receipt validation. HEY stores nothing and does not endorse the conclusion. Oak does not cache this receipt.`,B=new WeakMap;function h(e){return typeof e=="string"&&e.trim().length>0}function E(e){return h(e)&&Number.isFinite(Date.parse(e))}function A(e){return e===null||typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function H(e){if(!h(e))return!1;try{let r=new URL(e);return r.origin===I&&!r.username&&!r.password}catch{return!1}}function k(){throw new u("HEY returned an unexpected response. Please try again.")}function C(e,r){if((e.schema!=="hey.agent-intelligence-response"||e.schemaVersion!=="1"||e.capability!==r||e.status!=="ok"||!c(e.chain)||e.chain.chainId!==m||!c(e.data)||!c(e.links)||!H(e.links.page)||!c(e.citation)||!h(e.citation.text)||!E(e.citation.asOf)||!E(e.asOf))&&k(),r==="research_project"){(!c(e.subject)||!c(e.subject.project)||!h(e.subject.project.slug)||!c(e.data.builderState)||!h(e.data.builderState.activityStatus)||typeof e.data.builderState.activityMeasured!="boolean"||!A(e.data.builderState.meaningfulEvents30d))&&k();let t=e.subject.project.token;t!=null&&(!c(t)||t.chainId!==m||typeof t.address!="string"||!b.test(t.address))&&k()}else r==="chain_brief"&&(!c(e.data.window)||!E(e.data.window.from)||!E(e.data.window.to)||!c(e.data.shipped)||!A(e.data.shipped.ships)||!A(e.data.shipped.projects))&&k()}function J(e,r){(e.chain_id!==m||typeof e.contract_address!="string"||e.contract_address.toLowerCase()!==r||!H(e.project_link)||!h(e.hey_status_label)||!h(e.token_verification)||typeof e.activity_applies_to_token!="boolean"||typeof e.activity_measured!="boolean"||!A(e.meaningful_ships_30d)||!E(e.as_of)||!h(e.disclaimer)||e.token_verification==="MISMATCH"&&e.activity_applies_to_token!==!1)&&k()}function V(e){(e.chainId!==m||!Array.isArray(e.days)||e.days.length===0||!e.days.every(r=>c(r)&&typeof r.day=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(r.day)&&A(r.ships)&&A(r.transactions)&&(r.chainObservedAt===null||E(r.chainObservedAt))))&&k()}function W(e,r){let t=n=>{throw new u(`HEY scan_cards returned an unexpected ${n}. Please try again.`)};(!Array.isArray(e.items)||e.items.length!==r.length)&&t("items"),e.requested!==r.length&&t("requested count"),(typeof e.found_count!="number"||!Number.isSafeInteger(e.found_count)||e.found_count<0)&&t("found_count"),h(e.disclaimer)||t("disclaimer");for(let[n,s]of e.items.entries()){(!c(s)||s.input!==r[n])&&t(`items[${n}].input`);let i=s;typeof i.found!="boolean"&&t(`items[${n}].found`),i.chainId!==m&&t(`items[${n}].chainId`),(typeof i.contractAddress!="string"||!T(i.contractAddress,r[n]))&&t(`items[${n}].contractAddress`),h(i.disclaimer)||t(`items[${n}].disclaimer`),i.found&&(!c(i.project)||!c(i.activity)||!H(i.project_link)||!h(i.status)||!h(i.status_label)||!h(i.status_help)||!h(i.research_level)||typeof i.verified_builder!="boolean"||typeof i.activity_measured!="boolean"||!["VERIFIED","UNVERIFIED","MISMATCH"].includes(String(i.token_verification))||typeof i.activity_applies_to_token!="boolean"||i.token_verification==="MISMATCH"&&i.activity_applies_to_token!==!1||!["measured","no_source","not_researched"].includes(String(i.coverage)))&&t(`items[${n}] scan card`)}}var j=class extends u{constructor(t,n,s){super(s);this.status=t;this.code=n}status;code};function P(e,r,t=""){let n=c(r)?r.error:void 0,s=c(n)?n.code:n;if(e===400&&s==="ambiguous"){let p=(c(n)&&Array.isArray(n.candidates)?n.candidates:[]).flatMap(d=>c(d)&&typeof d.slug=="string"&&D.test(d.slug)?[d.slug]:[]);return new j(e,s,`The HEY query is ambiguous. Choose a project slug${p.length?`: ${p.join(", ")}`:" or use a contract address"}.`)}if(e===404&&(s==="not_found"||s==="not_published")){if(t.startsWith("/api/evidence/"))return new j(e,s,"The cited HEY evidence receipt is unavailable. Check the exact typed id; missing evidence is not a finding.");let i=c(r)&&H(r.scan_url)?` See ${r.scan_url}.`:"";return new j(e,s,`HEY has not published a matching project. This describes its index, not the token.${i}`)}return new j(e,s,e>=400&&e<500&&e!==429?L(e,t).message:`HEY returned HTTP ${e}. Please try again.`)}async function Q(e){let r=e.body?.getReader();if(!r)return"";let t=[],n=0;try{for(;;){let{done:p,value:d}=await r.read();if(p)break;if(n+=d.byteLength,n>2e6)throw await r.cancel(),new u("HEY response exceeds the two-megabyte read limit. Narrow the query.");t.push(d)}}finally{r.releaseLock()}let s=new Uint8Array(n),i=0;for(let p of t)s.set(p,i),i+=p.byteLength;return new TextDecoder().decode(s)}function X(e){let r=B.get(e.http);r||(r={cache:new Map,pending:new Map,requests:[],backoff:O()},B.set(e.http,r));let t=r;return async(n,s,i="json",p,d=!1,w=1)=>{let l=d?e.heyApiKey:void 0;if(d&&!l)throw new u("HEY bulk reads require an operator-configured server API key. Never provide a key in tool arguments.");if(l&&(typeof l!="string"||l.length>4096||[...l].some(o=>o.charCodeAt(0)<33||o.charCodeAt(0)>126)))throw new u("The server HEY API key configuration is invalid. Ask the Oak operator to correct it.");let a=p===void 0&&!d;if(t.backoff.blocked())throw new u(t.backoff.limited()?"HEY received too many requests. Please try again later.":"HEY Research Lab is temporarily unavailable. Please try again later.");let f=Date.now();for(let[o,_]of t.cache)_.expires<=f&&t.cache.delete(o);let y=a?t.cache.get(n):void 0;if(y)return s(y.body),structuredClone(y.body);let S=a?t.pending.get(n):void 0;if(S){let o=await S;return s(o),structuredClone(o)}if(t.requests=t.requests.filter(o=>o>f-U),t.requests.length+w>F)throw new u("HEY received too many requests. Please try again later.");for(let o=0;o<w;o++)t.requests.push(f);let g=(async()=>{try{let o=await e.http(`${I}${n}`,{method:p===void 0?"GET":"POST",credentials:"omit",redirect:"error",headers:{accept:i==="csv"?"text/csv":"application/json","x-hey-integration":"oak/1.0.0","user-agent":"oak/1.0.0",...p===void 0?{}:{"content-type":"application/json"},...l?{authorization:`Bearer ${l}`}:{}},...p===void 0?{}:{body:JSON.stringify(p)},signal:AbortSignal.timeout(1e4)}).catch(v=>{if(v instanceof q)return v.response;throw t.backoff.defer(null),v});if(o.status===429)throw t.backoff.defer(o.headers.get("retry-after"),!0),await o.body?.cancel(),new u("HEY received too many requests. Please try again later.");if(o.status>=500)throw t.backoff.defer(o.headers.get("retry-after")),await o.body?.cancel(),P(o.status,null,n);let _;try{let v=await Q(o);_=i==="csv"&&o.ok?{format:"csv",value:v}:JSON.parse(v)}catch(v){throw v instanceof u?v:o.ok?new u("HEY returned malformed JSON. Please try again."):P(o.status,null,n)}if(d&&[401,403].includes(o.status))throw new u("HEY refused keyed access. Ask the Oak operator to check the server key and allowance.");if(!o.ok)throw P(o.status,_,n);return c(_)||k(),s(_),a&&t.cache.set(n,{body:_,expires:Date.now()+U}),_}catch(o){throw o instanceof u?o:new u(M(o))}})();a&&t.pending.set(n,g);try{return structuredClone(await g)}finally{a&&t.pending.delete(n)}}}function x(e,r){if(!c(e)||Object.keys(e).some(t=>t!==r))throw new u(`Provide only ${r}; HEY reads are fixed to Robinhood Chain 4663.`)}var Z=e=>{let r=X(e);return{tools:[{name:"heyresearch_research_project",inputSchema:{type:"object",additionalProperties:!1,required:["project"],properties:{project:{type:"string",minLength:1,maxLength:200,description:"A project slug, project name, ticker search, or token contract address on chain 4663."}}},async execute(t){if(x(t,"project"),!h(t.project)||t.project.trim().length>200)throw new u("Provide a project slug, name, ticker, or token contract address.");let n=t.project.trim();if(/^0x/i.test(n)&&!b.test(n))throw new u("Provide a full token contract address on Robinhood Chain 4663.");let s=b.test(n)?"address":D.test(n)?"project":"q",i=s==="address"?n.toLowerCase():n,p=g=>r(`/api/agent/research_project?${g}=${encodeURIComponent(i)}`,o=>C(o,"research_project")),d;try{d=await p(s)}catch(g){if(s!=="project"||!(g instanceof j)||g.status!==404||g.code!=="not_found")throw g;d=await p("q")}let w=d.subject.project,l=c(w.token)?w.token.address:void 0,a=s==="address"?i:l?.toLowerCase(),f=a?await r(`/api/v1/builder?chain=${m}&token=${a}&integration=oak/1.0.0`,g=>J(g,a)):null,y=f?.activity_applies_to_token===!1;s==="address"&&l&&l.toLowerCase()!==a&&!y&&k();let S=d.links;return{chainId:m,research:d,builder:f,freshnessAssessment:$(d),attribution:{page:S.page,citation:d.citation,...f&&!y?{project_link:f.project_link}:{}},warnings:y?["This activity belongs to the project, not this token. The project names a different contract; do not link this token to the project."]:[],notAdvice:!0,disclaimer:K}}},{name:"heyresearch_chain_activity",inputSchema:{type:"object",additionalProperties:!1,properties:{days:{type:"integer",minimum:1,maximum:30,default:7,description:"UTC days of chain activity alongside the seven-day builder brief."}}},async execute(t){x(t,"days");let n=t.days===void 0?7:t.days;if(typeof n!="number"||!Number.isInteger(n)||n<1||n>30)throw new u("Provide a whole number of days from 1 to 30.");let s=await r("/api/agent/chain_brief",p=>C(p,"chain_brief")),i=await r(`/api/chain?days=${n}`,V);return{chainId:m,brief:s,activity:i,freshnessAssessment:$({brief:s,activity:i}),attribution:{page:s.links.page,citation:s.citation,activity:`${I}/api/chain?days=${n}`},notAdvice:!0,disclaimer:K}}},N(r,C),{name:"heyresearch_bulk",inputSchema:{type:"object",additionalProperties:!1,required:["operation","items"],properties:{operation:{type:"string",enum:["snapshots","tokens","scan_cards"],description:"Keyed GET reads. Requires an Oak operator-configured server key; one upstream allowance unit per input. Results are not cached."},items:{type:"array",minItems:1,maxItems:30,items:{type:"string"},description:"Up to 10 project slugs for snapshots; up to 30 token addresses for tokens or scan_cards. Repeated inputs and their order are preserved."}}},async execute(t){if(!c(t)||Object.keys(t).some(a=>!["operation","items"].includes(a)))throw new u("Provide only the bulk operation and items; configure credentials on the Oak server.");let n=t.operation;if(!["snapshots","tokens","scan_cards"].includes(String(n))||!Array.isArray(t.items)||!t.items.length||t.items.length>(n==="snapshots"?10:30)||t.items.some(a=>typeof a!="string"||!(n==="snapshots"?D:b).test(a)))throw new u("Provide up to 10 valid project slugs or up to 30 full token addresses for the chosen bulk operation.");let s=t.items,i=new URLSearchParams(n==="snapshots"?{slugs:s.join(",")}:n==="tokens"?{addresses:s.join(",")}:{chain:String(m),tokens:s.join(",")}),p=`${n==="snapshots"?"/api/snapshots":n==="tokens"?`/api/token/${m}`:"/api/v1/scan"}?${i}`,d=await r(p,a=>{if(n==="scan_cards")return W(a,s);(!Array.isArray(a.items)||a.items.length!==s.length||a.requested!==s.length||typeof a.found!="number"||!Number.isSafeInteger(a.found)||a.found<0||typeof a.disclaimer!="string"||a.items.some((f,y)=>!c(f)||f.input!==s[y]||typeof f.found!="boolean"||c(f.data)&&f.data.chainId!==void 0&&f.data.chainId!==m))&&k()},"json",void 0,!0,s.length),w=d.items.filter(a=>a.found===!0).length,l=n==="scan_cards"?d.found_count:d.found;return{consistency:{reportedFound:l,countedFound:w,consistent:l===w},warnings:l===w?[]:[`HEY reports ${n==="scan_cards"?"found_count":"found"}=${l}, but ${w} returned items have found=true. Provider data is preserved; check the per-item states.`],chainId:m,operation:n,data:d,attribution:{source:`${I}${p}`,provider:"HEY Research Lab"},notAdvice:!0,untrusted:!0,disclaimer:z}}},{name:"heyresearch_validate_receipt",inputSchema:{type:"object",additionalProperties:!1,required:["receipt"],properties:{receipt:{type:"object",description:"AgentResearchReceipt v1. Sent to HEY for stateless validation; no reasoning trace, wallet credential or API key. Maximum 64 KiB."}}},async execute(t){if(x(t,"receipt"),!c(t.receipt))throw new u("Provide an AgentResearchReceipt object.");let n=JSON.stringify(t.receipt);if(new TextEncoder().encode(n).length>65536)throw new u("The research receipt exceeds 64 KiB.");if(/"(?:private_key|secret_key|wallet_key|mnemonic|seed|seed_phrase|recovery_phrase)"\s*:/i.test(n))throw new u("Do not include wallet credentials in a research receipt.");let s=await r("/api/receipts/validate",i=>{(!Object.keys(i).length||i.error)&&k()},"json",t.receipt);return{chainId:m,data:s,attribution:{source:`${I}/api/receipts/validate`,provider:"HEY Research Lab"},notAdvice:!0,disclaimer:G}}}]}},ue=e=>Y("heyresearch",[Z(e)]);export{z as HEY_KEYED_DISCLAIMER,G as HEY_RECEIPT_DISCLAIMER,K as HEY_RECORDS_DISCLAIMER,ue as createModule,Z as createModulePart};
|
|
1
|
+
import{c as D,d as P,e as O,f as J}from"../../../chunks/3DNJTJ2X.js";import{a as x}from"../../../chunks/TWR7BF72.js";import"../../../chunks/TMVO2DAK.js";import{a as F}from"../../../chunks/WNWRF4HE.js";import{b as C}from"../../../chunks/GQ3XZFRL.js";import{a as K}from"../../../chunks/HOEQVPY7.js";import{f as B}from"../../../chunks/OEZ7FCLF.js";import{b as N}from"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import{a as U}from"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import{b as R,e as o,g as L}from"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import{a as w}from"../../../chunks/FWD4L3CJ.js";import{a as d,e as q}from"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";var I="https://heyresearch.xyz",z=6e4,Q=120,Y=/^[a-z0-9][a-z0-9-]{0,79}$/,G=`${C} HEY Research Lab records public activity. These records are not investment advice, a buy or sell signal, or a safety verdict. Null means not measured.`,X=`${C} Keyed research, not advice. Preserve per-item found/error states and input order. The server key is not returned. Private responses are not cached.`,Z=`${C} Stateless receipt validation. HEY stores nothing and does not endorse the conclusion. Oak does not cache this receipt.`,V=new WeakMap;function g(e){return typeof e=="string"&&e.trim().length>0}function A(e){return g(e)&&Number.isFinite(Date.parse(e))}function S(e){return e===null||typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function $(e){if(!g(e))return!1;try{let r=new URL(e);return r.origin===I&&!r.username&&!r.password}catch{return!1}}function v(){throw new d("HEY returned an unexpected response. Please try again.")}function M(e,r){if((e.schema!=="hey.agent-intelligence-response"||e.schemaVersion!=="1"||e.capability!==r||e.status!=="ok"||!o(e.chain)||e.chain.chainId!==w||!o(e.data)||!o(e.links)||!$(e.links.page)||!o(e.citation)||!g(e.citation.text)||!A(e.citation.asOf)||!A(e.asOf))&&v(),r==="research_project"){(!o(e.subject)||!o(e.subject.project)||!g(e.subject.project.slug)||!o(e.data.builderState)||!g(e.data.builderState.activityStatus)||typeof e.data.builderState.activityMeasured!="boolean"||!S(e.data.builderState.meaningfulEvents30d))&&v();let t=e.subject.project.token;t!=null&&(!o(t)||t.chainId!==w||typeof t.address!="string"||!R.test(t.address))&&v()}else r==="chain_brief"&&(!o(e.data.window)||!A(e.data.window.from)||!A(e.data.window.to)||!o(e.data.shipped)||!S(e.data.shipped.ships)||!S(e.data.shipped.projects))&&v()}function ee(e,r){(e.chain_id!==w||typeof e.contract_address!="string"||e.contract_address.toLowerCase()!==r||!$(e.project_link)||!g(e.hey_status_label)||!g(e.token_verification)||typeof e.activity_applies_to_token!="boolean"||typeof e.activity_measured!="boolean"||!S(e.meaningful_ships_30d)||!A(e.as_of)||!g(e.disclaimer)||e.token_verification==="MISMATCH"&&e.activity_applies_to_token!==!1)&&v()}function te(e){(e.chainId!==w||!Array.isArray(e.days)||e.days.length===0||!e.days.every(r=>o(r)&&typeof r.day=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(r.day)&&S(r.ships)&&S(r.transactions)&&(r.chainObservedAt===null||A(r.chainObservedAt))))&&v()}function ne(e,r){let t=n=>{throw new d(`HEY scan_cards returned an unexpected ${n}. Please try again.`)};(!Array.isArray(e.items)||e.items.length!==r.length)&&t("items"),e.requested!==r.length&&t("requested count"),(typeof e.found_count!="number"||!Number.isSafeInteger(e.found_count)||e.found_count<0)&&t("found_count"),g(e.disclaimer)||t("disclaimer");for(let[n,i]of e.items.entries()){(!o(i)||i.input!==r[n])&&t(`items[${n}].input`);let s=i;typeof s.found!="boolean"&&t(`items[${n}].found`),s.chainId!==w&&t(`items[${n}].chainId`),(typeof s.contractAddress!="string"||!L(s.contractAddress,r[n]))&&t(`items[${n}].contractAddress`),g(s.disclaimer)||t(`items[${n}].disclaimer`),s.found&&(!o(s.project)||!o(s.activity)||!$(s.project_link)||!g(s.status)||!g(s.status_label)||!g(s.status_help)||!g(s.research_level)||typeof s.verified_builder!="boolean"||typeof s.activity_measured!="boolean"||!["VERIFIED","UNVERIFIED","MISMATCH"].includes(String(s.token_verification))||typeof s.activity_applies_to_token!="boolean"||s.token_verification==="MISMATCH"&&s.activity_applies_to_token!==!1||!["measured","no_source","not_researched"].includes(String(s.coverage)))&&t(`items[${n}] scan card`)}}var E=class extends d{constructor(t,n,i){super(i);this.status=t;this.code=n}status;code};function T(e,r,t=""){let n=o(r)?r.error:void 0,i=o(n)?n.code:n;if(e===400&&i==="ambiguous"){let f=(o(n)&&Array.isArray(n.candidates)?n.candidates:[]).flatMap(u=>o(u)&&typeof u.slug=="string"&&Y.test(u.slug)?[u.slug]:[]);return new E(e,i,`The HEY query is ambiguous. Choose a project slug${f.length?`: ${f.join(", ")}`:" or use a contract address"}.`)}if(e===404&&(i==="not_found"||i==="not_published")){if(t.startsWith("/api/evidence/"))return new E(e,i,"The cited HEY evidence receipt is unavailable. Check the exact typed id; missing evidence is not a finding.");let s=o(r)&&$(r.scan_url)?` See ${r.scan_url}.`:"";return new E(e,i,`HEY has not published a matching project. This describes its index, not the token.${s}`)}return new E(e,i,e>=400&&e<500&&e!==429?F(e,t).message:`HEY returned HTTP ${e}. Please try again.`)}async function re(e){let r=e.body?.getReader();if(!r)return"";let t=[],n=0;try{for(;;){let{done:f,value:u}=await r.read();if(f)break;if(n+=u.byteLength,n>2e6)throw await r.cancel(),new d("HEY response exceeds the two-megabyte read limit. Narrow the query.");t.push(u)}}finally{r.releaseLock()}let i=new Uint8Array(n),s=0;for(let f of t)i.set(f,s),s+=f.byteLength;return new TextDecoder().decode(i)}function se(e){let r=V.get(e.http);r||(r={cache:new Map,pending:new Map,requests:[],backoff:K()},V.set(e.http,r));let t=r;return async(n,i,s="json",f,u=!1,p=1)=>{let h=u?e.heyApiKey:void 0;if(u&&!h)throw new d("HEY bulk reads require an operator-configured server API key. Never provide a key in tool arguments.");if(h&&(typeof h!="string"||h.length>4096||[...h].some(a=>a.charCodeAt(0)<33||a.charCodeAt(0)>126)))throw new d("The server HEY API key configuration is invalid. Ask the Oak operator to correct it.");let c=f===void 0&&!u;if(t.backoff.blocked())throw new d(t.backoff.limited()?"HEY received too many requests. Please try again later.":"HEY Research Lab is temporarily unavailable. Please try again later.");let m=Date.now();for(let[a,k]of t.cache)k.expires<=m&&t.cache.delete(a);let _=c?t.cache.get(n):void 0;if(_)return i(_.body),structuredClone(_.body);let b=c?t.pending.get(n):void 0;if(b){let a=await b;return i(a),structuredClone(a)}if(t.requests=t.requests.filter(a=>a>m-z),t.requests.length+p>Q)throw new d("HEY received too many requests. Please try again later.");for(let a=0;a<p;a++)t.requests.push(m);let H=(async()=>{try{let a=await e.http(`${I}${n}`,{method:f===void 0?"GET":"POST",credentials:"omit",redirect:"error",headers:{accept:s==="csv"?"text/csv":"application/json","x-hey-integration":"oak/1.0.0","user-agent":"oak/1.0.0",...f===void 0?{}:{"content-type":"application/json"},...h?{authorization:`Bearer ${h}`}:{}},...f===void 0?{}:{body:JSON.stringify(f)},signal:AbortSignal.timeout(1e4)}).catch(y=>{if(y instanceof U)return y.response;throw t.backoff.defer(null),y});if(a.status===429)throw t.backoff.defer(a.headers.get("retry-after"),!0),await a.body?.cancel(),new d("HEY received too many requests. Please try again later.");if(a.status>=500)throw t.backoff.defer(a.headers.get("retry-after")),await a.body?.cancel(),T(a.status,null,n);let k;try{let y=await re(a);k=s==="csv"&&a.ok?{format:"csv",value:y}:JSON.parse(y)}catch(y){throw y instanceof d?y:a.ok?new d("HEY returned malformed JSON. Please try again."):T(a.status,null,n)}if(u&&[401,403].includes(a.status))throw new d("HEY refused keyed access. Ask the Oak operator to check the server key and allowance.");if(!a.ok)throw T(a.status,k,n);return o(k)||v(),i(k),c&&t.cache.set(n,{body:k,expires:Date.now()+z}),k}catch(a){throw a instanceof d?a:new d(q(a))}})();c&&t.pending.set(n,H);try{return structuredClone(await H)}finally{c&&t.pending.delete(n)}}}function ie(e,r){if(!o(e)||Object.keys(e).some(t=>t!==r))throw new d(`Provide only ${r}; HEY reads are fixed to Robinhood Chain 4663.`)}var ae=e=>{let r=se(e);return{tools:[{name:"heyresearch_research_project",inputSchema:{type:"object",additionalProperties:!1,required:["project"],properties:{...D,project:{type:"string",minLength:1,maxLength:200,description:"A project slug, project name, ticker search, or token contract address on chain 4663."}}},async execute(t){let n=P(t,["project"]);if(!g(t.project)||t.project.trim().length>200)throw new d("Provide a project slug, name, ticker, or token contract address.");let i=t.project.trim();if(/^0x/i.test(i)&&!R.test(i))throw new d("Provide a full token contract address on Robinhood Chain 4663.");let s=R.test(i)?"address":Y.test(i)?"project":"q",f=s==="address"?i.toLowerCase():i,u=l=>r(`/api/agent/research_project?${l}=${encodeURIComponent(f)}`,j=>M(j,"research_project")),p;try{p=await u(s)}catch(l){if(s!=="project"||!(l instanceof E)||l.status!==404||l.code!=="not_found")throw l;p=await u("q")}let h=p.subject.project,c=o(h.token)?h.token.address:void 0,m=s==="address"?f:c?.toLowerCase(),_=m?await r(`/api/v1/builder?chain=${w}&token=${m}&integration=oak/1.0.0`,l=>ee(l,m)):null,b=_?.activity_applies_to_token===!1;s==="address"&&c&&c.toLowerCase()!==m&&!b&&v();let H=p.links,a={chainId:w,research:p,builder:_,freshnessAssessment:x(p),attribution:{page:H.page,citation:p.citation,..._&&!b?{project_link:_.project_link}:{}},warnings:b?["This activity belongs to the project, not this token. The project names a different contract; do not link this token to the project."]:[],notAdvice:!0,disclaimer:G},k=p.data,y={subject:p.subject,answer:p.answer,asOf:p.asOf,boundaries:p.boundaries,data:Object.fromEntries(["identity","builderState","contractIdentity","marketContext","usageContext","unknowns"].filter(l=>Object.hasOwn(k,l)).map(l=>[l,k[l]]))},W=[...Object.entries(k).filter(([l])=>!Object.hasOwn(y.data,l)).map(([l,j])=>[`data.${l}`,j]),...Object.entries(p).filter(([l])=>!Object.hasOwn(y,l))].map(([l,j])=>({name:l,chars:JSON.stringify(j).length,...Array.isArray(j)?{items:j.length}:{}}));return O(a,n,[],{...a,research:{...y,omittedSections:W}})}},{name:"heyresearch_chain_activity",inputSchema:{type:"object",additionalProperties:!1,properties:{...D,days:{type:"integer",minimum:1,maximum:30,default:7,description:"UTC days of chain activity alongside the seven-day builder brief."}}},async execute(t){let n=P(t,["days"]),i=t.days===void 0?7:t.days;if(typeof i!="number"||!Number.isInteger(i)||i<1||i>30)throw new d("Provide a whole number of days from 1 to 30.");let s=await r("/api/agent/chain_brief",h=>M(h,"chain_brief")),f=await r(`/api/chain?days=${i}`,te),u={chainId:w,brief:s,activity:f,freshnessAssessment:x({brief:s,activity:f}),attribution:{page:s.links.page,citation:s.citation,activity:`${I}/api/chain?days=${i}`},notAdvice:!0,disclaimer:G},p=n.detail==="summary"&&!n.fields.length&&JSON.stringify(s).length>3e3?B(s,{maxChars:3e3,keep:["disclaimer"]}).shaped:s;return O(u,n,["brief"],{...u,brief:p})}},J(r,M),{name:"heyresearch_bulk",inputSchema:{type:"object",additionalProperties:!1,required:["operation","items"],properties:{operation:{type:"string",enum:["snapshots","tokens","scan_cards"],description:"Keyed GET reads. Requires an Oak operator-configured server key; one upstream allowance unit per input. Results are not cached."},items:{type:"array",minItems:1,maxItems:30,items:{type:"string"},description:"Up to 10 project slugs for snapshots; up to 30 token addresses for tokens or scan_cards. Repeated inputs and their order are preserved."}}},async execute(t){if(!o(t)||Object.keys(t).some(c=>!["operation","items"].includes(c)))throw new d("Provide only the bulk operation and items; configure credentials on the Oak server.");let n=t.operation;if(!["snapshots","tokens","scan_cards"].includes(String(n))||!Array.isArray(t.items)||!t.items.length||t.items.length>(n==="snapshots"?10:30)||t.items.some(c=>typeof c!="string"||!(n==="snapshots"?Y:R).test(c)))throw new d("Provide up to 10 valid project slugs or up to 30 full token addresses for the chosen bulk operation.");let i=t.items,s=new URLSearchParams(n==="snapshots"?{slugs:i.join(",")}:n==="tokens"?{addresses:i.join(",")}:{chain:String(w),tokens:i.join(",")}),f=`${n==="snapshots"?"/api/snapshots":n==="tokens"?`/api/token/${w}`:"/api/v1/scan"}?${s}`,u=await r(f,c=>{if(n==="scan_cards")return ne(c,i);(!Array.isArray(c.items)||c.items.length!==i.length||c.requested!==i.length||typeof c.found!="number"||!Number.isSafeInteger(c.found)||c.found<0||typeof c.disclaimer!="string"||c.items.some((m,_)=>!o(m)||m.input!==i[_]||typeof m.found!="boolean"||o(m.data)&&m.data.chainId!==void 0&&m.data.chainId!==w))&&v()},"json",void 0,!0,i.length),p=u.items.filter(c=>c.found===!0).length,h=n==="scan_cards"?u.found_count:u.found;return{consistency:{reportedFound:h,countedFound:p,consistent:h===p},warnings:h===p?[]:[`HEY reports ${n==="scan_cards"?"found_count":"found"}=${h}, but ${p} returned items have found=true. Provider data is preserved; check the per-item states.`],chainId:w,operation:n,data:u,attribution:{source:`${I}${f}`,provider:"HEY Research Lab"},notAdvice:!0,untrusted:!0,disclaimer:X}}},{name:"heyresearch_validate_receipt",inputSchema:{type:"object",additionalProperties:!1,required:["receipt"],properties:{receipt:{type:"object",description:"AgentResearchReceipt v1. Sent to HEY for stateless validation; no reasoning trace, wallet credential or API key. Maximum 64 KiB."}}},async execute(t){if(ie(t,"receipt"),!o(t.receipt))throw new d("Provide an AgentResearchReceipt object.");let n=JSON.stringify(t.receipt);if(new TextEncoder().encode(n).length>65536)throw new d("The research receipt exceeds 64 KiB.");if(/"(?:private_key|secret_key|wallet_key|mnemonic|seed|seed_phrase|recovery_phrase)"\s*:/i.test(n))throw new d("Do not include wallet credentials in a research receipt.");let i=await r("/api/receipts/validate",s=>{(!Object.keys(s).length||s.error)&&v()},"json",t.receipt);return{chainId:w,data:i,attribution:{source:`${I}/api/receipts/validate`,provider:"HEY Research Lab"},notAdvice:!0,disclaimer:Z}}}]}},ke=e=>N("heyresearch",[ae(e)]);export{X as HEY_KEYED_DISCLAIMER,Z as HEY_RECEIPT_DISCLAIMER,G as HEY_RECORDS_DISCLAIMER,ke as createModule,ae as createModulePart};
|
|
@@ -1,6 +1,34 @@
|
|
|
1
|
-
import type { ToolDefinition } from '../../types.js';
|
|
1
|
+
import type { ToolArgs, ToolDefinition } from '../../types.js';
|
|
2
|
+
import { type ReadShapeArgs } from '../../read-shape.js';
|
|
2
3
|
type Document = Record<string, unknown>;
|
|
3
4
|
export declare const HEY_PUBLIC_READ_DISCLAIMER: string;
|
|
4
5
|
type Read = (path: string, validate: (body: Document) => void, format?: 'json' | 'csv') => Promise<Document>;
|
|
6
|
+
export declare const HEY_READ_DEFAULT = "summary";
|
|
7
|
+
export declare const HEY_READ_PARAMS: {
|
|
8
|
+
detail: {
|
|
9
|
+
default: string;
|
|
10
|
+
description: string;
|
|
11
|
+
type: "string";
|
|
12
|
+
enum: readonly ["summary", "full"];
|
|
13
|
+
};
|
|
14
|
+
fields: {
|
|
15
|
+
description: string;
|
|
16
|
+
type: "array";
|
|
17
|
+
items: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly minLength: 1;
|
|
20
|
+
};
|
|
21
|
+
maxItems: 20;
|
|
22
|
+
};
|
|
23
|
+
limit: {
|
|
24
|
+
readonly type: "integer";
|
|
25
|
+
readonly minimum: 1;
|
|
26
|
+
readonly maximum: 100;
|
|
27
|
+
readonly default: 10;
|
|
28
|
+
readonly description: "Maximum rows per list, from 1 to 100. Defaults to 10; omitted rows are counted.";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare function heyReadArgs(args: ToolArgs, keys: readonly string[]): ReadShapeArgs;
|
|
32
|
+
export declare function shapeHeyRead(result: Document, args: ReadShapeArgs, keep?: readonly string[], summary?: Document): unknown;
|
|
5
33
|
export declare function publicReadTool(read: Read, validateAgent: (body: Document, capability: string) => void): ToolDefinition;
|
|
6
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f}from"../../../chunks/3DNJTJ2X.js";import"../../../chunks/TWR7BF72.js";import"../../../chunks/TMVO2DAK.js";import"../../../chunks/WNWRF4HE.js";import"../../../chunks/GQ3XZFRL.js";import"../../../chunks/HOEQVPY7.js";import"../../../chunks/OEZ7FCLF.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/FWD4L3CJ.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as HEY_PUBLIC_READ_DISCLAIMER,b as HEY_READ_DEFAULT,c as HEY_READ_PARAMS,d as heyReadArgs,f as publicReadTool,e as shapeHeyRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../../../chunks/
|
|
1
|
+
import{a,b,c}from"../../../chunks/WNWRF4HE.js";import"../../../chunks/GQ3XZFRL.js";import"../../../chunks/HOEQVPY7.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{c as createHeyScanner,a as heyRequestError,b as parseHeyScanCard};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const HEY_TIE_LABEL = "Project names this contract";
|
|
2
2
|
export declare const HEY_EVIDENCE_NOTE = "Builder evidence, not a trading signal.";
|
|
3
3
|
export declare const HEY_NOT_TRACKED = "Not on HEY Research Lab yet";
|
|
4
|
+
export declare const HEY_COVERAGE_NOTE = "Not every token is on HEY Research Lab. Stock tokens and stablecoins were not, when Oak checked on 2026-11-06.";
|
|
5
|
+
export declare const HEY_NOT_TRACKED_LINES: readonly [string, string];
|
|
4
6
|
export declare function isHeyStatusText(value: unknown, max: number): value is string;
|
|
5
7
|
export declare function describeHeyStatus(label: string, help?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../../../chunks/
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../../../chunks/GQ3XZFRL.js";import"../../../chunks/63YRSLDK.js";export{d as HEY_COVERAGE_NOTE,b as HEY_EVIDENCE_NOTE,c as HEY_NOT_TRACKED,e as HEY_NOT_TRACKED_LINES,a as HEY_TIE_LABEL,g as describeHeyStatus,f as isHeyStatusText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../../chunks/
|
|
1
|
+
import{a,b}from"../../../chunks/CSDN4MYP.js";import"../../../chunks/WNWRF4HE.js";import"../../../chunks/GQ3XZFRL.js";import"../../../chunks/HOEQVPY7.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/FWD4L3CJ.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as parsePonsAddresses,b as readTokenFacts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,k as b}from"../../../chunks/
|
|
1
|
+
import{j as a,k as b}from"../../../chunks/3ZABD6ZF.js";import"../../../chunks/G2LAO23N.js";import"../../../chunks/SPJCSEKP.js";import"../../../chunks/Z25UKUJF.js";import"../../../chunks/43LI5NKJ.js";import"../../../chunks/SCG5HWMN.js";import"../../../chunks/5TUXSOMI.js";import"../../../chunks/66F5ZH34.js";import"../../../chunks/NWNYJ26T.js";import"../../../chunks/IX3GZMTM.js";import"../../../chunks/5RXALTDT.js";import"../../../chunks/FWD4L3CJ.js";import"../../../chunks/XSD5NL7J.js";import"../../../chunks/JXOEJPJ4.js";import"../../../chunks/63YRSLDK.js";export{a as chainPageProperties,b as readChainNames};
|