n8n-nodes-boltx-crypto 0.1.0

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 ADDED
@@ -0,0 +1,37 @@
1
+ # n8n-nodes-boltx-crypto
2
+
3
+ Node cộng đồng n8n: **giải mã AES-CBC** (aes-128/192/256) với `key` / `iv` / `data` động per-item.
4
+
5
+ Khớp **type** `n8n-nodes-boltx-crypto.crypto` với custom executor `BoltXCryptoNode` trong goworker
6
+ (`worker/internal/engine/node_boltx_crypto.go`) — chạy native bằng Go, không cần goja Code node.
7
+
8
+ ## Operation
9
+ - **AES Decrypt** (`aesDecrypt`): giải mã AES-CBC, unpad PKCS7.
10
+
11
+ ## Tham số
12
+ | Field | Mặc định | Ghi chú |
13
+ |---|---|---|
14
+ | `algorithm` | `aes-128-cbc` | `aes-128/192/256-cbc` (key 16/24/32 byte sau decode) |
15
+ | `data` | — | ciphertext, vd `={{ $json.body.data }}` |
16
+ | `inputEncoding` | `base64` | encoding của `data` |
17
+ | `key` | — | key, vd hằng base64 hoặc đọc từ DB row |
18
+ | `keyEncoding` | `base64` | |
19
+ | `iv` | — | initialization vector |
20
+ | `ivEncoding` | `base64` | |
21
+ | `jsonParse` | `true` | parse plaintext thành JSON object làm output; tắt → `{ data: plaintext }` |
22
+ | `outputEncoding` | `utf8` | chỉ khi `jsonParse=false` |
23
+
24
+ ## Use case: giải mã payload eKYC VNPay
25
+ Thay Code node `crypto.createDecipheriv('aes-128-cbc', key, iv)`:
26
+ - `data` = `={{ $('ekyc/i/update-customer-info').first().json.body.data }}`
27
+ - `key` = `nZ23RYcu2u1fposjpgbCCw==` (base64, GLOBAL — khớp Java `aes.aes-key`)
28
+ - `iv` = `EvaSqYFLYbyUzJszpE3Tag==` (base64, GLOBAL — khớp Java `aes.aes-iv`)
29
+ - `jsonParse` = true → output trực tiếp object eKYC (`customerCode`, `partnerCode`, `cardNumber`, …)
30
+
31
+ Validate nghiệp vụ (`step=liveness`, `isSuccess=true`, field bắt buộc) đặt ở node sau.
32
+
33
+ ## Build
34
+ ```bash
35
+ npm install && npm run build # tsc + copy icon → dist/
36
+ ```
37
+ Parity giải mã được test trong goworker: `worker/internal/engine/node_boltx_crypto_test.go`.
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Crypto implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,232 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Crypto = void 0;
37
+ const n8n_workflow_1 = require("n8n-workflow");
38
+ const crypto = __importStar(require("crypto"));
39
+ function toBytes(s, enc) {
40
+ switch (enc) {
41
+ case 'base64':
42
+ return Buffer.from(s, 'base64');
43
+ case 'base64url':
44
+ return Buffer.from(s, 'base64url');
45
+ case 'hex':
46
+ return Buffer.from(s, 'hex');
47
+ default:
48
+ return Buffer.from(s, 'utf8');
49
+ }
50
+ }
51
+ class Crypto {
52
+ constructor() {
53
+ this.description = {
54
+ displayName: 'Crypto (BoltX)',
55
+ name: 'crypto',
56
+ icon: 'file:crypto.svg',
57
+ group: ['transform'],
58
+ version: 1,
59
+ subtitle: '={{ $parameter["operation"] + " · " + ($parameter["algorithm"] || "aes-128-cbc") }}',
60
+ description: 'Giải mã AES-CBC với key/iv/data động per-item. Khớp type với goworker.',
61
+ defaults: { name: 'Crypto (BoltX)' },
62
+ inputs: ['main'],
63
+ outputs: ['main'],
64
+ properties: [
65
+ {
66
+ displayName: 'Operation',
67
+ name: 'operation',
68
+ type: 'options',
69
+ noDataExpression: true,
70
+ options: [
71
+ { name: 'AES Decrypt', value: 'aesDecrypt', description: 'Giải mã AES-CBC (PKCS7)' },
72
+ ],
73
+ default: 'aesDecrypt',
74
+ },
75
+ {
76
+ displayName: 'Algorithm',
77
+ name: 'algorithm',
78
+ type: 'options',
79
+ options: [
80
+ { name: 'aes-128-cbc', value: 'aes-128-cbc' },
81
+ { name: 'aes-192-cbc', value: 'aes-192-cbc' },
82
+ { name: 'aes-256-cbc', value: 'aes-256-cbc' },
83
+ ],
84
+ default: 'aes-128-cbc',
85
+ description: 'Thuật toán AES-CBC. Độ dài key phải khớp (16/24/32 byte sau khi decode).',
86
+ },
87
+ {
88
+ displayName: 'Data (ciphertext)',
89
+ name: 'data',
90
+ type: 'string',
91
+ typeOptions: { rows: 3 },
92
+ default: '',
93
+ placeholder: '={{ $json.body.data }}',
94
+ description: 'Chuỗi đã mã hoá. Encoding khai báo ở "Input Encoding".',
95
+ },
96
+ {
97
+ displayName: 'Input Encoding',
98
+ name: 'inputEncoding',
99
+ type: 'options',
100
+ options: [
101
+ { name: 'base64', value: 'base64' },
102
+ { name: 'base64url', value: 'base64url' },
103
+ { name: 'hex', value: 'hex' },
104
+ { name: 'utf8', value: 'utf8' },
105
+ ],
106
+ default: 'base64',
107
+ description: 'Encoding của Data.',
108
+ },
109
+ {
110
+ displayName: 'Key',
111
+ name: 'key',
112
+ type: 'string',
113
+ typeOptions: { password: true },
114
+ default: '',
115
+ placeholder: '={{ $json.aes_key }}',
116
+ description: 'Key AES. Encoding khai báo ở "Key Encoding". Hỗ trợ expression đọc từ DB row.',
117
+ },
118
+ {
119
+ displayName: 'Key Encoding',
120
+ name: 'keyEncoding',
121
+ type: 'options',
122
+ options: [
123
+ { name: 'base64', value: 'base64' },
124
+ { name: 'base64url', value: 'base64url' },
125
+ { name: 'hex', value: 'hex' },
126
+ { name: 'utf8', value: 'utf8' },
127
+ ],
128
+ default: 'base64',
129
+ },
130
+ {
131
+ displayName: 'IV',
132
+ name: 'iv',
133
+ type: 'string',
134
+ typeOptions: { password: true },
135
+ default: '',
136
+ placeholder: '={{ $json.aes_iv }}',
137
+ description: 'Initialization vector. Encoding khai báo ở "IV Encoding".',
138
+ },
139
+ {
140
+ displayName: 'IV Encoding',
141
+ name: 'ivEncoding',
142
+ type: 'options',
143
+ options: [
144
+ { name: 'base64', value: 'base64' },
145
+ { name: 'base64url', value: 'base64url' },
146
+ { name: 'hex', value: 'hex' },
147
+ { name: 'utf8', value: 'utf8' },
148
+ ],
149
+ default: 'base64',
150
+ },
151
+ {
152
+ displayName: 'Parse Plaintext as JSON',
153
+ name: 'jsonParse',
154
+ type: 'boolean',
155
+ default: true,
156
+ description: 'Whether to parse the decrypted text as a JSON object and output its fields directly. Nếu tắt: output { data: plaintext }.',
157
+ },
158
+ {
159
+ displayName: 'Output Encoding',
160
+ name: 'outputEncoding',
161
+ type: 'options',
162
+ options: [
163
+ { name: 'utf8', value: 'utf8' },
164
+ { name: 'base64', value: 'base64' },
165
+ { name: 'hex', value: 'hex' },
166
+ ],
167
+ default: 'utf8',
168
+ description: 'Encoding của plaintext khi không parse JSON.',
169
+ displayOptions: { show: { jsonParse: [false] } },
170
+ },
171
+ ],
172
+ };
173
+ }
174
+ async execute() {
175
+ var _a, _b, _c;
176
+ const items = this.getInputData();
177
+ const out = [];
178
+ for (let i = 0; i < items.length; i++) {
179
+ try {
180
+ const operation = this.getNodeParameter('operation', i, 'aesDecrypt');
181
+ if (operation !== 'aesDecrypt') {
182
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `operation ${operation} chưa hỗ trợ`, { itemIndex: i });
183
+ }
184
+ const algorithm = this.getNodeParameter('algorithm', i, 'aes-128-cbc').toLowerCase();
185
+ const inputEncoding = this.getNodeParameter('inputEncoding', i, 'base64');
186
+ const keyEncoding = this.getNodeParameter('keyEncoding', i, 'base64');
187
+ const ivEncoding = this.getNodeParameter('ivEncoding', i, 'base64');
188
+ const jsonParse = this.getNodeParameter('jsonParse', i, true);
189
+ const dataRaw = String((_a = this.getNodeParameter('data', i, '')) !== null && _a !== void 0 ? _a : '');
190
+ const keyRaw = String((_b = this.getNodeParameter('key', i, '')) !== null && _b !== void 0 ? _b : '').trim();
191
+ const ivRaw = String((_c = this.getNodeParameter('iv', i, '')) !== null && _c !== void 0 ? _c : '').trim();
192
+ if (!keyRaw) {
193
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'crypto: key rỗng', { itemIndex: i });
194
+ }
195
+ if (!dataRaw) {
196
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'crypto: data rỗng', { itemIndex: i });
197
+ }
198
+ const key = toBytes(keyRaw, keyEncoding);
199
+ const iv = toBytes(ivRaw, ivEncoding);
200
+ const data = toBytes(dataRaw, inputEncoding);
201
+ const decipher = crypto.createDecipheriv(algorithm, key, iv);
202
+ const plain = Buffer.concat([decipher.update(data), decipher.final()]);
203
+ let result;
204
+ if (jsonParse) {
205
+ const parsed = JSON.parse(plain.toString('utf8'));
206
+ if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
207
+ result = parsed;
208
+ }
209
+ else {
210
+ result = { data: parsed };
211
+ }
212
+ }
213
+ else {
214
+ const outputEncoding = this.getNodeParameter('outputEncoding', i, 'utf8');
215
+ result = { data: plain.toString(outputEncoding) };
216
+ }
217
+ out.push({ json: result, pairedItem: { item: i } });
218
+ }
219
+ catch (error) {
220
+ if (this.continueOnFail()) {
221
+ const msg = error instanceof Error ? error.message : String(error);
222
+ out.push({ json: { error: msg }, pairedItem: { item: i } });
223
+ continue;
224
+ }
225
+ throw error;
226
+ }
227
+ }
228
+ return [out];
229
+ }
230
+ }
231
+ exports.Crypto = Crypto;
232
+ //# sourceMappingURL=Crypto.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Crypto.node.js","sourceRoot":"","sources":["../../../nodes/Crypto/Crypto.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOsB;AACtB,+CAAiC;AAIjC,SAAS,OAAO,CAAC,CAAS,EAAE,GAAa;IACxC,QAAQ,GAAG,EAAE,CAAC;QACb,KAAK,QAAQ;YACZ,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;QACjC,KAAK,WAAW;YACf,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QACpC,KAAK,KAAK;YACT,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9B;YACC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;AACF,CAAC;AAED,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAA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C,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACrD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACnE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC5D,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACD;AAvLD,wBAuLC"}
@@ -0,0 +1,13 @@
1
+ {
2
+ "node": "n8n-nodes-boltx-crypto.crypto",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Utility"],
6
+ "resources": {
7
+ "primaryDocumentation": [
8
+ {
9
+ "url": "https://github.com/Bolt-X/bds-core/tree/main/worker/node-raw/n8n-nodes-boltx-crypto"
10
+ }
11
+ ]
12
+ }
13
+ }
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" width="60" height="60">
2
+ <circle cx="30" cy="30" r="26" fill="#1FA971" stroke="#0E6A45" stroke-width="2"/>
3
+ <path d="M30 16a8 8 0 0 0-8 8v4h-2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V30a2 2 0 0 0-2-2h-2v-4a8 8 0 0 0-8-8zm-4 12v-4a4 4 0 0 1 8 0v4z" fill="#FFFFFF"/>
4
+ </svg>
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "n8n-nodes-boltx-crypto",
3
+ "version": "0.1.0",
4
+ "description": "n8n community node — giải mã AES-CBC (aes-128/192/256) với key/iv/data động per-item (multi-tenant). Khớp type với goworker custom executor.",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "crypto",
9
+ "aes",
10
+ "ekyc",
11
+ "boltx"
12
+ ],
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/Bolt-X/bds-core/tree/main/worker/node-raw/n8n-nodes-boltx-crypto",
15
+ "author": {
16
+ "name": "BoltX",
17
+ "email": "dev@bolter.work"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Bolt-X/bds-core.git",
22
+ "directory": "worker/node-raw/n8n-nodes-boltx-crypto"
23
+ },
24
+ "main": "index.js",
25
+ "scripts": {
26
+ "build": "tsc && gulp build:icons",
27
+ "dev": "tsc --watch",
28
+ "format": "prettier nodes --write",
29
+ "lint": "eslint nodes package.json",
30
+ "lintfix": "eslint nodes package.json --fix",
31
+ "prepublishOnly": "npm run build"
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "n8n": {
37
+ "n8nNodesApiVersion": 1,
38
+ "credentials": [],
39
+ "nodes": [
40
+ "dist/nodes/Crypto/Crypto.node.js"
41
+ ]
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.10.0",
45
+ "@typescript-eslint/parser": "^7.15.0",
46
+ "eslint": "^8.56.0",
47
+ "eslint-plugin-n8n-nodes-base": "^1.16.3",
48
+ "gulp": "^4.0.2",
49
+ "n8n-workflow": "*",
50
+ "prettier": "^3.2.5",
51
+ "typescript": "^5.4.5"
52
+ },
53
+ "peerDependencies": {
54
+ "n8n-workflow": "*"
55
+ }
56
+ }
package/index.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "n8n-nodes-boltx-crypto",
3
+ "version": "0.1.0",
4
+ "description": "n8n community node — giải mã AES-CBC (aes-128/192/256) với key/iv/data động per-item (multi-tenant). Khớp type với goworker custom executor.",
5
+ "keywords": [
6
+ "n8n-community-node-package",
7
+ "n8n",
8
+ "crypto",
9
+ "aes",
10
+ "ekyc",
11
+ "boltx"
12
+ ],
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/Bolt-X/bds-core/tree/main/worker/node-raw/n8n-nodes-boltx-crypto",
15
+ "author": {
16
+ "name": "BoltX",
17
+ "email": "dev@bolter.work"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Bolt-X/bds-core.git",
22
+ "directory": "worker/node-raw/n8n-nodes-boltx-crypto"
23
+ },
24
+ "main": "index.js",
25
+ "scripts": {
26
+ "build": "tsc && gulp build:icons",
27
+ "dev": "tsc --watch",
28
+ "format": "prettier nodes --write",
29
+ "lint": "eslint nodes package.json",
30
+ "lintfix": "eslint nodes package.json --fix",
31
+ "prepublishOnly": "npm run build"
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "n8n": {
37
+ "n8nNodesApiVersion": 1,
38
+ "credentials": [],
39
+ "nodes": [
40
+ "dist/nodes/Crypto/Crypto.node.js"
41
+ ]
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.10.0",
45
+ "@typescript-eslint/parser": "^7.15.0",
46
+ "eslint": "^8.56.0",
47
+ "eslint-plugin-n8n-nodes-base": "^1.16.3",
48
+ "gulp": "^4.0.2",
49
+ "n8n-workflow": "*",
50
+ "prettier": "^3.2.5",
51
+ "typescript": "^5.4.5"
52
+ },
53
+ "peerDependencies": {
54
+ "n8n-workflow": "*"
55
+ }
56
+ }