@agentlayer.tech/wallet 0.1.95 → 0.1.97

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 (34) hide show
  1. package/.openclaw/extensions/agent-wallet/README.md +2 -2
  2. package/.openclaw/extensions/agent-wallet/dist/index.js +33 -15
  3. package/.openclaw/extensions/agent-wallet/index.ts +33 -15
  4. package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +2 -2
  5. package/.openclaw/extensions/agent-wallet/package.json +1 -1
  6. package/VERSION +1 -1
  7. package/agent-wallet/README.md +3 -3
  8. package/agent-wallet/agent_wallet/__init__.py +1 -1
  9. package/agent-wallet/agent_wallet/autonomous_policy.py +2 -1
  10. package/agent-wallet/agent_wallet/config.py +7 -11
  11. package/agent-wallet/agent_wallet/networks.py +25 -0
  12. package/agent-wallet/agent_wallet/openclaw_adapter.py +43 -25
  13. package/agent-wallet/agent_wallet/providers/evm_portfolio.py +9 -2
  14. package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +1 -1
  15. package/agent-wallet/openclaw.plugin.json +1 -1
  16. package/agent-wallet/pyproject.toml +1 -1
  17. package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +1 -1
  18. package/claude-code/plugins/agent-wallet/AGENTLAYER_AGENT_GUIDE.md +3 -2
  19. package/claude-code/plugins/agent-wallet/README.md +3 -0
  20. package/claude-code/plugins/agent-wallet/commands/x402.md +98 -0
  21. package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +1 -1
  22. package/codex/plugins/agent-wallet/README.md +7 -2
  23. package/codex/plugins/agent-wallet/server.py +15 -11
  24. package/codex/plugins/agent-wallet/skills/wallet-operator/SKILL.md +1 -1
  25. package/codex/plugins/agent-wallet/skills/x402/SKILL.md +102 -0
  26. package/hermes/plugins/agent_wallet/plugin.yaml +1 -1
  27. package/package.json +1 -1
  28. package/wdk-btc-wallet/package.json +1 -1
  29. package/wdk-evm-wallet/.env.example +4 -1
  30. package/wdk-evm-wallet/README.md +18 -2
  31. package/wdk-evm-wallet/package.json +1 -1
  32. package/wdk-evm-wallet/src/config.js +34 -3
  33. package/wdk-evm-wallet/src/network_state.js +8 -2
  34. package/wdk-evm-wallet/src/wdk_evm_wallet.js +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentlayer.tech/wallet",
3
- "version": "0.1.95",
3
+ "version": "0.1.97",
4
4
  "description": "Universal AgentLayer wallet installer for OpenClaw, Codex, Claude Code, and Hermes.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wdk-btc-wallet",
3
- "version": "0.1.95",
3
+ "version": "0.1.97",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Separate BTC-only wallet service built on Tether WDK.",
@@ -11,7 +11,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
13
  # Mainnet ethereum/base/robinhood are forced through provider-gateway -> Alchemy.
14
- # Direct per-network URLs below are only relevant for testnet-style paths.
14
+ # GOAT mainnet is forced through provider-gateway -> shared GOAT RPC. The gateway
15
+ # is configured with SHARED_EVM_GOAT_RPC_URL=https://rpc.goat.network; it has no
16
+ # local URL override. Direct per-network URLs below are only relevant for the
17
+ # existing testnet-style paths.
15
18
  WDK_EVM_ETHEREUM_RPC_URL=
16
19
  WDK_EVM_SEPOLIA_RPC_URL=https://sepolia.drpc.org
17
20
  WDK_EVM_BASE_RPC_URL=
@@ -74,9 +74,22 @@ This service intentionally supports a narrow surface:
74
74
  - `sepolia`
75
75
  - `base`
76
76
  - `base-sepolia`
77
+ - `robinhood`
78
+ - `goat` (GOAT Network mainnet, chain ID `2345`)
79
+ - `goat-testnet` (GOAT Testnet3, chain ID `48816`; local runtime testing only)
77
80
 
78
81
  The active network is persistent and can be switched without changing code.
79
82
 
83
+ GOAT is an EVM-compatible network whose native transfer and gas asset is BTC
84
+ (18-decimal EVM base units), rather than ETH. Mainnet uses the allow-listed
85
+ provider-gateway `shared` route, whose only GOAT upstream is configured as
86
+ `SHARED_EVM_GOAT_RPC_URL` (normally `https://rpc.goat.network`). Testnet3 uses
87
+ the fixed official endpoint `https://rpc.testnet3.goat.network`. Higher-level
88
+ callers cannot supply a remote URL. Existing generic capabilities — native BTC
89
+ balance/transfer, ERC-20 reads/transfers, fee quotes, and receipts — are
90
+ available. GOAT bridge, DEX, and GOAT Flow/x402 operations remain deliberately
91
+ out of scope until they receive separate protocol-specific safety reviews.
92
+
80
93
  ## API
81
94
 
82
95
  - `GET /health`
@@ -184,6 +197,7 @@ Environment variables:
184
197
  - `WDK_EVM_SEPOLIA_RPC_URL`
185
198
  - `WDK_EVM_BASE_RPC_URL`
186
199
  - `WDK_EVM_BASE_SEPOLIA_RPC_URL`
200
+ - `WDK_EVM_ROBINHOOD_RPC_URL`
187
201
  - `MORPHO_API_BASE_URL`
188
202
  - `UNISWAP_API_KEY`
189
203
  - `UNISWAP_TRADING_API_BASE_URL`
@@ -227,10 +241,12 @@ Gateway mode:
227
241
  - `PROVIDER_GATEWAY_URL` defaults to `https://agent-layer-production.up.railway.app`
228
242
  - set `PROVIDER_GATEWAY_URL=https://...` only when overriding the hosted default
229
243
  - `PROVIDER_GATEWAY_BEARER_TOKEN` is optional and only needed when the gateway is protected
230
- - `ethereum` and `base` mainnet are always routed through the provider gateway raw EVM RPC route
231
- - `ethereum` and `base` mainnet are pinned to the gateway `provider=alchemy` path
244
+ - `ethereum`, `base`, and `robinhood` mainnet are always routed through the provider gateway raw EVM RPC route pinned to `provider=alchemy`
245
+ - GOAT mainnet is always routed through the provider gateway raw EVM RPC route pinned to `provider=shared`; configure its only allowed upstream with `SHARED_EVM_GOAT_RPC_URL=https://rpc.goat.network`
232
246
  - direct `WDK_EVM_ETHEREUM_RPC_URL` and `WDK_EVM_BASE_RPC_URL` values no longer override mainnet routing
233
247
  - `WDK_EVM_SEPOLIA_RPC_URL` and `WDK_EVM_BASE_SEPOLIA_RPC_URL` remain direct per-network testnet overrides
248
+ - GOAT Testnet3 uses its fixed official public RPC endpoint. Mainnet requires a
249
+ gateway deployment that includes the GOAT shared-RPC allowlist.
234
250
 
235
251
  Local security note:
236
252
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wdk-evm-wallet",
3
- "version": "0.1.95",
3
+ "version": "0.1.97",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Separate EVM wallet service built on Tether WDK.",
@@ -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", "robinhood"]);
30
+ const ENFORCED_GATEWAY_MAINNETS = new Set(["ethereum", "base", "robinhood", "goat"]);
31
31
 
32
32
  const DEFAULT_NETWORK_PROFILES = {
33
33
  ethereum: {
@@ -55,6 +55,16 @@ const DEFAULT_NETWORK_PROFILES = {
55
55
  providerUrl: "https://rpc.mainnet.chain.robinhood.com",
56
56
  nativeSymbol: "ETH",
57
57
  },
58
+ goat: {
59
+ chainId: 2345,
60
+ providerUrl: "https://rpc.goat.network",
61
+ nativeSymbol: "BTC",
62
+ },
63
+ "goat-testnet": {
64
+ chainId: 48816,
65
+ providerUrl: "https://rpc.testnet3.goat.network",
66
+ nativeSymbol: "BTC",
67
+ },
58
68
  };
59
69
 
60
70
  // Robinhood Chain uses the Universal Router 2.1.1 deployment. Keep this
@@ -191,6 +201,8 @@ function normalizeNetworkKey(value) {
191
201
  "base-mainnet": "base",
192
202
  base_sepolia: "base-sepolia",
193
203
  "robinhood-mainnet": "robinhood",
204
+ "goat-mainnet": "goat",
205
+ "goat-testnet3": "goat-testnet",
194
206
  };
195
207
  return aliases[normalized] || normalized;
196
208
  }
@@ -252,7 +264,7 @@ export function loadConfig(env = process.env) {
252
264
  const network = normalizeNetworkKey(env.WDK_EVM_NETWORK ?? DEFAULTS.network) || DEFAULTS.network;
253
265
  if (!Object.hasOwn(DEFAULT_NETWORK_PROFILES, network)) {
254
266
  throw new Error(
255
- "WDK_EVM_NETWORK must be one of: ethereum, sepolia, base, base-sepolia, robinhood."
267
+ "WDK_EVM_NETWORK must be one of: ethereum, sepolia, base, base-sepolia, robinhood, goat, goat-testnet."
256
268
  );
257
269
  }
258
270
 
@@ -274,10 +286,14 @@ export function loadConfig(env = process.env) {
274
286
  function resolveProviderUrl(networkKey, envValue, fallbackUrl) {
275
287
  const direct = String(envValue ?? "").trim();
276
288
  if (ENFORCED_GATEWAY_MAINNETS.has(networkKey)) {
289
+ // GOAT's explicitly allow-listed gateway upstream is the official shared
290
+ // RPC. The other mainnets are pinned to Alchemy. Do not accept a caller-
291
+ // supplied upstream URL for any mainnet.
292
+ const enforcedProvider = networkKey === "goat" ? "shared" : "alchemy";
277
293
  const enforcedGatewayUrl = buildGatewayEvmRpcUrl(
278
294
  providerGatewayUrl,
279
295
  networkKey,
280
- "alchemy",
296
+ enforcedProvider,
281
297
  providerGatewayToken
282
298
  );
283
299
  if (!enforcedGatewayUrl) {
@@ -344,6 +360,21 @@ export function loadConfig(env = process.env) {
344
360
  DEFAULT_NETWORK_PROFILES.robinhood.providerUrl
345
361
  ),
346
362
  },
363
+ // GOAT is an EIP-1559 EVM network that uses BTC (18 decimals) as its
364
+ // native gas token. Keep the official RPC endpoint fixed in source: host
365
+ // integrations must never select an arbitrary remote RPC URL.
366
+ goat: {
367
+ ...DEFAULT_NETWORK_PROFILES.goat,
368
+ providerUrl: resolveProviderUrl("goat", "", DEFAULT_NETWORK_PROFILES.goat.providerUrl),
369
+ },
370
+ "goat-testnet": {
371
+ ...DEFAULT_NETWORK_PROFILES["goat-testnet"],
372
+ providerUrl: resolveProviderUrl(
373
+ "goat-testnet",
374
+ "",
375
+ DEFAULT_NETWORK_PROFILES["goat-testnet"].providerUrl
376
+ ),
377
+ },
347
378
  };
348
379
 
349
380
  // Route Uniswap Trading API calls through the provider-gateway by default so the
@@ -12,11 +12,17 @@ function assertValidNetwork(network, fieldName = "network") {
12
12
  "base-mainnet": "base",
13
13
  base_sepolia: "base-sepolia",
14
14
  "robinhood-mainnet": "robinhood",
15
+ "goat-mainnet": "goat",
16
+ "goat-testnet3": "goat-testnet",
15
17
  };
16
18
  const effective = aliases[normalized] || normalized;
17
- if (!["ethereum", "sepolia", "base", "base-sepolia", "robinhood"].includes(effective)) {
19
+ if (
20
+ !["ethereum", "sepolia", "base", "base-sepolia", "robinhood", "goat", "goat-testnet"].includes(
21
+ effective
22
+ )
23
+ ) {
18
24
  throw new Error(
19
- `${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood.`
25
+ `${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood, goat, goat-testnet.`
20
26
  );
21
27
  }
22
28
  return effective;
@@ -602,11 +602,17 @@ function assertValidNetwork(network, fieldName = "network") {
602
602
  "base-mainnet": "base",
603
603
  base_sepolia: "base-sepolia",
604
604
  "robinhood-mainnet": "robinhood",
605
+ "goat-mainnet": "goat",
606
+ "goat-testnet3": "goat-testnet",
605
607
  };
606
608
  const effective = aliases[normalized] || normalized;
607
- if (!["ethereum", "sepolia", "base", "base-sepolia", "robinhood"].includes(effective)) {
609
+ if (
610
+ !["ethereum", "sepolia", "base", "base-sepolia", "robinhood", "goat", "goat-testnet"].includes(
611
+ effective
612
+ )
613
+ ) {
608
614
  throw new Error(
609
- `${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood.`
615
+ `${fieldName} must be one of: ethereum, sepolia, base, base-sepolia, robinhood, goat, goat-testnet.`
610
616
  );
611
617
  }
612
618
  return effective;