@agentlayer.tech/wallet 0.1.75 → 0.1.77
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 -4
- package/.openclaw/extensions/agent-wallet/dist/index.js +57 -19
- package/.openclaw/extensions/agent-wallet/index.ts +57 -19
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +1 -1
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/CHANGELOG.md +19 -0
- package/VERSION +1 -1
- package/agent-wallet/AGENTS.md +1 -0
- package/agent-wallet/UPGRADE_COMPATIBILITY.md +36 -0
- package/agent-wallet/agent_wallet/__init__.py +1 -1
- package/agent-wallet/agent_wallet/autonomous_permissions.py +2 -2
- package/agent-wallet/agent_wallet/autonomous_policy.py +1 -1
- package/agent-wallet/agent_wallet/boot_key_recovery.py +10 -1
- package/agent-wallet/agent_wallet/config.py +3 -3
- package/agent-wallet/agent_wallet/openclaw_adapter.py +24 -24
- package/agent-wallet/agent_wallet/providers/evm_portfolio.py +2 -2
- package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +2 -2
- package/agent-wallet/openclaw.plugin.json +1 -1
- package/agent-wallet/pyproject.toml +1 -1
- package/agent-wallet/skills/wallet-operator/SKILL.md +4 -1
- package/bin/lib/boot-key.mjs +185 -0
- package/bin/lib/integrations.mjs +424 -0
- package/bin/lib/update-transaction.mjs +235 -0
- package/bin/openclaw-agent-wallet.mjs +225 -520
- package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +1 -1
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +1 -1
- package/codex/plugins/agent-wallet/server.py +13 -10
- package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +1 -1
- package/hermes/plugins/agent_wallet/plugin.yaml +1 -1
- package/package.json +2 -1
- package/wdk-btc-wallet/package.json +1 -1
- package/wdk-evm-wallet/.env.example +3 -2
- package/wdk-evm-wallet/package.json +5 -2
- package/wdk-evm-wallet/src/config.js +16 -2
- package/wdk-evm-wallet/src/network_state.js +5 -2
- package/wdk-evm-wallet/src/wdk_evm_wallet.js +10 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-wallet",
|
|
3
3
|
"displayName": "Agent Wallet",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.77",
|
|
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"
|
|
@@ -370,6 +370,7 @@ def _normalize_wallet_backend(value: Any) -> str:
|
|
|
370
370
|
"ethereum": "wdk_evm_local",
|
|
371
371
|
"eth": "wdk_evm_local",
|
|
372
372
|
"base": "wdk_evm_local",
|
|
373
|
+
"robinhood": "wdk_evm_local",
|
|
373
374
|
"wdk_evm_local": "wdk_evm_local",
|
|
374
375
|
"wdk-evm-local": "wdk_evm_local",
|
|
375
376
|
"evm_local": "wdk_evm_local",
|
|
@@ -383,7 +384,7 @@ def _normalize_wallet_backend(value: Any) -> str:
|
|
|
383
384
|
}
|
|
384
385
|
backend = aliases.get(normalized, normalized)
|
|
385
386
|
if backend not in BACKENDS:
|
|
386
|
-
raise RuntimeError("Wallet backend must be solana, evm, base,
|
|
387
|
+
raise RuntimeError("Wallet backend must be solana, evm, ethereum, base, robinhood, btc, or bitcoin.")
|
|
387
388
|
return backend
|
|
388
389
|
|
|
389
390
|
|
|
@@ -409,9 +410,9 @@ def _normalize_evm_network(value: Any) -> str:
|
|
|
409
410
|
def _normalize_selectable_evm_network(value: Any) -> str:
|
|
410
411
|
network = _normalize_evm_network(value)
|
|
411
412
|
if network in {"sepolia", "base-sepolia", "base_sepolia"}:
|
|
412
|
-
raise RuntimeError("EVM testnets are no longer supported. Use ethereum or
|
|
413
|
-
if network not in {"ethereum", "base"}:
|
|
414
|
-
raise RuntimeError("EVM network must be 'ethereum' or '
|
|
413
|
+
raise RuntimeError("EVM testnets are no longer supported. Use ethereum, base, or robinhood.")
|
|
414
|
+
if network not in {"ethereum", "base", "robinhood"}:
|
|
415
|
+
raise RuntimeError("EVM network must be 'ethereum', 'base', or 'robinhood'.")
|
|
415
416
|
return network
|
|
416
417
|
|
|
417
418
|
|
|
@@ -419,6 +420,8 @@ def _implied_evm_network_from_backend_alias(value: Any) -> str | None:
|
|
|
419
420
|
normalized = str(value or "").strip().lower()
|
|
420
421
|
if normalized in {"base", "base-mainnet"}:
|
|
421
422
|
return "base"
|
|
423
|
+
if normalized == "robinhood":
|
|
424
|
+
return "robinhood"
|
|
422
425
|
if normalized in {"ethereum", "eth", "mainnet", "eth-mainnet"}:
|
|
423
426
|
return "ethereum"
|
|
424
427
|
return None
|
|
@@ -471,7 +474,7 @@ def _default_backend() -> str:
|
|
|
471
474
|
|
|
472
475
|
def _default_evm_network() -> str | None:
|
|
473
476
|
configured = _normalize_evm_network(os.getenv("WDK_EVM_NETWORK"))
|
|
474
|
-
if configured in {"ethereum", "base"}:
|
|
477
|
+
if configured in {"ethereum", "base", "robinhood"}:
|
|
475
478
|
return configured
|
|
476
479
|
return _configured_network_for_backend("wdk_evm_local")
|
|
477
480
|
|
|
@@ -1205,11 +1208,11 @@ def _manual_tool_definitions() -> list[dict[str, Any]]:
|
|
|
1205
1208
|
"properties": {
|
|
1206
1209
|
"backend": {
|
|
1207
1210
|
"type": "string",
|
|
1208
|
-
"description": "solana, evm, base,
|
|
1211
|
+
"description": "solana, evm, ethereum, base, robinhood, btc, or bitcoin.",
|
|
1209
1212
|
},
|
|
1210
1213
|
"network": {
|
|
1211
1214
|
"type": "string",
|
|
1212
|
-
"description": "Optional network override. Use base or
|
|
1215
|
+
"description": "Optional network override. Use ethereum, base, or robinhood for EVM.",
|
|
1213
1216
|
},
|
|
1214
1217
|
"address": {
|
|
1215
1218
|
"type": "string",
|
|
@@ -1244,7 +1247,7 @@ def _manual_tool_definitions() -> list[dict[str, Any]]:
|
|
|
1244
1247
|
"properties": {
|
|
1245
1248
|
"backend": {
|
|
1246
1249
|
"type": "string",
|
|
1247
|
-
"description": "solana, evm, base,
|
|
1250
|
+
"description": "solana, evm, ethereum, base, robinhood, btc, or bitcoin.",
|
|
1248
1251
|
},
|
|
1249
1252
|
"wallet": {
|
|
1250
1253
|
"type": "string",
|
|
@@ -1262,14 +1265,14 @@ def _manual_tool_definitions() -> list[dict[str, Any]]:
|
|
|
1262
1265
|
{
|
|
1263
1266
|
"name": "set_evm_network",
|
|
1264
1267
|
"description": (
|
|
1265
|
-
"Set the active EVM network for this Codex MCP session to ethereum or
|
|
1268
|
+
"Set the active EVM network for this Codex MCP session to ethereum, base, or robinhood."
|
|
1266
1269
|
),
|
|
1267
1270
|
"input_schema": {
|
|
1268
1271
|
"type": "object",
|
|
1269
1272
|
"properties": {
|
|
1270
1273
|
"network": {
|
|
1271
1274
|
"type": "string",
|
|
1272
|
-
"description": "ethereum or
|
|
1275
|
+
"description": "ethereum, base, or robinhood.",
|
|
1273
1276
|
}
|
|
1274
1277
|
},
|
|
1275
1278
|
"required": ["network"],
|
|
@@ -16,4 +16,4 @@ Rules:
|
|
|
16
16
|
- On mainnet, restate the network, asset, amount, and destination before execute.
|
|
17
17
|
- Do not ask the user for `approval_token`. The bridge manages approval binding internally.
|
|
18
18
|
- If approval context is missing or stale, repeat preview instead of improvising.
|
|
19
|
-
- Use `set_wallet_backend` to switch between Solana, EVM, and Bitcoin wallets within a session, and `set_evm_network` to pick ethereum or
|
|
19
|
+
- Use `set_wallet_backend` to switch between Solana, EVM, and Bitcoin wallets within a session, and `set_evm_network` to pick ethereum, base, or robinhood.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentlayer.tech/wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.77",
|
|
4
4
|
"description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"agent-wallet/.env.example",
|
|
44
44
|
"agent-wallet/AGENTS.md",
|
|
45
45
|
"agent-wallet/README.md",
|
|
46
|
+
"agent-wallet/UPGRADE_COMPATIBILITY.md",
|
|
46
47
|
"agent-wallet/openclaw.plugin.json",
|
|
47
48
|
"agent-wallet/pyproject.toml",
|
|
48
49
|
".openclaw/AGENTS.md",
|
|
@@ -10,14 +10,15 @@ WDK_EVM_RPC_PROVIDER_MODE=gateway
|
|
|
10
10
|
WDK_EVM_RPC_GATEWAY_PROVIDER=alchemy
|
|
11
11
|
PROVIDER_GATEWAY_URL=https://agent-layer-production.up.railway.app
|
|
12
12
|
PROVIDER_GATEWAY_BEARER_TOKEN=
|
|
13
|
-
# Mainnet ethereum/base are forced through provider-gateway -> Alchemy.
|
|
13
|
+
# Mainnet ethereum/base/robinhood are forced through provider-gateway -> Alchemy.
|
|
14
14
|
# Direct per-network URLs below are only relevant for testnet-style paths.
|
|
15
15
|
WDK_EVM_ETHEREUM_RPC_URL=
|
|
16
16
|
WDK_EVM_SEPOLIA_RPC_URL=https://sepolia.drpc.org
|
|
17
17
|
WDK_EVM_BASE_RPC_URL=
|
|
18
18
|
WDK_EVM_BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
|
|
19
|
+
WDK_EVM_ROBINHOOD_RPC_URL=
|
|
19
20
|
MORPHO_API_BASE_URL=https://api.morpho.org/graphql
|
|
20
|
-
# Uniswap Trading API swap provider (ethereum/base, CLASSIC routing).
|
|
21
|
+
# Uniswap Trading API swap provider (ethereum/base/robinhood, CLASSIC routing).
|
|
21
22
|
# Uniswap Trading API. By default the daemon routes quotes/swaps through the
|
|
22
23
|
# provider gateway (PROVIDER_GATEWAY_URL/v1/evm/uniswap), which holds the Uniswap
|
|
23
24
|
# key and authenticates via the gateway bearer — so no UNISWAP_API_KEY is needed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wdk-evm-wallet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.77",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Separate EVM wallet service built on Tether WDK.",
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
"test:lido-runtime": "node --test --test-concurrency=1 tests/smoke_lido_runtime.mjs",
|
|
16
16
|
"test:uniswap-runtime": "node --test --test-concurrency=1 tests/smoke_uniswap_runtime.mjs",
|
|
17
17
|
"test:unit": "node --test tests/unit_uniswap_helpers.mjs",
|
|
18
|
-
"test:identity": "node --test tests/unit_instance_identity.mjs"
|
|
18
|
+
"test:identity": "node --test tests/unit_instance_identity.mjs",
|
|
19
|
+
"test:network-config": "node --test tests/unit_network_config.mjs",
|
|
20
|
+
"test:network-state": "node --test tests/unit_network_state.mjs",
|
|
21
|
+
"test:wallet-network": "node --test tests/unit_wdk_wallet_network.mjs"
|
|
19
22
|
},
|
|
20
23
|
"dependencies": {
|
|
21
24
|
"@morpho-org/morpho-sdk": "^3.2.0",
|
|
@@ -27,7 +27,7 @@ function readPackageVersion() {
|
|
|
27
27
|
|
|
28
28
|
const PACKAGE_VERSION = readPackageVersion();
|
|
29
29
|
const DEFAULT_PROVIDER_GATEWAY_URL = "https://agent-layer-production.up.railway.app";
|
|
30
|
-
const ENFORCED_GATEWAY_MAINNETS = new Set(["ethereum", "base"]);
|
|
30
|
+
const ENFORCED_GATEWAY_MAINNETS = new Set(["ethereum", "base", "robinhood"]);
|
|
31
31
|
|
|
32
32
|
const DEFAULT_NETWORK_PROFILES = {
|
|
33
33
|
ethereum: {
|
|
@@ -50,6 +50,11 @@ const DEFAULT_NETWORK_PROFILES = {
|
|
|
50
50
|
providerUrl: "https://sepolia.base.org",
|
|
51
51
|
nativeSymbol: "ETH",
|
|
52
52
|
},
|
|
53
|
+
robinhood: {
|
|
54
|
+
chainId: 4663,
|
|
55
|
+
providerUrl: "https://rpc.mainnet.chain.robinhood.com",
|
|
56
|
+
nativeSymbol: "ETH",
|
|
57
|
+
},
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
const SUPPORTED_GATEWAY_PROVIDERS = new Set(["auto", "shared", "alchemy"]);
|
|
@@ -179,6 +184,7 @@ function normalizeNetworkKey(value) {
|
|
|
179
184
|
"eth-mainnet": "ethereum",
|
|
180
185
|
"base-mainnet": "base",
|
|
181
186
|
base_sepolia: "base-sepolia",
|
|
187
|
+
"robinhood-mainnet": "robinhood",
|
|
182
188
|
};
|
|
183
189
|
return aliases[normalized] || normalized;
|
|
184
190
|
}
|
|
@@ -211,7 +217,7 @@ export function loadConfig(env = process.env) {
|
|
|
211
217
|
const network = normalizeNetworkKey(env.WDK_EVM_NETWORK ?? DEFAULTS.network) || DEFAULTS.network;
|
|
212
218
|
if (!Object.hasOwn(DEFAULT_NETWORK_PROFILES, network)) {
|
|
213
219
|
throw new Error(
|
|
214
|
-
"WDK_EVM_NETWORK must be one of: ethereum, sepolia, base, base-sepolia."
|
|
220
|
+
"WDK_EVM_NETWORK must be one of: ethereum, sepolia, base, base-sepolia, robinhood."
|
|
215
221
|
);
|
|
216
222
|
}
|
|
217
223
|
|
|
@@ -295,6 +301,14 @@ export function loadConfig(env = process.env) {
|
|
|
295
301
|
DEFAULT_NETWORK_PROFILES["base-sepolia"].providerUrl
|
|
296
302
|
),
|
|
297
303
|
},
|
|
304
|
+
robinhood: {
|
|
305
|
+
...DEFAULT_NETWORK_PROFILES.robinhood,
|
|
306
|
+
providerUrl: resolveProviderUrl(
|
|
307
|
+
"robinhood",
|
|
308
|
+
env.WDK_EVM_ROBINHOOD_RPC_URL,
|
|
309
|
+
DEFAULT_NETWORK_PROFILES.robinhood.providerUrl
|
|
310
|
+
),
|
|
311
|
+
},
|
|
298
312
|
};
|
|
299
313
|
|
|
300
314
|
// Route Uniswap Trading API calls through the provider-gateway by default so the
|
|
@@ -11,10 +11,13 @@ function assertValidNetwork(network, fieldName = "network") {
|
|
|
11
11
|
"eth-mainnet": "ethereum",
|
|
12
12
|
"base-mainnet": "base",
|
|
13
13
|
base_sepolia: "base-sepolia",
|
|
14
|
+
"robinhood-mainnet": "robinhood",
|
|
14
15
|
};
|
|
15
16
|
const effective = aliases[normalized] || normalized;
|
|
16
|
-
if (!["ethereum", "sepolia", "base", "base-sepolia"].includes(effective)) {
|
|
17
|
-
throw new Error(
|
|
17
|
+
if (!["ethereum", "sepolia", "base", "base-sepolia", "robinhood"].includes(effective)) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood.`
|
|
20
|
+
);
|
|
18
21
|
}
|
|
19
22
|
return effective;
|
|
20
23
|
}
|
|
@@ -22,11 +22,12 @@ const DEFAULT_SWAP_SLIPPAGE_BPS = 100;
|
|
|
22
22
|
const DEFAULT_LIFI_SLIPPAGE = 0.005;
|
|
23
23
|
const ALWAYS_DENIED_LIFI_BRIDGES = ["mayan"];
|
|
24
24
|
const PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
25
|
-
const UNISWAP_SUPPORTED_CHAIN_IDS = { ethereum: 1, base: 8453 };
|
|
25
|
+
const UNISWAP_SUPPORTED_CHAIN_IDS = { ethereum: 1, base: 8453, robinhood: 4663 };
|
|
26
26
|
// Universal Router v2.0 allow-list (defense-in-depth: /swap response `to` must match).
|
|
27
27
|
const UNISWAP_UNIVERSAL_ROUTER_BY_NETWORK = {
|
|
28
28
|
ethereum: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
|
|
29
29
|
base: "0x6ff5693b99212da76ad316178a184ab56d299b43",
|
|
30
|
+
robinhood: "0x8876789976decbfcbbbe364623c63652db8c0904",
|
|
30
31
|
};
|
|
31
32
|
const AAVE_RAY = 10n ** 27n;
|
|
32
33
|
const LIDO_STETH_DECIMALS = 18;
|
|
@@ -502,10 +503,13 @@ function assertValidNetwork(network, fieldName = "network") {
|
|
|
502
503
|
eth: "ethereum",
|
|
503
504
|
"base-mainnet": "base",
|
|
504
505
|
base_sepolia: "base-sepolia",
|
|
506
|
+
"robinhood-mainnet": "robinhood",
|
|
505
507
|
};
|
|
506
508
|
const effective = aliases[normalized] || normalized;
|
|
507
|
-
if (!["ethereum", "sepolia", "base", "base-sepolia"].includes(effective)) {
|
|
508
|
-
throw new Error(
|
|
509
|
+
if (!["ethereum", "sepolia", "base", "base-sepolia", "robinhood"].includes(effective)) {
|
|
510
|
+
throw new Error(
|
|
511
|
+
`${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood.`
|
|
512
|
+
);
|
|
509
513
|
}
|
|
510
514
|
return effective;
|
|
511
515
|
}
|
|
@@ -847,7 +851,7 @@ function assertUniswapSupportedNetwork(network) {
|
|
|
847
851
|
const chainId = UNISWAP_SUPPORTED_CHAIN_IDS[network];
|
|
848
852
|
if (!chainId) {
|
|
849
853
|
throw new Error(
|
|
850
|
-
"Uniswap Trading API swaps are currently supported only on ethereum and
|
|
854
|
+
"Uniswap Trading API swaps are currently supported only on ethereum, base, and robinhood mainnet."
|
|
851
855
|
);
|
|
852
856
|
}
|
|
853
857
|
return chainId;
|
|
@@ -7558,8 +7562,10 @@ export class WdkEvmWalletService {
|
|
|
7558
7562
|
export const __testables = {
|
|
7559
7563
|
PERMIT2_ADDRESS,
|
|
7560
7564
|
UNISWAP_SUPPORTED_CHAIN_IDS,
|
|
7565
|
+
UNISWAP_UNIVERSAL_ROUTER_BY_NETWORK,
|
|
7561
7566
|
normalizeUniswapTokenAddress,
|
|
7562
7567
|
assertUniswapSupportedNetwork,
|
|
7568
|
+
assertValidNetwork,
|
|
7563
7569
|
uniswapSlippagePercentFromBps,
|
|
7564
7570
|
normalizeUniswapPermitData,
|
|
7565
7571
|
};
|