@oracle-agent/oracle 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +99 -0
- package/README.md +531 -13
- package/SECURITY.md +112 -0
- package/SETUP.md +317 -0
- package/artifacts/inscription/oracle-was-here-preview.png +0 -0
- package/artifacts/inscription/oracle-was-here.svg +1 -0
- package/artifacts/specialist-packs/oracle-full-crypto.json +298 -0
- package/bin/desk-server.mjs +473 -0
- package/bin/oracle-data-mcp.mjs +1252 -0
- package/bin/oracle-equities.mjs +168 -0
- package/bin/oracle-init.mjs +525 -0
- package/bin/oracle-public-server.mjs +36 -0
- package/bin/oracle-route.mjs +254 -0
- package/bin/oracle-scan.mjs +192 -0
- package/bin/oracle-upgrade.mjs +42 -0
- package/bin/oracle.mjs +28 -19
- package/docs/adding-a-chain.md +229 -0
- package/docs/architecture.md +139 -0
- package/docs/buzz-integration.md +115 -0
- package/docs/cli.md +143 -0
- package/docs/connectors.md +13 -0
- package/docs/hyperliquid-builder-code.md +50 -0
- package/docs/locals-only-fee-waiver.md +34 -0
- package/docs/oracle-pack-standard.md +29 -0
- package/docs/profiles.md +151 -0
- package/docs/public-surface.md +206 -0
- package/examples/add-a-chain.mjs +65 -0
- package/examples/oracle-pack-template.mjs +38 -0
- package/examples/research-a-token.mjs +70 -0
- package/package.json +110 -14
- package/plugins/oracle-owner-gate/__init__.py +288 -0
- package/plugins/oracle-owner-gate/plugin.yaml +9 -0
- package/profiles/_template/SOUL.md +54 -0
- package/profiles/_template/profile.json +22 -0
- package/profiles/bitcoin-agent/SOUL.md +31 -0
- package/profiles/bitcoin-agent/profile.json +32 -0
- package/profiles/hyperliquid-agent/SOUL.md +34 -0
- package/profiles/hyperliquid-agent/profile.json +38 -0
- package/profiles/oracle/SOUL.md +120 -0
- package/profiles/oracle/profile.json +40 -0
- package/profiles/polymarket-agent/SOUL.md +35 -0
- package/profiles/polymarket-agent/profile.json +34 -0
- package/profiles/profile.schema.json +90 -0
- package/profiles/protocol-builder/SOUL.md +57 -0
- package/profiles/protocol-builder/profile.json +39 -0
- package/profiles/robinhood-agent/SOUL.md +53 -0
- package/profiles/robinhood-agent/profile.json +41 -0
- package/profiles/solana-agent/SOUL.md +37 -0
- package/profiles/solana-agent/profile.json +38 -0
- package/profiles/stable-agent/SOUL.md +43 -0
- package/profiles/stable-agent/profile.json +38 -0
- package/protocols/templates/safe-erc20/SECURITY.md +16 -0
- package/protocols/templates/safe-erc20/foundry.toml +12 -0
- package/protocols/templates/safe-erc20/remappings.txt +2 -0
- package/protocols/templates/safe-erc20/src/SafeERC20.sol +53 -0
- package/protocols/templates/safe-erc20/test/SafeERC20.t.sol +72 -0
- package/public/agent-connect/app.js +84 -0
- package/public/agent-connect/index.html +83 -0
- package/public/agent-connect/styles.css +70 -0
- package/public/index.html +12 -0
- package/public/oracle-console/app.js +272 -0
- package/public/oracle-console/bitcoin-wallets.js +206 -0
- package/public/oracle-console/index.html +91 -0
- package/public/oracle-console/styles.css +239 -0
- package/public/oracle-splash/_variants/ice.html +2073 -0
- package/public/oracle-splash/_variants/ivory.html +2075 -0
- package/public/oracle-splash/assets/agents/claude.png +0 -0
- package/public/oracle-splash/assets/agents/codex.png +0 -0
- package/public/oracle-splash/assets/cli-chain-hyperliquid.jpg +0 -0
- package/public/oracle-splash/assets/desktop-app.jpg +0 -0
- package/public/oracle-splash/assets/hero/cli-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/cli-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/cli-session.webm +0 -0
- package/public/oracle-splash/assets/hero/orb-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/orb.avif +0 -0
- package/public/oracle-splash/assets/hero/orb.webm +0 -0
- package/public/oracle-splash/assets/hero/risk-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/risk-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/risk-session.webm +0 -0
- package/public/oracle-splash/assets/hero/route-session-poster.jpg +0 -0
- package/public/oracle-splash/assets/hero/route-session.mp4 +0 -0
- package/public/oracle-splash/assets/hero/route-session.webm +0 -0
- package/public/oracle-splash/assets/llms/claude.svg +1 -0
- package/public/oracle-splash/assets/llms/codex-icon.svg +1 -0
- package/public/oracle-splash/assets/llms/codex.svg +1 -0
- package/public/oracle-splash/assets/llms/cursor-icon.svg +12 -0
- package/public/oracle-splash/assets/llms/cursor.svg +17 -0
- package/public/oracle-splash/assets/llms/deepseek.svg +1 -0
- package/public/oracle-splash/assets/llms/gemini-icon.svg +1 -0
- package/public/oracle-splash/assets/llms/gemini.svg +1 -0
- package/public/oracle-splash/assets/llms/grok.svg +8 -0
- package/public/oracle-splash/assets/llms/hermes.png +0 -0
- package/public/oracle-splash/assets/llms/kimi-icon.svg +1 -0
- package/public/oracle-splash/assets/llms/kimi.svg +1 -0
- package/public/oracle-splash/assets/llms/manus.svg +18 -0
- package/public/oracle-splash/assets/llms/openclaw.svg +22 -0
- package/public/oracle-splash/assets/llms/perplexity.svg +1 -0
- package/public/oracle-splash/assets/llms/qwen.svg +1 -0
- package/public/oracle-splash/assets/llms/windsurf.svg +1 -0
- package/public/oracle-splash/assets/protocols/abcdex.png +0 -0
- package/public/oracle-splash/assets/protocols/across.png +0 -0
- package/public/oracle-splash/assets/protocols/aerodrome.png +0 -0
- package/public/oracle-splash/assets/protocols/balancer.png +0 -0
- package/public/oracle-splash/assets/protocols/cowswap.png +0 -0
- package/public/oracle-splash/assets/protocols/curve.png +0 -0
- package/public/oracle-splash/assets/protocols/dreamcash.png +0 -0
- package/public/oracle-splash/assets/protocols/felix.png +0 -0
- package/public/oracle-splash/assets/protocols/gmx.png +0 -0
- package/public/oracle-splash/assets/protocols/hyena.png +0 -0
- package/public/oracle-splash/assets/protocols/hyperbeat.png +0 -0
- package/public/oracle-splash/assets/protocols/hyperliquid.png +0 -0
- package/public/oracle-splash/assets/protocols/hyperswap.png +0 -0
- package/public/oracle-splash/assets/protocols/jupiter.png +0 -0
- package/public/oracle-splash/assets/protocols/kinetiq.png +0 -0
- package/public/oracle-splash/assets/protocols/lfj.png +0 -0
- package/public/oracle-splash/assets/protocols/lifi.png +0 -0
- package/public/oracle-splash/assets/protocols/magic-eden.png +0 -0
- package/public/oracle-splash/assets/protocols/morpho.png +0 -0
- package/public/oracle-splash/assets/protocols/odos.png +0 -0
- package/public/oracle-splash/assets/protocols/oneinch.png +0 -0
- package/public/oracle-splash/assets/protocols/opensea.png +0 -0
- package/public/oracle-splash/assets/protocols/pancakeswap.png +0 -0
- package/public/oracle-splash/assets/protocols/paragon.png +0 -0
- package/public/oracle-splash/assets/protocols/paraswap.png +0 -0
- package/public/oracle-splash/assets/protocols/pendle.png +0 -0
- package/public/oracle-splash/assets/protocols/polymarket.png +0 -0
- package/public/oracle-splash/assets/protocols/quickswap.png +0 -0
- package/public/oracle-splash/assets/protocols/relay.png +0 -0
- package/public/oracle-splash/assets/protocols/stargate.png +0 -0
- package/public/oracle-splash/assets/protocols/tradexyz.png +0 -0
- package/public/oracle-splash/assets/protocols/uniswap.png +0 -0
- package/public/oracle-splash/assets/protocols/velodrome.png +0 -0
- package/public/oracle-splash/assets/protocols/ventuals.png +0 -0
- package/public/oracle-splash/assets/wordmarks/across-icon.webp +0 -0
- package/public/oracle-splash/assets/wordmarks/across.svg +4 -0
- package/public/oracle-splash/assets/wordmarks/aerodrome.svg +23 -0
- package/public/oracle-splash/assets/wordmarks/balancer.svg +3 -0
- package/public/oracle-splash/assets/wordmarks/cowswap.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/curve.png +0 -0
- package/public/oracle-splash/assets/wordmarks/gmx.svg +13 -0
- package/public/oracle-splash/assets/wordmarks/hop-icon.webp +0 -0
- package/public/oracle-splash/assets/wordmarks/hyena.svg +7 -0
- package/public/oracle-splash/assets/wordmarks/hyperliquid.svg +21 -0
- package/public/oracle-splash/assets/wordmarks/hyperswap.svg +13 -0
- package/public/oracle-splash/assets/wordmarks/jupiter.svg +35 -0
- package/public/oracle-splash/assets/wordmarks/kinetiq.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/lfj.webp +0 -0
- package/public/oracle-splash/assets/wordmarks/lifi.png +0 -0
- package/public/oracle-splash/assets/wordmarks/magic-eden.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/markets.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/morpho.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/odos.svg +3 -0
- package/public/oracle-splash/assets/wordmarks/oneinch-icon.webp +0 -0
- package/public/oracle-splash/assets/wordmarks/oneinch.svg +6 -0
- package/public/oracle-splash/assets/wordmarks/opensea-icon.svg +17 -0
- package/public/oracle-splash/assets/wordmarks/opensea.svg +1 -0
- package/public/oracle-splash/assets/wordmarks/outcome.svg +16 -0
- package/public/oracle-splash/assets/wordmarks/pancakeswap.svg +18 -0
- package/public/oracle-splash/assets/wordmarks/paragon.svg +9 -0
- package/public/oracle-splash/assets/wordmarks/paraswap.svg +16 -0
- package/public/oracle-splash/assets/wordmarks/pendle.png +0 -0
- package/public/oracle-splash/assets/wordmarks/polymarket.png +0 -0
- package/public/oracle-splash/assets/wordmarks/quickswap.png +0 -0
- package/public/oracle-splash/assets/wordmarks/relay.svg +8 -0
- package/public/oracle-splash/assets/wordmarks/satflow-icon.png +0 -0
- package/public/oracle-splash/assets/wordmarks/stargate-icon.webp +0 -0
- package/public/oracle-splash/assets/wordmarks/stargate.svg +15 -0
- package/public/oracle-splash/assets/wordmarks/uniswap.svg +18 -0
- package/public/oracle-splash/assets/wordmarks/velodrome.svg +84 -0
- package/public/oracle-splash/assets/wordmarks/xyz.svg +12 -0
- package/public/oracle-splash/assets/wordmarks/zerox-icon.webp +0 -0
- package/public/oracle-splash/brand/aave.webp +0 -0
- package/public/oracle-splash/brand/aavev2.webp +0 -0
- package/public/oracle-splash/brand/aborean.webp +0 -0
- package/public/oracle-splash/brand/across.webp +0 -0
- package/public/oracle-splash/brand/aerodrome.webp +0 -0
- package/public/oracle-splash/brand/afi.webp +0 -0
- package/public/oracle-splash/brand/arcus.webp +0 -0
- package/public/oracle-splash/brand/aster.webp +0 -0
- package/public/oracle-splash/brand/avant.webp +0 -0
- package/public/oracle-splash/brand/balancer.webp +0 -0
- package/public/oracle-splash/brand/beefy.webp +0 -0
- package/public/oracle-splash/brand/benqi.webp +0 -0
- package/public/oracle-splash/brand/bestinslot.ico +0 -0
- package/public/oracle-splash/brand/bitfi.webp +0 -0
- package/public/oracle-splash/brand/bonkswap.webp +0 -0
- package/public/oracle-splash/brand/bouncebit.webp +0 -0
- package/public/oracle-splash/brand/camelot.webp +0 -0
- package/public/oracle-splash/brand/compound.webp +0 -0
- package/public/oracle-splash/brand/concrete.webp +0 -0
- package/public/oracle-splash/brand/cow.webp +0 -0
- package/public/oracle-splash/brand/curve.webp +0 -0
- package/public/oracle-splash/brand/derive.webp +0 -0
- package/public/oracle-splash/brand/dolomite.webp +0 -0
- package/public/oracle-splash/brand/eigenlayer.webp +0 -0
- package/public/oracle-splash/brand/ekubo.webp +0 -0
- package/public/oracle-splash/brand/ethena.webp +0 -0
- package/public/oracle-splash/brand/etherfi.webp +0 -0
- package/public/oracle-splash/brand/etherfiborrow.webp +0 -0
- package/public/oracle-splash/brand/felix.webp +0 -0
- package/public/oracle-splash/brand/fluid.webp +0 -0
- package/public/oracle-splash/brand/fluxbeam.webp +0 -0
- package/public/oracle-splash/brand/folks.webp +0 -0
- package/public/oracle-splash/brand/fortyacres.webp +0 -0
- package/public/oracle-splash/brand/gainsnetwork.webp +0 -0
- package/public/oracle-splash/brand/gassss.webp +0 -0
- package/public/oracle-splash/brand/gmx.webp +0 -0
- package/public/oracle-splash/brand/harmonix.webp +0 -0
- package/public/oracle-splash/brand/hlorderbook.webp +0 -0
- package/public/oracle-splash/brand/hlp.webp +0 -0
- package/public/oracle-splash/brand/hop.webp +0 -0
- package/public/oracle-splash/brand/hyperbeat.webp +0 -0
- package/public/oracle-splash/brand/hyperlend.webp +0 -0
- package/public/oracle-splash/brand/hyperliquid.webp +0 -0
- package/public/oracle-splash/brand/hyperliquidhpl.webp +0 -0
- package/public/oracle-splash/brand/hyperliquidspot.webp +0 -0
- package/public/oracle-splash/brand/hyperswap.webp +0 -0
- package/public/oracle-splash/brand/hypha.webp +0 -0
- package/public/oracle-splash/brand/joedex.webp +0 -0
- package/public/oracle-splash/brand/jupiter.webp +0 -0
- package/public/oracle-splash/brand/kelp.webp +0 -0
- package/public/oracle-splash/brand/kinetiq.webp +0 -0
- package/public/oracle-splash/brand/kmhype.webp +0 -0
- package/public/oracle-splash/brand/kona.webp +0 -0
- package/public/oracle-splash/brand/konalend.webp +0 -0
- package/public/oracle-splash/brand/lfj.webp +0 -0
- package/public/oracle-splash/brand/lido.webp +0 -0
- package/public/oracle-splash/brand/lifi.webp +0 -0
- package/public/oracle-splash/brand/lighter.webp +0 -0
- package/public/oracle-splash/brand/lista.webp +0 -0
- package/public/oracle-splash/brand/loopedhype.webp +0 -0
- package/public/oracle-splash/brand/lorenzo.webp +0 -0
- package/public/oracle-splash/brand/magic-eden.webp +0 -0
- package/public/oracle-splash/brand/magiceden.webp +0 -0
- package/public/oracle-splash/brand/mempool.png +0 -0
- package/public/oracle-splash/brand/meteora.webp +0 -0
- package/public/oracle-splash/brand/morpho.webp +0 -0
- package/public/oracle-splash/brand/myriad.webp +0 -0
- package/public/oracle-splash/brand/noxa.webp +0 -0
- package/public/oracle-splash/brand/odos.webp +0 -0
- package/public/oracle-splash/brand/oneinch.webp +0 -0
- package/public/oracle-splash/brand/openbook.webp +0 -0
- package/public/oracle-splash/brand/opensea.webp +0 -0
- package/public/oracle-splash/brand/orca.webp +0 -0
- package/public/oracle-splash/brand/ordinals.png +0 -0
- package/public/oracle-splash/brand/ostium.webp +0 -0
- package/public/oracle-splash/brand/pancakeswap.webp +0 -0
- package/public/oracle-splash/brand/pendle.webp +0 -0
- package/public/oracle-splash/brand/perena.webp +0 -0
- package/public/oracle-splash/brand/pharaoh.webp +0 -0
- package/public/oracle-splash/brand/phoenix.webp +0 -0
- package/public/oracle-splash/brand/polymarket.webp +0 -0
- package/public/oracle-splash/brand/polynomial.webp +0 -0
- package/public/oracle-splash/brand/projectx.webp +0 -0
- package/public/oracle-splash/brand/pumpfun.webp +0 -0
- package/public/oracle-splash/brand/quickswap.webp +0 -0
- package/public/oracle-splash/brand/rain.webp +0 -0
- package/public/oracle-splash/brand/raydium.webp +0 -0
- package/public/oracle-splash/brand/relay.webp +0 -0
- package/public/oracle-splash/brand/rocketpool.webp +0 -0
- package/public/oracle-splash/brand/saber.webp +0 -0
- package/public/oracle-splash/brand/sakuraswap.webp +0 -0
- package/public/oracle-splash/brand/sanctum.webp +0 -0
- package/public/oracle-splash/brand/satflow.png +0 -0
- package/public/oracle-splash/brand/sierra.webp +0 -0
- package/public/oracle-splash/brand/sky.webp +0 -0
- package/public/oracle-splash/brand/solv.webp +0 -0
- package/public/oracle-splash/brand/spark.webp +0 -0
- package/public/oracle-splash/brand/sparksavings.webp +0 -0
- package/public/oracle-splash/brand/sphere.webp +0 -0
- package/public/oracle-splash/brand/ssv.webp +0 -0
- package/public/oracle-splash/brand/stabble.webp +0 -0
- package/public/oracle-splash/brand/stableswap.webp +0 -0
- package/public/oracle-splash/brand/stakewise.webp +0 -0
- package/public/oracle-splash/brand/stargate.webp +0 -0
- package/public/oracle-splash/brand/sthype.webp +0 -0
- package/public/oracle-splash/brand/sushiswap.webp +0 -0
- package/public/oracle-splash/brand/unisat.png +0 -0
- package/public/oracle-splash/brand/uniswap.webp +0 -0
- package/public/oracle-splash/brand/uniswapv2.webp +0 -0
- package/public/oracle-splash/brand/uniswapv4.webp +0 -0
- package/public/oracle-splash/brand/unit.webp +0 -0
- package/public/oracle-splash/brand/velodrome.webp +0 -0
- package/public/oracle-splash/brand/velora.webp +0 -0
- package/public/oracle-splash/brand/venus.webp +0 -0
- package/public/oracle-splash/brand/wbeth.webp +0 -0
- package/public/oracle-splash/brand/xsy.webp +0 -0
- package/public/oracle-splash/brand/yieldyak.webp +0 -0
- package/public/oracle-splash/brand/zerobase.webp +0 -0
- package/public/oracle-splash/brand/zerox.webp +0 -0
- package/public/oracle-splash/downloads/index.html +52 -0
- package/public/oracle-splash/favicon.ico +0 -0
- package/public/oracle-splash/favicon.svg +6 -0
- package/public/oracle-splash/index.html +2537 -0
- package/public/oracle-splash/mesh-graph.png +0 -0
- package/public/oracle-splash/mesh-graph.svg +216 -0
- package/scripts/adversarial-bench.mjs +114 -0
- package/scripts/build-dist.mjs +119 -0
- package/scripts/build-inscription.py +230 -0
- package/scripts/check-doc-drift.mjs +123 -0
- package/scripts/check-test-count.mjs +105 -0
- package/scripts/e2e-hl-markets.mjs +21 -0
- package/scripts/e2e-hl-perps.mjs +48 -0
- package/scripts/e2e-hypercore-staking.mjs +128 -0
- package/scripts/e2e-solana-bitcoin.mjs +183 -0
- package/scripts/guard-publish.mjs +22 -0
- package/scripts/protocol-template-gate.mjs +15 -0
- package/scripts/public-api-scan.mjs +23 -0
- package/scripts/publish-dist.mjs +67 -0
- package/scripts/record-hero-cli.sh +80 -0
- package/scripts/secret-scan.mjs +168 -0
- package/scripts/smoke-dist-bins.mjs +89 -0
- package/scripts/verify-dist.mjs +29 -0
- package/scripts/verify-v3-venues.mjs +233 -0
- package/skills/balance/SKILL.md +176 -0
- package/skills/bitcoin-l1.md +33 -0
- package/skills/chain-defi-ecosystem-profiling.md +27 -0
- package/skills/evm-contract-research.md +27 -0
- package/skills/hyperliquid.md +26 -0
- package/skills/multichain-exec-desk.md +33 -0
- package/skills/oracle-action-semantics/SKILL.md +40 -0
- package/skills/oracle-best-execution/SKILL.md +127 -0
- package/skills/oracle-best-execution.md +27 -0
- package/skills/oracle-bitcoin/SKILL.md +53 -0
- package/skills/oracle-chain-graphs-telegram-cards/SKILL.md +59 -0
- package/skills/oracle-chat/SKILL.md +61 -0
- package/skills/oracle-chat/chain.SKILL.md +31 -0
- package/skills/oracle-chat/setup.SKILL.md +37 -0
- package/skills/oracle-circuit-breaker/SKILL.md +51 -0
- package/skills/oracle-contract-research/SKILL.md +55 -0
- package/skills/oracle-desk/SKILL.md +58 -0
- package/skills/oracle-desk.md +27 -0
- package/skills/oracle-dex-launch/SKILL.md +38 -0
- package/skills/oracle-equities/SKILL.md +62 -0
- package/skills/oracle-grants/SKILL.md +69 -0
- package/skills/oracle-hypercore-staking/SKILL.md +57 -0
- package/skills/oracle-hyperliquid/SKILL.md +56 -0
- package/skills/oracle-meme-token-sniper/SKILL.md +73 -0
- package/skills/oracle-multichain-nft-launch/SKILL.md +338 -0
- package/skills/oracle-multichain-token-launch/SKILL.md +300 -0
- package/skills/oracle-nft-gacha-launch/SKILL.md +48 -0
- package/skills/oracle-nft-mint-gas-war/SKILL.md +63 -0
- package/skills/oracle-polymarket/SKILL.md +60 -0
- package/skills/oracle-protocol-builder/SKILL.md +59 -0
- package/skills/oracle-protocol-security/SKILL.md +60 -0
- package/skills/oracle-public-product/SKILL.md +44 -0
- package/skills/oracle-receipts/SKILL.md +52 -0
- package/skills/oracle-receipts.md +29 -0
- package/skills/oracle-rfq-tokenized-assets/SKILL.md +69 -0
- package/skills/oracle-smart-wallet-scanner/SKILL.md +49 -0
- package/skills/oracle-solana/SKILL.md +65 -0
- package/skills/oracle-solana-nft/SKILL.md +54 -0
- package/skills/oracle-token-research/SKILL.md +67 -0
- package/skills/solana.md +22 -0
- package/skins/oracle.yaml +56 -0
- package/src/action-receipts.mjs +265 -0
- package/src/action-semantics.mjs +62 -0
- package/src/address-book.mjs +208 -0
- package/src/agent-auth.mjs +206 -0
- package/src/approval-guard.mjs +282 -0
- package/src/attestation-secret.mjs +94 -0
- package/src/audit-log.mjs +196 -0
- package/src/auth/oauth.mjs +672 -0
- package/src/auto-slippage.mjs +378 -0
- package/src/capability-posture.mjs +125 -0
- package/src/cards.mjs +422 -0
- package/src/chains.mjs +62 -0
- package/src/cli/chain-catalog.mjs +215 -0
- package/src/cli/chain-state.mjs +74 -0
- package/src/cli/commands/auth.mjs +193 -0
- package/src/cli/commands/bootstrap.mjs +87 -0
- package/src/cli/commands/chain.mjs +143 -0
- package/src/cli/commands/chat.mjs +465 -0
- package/src/cli/commands/credential.mjs +9 -0
- package/src/cli/commands/data-mcp.mjs +18 -0
- package/src/cli/commands/data.mjs +75 -0
- package/src/cli/commands/doctor.mjs +136 -0
- package/src/cli/commands/equities.mjs +41 -0
- package/src/cli/commands/farm.mjs +129 -0
- package/src/cli/commands/fees.mjs +109 -0
- package/src/cli/commands/follow.mjs +130 -0
- package/src/cli/commands/harness.mjs +63 -0
- package/src/cli/commands/help.mjs +7 -0
- package/src/cli/commands/init.mjs +27 -0
- package/src/cli/commands/mcp.mjs +154 -0
- package/src/cli/commands/model.mjs +106 -0
- package/src/cli/commands/plugins.mjs +241 -0
- package/src/cli/commands/prepare.mjs +12 -0
- package/src/cli/commands/public.mjs +20 -0
- package/src/cli/commands/resolve.mjs +64 -0
- package/src/cli/commands/route.mjs +12 -0
- package/src/cli/commands/runner.mjs +9 -0
- package/src/cli/commands/scan.mjs +12 -0
- package/src/cli/commands/setup.mjs +294 -0
- package/src/cli/commands/sign.mjs +21 -0
- package/src/cli/commands/signer.mjs +9 -0
- package/src/cli/commands/swap.mjs +102 -0
- package/src/cli/commands/upgrade.mjs +12 -0
- package/src/cli/commands/vault.mjs +9 -0
- package/src/cli/commands/version.mjs +22 -0
- package/src/cli/first-run.mjs +23 -0
- package/src/cli/kernel.mjs +262 -0
- package/src/cli/mcp-targets/chatgpt.mjs +51 -0
- package/src/cli/mcp-targets/claude-code.mjs +39 -0
- package/src/cli/mcp-targets/claude-desktop.mjs +24 -0
- package/src/cli/mcp-targets/codex.mjs +41 -0
- package/src/cli/mcp-targets/cursor.mjs +32 -0
- package/src/cli/mcp-targets/shared.mjs +71 -0
- package/src/cli/mcp-targets/vscode.mjs +39 -0
- package/src/cli/messaging-platforms.mjs +217 -0
- package/src/cli/model-config.mjs +78 -0
- package/src/cli/operator-dispatch.mjs +257 -0
- package/src/cli/oracle-harness.py +415 -0
- package/src/cli/paths.mjs +107 -0
- package/src/cli/runtime.mjs +351 -0
- package/src/cli/setup-state.mjs +168 -0
- package/src/cli/spawn-child.mjs +43 -0
- package/src/data/catalog.mjs +858 -0
- package/src/data/desk-data.mjs +877 -0
- package/src/data/http.mjs +253 -0
- package/src/data/names.mjs +188 -0
- package/src/data/provider-endpoint.mjs +94 -0
- package/src/data/providers/aave-v3.mjs +139 -0
- package/src/data/providers/across-bridge.mjs +41 -0
- package/src/data/providers/aerodrome.mjs +245 -0
- package/src/data/providers/aevo.mjs +33 -0
- package/src/data/providers/approval-indexer.mjs +133 -0
- package/src/data/providers/approvals.mjs +594 -0
- package/src/data/providers/babylon-staking.mjs +149 -0
- package/src/data/providers/balancer.mjs +209 -0
- package/src/data/providers/beefy-yields.mjs +45 -0
- package/src/data/providers/birdeye-tokens.mjs +33 -0
- package/src/data/providers/bisq-markets.mjs +145 -0
- package/src/data/providers/bitcoin-esplora.mjs +216 -0
- package/src/data/providers/bitcoin-meta.mjs +378 -0
- package/src/data/providers/blockscout.mjs +14 -0
- package/src/data/providers/bob-rootstock.mjs +198 -0
- package/src/data/providers/braiins-insights.mjs +103 -0
- package/src/data/providers/bridge-aggregator.mjs +259 -0
- package/src/data/providers/bridges.mjs +242 -0
- package/src/data/providers/bungee.mjs +29 -0
- package/src/data/providers/celestia-da.mjs +38 -0
- package/src/data/providers/changenow.mjs +135 -0
- package/src/data/providers/compound.mjs +32 -0
- package/src/data/providers/connext.mjs +28 -0
- package/src/data/providers/convex.mjs +30 -0
- package/src/data/providers/cow-protocol.mjs +110 -0
- package/src/data/providers/cowswap.mjs +415 -0
- package/src/data/providers/curve.mjs +201 -0
- package/src/data/providers/das-assets.mjs +59 -0
- package/src/data/providers/debridge.mjs +109 -0
- package/src/data/providers/defillama.mjs +88 -0
- package/src/data/providers/dexscreener.mjs +43 -0
- package/src/data/providers/drift.mjs +32 -0
- package/src/data/providers/dydx.mjs +41 -0
- package/src/data/providers/evm-rpc.mjs +225 -0
- package/src/data/providers/farming.mjs +291 -0
- package/src/data/providers/geckoterminal.mjs +34 -0
- package/src/data/providers/gmx.mjs +496 -0
- package/src/data/providers/hiro-stacks.mjs +150 -0
- package/src/data/providers/hl-assets.mjs +165 -0
- package/src/data/providers/hl-info.mjs +108 -0
- package/src/data/providers/hl-markets.mjs +210 -0
- package/src/data/providers/hl-outcome.mjs +61 -0
- package/src/data/providers/hl-perps.mjs +419 -0
- package/src/data/providers/hl-staking.mjs +353 -0
- package/src/data/providers/hl-ws.mjs +119 -0
- package/src/data/providers/hyperevm-dex.mjs +49 -0
- package/src/data/providers/jito-mev.mjs +117 -0
- package/src/data/providers/jupiter-venues.mjs +119 -0
- package/src/data/providers/jupiter.mjs +315 -0
- package/src/data/providers/kamino-strategies.mjs +143 -0
- package/src/data/providers/l2beat-tvl.mjs +42 -0
- package/src/data/providers/lifi.mjs +166 -0
- package/src/data/providers/liquid-esplora.mjs +152 -0
- package/src/data/providers/magiceden-ordinals.mjs +141 -0
- package/src/data/providers/magiceden-sol.mjs +406 -0
- package/src/data/providers/mempool-lightning.mjs +144 -0
- package/src/data/providers/mempool-mining.mjs +142 -0
- package/src/data/providers/meteora-dlmm.mjs +168 -0
- package/src/data/providers/morpho.mjs +177 -0
- package/src/data/providers/nft-gallery.mjs +163 -0
- package/src/data/providers/nft-portfolio.mjs +494 -0
- package/src/data/providers/odos.mjs +156 -0
- package/src/data/providers/ondo.mjs +31 -0
- package/src/data/providers/oneinch.mjs +174 -0
- package/src/data/providers/opensea-multichain.mjs +136 -0
- package/src/data/providers/opensea-nft.mjs +371 -0
- package/src/data/providers/orca.mjs +29 -0
- package/src/data/providers/ordinals-runes.mjs +180 -0
- package/src/data/providers/pancakeswap.mjs +28 -0
- package/src/data/providers/paraswap.mjs +125 -0
- package/src/data/providers/pendle.mjs +188 -0
- package/src/data/providers/poly-clob.mjs +283 -0
- package/src/data/providers/poly-public.mjs +96 -0
- package/src/data/providers/poly-ws.mjs +103 -0
- package/src/data/providers/polygon-staking.mjs +227 -0
- package/src/data/providers/portfolio-history.mjs +394 -0
- package/src/data/providers/portfolio.mjs +600 -0
- package/src/data/providers/pyth-price-feeds.mjs +172 -0
- package/src/data/providers/raydium.mjs +35 -0
- package/src/data/providers/relayscan-mev.mjs +72 -0
- package/src/data/providers/rfq.mjs +15 -0
- package/src/data/providers/rh-agent.mjs +59 -0
- package/src/data/providers/sanctum-lst.mjs +180 -0
- package/src/data/providers/satflow.mjs +341 -0
- package/src/data/providers/signed-material-guard.mjs +108 -0
- package/src/data/providers/solana-rpc.mjs +197 -0
- package/src/data/providers/solend-lending.mjs +166 -0
- package/src/data/providers/spark-lend.mjs +42 -0
- package/src/data/providers/squid-router.mjs +29 -0
- package/src/data/providers/stargate.mjs +29 -0
- package/src/data/providers/sushiswap.mjs +30 -0
- package/src/data/providers/symbiotic-restaking.mjs +41 -0
- package/src/data/providers/thorchain.mjs +36 -0
- package/src/data/providers/traderjoe.mjs +28 -0
- package/src/data/providers/twap.mjs +152 -0
- package/src/data/providers/uniswap-v3.mjs +457 -0
- package/src/data/providers/uniswap-v4.mjs +414 -0
- package/src/data/providers/vertex.mjs +41 -0
- package/src/data/providers/wallet-watch.mjs +264 -0
- package/src/data/providers/wormhole.mjs +28 -0
- package/src/data/providers/yearn.mjs +31 -0
- package/src/data/providers/zerox.mjs +167 -0
- package/src/data/public-api-scan.mjs +61 -0
- package/src/data/quote-placeholder.mjs +31 -0
- package/src/desk/swap-prepare.mjs +194 -0
- package/src/equities/bridge.mjs +388 -0
- package/src/equities/fixtures/bridge_routes.json +159 -0
- package/src/equities/fixtures/dst_transitions.json +29 -0
- package/src/equities/fixtures/equity_dex_pools.json +154 -0
- package/src/equities/fixtures/hip3_l2books.json +2711 -0
- package/src/equities/fixtures/nyse_holidays.json +1 -0
- package/src/equities/fixtures/oracles.json +100 -0
- package/src/equities/fixtures/rh_pool_state.json +244 -0
- package/src/equities/fixtures/solana_xstocks.json +704 -0
- package/src/equities/fixtures/ton_xstocks.json +35 -0
- package/src/equities/fixtures/universe.json +411 -0
- package/src/equities/fixtures/venues.json +3542 -0
- package/src/equities/fixtures.mjs +405 -0
- package/src/equities/funding.mjs +142 -0
- package/src/equities/index.mjs +166 -0
- package/src/equities/liveness.mjs +148 -0
- package/src/equities/marketHours.mjs +249 -0
- package/src/equities/normalize.mjs +295 -0
- package/src/equities/num.mjs +146 -0
- package/src/equities/prepare.mjs +95 -0
- package/src/equities/rank.mjs +260 -0
- package/src/equities/sourceNum.mjs +69 -0
- package/src/equities/types.mjs +220 -0
- package/src/equities/venues/arcus-perp.mjs +84 -0
- package/src/equities/venues/arcus-spot.mjs +105 -0
- package/src/equities/venues/hyperliquid-hip3.mjs +224 -0
- package/src/equities/venues/rh-uniswap.mjs +216 -0
- package/src/equities/venues/solana-xstocks.mjs +139 -0
- package/src/equities/venues/ton-stonfi.mjs +139 -0
- package/src/exact-integer.mjs +72 -0
- package/src/exec-policy.mjs +419 -0
- package/src/flags.mjs +15 -0
- package/src/fresh-window.mjs +76 -0
- package/src/gmx-attestation.mjs +176 -0
- package/src/index.mjs +107 -0
- package/src/licensing/locals-only.mjs +25 -0
- package/src/nft-gas-war-guard.mjs +139 -0
- package/src/onboarding/agent-keys.mjs +161 -0
- package/src/onboarding/harness-configs.mjs +102 -0
- package/src/onboarding/index.mjs +18 -0
- package/src/onboarding/tiers.mjs +139 -0
- package/src/oracle-env.mjs +55 -0
- package/src/package-manifest.mjs +42 -0
- package/src/plugins/agent-plugin-loader.mjs +225 -0
- package/src/portfolio-risk.mjs +170 -0
- package/src/prepare-envelope.mjs +204 -0
- package/src/profile-upgrade.mjs +277 -0
- package/src/protocol-execution.mjs +84 -0
- package/src/protocol-templates/gate.mjs +179 -0
- package/src/protocol-templates/prepare-deploy.mjs +81 -0
- package/src/public-api/agent-grants.mjs +57 -0
- package/src/public-api/buzz-integration.mjs +267 -0
- package/src/public-api/connect-agent.mjs +424 -0
- package/src/public-api/grants.mjs +142 -0
- package/src/public-api/http.mjs +707 -0
- package/src/public-api/metering.mjs +111 -0
- package/src/public-control/aa-adapter.mjs +402 -0
- package/src/public-control/build-registry.mjs +227 -0
- package/src/public-control/bundler-client.mjs +357 -0
- package/src/public-control/grant-indexer.mjs +296 -0
- package/src/public-control/policy-render.mjs +69 -0
- package/src/public-control/policy-schema.mjs +322 -0
- package/src/public-control/runtime-config.mjs +275 -0
- package/src/public-control/session-key-model.mjs +379 -0
- package/src/public-control/session-orchestrator.mjs +418 -0
- package/src/rfq/intent.mjs +180 -0
- package/src/rfq/sources.mjs +181 -0
- package/src/route-attestation.mjs +132 -0
- package/src/router/best-execution.mjs +326 -0
- package/src/router/index.mjs +250 -0
- package/src/router/integrator-fee.mjs +135 -0
- package/src/router/prepare-bridge.mjs +293 -0
- package/src/router/prepare-route.mjs +398 -0
- package/src/router/proposal.mjs +311 -0
- package/src/router/risk-classifier.mjs +119 -0
- package/src/router/route-sources.mjs +364 -0
- package/src/scanner/chains.config.mjs +543 -0
- package/src/scanner/contract.mjs +270 -0
- package/src/scanner/evm-scanner.mjs +394 -0
- package/src/scanner/index.mjs +9 -0
- package/src/scanner/v2-venue.mjs +351 -0
- package/src/scanner/v3-venue.mjs +308 -0
- package/src/scopes.mjs +44 -0
- package/src/sell-simulation.mjs +167 -0
- package/src/signals/engine.mjs +146 -0
- package/src/signals/index.mjs +1 -0
- package/src/token-transfer-guard.mjs +188 -0
- package/src/tui/app.mjs +438 -0
- package/src/tui/backend.mjs +215 -0
- package/src/tui/format.mjs +272 -0
- package/src/tui/gateway-client.mjs +177 -0
- package/src/tui/input.mjs +501 -0
- package/src/tui/memory.mjs +105 -0
- package/src/tui/meta-learn.mjs +85 -0
- package/src/tui/renderer.mjs +443 -0
- package/src/tui/scheduler.mjs +205 -0
- package/src/tui/skills-loader.mjs +140 -0
- package/src/tui/standalone-client.mjs +752 -0
- package/src/tui/theme.mjs +81 -0
- package/src/vault-attestation.mjs +146 -0
- package/src/venues.mjs +206 -0
- package/src/watch-preferences.mjs +85 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Contributing to Oracle
|
|
2
|
+
|
|
3
|
+
Thanks for looking. Oracle is a control plane for money movement, so the review
|
|
4
|
+
bar is about safety and honesty more than style.
|
|
5
|
+
|
|
6
|
+
## Before you start
|
|
7
|
+
|
|
8
|
+
Run the suite:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install
|
|
12
|
+
npm test
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`test-baseline.json` records the current suite count and `npm run test:count`
|
|
16
|
+
prevents silent test loss. A failure on a clean checkout is a bug; report it
|
|
17
|
+
with the exact command output.
|
|
18
|
+
|
|
19
|
+
## The one rule that matters
|
|
20
|
+
|
|
21
|
+
**The public plane may never reach a private key or a house signer.**
|
|
22
|
+
|
|
23
|
+
Oracle ships the data plane, the policy plane, and the control plane. It does not
|
|
24
|
+
ship the executor. A PR that imports signer or keystore code into public modules
|
|
25
|
+
will fail `test/custody-boundary.test.mjs`, and the fix is not to edit the
|
|
26
|
+
forbidden list.
|
|
27
|
+
|
|
28
|
+
If your feature seems to need a key, restructure it: build an unsigned
|
|
29
|
+
transaction or a typed-data intent and hand it back to the caller to sign.
|
|
30
|
+
|
|
31
|
+
## What we want
|
|
32
|
+
|
|
33
|
+
- **Real bugs, fixed at the class level.** Reproduce it, point at the line, fix
|
|
34
|
+
every sibling call path — not just the one that was reported.
|
|
35
|
+
- **New chains and providers.** This is the most useful contribution. See below.
|
|
36
|
+
- **Honest capability tiers.** If a provider can only quote, mark it
|
|
37
|
+
`quote-only`. Do not mark it `prepare` because a prepare function exists but
|
|
38
|
+
was never validated against a live route.
|
|
39
|
+
- **Tests that assert invariants**, not snapshots. `assert` that a minimum output
|
|
40
|
+
is enforced; don't freeze today's provider list into an equality check.
|
|
41
|
+
- **Guards recomputed before signing.** A quote-time check that isn't re-verified
|
|
42
|
+
at broadcast is decoration.
|
|
43
|
+
|
|
44
|
+
## What gets rejected
|
|
45
|
+
|
|
46
|
+
- A signer, private key, or house-custody path in the public tree.
|
|
47
|
+
- A destination allowlist that defaults to permissive, or an empty allowlist read
|
|
48
|
+
as "allow all."
|
|
49
|
+
- Slippage widened past the 100 bps cap to make a trade go through. Block,
|
|
50
|
+
requote, or split instead.
|
|
51
|
+
- A claim of execution support with no live prepare/simulate evidence.
|
|
52
|
+
- Secrets in code, tests, fixtures, or docs — including a real wallet address as
|
|
53
|
+
a default `from` for quotes. Use `src/data/quote-placeholder.mjs`.
|
|
54
|
+
- "It worked when I ran it" with no test.
|
|
55
|
+
|
|
56
|
+
## Adding a provider
|
|
57
|
+
|
|
58
|
+
1. Create `src/data/providers/<name>.mjs`.
|
|
59
|
+
2. Export a `health()` plus the ops you actually implement.
|
|
60
|
+
3. Register it in `src/data/catalog.mjs` with truthful `chainIds`, `auth`, `ops`,
|
|
61
|
+
and `execution` tier.
|
|
62
|
+
4. Add a test with a mocked transport. Do not require a live network for CI.
|
|
63
|
+
5. If it needs a key, the health check must report
|
|
64
|
+
`{ ok: false, configured: false }` rather than throwing.
|
|
65
|
+
|
|
66
|
+
## Adding a chain
|
|
67
|
+
|
|
68
|
+
1. Add an entry to `CHAINS` in `src/chains.mjs` with its `rpcEnv` names.
|
|
69
|
+
2. Verify every router/venue address on-chain (`eth_getCode` must return real
|
|
70
|
+
bytecode) before adding it to `src/venues.mjs`.
|
|
71
|
+
3. Comment each venue addition with how you verified it and when.
|
|
72
|
+
4. An unverified chain stays fail-closed. That is a safe state, not a gap.
|
|
73
|
+
|
|
74
|
+
Never allowlist a router you found only in a blog post or a model's answer. The
|
|
75
|
+
destination allowlist is the highest-leverage control in the system.
|
|
76
|
+
|
|
77
|
+
## Commits and PRs
|
|
78
|
+
|
|
79
|
+
Conventional prefixes: `fix:`, `feat:`, `refactor:`, `docs:`, `test:`, `chore:`.
|
|
80
|
+
|
|
81
|
+
In the PR body, state:
|
|
82
|
+
|
|
83
|
+
- what broke or what's new
|
|
84
|
+
- how you verified it (paste the real command output)
|
|
85
|
+
- whether anything touches the custody boundary
|
|
86
|
+
|
|
87
|
+
Small, reviewable PRs get merged. A 3000-line PR mixing a refactor with a policy
|
|
88
|
+
change will sit.
|
|
89
|
+
|
|
90
|
+
## Style
|
|
91
|
+
|
|
92
|
+
- ES modules, Node 20+, no build step.
|
|
93
|
+
- No new runtime dependency without a reason in the PR description.
|
|
94
|
+
- Comments explain *why*, not *what*. If a line encodes a hard-won fact — a
|
|
95
|
+
provider's unit quirk, a revert cause — say so, and say how it was learned.
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
Contributions are accepted under the repository's then-current outbound license in [LICENSE](LICENSE). Current source is BUSL-1.1; npm releases `0.1.0` through `0.11.0` remain Apache-2.0.
|
package/README.md
CHANGED
|
@@ -1,23 +1,541 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Oracle
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Quickstart (standalone CLI)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
```bash
|
|
6
|
+
npm i -g @oracle-agent/oracle # Node >= 20.19
|
|
7
|
+
oracle --version
|
|
8
|
+
oracle auth login claude # or codex / grok
|
|
9
|
+
oracle # native Oracle chat
|
|
10
|
+
oracle doctor # verify local posture
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Prefer an API key instead? `oracle auth api-key openrouter` accepts hidden
|
|
14
|
+
interactive input. `oracle auth status` reports providers without printing
|
|
15
|
+
credentials. Linux, Windows, and macOS apps are in beta.
|
|
16
|
+
|
|
17
|
+
The CLI, source, and desktop beta are public to everyone. Locals Only holders
|
|
18
|
+
receive a 0% Oracle integrator fee; the NFT does not gate product access.
|
|
19
|
+
|
|
20
|
+
Hyperliquid perp orders disclose Oracle's 5 bps builder code. The exact address,
|
|
21
|
+
approval flow, wire units, and separation from the Locals Only waiver are documented in
|
|
22
|
+
[Hyperliquid builder code](docs/hyperliquid-builder-code.md).
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
**Prepare-only multichain agent control plane.** Policy-bounded intents; your wallet signs.
|
|
26
|
+
|
|
27
|
+
Specialist agent profiles, real protocol intents, self-custody by default,
|
|
28
|
+
receipts or it didn't happen.
|
|
29
|
+
|
|
30
|
+
Built for [Hermes](https://github.com/NousResearch/hermes-agent), the
|
|
31
|
+
open-source agent runtime from [Nous Research](https://nousresearch.com).
|
|
32
|
+
Oracle runs native chat directly — no external agent required.
|
|
33
|
+
`oracle chat` starts the Oracle-native agent loop directly.
|
|
34
|
+
|
|
35
|
+
Hermes remains available as an optional delegate: `ORACLE_CHAT_BACKEND=hermes oracle chat`.
|
|
36
|
+
|
|
37
|
+
Oracle can run standalone model auth directly with API keys or Claude, Codex,
|
|
38
|
+
and Grok OAuth. OAuth credentials use the OS keychain when available, with a
|
|
39
|
+
private `0600` local fallback when keychain storage is unavailable.
|
|
40
|
+
|
|
41
|
+
This package is **prepare-only**: it never takes a private key and never
|
|
42
|
+
broadcasts. The owner-operated signer/executor is private infrastructure, is
|
|
43
|
+
not published on npm, and is not part of public onboarding. Never paste a seed,
|
|
44
|
+
private key, vault passphrase, or signer token into Oracle chat.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Start safely
|
|
49
|
+
|
|
50
|
+
1. Install the public CLI and authenticate a model provider as shown above.
|
|
51
|
+
2. Run `oracle chain list`, then `oracle chain use <name>`.
|
|
52
|
+
3. Use reads, research, quotes, simulations, and unsigned preparation.
|
|
53
|
+
4. Review every prepared artifact in the wallet that will sign it.
|
|
54
|
+
5. Treat only a confirmed transaction hash plus receipt as execution.
|
|
55
|
+
|
|
56
|
+
Hermes is optional. To add its isolated runtime, specialist profiles, and local
|
|
57
|
+
read plane later:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
oracle bootstrap
|
|
61
|
+
oracle init --apply # writes profiles + local HMAC attestation config; no wallet key
|
|
62
|
+
oracle data serve # loopback only: 127.0.0.1:8787
|
|
63
|
+
oracle doctor
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Library users can prepare directly:
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import { data } from "@oracle-agent/oracle";
|
|
70
|
+
const prepared = await data.call("hl-perps", "prepareOrder", {
|
|
71
|
+
/* coin, side, size, owner wallet address */
|
|
72
|
+
});
|
|
73
|
+
// Oracle stops here. The user's wallet reviews, signs, and submits.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
See [SETUP.md](SETUP.md) for clean installation and troubleshooting,
|
|
77
|
+
[docs/locals-only-fee-waiver.md](docs/locals-only-fee-waiver.md) for the 0% holder fee, and
|
|
78
|
+
[docs/buzz-integration.md](docs/buzz-integration.md) for the Buzz HTTP contract.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## What Oracle is
|
|
83
|
+
|
|
84
|
+
Most "AI crypto agent" projects give a model a hot wallet and hope. Oracle does
|
|
85
|
+
the opposite: the model *proposes*, the owner *authorizes*, and the policy layer
|
|
86
|
+
decides what may even be asked.
|
|
87
|
+
|
|
88
|
+
Three properties define it:
|
|
89
|
+
|
|
90
|
+
1. **Self-custody by default.** The public package never accepts your private
|
|
91
|
+
key. It builds unsigned transactions and typed-data intents; your wallet
|
|
92
|
+
signs them.
|
|
93
|
+
2. **Bound grants.** A grant is a signed, scoped, expiring permission: max
|
|
94
|
+
value, chain, venue, destination allowlist, TTL. Oracle canonicalizes it,
|
|
95
|
+
renders it for review, and refuses to prepare anything outside it. Runtime
|
|
96
|
+
enforcement is the wallet's or smart account's job — this package never
|
|
97
|
+
signs, so it cannot be the thing that stops a transaction.
|
|
98
|
+
3. **Receipts or it didn't happen.** A claim without a transaction hash, a
|
|
99
|
+
receipt, and a balance delta is not a result.
|
|
100
|
+
|
|
101
|
+
Default posture is `DISARMED`.
|
|
102
|
+
|
|
103
|
+
## Why it's different
|
|
104
|
+
|
|
105
|
+
The differentiators are **policy, custody, and receipts** — not a smarter chat
|
|
106
|
+
loop.
|
|
107
|
+
|
|
108
|
+
| | Typical agent | Oracle |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| Custody | house wallet holds keys | user signs, no house custody |
|
|
111
|
+
| Authority | prompt-level "be careful" | signed grant: chain, spend, targets, TTL — enforced by your wallet, not by us |
|
|
112
|
+
| Destinations | whatever the model emits | reviewed per-chain allowlist, fail-closed |
|
|
113
|
+
| Slippage | fixed % | live guard recomputed per leg, hard 100 bps cap |
|
|
114
|
+
| Proof | model says "done" | hash + verified successful on-chain receipt + expected balance delta or it failed |
|
|
115
|
+
| Surface | swap only | swaps, bridges, perps, vaults, yield, NFTs, intents |
|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
you
|
|
121
|
+
|
|
|
122
|
+
Task
|
|
123
|
+
|
|
|
124
|
+
oracle <- routes, never authorizes custody
|
|
125
|
+
|
|
|
126
|
+
+------+------+------+------+------+------+------+
|
|
127
|
+
| | | | | | | |
|
|
128
|
+
poly hyper robin solana bitcoin stable protocol
|
|
129
|
+
market liquid hood builder
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Each lane is a Hermes **profile**: its own system prompt, skills, memory, and
|
|
133
|
+
sessions. The `oracle` lane routes intent to the right specialist. Adding a lane
|
|
134
|
+
is adding a directory.
|
|
135
|
+
|
|
136
|
+
Three planes, and the boundary between them is mechanically enforced:
|
|
137
|
+
|
|
138
|
+
- **Data plane** (public) — read/quote across chains and protocols. No keys.
|
|
139
|
+
- **Policy plane** (public) — destination allowlists, slippage guards, route and
|
|
140
|
+
vault attestations, grant schema. Holds no keys; constrains what a signer may
|
|
141
|
+
be asked to do.
|
|
142
|
+
- **Exec plane** (private, optional) — signing and broadcast live only in
|
|
143
|
+
separately operated owner infrastructure. It is not published on npm, not in
|
|
144
|
+
this artifact, and not available to holder installs.
|
|
145
|
+
|
|
146
|
+
`test/custody-boundary.test.mjs` walks the import graph and fails if any public
|
|
147
|
+
module reaches wallet key material or a house signer. The split is a test, not a
|
|
148
|
+
promise.
|
|
149
|
+
|
|
150
|
+
## Coverage
|
|
151
|
+
|
|
152
|
+
**11 EVM chains** built in: Ethereum, Optimism, BNB, Polygon, Stable, HyperEVM,
|
|
153
|
+
Abstract, Robinhood Chain, Base, Arbitrum, Avalanche. Plus Solana and Bitcoin L1
|
|
154
|
+
lanes. Solana covers Jupiter quote/prepare, SPL account research, live
|
|
155
|
+
simulation of the prepared swap, and Magic Eden NFT reads with unsigned
|
|
156
|
+
buy/list/mint tickets. Bitcoin covers Esplora fee/UTXO reads, Ordinals/runes
|
|
157
|
+
research, Satflow PSBT intents, and inscription PSBT preparation. Hyperliquid
|
|
158
|
+
adds HyperCore HYPE staking: validator reads plus EIP-712 stake, delegate,
|
|
159
|
+
undelegate, and unstake preparation. User wallets sign.
|
|
160
|
+
|
|
161
|
+
**Any other EVM chain is config, not code:**
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
import { registerCustomChain } from "@oracle-agent/oracle/scanner";
|
|
165
|
+
|
|
166
|
+
registerCustomChain({
|
|
167
|
+
key: "mychain",
|
|
168
|
+
chainId: 7777,
|
|
169
|
+
name: "My Chain",
|
|
170
|
+
rpcEnv: ["MYCHAIN_RPC_URL"],
|
|
171
|
+
nativeCurrency: { symbol: "MYC", decimals: 18 },
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
That chain immediately has block reads, balances, on-chain token resolution, log
|
|
176
|
+
scanning, and structural risk checks. See
|
|
177
|
+
[`docs/adding-a-chain.md`](docs/adding-a-chain.md).
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
oracle-scan chains # coverage matrix
|
|
181
|
+
oracle-scan token base 0x8335...2913 # on-chain identity
|
|
182
|
+
oracle-scan pools base 0x4200...0006 # pools ranked by liquidity
|
|
183
|
+
oracle-scan risk base 0x8335...2913 # structural checks + sell simulation
|
|
184
|
+
oracle-scan sell base 0x8335...2913 # round trip: can you actually exit?
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
All 11 built-in EVM chains currently report the full 10-capability scanner
|
|
188
|
+
matrix, including live quote, sell simulation, and unsigned preparation where
|
|
189
|
+
the selected provider supports that operation. Capability coverage is not a
|
|
190
|
+
claim that every protocol supports every action; unsupported paths still fail
|
|
191
|
+
closed.
|
|
192
|
+
|
|
193
|
+
Every venue address was verified **functionally, not by codesize** — a re-runnable
|
|
194
|
+
prober (`scripts/verify-v3-venues.mjs`) asks each candidate to price a pair with a
|
|
195
|
+
known answer. This matters: the canonical QuoterV2 address also has bytecode on
|
|
196
|
+
Base, but does not price that chain's pairs. A codesize check would have
|
|
197
|
+
allowlisted the wrong contract.
|
|
198
|
+
|
|
199
|
+
**70 provider modules** in the read/quote catalog, covering **219 unique
|
|
200
|
+
protocols/venues** across EVM, Solana, and Bitcoin (115 EVM + cross-chain, 98
|
|
201
|
+
Solana venues backed by 101 verified Jupiter program IDs, 6 Bitcoin surfaces).
|
|
202
|
+
One module can cover many protocols: the Jupiter module alone routes 98 Solana
|
|
203
|
+
venues, so provider-module count and protocol count are different numbers.
|
|
204
|
+
|
|
205
|
+
| Class | Providers |
|
|
206
|
+
|---|---|
|
|
207
|
+
| Chain / explorer | EVM JSON-RPC, Blockscout, Solana RPC, Bitcoin Esplora |
|
|
208
|
+
| Market data | DexScreener, GeckoTerminal, DeFiLlama |
|
|
209
|
+
| DEX / aggregator | Uniswap V3/V4, Aerodrome, Curve, Balancer, LI.FI, ParaSwap, Odos, 0x, 1inch, HyperEVM DEXes |
|
|
210
|
+
| Solana | Jupiter (98 venue labels, 101 verified program IDs) |
|
|
211
|
+
| Intents | CoW Protocol, RFQ |
|
|
212
|
+
| Perps / lending / yield | GMX v2, Morpho, Pendle |
|
|
213
|
+
| Bridges | Across, Hop, Relay |
|
|
214
|
+
| Venues | Hyperliquid (core perps + HIP-3 builder dexs + HIP-4 outcomes), Polymarket (read + local CLOB prepare) |
|
|
215
|
+
| NFT | OpenSea, Satflow, Magic Eden (Solana) |
|
|
216
|
+
| Bitcoin | mempool/Esplora, Ordinals, Runes, UniSat, Best-in-Slot, Satflow |
|
|
217
|
+
|
|
218
|
+
Every provider and every scanner capability declares an honest tier —
|
|
219
|
+
`read-only`, `quote-only`, `prepare`, or `intent`. **API coverage is not execution
|
|
220
|
+
support**, and the catalog says which is which. A chain with no verified venue is
|
|
221
|
+
fail-closed for routing value: read and research work, moving money does not. That
|
|
222
|
+
is a safe default, not a gap.
|
|
223
|
+
|
|
224
|
+
## Capability pack
|
|
225
|
+
|
|
226
|
+
Oracle's default pack is deliberately broad but disarmed:
|
|
227
|
+
|
|
228
|
+
- **Trader** — best-execution route comparison, quote/prepare, simulation, and
|
|
229
|
+
receipt checks; no set-and-forget custody.
|
|
230
|
+
- **Builder** - chain-family fungible-token and NFT-collection launch plans,
|
|
231
|
+
protocol, gacha, DEX, and launchpad scaffolds with unsigned deploy/admin actions.
|
|
232
|
+
Unsupported chain adapters fail closed instead of pretending one deploy fits all.
|
|
233
|
+
- **Analyzer** — token, contract, venue, portfolio, market, and risk research with
|
|
234
|
+
evidence labels. `/balance` or plain `balance` runs one deterministic snapshot
|
|
235
|
+
across every configured EVM chain plus Solana, Bitcoin, Hyperliquid, and
|
|
236
|
+
discoverable NFTs. Profile-local observations power history and SVG value graphs;
|
|
237
|
+
unavailable values stay null instead of becoming fake zeroes.
|
|
238
|
+
- **On-chain scanner** — chain-config scanners for tokens, pools, launches,
|
|
239
|
+
risk, exits, and smart-wallet boards.
|
|
240
|
+
- **Meme-token sniper** — fast launch/liquidity monitoring across configured
|
|
241
|
+
chains, guarded by identity checks, sell-sim/reverse-route proof, caps, and
|
|
242
|
+
unsigned user-wallet tickets.
|
|
243
|
+
- **Per-chain graphs + Telegram cards** — charted scanner alerts, route cards,
|
|
244
|
+
meme-launch cards, Hyperliquid HIP-3/HIP-4 cards, and Polymarket cards. User
|
|
245
|
+
API-key actions activate only when self-hosted keys are configured.
|
|
246
|
+
- **NFT mint gas-war limits** — public mint bots enforce chain-bound gas caps,
|
|
247
|
+
per-unit fee caps, and optional priority-fee caps before returning unsigned
|
|
248
|
+
mint transactions. Import `validateNftMintGasWar` from the package root or
|
|
249
|
+
`@oracle-agent/oracle/nft-gas-war`.
|
|
250
|
+
- **Cross-chain RFQ + tokenized assets** — RFQ/intent venues are compared across
|
|
251
|
+
supported chains where configured, and tokenized Robinhood-style assets can be
|
|
252
|
+
bought only after exact contract, venue, route, and sellability checks.
|
|
253
|
+
- **Solana** — SPL accounts, Jupiter quotes, unsigned swap transactions, and
|
|
254
|
+
simulation.
|
|
255
|
+
- **Bitcoin** — L1 reads, Ordinals/runes, Satflow PSBT intents, and inscription
|
|
256
|
+
PSBT preparation.
|
|
257
|
+
|
|
258
|
+
Every money-moving path stays prepare/simulate first. Signing and broadcast are
|
|
259
|
+
wallet/grant actions, not model authority. Meme-token sniping defaults to fast
|
|
260
|
+
scan + prepared ticket; blind broadcast requires a separate capped local signer
|
|
261
|
+
loop and explicit opt-in. NFT mint bots must also honor gas-war caps before any
|
|
262
|
+
wallet-signable transaction is returned. RFQ and tokenized-asset routes are
|
|
263
|
+
capability-labeled per chain; unconfigured venues stay unavailable instead of faked.
|
|
264
|
+
|
|
265
|
+
## Install
|
|
266
|
+
|
|
267
|
+
Install the full public package from npm, or use the public desktop downloads at
|
|
268
|
+
https://oracle.demi.la/downloads/. No wallet or NFT is required. Node `20.19.0`
|
|
269
|
+
or newer is required for the CLI.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
npm i -g @oracle-agent/oracle
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Or from source, if you want to run the suite:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
git clone https://github.com/demi-hl/oracle.git
|
|
279
|
+
cd oracle
|
|
280
|
+
npm install
|
|
281
|
+
npm test
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**→ [SETUP.md](./SETUP.md) covers public data credentials and the separate
|
|
285
|
+
owner-local source lane.** The short version:
|
|
7
286
|
|
|
8
|
-
|
|
287
|
+
- Reads and quotes need **no keys**.
|
|
288
|
+
- The public package exposes no signer, key vault, or broadcast path.
|
|
289
|
+
- User wallets authorize prepared actions outside the public data plane.
|
|
290
|
+
- Owner-local signing exists only in separately operated private infrastructure;
|
|
291
|
+
it is not published on npm and is not a holder capability. When installed by
|
|
292
|
+
the owner, its generic signer exposes six policy-bounded surfaces: `hl`,
|
|
293
|
+
`poly`, `evm-swap`, `evm-bridge`, `btc`, and `sol`, with explicit caps and
|
|
294
|
+
fail-closed allowlists.
|
|
9
295
|
|
|
10
|
-
|
|
11
|
-
the artifact the gate returns:
|
|
296
|
+
### Action vocabulary and execution planes
|
|
12
297
|
|
|
298
|
+
Oracle keeps capability and authorization separate:
|
|
299
|
+
|
|
300
|
+
- Public Oracle reads, quotes, simulates, and prepares unsigned artifacts.
|
|
301
|
+
- **Path A:** owner/main, browser, smart-account, hardware, or protocol-native
|
|
302
|
+
wallets sign the prepared artifact. This is the default self-custody path.
|
|
303
|
+
- **Path B:** private owner-local infrastructure may sign on the same host with
|
|
304
|
+
the owner's key and policy. It is deployment-specific, unavailable to holder
|
|
305
|
+
installs, and must never expose a vault passphrase or signer credential to the
|
|
306
|
+
agent process.
|
|
307
|
+
- The generic unattended signer exposes six bounded surfaces: `hl`, `poly`,
|
|
308
|
+
`evm-swap`, `evm-bridge`, `btc`, `sol`. Each surface decodes its own
|
|
309
|
+
envelope, enforces its caps, and refuses while its allowlists are empty.
|
|
310
|
+
- Ordinary EVM preparation remains user-wallet signed unless a trusted
|
|
311
|
+
owner-controlled direct-exec process is explicitly installed and armed.
|
|
312
|
+
- `ORACLE_AUTONOMOUS_TRADING=1` is direct execution for trusted owner-controlled
|
|
313
|
+
local code only. It is never model/agent authority and should not be framed as
|
|
314
|
+
equivalent to the `oracle-signer` agent-process path.
|
|
315
|
+
- A deployment may separately install a same-host, owner-gated EVM executor.
|
|
316
|
+
Oracle must verify that executor before describing bounded EVM execution as
|
|
317
|
+
available. Missing deployment capability means "unavailable here," not
|
|
318
|
+
"Oracle can never execute EVM."
|
|
319
|
+
- `watch`, `watch this`, and `ping me` always create `active: true, actionMode: alert_only`.
|
|
320
|
+
- `arm` creates `active: true, actionMode: execute` only for one exact owner-authorized action. It is never inferred from a watch.
|
|
321
|
+
|
|
322
|
+
The package exports this binding as `@oracle-agent/oracle/action-semantics`. Legacy watch stores can migrate `status: watching|armed` with `migrateLegacyWatchRecord()`; because it is specifically a watch-store migration, both statuses become `alert_only`, never execution authority.
|
|
323
|
+
|
|
324
|
+
Run the read-only data plane:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
npm run start:data
|
|
328
|
+
npm run health
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Run the public console (wallet connect, grant editor, receipts):
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
npm run start:public
|
|
335
|
+
# http://127.0.0.1:8799/
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
This is an unauthenticated loopback development server, not a holder gate or a
|
|
339
|
+
public deployment. Keep it off LAN/tailnet/public interfaces and place a tested
|
|
340
|
+
admission gateway in front of any hosted beta.
|
|
341
|
+
|
|
342
|
+
## Model providers
|
|
343
|
+
|
|
344
|
+
Oracle is a library. Drive it with Claude, GPT, Gemini, Grok, a local model, or
|
|
345
|
+
a plain script — the tools are ordinary functions plus an MCP server:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
npx oracle-data # local read plane on 127.0.0.1:8787
|
|
349
|
+
npx oracle-data-mcp # MCP stdio server (any MCP client); needs oracle-data up
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
It is better under [Hermes](https://hermes-agent.nousresearch.com/docs), because
|
|
353
|
+
a trading stack is several workloads with opposite needs and **per-profile
|
|
354
|
+
routing** gives each its own model, tools, and key scope: cheap wide context for
|
|
355
|
+
research, a fast model for execution where latency is money, the strongest model
|
|
356
|
+
for risk review, something small for unattended crons. The research profile can
|
|
357
|
+
hold no signing key at all.
|
|
358
|
+
|
|
359
|
+
Oracle's own pre-release audit ran four model lineages — Grok 4.5, Opus 5,
|
|
360
|
+
Fable 5, GPT-5.6 — and **each found a critical bug the others missed**. One
|
|
361
|
+
model reviewing its own work would have shipped three of them.
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## Agent profiles
|
|
365
|
+
|
|
366
|
+
Oracle ships an installable 8-lane mesh for Hermes:
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
oracle-init # dry run -- shows exactly what it would do
|
|
370
|
+
oracle-init --apply # create profiles, install SOULs + skills, wire MCP config
|
|
371
|
+
npx oracle-data # keep running — MCP tools call the local read plane on :8787
|
|
372
|
+
oracle # premium boxed TTY on the same oracle profile as messaging
|
|
373
|
+
oracle model # choose provider/model; persona stays oracle
|
|
374
|
+
oracle chain use hyperliquid
|
|
375
|
+
oracle setup # telegram / discord / slack messaging
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
Terminal and configured messaging channels are transports into the same Hermes
|
|
379
|
+
`oracle` profile. When a local operator/MCP is configured, an explicit owner
|
|
380
|
+
trade instruction can execute from either interface. The selected model never
|
|
381
|
+
bypasses signer-owned grants, allowlists, caps, MAC checks, simulation, or
|
|
382
|
+
receipt verification.
|
|
383
|
+
|
|
384
|
+
Lanes: `oracle` (router), `polymarket-agent`, `hyperliquid-agent`,
|
|
385
|
+
`robinhood-agent`, `solana-agent`, `bitcoin-agent`, `stable-agent`,
|
|
386
|
+
`protocol-builder`, plus `_template` for your own. Details in
|
|
387
|
+
[`docs/profiles.md`](docs/profiles.md).
|
|
388
|
+
|
|
389
|
+
Every lane installs **DISARMED**. No lane requests a broadcast or signing action —
|
|
390
|
+
only read, simulate, and prepare — and a test enforces that so widening custody
|
|
391
|
+
can't pass review quietly. An existing `SOUL.md` is never overwritten without
|
|
392
|
+
`--force`, and `--force` writes a timestamped backup first.
|
|
393
|
+
|
|
394
|
+
Oracle does not issue its own model credential. Standalone chat uses the OAuth
|
|
395
|
+
login or API key the user configured; Hermes mode uses whichever provider that
|
|
396
|
+
Hermes installation already supports.
|
|
397
|
+
|
|
398
|
+
**Why "built for Hermes" and not just "works anywhere":** Oracle's read plane is
|
|
399
|
+
an MCP server, so any MCP client can call it. But the *mesh* — per-lane memory,
|
|
400
|
+
skills, sessions, and separate model choice per specialist — is Hermes profile
|
|
401
|
+
machinery. You can use Oracle from any agent; you get the architecture in the
|
|
402
|
+
diagram above from Hermes.
|
|
403
|
+
|
|
404
|
+
## Best-execution routing
|
|
405
|
+
|
|
406
|
+
The highest quote is not the cheapest swap. Oracle ranks on **net received after
|
|
407
|
+
gas and fees**, comparing every available source in parallel:
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
oracle-route swap base 0x4200...0006 0x8335...2913 # WETH -> USDC
|
|
411
|
+
oracle-route bridge arbitrum base # ETH across chains
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
```
|
|
415
|
+
source net out gross cost
|
|
416
|
+
* paraswap 1,903.880867 1,903.893053 $0.01
|
|
417
|
+
cow 1,903.693798 1,903.693798 gasless (solver)
|
|
418
|
+
lifi 1,894.432632 1,899.20966 $4.78
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
Sources: **LI.FI, CoW, ParaSwap, 0x, 1inch** for swaps · **LI.FI, Relay, Across**
|
|
422
|
+
for bridges. 0x and 1inch activate when their API key is present; the rest need
|
|
423
|
+
none.
|
|
424
|
+
|
|
425
|
+
Why net matters:
|
|
426
|
+
|
|
427
|
+
- **Gas is part of the price.** A route quoting 0.2% more but costing $14 more in
|
|
428
|
+
gas loses on a $500 swap and wins on a $50k one. The crossover depends on trade
|
|
429
|
+
size, so any fixed preference is wrong on one side of it.
|
|
430
|
+
- **Intents can beat AMMs.** CoW's solver pays the gas, so a slightly lower gross
|
|
431
|
+
quote often wins on net — the case naive ranking always gets backwards.
|
|
432
|
+
- **Sources disagree about what they mean.** Some report gas in USD, some in native
|
|
433
|
+
wei, some not at all. Oracle normalizes, and marks what was measured.
|
|
434
|
+
|
|
435
|
+
**Unknown cost is never scored as zero.** A source that does not report gas is
|
|
436
|
+
ranked on gross and flagged, because scoring an unknown as free is how the worst
|
|
437
|
+
route wins a comparison. When the top two routes measure cost differently, Oracle
|
|
438
|
+
quotes **no spread at all** rather than a number that compares different things.
|
|
439
|
+
|
|
440
|
+
Then prepare the winner in one step:
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
oracle-route prepare base <tokenIn> <tokenOut> <yourWallet>
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
You get back an **unsigned transaction** (LI.FI, ParaSwap, 0x) or **EIP-712 typed
|
|
447
|
+
data** for an off-chain order (CoW). `artifactKind` says which — they need different
|
|
448
|
+
wallet actions, and one is not broadcast at all. Prepare **re-quotes** and reports
|
|
449
|
+
`driftBps` against the comparison, because a minimum computed from a stale quote is
|
|
450
|
+
not a minimum.
|
|
451
|
+
|
|
452
|
+
Bridges prepare too:
|
|
453
|
+
|
|
454
|
+
```bash
|
|
455
|
+
oracle-route prepare-bridge arbitrum base <yourWallet>
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Bridge artifacts are always a **list** of transactions — some routes need an approval
|
|
459
|
+
and a deposit signed in order, and signing only the first leaves funds approved but
|
|
460
|
+
not bridged. Both chains are reported, and a transaction whose chain does not match
|
|
461
|
+
the origin is refused. Oracle states plainly that **bridging is not atomic**: the
|
|
462
|
+
origin transaction confirming does not mean funds arrived.
|
|
463
|
+
|
|
464
|
+
Routing never signs. `taker` must be the real wallet; placeholder addresses are
|
|
465
|
+
rejected, since quoting is anonymous but preparing is not. Signing happens in
|
|
466
|
+
the user's wallet or in a separately operated source-only execution lane.
|
|
467
|
+
|
|
468
|
+
Individual source failures degrade the comparison by one source instead of breaking
|
|
469
|
+
it — verified in practice when Odos sunset their public API mid-development
|
|
470
|
+
(HTTP 410); the router kept ranking and the provider was marked `unavailable`.
|
|
471
|
+
|
|
472
|
+
## On-chain equities — Crossbook (HIP-3 / Arcus / RH / Solana / TON)
|
|
473
|
+
|
|
474
|
+
Tokenized equities span multiple venues. Oracle ranks them the same way as swaps:
|
|
475
|
+
net of known costs, with unknown costs never scored as free.
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
oracle equities venues
|
|
479
|
+
oracle equities quote NVDA --size 1000
|
|
480
|
+
oracle equities quote SPY --size 500 --json
|
|
481
|
+
oracle equities prepare NVDA --recipient 0xYourWallet
|
|
482
|
+
# or: oracle-equities quote NVDA --size 1000
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
Import surface: `@oracle-agent/oracle/equities` (`bestEquityRoute`, `equityVenues`,
|
|
486
|
+
`prepareEquityRoute`). MCP tools: `equity_venues`, `equity_quote`, `equity_prepare`.
|
|
487
|
+
|
|
488
|
+
Only Robinhood-chain Uniswap is prepare-tier in v1. HIP-3, Arcus, Solana xStocks,
|
|
489
|
+
and TON ston.fi are quote-only discovery. `bestPreparable` is separate from the
|
|
490
|
+
overall winner so a quote-only mid is never presented as actionable.
|
|
491
|
+
|
|
492
|
+
## Examples
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
node examples/add-a-chain.mjs # register an unseen chain, no code
|
|
496
|
+
node examples/research-a-token.mjs # honest token research on live data
|
|
497
|
+
node examples/oracle-pack-template.mjs # skeleton for a safe Oracle protocol pack
|
|
13
498
|
```
|
|
14
|
-
|
|
499
|
+
|
|
500
|
+
## MCP
|
|
501
|
+
|
|
502
|
+
Oracle exposes its read plane over the Model Context Protocol, so any MCP client
|
|
503
|
+
(Hermes, Claude Code, others) can use it:
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
oracle-data-mcp
|
|
15
507
|
```
|
|
16
508
|
|
|
17
|
-
|
|
509
|
+
## Security
|
|
510
|
+
|
|
511
|
+
- Oracle never receives private keys.
|
|
512
|
+
- The router can propose, simulate, explain, and draft. It cannot authorize.
|
|
513
|
+
- Public modules may not import signer or executor code (enforced by test).
|
|
514
|
+
- Destination allowlists are per-chain and fail-closed: an empty allowlist
|
|
515
|
+
refuses everything rather than allowing everything.
|
|
516
|
+
- Report vulnerabilities per [SECURITY.md](SECURITY.md). Please do not open a
|
|
517
|
+
public issue for a live exploit.
|
|
518
|
+
|
|
519
|
+
## What Oracle is not
|
|
520
|
+
|
|
521
|
+
- Not an autonomous trader. There is no "set and forget."
|
|
522
|
+
- Not custodial. If a design needs your key on our server, that design is wrong.
|
|
523
|
+
- Not a guarantee. Crypto execution carries real risk; read the code you run.
|
|
524
|
+
|
|
525
|
+
## License
|
|
526
|
+
|
|
527
|
+
[Business Source License 1.1](LICENSE) — source-available, not open source.
|
|
528
|
+
|
|
529
|
+
You may read, modify, self-host, and use Oracle freely for internal use,
|
|
530
|
+
evaluation, research, and personal use. What you may not do is offer Oracle,
|
|
531
|
+
or substantially its functionality, to third parties as a competing product
|
|
532
|
+
or hosted service without a commercial license.
|
|
533
|
+
|
|
534
|
+
Each version converts to **Apache-2.0** on its Change Date (four years after
|
|
535
|
+
release). Versions `0.1.0` through `0.11.0` were published under Apache-2.0
|
|
536
|
+
and remain under those terms.
|
|
18
537
|
|
|
19
|
-
|
|
538
|
+
The **Oracle** name and marks are reserved; please don't imply endorsement by
|
|
539
|
+
an official deployment when shipping a fork.
|
|
20
540
|
|
|
21
|
-
|
|
22
|
-
artifact from a server that verifies ownership is the only version of this that means
|
|
23
|
-
anything. Keys and signing never live in the public package either way.
|
|
541
|
+
For commercial licensing, contact the maintainer.
|