@agentlayer.tech/wallet 0.1.18 → 0.1.20

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 (27) hide show
  1. package/.openclaw/AGENTS.md +0 -7
  2. package/.openclaw/extensions/agent-wallet/README.md +3 -2
  3. package/.openclaw/extensions/agent-wallet/package.json +1 -1
  4. package/README.md +111 -3
  5. package/RELEASING.md +5 -15
  6. package/agent-wallet/README.md +3 -0
  7. package/agent-wallet/agent_wallet/config.py +11 -0
  8. package/agent-wallet/agent_wallet/evm_user_wallets.py +310 -2
  9. package/agent-wallet/agent_wallet/openclaw_runtime.py +10 -41
  10. package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +52 -0
  11. package/agent-wallet/pyproject.toml +1 -1
  12. package/agent-wallet/scripts/build_release_bundle.py +1 -0
  13. package/agent-wallet/scripts/flash-sdk-bridge/bridge.mjs +21 -11
  14. package/agent-wallet/scripts/install_agent_wallet.py +250 -14
  15. package/agent-wallet/scripts/install_openclaw_local_config.py +20 -51
  16. package/agent-wallet/scripts/install_openclaw_sealed_keys.py +9 -1
  17. package/bin/openclaw-agent-wallet.mjs +282 -24
  18. package/package.json +1 -2
  19. package/.openclaw/extensions/pay-bridge/README.md +0 -38
  20. package/.openclaw/extensions/pay-bridge/core.mjs +0 -287
  21. package/.openclaw/extensions/pay-bridge/dist/core.mjs +0 -287
  22. package/.openclaw/extensions/pay-bridge/dist/index.js +0 -196
  23. package/.openclaw/extensions/pay-bridge/index.ts +0 -196
  24. package/.openclaw/extensions/pay-bridge/openclaw.plugin.json +0 -34
  25. package/.openclaw/extensions/pay-bridge/package.json +0 -49
  26. package/.openclaw/extensions/pay-bridge/skills/pay-operator/SKILL.md +0 -20
  27. package/.openclaw/extensions/pay-bridge/smoke_pay_bridge.mjs +0 -38
@@ -1,196 +0,0 @@
1
- import {
2
- executePayApiRequest,
3
- getPayServiceEndpoints,
4
- getPayStatus,
5
- getPayWalletInfo,
6
- searchPayServices,
7
- } from "./core.mjs";
8
-
9
- const PLUGIN_ID = "pay-bridge";
10
-
11
- function asContent(data) {
12
- return {
13
- content: [
14
- {
15
- type: "text",
16
- text: JSON.stringify(data, null, 2),
17
- },
18
- ],
19
- };
20
- }
21
-
22
- function resolvePluginConfig(api) {
23
- const globalConfig = api?.config ?? {};
24
- const pluginEntry = globalConfig?.plugins?.entries?.[PLUGIN_ID];
25
- return pluginEntry?.config ?? globalConfig?.config ?? {};
26
- }
27
-
28
- function registerTool(api, definition) {
29
- api.registerTool({
30
- name: definition.name,
31
- description: definition.description,
32
- parameters: definition.parameters,
33
- returns: {
34
- type: "object",
35
- additionalProperties: true,
36
- },
37
- async execute(_id, params = {}) {
38
- const config = resolvePluginConfig(api);
39
- let result;
40
- if (definition.name === "pay_status") {
41
- result = await getPayStatus(config, { cwd: process.cwd() });
42
- } else if (definition.name === "pay_wallet_info") {
43
- result = await getPayWalletInfo(config, { cwd: process.cwd() });
44
- } else if (definition.name === "pay_search_services") {
45
- result = await searchPayServices(config, params, { cwd: process.cwd() });
46
- } else if (definition.name === "pay_get_service_endpoints") {
47
- result = await getPayServiceEndpoints(config, params, { cwd: process.cwd() });
48
- } else if (definition.name === "pay_api_request") {
49
- result = await executePayApiRequest(config, params, { cwd: process.cwd() });
50
- } else {
51
- throw new Error(`Unsupported pay-bridge tool: ${definition.name}`);
52
- }
53
- return asContent(result);
54
- },
55
- });
56
- }
57
-
58
- const toolDefinitions = [
59
- {
60
- name: "pay_status",
61
- description:
62
- "Check whether the local pay.sh CLI is installed and whether a pay wallet/account is configured. Use this before any paid API workflow.",
63
- parameters: {
64
- type: "object",
65
- properties: {},
66
- additionalProperties: false,
67
- },
68
- },
69
- {
70
- name: "pay_wallet_info",
71
- description:
72
- "Show pay wallet/account status. This wallet is separate from the AgentLayer execution wallet and is only for pay.sh API payments.",
73
- parameters: {
74
- type: "object",
75
- properties: {},
76
- additionalProperties: false,
77
- },
78
- },
79
- {
80
- name: "pay_search_services",
81
- description:
82
- "Search the pay.sh skills catalog for paid APIs. Prefer this instead of guessing URLs manually.",
83
- parameters: {
84
- type: "object",
85
- properties: {
86
- query: {
87
- type: "string",
88
- description: "Search text for service names, descriptions, or endpoint paths.",
89
- },
90
- category: {
91
- type: "string",
92
- description: "Optional category filter such as ai_ml, maps, data, compute, search, crypto_finance.",
93
- },
94
- account: {
95
- type: "string",
96
- description: "Optional pay account override.",
97
- },
98
- },
99
- additionalProperties: false,
100
- },
101
- },
102
- {
103
- name: "pay_get_service_endpoints",
104
- description:
105
- "List the discoverable endpoints for a pay.sh service/resource pair and return their gateway URLs. Use the returned URL with pay_api_request.",
106
- parameters: {
107
- type: "object",
108
- properties: {
109
- service_fqn: {
110
- type: "string",
111
- description: "Fully qualified pay service name, for example solana-foundation/google/language.",
112
- },
113
- resource: {
114
- type: "string",
115
- description: "Resource name inside the service, for example entities or jobs.",
116
- },
117
- account: {
118
- type: "string",
119
- description: "Optional pay account override.",
120
- },
121
- },
122
- required: ["service_fqn", "resource"],
123
- additionalProperties: false,
124
- },
125
- },
126
- {
127
- name: "pay_api_request",
128
- description:
129
- "Call a paid API through the local pay.sh CLI using a URL returned by pay_get_service_endpoints. Requires explicit user_confirmed=true and keeps the pay wallet separate from AgentLayer execution wallets.",
130
- optional: true,
131
- parameters: {
132
- type: "object",
133
- properties: {
134
- service_fqn: {
135
- type: "string",
136
- description: "Fully qualified pay service name used to validate the request URL.",
137
- },
138
- resource: {
139
- type: "string",
140
- description: "Resource name used to validate the request URL.",
141
- },
142
- url: {
143
- type: "string",
144
- description: "Exact HTTPS gateway URL returned by pay_get_service_endpoints.",
145
- },
146
- method: {
147
- type: "string",
148
- description: "HTTP method such as GET or POST.",
149
- },
150
- headers: {
151
- type: "object",
152
- additionalProperties: { type: "string" },
153
- description: "Optional HTTP headers.",
154
- },
155
- query: {
156
- type: "object",
157
- additionalProperties: true,
158
- description: "Optional query parameters to append to the URL.",
159
- },
160
- json_body: {
161
- description: "Optional JSON request body.",
162
- },
163
- text_body: {
164
- type: "string",
165
- description: "Optional raw text request body. Do not provide with json_body.",
166
- },
167
- account: {
168
- type: "string",
169
- description: "Optional pay account override.",
170
- },
171
- parse_json_response: {
172
- type: "boolean",
173
- description: "If true, attempt to parse the response body as JSON.",
174
- },
175
- purpose: {
176
- type: "string",
177
- description: "Short user-facing reason for this paid API call.",
178
- },
179
- user_confirmed: {
180
- type: "boolean",
181
- description: "Must be true for paid API requests.",
182
- },
183
- },
184
- required: ["service_fqn", "resource", "url", "method", "purpose", "user_confirmed"],
185
- additionalProperties: false,
186
- },
187
- },
188
- ];
189
-
190
- export default function registerPayBridgePlugin(api) {
191
- api?.logger?.info?.("[pay-bridge] registering pay.sh OpenClaw plugin");
192
- for (const definition of toolDefinitions) {
193
- registerTool(api, definition);
194
- }
195
- api?.logger?.info?.(`[pay-bridge] registered ${toolDefinitions.length} pay tools`);
196
- }
@@ -1,196 +0,0 @@
1
- import {
2
- executePayApiRequest,
3
- getPayServiceEndpoints,
4
- getPayStatus,
5
- getPayWalletInfo,
6
- searchPayServices,
7
- } from "./core.mjs";
8
-
9
- const PLUGIN_ID = "pay-bridge";
10
-
11
- function asContent(data) {
12
- return {
13
- content: [
14
- {
15
- type: "text",
16
- text: JSON.stringify(data, null, 2),
17
- },
18
- ],
19
- };
20
- }
21
-
22
- function resolvePluginConfig(api) {
23
- const globalConfig = api?.config ?? {};
24
- const pluginEntry = globalConfig?.plugins?.entries?.[PLUGIN_ID];
25
- return pluginEntry?.config ?? globalConfig?.config ?? {};
26
- }
27
-
28
- function registerTool(api, definition) {
29
- api.registerTool({
30
- name: definition.name,
31
- description: definition.description,
32
- parameters: definition.parameters,
33
- returns: {
34
- type: "object",
35
- additionalProperties: true,
36
- },
37
- async execute(_id, params = {}) {
38
- const config = resolvePluginConfig(api);
39
- let result;
40
- if (definition.name === "pay_status") {
41
- result = await getPayStatus(config, { cwd: process.cwd() });
42
- } else if (definition.name === "pay_wallet_info") {
43
- result = await getPayWalletInfo(config, { cwd: process.cwd() });
44
- } else if (definition.name === "pay_search_services") {
45
- result = await searchPayServices(config, params, { cwd: process.cwd() });
46
- } else if (definition.name === "pay_get_service_endpoints") {
47
- result = await getPayServiceEndpoints(config, params, { cwd: process.cwd() });
48
- } else if (definition.name === "pay_api_request") {
49
- result = await executePayApiRequest(config, params, { cwd: process.cwd() });
50
- } else {
51
- throw new Error(`Unsupported pay-bridge tool: ${definition.name}`);
52
- }
53
- return asContent(result);
54
- },
55
- });
56
- }
57
-
58
- const toolDefinitions = [
59
- {
60
- name: "pay_status",
61
- description:
62
- "Check whether the local pay.sh CLI is installed and whether a pay wallet/account is configured. Use this before any paid API workflow.",
63
- parameters: {
64
- type: "object",
65
- properties: {},
66
- additionalProperties: false,
67
- },
68
- },
69
- {
70
- name: "pay_wallet_info",
71
- description:
72
- "Show pay wallet/account status. This wallet is separate from the AgentLayer execution wallet and is only for pay.sh API payments.",
73
- parameters: {
74
- type: "object",
75
- properties: {},
76
- additionalProperties: false,
77
- },
78
- },
79
- {
80
- name: "pay_search_services",
81
- description:
82
- "Search the pay.sh skills catalog for paid APIs. Prefer this instead of guessing URLs manually.",
83
- parameters: {
84
- type: "object",
85
- properties: {
86
- query: {
87
- type: "string",
88
- description: "Search text for service names, descriptions, or endpoint paths.",
89
- },
90
- category: {
91
- type: "string",
92
- description: "Optional category filter such as ai_ml, maps, data, compute, search, crypto_finance.",
93
- },
94
- account: {
95
- type: "string",
96
- description: "Optional pay account override.",
97
- },
98
- },
99
- additionalProperties: false,
100
- },
101
- },
102
- {
103
- name: "pay_get_service_endpoints",
104
- description:
105
- "List the discoverable endpoints for a pay.sh service/resource pair and return their gateway URLs. Use the returned URL with pay_api_request.",
106
- parameters: {
107
- type: "object",
108
- properties: {
109
- service_fqn: {
110
- type: "string",
111
- description: "Fully qualified pay service name, for example solana-foundation/google/language.",
112
- },
113
- resource: {
114
- type: "string",
115
- description: "Resource name inside the service, for example entities or jobs.",
116
- },
117
- account: {
118
- type: "string",
119
- description: "Optional pay account override.",
120
- },
121
- },
122
- required: ["service_fqn", "resource"],
123
- additionalProperties: false,
124
- },
125
- },
126
- {
127
- name: "pay_api_request",
128
- description:
129
- "Call a paid API through the local pay.sh CLI using a URL returned by pay_get_service_endpoints. Requires explicit user_confirmed=true and keeps the pay wallet separate from AgentLayer execution wallets.",
130
- optional: true,
131
- parameters: {
132
- type: "object",
133
- properties: {
134
- service_fqn: {
135
- type: "string",
136
- description: "Fully qualified pay service name used to validate the request URL.",
137
- },
138
- resource: {
139
- type: "string",
140
- description: "Resource name used to validate the request URL.",
141
- },
142
- url: {
143
- type: "string",
144
- description: "Exact HTTPS gateway URL returned by pay_get_service_endpoints.",
145
- },
146
- method: {
147
- type: "string",
148
- description: "HTTP method such as GET or POST.",
149
- },
150
- headers: {
151
- type: "object",
152
- additionalProperties: { type: "string" },
153
- description: "Optional HTTP headers.",
154
- },
155
- query: {
156
- type: "object",
157
- additionalProperties: true,
158
- description: "Optional query parameters to append to the URL.",
159
- },
160
- json_body: {
161
- description: "Optional JSON request body.",
162
- },
163
- text_body: {
164
- type: "string",
165
- description: "Optional raw text request body. Do not provide with json_body.",
166
- },
167
- account: {
168
- type: "string",
169
- description: "Optional pay account override.",
170
- },
171
- parse_json_response: {
172
- type: "boolean",
173
- description: "If true, attempt to parse the response body as JSON.",
174
- },
175
- purpose: {
176
- type: "string",
177
- description: "Short user-facing reason for this paid API call.",
178
- },
179
- user_confirmed: {
180
- type: "boolean",
181
- description: "Must be true for paid API requests.",
182
- },
183
- },
184
- required: ["service_fqn", "resource", "url", "method", "purpose", "user_confirmed"],
185
- additionalProperties: false,
186
- },
187
- },
188
- ];
189
-
190
- export default function registerPayBridgePlugin(api) {
191
- api?.logger?.info?.("[pay-bridge] registering pay.sh OpenClaw plugin");
192
- for (const definition of toolDefinitions) {
193
- registerTool(api, definition);
194
- }
195
- api?.logger?.info?.(`[pay-bridge] registered ${toolDefinitions.length} pay tools`);
196
- }
@@ -1,34 +0,0 @@
1
- {
2
- "id": "pay-bridge",
3
- "name": "pay.sh Bridge",
4
- "description": "Thin OpenClaw bridge to the local pay.sh CLI for paid API discovery and execution.",
5
- "version": "0.1.0",
6
- "contracts": {
7
- "tools": [
8
- "pay_status",
9
- "pay_wallet_info",
10
- "pay_search_services",
11
- "pay_get_service_endpoints",
12
- "pay_api_request"
13
- ]
14
- },
15
- "skills": ["skills/pay-operator"],
16
- "configSchema": {
17
- "type": "object",
18
- "additionalProperties": false,
19
- "properties": {
20
- "payBinary": {
21
- "type": "string",
22
- "description": "Absolute path or executable name for the local pay.sh binary."
23
- },
24
- "defaultAccount": {
25
- "type": "string",
26
- "description": "Optional pay account name to use when a tool call does not specify one."
27
- },
28
- "requireHttps": {
29
- "type": "boolean",
30
- "description": "If true, pay_api_request refuses non-HTTPS URLs."
31
- }
32
- }
33
- }
34
- }
@@ -1,49 +0,0 @@
1
- {
2
- "name": "@agentlayertech/pay-bridge-plugin",
3
- "version": "0.1.18",
4
- "description": "OpenClaw plugin bridge for the local pay.sh CLI.",
5
- "type": "module",
6
- "license": "SEE LICENSE IN ../../../LICENSE",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/lopushok9/Agent-Layer.git",
10
- "directory": ".openclaw/extensions/pay-bridge"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/lopushok9/Agent-Layer/issues"
14
- },
15
- "homepage": "https://github.com/lopushok9/Agent-Layer/tree/main/.openclaw/extensions/pay-bridge#readme",
16
- "publishConfig": {
17
- "access": "public"
18
- },
19
- "files": [
20
- "index.ts",
21
- "core.mjs",
22
- "dist/",
23
- "openclaw.plugin.json",
24
- "README.md",
25
- "skills/"
26
- ],
27
- "openclaw": {
28
- "extensions": [
29
- "./index.ts"
30
- ],
31
- "runtimeExtensions": [
32
- "./dist/index.js"
33
- ],
34
- "compat": {
35
- "pluginApi": ">=2026.3.24-beta.2",
36
- "minGatewayVersion": "2026.3.24-beta.2"
37
- },
38
- "build": {
39
- "openclawVersion": "2026.3.24-beta.2",
40
- "pluginSdkVersion": "2026.3.24-beta.2"
41
- }
42
- },
43
- "keywords": [
44
- "openclaw",
45
- "plugin",
46
- "pay",
47
- "payments"
48
- ]
49
- }
@@ -1,20 +0,0 @@
1
- # pay-operator
2
-
3
- Use this skill when the user wants to discover or call paid APIs through `pay`.
4
-
5
- ## Rules
6
-
7
- - Treat the `pay` wallet as separate from the AgentLayer execution wallet.
8
- - Do not use `agent-wallet` tools for `pay` account management.
9
- - Do not fall back to shell commands when the `pay-bridge` tools exist.
10
- - Prefer this order:
11
- 1. `pay_status`
12
- 2. `pay_search_services`
13
- 3. `pay_get_service_endpoints`
14
- 4. `pay_api_request`
15
-
16
- ## Notes
17
-
18
- - `pay_api_request` requires `purpose` and `user_confirmed=true`.
19
- - Use the exact gateway URL returned by `pay_get_service_endpoints`.
20
- - If `pay_status` shows no configured account, stop and ask the user to finish `pay setup`.
@@ -1,38 +0,0 @@
1
- import assert from "node:assert/strict";
2
-
3
- import {
4
- endpointPayloadContainsUrl,
5
- parseAccountListOutput,
6
- parseWhoamiOutput,
7
- } from "./core.mjs";
8
-
9
- const whoami = parseWhoamiOutput(`
10
- yuriytsygankov
11
- \u001b[2m(no mainnet account — run \`pay setup\`)\u001b[0m
12
- `);
13
- assert.equal(whoami.system_user, "yuriytsygankov");
14
- assert.equal(whoami.has_mainnet_account, false);
15
-
16
- const accounts = parseAccountListOutput(`
17
- \u001b[2mNo accounts found. Run \`pay account new\` to create one.\u001b[0m
18
- `);
19
- assert.equal(accounts.has_accounts, false);
20
-
21
- const endpointPayload = {
22
- endpoints: [
23
- {
24
- method: "POST",
25
- url: "https://api.example.com/v1/invoke",
26
- },
27
- ],
28
- };
29
- assert.equal(
30
- endpointPayloadContainsUrl(endpointPayload, "https://api.example.com/v1/invoke"),
31
- true
32
- );
33
- assert.equal(
34
- endpointPayloadContainsUrl(endpointPayload, "https://api.example.com/v1/other"),
35
- false
36
- );
37
-
38
- console.log("smoke_pay_bridge: ok");