n8n-nodes-immutable 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.
- package/LICENSE +46 -0
- package/README.md +341 -0
- package/dist/credentials/ImmutableApi.credentials.d.ts +10 -0
- package/dist/credentials/ImmutableApi.credentials.d.ts.map +1 -0
- package/dist/credentials/ImmutableApi.credentials.js +71 -0
- package/dist/credentials/ImmutableApi.credentials.js.map +1 -0
- package/dist/credentials/ImmutableNetwork.credentials.d.ts +10 -0
- package/dist/credentials/ImmutableNetwork.credentials.d.ts.map +1 -0
- package/dist/credentials/ImmutableNetwork.credentials.js +104 -0
- package/dist/credentials/ImmutableNetwork.credentials.js.map +1 -0
- package/dist/credentials/ImmutablePassport.credentials.d.ts +9 -0
- package/dist/credentials/ImmutablePassport.credentials.d.ts.map +1 -0
- package/dist/credentials/ImmutablePassport.credentials.js +78 -0
- package/dist/credentials/ImmutablePassport.credentials.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Immutable/Immutable.node.d.ts +6 -0
- package/dist/nodes/Immutable/Immutable.node.d.ts.map +1 -0
- package/dist/nodes/Immutable/Immutable.node.js +977 -0
- package/dist/nodes/Immutable/Immutable.node.js.map +1 -0
- package/dist/nodes/Immutable/ImmutableTrigger.node.d.ts +13 -0
- package/dist/nodes/Immutable/ImmutableTrigger.node.d.ts.map +1 -0
- package/dist/nodes/Immutable/ImmutableTrigger.node.js +207 -0
- package/dist/nodes/Immutable/ImmutableTrigger.node.js.map +1 -0
- package/dist/nodes/Immutable/immutable.svg +6 -0
- package/package.json +78 -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,341 @@
|
|
|
1
|
+
# n8n-nodes-immutable
|
|
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
|
+
---
|
|
12
|
+
|
|
13
|
+
A comprehensive n8n community node for **Immutable platform** providing complete integration for zkEVM and Immutable X (StarkEx) blockchains. Supports gaming NFTs, marketplace operations, zero-gas minting, L1/L2 bridging, Passport authentication, and Web3 gaming infrastructure.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
### Resources (18 total)
|
|
23
|
+
- **Wallet** - Balance queries, token balances, transaction history, address validation
|
|
24
|
+
- **NFT** - Get NFT info, list by collection, list by owner
|
|
25
|
+
- **Collection** - Get collection info, list collections, collection stats & floor price
|
|
26
|
+
- **Minting** - Mint NFT, batch mint, get mint status (zero-gas minting)
|
|
27
|
+
- **Order** - Get orders, list orders, listings, and bids
|
|
28
|
+
- **Trade** - Get trade info, list trades
|
|
29
|
+
- **Deposit** - Get deposit info, list deposits (L1→L2 bridge)
|
|
30
|
+
- **Withdrawal** - Get withdrawal info, list withdrawals (L2→L1 bridge)
|
|
31
|
+
- **Exchange** - List exchanges
|
|
32
|
+
- **Passport** - Get user info (Immutable Passport integration)
|
|
33
|
+
- **zkEVM** - Gas price, blocks, transactions, contract calls
|
|
34
|
+
- **Staking** - Staking info
|
|
35
|
+
- **Primary Sales** - Get/list primary sales (NFT drops)
|
|
36
|
+
- **Metadata** - Get metadata schema, refresh metadata
|
|
37
|
+
- **Project** - Get/list projects
|
|
38
|
+
- **Crafting** - Get/list crafting recipes (gaming)
|
|
39
|
+
- **Activity** - Activity feeds by user/collection
|
|
40
|
+
- **Utility** - Wei/ETH conversion, address validation, network status
|
|
41
|
+
|
|
42
|
+
### Trigger Node Events
|
|
43
|
+
Real-time webhook monitoring for:
|
|
44
|
+
- NFT events (created, transferred, burned, listed, sold, metadata updated)
|
|
45
|
+
- Order events (created, cancelled, filled, bid received)
|
|
46
|
+
- Trade events (executed)
|
|
47
|
+
- Collection events (created, updated)
|
|
48
|
+
- Bridge events (deposit completed, withdrawal completed)
|
|
49
|
+
- Gaming events (item crafted, primary sale purchase)
|
|
50
|
+
- All events option for comprehensive monitoring
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
### Community Nodes (Recommended)
|
|
55
|
+
|
|
56
|
+
1. Open n8n
|
|
57
|
+
2. Go to **Settings** > **Community Nodes**
|
|
58
|
+
3. Click **Install a community node**
|
|
59
|
+
4. Enter `n8n-nodes-immutable`
|
|
60
|
+
5. Click **Install**
|
|
61
|
+
|
|
62
|
+
### Manual Installation
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Navigate to n8n custom nodes directory
|
|
66
|
+
cd ~/.n8n/nodes
|
|
67
|
+
|
|
68
|
+
# Clone the repository
|
|
69
|
+
git clone https://github.com/Velocity-BPA/n8n-nodes-immutable.git
|
|
70
|
+
cd n8n-nodes-immutable
|
|
71
|
+
|
|
72
|
+
# Install dependencies and build
|
|
73
|
+
npm install
|
|
74
|
+
npm run build
|
|
75
|
+
|
|
76
|
+
# Restart n8n
|
|
77
|
+
n8n start
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Development Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# 1. Extract the zip file
|
|
84
|
+
unzip n8n-nodes-immutable.zip
|
|
85
|
+
cd n8n-nodes-immutable
|
|
86
|
+
|
|
87
|
+
# 2. Install dependencies
|
|
88
|
+
npm install
|
|
89
|
+
|
|
90
|
+
# 3. Build the project
|
|
91
|
+
npm run build
|
|
92
|
+
|
|
93
|
+
# 4. Create symlink to n8n custom nodes directory
|
|
94
|
+
# For Linux/macOS:
|
|
95
|
+
mkdir -p ~/.n8n/custom
|
|
96
|
+
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-immutable
|
|
97
|
+
|
|
98
|
+
# For Windows (run as Administrator):
|
|
99
|
+
# mklink /D %USERPROFILE%\.n8n\custom\n8n-nodes-immutable %CD%
|
|
100
|
+
|
|
101
|
+
# 5. Restart n8n
|
|
102
|
+
n8n start
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Credentials Setup
|
|
106
|
+
|
|
107
|
+
### Immutable Network Credentials
|
|
108
|
+
|
|
109
|
+
| Field | Description | Required |
|
|
110
|
+
|-------|-------------|----------|
|
|
111
|
+
| Network | zkEVM Mainnet, zkEVM Testnet, IMX Mainnet, or IMX Testnet | Yes |
|
|
112
|
+
| API Key | Your Immutable API key from the Hub | Yes |
|
|
113
|
+
| Private Key | For transaction signing (wallet operations) | No |
|
|
114
|
+
| Mnemonic | Alternative to private key | No |
|
|
115
|
+
| Stark Private Key | For Immutable X operations | No |
|
|
116
|
+
|
|
117
|
+
### Getting API Keys
|
|
118
|
+
|
|
119
|
+
1. Visit [Immutable Hub](https://hub.immutable.com/)
|
|
120
|
+
2. Create or select a project
|
|
121
|
+
3. Navigate to API Keys section
|
|
122
|
+
4. Copy your API key
|
|
123
|
+
|
|
124
|
+
## Resources & Operations
|
|
125
|
+
|
|
126
|
+
### Wallet
|
|
127
|
+
| Operation | Description |
|
|
128
|
+
|-----------|-------------|
|
|
129
|
+
| Get Balance | Get native token balance for an address |
|
|
130
|
+
| Get Token Balances | Get all token balances for an address |
|
|
131
|
+
| Get Transaction History | Get transaction history for an address |
|
|
132
|
+
| Validate Address | Check if an address is valid |
|
|
133
|
+
|
|
134
|
+
### NFT
|
|
135
|
+
| Operation | Description |
|
|
136
|
+
|-----------|-------------|
|
|
137
|
+
| Get NFT | Get NFT details by collection and token ID |
|
|
138
|
+
| Get NFTs by Collection | List all NFTs in a collection |
|
|
139
|
+
| Get NFTs by Owner | List all NFTs owned by an address |
|
|
140
|
+
|
|
141
|
+
### Collection
|
|
142
|
+
| Operation | Description |
|
|
143
|
+
|-----------|-------------|
|
|
144
|
+
| Get Collection | Get collection details |
|
|
145
|
+
| List Collections | List all collections |
|
|
146
|
+
| Get Collection Stats | Get collection statistics including floor price |
|
|
147
|
+
|
|
148
|
+
### Minting
|
|
149
|
+
| Operation | Description |
|
|
150
|
+
|-----------|-------------|
|
|
151
|
+
| Mint NFT | Mint a single NFT (zero-gas) |
|
|
152
|
+
| Batch Mint | Mint multiple NFTs at once |
|
|
153
|
+
| Get Mint Status | Check the status of a mint request |
|
|
154
|
+
|
|
155
|
+
### zkEVM
|
|
156
|
+
| Operation | Description |
|
|
157
|
+
|-----------|-------------|
|
|
158
|
+
| Get Gas Price | Get current gas price |
|
|
159
|
+
| Get Block Number | Get latest block number |
|
|
160
|
+
| Get Block | Get block details |
|
|
161
|
+
| Get Transaction | Get transaction details |
|
|
162
|
+
| Get Transaction Receipt | Get transaction receipt |
|
|
163
|
+
| Call Contract | Make a read-only contract call |
|
|
164
|
+
|
|
165
|
+
## Trigger Node
|
|
166
|
+
|
|
167
|
+
The Immutable Trigger node allows you to receive real-time events from the Immutable platform.
|
|
168
|
+
|
|
169
|
+
### Configuration
|
|
170
|
+
|
|
171
|
+
1. Add an **Immutable Trigger** node to your workflow
|
|
172
|
+
2. Select the event type to listen for
|
|
173
|
+
3. Optionally add filters for collection, user, or token ID
|
|
174
|
+
4. Configure your webhook URL in Immutable Hub
|
|
175
|
+
|
|
176
|
+
### Supported Events
|
|
177
|
+
|
|
178
|
+
- **NFT Events**: Created, Transferred, Burned, Listed, Sold, Metadata Updated
|
|
179
|
+
- **Order Events**: Created, Cancelled, Filled, Bid Received
|
|
180
|
+
- **Trade Events**: Executed
|
|
181
|
+
- **Collection Events**: Created, Updated
|
|
182
|
+
- **Bridge Events**: Deposit Completed, Withdrawal Completed
|
|
183
|
+
- **Gaming Events**: Item Crafted, Primary Sale Purchase
|
|
184
|
+
|
|
185
|
+
## Usage Examples
|
|
186
|
+
|
|
187
|
+
### Get NFT Information
|
|
188
|
+
```
|
|
189
|
+
Resource: NFT
|
|
190
|
+
Operation: Get NFT
|
|
191
|
+
Collection Address: 0x...
|
|
192
|
+
Token ID: 1234
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### List Collection NFTs
|
|
196
|
+
```
|
|
197
|
+
Resource: NFT
|
|
198
|
+
Operation: Get NFTs by Collection
|
|
199
|
+
Collection Address: 0x...
|
|
200
|
+
Limit: 50
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Get Wallet Balance
|
|
204
|
+
```
|
|
205
|
+
Resource: Wallet
|
|
206
|
+
Operation: Get Balance
|
|
207
|
+
Address: 0x...
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Mint an NFT
|
|
211
|
+
```
|
|
212
|
+
Resource: Minting
|
|
213
|
+
Operation: Mint NFT
|
|
214
|
+
Collection Address: 0x...
|
|
215
|
+
Owner Address: 0x...
|
|
216
|
+
NFT Metadata: {"name": "My NFT", "description": "...", "image": "ipfs://..."}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Get Gas Price
|
|
220
|
+
```
|
|
221
|
+
Resource: zkEVM
|
|
222
|
+
Operation: Get Gas Price
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Convert Wei to ETH
|
|
226
|
+
```
|
|
227
|
+
Resource: Utility
|
|
228
|
+
Operation: Convert Wei to ETH
|
|
229
|
+
Value: 1000000000000000000
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Immutable Concepts
|
|
233
|
+
|
|
234
|
+
### zkEVM vs Immutable X
|
|
235
|
+
|
|
236
|
+
- **zkEVM**: EVM-compatible Layer 2 using zero-knowledge proofs. Supports smart contracts.
|
|
237
|
+
- **Immutable X**: StarkEx-based Layer 2 optimized for NFTs. Uses STARK proofs.
|
|
238
|
+
|
|
239
|
+
### Zero-Gas Minting
|
|
240
|
+
|
|
241
|
+
Immutable's minting API allows gas-free NFT minting. The gas costs are covered by Immutable, making it ideal for gaming applications.
|
|
242
|
+
|
|
243
|
+
### Passport
|
|
244
|
+
|
|
245
|
+
Immutable Passport provides Web3 authentication with email/social login, abstracting away wallet complexity for end users.
|
|
246
|
+
|
|
247
|
+
## Networks
|
|
248
|
+
|
|
249
|
+
| Network | Description | Chain ID |
|
|
250
|
+
|---------|-------------|----------|
|
|
251
|
+
| zkEVM Mainnet | Production zkEVM network | 13371 |
|
|
252
|
+
| zkEVM Testnet | Development zkEVM network | 13473 |
|
|
253
|
+
| IMX Mainnet | Production Immutable X | 1 |
|
|
254
|
+
| IMX Testnet | Development Immutable X | 5 |
|
|
255
|
+
|
|
256
|
+
## Error Handling
|
|
257
|
+
|
|
258
|
+
The node includes comprehensive error handling:
|
|
259
|
+
- Network connectivity errors
|
|
260
|
+
- Invalid credentials
|
|
261
|
+
- API rate limiting
|
|
262
|
+
- Invalid parameters
|
|
263
|
+
- RPC errors for zkEVM operations
|
|
264
|
+
|
|
265
|
+
Use the "Continue on Fail" option in n8n to handle errors gracefully in your workflows.
|
|
266
|
+
|
|
267
|
+
## Security Best Practices
|
|
268
|
+
|
|
269
|
+
1. **Store credentials securely** - Use n8n's credential storage
|
|
270
|
+
2. **Use testnet first** - Test workflows on testnet before mainnet
|
|
271
|
+
3. **Protect private keys** - Never expose private keys in workflows
|
|
272
|
+
4. **Monitor API usage** - Keep track of API rate limits
|
|
273
|
+
5. **Validate inputs** - Use the address validation operation
|
|
274
|
+
|
|
275
|
+
## Development
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Install dependencies
|
|
279
|
+
npm install
|
|
280
|
+
|
|
281
|
+
# Build the project
|
|
282
|
+
npm run build
|
|
283
|
+
|
|
284
|
+
# Run tests
|
|
285
|
+
npm test
|
|
286
|
+
|
|
287
|
+
# Run tests with coverage
|
|
288
|
+
npm run test:coverage
|
|
289
|
+
|
|
290
|
+
# Run linting
|
|
291
|
+
npm run lint
|
|
292
|
+
|
|
293
|
+
# Fix linting issues
|
|
294
|
+
npm run lint:fix
|
|
295
|
+
|
|
296
|
+
# Watch mode for development
|
|
297
|
+
npm run dev
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Author
|
|
301
|
+
|
|
302
|
+
**Velocity BPA**
|
|
303
|
+
- Website: [velobpa.com](https://velobpa.com)
|
|
304
|
+
- GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
|
|
305
|
+
|
|
306
|
+
## Licensing
|
|
307
|
+
|
|
308
|
+
This n8n community node is licensed under the **Business Source License 1.1**.
|
|
309
|
+
|
|
310
|
+
### Free Use
|
|
311
|
+
Permitted for personal, educational, research, and internal business use.
|
|
312
|
+
|
|
313
|
+
### Commercial Use
|
|
314
|
+
Use of this node within any SaaS, PaaS, hosted platform, managed service,
|
|
315
|
+
or paid automation offering requires a commercial license.
|
|
316
|
+
|
|
317
|
+
For licensing inquiries:
|
|
318
|
+
**licensing@velobpa.com**
|
|
319
|
+
|
|
320
|
+
See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
|
|
321
|
+
|
|
322
|
+
## Contributing
|
|
323
|
+
|
|
324
|
+
Contributions are welcome! Please ensure:
|
|
325
|
+
|
|
326
|
+
1. Code follows the existing style
|
|
327
|
+
2. Tests pass (`npm test`)
|
|
328
|
+
3. Linting passes (`npm run lint`)
|
|
329
|
+
4. Update documentation as needed
|
|
330
|
+
|
|
331
|
+
## Support
|
|
332
|
+
|
|
333
|
+
- [GitHub Issues](https://github.com/Velocity-BPA/n8n-nodes-immutable/issues)
|
|
334
|
+
- [Immutable Documentation](https://docs.immutable.com/)
|
|
335
|
+
- [n8n Community](https://community.n8n.io/)
|
|
336
|
+
|
|
337
|
+
## Acknowledgments
|
|
338
|
+
|
|
339
|
+
- [Immutable](https://immutable.com/) for the blockchain platform
|
|
340
|
+
- [n8n](https://n8n.io/) for the workflow automation platform
|
|
341
|
+
- The open-source community
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class ImmutableApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ImmutableApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImmutableApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/ImmutableApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,YAAa,YAAW,eAAe;IACnD,IAAI,SAAkB;IACtB,WAAW,SAAmB;IAC9B,gBAAgB,SAAiC;IACjD,UAAU,EAAE,eAAe,EAAE,CAqC3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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.ImmutableApi = void 0;
|
|
10
|
+
class ImmutableApi {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.name = 'immutableApi';
|
|
13
|
+
this.displayName = 'Immutable API';
|
|
14
|
+
this.documentationUrl = 'https://docs.immutable.com/';
|
|
15
|
+
this.properties = [
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Environment',
|
|
18
|
+
name: 'environment',
|
|
19
|
+
type: 'options',
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Production',
|
|
23
|
+
value: 'production',
|
|
24
|
+
description: 'Production environment',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Sandbox',
|
|
28
|
+
value: 'sandbox',
|
|
29
|
+
description: 'Sandbox/testing environment',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
default: 'sandbox',
|
|
33
|
+
description: 'The environment to use',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'API Key',
|
|
37
|
+
name: 'apiKey',
|
|
38
|
+
type: 'string',
|
|
39
|
+
typeOptions: {
|
|
40
|
+
password: true,
|
|
41
|
+
},
|
|
42
|
+
default: '',
|
|
43
|
+
description: 'Your Immutable API key',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Publishable Key',
|
|
47
|
+
name: 'publishableKey',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: '',
|
|
50
|
+
description: 'Your Immutable publishable key (for client-side operations)',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
this.authenticate = {
|
|
54
|
+
type: 'generic',
|
|
55
|
+
properties: {
|
|
56
|
+
headers: {
|
|
57
|
+
'x-api-key': '={{$credentials.apiKey}}',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
this.test = {
|
|
62
|
+
request: {
|
|
63
|
+
baseURL: '={{$credentials.environment === "production" ? "https://api.immutable.com" : "https://api.sandbox.immutable.com"}}',
|
|
64
|
+
url: '/v1/health',
|
|
65
|
+
method: 'GET',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.ImmutableApi = ImmutableApi;
|
|
71
|
+
//# sourceMappingURL=ImmutableApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImmutableApi.credentials.js","sourceRoot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IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class ImmutableNetwork implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ImmutableNetwork.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImmutableNetwork.credentials.d.ts","sourceRoot":"","sources":["../../credentials/ImmutableNetwork.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,gBAAiB,YAAW,eAAe;IACvD,IAAI,SAAsB;IAC1B,WAAW,SAAuB;IAClC,gBAAgB,SAAiC;IACjD,UAAU,EAAE,eAAe,EAAE,CAsE3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.ImmutableNetwork = void 0;
|
|
10
|
+
class ImmutableNetwork {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.name = 'immutableNetwork';
|
|
13
|
+
this.displayName = 'Immutable Network';
|
|
14
|
+
this.documentationUrl = 'https://docs.immutable.com/';
|
|
15
|
+
this.properties = [
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Network',
|
|
18
|
+
name: 'network',
|
|
19
|
+
type: 'options',
|
|
20
|
+
options: [
|
|
21
|
+
{
|
|
22
|
+
name: 'zkEVM Mainnet',
|
|
23
|
+
value: 'zkevmMainnet',
|
|
24
|
+
description: 'Immutable zkEVM Mainnet (Production)',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'zkEVM Testnet',
|
|
28
|
+
value: 'zkevmTestnet',
|
|
29
|
+
description: 'Immutable zkEVM Testnet (Development)',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Immutable X Mainnet',
|
|
33
|
+
value: 'imxMainnet',
|
|
34
|
+
description: 'Immutable X Mainnet (Production)',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Immutable X Testnet',
|
|
38
|
+
value: 'imxTestnet',
|
|
39
|
+
description: 'Immutable X Testnet (Development)',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
default: 'zkevmTestnet',
|
|
43
|
+
description: 'The Immutable network to connect to',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'API Key',
|
|
47
|
+
name: 'apiKey',
|
|
48
|
+
type: 'string',
|
|
49
|
+
typeOptions: {
|
|
50
|
+
password: true,
|
|
51
|
+
},
|
|
52
|
+
default: '',
|
|
53
|
+
description: 'Your Immutable API key from the Hub',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Private Key',
|
|
57
|
+
name: 'privateKey',
|
|
58
|
+
type: 'string',
|
|
59
|
+
typeOptions: {
|
|
60
|
+
password: true,
|
|
61
|
+
},
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'Private key for signing transactions (optional)',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Mnemonic',
|
|
67
|
+
name: 'mnemonic',
|
|
68
|
+
type: 'string',
|
|
69
|
+
typeOptions: {
|
|
70
|
+
password: true,
|
|
71
|
+
},
|
|
72
|
+
default: '',
|
|
73
|
+
description: 'Mnemonic phrase for wallet (optional, alternative to private key)',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayName: 'Stark Private Key',
|
|
77
|
+
name: 'starkPrivateKey',
|
|
78
|
+
type: 'string',
|
|
79
|
+
typeOptions: {
|
|
80
|
+
password: true,
|
|
81
|
+
},
|
|
82
|
+
default: '',
|
|
83
|
+
description: 'Stark private key for Immutable X operations (optional)',
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
this.authenticate = {
|
|
87
|
+
type: 'generic',
|
|
88
|
+
properties: {
|
|
89
|
+
headers: {
|
|
90
|
+
'x-api-key': '={{$credentials.apiKey}}',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
this.test = {
|
|
95
|
+
request: {
|
|
96
|
+
baseURL: '={{$credentials.network === "zkevmMainnet" ? "https://api.immutable.com" : $credentials.network === "zkevmTestnet" ? "https://api.sandbox.immutable.com" : $credentials.network === "imxMainnet" ? "https://api.x.immutable.com" : "https://api.sandbox.x.immutable.com"}}',
|
|
97
|
+
url: '/v1/health',
|
|
98
|
+
method: 'GET',
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ImmutableNetwork = ImmutableNetwork;
|
|
104
|
+
//# sourceMappingURL=ImmutableNetwork.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImmutableNetwork.credentials.js","sourceRoot":"","sources":["../../credentials/ImmutableNetwork.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,MAAa,gBAAgB;IAA7B;QACC,SAAI,GAAG,kBAAkB,CAAC;QAC1B,gBAAW,GAAG,mBAAmB,CAAC;QAClC,qBAAgB,GAAG,6BAA6B,CAAC;QACjD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR;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E,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,4QAA4Q;gBACrR,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AA5FD,4CA4FC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class ImmutablePassport implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ImmutablePassport.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImmutablePassport.credentials.d.ts","sourceRoot":"","sources":["../../credentials/ImmutablePassport.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,iBAAkB,YAAW,eAAe;IACxD,IAAI,SAAuB;IAC3B,WAAW,SAAwB;IACnC,gBAAgB,SAA6D;IAC7E,UAAU,EAAE,eAAe,EAAE,CAmD3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;CACF"}
|