@jinn-network/client 0.1.1 → 0.1.2-canary.647548b7
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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +123 -0
- package/README.md +213 -37
- package/deployments/deployment-claim-registry-baseSepolia.json +13 -0
- package/deployments/deployment-jinn-testnet-faucet-baseSepolia-fast.json +15 -0
- package/dist/adapters/claim-registry/abi.d.ts +127 -0
- package/dist/adapters/claim-registry/abi.js +93 -0
- package/dist/adapters/claim-registry/abi.js.map +1 -0
- package/dist/adapters/claim-registry/client.d.ts +89 -0
- package/dist/adapters/claim-registry/client.js +205 -0
- package/dist/adapters/claim-registry/client.js.map +1 -0
- package/dist/adapters/mech/adapter.d.ts +1 -0
- package/dist/adapters/mech/adapter.js +75 -41
- package/dist/adapters/mech/adapter.js.map +1 -1
- package/dist/adapters/mech/contracts.d.ts +2 -0
- package/dist/adapters/mech/contracts.js +57 -7
- package/dist/adapters/mech/contracts.js.map +1 -1
- package/dist/adapters/mech/ipfs.d.ts +8 -0
- package/dist/adapters/mech/ipfs.js +12 -0
- package/dist/adapters/mech/ipfs.js.map +1 -1
- package/dist/adapters/mech/types.d.ts +20 -46
- package/dist/adapters/mech/types.js +16 -35
- package/dist/adapters/mech/types.js.map +1 -1
- package/dist/api/balance-build.js +3 -3
- package/dist/api/balance-build.js.map +1 -1
- package/dist/api/fleet-build.js +35 -40
- package/dist/api/fleet-build.js.map +1 -1
- package/dist/api/gather-status.d.ts +1 -0
- package/dist/api/gather-status.js +185 -4
- package/dist/api/gather-status.js.map +1 -1
- package/dist/api/history-build.d.ts +5 -1
- package/dist/api/history-build.js +51 -26
- package/dist/api/history-build.js.map +1 -1
- package/dist/api/portfolio-v0-build.d.ts +81 -0
- package/dist/api/portfolio-v0-build.js +141 -0
- package/dist/api/portfolio-v0-build.js.map +1 -0
- package/dist/api/portfolio-v0-doctor.d.ts +37 -0
- package/dist/api/portfolio-v0-doctor.js +123 -0
- package/dist/api/portfolio-v0-doctor.js.map +1 -0
- package/dist/api/rewards-build.js +30 -14
- package/dist/api/rewards-build.js.map +1 -1
- package/dist/api/status-build.d.ts +37 -6
- package/dist/api/status-build.js +1 -0
- package/dist/api/status-build.js.map +1 -1
- package/dist/api/status-rollup-build.d.ts +2 -0
- package/dist/api/status-rollup-build.js +27 -0
- package/dist/api/status-rollup-build.js.map +1 -1
- package/dist/bin/jinn-mcp.d.ts +0 -12
- package/dist/bin/jinn-mcp.js +5 -14
- package/dist/bin/jinn-mcp.js.map +1 -1
- package/dist/build-meta.json +1 -1
- package/dist/cli/commands/auth.js +115 -25
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/balance.js +8 -1
- package/dist/cli/commands/balance.js.map +1 -1
- package/dist/cli/commands/bootstrap.js +1 -0
- package/dist/cli/commands/bootstrap.js.map +1 -1
- package/dist/cli/commands/doctor.js +130 -14
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/fleet-scale.js +1 -0
- package/dist/cli/commands/fleet-scale.js.map +1 -1
- package/dist/cli/commands/fleet.js +10 -1
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/fund-requirements.js +2 -0
- package/dist/cli/commands/fund-requirements.js.map +1 -1
- package/dist/cli/commands/history.js +25 -6
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/intents.d.ts +17 -0
- package/dist/cli/commands/intents.js +489 -0
- package/dist/cli/commands/intents.js.map +1 -0
- package/dist/cli/commands/keys-backup.js +13 -11
- package/dist/cli/commands/keys-backup.js.map +1 -1
- package/dist/cli/commands/logs.js +35 -11
- package/dist/cli/commands/logs.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts +3 -0
- package/dist/cli/commands/mcp.js +19 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/plugin-install.js +8 -4
- package/dist/cli/commands/plugin-install.js.map +1 -1
- package/dist/cli/commands/quickstart.js +60 -4
- package/dist/cli/commands/quickstart.js.map +1 -1
- package/dist/cli/commands/rewards.js +27 -1
- package/dist/cli/commands/rewards.js.map +1 -1
- package/dist/cli/commands/status.js +11 -1
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/submit-intent.js +108 -5
- package/dist/cli/commands/submit-intent.js.map +1 -1
- package/dist/cli/commands/version.js +1 -0
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/deployment-digest.js +5 -0
- package/dist/cli/deployment-digest.js.map +1 -1
- package/dist/cli/execution-context.js +1 -0
- package/dist/cli/execution-context.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/intent-registry-access.d.ts +64 -0
- package/dist/cli/intent-registry-access.js +187 -0
- package/dist/cli/intent-registry-access.js.map +1 -0
- package/dist/cli/introspection-context.js +1 -0
- package/dist/cli/introspection-context.js.map +1 -1
- package/dist/cli/password.d.ts +21 -9
- package/dist/cli/password.js +45 -24
- package/dist/cli/password.js.map +1 -1
- package/dist/config.d.ts +110 -8
- package/dist/config.js +41 -12
- package/dist/config.js.map +1 -1
- package/dist/daemon/balance-topup-loop.js +32 -4
- package/dist/daemon/balance-topup-loop.js.map +1 -1
- package/dist/daemon/creator.d.ts +7 -1
- package/dist/daemon/creator.js +51 -3
- package/dist/daemon/creator.js.map +1 -1
- package/dist/daemon/daemon.d.ts +43 -0
- package/dist/daemon/daemon.js +110 -3
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/delivery-watcher.d.ts +3 -1
- package/dist/daemon/delivery-watcher.js +19 -1
- package/dist/daemon/delivery-watcher.js.map +1 -1
- package/dist/daemon/restorer.js +27 -0
- package/dist/daemon/restorer.js.map +1 -1
- package/dist/daemon/reward-claim-loop.js +38 -1
- package/dist/daemon/reward-claim-loop.js.map +1 -1
- package/dist/dashboard/index.html +71 -496
- package/dist/earning/bootstrap.d.ts +2 -1
- package/dist/earning/bootstrap.js +72 -4
- package/dist/earning/bootstrap.js.map +1 -1
- package/dist/earning/contracts.d.ts +10 -0
- package/dist/earning/contracts.js +24 -0
- package/dist/earning/contracts.js.map +1 -1
- package/dist/earning/jinn-rewards.d.ts +9 -0
- package/dist/earning/jinn-rewards.js +7 -0
- package/dist/earning/jinn-rewards.js.map +1 -1
- package/dist/earning/stolas-claim.d.ts +6 -0
- package/dist/earning/stolas-claim.js +7 -0
- package/dist/earning/stolas-claim.js.map +1 -1
- package/dist/intents/prediction-apy-v0-auto.d.ts +11 -0
- package/dist/intents/prediction-apy-v0-auto.js +46 -0
- package/dist/intents/prediction-apy-v0-auto.js.map +1 -0
- package/dist/intents/prediction-apy-v0-template.d.ts +8 -0
- package/dist/intents/prediction-apy-v0-template.js +22 -0
- package/dist/intents/prediction-apy-v0-template.js.map +1 -0
- package/dist/intents/prediction-v0-auto.d.ts +53 -0
- package/dist/intents/prediction-v0-auto.js +84 -0
- package/dist/intents/prediction-v0-auto.js.map +1 -0
- package/dist/intents/prediction-v0-template.d.ts +65 -0
- package/dist/intents/prediction-v0-template.js +125 -0
- package/dist/intents/prediction-v0-template.js.map +1 -0
- package/dist/main.js +149 -1
- package/dist/main.js.map +1 -1
- package/dist/mcp/operator-server.d.ts +1 -1
- package/dist/mcp/operator-server.js +1 -1
- package/dist/observability/emit-event.d.ts +12 -0
- package/dist/observability/emit-event.js +27 -0
- package/dist/observability/emit-event.js.map +1 -0
- package/dist/preflight/claude-auth.d.ts +12 -1
- package/dist/preflight/claude-auth.js +21 -3
- package/dist/preflight/claude-auth.js.map +1 -1
- package/dist/restorer/engine/canonical-json.d.ts +18 -0
- package/dist/restorer/engine/canonical-json.js +59 -0
- package/dist/restorer/engine/canonical-json.js.map +1 -0
- package/dist/restorer/engine/claim.d.ts +69 -0
- package/dist/restorer/engine/claim.js +104 -0
- package/dist/restorer/engine/claim.js.map +1 -0
- package/dist/restorer/engine/delivery.d.ts +52 -0
- package/dist/restorer/engine/delivery.js +63 -0
- package/dist/restorer/engine/delivery.js.map +1 -0
- package/dist/restorer/engine/engine.d.ts +203 -0
- package/dist/restorer/engine/engine.js +753 -0
- package/dist/restorer/engine/engine.js.map +1 -0
- package/dist/restorer/engine/manifest-assembly.d.ts +67 -0
- package/dist/restorer/engine/manifest-assembly.js +79 -0
- package/dist/restorer/engine/manifest-assembly.js.map +1 -0
- package/dist/restorer/engine/packaging.d.ts +87 -0
- package/dist/restorer/engine/packaging.js +350 -0
- package/dist/restorer/engine/packaging.js.map +1 -0
- package/dist/restorer/engine/persistence.d.ts +170 -0
- package/dist/restorer/engine/persistence.js +381 -0
- package/dist/restorer/engine/persistence.js.map +1 -0
- package/dist/restorer/engine/recovery.d.ts +22 -0
- package/dist/restorer/engine/recovery.js +24 -0
- package/dist/restorer/engine/recovery.js.map +1 -0
- package/dist/restorer/engine/registry.d.ts +62 -0
- package/dist/restorer/engine/registry.js +73 -0
- package/dist/restorer/engine/registry.js.map +1 -0
- package/dist/restorer/engine/signing.d.ts +30 -0
- package/dist/restorer/engine/signing.js +39 -0
- package/dist/restorer/engine/signing.js.map +1 -0
- package/dist/restorer/engine/state.d.ts +42 -0
- package/dist/restorer/engine/state.js +87 -0
- package/dist/restorer/engine/state.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/api-wallet.d.ts +64 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/api-wallet.js +96 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/api-wallet.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.d.ts +101 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js +710 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/index.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/mcp-tools.d.ts +137 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/mcp-tools.js +865 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/mcp-tools.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/safety-rails.d.ts +74 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/safety-rails.js +74 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/safety-rails.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.d.ts +97 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js +226 -0
- package/dist/restorer/impls/claude-mcp-hyperliquid/session-orchestrator.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-prediction/index.d.ts +43 -0
- package/dist/restorer/impls/claude-mcp-prediction/index.js +230 -0
- package/dist/restorer/impls/claude-mcp-prediction/index.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-prediction/mcp-tools.d.ts +38 -0
- package/dist/restorer/impls/claude-mcp-prediction/mcp-tools.js +135 -0
- package/dist/restorer/impls/claude-mcp-prediction/mcp-tools.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-prediction/prompt.d.ts +8 -0
- package/dist/restorer/impls/claude-mcp-prediction/prompt.js +54 -0
- package/dist/restorer/impls/claude-mcp-prediction/prompt.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.d.ts +36 -0
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js +137 -0
- package/dist/restorer/impls/claude-mcp-prediction/session-orchestrator.js.map +1 -0
- package/dist/restorer/impls/claude-mcp-prediction/types.d.ts +82 -0
- package/dist/restorer/impls/claude-mcp-prediction/types.js +6 -0
- package/dist/restorer/impls/claude-mcp-prediction/types.js.map +1 -0
- package/dist/restorer/impls/legacy-claude/index.d.ts +45 -0
- package/dist/restorer/impls/legacy-claude/index.js +71 -0
- package/dist/restorer/impls/legacy-claude/index.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.d.ts +68 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.js +117 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/canonical-metrics.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/availability.d.ts +49 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/availability.js +91 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/availability.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.d.ts +78 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.js +274 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/consistency.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.d.ts +23 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.js +49 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/eligibility.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.d.ts +25 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.js +44 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/integrity.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.d.ts +17 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.js +43 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/checks/spec.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/index.d.ts +43 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js +431 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/index.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/score.d.ts +21 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/score.js +32 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/score.js.map +1 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/types.d.ts +32 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/types.js +8 -0
- package/dist/restorer/impls/portfolio-v0-evaluator/types.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.d.ts +39 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js +98 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/index.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/strategy.d.ts +2 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/strategy.js +7 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/strategy.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/types.d.ts +4 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/types.js +2 -0
- package/dist/restorer/impls/prediction-apy-v0-baseline/types.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.d.ts +2 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.js +7 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/canonical-metrics.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.d.ts +39 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js +186 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/index.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/score.d.ts +9 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/score.js +20 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/score.js.map +1 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/types.d.ts +7 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/types.js +2 -0
- package/dist/restorer/impls/prediction-apy-v0-evaluator/types.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-baseline/index.d.ts +29 -0
- package/dist/restorer/impls/prediction-v0-baseline/index.js +94 -0
- package/dist/restorer/impls/prediction-v0-baseline/index.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-baseline/strategy.d.ts +8 -0
- package/dist/restorer/impls/prediction-v0-baseline/strategy.js +41 -0
- package/dist/restorer/impls/prediction-v0-baseline/strategy.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-baseline/types.d.ts +7 -0
- package/dist/restorer/impls/prediction-v0-baseline/types.js +2 -0
- package/dist/restorer/impls/prediction-v0-baseline/types.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/canonical-metrics.d.ts +20 -0
- package/dist/restorer/impls/prediction-v0-evaluator/canonical-metrics.js +66 -0
- package/dist/restorer/impls/prediction-v0-evaluator/canonical-metrics.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/availability.d.ts +9 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/availability.js +23 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/availability.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/eligibility.d.ts +3 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/eligibility.js +13 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/eligibility.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.d.ts +7 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js +93 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/integrity.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/spec.d.ts +5 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/spec.js +20 -0
- package/dist/restorer/impls/prediction-v0-evaluator/checks/spec.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/index.d.ts +33 -0
- package/dist/restorer/impls/prediction-v0-evaluator/index.js +208 -0
- package/dist/restorer/impls/prediction-v0-evaluator/index.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/score.d.ts +8 -0
- package/dist/restorer/impls/prediction-v0-evaluator/score.js +15 -0
- package/dist/restorer/impls/prediction-v0-evaluator/score.js.map +1 -0
- package/dist/restorer/impls/prediction-v0-evaluator/types.d.ts +7 -0
- package/dist/restorer/impls/prediction-v0-evaluator/types.js +2 -0
- package/dist/restorer/impls/prediction-v0-evaluator/types.js.map +1 -0
- package/dist/restorer/types.d.ts +177 -0
- package/dist/restorer/types.js +7 -0
- package/dist/restorer/types.js.map +1 -0
- package/dist/store/store.d.ts +64 -1
- package/dist/store/store.js +226 -4
- package/dist/store/store.js.map +1 -1
- package/dist/types/desired-state.d.ts +53 -0
- package/dist/types/desired-state.js +20 -0
- package/dist/types/desired-state.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/portfolio.d.ts +1000 -0
- package/dist/types/portfolio.js +168 -0
- package/dist/types/portfolio.js.map +1 -0
- package/dist/types/prediction-apy.d.ts +919 -0
- package/dist/types/prediction-apy.js +121 -0
- package/dist/types/prediction-apy.js.map +1 -0
- package/dist/types/prediction.d.ts +925 -0
- package/dist/types/prediction.js +140 -0
- package/dist/types/prediction.js.map +1 -0
- package/dist/venues/aave-v3/addresses.d.ts +6 -0
- package/dist/venues/aave-v3/addresses.js +19 -0
- package/dist/venues/aave-v3/addresses.js.map +1 -0
- package/dist/venues/aave-v3/client.d.ts +81 -0
- package/dist/venues/aave-v3/client.js +97 -0
- package/dist/venues/aave-v3/client.js.map +1 -0
- package/dist/venues/chainlink/client.d.ts +99 -0
- package/dist/venues/chainlink/client.js +130 -0
- package/dist/venues/chainlink/client.js.map +1 -0
- package/dist/venues/chainlink/feeds.d.ts +8 -0
- package/dist/venues/chainlink/feeds.js +9 -0
- package/dist/venues/chainlink/feeds.js.map +1 -0
- package/dist/venues/hyperliquid/account-value.d.ts +30 -0
- package/dist/venues/hyperliquid/account-value.js +30 -0
- package/dist/venues/hyperliquid/account-value.js.map +1 -0
- package/dist/venues/hyperliquid/client.d.ts +63 -0
- package/dist/venues/hyperliquid/client.js +135 -0
- package/dist/venues/hyperliquid/client.js.map +1 -0
- package/dist/venues/hyperliquid/grid.d.ts +36 -0
- package/dist/venues/hyperliquid/grid.js +61 -0
- package/dist/venues/hyperliquid/grid.js.map +1 -0
- package/dist/venues/hyperliquid/types.d.ts +81 -0
- package/dist/venues/hyperliquid/types.js +8 -0
- package/dist/venues/hyperliquid/types.js.map +1 -0
- package/dist/withdraw/run-withdraw-plan.js +2 -0
- package/dist/withdraw/run-withdraw-plan.js.map +1 -1
- package/docker-compose.yml +44 -0
- package/package.json +12 -1
- package/skills/jinn-operator/SKILL.md +85 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Added `jinn intents enable --impl <name>` plus `jinn intents reset <kind>` so operators can switch intent implementations without hand-editing config.
|
|
6
|
+
- Removed the default legacy health-check desired state; testnet now relies on the deterministic auto-generated `prediction.v0` intent path by default.
|
|
7
|
+
- Added graceful legacy Claude skip behavior (`claude_unavailable`) when auth/quota blocks health-check restoration attempts.
|
|
8
|
+
- Fixed no-install invocation so `npx @jinn-network/client@<version> <verb>` works directly via a `client` bin alias.
|
|
9
|
+
- Added canonical `jinn mcp` command and kept `jinn-mcp` as a deprecation shim.
|
|
10
|
+
- Extended package smoke tests to validate both direct `npx` and legacy `npx -p ... jinn ...` execution paths.
|
|
11
|
+
- Includes prior validated canary fixes now rolled into stable:
|
|
12
|
+
- PR #21 default Base Sepolia ClaimRegistry
|
|
13
|
+
- PR #22 idempotent replayed `claimDelivery`
|
|
14
|
+
- PR #23 prediction evaluator support for signed engine manifests
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Contributing to @jinn-network/client
|
|
2
|
+
|
|
3
|
+
Development happens in the [jinn-mono](https://github.com/Jinn-Network/mono) monorepo. This guide covers running the client from source.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node.js 22 (`corepack enable` once so Yarn matches this package's `packageManager` field)
|
|
8
|
+
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude` in PATH — the daemon spawns it as a subprocess)
|
|
9
|
+
- [Foundry](https://book.getfoundry.sh/) (only needed for `yarn e2e` against an Anvil fork)
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd client
|
|
15
|
+
yarn install
|
|
16
|
+
yarn test # vitest suite — 267 tests
|
|
17
|
+
yarn typecheck # tsc --noEmit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Running from source
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
JINN_PASSWORD=your-keystore-password yarn jinn run
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The `yarn jinn` script uses `tsx` to run TypeScript directly without a build step.
|
|
27
|
+
|
|
28
|
+
## Running against an Anvil fork
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Terminal 1
|
|
32
|
+
anvil --fork-url https://sepolia.base.org --port 8545
|
|
33
|
+
|
|
34
|
+
# Terminal 2
|
|
35
|
+
JINN_RPC_URL=http://127.0.0.1:8545 JINN_PASSWORD=test yarn jinn run
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The bootstrap pauses at the funding gate. Fund the printed master address from one of Anvil's pre-funded keys with `cast send`, then re-run.
|
|
39
|
+
|
|
40
|
+
## Project structure
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
src/
|
|
44
|
+
bin/jinn.ts CLI entry point (compiled to dist/bin/jinn.js)
|
|
45
|
+
cli/ CLI dispatcher and commands
|
|
46
|
+
adapters/ Execution adapters (local, mech)
|
|
47
|
+
daemon/ Concurrent loop orchestration
|
|
48
|
+
earning/ Fleet bootstrap state machine
|
|
49
|
+
runner/ Claude subprocess management
|
|
50
|
+
store/ SQLite persistence
|
|
51
|
+
api/ HTTP API (Hono)
|
|
52
|
+
types/ Core type definitions
|
|
53
|
+
errors/ Error envelope system
|
|
54
|
+
mcp/ MCP server for Claude subprocess
|
|
55
|
+
|
|
56
|
+
deployments/ Bundled deployment artifacts (contract addresses)
|
|
57
|
+
test/ Vitest tests (mirrors src/ structure)
|
|
58
|
+
scripts/ Dev utilities (e2e, staking validation, sync)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Build and pack
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
yarn build # tsc output → dist/
|
|
65
|
+
yarn pack -o test.tgz # create publishable tarball
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The `files` field in `package.json` ensures only `dist/`, `deployments/`, `README.md`, and `LICENSE` are included in the tarball.
|
|
69
|
+
|
|
70
|
+
## Releases
|
|
71
|
+
|
|
72
|
+
Use [RELEASING.md](./RELEASING.md) for the package bootstrap publish, npm trusted-publishing setup, canary/stable release flow, the fork-based operator gate (`yarn release:operator-gate`), and the manual Docker-first real testnet acceptance gate (`yarn release:testnet-acceptance`) that must pass on the exact stable release commit. The dedicated Docker acceptance environment and evidence expectations are documented in [TESTNET_ACCEPTANCE.md](./TESTNET_ACCEPTANCE.md).
|
|
73
|
+
|
|
74
|
+
## Updating deployment artifacts
|
|
75
|
+
|
|
76
|
+
After deploying new contracts on testnet, sync the bundled defaults:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
./scripts/sync-deployments.sh
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This copies the 4 deployment JSON files from `contracts/` into `client/deployments/`. Commit the updated files.
|
|
83
|
+
|
|
84
|
+
## Scripts reference
|
|
85
|
+
|
|
86
|
+
| Command | Description |
|
|
87
|
+
|---|---|
|
|
88
|
+
| `yarn jinn run` | Run daemon from source (requires JINN_PASSWORD) |
|
|
89
|
+
| `yarn test` | Run vitest suite |
|
|
90
|
+
| `yarn build` | TypeScript compile |
|
|
91
|
+
| `yarn typecheck` | Typecheck without emitting |
|
|
92
|
+
| `yarn e2e` | End-to-end validation on Anvil fork |
|
|
93
|
+
| `yarn staking` | Earning bootstrap validation on Anvil fork |
|
|
94
|
+
| `yarn pack:smoke` | Pack tarball and run smoke tests |
|
|
95
|
+
| `yarn release:operator-gate` | Run the stable-release operator gate (`staking` then `e2e`) |
|
|
96
|
+
| `yarn release:testnet-acceptance` | Run the manual Docker-first real testnet acceptance harness |
|
|
97
|
+
| `yarn setup:testnet-acceptance-operator` | First-time Docker acceptance setup + bootstrap/funding helper (`TESTNET_ACCEPTANCE.md`) |
|
|
98
|
+
| `yarn release:testnet-acceptance:host` | Legacy host-installed acceptance smoke/debug harness |
|
|
99
|
+
| `yarn setup:testnet-acceptance-operator:host` | Legacy host-installed acceptance setup helper |
|
|
100
|
+
|
|
101
|
+
## CI
|
|
102
|
+
|
|
103
|
+
In CI, use `yarn install --immutable` (equivalent to a clean `npm ci`). The CI workflow (`ci.yml`) runs:
|
|
104
|
+
|
|
105
|
+
1. `typecheck` + `test` + `build`
|
|
106
|
+
2. `yarn pack` + smoke test the packed artifact in a clean directory
|
|
107
|
+
|
|
108
|
+
## On-chain addresses
|
|
109
|
+
|
|
110
|
+
The client resolves contract addresses automatically from deployment artifacts bundled in `deployments/` (testnet) and hardcoded constants (mainnet). Operators don't need to set any `JINN_TESTNET_*_DEPLOYMENT` env var — those exist only as overrides for protocol developers running against a custom deploy.
|
|
111
|
+
|
|
112
|
+
Base mainnet reference addresses:
|
|
113
|
+
|
|
114
|
+
| Component | Address |
|
|
115
|
+
|---|---|
|
|
116
|
+
| JinnRouter | `0xfFa7118A3D820cd4E820010837D65FAfF463181B` |
|
|
117
|
+
| Mech marketplace | `0xf24eE42edA0fc9b33B7D41B06Ee8ccD2Ef7C5020` |
|
|
118
|
+
| Staking contract | `0x51c5f4982b9b0b3c0482678f5847ea6228cc8e54` |
|
|
119
|
+
| OLAS token | `0x54330d28ca3357F294334BDC454a032e7f353416` |
|
|
120
|
+
|
|
121
|
+
## Spec
|
|
122
|
+
|
|
123
|
+
The stable command-line and JSON surface is defined in [`spec/2026-04-14-client-surface.md`](../spec/2026-04-14-client-surface.md). Error envelopes emitted on non-zero exits conform to §6 of that spec.
|
package/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Jinn protocol client. Runs a headless daemon that participates in the Jinn training loop: create, restore, and evaluate desired states, and earn rewards for measured work.
|
|
4
4
|
|
|
5
|
+
**New operator?** Start with the full testnet runbook:
|
|
6
|
+
<https://github.com/Jinn-Network/mono/blob/main/docs/operator-testnet.md>
|
|
7
|
+
|
|
5
8
|
## Install
|
|
6
9
|
|
|
7
10
|
```bash
|
|
@@ -19,37 +22,83 @@ yarn global add @jinn-network/client@latest
|
|
|
19
22
|
The fast path for a new operator on Base Sepolia:
|
|
20
23
|
|
|
21
24
|
```bash
|
|
22
|
-
#
|
|
23
|
-
|
|
25
|
+
# One-time: pick runtime mode + authenticate Claude Code (interactive).
|
|
26
|
+
jinn auth
|
|
27
|
+
|
|
28
|
+
# Zero-to-running (wallet + funding check + bootstrap + run).
|
|
29
|
+
jinn quickstart
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
On first run, `jinn quickstart` generates a random keystore password, saves
|
|
33
|
+
it to `~/.jinn-client/keystore-password` (mode 0600), and prints a summary
|
|
34
|
+
with the master address and a pointer to back up your mnemonic. Subsequent
|
|
35
|
+
verbs (`jinn run`, `jinn bootstrap`, `jinn claim-rewards`, …) pick up the
|
|
36
|
+
password from that file automatically — no env var needed.
|
|
37
|
+
|
|
38
|
+
**Back up your mnemonic before you fund anything:**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
jinn keys backup --output ~/jinn-mnemonic.txt # mode 0600; treat as seed material
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Prefer to manage the password yourself? Set `JINN_PASSWORD` before
|
|
45
|
+
`quickstart` and no file will be written:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
JINN_PASSWORD=your-secret jinn quickstart
|
|
24
49
|
```
|
|
25
50
|
|
|
26
|
-
|
|
51
|
+
**Step by step** (skip if `quickstart` worked):
|
|
27
52
|
|
|
28
53
|
```bash
|
|
29
54
|
# 1. Generate the encrypted keystore (picks an HD wallet deterministically).
|
|
30
|
-
JINN_PASSWORD=your-
|
|
55
|
+
JINN_PASSWORD=your-secret jinn init
|
|
31
56
|
|
|
32
57
|
# 2. Verify the environment and resolved deployment.
|
|
33
58
|
jinn doctor --human
|
|
34
59
|
|
|
35
|
-
# 3. List
|
|
60
|
+
# 3. List exact funding gaps. On testnet this is ETH only — the staking pool
|
|
61
|
+
# is managed protocol-side and operators don't hold bond tokens directly.
|
|
36
62
|
jinn fund-requirements --human
|
|
37
63
|
|
|
38
64
|
# 4. Send the requested testnet funds to the printed master address, then:
|
|
39
|
-
|
|
65
|
+
jinn bootstrap
|
|
40
66
|
|
|
41
67
|
# 5. Start the daemon.
|
|
42
|
-
|
|
68
|
+
jinn run
|
|
43
69
|
```
|
|
44
70
|
|
|
45
71
|
`jinn init`, `jinn fund-requirements`, `jinn bootstrap`, and `jinn run` all
|
|
46
|
-
share the same encrypted keystore and fleet state under
|
|
47
|
-
|
|
72
|
+
share the same encrypted keystore and fleet state under `~/.jinn-client/earning/`
|
|
73
|
+
by default. They are idempotent — re-run any of them safely.
|
|
74
|
+
|
|
75
|
+
To keep testnet and mainnet state side-by-side on the same machine, set
|
|
76
|
+
`JINN_EARNING_DIR` to a network-specific path:
|
|
48
77
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
78
|
+
```bash
|
|
79
|
+
# Testnet (Phase 1b default):
|
|
80
|
+
JINN_EARNING_DIR=~/.jinn-client/earning-testnet jinn run
|
|
81
|
+
|
|
82
|
+
# Mainnet (after Phase 2 launch):
|
|
83
|
+
JINN_NETWORK=mainnet JINN_EARNING_DIR=~/.jinn-client/earning-mainnet jinn run
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Password resolution
|
|
87
|
+
|
|
88
|
+
Any verb that touches private keys resolves its password in this order:
|
|
89
|
+
|
|
90
|
+
1. `--password-fd N` — read from a file descriptor (scripted / CI)
|
|
91
|
+
2. `JINN_PASSWORD` env var — explicit operator-set
|
|
92
|
+
3. `~/.jinn-client/keystore-password` — auto-generated by `jinn quickstart`
|
|
93
|
+
|
|
94
|
+
The password is never read from config files. `jinn keys change-password`
|
|
95
|
+
rotates the keystore and deletes the auto-generated password file; after
|
|
96
|
+
rotation, set `JINN_PASSWORD` yourself.
|
|
97
|
+
|
|
98
|
+
**Security note:** when `quickstart` auto-generates the password, it lives
|
|
99
|
+
in plaintext next to the encrypted keystore. That's convenient for tester
|
|
100
|
+
workflows but means anyone with shell access can decrypt your mnemonic —
|
|
101
|
+
treat the wallet as hot and keep funds to the gas + rewards minimum.
|
|
53
102
|
|
|
54
103
|
## Try without installing
|
|
55
104
|
|
|
@@ -57,32 +106,116 @@ verb that touches private keys (`init`, `bootstrap`, `run`,
|
|
|
57
106
|
npx @jinn-network/client@latest doctor
|
|
58
107
|
```
|
|
59
108
|
|
|
60
|
-
##
|
|
109
|
+
## Let your agent do it
|
|
110
|
+
|
|
111
|
+
If you already use Claude Code, Codex, Cursor, Gemini CLI, VS Code, or another
|
|
112
|
+
MCP-capable tool, you can skip the shell commands above. After installing
|
|
113
|
+
the client, wire Jinn into your agent:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
jinn plugin install
|
|
117
|
+
```
|
|
61
118
|
|
|
62
|
-
|
|
119
|
+
This detects every supported tool on your machine and, for each one, adds the
|
|
120
|
+
`jinn mcp` MCP server plus a copy of the `jinn-operator` skill. Supported:
|
|
121
|
+
Claude Code, Claude Desktop, Cursor, VS Code, Gemini CLI, Antigravity, Codex.
|
|
122
|
+
Run `jinn plugin list --human` to see what's detected.
|
|
63
123
|
|
|
64
|
-
|
|
124
|
+
Then open your agent and paste:
|
|
65
125
|
|
|
66
|
-
|
|
126
|
+
> Set up a Jinn Network testnet operator on this machine. Run `jinn quickstart`,
|
|
127
|
+
> fund the master address via CDP if needed, and report back when the daemon is
|
|
128
|
+
> running. Keep me in the loop if anything needs my input.
|
|
67
129
|
|
|
68
|
-
|
|
130
|
+
The `jinn-operator` skill activates on mentions of "jinn", "jinn network", and
|
|
131
|
+
"jinn quickstart", then walks your agent through install, auth, bootstrap, and
|
|
132
|
+
daemon lifecycle. You stay in the loop for funding decisions.
|
|
133
|
+
|
|
134
|
+
## Opting in to specific intent kinds
|
|
135
|
+
|
|
136
|
+
After `quickstart`, your daemon participates in deterministic `prediction.v0`
|
|
137
|
+
intents by default on testnet (via the auto-intent generator). Other kinds —
|
|
138
|
+
like `portfolio.v0`, which
|
|
139
|
+
executes trades against a Hyperliquid master account — are **off by default**
|
|
140
|
+
because they need credentials only you can provide. This prevents your daemon
|
|
141
|
+
from claiming a request it can't actually fulfill.
|
|
142
|
+
|
|
143
|
+
Inspect and toggle participation with `jinn intents`:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
jinn intents list --human # every kind, current state
|
|
147
|
+
jinn intents status portfolio.v0 --human # details for one kind
|
|
148
|
+
jinn intents enable prediction.v0 --impl claude-mcp-prediction
|
|
149
|
+
jinn intents enable portfolio.v0 --hl-master 0x... # start the opt-in flow
|
|
150
|
+
jinn intents enable portfolio.v0 --confirm-approved
|
|
151
|
+
jinn intents disable portfolio.v0 # opt out, keep state
|
|
152
|
+
jinn intents reset prediction.v0 # reset kind->impl override
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Each `enable` is an idempotent state machine. Rerun until the envelope reports
|
|
156
|
+
`"status": "ready"`. When the flow needs something from you (an exchange
|
|
157
|
+
approval, an API key), it returns `waiting_for_external_action` with the URL
|
|
158
|
+
and the exact command to rerun next. Agents with the `jinn-operator` skill
|
|
159
|
+
installed know how to walk an operator through any kind automatically — just
|
|
160
|
+
paste "enable portfolio.v0 for me" and they'll take it from there.
|
|
161
|
+
|
|
162
|
+
**Safety net:** before spending gas on a claim, the daemon checks whether the
|
|
163
|
+
responsible impl is actually ready. If a portfolio.v0 request arrives and your
|
|
164
|
+
api-wallet isn't approved, the daemon records the intent as FAILED locally
|
|
165
|
+
with a clear reason instead of wasting gas claiming it.
|
|
166
|
+
|
|
167
|
+
## Docker
|
|
168
|
+
|
|
169
|
+
The daemon spawns the Anthropic `claude` CLI as a subprocess for
|
|
170
|
+
restorations; to keep costs low, use Claude's OAuth authentication (prompt
|
|
171
|
+
caching + app tiers) rather than raw API keys. On macOS the host keychain
|
|
172
|
+
encrypts OAuth tokens, so mounting `~/.claude` directly into Docker
|
|
173
|
+
doesn't work — instead, run one `claude setup-token` on the host to mint
|
|
174
|
+
a long-lived OAuth token, then pass it to the daemon via `.env`.
|
|
175
|
+
|
|
176
|
+
### Recommended path: `claude setup-token` + `.env`
|
|
177
|
+
|
|
178
|
+
1. **Mint a long-lived OAuth token on the host** (one-time, opens browser):
|
|
69
179
|
```bash
|
|
70
|
-
|
|
180
|
+
claude setup-token
|
|
71
181
|
```
|
|
182
|
+
Copy the `sk-ant-oat01-...` string it prints.
|
|
72
183
|
|
|
73
|
-
2. **
|
|
184
|
+
2. **Create a `.env` file** next to the compose file:
|
|
74
185
|
```bash
|
|
75
|
-
|
|
186
|
+
cat > .env <<EOF
|
|
187
|
+
JINN_PASSWORD=your-secure-password
|
|
188
|
+
CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...
|
|
189
|
+
EOF
|
|
76
190
|
```
|
|
77
|
-
Use `-it` so the CLI can open a browser (or show a URL to visit) and receive input. The process stays in the foreground until you finish sign-in.
|
|
78
|
-
*Follow the URL to authenticate in your browser.*
|
|
79
191
|
|
|
80
|
-
3. **Start the
|
|
192
|
+
3. **Start the daemon:**
|
|
81
193
|
```bash
|
|
82
194
|
docker compose up -d
|
|
195
|
+
docker compose logs -f jinn-daemon
|
|
83
196
|
```
|
|
84
197
|
|
|
85
|
-
|
|
198
|
+
The compose file lives at `client/docker-compose.yml` if you cloned the
|
|
199
|
+
repo. If you installed via `npm install -g @jinn-network/client@latest`,
|
|
200
|
+
copy it out first:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cp "$(npm root -g)/@jinn-network/client/docker-compose.yml" .
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Fallback: interactive OAuth inside the container
|
|
207
|
+
|
|
208
|
+
If `claude setup-token` isn't available on your host (e.g., you don't
|
|
209
|
+
have Claude Code installed locally), run the interactive OAuth flow
|
|
210
|
+
inside the container instead — it saves the token to a persistent volume
|
|
211
|
+
so the daemon can use it on subsequent runs:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
docker compose run --rm -it --entrypoint claude jinn-daemon auth login
|
|
215
|
+
docker compose up -d
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Quick test
|
|
86
219
|
|
|
87
220
|
```bash
|
|
88
221
|
docker run --rm ghcr.io/jinn-network/client:latest version --json
|
|
@@ -115,6 +248,9 @@ docker run --rm ghcr.io/jinn-network/client:latest version --json
|
|
|
115
248
|
| `jinn history` | Recent protocol activity |
|
|
116
249
|
| `jinn rewards` | Earned vs claimed per service |
|
|
117
250
|
| `jinn logs` | Structured event stream |
|
|
251
|
+
| `jinn logs --follow` | Live tail of lifecycle events |
|
|
252
|
+
|
|
253
|
+
Dashboard: when `jinn run` is active, open [`http://127.0.0.1:7331/`](http://127.0.0.1:7331/) for live in-flight intents, verdicts, earnings, fleet balances, recent activity, and next actions.
|
|
118
254
|
|
|
119
255
|
### Actions
|
|
120
256
|
|
|
@@ -136,9 +272,10 @@ All action verbs support `--dry-run` and `--yes`.
|
|
|
136
272
|
- Add `--human` for readable terminal output.
|
|
137
273
|
- `stderr` is reserved for progress, warnings, and runtime logs.
|
|
138
274
|
- Non-zero exits emit a structured error envelope on stdout with `schemaVersion`, `code`, `exitCode`, `message`, `hint`, and `exampleCli`.
|
|
139
|
-
- Without a global install, use `npx @jinn-network/client@latest <verb>
|
|
275
|
+
- Without a global install, use `npx @jinn-network/client@latest <verb> ...`.
|
|
276
|
+
- Backward-compatible legacy form still works: `npx -p @jinn-network/client@latest jinn <verb> ...`.
|
|
140
277
|
|
|
141
|
-
See [
|
|
278
|
+
See the [client surface spec](https://github.com/Jinn-Network/mono/blob/main/spec/2026-04-14-client-surface.md) for the full CLI reference.
|
|
142
279
|
|
|
143
280
|
## Configuration
|
|
144
281
|
|
|
@@ -150,7 +287,7 @@ JINN_PASSWORD=secret jinn run --config ./my-config.json
|
|
|
150
287
|
|
|
151
288
|
| Config key | Env override | Default |
|
|
152
289
|
|---|---|---|
|
|
153
|
-
| network | JINN_NETWORK | testnet (flips to mainnet at launch) |
|
|
290
|
+
| network | JINN_NETWORK | `testnet` (Phase 1b default; flips to `mainnet` at Phase 2 launch) |
|
|
154
291
|
| rpcUrl | BASE_RPC_URL / JINN_RPC_URL | network-appropriate public RPC |
|
|
155
292
|
| claudeModel | JINN_CLAUDE_MODEL | claude-haiku-4-5-20251001 |
|
|
156
293
|
| claudePath | JINN_CLAUDE_PATH | claude |
|
|
@@ -159,7 +296,7 @@ JINN_PASSWORD=secret jinn run --config ./my-config.json
|
|
|
159
296
|
| dbPath | JINN_DB_PATH | ~/.jinn-client/jinn.db |
|
|
160
297
|
| earningDir | JINN_EARNING_DIR | ~/.jinn-client/earning |
|
|
161
298
|
| peers | JINN_PEERS | [] |
|
|
162
|
-
| desiredStates | JINN_DESIRED_STATES | [
|
|
299
|
+
| desiredStates | JINN_DESIRED_STATES | [] (testnet auto-intent generator posts `prediction.v0`) |
|
|
163
300
|
|
|
164
301
|
`JINN_PASSWORD` is env-only (keystore encryption, never in config files). Alternatively, use `--password-fd <N>` to read from a file descriptor.
|
|
165
302
|
|
|
@@ -167,23 +304,62 @@ JINN_PASSWORD=secret jinn run --config ./my-config.json
|
|
|
167
304
|
|
|
168
305
|
| Role | Phase 1b (testnet, Base Sepolia) | Phase 2 (mainnet, Base) |
|
|
169
306
|
|---|---|---|
|
|
170
|
-
| Gas (native) | ETH | ETH |
|
|
171
|
-
| Staking bond | stOLAS | OLAS |
|
|
307
|
+
| Gas (native) | ETH (CDP auto-funded on testnet) | ETH |
|
|
308
|
+
| Staking bond | Pooled, protocol-managed via stOLAS distributor (operators hold nothing) | OLAS (operator-held) |
|
|
172
309
|
| Reward | stOLAS | OLAS (+ JINN incentives after launch) |
|
|
173
310
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
311
|
+
**Important:** under stOLAS standard mode (the Phase 1b default), operators
|
|
312
|
+
**do not hold a bond token themselves**. The stOLAS distributor pools JINN
|
|
313
|
+
contributed by stakers and stakes on behalf of operators; your service gets
|
|
314
|
+
created against that shared pool. `jinn fund-requirements` surfaces only the
|
|
315
|
+
per-wallet ETH you need. If the distributor pool is drained, `jinn doctor`
|
|
316
|
+
will warn you — the fix is a protocol-team refill, not operator action.
|
|
178
317
|
|
|
179
318
|
## Switching to mainnet
|
|
180
319
|
|
|
181
320
|
When Phase 2 launches, the default flips. Until then:
|
|
182
321
|
|
|
183
322
|
```bash
|
|
184
|
-
JINN_NETWORK=mainnet
|
|
323
|
+
JINN_NETWORK=mainnet \
|
|
324
|
+
JINN_EARNING_DIR=~/.jinn-client/earning-mainnet \
|
|
325
|
+
JINN_PASSWORD=secret \
|
|
326
|
+
jinn run
|
|
185
327
|
```
|
|
186
328
|
|
|
329
|
+
Use a distinct `JINN_EARNING_DIR` to keep testnet and mainnet keystore
|
|
330
|
+
state isolated. Mixing them on the same directory is an easy way to
|
|
331
|
+
point a mainnet daemon at a testnet-derived master wallet.
|
|
332
|
+
|
|
333
|
+
## Troubleshooting
|
|
334
|
+
|
|
335
|
+
Quick answers to the things that typically surprise new operators:
|
|
336
|
+
|
|
337
|
+
- **Bootstrap loops for a minute then exits with `funding_required`** —
|
|
338
|
+
the CDP faucet drip is small (~0.0001 ETH per call) and the bootstrap
|
|
339
|
+
floor is 0.005 ETH. The client now drains the faucet up to 60 times per
|
|
340
|
+
invocation automatically; if you still see `funding_required`, CDP rate-
|
|
341
|
+
limited your master address. Wait 24h or fund manually:
|
|
342
|
+
<https://portal.cdp.coinbase.com/products/faucet>.
|
|
343
|
+
- **Claude session exits in ~18 seconds with no trades** — usually means
|
|
344
|
+
the daemon ran from source (via `tsx`) instead of the compiled `dist/`,
|
|
345
|
+
so the MCP wrapper couldn't load `mcp-tools.js`. Run `yarn build && yarn
|
|
346
|
+
dev` (dev) or reinstall via `npm install -g @jinn-network/client@latest`
|
|
347
|
+
(operator). `jinn doctor` flags this as `daemon_runtime_ready`.
|
|
348
|
+
- **Bootstrap fails with `Overflow(20, 0)` at `distributor.stake()`** —
|
|
349
|
+
the testnet stOLAS distributor pool is drained. Operators cannot fix
|
|
350
|
+
this; the Jinn protocol team has to refill it. Report to the testnet
|
|
351
|
+
status channel and re-run `jinn bootstrap` once the pool is topped up.
|
|
352
|
+
- **Position auto-closed within seconds of opening** — most likely
|
|
353
|
+
a competing trading bot is active on the same Hyperliquid master. Use a
|
|
354
|
+
fresh HL master per protocol test; do not share master accounts between
|
|
355
|
+
experiments.
|
|
356
|
+
- **`jinn doctor` passes but `jinn run` fails** — check the specific
|
|
357
|
+
check names in doctor's output vs the specific error from `run`. The
|
|
358
|
+
most common mismatch is auth-context: if you're in the `client/` git
|
|
359
|
+
checkout dir, `detectAuthContext` infers `docker-compose` mode even on
|
|
360
|
+
a bare host. Run the daemon from `$HOME` or any directory without a
|
|
361
|
+
`docker-compose.yml` that names `jinn-daemon`.
|
|
362
|
+
|
|
187
363
|
## How it works
|
|
188
364
|
|
|
189
365
|
The daemon runs three concurrent loops:
|
|
@@ -196,4 +372,4 @@ Each loop call increments on-chain activity counters. Staking contracts read the
|
|
|
196
372
|
|
|
197
373
|
## Development
|
|
198
374
|
|
|
199
|
-
See [CONTRIBUTING.md](
|
|
375
|
+
See [CONTRIBUTING.md](https://github.com/Jinn-Network/mono/blob/main/client/CONTRIBUTING.md) for development setup, running from source, and testing.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "baseSepolia",
|
|
3
|
+
"chainId": 84532,
|
|
4
|
+
"deployer": "0x15e78734481bD31F6e183dad05225505a45ACd07",
|
|
5
|
+
"deployedAt": "2026-04-18T00:00:00.000Z",
|
|
6
|
+
"config": {
|
|
7
|
+
"claimTTL": 300
|
|
8
|
+
},
|
|
9
|
+
"contracts": {
|
|
10
|
+
"claimRegistry": "0xd229A2C20333B747675090Ce38B8a1Fb2dafe6AC",
|
|
11
|
+
"acceptAllChecker": "0x2E5AB5b281EAb5b6556165e701b5da923223787D"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "baseSepolia",
|
|
3
|
+
"chainId": 84532,
|
|
4
|
+
"deployer": "0x15e78734481bD31F6e183dad05225505a45ACd07",
|
|
5
|
+
"deployedAt": "2026-04-20T13:14:18.413Z",
|
|
6
|
+
"config": {
|
|
7
|
+
"jinnToken": "0xAB9a01cd4A379e36006ec6df2960CF39EF79df63",
|
|
8
|
+
"dripAmount": "100000000000000000000",
|
|
9
|
+
"dripInterval": 86400,
|
|
10
|
+
"initialSupplyBridged": "1000000000000000000000"
|
|
11
|
+
},
|
|
12
|
+
"contracts": {
|
|
13
|
+
"faucet": "0xa7c2DBA07E41F16eF94cbEAeAEd97bC904032619"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed ABI fragments for ClaimRegistry.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the Solidity interface in contracts/src/claiming/ClaimRegistry.sol.
|
|
5
|
+
* Use these instead of the inline fragment in adapters/mech/types.ts when
|
|
6
|
+
* constructing a ClaimRegistryClient — they include the full event set.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CLAIM_REGISTRY_ABI: readonly [{
|
|
9
|
+
readonly name: "claimJob";
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
readonly stateMutability: "nonpayable";
|
|
12
|
+
readonly inputs: readonly [{
|
|
13
|
+
readonly name: "requestId";
|
|
14
|
+
readonly type: "bytes32";
|
|
15
|
+
}];
|
|
16
|
+
readonly outputs: readonly [];
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "releaseClaim";
|
|
19
|
+
readonly type: "function";
|
|
20
|
+
readonly stateMutability: "nonpayable";
|
|
21
|
+
readonly inputs: readonly [{
|
|
22
|
+
readonly name: "requestId";
|
|
23
|
+
readonly type: "bytes32";
|
|
24
|
+
}];
|
|
25
|
+
readonly outputs: readonly [];
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "expireClaim";
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
readonly stateMutability: "nonpayable";
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly name: "requestId";
|
|
32
|
+
readonly type: "bytes32";
|
|
33
|
+
}];
|
|
34
|
+
readonly outputs: readonly [];
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "getJobClaim";
|
|
37
|
+
readonly type: "function";
|
|
38
|
+
readonly stateMutability: "view";
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly name: "requestId";
|
|
41
|
+
readonly type: "bytes32";
|
|
42
|
+
}];
|
|
43
|
+
readonly outputs: readonly [{
|
|
44
|
+
readonly name: "claimer";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "expiresAt";
|
|
48
|
+
readonly type: "uint256";
|
|
49
|
+
}];
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "claims";
|
|
52
|
+
readonly type: "function";
|
|
53
|
+
readonly stateMutability: "view";
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "";
|
|
56
|
+
readonly type: "bytes32";
|
|
57
|
+
}];
|
|
58
|
+
readonly outputs: readonly [{
|
|
59
|
+
readonly name: "claimer";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "expiresAt";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
}];
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "claimTTL";
|
|
67
|
+
readonly type: "function";
|
|
68
|
+
readonly stateMutability: "view";
|
|
69
|
+
readonly inputs: readonly [];
|
|
70
|
+
readonly outputs: readonly [{
|
|
71
|
+
readonly name: "";
|
|
72
|
+
readonly type: "uint256";
|
|
73
|
+
}];
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "expiredClaimCount";
|
|
76
|
+
readonly type: "function";
|
|
77
|
+
readonly stateMutability: "view";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}];
|
|
82
|
+
readonly outputs: readonly [{
|
|
83
|
+
readonly name: "";
|
|
84
|
+
readonly type: "uint256";
|
|
85
|
+
}];
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "JobClaimed";
|
|
88
|
+
readonly type: "event";
|
|
89
|
+
readonly inputs: readonly [{
|
|
90
|
+
readonly name: "requestId";
|
|
91
|
+
readonly type: "bytes32";
|
|
92
|
+
readonly indexed: true;
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "claimer";
|
|
95
|
+
readonly type: "address";
|
|
96
|
+
readonly indexed: true;
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "expiresAt";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
readonly indexed: false;
|
|
101
|
+
}];
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "ClaimExpired";
|
|
104
|
+
readonly type: "event";
|
|
105
|
+
readonly inputs: readonly [{
|
|
106
|
+
readonly name: "requestId";
|
|
107
|
+
readonly type: "bytes32";
|
|
108
|
+
readonly indexed: true;
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "previousClaimer";
|
|
111
|
+
readonly type: "address";
|
|
112
|
+
readonly indexed: true;
|
|
113
|
+
}];
|
|
114
|
+
}, {
|
|
115
|
+
readonly name: "ClaimReleased";
|
|
116
|
+
readonly type: "event";
|
|
117
|
+
readonly inputs: readonly [{
|
|
118
|
+
readonly name: "requestId";
|
|
119
|
+
readonly type: "bytes32";
|
|
120
|
+
readonly indexed: true;
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "claimer";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
readonly indexed: true;
|
|
125
|
+
}];
|
|
126
|
+
}];
|
|
127
|
+
export type ClaimRegistryAbi = typeof CLAIM_REGISTRY_ABI;
|