@agentlayer.tech/wallet 0.1.28 → 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 +29 -20
- package/.openclaw/extensions/agent-wallet/index.ts +29 -20
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +2 -2
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/CHANGELOG.md +38 -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 +28 -32
- 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 +4 -9
- 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 +2 -12
- 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,65 @@
|
|
|
1
|
+
# Agent Wallet Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
This plugin adds the existing local AgentLayer wallet runtime to Claude Code.
|
|
4
|
+
|
|
5
|
+
It does not create a new wallet. It reuses the current runtime under:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
~/.openclaw/agent-wallet-runtime/current/agent-wallet
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Primary design rules:
|
|
12
|
+
|
|
13
|
+
- keep wallet policy, approvals, and signing in `agent-wallet/`
|
|
14
|
+
- keep this plugin as a thin MCP bridge for Claude Code
|
|
15
|
+
- reuse the same wallets, networks, and tool surface already used by OpenClaw, Hermes, and Codex
|
|
16
|
+
- avoid secrets in plugin config or marketplace metadata
|
|
17
|
+
|
|
18
|
+
## What it exposes
|
|
19
|
+
|
|
20
|
+
- direct wallet tools for Solana, Bitcoin, and EVM (same surface as OpenClaw and Codex)
|
|
21
|
+
- session wallet selection with `set_wallet_backend`
|
|
22
|
+
- EVM network selection with `set_evm_network`
|
|
23
|
+
- auto-managed approval binding for `preview -> execute` write flows
|
|
24
|
+
|
|
25
|
+
## Runtime requirements
|
|
26
|
+
|
|
27
|
+
- install the AgentLayer runtime first with `npx @agentlayer.tech/wallet install --yes`
|
|
28
|
+
- keep the local wallet files and `~/.openclaw/sealed_keys.json` in place
|
|
29
|
+
- run `npx @agentlayer.tech/wallet claude-code install --yes` to register this plugin
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### Automated (recommended)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx @agentlayer.tech/wallet install --yes
|
|
37
|
+
npx @agentlayer.tech/wallet claude-code install --yes
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Manual
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Load for a single session (dev / testing)
|
|
44
|
+
claude --plugin-dir /path/to/claude-code/plugins/agent-wallet
|
|
45
|
+
|
|
46
|
+
# Or install permanently via Claude Code:
|
|
47
|
+
# 1. Open Claude Code
|
|
48
|
+
# 2. Run /plugin and point it at this directory
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Path resolution
|
|
52
|
+
|
|
53
|
+
The bridge resolves the wallet runtime from:
|
|
54
|
+
|
|
55
|
+
1. `AGENT_WALLET_PACKAGE_ROOT`
|
|
56
|
+
2. `OPENCLAW_AGENT_WALLET_PACKAGE_ROOT`
|
|
57
|
+
3. `~/.openclaw/agent-wallet-runtime/current/agent-wallet`
|
|
58
|
+
|
|
59
|
+
If the runtime lives elsewhere, set one of the env overrides before starting Claude Code.
|
|
60
|
+
|
|
61
|
+
## MCP server
|
|
62
|
+
|
|
63
|
+
The plugin launches an MCP server via `scripts/run_mcp.sh`, which runs the same
|
|
64
|
+
`server.py` FastMCP bridge used by the Codex plugin. `${CLAUDE_PLUGIN_ROOT}` is
|
|
65
|
+
substituted by Claude Code at plugin load time.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
5
|
+
PLUGIN_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
|
6
|
+
OPENCLAW_HOME=${OPENCLAW_HOME:-"$HOME/.openclaw"}
|
|
7
|
+
PACKAGE_ROOT=${AGENT_WALLET_PACKAGE_ROOT:-${OPENCLAW_AGENT_WALLET_PACKAGE_ROOT:-"$OPENCLAW_HOME/agent-wallet-runtime/current/agent-wallet"}}
|
|
8
|
+
|
|
9
|
+
# Resolve server.py: check sibling codex plugin (same npm package), then local copy
|
|
10
|
+
CODEX_SERVER="$PLUGIN_ROOT/../../codex/plugins/agent-wallet/server.py"
|
|
11
|
+
LOCAL_SERVER="$PLUGIN_ROOT/server.py"
|
|
12
|
+
|
|
13
|
+
if [ -f "$LOCAL_SERVER" ]; then
|
|
14
|
+
SERVER_PY="$LOCAL_SERVER"
|
|
15
|
+
elif [ -f "$CODEX_SERVER" ]; then
|
|
16
|
+
SERVER_PY=$(CDPATH= cd -- "$PLUGIN_ROOT/../../codex/plugins/agent-wallet" && pwd)/server.py
|
|
17
|
+
else
|
|
18
|
+
printf '{"error":"agent-wallet server.py not found. Run: npx @agentlayer.tech/wallet install --yes"}\n' >&2
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ -n "${AGENT_WALLET_PYTHON:-}" ]; then
|
|
23
|
+
PYTHON_BIN=$AGENT_WALLET_PYTHON
|
|
24
|
+
elif [ -n "${OPENCLAW_AGENT_WALLET_PYTHON:-}" ]; then
|
|
25
|
+
PYTHON_BIN=$OPENCLAW_AGENT_WALLET_PYTHON
|
|
26
|
+
elif [ -x "$PACKAGE_ROOT/.venv/bin/python" ]; then
|
|
27
|
+
PYTHON_BIN=$PACKAGE_ROOT/.venv/bin/python
|
|
28
|
+
elif [ -x "$PACKAGE_ROOT/.runtime-venv/bin/python" ]; then
|
|
29
|
+
PYTHON_BIN=$PACKAGE_ROOT/.runtime-venv/bin/python
|
|
30
|
+
else
|
|
31
|
+
PYTHON_BIN=python3
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
exec "$PYTHON_BIN" "$SERVER_PY"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when the user asks Claude Code to interact with the local AgentLayer wallet runtime: check balances, transfer tokens, swap, DeFi operations, or x402 payments. Prefer wallet tools over shell commands. Preview writes first and execute only after explicit user confirmation."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Agent Wallet Operator
|
|
6
|
+
|
|
7
|
+
Use this skill when the user wants Claude Code to work with the existing local AgentLayer wallet.
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
|
|
11
|
+
- Do not create a new wallet unless the user explicitly requests wallet provisioning.
|
|
12
|
+
- Prefer wallet tools over shelling out to chain CLIs, curl, or ad hoc scripts.
|
|
13
|
+
- For writes, start with `preview` or `intent_preview` when the tool supports it.
|
|
14
|
+
- Execute only after the user explicitly confirms the shown summary.
|
|
15
|
+
- On mainnet, restate the network, asset, amount, and destination before execute.
|
|
16
|
+
- Do not ask the user for `approval_token`. The bridge manages approval binding internally.
|
|
17
|
+
- If approval context is missing or stale, repeat preview instead of improvising.
|
|
18
|
+
- Use `set_wallet_backend` to switch between Solana, EVM, and Bitcoin wallets within a session.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-wallet",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Codex plugin bridge for the AgentLayer wallet runtime.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "AgentLayer"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/lopushok9/Agent-Layer",
|
|
9
|
+
"repository": "https://github.com/lopushok9/Agent-Layer",
|
|
10
|
+
"license": "SEE LICENSE IN ../../../LICENSE",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"codex",
|
|
13
|
+
"wallet",
|
|
14
|
+
"solana",
|
|
15
|
+
"bitcoin",
|
|
16
|
+
"evm",
|
|
17
|
+
"agentlayer"
|
|
18
|
+
],
|
|
19
|
+
"skills": "./skills/",
|
|
20
|
+
"mcpServers": "./.mcp.json",
|
|
21
|
+
"interface": {
|
|
22
|
+
"displayName": "Agent Wallet",
|
|
23
|
+
"shortDescription": "Use the local AgentLayer wallet runtime directly in Codex",
|
|
24
|
+
"longDescription": "Agent Wallet adds the existing local AgentLayer wallet runtime to Codex without creating a new wallet. It reuses the current OpenClaw runtime, keeps secrets local, and exposes the same Solana, Bitcoin, EVM, x402, Jupiter, Kamino, LI.FI, Bags, and Flash Trade tool surface through a Codex-native MCP bridge.",
|
|
25
|
+
"developerName": "AgentLayer",
|
|
26
|
+
"category": "Coding",
|
|
27
|
+
"capabilities": [
|
|
28
|
+
"Interactive",
|
|
29
|
+
"Read",
|
|
30
|
+
"Write"
|
|
31
|
+
],
|
|
32
|
+
"websiteURL": "https://github.com/lopushok9/Agent-Layer",
|
|
33
|
+
"privacyPolicyURL": "https://openai.com/policies/privacy-policy/",
|
|
34
|
+
"termsOfServiceURL": "https://openai.com/policies/terms-of-use/",
|
|
35
|
+
"defaultPrompt": "Use my existing AgentLayer wallet here in Codex, preview wallet writes first, and execute only after explicit confirmation.",
|
|
36
|
+
"brandColor": "#0F766E"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"agent-wallet": {
|
|
4
|
+
"command": "sh",
|
|
5
|
+
"args": [
|
|
6
|
+
"-lc",
|
|
7
|
+
"exec \"${AGENT_WALLET_CODEX_PLUGIN_ROOT:-$HOME/plugins}/agent-wallet/scripts/run_mcp.sh\""
|
|
8
|
+
],
|
|
9
|
+
"env": {
|
|
10
|
+
"FASTMCP_SHOW_SERVER_BANNER": "false",
|
|
11
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Agent Wallet Codex Plugin
|
|
2
|
+
|
|
3
|
+
This plugin adds the existing local AgentLayer wallet runtime to Codex.
|
|
4
|
+
|
|
5
|
+
It does not create a new wallet. It reuses the current runtime under:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
~/.openclaw/agent-wallet-runtime/current/agent-wallet
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Primary design rules:
|
|
12
|
+
|
|
13
|
+
- keep wallet policy, approvals, and signing in `agent-wallet/`
|
|
14
|
+
- keep this plugin as a thin MCP bridge for Codex
|
|
15
|
+
- reuse the same wallets, networks, and tool surface already used by OpenClaw and Hermes
|
|
16
|
+
- avoid secrets in plugin config or marketplace metadata
|
|
17
|
+
|
|
18
|
+
## What it exposes
|
|
19
|
+
|
|
20
|
+
- direct wallet tools for Solana, Bitcoin, and EVM
|
|
21
|
+
- session wallet selection with `set_wallet_backend`
|
|
22
|
+
- EVM network selection with `set_evm_network`
|
|
23
|
+
- auto-managed approval binding for `preview -> execute` write flows
|
|
24
|
+
|
|
25
|
+
## Runtime requirements
|
|
26
|
+
|
|
27
|
+
- install the AgentLayer runtime first with `npx @agentlayer.tech/wallet install --yes`
|
|
28
|
+
- keep the local wallet files and `~/.openclaw/sealed_keys.json` in place
|
|
29
|
+
- use `wallet codex install --yes` to install this plugin into Codex
|
|
30
|
+
|
|
31
|
+
## Path resolution
|
|
32
|
+
|
|
33
|
+
The bridge resolves the wallet runtime from:
|
|
34
|
+
|
|
35
|
+
1. `AGENT_WALLET_PACKAGE_ROOT`
|
|
36
|
+
2. `OPENCLAW_AGENT_WALLET_PACKAGE_ROOT`
|
|
37
|
+
3. `~/.openclaw/agent-wallet-runtime/current/agent-wallet`
|
|
38
|
+
|
|
39
|
+
If the runtime lives elsewhere, set one of the env overrides before starting Codex.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
5
|
+
PLUGIN_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
|
6
|
+
OPENCLAW_HOME=${OPENCLAW_HOME:-"$HOME/.openclaw"}
|
|
7
|
+
PACKAGE_ROOT=${AGENT_WALLET_PACKAGE_ROOT:-${OPENCLAW_AGENT_WALLET_PACKAGE_ROOT:-"$OPENCLAW_HOME/agent-wallet-runtime/current/agent-wallet"}}
|
|
8
|
+
|
|
9
|
+
if [ -n "${AGENT_WALLET_PYTHON:-}" ]; then
|
|
10
|
+
PYTHON_BIN=$AGENT_WALLET_PYTHON
|
|
11
|
+
elif [ -n "${OPENCLAW_AGENT_WALLET_PYTHON:-}" ]; then
|
|
12
|
+
PYTHON_BIN=$OPENCLAW_AGENT_WALLET_PYTHON
|
|
13
|
+
elif [ -x "$PACKAGE_ROOT/.venv/bin/python" ]; then
|
|
14
|
+
PYTHON_BIN=$PACKAGE_ROOT/.venv/bin/python
|
|
15
|
+
elif [ -x "$PACKAGE_ROOT/.runtime-venv/bin/python" ]; then
|
|
16
|
+
PYTHON_BIN=$PACKAGE_ROOT/.runtime-venv/bin/python
|
|
17
|
+
else
|
|
18
|
+
PYTHON_BIN=python3
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
exec "$PYTHON_BIN" "$PLUGIN_ROOT/server.py"
|