n8n-nodes-api3 1.0.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.
Files changed (76) hide show
  1. package/LICENSE +46 -0
  2. package/README.md +365 -0
  3. package/dist/credentials/Api3Credentials.credentials.d.ts +10 -0
  4. package/dist/credentials/Api3Credentials.credentials.d.ts.map +1 -0
  5. package/dist/credentials/Api3Credentials.credentials.js +113 -0
  6. package/dist/credentials/Api3Credentials.credentials.js.map +1 -0
  7. package/dist/index.d.ts +4 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +26 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/nodes/Api3/Api3.node.d.ts +12 -0
  12. package/dist/nodes/Api3/Api3.node.d.ts.map +1 -0
  13. package/dist/nodes/Api3/Api3.node.js +1116 -0
  14. package/dist/nodes/Api3/Api3.node.js.map +1 -0
  15. package/dist/nodes/Api3/Api3Trigger.node.d.ts +14 -0
  16. package/dist/nodes/Api3/Api3Trigger.node.d.ts.map +1 -0
  17. package/dist/nodes/Api3/Api3Trigger.node.js +396 -0
  18. package/dist/nodes/Api3/Api3Trigger.node.js.map +1 -0
  19. package/dist/nodes/Api3/actions/airnodes/index.d.ts +6 -0
  20. package/dist/nodes/Api3/actions/airnodes/index.d.ts.map +1 -0
  21. package/dist/nodes/Api3/actions/airnodes/index.js +142 -0
  22. package/dist/nodes/Api3/actions/airnodes/index.js.map +1 -0
  23. package/dist/nodes/Api3/actions/dao/index.d.ts +6 -0
  24. package/dist/nodes/Api3/actions/dao/index.d.ts.map +1 -0
  25. package/dist/nodes/Api3/actions/dao/index.js +229 -0
  26. package/dist/nodes/Api3/actions/dao/index.js.map +1 -0
  27. package/dist/nodes/Api3/actions/dapis/index.d.ts +6 -0
  28. package/dist/nodes/Api3/actions/dapis/index.d.ts.map +1 -0
  29. package/dist/nodes/Api3/actions/dapis/index.js +153 -0
  30. package/dist/nodes/Api3/actions/dapis/index.js.map +1 -0
  31. package/dist/nodes/Api3/actions/dataFeeds/index.d.ts +6 -0
  32. package/dist/nodes/Api3/actions/dataFeeds/index.d.ts.map +1 -0
  33. package/dist/nodes/Api3/actions/dataFeeds/index.js +147 -0
  34. package/dist/nodes/Api3/actions/dataFeeds/index.js.map +1 -0
  35. package/dist/nodes/Api3/actions/governance/index.d.ts +6 -0
  36. package/dist/nodes/Api3/actions/governance/index.d.ts.map +1 -0
  37. package/dist/nodes/Api3/actions/governance/index.js +295 -0
  38. package/dist/nodes/Api3/actions/governance/index.js.map +1 -0
  39. package/dist/nodes/Api3/actions/insurance/index.d.ts +6 -0
  40. package/dist/nodes/Api3/actions/insurance/index.d.ts.map +1 -0
  41. package/dist/nodes/Api3/actions/insurance/index.js +194 -0
  42. package/dist/nodes/Api3/actions/insurance/index.js.map +1 -0
  43. package/dist/nodes/Api3/actions/oev/index.d.ts +6 -0
  44. package/dist/nodes/Api3/actions/oev/index.d.ts.map +1 -0
  45. package/dist/nodes/Api3/actions/oev/index.js +140 -0
  46. package/dist/nodes/Api3/actions/oev/index.js.map +1 -0
  47. package/dist/nodes/Api3/actions/subscriptions/index.d.ts +6 -0
  48. package/dist/nodes/Api3/actions/subscriptions/index.d.ts.map +1 -0
  49. package/dist/nodes/Api3/actions/subscriptions/index.js +235 -0
  50. package/dist/nodes/Api3/actions/subscriptions/index.js.map +1 -0
  51. package/dist/nodes/Api3/actions/token/index.d.ts +6 -0
  52. package/dist/nodes/Api3/actions/token/index.d.ts.map +1 -0
  53. package/dist/nodes/Api3/actions/token/index.js +174 -0
  54. package/dist/nodes/Api3/actions/token/index.js.map +1 -0
  55. package/dist/nodes/Api3/actions/utility/index.d.ts +6 -0
  56. package/dist/nodes/Api3/actions/utility/index.d.ts.map +1 -0
  57. package/dist/nodes/Api3/actions/utility/index.js +211 -0
  58. package/dist/nodes/Api3/actions/utility/index.js.map +1 -0
  59. package/dist/nodes/Api3/api3.svg +8 -0
  60. package/dist/nodes/Api3/constants/index.d.ts +101 -0
  61. package/dist/nodes/Api3/constants/index.d.ts.map +1 -0
  62. package/dist/nodes/Api3/constants/index.js +407 -0
  63. package/dist/nodes/Api3/constants/index.js.map +1 -0
  64. package/dist/nodes/Api3/transport/index.d.ts +98 -0
  65. package/dist/nodes/Api3/transport/index.d.ts.map +1 -0
  66. package/dist/nodes/Api3/transport/index.js +333 -0
  67. package/dist/nodes/Api3/transport/index.js.map +1 -0
  68. package/dist/nodes/Api3/utils/helpers.d.ts +112 -0
  69. package/dist/nodes/Api3/utils/helpers.d.ts.map +1 -0
  70. package/dist/nodes/Api3/utils/helpers.js +294 -0
  71. package/dist/nodes/Api3/utils/helpers.js.map +1 -0
  72. package/dist/nodes/Api3/utils/types.d.ts +452 -0
  73. package/dist/nodes/Api3/utils/types.d.ts.map +1 -0
  74. package/dist/nodes/Api3/utils/types.js +9 -0
  75. package/dist/nodes/Api3/utils/types.js.map +1 -0
  76. package/package.json +86 -0
package/LICENSE ADDED
@@ -0,0 +1,46 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2017 MariaDB Corporation Ab.
4
+
5
+ Licensor:
6
+ Velocity BPA, LLC
7
+ https://velobpa.com
8
+
9
+ Licensed Work:
10
+ This repository and all source code, documentation, and associated artifacts
11
+ contained herein, including all n8n community nodes published by Velocity BPA.
12
+
13
+ Additional Use Grant:
14
+ You may use, modify, and run the Licensed Work free of charge for:
15
+ - Personal use
16
+ - Educational use
17
+ - Research use
18
+ - Internal business use, provided such use does not involve resale,
19
+ redistribution, or offering the Licensed Work as part of a commercial
20
+ product or service.
21
+
22
+ Commercial Use Restriction:
23
+ Commercial Use of the Licensed Work is prohibited without a valid
24
+ Commercial License issued by the Licensor.
25
+
26
+ Commercial Use includes, but is not limited to:
27
+ - Use of the Licensed Work within any Software-as-a-Service (SaaS),
28
+ Platform-as-a-Service (PaaS), or hosted application that is sold,
29
+ licensed, or monetized in any form
30
+ - Offering the Licensed Work as part of a managed services engagement
31
+ - Bundling or redistributing the Licensed Work with a paid product
32
+ - Reselling, sublicensing, or white-labeling the Licensed Work
33
+ - Embedding the Licensed Work into any commercial automation platform,
34
+ integration product, or solution offering
35
+
36
+ Change Date:
37
+ January 1, 2030
38
+
39
+ Change License:
40
+ Apache License, Version 2.0
41
+
42
+ For commercial licensing inquiries:
43
+ licensing@velobpa.com
44
+
45
+ Business Source License 1.1 full text:
46
+ https://mariadb.com/bsl11/
package/README.md ADDED
@@ -0,0 +1,365 @@
1
+ # n8n-nodes-api3
2
+
3
+ > [Velocity BPA Licensing Notice]
4
+ >
5
+ > This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
6
+ >
7
+ > Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
8
+ >
9
+ > For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.
10
+
11
+ A comprehensive n8n community node for API3 decentralized oracle protocol providing 10 resources and 50+ operations for dAPIs, Airnodes, OEV auctions, DAO governance, and staking. Includes multi-chain support and poll-based triggers.
12
+
13
+ ![n8n](https://img.shields.io/badge/n8n-community--node-blue)
14
+ ![Version](https://img.shields.io/badge/version-1.0.0-green)
15
+ ![License](https://img.shields.io/badge/license-BSL--1.1-blue)
16
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)
17
+
18
+ ## Features
19
+
20
+ - **dAPIs (Decentralized APIs)**: Read price feeds, get feed info, list available feeds, check deviation thresholds
21
+ - **Data Feeds**: Read raw data feeds by ID, get historical values, batch read multiple feeds
22
+ - **Airnodes**: Get Airnode info, list available nodes, make Airnode requests
23
+ - **OEV (Oracle Extractable Value)**: Get OEV network info, view auctions, place bids
24
+ - **API3 DAO**: Get staking info, user stake, stake/unstake tokens, claim rewards
25
+ - **Governance**: Get proposals, vote on proposals, check vote records, view treasury
26
+ - **API3 Token**: Get price, supply info, user balances, transfer tokens
27
+ - **Insurance/Coverage**: Get policy info, available coverage, claims history
28
+ - **Subscriptions**: Manage dAPI subscriptions
29
+ - **Utilities**: Get supported chains, contract addresses, encode parameters, health checks
30
+ - **Triggers**: Poll-based triggers for price updates, deviation thresholds, auctions, proposals, and rewards
31
+
32
+ ## Installation
33
+
34
+ ### Community Nodes (Recommended)
35
+
36
+ 1. Go to **Settings > Community Nodes**
37
+ 2. Click **Install**
38
+ 3. Enter `n8n-nodes-api3`
39
+ 4. Click **Install**
40
+
41
+ ### Manual Installation
42
+
43
+ ```bash
44
+ # Navigate to your n8n custom nodes directory
45
+ cd ~/.n8n/custom
46
+
47
+ # Install the package
48
+ npm install n8n-nodes-api3
49
+ ```
50
+
51
+ ### Development Installation
52
+
53
+ ```bash
54
+ # Clone the repository
55
+ git clone https://github.com/Velocity-BPA/n8n-nodes-api3.git
56
+ cd n8n-nodes-api3
57
+
58
+ # Install dependencies
59
+ npm install
60
+
61
+ # Build the project
62
+ npm run build
63
+
64
+ # Create symlink to n8n custom nodes
65
+ mkdir -p ~/.n8n/custom
66
+ ln -s $(pwd) ~/.n8n/custom/n8n-nodes-api3
67
+
68
+ # Restart n8n
69
+ ```
70
+
71
+ ## Credentials Setup
72
+
73
+ Create API3 credentials in n8n with the following fields:
74
+
75
+ | Field | Type | Required | Description |
76
+ |-------|------|----------|-------------|
77
+ | Network | Select | Yes | Blockchain network (ethereum, polygon, arbitrum, etc.) |
78
+ | RPC Endpoint | String | Yes | JSON-RPC endpoint URL |
79
+ | Private Key | Password | No | For write operations (staking, voting, transfers) |
80
+ | API3 Market API Key | Password | No | For enhanced API3 Market API access |
81
+ | OEV Network API Key | Password | No | For OEV auction operations |
82
+
83
+ ### Getting an RPC Endpoint
84
+
85
+ You can use free RPC endpoints from:
86
+ - [Alchemy](https://www.alchemy.com/)
87
+ - [Infura](https://infura.io/)
88
+ - [QuickNode](https://www.quicknode.com/)
89
+ - [Ankr](https://www.ankr.com/)
90
+
91
+ Or use public endpoints (rate limited):
92
+ - Ethereum: `https://eth.llamarpc.com`
93
+ - Polygon: `https://polygon-rpc.com`
94
+ - Arbitrum: `https://arb1.arbitrum.io/rpc`
95
+
96
+ ## Resources & Operations
97
+
98
+ ### dAPIs
99
+
100
+ | Operation | Description |
101
+ |-----------|-------------|
102
+ | Get dAPI Value | Read current price feed value |
103
+ | Get dAPI Info | Get feed details (sources, deviation) |
104
+ | List dAPIs | Get available feeds for network |
105
+ | Get dAPI Update Time | Get last update timestamp |
106
+ | Get dAPI Deviation | Get update threshold |
107
+ | Get dAPI Sources | Get data provider list |
108
+
109
+ ### Data Feeds
110
+
111
+ | Operation | Description |
112
+ |-----------|-------------|
113
+ | Read Data Feed | Get current value by feed ID |
114
+ | Get Feed History | Get historical values |
115
+ | Get Feed Metadata | Get feed information |
116
+ | Get Multiple Feeds | Batch read feeds |
117
+ | Get Feed Beacon | Get individual source data |
118
+
119
+ ### Airnodes
120
+
121
+ | Operation | Description |
122
+ |-----------|-------------|
123
+ | Get Airnode Info | Get node details |
124
+ | List Airnodes | Get available Airnodes |
125
+ | Get Airnode Endpoints | Get API endpoints |
126
+ | Make Airnode Request | Call API through Airnode |
127
+ | Get Request Status | Check response status |
128
+
129
+ ### OEV (Oracle Extractable Value)
130
+
131
+ | Operation | Description |
132
+ |-----------|-------------|
133
+ | Get OEV Network Info | Get network status |
134
+ | Get Auction Info | Get current auction details |
135
+ | Place OEV Bid | Submit bid |
136
+ | Get Bid Status | Check bid result |
137
+ | Get OEV Stats | Get protocol statistics |
138
+
139
+ ### API3 DAO
140
+
141
+ | Operation | Description |
142
+ |-----------|-------------|
143
+ | Get Staking Info | Get staking pool details |
144
+ | Get User Stake | Get user's staked amount |
145
+ | Stake API3 | Deposit tokens to staking pool |
146
+ | Unstake API3 | Request withdrawal |
147
+ | Get Rewards | Get pending rewards |
148
+ | Claim Rewards | Withdraw rewards |
149
+ | Get APR | Get current staking yield |
150
+
151
+ ### Governance
152
+
153
+ | Operation | Description |
154
+ |-----------|-------------|
155
+ | Get Proposals | Get DAO proposals |
156
+ | Get Proposal | Get single proposal |
157
+ | Vote on Proposal | Cast vote |
158
+ | Get Vote Record | Get voting history |
159
+ | Get Treasury | Get DAO treasury |
160
+
161
+ ### API3 Token
162
+
163
+ | Operation | Description |
164
+ |-----------|-------------|
165
+ | Get API3 Price | Get current price |
166
+ | Get API3 Supply | Get token supply |
167
+ | Get User Balance | Get token balance |
168
+ | Transfer API3 | Send tokens |
169
+
170
+ ### Insurance (Coverage)
171
+
172
+ | Operation | Description |
173
+ |-----------|-------------|
174
+ | Get Coverage Info | Get policy details |
175
+ | Get Available Coverage | Get available policies |
176
+ | Get Claims | Get claim history |
177
+ | Check Coverage | Verify active policy |
178
+
179
+ ### Subscriptions
180
+
181
+ | Operation | Description |
182
+ |-----------|-------------|
183
+ | Get Subscription | Get dAPI subscription |
184
+ | List Subscriptions | Get active subscriptions |
185
+ | Create Subscription | Subscribe to dAPI |
186
+ | Renew Subscription | Extend subscription |
187
+
188
+ ### Utility
189
+
190
+ | Operation | Description |
191
+ |-----------|-------------|
192
+ | Get Supported Chains | Get available networks |
193
+ | Get Contract Addresses | Get deployed contracts |
194
+ | Encode Parameters | Encode Airnode parameters |
195
+ | Get API Health | Check service status |
196
+
197
+ ## Trigger Node
198
+
199
+ The API3 Trigger node polls for events at configurable intervals:
200
+
201
+ | Trigger | Description |
202
+ |---------|-------------|
203
+ | dAPI Price Update | Fires when a dAPI price feed is updated |
204
+ | dAPI Deviation Threshold | Fires when price moves beyond threshold |
205
+ | OEV Auction Started | Fires when a new OEV auction begins |
206
+ | Governance Proposal | Fires when a new DAO proposal is created |
207
+ | Stake Reward Available | Fires when staking rewards are available |
208
+
209
+ ## Usage Examples
210
+
211
+ ### Read ETH/USD Price
212
+
213
+ ```json
214
+ {
215
+ "nodes": [
216
+ {
217
+ "name": "API3",
218
+ "type": "n8n-nodes-api3.api3",
219
+ "parameters": {
220
+ "resource": "dapis",
221
+ "operation": "getDAPIValue",
222
+ "dapiName": "ETH/USD"
223
+ }
224
+ }
225
+ ]
226
+ }
227
+ ```
228
+
229
+ ### Get User Staking Info
230
+
231
+ ```json
232
+ {
233
+ "nodes": [
234
+ {
235
+ "name": "API3",
236
+ "type": "n8n-nodes-api3.api3",
237
+ "parameters": {
238
+ "resource": "dao",
239
+ "operation": "getUserStake",
240
+ "userAddress": "0x..."
241
+ }
242
+ }
243
+ ]
244
+ }
245
+ ```
246
+
247
+ ## API3 Concepts
248
+
249
+ | Concept | Description |
250
+ |---------|-------------|
251
+ | dAPI | Decentralized API - managed price feed aggregating multiple data sources |
252
+ | Airnode | First-party oracle node run directly by API providers |
253
+ | Beacon | Single data point from one Airnode |
254
+ | Beacon Set | Aggregated data from multiple beacons |
255
+ | OEV | Oracle Extractable Value - auction mechanism for price update priority |
256
+ | API3 DAO | Governance and staking organization |
257
+ | Coverage | Insurance for oracle service reliability |
258
+ | Deviation | Price change threshold triggering automatic updates |
259
+
260
+ ## Networks
261
+
262
+ | Network | Chain ID | Features |
263
+ |---------|----------|----------|
264
+ | Ethereum | 1 | dAPIs, DAO, Staking, Governance |
265
+ | Polygon | 137 | dAPIs |
266
+ | Arbitrum | 42161 | dAPIs |
267
+ | Arbitrum Nova | 42170 | dAPIs |
268
+ | Optimism | 10 | dAPIs |
269
+ | Avalanche | 43114 | dAPIs |
270
+ | BSC | 56 | dAPIs |
271
+ | Base | 8453 | dAPIs |
272
+ | Gnosis | 100 | dAPIs |
273
+ | Fantom | 250 | dAPIs |
274
+ | zkSync | 324 | dAPIs |
275
+ | Moonbeam | 1284 | dAPIs |
276
+ | Moonriver | 1285 | dAPIs |
277
+ | Metis | 1088 | dAPIs |
278
+ | Mantle | 5000 | dAPIs |
279
+ | Scroll | 534352 | dAPIs |
280
+ | Linea | 59144 | dAPIs |
281
+ | Polygon zkEVM | 1101 | dAPIs |
282
+ | Goerli | 5 | dAPIs (testnet) |
283
+ | Sepolia | 11155111 | dAPIs (testnet) |
284
+
285
+ ## Error Handling
286
+
287
+ The node provides descriptive error messages for common issues:
288
+
289
+ - **Invalid RPC endpoint**: Check your RPC URL and network selection
290
+ - **Invalid address**: Ensure addresses are valid Ethereum addresses (0x...)
291
+ - **Network not supported**: Operation may not be available on selected network
292
+ - **Private key required**: Write operations require a private key
293
+ - **Rate limited**: Consider using a private RPC endpoint
294
+
295
+ ## Security Best Practices
296
+
297
+ 1. **Never expose private keys** - Use n8n credentials storage
298
+ 2. **Use dedicated wallets** - Don't use main wallets for automation
299
+ 3. **Test on testnets first** - Use Goerli/Sepolia for testing
300
+ 4. **Limit permissions** - Only fund wallets with needed amounts
301
+ 5. **Monitor transactions** - Set up alerts for wallet activity
302
+
303
+ ## Development
304
+
305
+ ```bash
306
+ # Run tests
307
+ npm test
308
+
309
+ # Run tests with coverage
310
+ npm run test:coverage
311
+
312
+ # Lint code
313
+ npm run lint
314
+
315
+ # Fix linting issues
316
+ npm run lint:fix
317
+
318
+ # Build
319
+ npm run build
320
+
321
+ # Watch mode
322
+ npm run dev
323
+ ```
324
+
325
+ ## Author
326
+
327
+ **Velocity BPA**
328
+ - Website: [velobpa.com](https://velobpa.com)
329
+ - GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
330
+
331
+ ## Licensing
332
+
333
+ This n8n community node is licensed under the **Business Source License 1.1**.
334
+
335
+ ### Free Use
336
+ Permitted for personal, educational, research, and internal business use.
337
+
338
+ ### Commercial Use
339
+ Use of this node within any SaaS, PaaS, hosted platform, managed service,
340
+ or paid automation offering requires a commercial license.
341
+
342
+ For licensing inquiries:
343
+ **licensing@velobpa.com**
344
+
345
+ See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
346
+
347
+ ## Contributing
348
+
349
+ 1. Fork the repository
350
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
351
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
352
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
353
+ 5. Open a Pull Request
354
+
355
+ ## Support
356
+
357
+ - [GitHub Issues](https://github.com/Velocity-BPA/n8n-nodes-api3/issues)
358
+ - [API3 Documentation](https://docs.api3.org/)
359
+ - [n8n Community](https://community.n8n.io/)
360
+
361
+ ## Acknowledgments
362
+
363
+ - [API3](https://api3.org/) - Decentralized APIs for Web 3.0
364
+ - [n8n](https://n8n.io/) - Workflow automation platform
365
+ - [Velocity BPA](https://velobpa.com/) - Business process automation
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class Api3Credentials implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=Api3Credentials.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Api3Credentials.credentials.d.ts","sourceRoot":"","sources":["../../credentials/Api3Credentials.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,eAAgB,YAAW,eAAe;IACrD,IAAI,SAAqB;IACzB,WAAW,SAAsB;IACjC,gBAAgB,SAA2B;IAC3C,UAAU,EAAE,eAAe,EAAE,CA6E3B;IAEF,YAAY,EAAE,oBAAoB,CAGhC;IAEF,IAAI,EAAE,sBAAsB,CAc1B;CACH"}
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) Velocity BPA, LLC
4
+ * Licensed under the Business Source License 1.1
5
+ * Commercial use requires a separate commercial license.
6
+ * See LICENSE file for details.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.Api3Credentials = void 0;
10
+ class Api3Credentials {
11
+ constructor() {
12
+ this.name = 'api3Credentials';
13
+ this.displayName = 'API3 Credentials';
14
+ this.documentationUrl = 'https://docs.api3.org';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Network',
18
+ name: 'network',
19
+ type: 'options',
20
+ options: [
21
+ { name: 'Ethereum Mainnet', value: 'ethereum' },
22
+ { name: 'Polygon', value: 'polygon' },
23
+ { name: 'Arbitrum One', value: 'arbitrum' },
24
+ { name: 'Arbitrum Nova', value: 'arbitrum-nova' },
25
+ { name: 'Optimism', value: 'optimism' },
26
+ { name: 'Avalanche C-Chain', value: 'avalanche' },
27
+ { name: 'BNB Smart Chain', value: 'bsc' },
28
+ { name: 'Base', value: 'base' },
29
+ { name: 'Gnosis', value: 'gnosis' },
30
+ { name: 'Fantom', value: 'fantom' },
31
+ { name: 'zkSync Era', value: 'zksync' },
32
+ { name: 'Scroll', value: 'scroll' },
33
+ { name: 'Linea', value: 'linea' },
34
+ { name: 'Mantle', value: 'mantle' },
35
+ { name: 'Moonbeam', value: 'moonbeam' },
36
+ { name: 'Moonriver', value: 'moonriver' },
37
+ { name: 'Celo', value: 'celo' },
38
+ { name: 'Goerli (Testnet)', value: 'goerli' },
39
+ { name: 'Sepolia (Testnet)', value: 'sepolia' },
40
+ { name: 'Mumbai (Testnet)', value: 'mumbai' },
41
+ ],
42
+ default: 'ethereum',
43
+ description: 'The blockchain network to connect to',
44
+ },
45
+ {
46
+ displayName: 'RPC Endpoint',
47
+ name: 'rpcEndpoint',
48
+ type: 'string',
49
+ default: '',
50
+ placeholder: 'https://eth-mainnet.g.alchemy.com/v2/your-api-key',
51
+ description: 'RPC endpoint URL for the selected network. Use providers like Alchemy, Infura, or QuickNode.',
52
+ required: true,
53
+ },
54
+ {
55
+ displayName: 'Private Key',
56
+ name: 'privateKey',
57
+ type: 'string',
58
+ typeOptions: {
59
+ password: true,
60
+ },
61
+ default: '',
62
+ placeholder: '0x...',
63
+ description: 'Private key for signing transactions (required for DAO/staking operations). Keep this secure!',
64
+ required: false,
65
+ },
66
+ {
67
+ displayName: 'API3 Market API Key',
68
+ name: 'api3MarketApiKey',
69
+ type: 'string',
70
+ typeOptions: {
71
+ password: true,
72
+ },
73
+ default: '',
74
+ placeholder: 'Enter your API3 Market API key',
75
+ description: 'Optional API key for API3 Market API access',
76
+ required: false,
77
+ },
78
+ {
79
+ displayName: 'OEV Network API Key',
80
+ name: 'oevApiKey',
81
+ type: 'string',
82
+ typeOptions: {
83
+ password: true,
84
+ },
85
+ default: '',
86
+ placeholder: 'Enter your OEV Network API key',
87
+ description: 'Optional API key for OEV Network access',
88
+ required: false,
89
+ },
90
+ ];
91
+ this.authenticate = {
92
+ type: 'generic',
93
+ properties: {},
94
+ };
95
+ this.test = {
96
+ request: {
97
+ baseURL: '={{$credentials.rpcEndpoint}}',
98
+ method: 'POST',
99
+ headers: {
100
+ 'Content-Type': 'application/json',
101
+ },
102
+ body: JSON.stringify({
103
+ jsonrpc: '2.0',
104
+ method: 'eth_chainId',
105
+ params: [],
106
+ id: 1,
107
+ }),
108
+ },
109
+ };
110
+ }
111
+ }
112
+ exports.Api3Credentials = Api3Credentials;
113
+ //# sourceMappingURL=Api3Credentials.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Api3Credentials.credentials.js","sourceRoot":"","sources":["../../credentials/Api3Credentials.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,MAAa,eAAe;IAA5B;QACE,SAAI,GAAG,iBAAiB,CAAC;QACzB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,uBAAuB,CAAC;QAC3C,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,UAAU,EAAE;oBAC/C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACrC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE;oBAC3C,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;oBACjD,EAAE,IAAI,EAAE,UAAU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odes/Api3/Api3.node';
3
+ export * from './nodes/Api3/Api3Trigger.node';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) Velocity BPA, LLC
4
+ * Licensed under the Business Source License 1.1
5
+ * Commercial use requires a separate commercial license.
6
+ * See LICENSE file for details.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./credentials/Api3Credentials.credentials"), exports);
24
+ __exportStar(require("./nodes/Api3/Api3.node"), exports);
25
+ __exportStar(require("./nodes/Api3/Api3Trigger.node"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,4EAA0D;AAC1D,yDAAuC;AACvC,gEAA8C"}
@@ -0,0 +1,12 @@
1
+ import type { IExecuteFunctions, INodeType, INodeTypeDescription, INodeExecutionData, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare class Api3 implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getDAPIOptions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getNetworkOptions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ };
9
+ };
10
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
11
+ }
12
+ //# sourceMappingURL=Api3.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Api3.node.d.ts","sourceRoot":"","sources":["../../../nodes/Api3/Api3.node.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAkBtB,qBAAa,IAAK,YAAW,SAAS;IACpC,WAAW,EAAE,oBAAoB,CAo+B/B;IAEF,OAAO;;iCAEwB,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;oCAOpD,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAOvF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAmExE"}