@onecraft/wallet 0.0.0-stage → 0.1.145

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.
Files changed (248) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.openclaw/AGENTS.md +100 -0
  3. package/.openclaw/extensions/agent-wallet/README.md +195 -0
  4. package/.openclaw/extensions/agent-wallet/dist/index.js +2198 -0
  5. package/.openclaw/extensions/agent-wallet/index.ts +2198 -0
  6. package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +251 -0
  7. package/.openclaw/extensions/agent-wallet/package.json +49 -0
  8. package/.openclaw/extensions/agent-wallet/skills/cards/SKILL.md +211 -0
  9. package/.openclaw/extensions/agent-wallet/skills/wallet-operator/SKILL.md +30 -0
  10. package/CHANGELOG.md +1232 -0
  11. package/LICENSE +104 -0
  12. package/README.md +193 -2
  13. package/VERSION +1 -0
  14. package/agent-wallet/.env.example +63 -0
  15. package/agent-wallet/AGENTS.md +130 -0
  16. package/agent-wallet/CARD_VAULT.md +640 -0
  17. package/agent-wallet/README.md +615 -0
  18. package/agent-wallet/UPGRADE_COMPATIBILITY.md +66 -0
  19. package/agent-wallet/agent_wallet/__init__.py +16 -0
  20. package/agent-wallet/agent_wallet/approval.py +165 -0
  21. package/agent-wallet/agent_wallet/autonomous_permissions.py +281 -0
  22. package/agent-wallet/agent_wallet/autonomous_policy.py +305 -0
  23. package/agent-wallet/agent_wallet/autonomous_session.py +236 -0
  24. package/agent-wallet/agent_wallet/boot_key_migration.py +155 -0
  25. package/agent-wallet/agent_wallet/boot_key_recovery.py +57 -0
  26. package/agent-wallet/agent_wallet/bootstrap.py +194 -0
  27. package/agent-wallet/agent_wallet/card_catalog.py +243 -0
  28. package/agent-wallet/agent_wallet/card_runtime_secrets.py +108 -0
  29. package/agent-wallet/agent_wallet/card_vault.py +331 -0
  30. package/agent-wallet/agent_wallet/card_vault_cli.py +174 -0
  31. package/agent-wallet/agent_wallet/card_vault_import.py +65 -0
  32. package/agent-wallet/agent_wallet/card_vault_keychain.py +239 -0
  33. package/agent-wallet/agent_wallet/config.py +719 -0
  34. package/agent-wallet/agent_wallet/connector_cli.py +198 -0
  35. package/agent-wallet/agent_wallet/connectors/__init__.py +28 -0
  36. package/agent-wallet/agent_wallet/connectors/catalog.py +68 -0
  37. package/agent-wallet/agent_wallet/connectors/client.py +308 -0
  38. package/agent-wallet/agent_wallet/connectors/intent_policy.py +243 -0
  39. package/agent-wallet/agent_wallet/connectors/manifest.py +192 -0
  40. package/agent-wallet/agent_wallet/connectors/registry.py +341 -0
  41. package/agent-wallet/agent_wallet/encrypted_storage.py +314 -0
  42. package/agent-wallet/agent_wallet/evm_user_wallets.py +910 -0
  43. package/agent-wallet/agent_wallet/exceptions.py +10 -0
  44. package/agent-wallet/agent_wallet/file_ops.py +34 -0
  45. package/agent-wallet/agent_wallet/http_client.py +25 -0
  46. package/agent-wallet/agent_wallet/kernel_browser.py +479 -0
  47. package/agent-wallet/agent_wallet/kernel_cli.py +57 -0
  48. package/agent-wallet/agent_wallet/kernel_gateway.py +95 -0
  49. package/agent-wallet/agent_wallet/keystore.py +503 -0
  50. package/agent-wallet/agent_wallet/laso_card_vault.py +246 -0
  51. package/agent-wallet/agent_wallet/models.py +66 -0
  52. package/agent-wallet/agent_wallet/morpho_monitor.py +298 -0
  53. package/agent-wallet/agent_wallet/nonce_registry.py +59 -0
  54. package/agent-wallet/agent_wallet/openclaw_adapter.py +9129 -0
  55. package/agent-wallet/agent_wallet/openclaw_cli.py +658 -0
  56. package/agent-wallet/agent_wallet/openclaw_runtime.py +194 -0
  57. package/agent-wallet/agent_wallet/plugin_bundle.py +44 -0
  58. package/agent-wallet/agent_wallet/providers/__init__.py +1 -0
  59. package/agent-wallet/agent_wallet/providers/bags.py +202 -0
  60. package/agent-wallet/agent_wallet/providers/dexscreener.py +147 -0
  61. package/agent-wallet/agent_wallet/providers/evm_activity.py +257 -0
  62. package/agent-wallet/agent_wallet/providers/evm_portfolio.py +459 -0
  63. package/agent-wallet/agent_wallet/providers/imd.py +720 -0
  64. package/agent-wallet/agent_wallet/providers/jupiter.py +519 -0
  65. package/agent-wallet/agent_wallet/providers/kamino.py +404 -0
  66. package/agent-wallet/agent_wallet/providers/lifi.py +302 -0
  67. package/agent-wallet/agent_wallet/providers/solana_rpc.py +447 -0
  68. package/agent-wallet/agent_wallet/providers/tokenized_stocks.py +189 -0
  69. package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +346 -0
  70. package/agent-wallet/agent_wallet/providers/x402.py +1972 -0
  71. package/agent-wallet/agent_wallet/sealed_keys.py +118 -0
  72. package/agent-wallet/agent_wallet/solana_stake.py +103 -0
  73. package/agent-wallet/agent_wallet/solana_tx.py +93 -0
  74. package/agent-wallet/agent_wallet/spending_limits.py +119 -0
  75. package/agent-wallet/agent_wallet/telemetry.py +481 -0
  76. package/agent-wallet/agent_wallet/transaction_policy.py +573 -0
  77. package/agent-wallet/agent_wallet/update_check.py +190 -0
  78. package/agent-wallet/agent_wallet/user_wallets.py +573 -0
  79. package/agent-wallet/agent_wallet/validation.py +31 -0
  80. package/agent-wallet/agent_wallet/vault_executor.py +456 -0
  81. package/agent-wallet/agent_wallet/wallet_layer/__init__.py +1 -0
  82. package/agent-wallet/agent_wallet/wallet_layer/base.py +1204 -0
  83. package/agent-wallet/agent_wallet/wallet_layer/base58.py +44 -0
  84. package/agent-wallet/agent_wallet/wallet_layer/factory.py +117 -0
  85. package/agent-wallet/agent_wallet/wallet_layer/solana.py +5246 -0
  86. package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +2705 -0
  87. package/agent-wallet/examples/bootstrap_wallet.py +21 -0
  88. package/agent-wallet/examples/openclaw_runtime_onboarding.py +28 -0
  89. package/agent-wallet/examples/openclaw_user_wallet_example.py +31 -0
  90. package/agent-wallet/examples/openclaw_wallet_adapter_example.py +33 -0
  91. package/agent-wallet/openclaw.plugin.json +118 -0
  92. package/agent-wallet/pyproject.toml +36 -0
  93. package/agent-wallet/scripts/bootstrap_openclaw_evm.py +312 -0
  94. package/agent-wallet/scripts/build_release_bundle.py +210 -0
  95. package/agent-wallet/scripts/finalize_openclaw_local_wallet_config.py +121 -0
  96. package/agent-wallet/scripts/install_agent_wallet.py +1357 -0
  97. package/agent-wallet/scripts/install_openclaw_local_config.py +421 -0
  98. package/agent-wallet/scripts/install_openclaw_sealed_keys.py +117 -0
  99. package/agent-wallet/scripts/manage_openclaw_evm_wallet.py +333 -0
  100. package/agent-wallet/scripts/security_utils.py +37 -0
  101. package/agent-wallet/scripts/setup_evm_wallet.sh +140 -0
  102. package/agent-wallet/scripts/switch_openclaw_wallet_network.py +109 -0
  103. package/agent-wallet/skills/wallet-operator/SKILL.md +157 -0
  104. package/bin/lib/boot-key.mjs +184 -0
  105. package/bin/lib/evm-daemon.mjs +389 -0
  106. package/bin/lib/host-detection.mjs +259 -0
  107. package/bin/lib/integrations.mjs +578 -0
  108. package/bin/lib/release-python.mjs +9 -0
  109. package/bin/lib/update-transaction.mjs +235 -0
  110. package/bin/openclaw-agent-wallet.mjs +3354 -0
  111. package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +19 -0
  112. package/claude-code/plugins/agent-wallet/.mcp.json +14 -0
  113. package/claude-code/plugins/agent-wallet/AGENTLAYER_AGENT_GUIDE.md +282 -0
  114. package/claude-code/plugins/agent-wallet/README.md +134 -0
  115. package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-approve.md +39 -0
  116. package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-revoke.md +17 -0
  117. package/claude-code/plugins/agent-wallet/commands/cards.md +129 -0
  118. package/claude-code/plugins/agent-wallet/commands/guide.md +40 -0
  119. package/claude-code/plugins/agent-wallet/commands/imd.md +125 -0
  120. package/claude-code/plugins/agent-wallet/commands/wallet-base.md +60 -0
  121. package/claude-code/plugins/agent-wallet/commands/wallet-ethereum.md +37 -0
  122. package/claude-code/plugins/agent-wallet/commands/wallet-evm.md +39 -0
  123. package/claude-code/plugins/agent-wallet/commands/wallet-setup.md +25 -0
  124. package/claude-code/plugins/agent-wallet/commands/wallet-sol.md +51 -0
  125. package/claude-code/plugins/agent-wallet/commands/wallet-statusline.md +34 -0
  126. package/claude-code/plugins/agent-wallet/commands/x402.md +121 -0
  127. package/claude-code/plugins/agent-wallet/commands/yield.md +62 -0
  128. package/claude-code/plugins/agent-wallet/hooks/hooks.json +16 -0
  129. package/claude-code/plugins/agent-wallet/scripts/bootstrap_backend.sh +136 -0
  130. package/claude-code/plugins/agent-wallet/scripts/enable_statusline.py +52 -0
  131. package/claude-code/plugins/agent-wallet/scripts/resolve_wallet_addresses.py +69 -0
  132. package/claude-code/plugins/agent-wallet/scripts/run_mcp.sh +66 -0
  133. package/claude-code/plugins/agent-wallet/scripts/wallet_statusline.py +130 -0
  134. package/claude-code/plugins/agent-wallet/scripts/wallet_statusline_setup.sh +40 -0
  135. package/claude-code/plugins/agent-wallet/skills/wallet-operator/SKILL.md +21 -0
  136. package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +37 -0
  137. package/codex/plugins/agent-wallet/.mcp.json +15 -0
  138. package/codex/plugins/agent-wallet/README.md +158 -0
  139. package/codex/plugins/agent-wallet/scripts/run_mcp.sh +47 -0
  140. package/codex/plugins/agent-wallet/server.py +1797 -0
  141. package/codex/plugins/agent-wallet/skills/cards/SKILL.md +225 -0
  142. package/codex/plugins/agent-wallet/skills/imd/SKILL.md +145 -0
  143. package/codex/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
  144. package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +85 -0
  145. package/codex/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
  146. package/codex/plugins/agent-wallet/skills/x402/SKILL.md +159 -0
  147. package/codex/plugins/agent-wallet/skills/yield/SKILL.md +65 -0
  148. package/connectors/AGENTS.md +37 -0
  149. package/connectors/DEVELOPER_GUIDE.md +131 -0
  150. package/connectors/README.md +139 -0
  151. package/connectors/READ_ONLY_BETA.md +54 -0
  152. package/connectors/RELEASING.md +48 -0
  153. package/connectors/conformance/README.md +31 -0
  154. package/connectors/conformance/package.json +54 -0
  155. package/connectors/conformance/scripts/sync-license.mjs +3 -0
  156. package/connectors/conformance/scripts/sync-spec.mjs +16 -0
  157. package/connectors/conformance/src/cli.ts +43 -0
  158. package/connectors/conformance/src/index.ts +7 -0
  159. package/connectors/conformance/src/runner.ts +314 -0
  160. package/connectors/conformance/src/types.ts +27 -0
  161. package/connectors/conformance/test/fixtures/invalid-response-identity.json +14 -0
  162. package/connectors/conformance/test/fixtures/missing-tool-fixture.json +4 -0
  163. package/connectors/conformance/test/runner.test.mjs +151 -0
  164. package/connectors/conformance/tsconfig.json +17 -0
  165. package/connectors/examples/reference-crypto-data/Dockerfile +21 -0
  166. package/connectors/examples/reference-crypto-data/README.md +51 -0
  167. package/connectors/examples/reference-crypto-data/conformance.json +11 -0
  168. package/connectors/examples/reference-crypto-data/connector.json +95 -0
  169. package/connectors/examples/reference-crypto-data/package.json +21 -0
  170. package/connectors/examples/reference-crypto-data/railway.toml +9 -0
  171. package/connectors/examples/reference-crypto-data/src/connector.ts +137 -0
  172. package/connectors/examples/reference-crypto-data/src/server.ts +13 -0
  173. package/connectors/examples/reference-crypto-data/test/connector.test.mjs +97 -0
  174. package/connectors/examples/reference-crypto-data/tsconfig.json +17 -0
  175. package/connectors/package-lock.json +561 -0
  176. package/connectors/package.json +19 -0
  177. package/connectors/scripts/smoke-packed-packages.mjs +121 -0
  178. package/connectors/sdk-typescript/README.md +47 -0
  179. package/connectors/sdk-typescript/package.json +49 -0
  180. package/connectors/sdk-typescript/scripts/sync-license.mjs +3 -0
  181. package/connectors/sdk-typescript/src/connector.ts +204 -0
  182. package/connectors/sdk-typescript/src/errors.ts +11 -0
  183. package/connectors/sdk-typescript/src/http.ts +116 -0
  184. package/connectors/sdk-typescript/src/index.ts +26 -0
  185. package/connectors/sdk-typescript/src/types.ts +101 -0
  186. package/connectors/sdk-typescript/test/sdk.test.mjs +181 -0
  187. package/connectors/sdk-typescript/tsconfig.json +21 -0
  188. package/connectors/spec/connector-manifest.schema.json +340 -0
  189. package/connectors/spec/connector-protocol.md +159 -0
  190. package/connectors/spec/transaction-intent.schema.json +281 -0
  191. package/connectors/templates/read-only/.env.example +1 -0
  192. package/connectors/templates/read-only/Dockerfile +11 -0
  193. package/connectors/templates/read-only/README.md +33 -0
  194. package/connectors/templates/read-only/conformance.json +11 -0
  195. package/connectors/templates/read-only/connector.json +64 -0
  196. package/connectors/templates/read-only/package.json +21 -0
  197. package/connectors/templates/read-only/railway.toml +9 -0
  198. package/connectors/templates/read-only/src/connector.ts +61 -0
  199. package/connectors/templates/read-only/src/server.ts +14 -0
  200. package/connectors/templates/read-only/test/connector.test.mjs +62 -0
  201. package/connectors/templates/read-only/tsconfig.json +17 -0
  202. package/cursor/plugins/agent-wallet/.cursor-plugin/plugin.json +14 -0
  203. package/cursor/plugins/agent-wallet/README.md +62 -0
  204. package/cursor/plugins/agent-wallet/mcp.json +16 -0
  205. package/cursor/plugins/agent-wallet/scripts/run_mcp.sh +33 -0
  206. package/cursor/plugins/agent-wallet/server.py +33 -0
  207. package/cursor/plugins/agent-wallet/skills/cards/SKILL.md +210 -0
  208. package/cursor/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
  209. package/cursor/plugins/agent-wallet/skills/wallet-operator/SKILL.md +23 -0
  210. package/cursor/plugins/agent-wallet/skills/wallet-sol/SKILL.md +29 -0
  211. package/cursor/plugins/agent-wallet/skills/x402/SKILL.md +130 -0
  212. package/hermes/plugins/agent_wallet/README.md +54 -0
  213. package/hermes/plugins/agent_wallet/__init__.py +55 -0
  214. package/hermes/plugins/agent_wallet/plugin.yaml +9 -0
  215. package/hermes/plugins/agent_wallet/schemas.py +211 -0
  216. package/hermes/plugins/agent_wallet/tools.py +622 -0
  217. package/install-from-github.sh +139 -0
  218. package/integrations/hedera/treasury-guard/README.md +92 -0
  219. package/integrations/hedera/treasury-guard/examples/treasury-policy.example.json +9 -0
  220. package/integrations/hedera/treasury-guard/package-lock.json +880 -0
  221. package/integrations/hedera/treasury-guard/package.json +8 -0
  222. package/integrations/hedera/treasury-guard/skills/onecraft-hedera-treasury/SKILL.md +22 -0
  223. package/integrations/hedera/treasury-guard/src/hedera-mirror-client.mjs +106 -0
  224. package/integrations/hedera/treasury-guard/src/hedera-signer.mjs +120 -0
  225. package/integrations/hedera/treasury-guard/src/treasury-cli.mjs +177 -0
  226. package/integrations/hedera/treasury-guard/src/treasury-policy.mjs +155 -0
  227. package/mcp/README.md +39 -0
  228. package/mcp/scripts/run_mcp.sh +37 -0
  229. package/mcp/server.py +33 -0
  230. package/package.json +106 -4
  231. package/scripts/check_release_version.mjs +72 -0
  232. package/scripts/version_targets.mjs +60 -0
  233. package/setup.sh +87 -0
  234. package/wdk-evm-wallet/.env.example +38 -0
  235. package/wdk-evm-wallet/README.md +254 -0
  236. package/wdk-evm-wallet/bootstrap.sh +8 -0
  237. package/wdk-evm-wallet/package-lock.json +2359 -0
  238. package/wdk-evm-wallet/package.json +43 -0
  239. package/wdk-evm-wallet/run-local.sh +12 -0
  240. package/wdk-evm-wallet/src/config.js +461 -0
  241. package/wdk-evm-wallet/src/imd.js +231 -0
  242. package/wdk-evm-wallet/src/json.js +35 -0
  243. package/wdk-evm-wallet/src/local_vault.js +407 -0
  244. package/wdk-evm-wallet/src/network_state.js +96 -0
  245. package/wdk-evm-wallet/src/pending_transactions.js +148 -0
  246. package/wdk-evm-wallet/src/server.js +849 -0
  247. package/wdk-evm-wallet/src/shutdown.js +63 -0
  248. package/wdk-evm-wallet/src/wdk_evm_wallet.js +10036 -0
package/mcp/server.py ADDED
@@ -0,0 +1,33 @@
1
+ """Universal local MCP entry point for the OneCraft wallet.
2
+
3
+ The wallet MCP implementation is deliberately shared with the established
4
+ Codex and Claude Code bridges. This small neutral entry point makes that
5
+ surface available to any stdio MCP client without changing either host plugin.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import json
11
+ import runpy
12
+ import sys
13
+ from pathlib import Path
14
+
15
+
16
+ def main() -> None:
17
+ bridge = Path(__file__).resolve().parents[1] / "codex" / "plugins" / "agent-wallet" / "server.py"
18
+ if not bridge.is_file():
19
+ print(
20
+ json.dumps(
21
+ {
22
+ "error": "OneCraft MCP bridge is missing from this runtime.",
23
+ "fix": "Run: wallet install --yes",
24
+ }
25
+ ),
26
+ file=sys.stderr,
27
+ )
28
+ raise SystemExit(1)
29
+ runpy.run_path(str(bridge), run_name="__main__")
30
+
31
+
32
+ if __name__ == "__main__":
33
+ main()
package/package.json CHANGED
@@ -1,6 +1,108 @@
1
1
  {
2
2
  "name": "@onecraft/wallet",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.145",
4
+ "description": "OneCraft Wallet gives AI agents local payments, swaps, and DeFi tools in Codex, Cursor, Claude Code, OpenClaw, and Hermes.",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/lopushok9/Agent-Layer.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/lopushok9/Agent-Layer/issues"
12
+ },
13
+ "homepage": "https://www.agent-layer.tech/",
14
+ "bin": {
15
+ "wallet": "./bin/openclaw-agent-wallet.mjs"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "scripts": {
21
+ "check": "node --check bin/openclaw-agent-wallet.mjs && node --check bin/lib/evm-daemon.mjs && node --test bin/lib/host-detection.test.mjs bin/lib/integrations.test.mjs bin/lib/evm-daemon.test.mjs bin/lib/release-python.test.mjs integrations/hedera/treasury-guard/tests/treasury-policy.test.mjs",
22
+ "build:openclaw-plugins": "node scripts/manage_openclaw_plugin_packages.mjs build",
23
+ "check:openclaw-plugins": "node scripts/manage_openclaw_plugin_packages.mjs check",
24
+ "check:release-version": "node scripts/check_release_version.mjs",
25
+ "test:release-promotion": "node --test scripts/validate_npm_promotion.test.mjs",
26
+ "version:sync": "node scripts/sync_version.mjs",
27
+ "release:local": "node scripts/release_local.mjs",
28
+ "test:npm-installer": "python3 agent-wallet/tests/smoke_npm_installer.py",
29
+ "test:universal-installer": "node --test bin/lib/host-detection.test.mjs && python3 agent-wallet/tests/smoke_universal_installer.py",
30
+ "test:published-floor-upgrade": "python3 agent-wallet/tests/e2e_install_upgrade_from_published_npm.py",
31
+ "pack:release": "node scripts/pack_wallet_release.mjs",
32
+ "pack:dry-run": "npm pack --dry-run"
33
+ },
34
+ "files": [
35
+ "bin/",
36
+ "VERSION",
37
+ "mcp/",
38
+ "integrations/hedera/treasury-guard/README.md",
39
+ "integrations/hedera/treasury-guard/examples/",
40
+ "integrations/hedera/treasury-guard/package.json",
41
+ "integrations/hedera/treasury-guard/package-lock.json",
42
+ "integrations/hedera/treasury-guard/skills/",
43
+ "integrations/hedera/treasury-guard/src/",
44
+ "scripts/check_release_version.mjs",
45
+ "scripts/version_targets.mjs",
46
+ "setup.sh",
47
+ "install-from-github.sh",
48
+ "README.md",
49
+ "CHANGELOG.md",
50
+ "LICENSE*",
51
+ "agent-wallet/agent_wallet/",
52
+ "agent-wallet/scripts/",
53
+ "agent-wallet/skills/",
54
+ "agent-wallet/examples/",
55
+ "agent-wallet/.env.example",
56
+ "agent-wallet/AGENTS.md",
57
+ "agent-wallet/README.md",
58
+ "agent-wallet/CARD_VAULT.md",
59
+ "agent-wallet/UPGRADE_COMPATIBILITY.md",
60
+ "agent-wallet/openclaw.plugin.json",
61
+ "agent-wallet/pyproject.toml",
62
+ ".openclaw/AGENTS.md",
63
+ ".openclaw/extensions/agent-wallet/",
64
+ ".claude-plugin/marketplace.json",
65
+ "codex/plugins/agent-wallet/",
66
+ "cursor/plugins/agent-wallet/",
67
+ "connectors/",
68
+ "claude-code/plugins/agent-wallet/",
69
+ "hermes/plugins/agent_wallet/",
70
+ "wdk-evm-wallet/src/",
71
+ "wdk-evm-wallet/bootstrap.sh",
72
+ "wdk-evm-wallet/run-local.sh",
73
+ "wdk-evm-wallet/README.md",
74
+ "wdk-evm-wallet/package.json",
75
+ "wdk-evm-wallet/package-lock.json",
76
+ "wdk-evm-wallet/.env.example",
77
+ "!agent-wallet/**/__pycache__/**",
78
+ "!agent-wallet/**/*.pyc",
79
+ "!hermes/**/__pycache__/**",
80
+ "!hermes/**/*.pyc",
81
+ "!codex/**/__pycache__/**",
82
+ "!codex/**/*.pyc",
83
+ "!cursor/**/__pycache__/**",
84
+ "!cursor/**/*.pyc",
85
+ "!mcp/**/__pycache__/**",
86
+ "!mcp/**/*.pyc",
87
+ "!agent-wallet/.pytest_cache/**",
88
+ "!agent-wallet/.runtime-venv/**",
89
+ "!bin/**/*.test.mjs",
90
+ "!**/node_modules/**",
91
+ "!**/*.tgz",
92
+ "!**/.DS_Store"
93
+ ],
94
+ "keywords": [
95
+ "onecraft",
96
+ "openclaw",
97
+ "codex",
98
+ "cursor",
99
+ "claude-code",
100
+ "hermes",
101
+ "agent-wallet",
102
+ "wallet",
103
+ "solana",
104
+ "bitcoin",
105
+ "evm"
106
+ ],
107
+ "license": "SEE LICENSE IN LICENSE"
108
+ }
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ // Verify the project version is consistent across every framework manifest and,
3
+ // when run on a release tag, that the tag matches the canonical VERSION.
4
+ //
5
+ // Canonical source: the root VERSION file. All derived manifests (see
6
+ // scripts/version_targets.mjs) must equal it — stamp them with
7
+ // scripts/sync_version.mjs if this fails. Emits the resolved version and npm
8
+ // dist-tag for the publish workflow.
9
+
10
+ import fs from "node:fs";
11
+
12
+ import {
13
+ TARGETS,
14
+ VERSION_FILE,
15
+ npmTagFor,
16
+ readCanonicalVersion,
17
+ readTargetVersion,
18
+ } from "./version_targets.mjs";
19
+
20
+ const root = process.cwd();
21
+ const errors = [];
22
+
23
+ let canonical = "";
24
+ try {
25
+ canonical = readCanonicalVersion(root);
26
+ } catch {
27
+ errors.push(`${VERSION_FILE} is missing`);
28
+ }
29
+ if (canonical === "") {
30
+ errors.push(`${VERSION_FILE} is empty`);
31
+ }
32
+
33
+ if (canonical) {
34
+ for (const target of TARGETS) {
35
+ let actual = null;
36
+ try {
37
+ actual = readTargetVersion(root, target);
38
+ } catch {
39
+ errors.push(`${target.file} is missing`);
40
+ continue;
41
+ }
42
+ if (!actual) {
43
+ errors.push(`${target.file}: version field not found`);
44
+ } else if (actual !== canonical) {
45
+ errors.push(
46
+ `version mismatch: ${target.file}=${actual}, ${VERSION_FILE}=${canonical} ` +
47
+ `(run: npm run version:sync)`,
48
+ );
49
+ }
50
+ }
51
+ }
52
+
53
+ const refName = process.env.GITHUB_REF_NAME || process.argv[2] || "";
54
+ const expectedFromTag = refName.startsWith("v") ? refName.slice(1) : "";
55
+ if (expectedFromTag && canonical && canonical !== expectedFromTag) {
56
+ errors.push(`tag/version mismatch: tag=${refName}, ${VERSION_FILE}=${canonical}`);
57
+ }
58
+
59
+ if (errors.length > 0) {
60
+ for (const error of errors) {
61
+ console.error(error);
62
+ }
63
+ process.exit(1);
64
+ }
65
+
66
+ const npmTag = npmTagFor(canonical);
67
+ console.log(`release_version=${canonical}`);
68
+ console.log(`npm_tag=${npmTag}`);
69
+
70
+ if (process.env.GITHUB_OUTPUT) {
71
+ fs.appendFileSync(process.env.GITHUB_OUTPUT, `release_version=${canonical}\nnpm_tag=${npmTag}\n`);
72
+ }
@@ -0,0 +1,60 @@
1
+ // Single source of truth for the project version.
2
+ //
3
+ // The root VERSION file is canonical. Every other manifest below is a *derived*
4
+ // target that must carry the exact same version. These targets are stamped by
5
+ // scripts/sync_version.mjs and verified by scripts/check_release_version.mjs, so
6
+ // they should never be edited by hand.
7
+
8
+ import fs from "node:fs";
9
+ import path from "node:path";
10
+
11
+ export const VERSION_FILE = "VERSION";
12
+
13
+ // kind -> regex capturing (prefix)(version)(suffix). Non-global on purpose: we
14
+ // only ever replace the first (top-level) occurrence in each file.
15
+ const PATTERNS = {
16
+ json: /("version"\s*:\s*")([^"]*)(")/,
17
+ toml: /^(version\s*=\s*")([^"]*)(")/m,
18
+ pyinit: /^(__version__\s*=\s*")([^"]*)(")/m,
19
+ yaml: /^(version:\s*)(\S+)(.*)$/m,
20
+ };
21
+
22
+ // Every place the version lives, across all agent frameworks and packages.
23
+ export const TARGETS = [
24
+ { file: "package.json", kind: "json" },
25
+ { file: "agent-wallet/pyproject.toml", kind: "toml" },
26
+ { file: "agent-wallet/agent_wallet/__init__.py", kind: "pyinit" },
27
+ { file: ".openclaw/extensions/agent-wallet/package.json", kind: "json" },
28
+ { file: "agent-wallet/openclaw.plugin.json", kind: "json" },
29
+ { file: ".openclaw/extensions/agent-wallet/openclaw.plugin.json", kind: "json" },
30
+ { file: "codex/plugins/agent-wallet/.codex-plugin/plugin.json", kind: "json" },
31
+ { file: "cursor/plugins/agent-wallet/.cursor-plugin/plugin.json", kind: "json" },
32
+ { file: "claude-code/plugins/agent-wallet/.claude-plugin/plugin.json", kind: "json" },
33
+ { file: "hermes/plugins/agent_wallet/plugin.yaml", kind: "yaml" },
34
+ { file: "wdk-evm-wallet/package.json", kind: "json" },
35
+ ];
36
+
37
+ export function readCanonicalVersion(root) {
38
+ return fs.readFileSync(path.join(root, VERSION_FILE), "utf8").trim();
39
+ }
40
+
41
+ export function readTargetVersion(root, target) {
42
+ const content = fs.readFileSync(path.join(root, target.file), "utf8");
43
+ const match = content.match(PATTERNS[target.kind]);
44
+ return match ? match[2] : null;
45
+ }
46
+
47
+ export function stampTarget(root, target, version) {
48
+ const filePath = path.join(root, target.file);
49
+ const content = fs.readFileSync(filePath, "utf8");
50
+ const pattern = PATTERNS[target.kind];
51
+ if (!pattern.test(content)) {
52
+ throw new Error(`No version field found in ${target.file}`);
53
+ }
54
+ const updated = content.replace(pattern, (_m, prefix, _old, suffix) => `${prefix}${version}${suffix}`);
55
+ fs.writeFileSync(filePath, updated);
56
+ }
57
+
58
+ export function npmTagFor(version) {
59
+ return version.includes("-") ? "beta" : "latest";
60
+ }
package/setup.sh ADDED
@@ -0,0 +1,87 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
+ INSTALLER="${ROOT_DIR}/agent-wallet/scripts/install_agent_wallet.py"
6
+
7
+ require_path() {
8
+ target="$1"
9
+ label="$2"
10
+ if [ ! -e "$target" ]; then
11
+ printf 'Missing %s at %s\n' "$label" "$target" >&2
12
+ exit 1
13
+ fi
14
+ }
15
+
16
+ require_cmd() {
17
+ name="$1"
18
+ if ! command -v "$name" >/dev/null 2>&1; then
19
+ printf 'Required command not found: %s\n' "$name" >&2
20
+ exit 1
21
+ fi
22
+ }
23
+
24
+ find_python() {
25
+ if [ -n "${OPENCLAW_AGENT_WALLET_PYTHON:-}" ]; then
26
+ if is_usable_python "$OPENCLAW_AGENT_WALLET_PYTHON"; then
27
+ printf '%s\n' "$OPENCLAW_AGENT_WALLET_PYTHON"
28
+ return
29
+ fi
30
+ printf 'OPENCLAW_AGENT_WALLET_PYTHON is not usable for this installer: %s\n' "$OPENCLAW_AGENT_WALLET_PYTHON" >&2
31
+ exit 1
32
+ fi
33
+ for candidate in python3.14 python3.13 python3.12 python3.11 python3.10 python3; do
34
+ if command -v "$candidate" >/dev/null 2>&1; then
35
+ candidate_path="$(command -v "$candidate")"
36
+ if is_usable_python "$candidate_path"; then
37
+ printf '%s\n' "$candidate_path"
38
+ return
39
+ fi
40
+ fi
41
+ done
42
+ printf 'Required Python not found: need Python >= 3.10 with working venv/ensurepip.\n' >&2
43
+ printf 'Install Python 3.10+ or set OPENCLAW_AGENT_WALLET_PYTHON=/path/to/working/python3.\n' >&2
44
+ exit 1
45
+ }
46
+
47
+ is_usable_python() {
48
+ python_bin="$1"
49
+ "$python_bin" - <<'PY' >/dev/null 2>&1
50
+ import sys
51
+
52
+ if sys.version_info < (3, 10):
53
+ raise SystemExit(
54
+ "OpenClaw Agent Wallet requires Python >= 3.10. "
55
+ f"Selected interpreter is {sys.version.split()[0]}. "
56
+ "Install Python 3.10+ or set OPENCLAW_AGENT_WALLET_PYTHON=/path/to/python3."
57
+ )
58
+ PY
59
+ if [ "$?" -ne 0 ]; then
60
+ return 1
61
+ fi
62
+ tmp_dir="$(mktemp -d "${TMPDIR:-/tmp}/openclaw-python-check.XXXXXX")"
63
+ "$python_bin" -m venv "$tmp_dir/venv" >/dev/null 2>&1
64
+ status="$?"
65
+ rm -rf "$tmp_dir"
66
+ return "$status"
67
+ }
68
+
69
+ PYTHON_BIN="$(find_python)"
70
+
71
+ require_cmd node
72
+ require_cmd npm
73
+
74
+ require_path "$INSTALLER" "Python installer"
75
+ require_path "${ROOT_DIR}/agent-wallet" "agent-wallet package"
76
+ require_path "${ROOT_DIR}/.openclaw/extensions/agent-wallet" "OpenClaw extension"
77
+ require_path "${ROOT_DIR}/codex/plugins/agent-wallet/.codex-plugin/plugin.json" "Codex plugin"
78
+ require_path "${ROOT_DIR}/cursor/plugins/agent-wallet/.cursor-plugin/plugin.json" "Cursor plugin"
79
+ require_path "${ROOT_DIR}/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json" "Claude Code plugin"
80
+ require_path "${ROOT_DIR}/wdk-evm-wallet/package.json" "wdk-evm-wallet package"
81
+
82
+ exec "$PYTHON_BIN" "$INSTALLER" \
83
+ --package-root "${ROOT_DIR}/agent-wallet" \
84
+ --extension-path "${ROOT_DIR}/.openclaw/extensions/agent-wallet" \
85
+ --wdk-evm-root "${ROOT_DIR}/wdk-evm-wallet" \
86
+ --npm-bin "$(command -v npm)" \
87
+ "$@"
@@ -0,0 +1,38 @@
1
+ HOST=127.0.0.1
2
+ PORT=8081
3
+ WDK_EVM_NETWORK=sepolia
4
+ WDK_EVM_DATA_DIR=
5
+ WDK_EVM_LOCAL_TOKEN=
6
+ WDK_EVM_LOCAL_TOKEN_PATH=
7
+ WDK_EVM_UNLOCK_TIMEOUT_SECONDS=0
8
+ WDK_EVM_TRANSFER_MAX_FEE_WEI=
9
+ WDK_EVM_RPC_PROVIDER_MODE=gateway
10
+ WDK_EVM_RPC_GATEWAY_PROVIDER=alchemy
11
+ PROVIDER_GATEWAY_URL=https://agent-layer-production.up.railway.app
12
+ PROVIDER_GATEWAY_BEARER_TOKEN=
13
+ # Mainnet ethereum/base/robinhood are forced through provider-gateway -> Alchemy.
14
+ # Direct per-network URLs below are only relevant for testnet-style paths.
15
+ WDK_EVM_ETHEREUM_RPC_URL=
16
+ WDK_EVM_SEPOLIA_RPC_URL=https://sepolia.drpc.org
17
+ WDK_EVM_BASE_RPC_URL=
18
+ WDK_EVM_BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
19
+ WDK_EVM_ROBINHOOD_RPC_URL=
20
+ MORPHO_API_BASE_URL=https://api.morpho.org/graphql
21
+ # Uniswap Trading API swap provider (ethereum/base/robinhood, CLASSIC routing).
22
+ # Uniswap Trading API. By default the daemon routes quotes/swaps through the
23
+ # provider gateway (PROVIDER_GATEWAY_URL/v1/evm/uniswap), which holds the Uniswap
24
+ # key and authenticates via the gateway bearer — so no UNISWAP_API_KEY is needed
25
+ # here. Only set UNISWAP_API_KEY + point UNISWAP_TRADING_API_BASE_URL at Uniswap
26
+ # directly (https://trade-api.gateway.uniswap.org/v1) for legacy/offline direct mode.
27
+ UNISWAP_API_KEY=
28
+ # UNISWAP_TRADING_API_BASE_URL= # defaults to PROVIDER_GATEWAY_URL/v1/evm/uniswap
29
+ # LP actions use the Liquidity API. Gateway mode is the default; set this only
30
+ # for direct API access (for example https://liquidity.api.uniswap.org).
31
+ # UNISWAP_LIQUIDITY_API_BASE_URL= # defaults to PROVIDER_GATEWAY_URL/v1/evm/uniswap/lp
32
+ UNISWAP_ROUTER_VERSION=2.0
33
+ # Optional per-network override; each value must exist in the wallet's reviewed
34
+ # execution profile and match the provider-gateway's per-chain configuration.
35
+ # Robinhood Chain has no Universal Router 2.0 deployment (Uniswap defaults it
36
+ # to 2.1.1); requesting 2.0 makes the Trading API 404 every pair on that chain.
37
+ UNISWAP_ROUTER_VERSION_BY_NETWORK={"ethereum":"2.0","base":"2.0","robinhood":"2.1.1"}
38
+ UNISWAP_DEFAULT_SLIPPAGE_BPS=300
@@ -0,0 +1,254 @@
1
+ # WDK EVM Wallet
2
+
3
+ Separate EVM wallet service built on top of Tether WDK.
4
+
5
+ This project is intentionally isolated from the existing Python `agent-wallet/`,
6
+ the Solana backend, and the separate BTC runtime. It is the dedicated local EVM
7
+ wallet path for ordinary EVM accounts based on `@tetherto/wdk-wallet-evm`.
8
+
9
+ Current scope:
10
+
11
+ - local encrypted wallet vault
12
+ - localhost-only HTTP surface
13
+ - local bearer-token auth between the wallet service and trusted local callers
14
+ - wallet registry with `walletId`
15
+ - explicit `unlock` / `lock` semantics
16
+ - derive EVM accounts and addresses
17
+ - fetch native balances
18
+ - fetch ERC-20 balances
19
+ - fetch ERC-20 token metadata (`name`, `symbol`, `decimals`)
20
+ - fetch fee-rate suggestions
21
+ - fetch read-only Velora swap quotes for supported mainnet ERC-20 and native ETH pairs
22
+ - execute Velora ERC-20 and native ETH swaps on supported mainnet networks through the local wallet account
23
+ - fetch read-only Uniswap Trading API swap quotes (CLASSIC routing) for native ETH and ERC-20 pairs on ethereum/base
24
+ - execute Uniswap Trading API swaps (native ETH and ERC-20 inputs) with Permit2 EIP-712 signing for ERC-20 inputs
25
+ - fetch Aave V3 account data on supported mainnet networks
26
+ - fetch Aave V3 reserve catalog on supported mainnet networks
27
+ - fetch Aave V3 per-reserve user positions on supported mainnet networks
28
+ - quote and send narrow Aave V3 `supply`, `withdraw`, `borrow`, and `repay` operations
29
+ - fetch Morpho vault discovery and detail data on supported mainnet networks
30
+ - fetch Morpho market discovery and detail data on supported mainnet networks
31
+ - fetch Morpho user vault and market positions on supported mainnet networks
32
+ - quote and send narrow Morpho vault `supply` and `withdraw` operations
33
+ - quote and send narrow Morpho market `supply_collateral`, `borrow`, `repay`, and `withdraw_collateral` operations
34
+ - quote and send native transfers
35
+ - quote and send ERC-20 transfers
36
+ - fetch transaction receipts
37
+
38
+ The implementation follows the official WDK documentation:
39
+
40
+ - Node.js Quickstart: https://docs.wdk.tether.io/start-building/nodejs-bare-quickstart
41
+ - SDK Get Started: https://docs.wdk.tether.io/sdk/get-started
42
+ - EVM wallet overview: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-evm
43
+ - EVM wallet configuration: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-evm/configuration
44
+ - EVM wallet API reference: https://docs.wdk.tether.io/sdk/wallet-modules/wallet-evm/api-reference
45
+ - Velora swap overview: https://docs.wdk.tether.io/sdk/swap-modules/swap-velora-evm
46
+ - Velora swap API reference: https://docs.wdk.tether.io/sdk/swap-modules/swap-velora-evm/api-reference
47
+ - Aave lending overview: https://docs.wdk.tether.io/sdk/lending-modules/lending-aave-evm
48
+ - Aave lending API reference: https://docs.wdk.tether.io/sdk/lending-modules/lending-aave-evm/api-reference
49
+ - Morpho Build overview: https://morpho.org/build
50
+ - Morpho offchain API docs: https://docs.morpho.org/tools/offchain/api/get-started/
51
+
52
+ ## Why Separate
53
+
54
+ - keeps the existing Solana wallet backend untouched
55
+ - keeps BTC and EVM custody paths operationally separate
56
+ - avoids mixing Python wallet policy with the Node.js WDK runtime
57
+ - creates a clean path for future EVM-specific protocol layers without exposing raw contract calls to the agent
58
+
59
+ ## Initial Safety Boundaries
60
+
61
+ This service intentionally supports a narrow surface:
62
+
63
+ - normal EVM account model only
64
+ - no ERC-4337 in this runtime
65
+ - no arbitrary calldata on `sendTransaction`
66
+ - no generic token approval endpoint
67
+ - protocol-scoped approvals only where required by an explicit supported module
68
+ - no generic contract execution endpoints
69
+ - no seed phrase exposure in the agent-facing path
70
+
71
+ ## Networks
72
+
73
+ - `ethereum`
74
+ - `sepolia`
75
+ - `base`
76
+ - `base-sepolia`
77
+
78
+ The active network is persistent and can be switched without changing code.
79
+
80
+ ## API
81
+
82
+ - `GET /health`
83
+ - `GET /v1/evm/network`
84
+ - `POST /v1/evm/network/set`
85
+ - `POST /v1/evm/seed-phrase/generate`
86
+ - `GET /v1/evm/wallets`
87
+ - `POST /v1/evm/wallets/get`
88
+ - `POST /v1/evm/wallets/create`
89
+ - `POST /v1/evm/wallets/import`
90
+ - `POST /v1/evm/wallets/unlock`
91
+ - `POST /v1/evm/wallets/lock`
92
+ - `POST /v1/evm/wallets/reveal-seed`
93
+ - `POST /v1/evm/wallets/change-password`
94
+ - `POST /v1/evm/address/resolve`
95
+ - `POST /v1/evm/balance/get`
96
+ - `POST /v1/evm/token-balance/get`
97
+ - `POST /v1/evm/token-metadata/get`
98
+ - `POST /v1/evm/fee-rates/get`
99
+ - `POST /v1/evm/transaction/receipt/get`
100
+ - `POST /v1/evm/aave/account/get`
101
+ - `POST /v1/evm/aave/reserves/get`
102
+ - `POST /v1/evm/aave/positions/get`
103
+ - `POST /v1/evm/aave/supply/quote`
104
+ - `POST /v1/evm/aave/supply/send`
105
+ - `POST /v1/evm/aave/withdraw/quote`
106
+ - `POST /v1/evm/aave/withdraw/send`
107
+ - `POST /v1/evm/aave/borrow/quote`
108
+ - `POST /v1/evm/aave/borrow/send`
109
+ - `POST /v1/evm/aave/repay/quote`
110
+ - `POST /v1/evm/aave/repay/send`
111
+ - `POST /v1/evm/morpho/vaults/get`
112
+ - `POST /v1/evm/morpho/markets/get`
113
+ - `POST /v1/evm/morpho/positions/get`
114
+ - `POST /v1/evm/morpho/vault/supply/quote`
115
+ - `POST /v1/evm/morpho/vault/supply/send`
116
+ - `POST /v1/evm/morpho/vault/withdraw/quote`
117
+ - `POST /v1/evm/morpho/vault/withdraw/send`
118
+ - `POST /v1/evm/morpho/market/supply_collateral/quote`
119
+ - `POST /v1/evm/morpho/market/supply_collateral/send`
120
+ - `POST /v1/evm/morpho/market/borrow/quote`
121
+ - `POST /v1/evm/morpho/market/borrow/send`
122
+ - `POST /v1/evm/morpho/market/repay/quote`
123
+ - `POST /v1/evm/morpho/market/repay/send`
124
+ - `POST /v1/evm/morpho/market/withdraw_collateral/quote`
125
+ - `POST /v1/evm/morpho/market/withdraw_collateral/send`
126
+ - `POST /v1/evm/swap/quote`
127
+ - `POST /v1/evm/swap/send`
128
+ - `POST /v1/evm/uniswap/swap/quote`
129
+ - `POST /v1/evm/uniswap/swap/send`
130
+ - `POST /v1/evm/transfer/quote`
131
+ - `POST /v1/evm/transfer/send`
132
+ - `POST /v1/evm/token-transfer/quote`
133
+ - `POST /v1/evm/token-transfer/send`
134
+
135
+ All routes except `/health` require:
136
+
137
+ - `Authorization: Bearer <token>`
138
+
139
+ By default the service generates that token automatically at:
140
+
141
+ - `~/.openclaw/wdk-evm-wallet/local-auth-token`
142
+
143
+ or under `OPENCLAW_HOME/wdk-evm-wallet/local-auth-token` when `OPENCLAW_HOME` is set.
144
+
145
+ ## Install
146
+
147
+ ```bash
148
+ cd wdk-evm-wallet
149
+ npm install
150
+ cp .env.example .env
151
+ npm start
152
+ ```
153
+
154
+ Simplest onboarding:
155
+
156
+ ```bash
157
+ cd wdk-evm-wallet && sh bootstrap.sh
158
+ cd wdk-evm-wallet && npm start
159
+ ```
160
+
161
+ Fastest local start:
162
+
163
+ ```bash
164
+ cd wdk-evm-wallet && sh run-local.sh
165
+ ```
166
+
167
+ ## Configuration
168
+
169
+ Environment variables:
170
+
171
+ - `WDK_EVM_TRANSPORT` — `socket` (default) or `tcp`. `socket` serves over a unix
172
+ domain socket at `WDK_EVM_SOCKET_PATH`; `tcp` serves over `HOST`/`PORT`.
173
+ - `WDK_EVM_SOCKET_PATH` — unix socket path, used only when `WDK_EVM_TRANSPORT=socket`.
174
+ Defaults to `<dataDir>/daemon.sock`.
175
+ - `HOST` — used only when `WDK_EVM_TRANSPORT=tcp`.
176
+ - `PORT` — used only when `WDK_EVM_TRANSPORT=tcp`.
177
+ - `WDK_EVM_NETWORK`
178
+ - `WDK_EVM_DATA_DIR`
179
+ - `WDK_EVM_LOCAL_TOKEN`
180
+ - `WDK_EVM_LOCAL_TOKEN_PATH`
181
+ - `WDK_EVM_UNLOCK_TIMEOUT_SECONDS`
182
+ - `WDK_EVM_TRANSFER_MAX_FEE_WEI`
183
+ - `WDK_EVM_RPC_PROVIDER_MODE`
184
+ - `WDK_EVM_RPC_GATEWAY_PROVIDER`
185
+ - `PROVIDER_GATEWAY_URL`
186
+ - `PROVIDER_GATEWAY_BEARER_TOKEN`
187
+ - `WDK_EVM_ETHEREUM_RPC_URL`
188
+ - `WDK_EVM_SEPOLIA_RPC_URL`
189
+ - `WDK_EVM_BASE_RPC_URL`
190
+ - `WDK_EVM_BASE_SEPOLIA_RPC_URL`
191
+ - `MORPHO_API_BASE_URL`
192
+ - `UNISWAP_API_KEY`
193
+ - `UNISWAP_TRADING_API_BASE_URL`
194
+ - `UNISWAP_LIQUIDITY_API_BASE_URL`
195
+ - `UNISWAP_ROUTER_VERSION`
196
+ - `UNISWAP_ROUTER_VERSION_BY_NETWORK`
197
+ - `UNISWAP_DEFAULT_SLIPPAGE_BPS`
198
+
199
+ Morpho read-only support:
200
+
201
+ - the runtime exposes Morpho discovery and account-read routes through the public
202
+ Morpho GraphQL API at `https://api.morpho.org/graphql` by default
203
+ - Morpho support is available on `ethereum`, `base`, and `arc` mainnet
204
+ - vault and market discovery use fixed first-party queries rather than caller-provided
205
+ GraphQL strings
206
+
207
+ Swap providers:
208
+
209
+ - the runtime exposes three independent swap surfaces: Velora (`/v1/evm/swap/*`),
210
+ LI.FI cross-chain (`/v1/evm/lifi/*`), and Uniswap Trading API
211
+ (`/v1/evm/uniswap/swap/*`) — always keep more than one route available
212
+ - LI.FI supports Arc as both an EVM source and destination. Arc native USDC aliases
213
+ are routed through its `0x3600000000000000000000000000000000000000`
214
+ ERC-20 compatibility interface (6 decimals)
215
+ - Uniswap Trading API support is limited to `ethereum` and `base`, `EXACT_INPUT`,
216
+ and CLASSIC routing only; non-CLASSIC quotes (UniswapX Dutch/Priority) are rejected
217
+ - native ETH inputs need no approval or signature; ERC-20 inputs are pulled via
218
+ Permit2 (`0x000000000022D473030F116dDEE9F6B43aC78BA3`) and require a per-swap
219
+ Permit2 EIP-712 signature produced locally by the wallet account
220
+ - the `/swap` response `to` address is checked against a pinned Universal Router
221
+ allow-list before broadcast, and every swap is simulated first
222
+ - `UNISWAP_API_KEY` is required for the Uniswap routes; it identifies the
223
+ integrator (this service), not an end user — swaps are scoped per request by the
224
+ active wallet address, so a single key never mixes users
225
+ - LP actions (`create`, `increase`, `decrease`, `claim_fees`) are exposed at
226
+ `/v1/evm/uniswap/liquidity/*` and use Uniswap's Liquidity API. The runtime
227
+ accepts transactions only for pinned V3/V4 PositionManager deployments on
228
+ Ethereum, Base, and Robinhood, refreshes the final LP transaction just before
229
+ signing, and executes only API-returned bounded approvals.
230
+
231
+ Gateway mode:
232
+
233
+ - set `WDK_EVM_RPC_PROVIDER_MODE=gateway`
234
+ - `PROVIDER_GATEWAY_URL` defaults to `https://agent-layer-production.up.railway.app`
235
+ - set `PROVIDER_GATEWAY_URL=https://...` only when overriding the hosted default
236
+ - `PROVIDER_GATEWAY_BEARER_TOKEN` is optional and only needed when the gateway is protected
237
+ - `ethereum` and `base` mainnet are always routed through the provider gateway raw EVM RPC route
238
+ - `ethereum` and `base` mainnet are pinned to the gateway `provider=alchemy` path
239
+ - direct `WDK_EVM_ETHEREUM_RPC_URL` and `WDK_EVM_BASE_RPC_URL` values no longer override mainnet routing
240
+ - `WDK_EVM_SEPOLIA_RPC_URL` and `WDK_EVM_BASE_SEPOLIA_RPC_URL` remain direct per-network testnet overrides
241
+
242
+ Local security note:
243
+
244
+ - the service binds to `127.0.0.1` by default
245
+ - encrypted wallet files are stored locally on disk
246
+ - unlocked seed phrases live only in memory
247
+ - explicit `lock` or process restart clears the in-memory unlocked state
248
+ - seed reveal is password-gated and separate from normal agent operations
249
+ - Velora swap support is currently limited to `ethereum` and `base` ERC-20 and native ETH pairs
250
+ - the underlying WDK Velora package is still beta; test swap execution carefully before relying on it
251
+ - Uniswap Trading API swaps perform a Permit2-scoped ERC-20 approval for ERC-20 inputs; if a send fails after approval, the service attempts to restore the original allowance
252
+ - Aave V3 support is currently limited to `ethereum` and `base`
253
+ - Aave `supply` and `repay` may perform pool-scoped ERC-20 approvals; if a send fails after approval, the service attempts to restore the original allowance
254
+ - Aave delegated `onBehalfOf` operations and third-party withdraw destinations are intentionally not exposed in this runtime
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ set -eu
3
+
4
+ if [ ! -f .env ]; then
5
+ cp .env.example .env
6
+ fi
7
+
8
+ npm install