n8n-nodes-agnicwallet 1.0.11 → 1.0.13
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/README.md +51 -6
- package/dist/credentials/AgnicWalletApi.credentials.js +70 -41
- package/dist/credentials/AgnicWalletOAuth2Api.credentials.js +120 -91
- package/dist/nodes/AgnicAI/AgnicAI.node.js +1160 -411
- package/dist/nodes/AgnicAILanguageModel/AgnicAILanguageModel.node.js +1016 -355
- package/dist/nodes/AgnicMCPTool/AgnicMCPTool.node.js +12330 -336
- package/dist/nodes/X402HttpRequest/X402HttpRequest.node.js +345 -310
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -33,18 +33,31 @@ AgnicWallet is a non-custodial Web3 wallet service that handles blockchain payme
|
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
### For self-hosted
|
|
36
|
+
### For self-hosted n8n (Recommended Method):
|
|
37
|
+
|
|
38
|
+
Install in the n8n custom nodes directory:
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
|
|
41
|
+
cd ~/.n8n/nodes
|
|
42
|
+
npm init -y # Only needed first time
|
|
43
|
+
npm install n8n-nodes-agnicwallet --legacy-peer-deps
|
|
40
44
|
```
|
|
41
45
|
|
|
42
|
-
Then restart
|
|
46
|
+
Then restart n8n:
|
|
43
47
|
|
|
44
48
|
```bash
|
|
45
49
|
n8n start
|
|
46
50
|
```
|
|
47
51
|
|
|
52
|
+
> **Why `--legacy-peer-deps`?**
|
|
53
|
+
>
|
|
54
|
+
> This flag prevents npm from installing conflicting versions of `langchain`. Our node uses n8n's built-in `langchain@0.3.x`, but other community nodes may require `langchain@1.x`. Without this flag, npm may fail with dependency conflicts or install an incompatible version.
|
|
55
|
+
>
|
|
56
|
+
> You can also set this globally:
|
|
57
|
+
> ```bash
|
|
58
|
+
> echo "legacy-peer-deps=true" >> ~/.npmrc
|
|
59
|
+
> ```
|
|
60
|
+
|
|
48
61
|
### For Docker:
|
|
49
62
|
|
|
50
63
|
Add to your Dockerfile:
|
|
@@ -53,13 +66,21 @@ Add to your Dockerfile:
|
|
|
53
66
|
FROM n8nio/n8n:latest
|
|
54
67
|
|
|
55
68
|
USER root
|
|
56
|
-
RUN
|
|
69
|
+
RUN cd /home/node/.n8n/nodes && \
|
|
70
|
+
npm init -y && \
|
|
71
|
+
npm install n8n-nodes-agnicwallet --legacy-peer-deps
|
|
57
72
|
USER node
|
|
58
73
|
```
|
|
59
74
|
|
|
75
|
+
### Global Installation (Alternative):
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g n8n-nodes-agnicwallet --legacy-peer-deps
|
|
79
|
+
```
|
|
80
|
+
|
|
60
81
|
### For n8n.cloud:
|
|
61
82
|
|
|
62
|
-
Not yet available. This node must first be approved as a community node by the
|
|
83
|
+
Not yet available. This node must first be approved as a community node by the n8n team.
|
|
63
84
|
|
|
64
85
|
## Setup
|
|
65
86
|
|
|
@@ -234,6 +255,30 @@ This is standard practice and well-documented in the node's README.
|
|
|
234
255
|
|
|
235
256
|
## Troubleshooting
|
|
236
257
|
|
|
258
|
+
### "ERESOLVE unable to resolve dependency tree" or "Package subpath './agents' is not defined"
|
|
259
|
+
|
|
260
|
+
**Cause:**
|
|
261
|
+
Conflicting `langchain` versions between community nodes. Some nodes require `langchain@1.x` while our AI Agent tools require `langchain@0.3.x` (n8n's built-in version).
|
|
262
|
+
|
|
263
|
+
**Solution:**
|
|
264
|
+
Always install with `--legacy-peer-deps`:
|
|
265
|
+
```bash
|
|
266
|
+
cd ~/.n8n/nodes
|
|
267
|
+
npm install n8n-nodes-agnicwallet --legacy-peer-deps
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Or set it globally:
|
|
271
|
+
```bash
|
|
272
|
+
echo "legacy-peer-deps=true" >> ~/.npmrc
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
If you already installed without this flag, clean up and reinstall:
|
|
276
|
+
```bash
|
|
277
|
+
cd ~/.n8n/nodes
|
|
278
|
+
rm -rf node_modules package-lock.json
|
|
279
|
+
npm install --legacy-peer-deps
|
|
280
|
+
```
|
|
281
|
+
|
|
237
282
|
### "Payment signing failed"
|
|
238
283
|
|
|
239
284
|
**Causes:**
|
|
@@ -242,7 +287,7 @@ This is standard practice and well-documented in the node's README.
|
|
|
242
287
|
- Backend server down
|
|
243
288
|
|
|
244
289
|
**Solutions:**
|
|
245
|
-
1. Reconnect credentials in
|
|
290
|
+
1. Reconnect credentials in n8n
|
|
246
291
|
2. Check balance at [AgnicWallet](https://app.agnicpay.xyz)
|
|
247
292
|
3. Check backend status
|
|
248
293
|
|
|
@@ -1,42 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// credentials/AgnicWalletApi.credentials.ts
|
|
22
|
+
var AgnicWalletApi_credentials_exports = {};
|
|
23
|
+
__export(AgnicWalletApi_credentials_exports, {
|
|
24
|
+
AgnicWalletApi: () => AgnicWalletApi
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(AgnicWalletApi_credentials_exports);
|
|
27
|
+
var AgnicWalletApi = class {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.name = "agnicWalletApi";
|
|
30
|
+
this.displayName = "AgnicWallet API";
|
|
31
|
+
this.documentationUrl = "https://github.com/agnicpay/n8n-X402-AgnicWallet#setup";
|
|
32
|
+
this.properties = [
|
|
33
|
+
{
|
|
34
|
+
displayName: "User ID",
|
|
35
|
+
name: "userId",
|
|
36
|
+
type: "string",
|
|
37
|
+
default: "",
|
|
38
|
+
required: true,
|
|
39
|
+
description: "Your AgnicWallet user ID (from dashboard)",
|
|
40
|
+
placeholder: "user_2kX9mNz8pQw7VbC"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: "API Token",
|
|
44
|
+
name: "apiToken",
|
|
45
|
+
type: "string",
|
|
46
|
+
typeOptions: {
|
|
47
|
+
password: true
|
|
48
|
+
},
|
|
49
|
+
default: "",
|
|
50
|
+
required: true,
|
|
51
|
+
description: "Your AgnicWallet API token (starts with agnic_tok_)",
|
|
52
|
+
placeholder: "agnic_tok_sk_live_..."
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
this.authenticate = {
|
|
56
|
+
type: "generic",
|
|
57
|
+
properties: {
|
|
58
|
+
headers: {
|
|
59
|
+
"X-Agnic-Token": "={{$credentials.apiToken}}"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
__name(this, "AgnicWalletApi");
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
AgnicWalletApi
|
|
71
|
+
});
|
|
@@ -1,92 +1,121 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// credentials/AgnicWalletOAuth2Api.credentials.ts
|
|
22
|
+
var AgnicWalletOAuth2Api_credentials_exports = {};
|
|
23
|
+
__export(AgnicWalletOAuth2Api_credentials_exports, {
|
|
24
|
+
AgnicWalletOAuth2Api: () => AgnicWalletOAuth2Api
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(AgnicWalletOAuth2Api_credentials_exports);
|
|
27
|
+
var AgnicWalletOAuth2Api = class {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.name = "agnicWalletOAuth2Api";
|
|
30
|
+
this.extends = ["oAuth2Api"];
|
|
31
|
+
this.displayName = "AgnicWallet OAuth2 API";
|
|
32
|
+
this.documentationUrl = "https://github.com/agnicpay/n8n-X402-AgnicWallet#readme";
|
|
33
|
+
this.properties = [
|
|
34
|
+
{
|
|
35
|
+
displayName: "Grant Type",
|
|
36
|
+
name: "grantType",
|
|
37
|
+
type: "hidden",
|
|
38
|
+
default: "authorizationCode"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
displayName: "Authorization URL",
|
|
42
|
+
name: "authUrl",
|
|
43
|
+
type: "string",
|
|
44
|
+
default: "https://api.agnicpay.xyz/oauth/authorize",
|
|
45
|
+
required: true,
|
|
46
|
+
description: "The OAuth2 authorization endpoint"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: "Access Token URL",
|
|
50
|
+
name: "accessTokenUrl",
|
|
51
|
+
type: "string",
|
|
52
|
+
default: "https://api.agnicpay.xyz/oauth/token",
|
|
53
|
+
required: true,
|
|
54
|
+
description: "The OAuth2 token endpoint"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: "Client ID",
|
|
58
|
+
name: "clientId",
|
|
59
|
+
type: "string",
|
|
60
|
+
default: "n8n_default",
|
|
61
|
+
required: true,
|
|
62
|
+
description: "OAuth2 Client ID (default: n8n_default)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: "Client Secret",
|
|
66
|
+
name: "clientSecret",
|
|
67
|
+
type: "string",
|
|
68
|
+
typeOptions: {
|
|
69
|
+
password: true
|
|
70
|
+
},
|
|
71
|
+
default: "",
|
|
72
|
+
description: "OAuth2 Client Secret (optional for PKCE)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
displayName: "Scope",
|
|
76
|
+
name: "scope",
|
|
77
|
+
type: "string",
|
|
78
|
+
default: "payments:sign balance:read",
|
|
79
|
+
description: "OAuth2 scopes"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
displayName: "Auth URI Query Parameters",
|
|
83
|
+
name: "authQueryParameters",
|
|
84
|
+
type: "string",
|
|
85
|
+
default: "",
|
|
86
|
+
description: "Additional query parameters for authorization URL"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: "Authentication",
|
|
90
|
+
name: "authentication",
|
|
91
|
+
type: "options",
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
name: "Body",
|
|
95
|
+
value: "body"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "Header",
|
|
99
|
+
value: "header"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
default: "body",
|
|
103
|
+
description: "How to send credentials"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
displayName: "Use PKCE",
|
|
107
|
+
name: "usePKCE",
|
|
108
|
+
type: "boolean",
|
|
109
|
+
default: true,
|
|
110
|
+
description: "Whether to use PKCE (Proof Key for Code Exchange)"
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
__name(this, "AgnicWalletOAuth2Api");
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
AgnicWalletOAuth2Api
|
|
121
|
+
});
|