@agentlayer.tech/wallet 0.1.68 → 0.1.70
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/dist/index.js +82 -0
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +1 -1
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/CHANGELOG.md +23 -0
- package/VERSION +1 -1
- package/agent-wallet/agent_wallet/__init__.py +1 -1
- package/agent-wallet/agent_wallet/evm_user_wallets.py +42 -9
- package/agent-wallet/openclaw.plugin.json +1 -1
- package/agent-wallet/pyproject.toml +1 -1
- package/agent-wallet/scripts/bootstrap_openclaw_evm.py +2 -4
- package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +1 -1
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +1 -1
- package/hermes/plugins/agent_wallet/plugin.yaml +1 -1
- package/package.json +3 -1
- package/wdk-btc-wallet/.env.example +41 -0
- package/wdk-btc-wallet/package.json +1 -1
- package/wdk-evm-wallet/.env.example +29 -0
- package/wdk-evm-wallet/package.json +1 -1
|
@@ -984,6 +984,54 @@ const solanaToolDefinitions = [
|
|
|
984
984
|
additionalProperties: false,
|
|
985
985
|
},
|
|
986
986
|
},
|
|
987
|
+
{
|
|
988
|
+
name: "get_kamino_portfolio",
|
|
989
|
+
description:
|
|
990
|
+
"Get the unified Kamino portfolio view for a Solana wallet on mainnet across lending, multiply, leverage, liquidity, earn, and staking.",
|
|
991
|
+
parameters: {
|
|
992
|
+
type: "object",
|
|
993
|
+
properties: {
|
|
994
|
+
user: {
|
|
995
|
+
type: "string",
|
|
996
|
+
description: "Optional Solana wallet address override.",
|
|
997
|
+
},
|
|
998
|
+
},
|
|
999
|
+
additionalProperties: false,
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
name: "get_kamino_vaults",
|
|
1004
|
+
description: "List Kamino Earn vaults currently available on Solana mainnet.",
|
|
1005
|
+
parameters: { type: "object", properties: {}, additionalProperties: false },
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: "get_kamino_earn_positions",
|
|
1009
|
+
description: "Get Kamino Earn vault positions for a Solana wallet on mainnet.",
|
|
1010
|
+
parameters: {
|
|
1011
|
+
type: "object",
|
|
1012
|
+
properties: {
|
|
1013
|
+
user: {
|
|
1014
|
+
type: "string",
|
|
1015
|
+
description: "Optional Solana wallet address override.",
|
|
1016
|
+
},
|
|
1017
|
+
},
|
|
1018
|
+
additionalProperties: false,
|
|
1019
|
+
},
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: "get_kamino_liquidity_positions",
|
|
1023
|
+
description: "Get Kamino Liquidity strategy positions for a Solana wallet on mainnet.",
|
|
1024
|
+
parameters: {
|
|
1025
|
+
type: "object",
|
|
1026
|
+
properties: {
|
|
1027
|
+
user: {
|
|
1028
|
+
type: "string",
|
|
1029
|
+
description: "Optional Solana wallet address override.",
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
additionalProperties: false,
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
987
1035
|
{
|
|
988
1036
|
name: "get_kamino_lend_markets",
|
|
989
1037
|
description: "List Kamino lending markets currently available on Solana mainnet.",
|
|
@@ -1277,6 +1325,40 @@ const solanaToolDefinitions = [
|
|
|
1277
1325
|
additionalProperties: false,
|
|
1278
1326
|
},
|
|
1279
1327
|
},
|
|
1328
|
+
{
|
|
1329
|
+
name: "kamino_earn_deposit",
|
|
1330
|
+
description: "Preview, prepare, or execute a Kamino Earn vault deposit using a decimal token amount. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",
|
|
1331
|
+
optional: true,
|
|
1332
|
+
parameters: {
|
|
1333
|
+
type: "object",
|
|
1334
|
+
properties: {
|
|
1335
|
+
kvault: { type: "string" },
|
|
1336
|
+
amount_ui: { type: "string" },
|
|
1337
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1338
|
+
purpose: { type: "string" },
|
|
1339
|
+
user_intent: { type: "boolean" },
|
|
1340
|
+
},
|
|
1341
|
+
required: ["kvault", "amount_ui", "mode", "purpose"],
|
|
1342
|
+
additionalProperties: false,
|
|
1343
|
+
},
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
name: "kamino_earn_withdraw",
|
|
1347
|
+
description: "Preview, prepare, or execute a Kamino Earn vault withdraw using a decimal token amount. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",
|
|
1348
|
+
optional: true,
|
|
1349
|
+
parameters: {
|
|
1350
|
+
type: "object",
|
|
1351
|
+
properties: {
|
|
1352
|
+
kvault: { type: "string" },
|
|
1353
|
+
amount_ui: { type: "string" },
|
|
1354
|
+
mode: { type: "string", enum: ["preview", "prepare", "execute"] },
|
|
1355
|
+
purpose: { type: "string" },
|
|
1356
|
+
user_intent: { type: "boolean" },
|
|
1357
|
+
},
|
|
1358
|
+
required: ["kvault", "amount_ui", "mode", "purpose"],
|
|
1359
|
+
additionalProperties: false,
|
|
1360
|
+
},
|
|
1361
|
+
},
|
|
1280
1362
|
{
|
|
1281
1363
|
name: "flash_trade_open_position",
|
|
1282
1364
|
description: "Preview, prepare, or execute a Flash Trade perpetual open on Solana mainnet using a supported Flash collateral.",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "agent-wallet",
|
|
3
3
|
"name": "Agent Wallet",
|
|
4
4
|
"description": "Official OpenClaw plugin bridge for the agent-wallet backends, including Solana, local BTC, and local EVM.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.70",
|
|
6
6
|
"contracts": {
|
|
7
7
|
"tools": [
|
|
8
8
|
"agentlayer_autonomous_approve",
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Fixed the npm `files` allowlist dropping `.env.example` for `wdk-evm-wallet`
|
|
6
|
+
and `wdk-btc-wallet`. Both templates are tracked in git and correctly
|
|
7
|
+
un-ignored (`!.env.example` in `.gitignore`), but the root `package.json`
|
|
8
|
+
`files` list enumerated each wdk package's shipped files individually and
|
|
9
|
+
omitted `.env.example` (unlike the `agent-wallet/.env.example` entry, which
|
|
10
|
+
was listed correctly). On a machine with no pre-existing `.env`,
|
|
11
|
+
`run-local.sh`'s self-heal (`cp .env.example .env`) failed under `set -eu`,
|
|
12
|
+
and the Python bridge surfaced this as an opaque "wdk-evm-wallet exited
|
|
13
|
+
before becoming healthy" with no indication that the template file itself
|
|
14
|
+
was missing from the installed package.
|
|
15
|
+
- `package.json`
|
|
16
|
+
|
|
17
|
+
- Fixed local EVM autostart incorrectly trusting any healthy same-version
|
|
18
|
+
`wdk-evm-wallet` already listening on the shared localhost port. If a temp or
|
|
19
|
+
alternate `OPENCLAW_HOME` had left a daemon running, host runtimes could hit
|
|
20
|
+
`Unauthorized` because the daemon served a different `dataDir` and bearer
|
|
21
|
+
token than the current install expected. Local EVM startup now also validates
|
|
22
|
+
the reported `dataDir` from `/health` and restarts mismatched daemons before
|
|
23
|
+
issuing authenticated requests.
|
|
24
|
+
- `agent-wallet/agent_wallet/evm_user_wallets.py`
|
|
25
|
+
- `agent-wallet/scripts/bootstrap_openclaw_evm.py`
|
|
26
|
+
- `agent-wallet/tests/smoke_openclaw_evm_runtime_restart_wrong_home.py`
|
|
27
|
+
|
|
5
28
|
## v0.1.62 - 2026-07-04
|
|
6
29
|
|
|
7
30
|
- Made default boot-key storage prompt-free on macOS. The automatic keystore
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.70
|
|
@@ -86,6 +86,43 @@ def _read_on_disk_service_version(wallet_root: Path) -> str | None:
|
|
|
86
86
|
return version or None
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
def _expected_local_service_data_dir() -> Path:
|
|
90
|
+
configured = os.getenv("WDK_EVM_DATA_DIR", "").strip()
|
|
91
|
+
if configured:
|
|
92
|
+
return Path(configured).expanduser().resolve()
|
|
93
|
+
return (resolve_openclaw_home() / "wdk-evm-wallet").resolve()
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def _same_path(left: str | Path | None, right: str | Path | None) -> bool:
|
|
97
|
+
if left is None or right is None:
|
|
98
|
+
return False
|
|
99
|
+
try:
|
|
100
|
+
left_path = Path(str(left)).expanduser().resolve()
|
|
101
|
+
right_path = Path(str(right)).expanduser().resolve()
|
|
102
|
+
except OSError:
|
|
103
|
+
return False
|
|
104
|
+
return left_path == right_path
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def _should_restart_local_service(
|
|
108
|
+
health: dict[str, Any] | None,
|
|
109
|
+
*,
|
|
110
|
+
wallet_root: Path | None,
|
|
111
|
+
) -> bool:
|
|
112
|
+
if health is None:
|
|
113
|
+
return False
|
|
114
|
+
expected_version = _read_on_disk_service_version(wallet_root) if wallet_root is not None else None
|
|
115
|
+
running_version = str(health.get("version") or "").strip()
|
|
116
|
+
if expected_version and running_version and running_version != expected_version:
|
|
117
|
+
return True
|
|
118
|
+
|
|
119
|
+
reported_data_dir = str(health.get("dataDir") or "").strip()
|
|
120
|
+
if reported_data_dir and not _same_path(reported_data_dir, _expected_local_service_data_dir()):
|
|
121
|
+
return True
|
|
122
|
+
|
|
123
|
+
return False
|
|
124
|
+
|
|
125
|
+
|
|
89
126
|
def _listening_pids(port: int) -> list[int]:
|
|
90
127
|
"""PIDs LISTENing on a local TCP port (via lsof), excluding our own."""
|
|
91
128
|
lsof = shutil.which("lsof")
|
|
@@ -177,18 +214,14 @@ def _auto_start_local_service(service_url: str, network: str) -> None:
|
|
|
177
214
|
health = _service_health(service_url)
|
|
178
215
|
if health is not None:
|
|
179
216
|
# Already running. The daemon loads code once at boot (no hot-reload), so a
|
|
180
|
-
# long-running process keeps serving stale code after a release.
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
217
|
+
# long-running process keeps serving stale code after a release. It can also
|
|
218
|
+
# keep serving the wrong local vault after a temp/smoke install left another
|
|
219
|
+
# daemon on the shared localhost port. Restart only when the local daemon no
|
|
220
|
+
# longer matches the expected launcher version or expected dataDir. Remote
|
|
184
221
|
# (non-local) healthy services we don't manage are left untouched.
|
|
185
222
|
if not _is_local_service_url(service_url):
|
|
186
223
|
return
|
|
187
|
-
|
|
188
|
-
_read_on_disk_service_version(wallet_root) if wallet_root is not None else None
|
|
189
|
-
)
|
|
190
|
-
running_version = str(health.get("version") or "").strip()
|
|
191
|
-
if expected_version is None or running_version == expected_version:
|
|
224
|
+
if not _should_restart_local_service(health, wallet_root=wallet_root):
|
|
192
225
|
return
|
|
193
226
|
_stop_local_service(service_url)
|
|
194
227
|
if not _is_local_service_url(service_url):
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "agent-wallet",
|
|
3
3
|
"name": "Agent Wallet",
|
|
4
4
|
"description": "Plugin-friendly wallet backend for OpenClaw agents with safe wallet tools and runtime instructions across Solana, local BTC, and local EVM.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.70",
|
|
6
6
|
"skills": ["skills/wallet-operator"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -142,17 +142,15 @@ def _auto_start_local_service(
|
|
|
142
142
|
# steady state is a no-op. See agent_wallet.evm_user_wallets for the shared
|
|
143
143
|
# health/version/stop helpers.
|
|
144
144
|
from agent_wallet.evm_user_wallets import (
|
|
145
|
-
_read_on_disk_service_version,
|
|
146
145
|
_service_health,
|
|
146
|
+
_should_restart_local_service,
|
|
147
147
|
_stop_local_service,
|
|
148
148
|
)
|
|
149
149
|
|
|
150
150
|
restarted = False
|
|
151
151
|
health = _service_health(service_url)
|
|
152
152
|
if health is not None:
|
|
153
|
-
|
|
154
|
-
running_version = str(health.get("version") or "").strip()
|
|
155
|
-
if expected_version is None or running_version == expected_version:
|
|
153
|
+
if not _should_restart_local_service(health, wallet_root=wdk_wallet_root):
|
|
156
154
|
return {"started": False, "already_healthy": True}
|
|
157
155
|
_stop_local_service(service_url)
|
|
158
156
|
restarted = True
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-wallet",
|
|
3
3
|
"displayName": "Agent Wallet",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.70",
|
|
5
5
|
"description": "Claude Code bridge for the existing AgentLayer wallet runtime. Connects to Solana, Bitcoin, and EVM wallets without creating a new one.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "AgentLayer"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentlayer.tech/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.70",
|
|
4
4
|
"description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -56,12 +56,14 @@
|
|
|
56
56
|
"wdk-btc-wallet/README.md",
|
|
57
57
|
"wdk-btc-wallet/package.json",
|
|
58
58
|
"wdk-btc-wallet/package-lock.json",
|
|
59
|
+
"wdk-btc-wallet/.env.example",
|
|
59
60
|
"wdk-evm-wallet/src/",
|
|
60
61
|
"wdk-evm-wallet/bootstrap.sh",
|
|
61
62
|
"wdk-evm-wallet/run-local.sh",
|
|
62
63
|
"wdk-evm-wallet/README.md",
|
|
63
64
|
"wdk-evm-wallet/package.json",
|
|
64
65
|
"wdk-evm-wallet/package-lock.json",
|
|
66
|
+
"wdk-evm-wallet/.env.example",
|
|
65
67
|
"!agent-wallet/**/__pycache__/**",
|
|
66
68
|
"!agent-wallet/**/*.pyc",
|
|
67
69
|
"!hermes/**/__pycache__/**",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
HOST=127.0.0.1
|
|
2
|
+
PORT=8080
|
|
3
|
+
|
|
4
|
+
# Bitcoin network configuration from WDK docs:
|
|
5
|
+
# - bitcoin
|
|
6
|
+
# - testnet
|
|
7
|
+
# - regtest
|
|
8
|
+
# This is the initial active network. It can also be changed later via HTTP.
|
|
9
|
+
WDK_BTC_NETWORK=bitcoin
|
|
10
|
+
|
|
11
|
+
# Address derivation standard:
|
|
12
|
+
# - 84 for Native SegWit (default in current WDK BTC docs)
|
|
13
|
+
# - 44 for legacy compatibility
|
|
14
|
+
WDK_BTC_BIP=84
|
|
15
|
+
|
|
16
|
+
# Per-network Electrum profiles.
|
|
17
|
+
# Docs recommend your own Fulcrum/Electrum server for production.
|
|
18
|
+
WDK_BTC_BITCOIN_ELECTRUM_PROTOCOL=tcp
|
|
19
|
+
WDK_BTC_BITCOIN_ELECTRUM_HOST=electrum.blockstream.info
|
|
20
|
+
WDK_BTC_BITCOIN_ELECTRUM_PORT=50001
|
|
21
|
+
|
|
22
|
+
WDK_BTC_TESTNET_ELECTRUM_PROTOCOL=tcp
|
|
23
|
+
WDK_BTC_TESTNET_ELECTRUM_HOST=blockstream.info
|
|
24
|
+
WDK_BTC_TESTNET_ELECTRUM_PORT=143
|
|
25
|
+
|
|
26
|
+
WDK_BTC_REGTEST_ELECTRUM_PROTOCOL=tcp
|
|
27
|
+
WDK_BTC_REGTEST_ELECTRUM_HOST=127.0.0.1
|
|
28
|
+
WDK_BTC_REGTEST_ELECTRUM_PORT=60401
|
|
29
|
+
|
|
30
|
+
# Local encrypted vault directory for wallet registry + encrypted seed files.
|
|
31
|
+
WDK_BTC_DATA_DIR=
|
|
32
|
+
|
|
33
|
+
# Optional local auth token override.
|
|
34
|
+
# If unset, the service creates and reuses a token file under:
|
|
35
|
+
# ~/.openclaw/wdk-btc-wallet/local-auth-token
|
|
36
|
+
WDK_BTC_LOCAL_TOKEN=
|
|
37
|
+
WDK_BTC_LOCAL_TOKEN_PATH=
|
|
38
|
+
|
|
39
|
+
# How long unlocked wallets stay in memory.
|
|
40
|
+
# 0 means "stay unlocked until explicit lock or process restart".
|
|
41
|
+
WDK_BTC_UNLOCK_TIMEOUT_SECONDS=0
|
|
@@ -0,0 +1,29 @@
|
|
|
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 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
|
+
MORPHO_API_BASE_URL=https://api.morpho.org/graphql
|
|
20
|
+
# Uniswap Trading API swap provider (ethereum/base, CLASSIC routing).
|
|
21
|
+
# Uniswap Trading API. By default the daemon routes quotes/swaps through the
|
|
22
|
+
# provider gateway (PROVIDER_GATEWAY_URL/v1/evm/uniswap), which holds the Uniswap
|
|
23
|
+
# key and authenticates via the gateway bearer — so no UNISWAP_API_KEY is needed
|
|
24
|
+
# here. Only set UNISWAP_API_KEY + point UNISWAP_TRADING_API_BASE_URL at Uniswap
|
|
25
|
+
# directly (https://trade-api.gateway.uniswap.org/v1) for legacy/offline direct mode.
|
|
26
|
+
UNISWAP_API_KEY=
|
|
27
|
+
# UNISWAP_TRADING_API_BASE_URL= # defaults to PROVIDER_GATEWAY_URL/v1/evm/uniswap
|
|
28
|
+
UNISWAP_ROUTER_VERSION=2.0
|
|
29
|
+
UNISWAP_DEFAULT_SLIPPAGE_BPS=300
|