openclaw-arcade-plugin 0.1.15 → 0.1.18
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/SKILL.md +7 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +128 -128
- package/dist/index.js.map +1 -1
- package/index.ts +18 -19
- package/openclaw.plugin.json +3 -2
- package/package.json +6 -5
package/SKILL.md
CHANGED
|
@@ -15,6 +15,13 @@ metadata: '{"openclaw": {"requires": {"bins": ["node"]}}}'
|
|
|
15
15
|
| `proof` | Retrieve the Merkle proof for a mined transaction |
|
|
16
16
|
| `config` | Show current broadcaster URL and network |
|
|
17
17
|
|
|
18
|
+
## Network Support
|
|
19
|
+
|
|
20
|
+
The plugin is network-aware and supports:
|
|
21
|
+
- **`mainnet`**: Production network (`https://arc.gorillapool.io`).
|
|
22
|
+
- **`testnet`**: Testing network (`https://testnet.arc.gorillapool.io`).
|
|
23
|
+
- **`local`**: Local development environment (customizable URL).
|
|
24
|
+
|
|
18
25
|
## Usage Guidance
|
|
19
26
|
|
|
20
27
|
### Broadcasting Payments
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* OpenClaw Arcade Plugin
|
|
3
3
|
* Transaction broadcasting and lifecycle tracking via BSV Arcade.
|
|
4
4
|
*/
|
|
5
|
+
export declare function register(api: any): Promise<void>;
|
|
5
6
|
export declare const plugin: {
|
|
6
7
|
id: string;
|
|
7
8
|
name: string;
|
|
8
9
|
description: string;
|
|
9
|
-
activate
|
|
10
|
-
register
|
|
10
|
+
activate: typeof register;
|
|
11
|
+
register: typeof register;
|
|
11
12
|
};
|
|
12
|
-
export default
|
|
13
|
+
export default register;
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,GAAG,iBAoIpC;AAEH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,141 +3,141 @@ let isInitialized = false;
|
|
|
3
3
|
* OpenClaw Arcade Plugin
|
|
4
4
|
* Transaction broadcasting and lifecycle tracking via BSV Arcade.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: "object",
|
|
35
|
-
properties: {
|
|
36
|
-
action: {
|
|
37
|
-
type: "string",
|
|
38
|
-
enum: ["broadcast", "status", "proof", "config"],
|
|
39
|
-
description: "Action to perform"
|
|
40
|
-
},
|
|
41
|
-
txhex: {
|
|
42
|
-
type: "string",
|
|
43
|
-
description: "Hex-encoded raw transaction to broadcast"
|
|
44
|
-
},
|
|
45
|
-
txid: {
|
|
46
|
-
type: "string",
|
|
47
|
-
description: "Transaction ID to track or fetch proof for"
|
|
48
|
-
}
|
|
6
|
+
export async function register(api) {
|
|
7
|
+
if (isInitialized)
|
|
8
|
+
return;
|
|
9
|
+
isInitialized = true;
|
|
10
|
+
const entries = api.getConfig?.()?.plugins?.entries || {};
|
|
11
|
+
const entry = entries['arcade']
|
|
12
|
+
|| entries['openclaw-arcade-plugin']
|
|
13
|
+
|| entries['openclaw-arcade']
|
|
14
|
+
|| entries['bsv-arcade']
|
|
15
|
+
|| {};
|
|
16
|
+
const pluginConfig = { ...entry, ...(entry.config || {}), ...(api.config || {}) };
|
|
17
|
+
const network = pluginConfig.network || 'mainnet';
|
|
18
|
+
const defaultArcadeUrl = network === 'testnet'
|
|
19
|
+
? 'https://testnet.arc.gorillapool.io'
|
|
20
|
+
: 'https://arc.gorillapool.io';
|
|
21
|
+
const arcadeUrl = (pluginConfig.arcadeUrl || defaultArcadeUrl).replace(/\/$/, '');
|
|
22
|
+
api.logger.info(`[arcade] Initializing Arcade Plugin (network: ${network}, host: ${arcadeUrl})`);
|
|
23
|
+
// 1. Tool
|
|
24
|
+
api.registerTool({
|
|
25
|
+
name: "arcade",
|
|
26
|
+
description: "Submit and track BSV transactions with full lifecycle visibility",
|
|
27
|
+
parameters: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
action: {
|
|
31
|
+
type: "string",
|
|
32
|
+
enum: ["broadcast", "status", "proof", "config"],
|
|
33
|
+
description: "Action to perform"
|
|
49
34
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (!txhex)
|
|
58
|
-
throw new Error("txhex is required for broadcast");
|
|
59
|
-
const bResp = await fetch(`${arcadeUrl}/v1/tx`, {
|
|
60
|
-
method: 'POST',
|
|
61
|
-
headers: { 'Content-Type': 'application/json' },
|
|
62
|
-
body: JSON.stringify({ rawTx: txhex })
|
|
63
|
-
});
|
|
64
|
-
const bData = await bResp.json();
|
|
65
|
-
if (!bResp.ok)
|
|
66
|
-
throw new Error(`Broadcast failed: ${JSON.stringify(bData)}`);
|
|
67
|
-
return { content: [{ type: "text", text: `Transaction broadcasted! TXID: ${bData.txid}\nStatus: ${bData.txStatus}` }] };
|
|
68
|
-
case "status":
|
|
69
|
-
if (!txid)
|
|
70
|
-
throw new Error("txid is required for status check");
|
|
71
|
-
const sResp = await fetch(`${arcadeUrl}/v1/tx/${txid}`);
|
|
72
|
-
const sData = await sResp.json();
|
|
73
|
-
if (!sResp.ok)
|
|
74
|
-
throw new Error(`Status check failed: ${JSON.stringify(sData)}`);
|
|
75
|
-
return { content: [{ type: "text", text: `Transaction ${txid}:\nStatus: ${sData.txStatus}\nBlock: ${sData.blockHeight || 'Pending'}` }] };
|
|
76
|
-
case "proof":
|
|
77
|
-
if (!txid)
|
|
78
|
-
throw new Error("txid is required for proof retrieval");
|
|
79
|
-
const pResp = await fetch(`${arcadeUrl}/v1/tx/${txid}/proof`);
|
|
80
|
-
if (!pResp.ok)
|
|
81
|
-
throw new Error(`Proof retrieval failed: ${pResp.status}`);
|
|
82
|
-
const pData = await pResp.arrayBuffer();
|
|
83
|
-
const base64Proof = Buffer.from(pData).toString('base64');
|
|
84
|
-
return { content: [{ type: "text", text: `Merkle Proof (Base64): ${base64Proof}` }] };
|
|
85
|
-
case "config":
|
|
86
|
-
return { content: [{ type: "text", text: `Arcade Configuration:\nURL: ${arcadeUrl}\nNetwork: ${network}` }] };
|
|
87
|
-
default:
|
|
88
|
-
throw new Error(`Unknown action: ${action}`);
|
|
89
|
-
}
|
|
35
|
+
txhex: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Hex-encoded raw transaction to broadcast"
|
|
38
|
+
},
|
|
39
|
+
txid: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Transaction ID to track or fetch proof for"
|
|
90
42
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
43
|
+
},
|
|
44
|
+
required: ["action"]
|
|
45
|
+
},
|
|
46
|
+
async execute(_id, params) {
|
|
47
|
+
try {
|
|
48
|
+
const { action, txhex, txid } = params;
|
|
49
|
+
switch (action) {
|
|
50
|
+
case "broadcast":
|
|
51
|
+
if (!txhex)
|
|
52
|
+
throw new Error("txhex is required for broadcast");
|
|
53
|
+
const bResp = await fetch(`${arcadeUrl}/v1/tx`, {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: { 'Content-Type': 'application/json' },
|
|
56
|
+
body: JSON.stringify({ rawTx: txhex })
|
|
57
|
+
});
|
|
58
|
+
const bData = await bResp.json();
|
|
59
|
+
if (!bResp.ok)
|
|
60
|
+
throw new Error(`Broadcast failed: ${JSON.stringify(bData)}`);
|
|
61
|
+
return { content: [{ type: "text", text: `Transaction broadcasted! TXID: ${bData.txid}\nStatus: ${bData.txStatus}` }] };
|
|
62
|
+
case "status":
|
|
63
|
+
if (!txid)
|
|
64
|
+
throw new Error("txid is required for status check");
|
|
65
|
+
const sResp = await fetch(`${arcadeUrl}/v1/tx/${txid}`);
|
|
66
|
+
const sData = await sResp.json();
|
|
67
|
+
if (!sResp.ok)
|
|
68
|
+
throw new Error(`Status check failed: ${JSON.stringify(sData)}`);
|
|
69
|
+
return { content: [{ type: "text", text: `Transaction ${txid}:\nStatus: ${sData.txStatus}\nBlock: ${sData.blockHeight || 'Pending'}` }] };
|
|
70
|
+
case "proof":
|
|
71
|
+
if (!txid)
|
|
72
|
+
throw new Error("txid is required for proof retrieval");
|
|
73
|
+
const pResp = await fetch(`${arcadeUrl}/v1/tx/${txid}/proof`);
|
|
74
|
+
if (!pResp.ok)
|
|
75
|
+
throw new Error(`Proof retrieval failed: ${pResp.status}`);
|
|
76
|
+
const pData = await pResp.arrayBuffer();
|
|
77
|
+
const base64Proof = Buffer.from(pData).toString('base64');
|
|
78
|
+
return { content: [{ type: "text", text: `Merkle Proof (Base64): ${base64Proof}` }] };
|
|
79
|
+
case "config":
|
|
80
|
+
return { content: [{ type: "text", text: `Arcade Configuration:\nURL: ${arcadeUrl}\nNetwork: ${network}` }] };
|
|
81
|
+
default:
|
|
82
|
+
throw new Error(`Unknown action: ${action}`);
|
|
98
83
|
}
|
|
99
84
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return { text: `🛡️ **Transaction Status**\n**TXID**: ${params.txid}\n**Status**: ${data.txStatus || 'Unknown'}` };
|
|
124
|
-
}
|
|
125
|
-
return { text: `Command '${action}' executed.` };
|
|
85
|
+
catch (error) {
|
|
86
|
+
return {
|
|
87
|
+
content: [{
|
|
88
|
+
type: "text",
|
|
89
|
+
text: `Error: ${error.message || String(error)}`
|
|
90
|
+
}]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
// 2. Command
|
|
96
|
+
api.registerCommand({
|
|
97
|
+
name: "arcade",
|
|
98
|
+
description: "BSV transaction tracking commands",
|
|
99
|
+
acceptsArgs: true,
|
|
100
|
+
requireAuth: true,
|
|
101
|
+
handler: async (ctx) => {
|
|
102
|
+
try {
|
|
103
|
+
const args = ctx.args || [];
|
|
104
|
+
const action = args[0] || 'config';
|
|
105
|
+
const params = { action };
|
|
106
|
+
if (action === 'help') {
|
|
107
|
+
return { text: `🛡️ **Arcade Help**\n\n**Subcommands**:\n- \`status <txid>\`: Check broadcast status\n- \`broadcast <hex>\`: Send raw transaction\n- \`proof <txid>\`: Fetch Merkle Proof\n- \`config\`: Show active URL` };
|
|
126
108
|
}
|
|
127
|
-
|
|
128
|
-
|
|
109
|
+
if (action === 'status' && args[1])
|
|
110
|
+
params.txid = args[1];
|
|
111
|
+
if (action === 'broadcast' && args[1])
|
|
112
|
+
params.txhex = args[1];
|
|
113
|
+
// Custom logic for simplified chat output
|
|
114
|
+
if (action === 'status' && params.txid) {
|
|
115
|
+
const res = await fetch(`${arcadeUrl}/v1/tx/${params.txid}`);
|
|
116
|
+
const data = await res.json();
|
|
117
|
+
return { text: `🛡️ **Transaction Status**\n**TXID**: ${params.txid}\n**Status**: ${data.txStatus || 'Unknown'}` };
|
|
129
118
|
}
|
|
119
|
+
return { text: `Command '${action}' executed.` };
|
|
130
120
|
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
return { text: `❌ Arcade Error: ${error.message}` };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
// 3. CLI
|
|
127
|
+
api.registerCli(({ program }) => {
|
|
128
|
+
program.command("arcade")
|
|
129
|
+
.description("BSV transaction tracking commands")
|
|
130
|
+
.action(() => {
|
|
131
|
+
console.log("Usage: arcade <action> [args]");
|
|
131
132
|
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
133
|
+
}, { descriptors: [{ name: "arcade", description: "BSV transaction tracking commands" }] });
|
|
134
|
+
}
|
|
135
|
+
export const plugin = {
|
|
136
|
+
id: "openclaw-arcade-plugin",
|
|
137
|
+
name: "BSV Arcade Broadcaster",
|
|
138
|
+
description: "Submit and track BSV transactions with full lifecycle visibility",
|
|
139
|
+
activate: register,
|
|
140
|
+
register: register
|
|
141
141
|
};
|
|
142
|
-
export default
|
|
142
|
+
export default register;
|
|
143
143
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ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BAAiB,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE,EAAE,CAAC;gBACrH,CAAC;gBAED,OAAO,EAAE,IAAI,EAAE,YAAY,MAAM,aAAa,EAAE,CAAC;YACnD,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,EAAE,IAAI,EAAE,mBAAmB,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACtD,CAAC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,SAAS;IACT,GAAG,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,EAAO,EAAE,EAAE;QACnC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;aACtB,WAAW,CAAC,mCAAmC,CAAC;aAChD,MAAM,CAAC,GAAG,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC9F,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,wBAAwB;IAC5B,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,kEAAkE;IAC/E,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/index.ts
CHANGED
|
@@ -7,24 +7,16 @@ let isInitialized = false;
|
|
|
7
7
|
* OpenClaw Arcade Plugin
|
|
8
8
|
* Transaction broadcasting and lifecycle tracking via BSV Arcade.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (isInitialized) return;
|
|
21
|
-
isInitialized = true;
|
|
22
|
-
|
|
23
|
-
const entries = api.getConfig?.()?.plugins?.entries || {};
|
|
24
|
-
const entry = entries['openclaw-arcade-plugin']
|
|
25
|
-
|| entries['openclaw-arcade']
|
|
26
|
-
|| entries['bsv-arcade']
|
|
27
|
-
|| {};
|
|
10
|
+
export async function register(api: any) {
|
|
11
|
+
if (isInitialized) return;
|
|
12
|
+
isInitialized = true;
|
|
13
|
+
|
|
14
|
+
const entries = api.getConfig?.()?.plugins?.entries || {};
|
|
15
|
+
const entry = entries['arcade']
|
|
16
|
+
|| entries['openclaw-arcade-plugin']
|
|
17
|
+
|| entries['openclaw-arcade']
|
|
18
|
+
|| entries['bsv-arcade']
|
|
19
|
+
|| {};
|
|
28
20
|
|
|
29
21
|
const pluginConfig = { ...entry, ...(entry.config || {}), ...(api.config || {}) };
|
|
30
22
|
const network = pluginConfig.network || 'mainnet';
|
|
@@ -148,6 +140,13 @@ export const plugin = {
|
|
|
148
140
|
});
|
|
149
141
|
}, { descriptors: [{ name: "arcade", description: "BSV transaction tracking commands" }] });
|
|
150
142
|
}
|
|
143
|
+
|
|
144
|
+
export const plugin = {
|
|
145
|
+
id: "openclaw-arcade-plugin",
|
|
146
|
+
name: "BSV Arcade Broadcaster",
|
|
147
|
+
description: "Submit and track BSV transactions with full lifecycle visibility",
|
|
148
|
+
activate: register,
|
|
149
|
+
register: register
|
|
151
150
|
};
|
|
152
151
|
|
|
153
|
-
export default
|
|
152
|
+
export default register;
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-arcade-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "OpenClaw plugin for transaction broadcasting and lifecycle tracking via BSV Arcade",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"prepublishOnly": "npm run build",
|
|
17
|
+
"prepublishOnly": "npm run build && npm test",
|
|
18
18
|
"lint": "eslint src/**/*.ts",
|
|
19
19
|
"test": "npx tsx src/arcade.test.ts"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@bsv/sdk": "^2.0.13"
|
|
22
|
+
"@bsv/sdk": "^2.0.13",
|
|
23
|
+
"sqlite3": "^5.1.7"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/node": "^22.10.0",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
27
|
+
"eslint": "^10.1.0",
|
|
28
|
+
"typescript": "^6.0.2"
|
|
28
29
|
},
|
|
29
30
|
"openclaw": {
|
|
30
31
|
"extensions": [
|