@agentlayer.tech/wallet 0.1.27 → 0.1.30
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/.openclaw/extensions/agent-wallet/README.md +4 -5
- package/.openclaw/extensions/agent-wallet/dist/index.js +31 -31
- package/.openclaw/extensions/agent-wallet/index.ts +31 -31
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +2 -2
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/CHANGELOG.md +52 -0
- package/README.md +9 -0
- package/agent-wallet/README.md +18 -22
- package/agent-wallet/agent_wallet/bootstrap.py +28 -12
- package/agent-wallet/agent_wallet/btc_user_wallets.py +2 -7
- package/agent-wallet/agent_wallet/config.py +99 -22
- package/agent-wallet/agent_wallet/evm_user_wallets.py +2 -14
- package/agent-wallet/agent_wallet/openclaw_adapter.py +72 -108
- package/agent-wallet/agent_wallet/openclaw_runtime.py +3 -12
- package/agent-wallet/agent_wallet/providers/kamino.py +21 -4
- package/agent-wallet/agent_wallet/providers/solana_rpc.py +0 -23
- package/agent-wallet/agent_wallet/providers/x402.py +198 -18
- package/agent-wallet/agent_wallet/user_wallets.py +4 -3
- package/agent-wallet/agent_wallet/wallet_layer/base.py +3 -3
- package/agent-wallet/agent_wallet/wallet_layer/factory.py +8 -5
- package/agent-wallet/agent_wallet/wallet_layer/solana.py +437 -44
- package/agent-wallet/agent_wallet/wallet_layer/wdk_btc.py +2 -8
- package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +13 -13
- package/agent-wallet/examples/openclaw_runtime_onboarding.py +1 -1
- package/agent-wallet/examples/openclaw_user_wallet_example.py +1 -1
- package/agent-wallet/openclaw.plugin.json +1 -1
- package/agent-wallet/pyproject.toml +2 -1
- package/agent-wallet/scripts/bootstrap_openclaw_btc.py +3 -5
- package/agent-wallet/scripts/bootstrap_openclaw_evm.py +2 -12
- package/agent-wallet/scripts/build_release_bundle.py +1 -0
- package/agent-wallet/scripts/flash-sdk-bridge/bridge.mjs +1 -4
- package/agent-wallet/scripts/install_agent_wallet.py +1 -0
- package/agent-wallet/scripts/install_openclaw_local_config.py +4 -6
- package/agent-wallet/scripts/manage_openclaw_btc_wallet.py +2 -4
- package/agent-wallet/scripts/manage_openclaw_evm_wallet.py +2 -15
- package/agent-wallet/scripts/reveal_btc_seed.sh +7 -16
- package/agent-wallet/scripts/setup_btc_wallet.sh +7 -16
- package/agent-wallet/scripts/setup_evm_wallet.sh +1 -11
- package/agent-wallet/scripts/switch_openclaw_wallet_network.py +4 -1
- package/agent-wallet/skills/wallet-operator/SKILL.md +0 -1
- package/bin/openclaw-agent-wallet.mjs +289 -0
- package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +20 -0
- package/claude-code/plugins/agent-wallet/.mcp.json +14 -0
- package/claude-code/plugins/agent-wallet/README.md +65 -0
- package/claude-code/plugins/agent-wallet/scripts/run_mcp.sh +34 -0
- package/claude-code/plugins/agent-wallet/skills/wallet-operator/SKILL.md +18 -0
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +38 -0
- package/codex/plugins/agent-wallet/.mcp.json +15 -0
- package/codex/plugins/agent-wallet/README.md +39 -0
- package/codex/plugins/agent-wallet/scripts/run_mcp.sh +21 -0
- package/codex/plugins/agent-wallet/server.py +1077 -0
- package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +18 -0
- package/hermes/plugins/agent_wallet/schemas.py +2 -2
- package/hermes/plugins/agent_wallet/tools.py +17 -3
- package/package.json +6 -1
- package/setup.sh +2 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "wallet-operator"
|
|
3
|
+
description: "Use when the user asks Codex to interact with the local AgentLayer wallet runtime. Prefer wallet tools over shell commands, preview writes first, and keep approval/signing semantics intact."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Wallet Operator
|
|
7
|
+
|
|
8
|
+
Use this plugin when the user wants Codex to work with the existing local AgentLayer wallet.
|
|
9
|
+
|
|
10
|
+
Rules:
|
|
11
|
+
|
|
12
|
+
- Do not create a new wallet unless the user explicitly asks for wallet provisioning outside this plugin.
|
|
13
|
+
- Prefer wallet tools over shelling out to chain CLIs, curl, or ad hoc scripts.
|
|
14
|
+
- For writes, start with `preview` or `intent_preview` when the tool supports it.
|
|
15
|
+
- Execute only after the user explicitly confirms the shown summary.
|
|
16
|
+
- On mainnet, restate the network, asset, amount, and destination before execute.
|
|
17
|
+
- Do not ask the user for `approval_token`. The bridge manages approval binding internally.
|
|
18
|
+
- If approval context is missing or stale, repeat preview instead of improvising.
|
|
@@ -48,7 +48,7 @@ AGENT_WALLET_INVOKE = {
|
|
|
48
48
|
},
|
|
49
49
|
"network": {
|
|
50
50
|
"type": "string",
|
|
51
|
-
"description": "Optional network override, such as
|
|
51
|
+
"description": "Optional network override, such as mainnet, bitcoin, ethereum, or base.",
|
|
52
52
|
},
|
|
53
53
|
"user_id": {
|
|
54
54
|
"type": "string",
|
|
@@ -149,7 +149,7 @@ AGENT_WALLET_EVM_STATUS = {
|
|
|
149
149
|
},
|
|
150
150
|
"network": {
|
|
151
151
|
"type": "string",
|
|
152
|
-
"description": "Optional EVM network hint, such as ethereum
|
|
152
|
+
"description": "Optional EVM network hint, such as ethereum or base.",
|
|
153
153
|
},
|
|
154
154
|
"service_url": {
|
|
155
155
|
"type": "string",
|
|
@@ -236,7 +236,15 @@ def _infer_backend_for_tool(tool_name: str) -> str | None:
|
|
|
236
236
|
or "jupiter" in tool_name
|
|
237
237
|
or "kamino" in tool_name
|
|
238
238
|
or "bags" in tool_name
|
|
239
|
-
or tool_name
|
|
239
|
+
or tool_name
|
|
240
|
+
in {
|
|
241
|
+
"transfer_sol",
|
|
242
|
+
"transfer_spl_token",
|
|
243
|
+
"sign_wallet_message",
|
|
244
|
+
"close_empty_token_accounts",
|
|
245
|
+
"get_wallet_portfolio",
|
|
246
|
+
"get_solana_token_prices",
|
|
247
|
+
}
|
|
240
248
|
):
|
|
241
249
|
return "solana_local"
|
|
242
250
|
return None
|
|
@@ -252,6 +260,8 @@ def _normalize_network_for_backend(backend: str, raw_network: Any) -> str:
|
|
|
252
260
|
"base-mainnet": "base",
|
|
253
261
|
}
|
|
254
262
|
normalized = aliases.get(network, network)
|
|
263
|
+
if normalized in {"sepolia", "base-sepolia", "base_sepolia"}:
|
|
264
|
+
raise RuntimeError("EVM testnets are no longer supported. Use ethereum or base.")
|
|
255
265
|
return normalized if normalized in {"ethereum", "base"} else "ethereum"
|
|
256
266
|
if backend == "wdk_btc_local":
|
|
257
267
|
aliases = {
|
|
@@ -261,7 +271,9 @@ def _normalize_network_for_backend(backend: str, raw_network: Any) -> str:
|
|
|
261
271
|
"mainnet": "bitcoin",
|
|
262
272
|
}
|
|
263
273
|
normalized = aliases.get(network, network)
|
|
264
|
-
|
|
274
|
+
if normalized in {"testnet", "regtest"}:
|
|
275
|
+
raise RuntimeError("Bitcoin testnet/regtest are no longer supported. Use bitcoin.")
|
|
276
|
+
return normalized if normalized == "bitcoin" else "bitcoin"
|
|
265
277
|
aliases = {
|
|
266
278
|
"solana": "mainnet",
|
|
267
279
|
"solana-mainnet": "mainnet",
|
|
@@ -269,7 +281,9 @@ def _normalize_network_for_backend(backend: str, raw_network: Any) -> str:
|
|
|
269
281
|
"mainnet-beta": "mainnet",
|
|
270
282
|
}
|
|
271
283
|
normalized = aliases.get(network, network)
|
|
272
|
-
|
|
284
|
+
if normalized in {"devnet", "testnet"}:
|
|
285
|
+
raise RuntimeError("Solana devnet/testnet are no longer supported. Use mainnet.")
|
|
286
|
+
return normalized if normalized == "mainnet" else "mainnet"
|
|
273
287
|
|
|
274
288
|
|
|
275
289
|
def _reject_secret_config(config: dict[str, Any]) -> None:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentlayer.tech/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"agent-wallet/pyproject.toml",
|
|
43
43
|
".openclaw/AGENTS.md",
|
|
44
44
|
".openclaw/extensions/agent-wallet/",
|
|
45
|
+
"codex/plugins/agent-wallet/",
|
|
46
|
+
"claude-code/plugins/agent-wallet/",
|
|
45
47
|
"hermes/plugins/agent_wallet/",
|
|
46
48
|
"wdk-btc-wallet/src/",
|
|
47
49
|
"wdk-btc-wallet/bootstrap.sh",
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
"!agent-wallet/**/*.pyc",
|
|
60
62
|
"!hermes/**/__pycache__/**",
|
|
61
63
|
"!hermes/**/*.pyc",
|
|
64
|
+
"!codex/**/__pycache__/**",
|
|
65
|
+
"!codex/**/*.pyc",
|
|
62
66
|
"!agent-wallet/.pytest_cache/**",
|
|
63
67
|
"!agent-wallet/.runtime-venv/**",
|
|
64
68
|
"!**/node_modules/**",
|
|
@@ -67,6 +71,7 @@
|
|
|
67
71
|
],
|
|
68
72
|
"keywords": [
|
|
69
73
|
"openclaw",
|
|
74
|
+
"codex",
|
|
70
75
|
"agent-wallet",
|
|
71
76
|
"wallet",
|
|
72
77
|
"solana",
|
package/setup.sh
CHANGED
|
@@ -74,6 +74,8 @@ require_cmd npm
|
|
|
74
74
|
require_path "$INSTALLER" "Python installer"
|
|
75
75
|
require_path "${ROOT_DIR}/agent-wallet" "agent-wallet package"
|
|
76
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}/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json" "Claude Code plugin"
|
|
77
79
|
require_path "${ROOT_DIR}/wdk-btc-wallet/package.json" "wdk-btc-wallet package"
|
|
78
80
|
require_path "${ROOT_DIR}/wdk-evm-wallet/package.json" "wdk-evm-wallet package"
|
|
79
81
|
|