n8n-nodes-trezor 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 (160) hide show
  1. package/LICENSE +46 -0
  2. package/README.md +267 -0
  3. package/dist/Trezor/trezor.svg +12 -0
  4. package/dist/credentials/TrezorConnectApi.credentials.d.ts +8 -0
  5. package/dist/credentials/TrezorConnectApi.credentials.d.ts.map +1 -0
  6. package/dist/credentials/TrezorConnectApi.credentials.js +64 -0
  7. package/dist/credentials/TrezorConnectApi.credentials.js.map +1 -0
  8. package/dist/credentials/TrezorDeviceApi.credentials.d.ts +8 -0
  9. package/dist/credentials/TrezorDeviceApi.credentials.d.ts.map +1 -0
  10. package/dist/credentials/TrezorDeviceApi.credentials.js +48 -0
  11. package/dist/credentials/TrezorDeviceApi.credentials.js.map +1 -0
  12. package/dist/nodes/Trezor/Trezor.node.d.ts +6 -0
  13. package/dist/nodes/Trezor/Trezor.node.d.ts.map +1 -0
  14. package/dist/nodes/Trezor/Trezor.node.js +272 -0
  15. package/dist/nodes/Trezor/Trezor.node.js.map +1 -0
  16. package/dist/nodes/Trezor/TrezorTrigger.node.d.ts +6 -0
  17. package/dist/nodes/Trezor/TrezorTrigger.node.d.ts.map +1 -0
  18. package/dist/nodes/Trezor/TrezorTrigger.node.js +226 -0
  19. package/dist/nodes/Trezor/TrezorTrigger.node.js.map +1 -0
  20. package/dist/nodes/Trezor/actions/account/account.d.ts +5 -0
  21. package/dist/nodes/Trezor/actions/account/account.d.ts.map +1 -0
  22. package/dist/nodes/Trezor/actions/account/account.js +149 -0
  23. package/dist/nodes/Trezor/actions/account/account.js.map +1 -0
  24. package/dist/nodes/Trezor/actions/address/address.d.ts +5 -0
  25. package/dist/nodes/Trezor/actions/address/address.d.ts.map +1 -0
  26. package/dist/nodes/Trezor/actions/address/address.js +167 -0
  27. package/dist/nodes/Trezor/actions/address/address.js.map +1 -0
  28. package/dist/nodes/Trezor/actions/backup/backup.d.ts +5 -0
  29. package/dist/nodes/Trezor/actions/backup/backup.d.ts.map +1 -0
  30. package/dist/nodes/Trezor/actions/backup/backup.js +85 -0
  31. package/dist/nodes/Trezor/actions/backup/backup.js.map +1 -0
  32. package/dist/nodes/Trezor/actions/binanceChain/binanceChain.d.ts +5 -0
  33. package/dist/nodes/Trezor/actions/binanceChain/binanceChain.d.ts.map +1 -0
  34. package/dist/nodes/Trezor/actions/binanceChain/binanceChain.js +92 -0
  35. package/dist/nodes/Trezor/actions/binanceChain/binanceChain.js.map +1 -0
  36. package/dist/nodes/Trezor/actions/bitcoin/bitcoin.d.ts +5 -0
  37. package/dist/nodes/Trezor/actions/bitcoin/bitcoin.d.ts.map +1 -0
  38. package/dist/nodes/Trezor/actions/bitcoin/bitcoin.js +199 -0
  39. package/dist/nodes/Trezor/actions/bitcoin/bitcoin.js.map +1 -0
  40. package/dist/nodes/Trezor/actions/bitcoinLike/bitcoinLike.d.ts +5 -0
  41. package/dist/nodes/Trezor/actions/bitcoinLike/bitcoinLike.d.ts.map +1 -0
  42. package/dist/nodes/Trezor/actions/bitcoinLike/bitcoinLike.js +151 -0
  43. package/dist/nodes/Trezor/actions/bitcoinLike/bitcoinLike.js.map +1 -0
  44. package/dist/nodes/Trezor/actions/cardano/cardano.d.ts +5 -0
  45. package/dist/nodes/Trezor/actions/cardano/cardano.d.ts.map +1 -0
  46. package/dist/nodes/Trezor/actions/cardano/cardano.js +143 -0
  47. package/dist/nodes/Trezor/actions/cardano/cardano.js.map +1 -0
  48. package/dist/nodes/Trezor/actions/coinjoin/coinjoin.d.ts +5 -0
  49. package/dist/nodes/Trezor/actions/coinjoin/coinjoin.d.ts.map +1 -0
  50. package/dist/nodes/Trezor/actions/coinjoin/coinjoin.js +144 -0
  51. package/dist/nodes/Trezor/actions/coinjoin/coinjoin.js.map +1 -0
  52. package/dist/nodes/Trezor/actions/device/device.d.ts +5 -0
  53. package/dist/nodes/Trezor/actions/device/device.d.ts.map +1 -0
  54. package/dist/nodes/Trezor/actions/device/device.js +164 -0
  55. package/dist/nodes/Trezor/actions/device/device.js.map +1 -0
  56. package/dist/nodes/Trezor/actions/eos/eos.d.ts +5 -0
  57. package/dist/nodes/Trezor/actions/eos/eos.d.ts.map +1 -0
  58. package/dist/nodes/Trezor/actions/eos/eos.js +82 -0
  59. package/dist/nodes/Trezor/actions/eos/eos.js.map +1 -0
  60. package/dist/nodes/Trezor/actions/ethereum/ethereum.d.ts +5 -0
  61. package/dist/nodes/Trezor/actions/ethereum/ethereum.d.ts.map +1 -0
  62. package/dist/nodes/Trezor/actions/ethereum/ethereum.js +203 -0
  63. package/dist/nodes/Trezor/actions/ethereum/ethereum.js.map +1 -0
  64. package/dist/nodes/Trezor/actions/evmChains/evmChains.d.ts +5 -0
  65. package/dist/nodes/Trezor/actions/evmChains/evmChains.d.ts.map +1 -0
  66. package/dist/nodes/Trezor/actions/evmChains/evmChains.js +179 -0
  67. package/dist/nodes/Trezor/actions/evmChains/evmChains.js.map +1 -0
  68. package/dist/nodes/Trezor/actions/firmware/firmware.d.ts +5 -0
  69. package/dist/nodes/Trezor/actions/firmware/firmware.d.ts.map +1 -0
  70. package/dist/nodes/Trezor/actions/firmware/firmware.js +118 -0
  71. package/dist/nodes/Trezor/actions/firmware/firmware.js.map +1 -0
  72. package/dist/nodes/Trezor/actions/label/label.d.ts +5 -0
  73. package/dist/nodes/Trezor/actions/label/label.d.ts.map +1 -0
  74. package/dist/nodes/Trezor/actions/label/label.js +88 -0
  75. package/dist/nodes/Trezor/actions/label/label.js.map +1 -0
  76. package/dist/nodes/Trezor/actions/multiCurrency/multiCurrency.d.ts +5 -0
  77. package/dist/nodes/Trezor/actions/multiCurrency/multiCurrency.d.ts.map +1 -0
  78. package/dist/nodes/Trezor/actions/multiCurrency/multiCurrency.js +147 -0
  79. package/dist/nodes/Trezor/actions/multiCurrency/multiCurrency.js.map +1 -0
  80. package/dist/nodes/Trezor/actions/passphrase/passphrase.d.ts +5 -0
  81. package/dist/nodes/Trezor/actions/passphrase/passphrase.d.ts.map +1 -0
  82. package/dist/nodes/Trezor/actions/passphrase/passphrase.js +110 -0
  83. package/dist/nodes/Trezor/actions/passphrase/passphrase.js.map +1 -0
  84. package/dist/nodes/Trezor/actions/ripple/ripple.d.ts +5 -0
  85. package/dist/nodes/Trezor/actions/ripple/ripple.d.ts.map +1 -0
  86. package/dist/nodes/Trezor/actions/ripple/ripple.js +122 -0
  87. package/dist/nodes/Trezor/actions/ripple/ripple.js.map +1 -0
  88. package/dist/nodes/Trezor/actions/security/security.d.ts +5 -0
  89. package/dist/nodes/Trezor/actions/security/security.d.ts.map +1 -0
  90. package/dist/nodes/Trezor/actions/security/security.js +145 -0
  91. package/dist/nodes/Trezor/actions/security/security.js.map +1 -0
  92. package/dist/nodes/Trezor/actions/signing/signing.d.ts +5 -0
  93. package/dist/nodes/Trezor/actions/signing/signing.d.ts.map +1 -0
  94. package/dist/nodes/Trezor/actions/signing/signing.js +171 -0
  95. package/dist/nodes/Trezor/actions/signing/signing.js.map +1 -0
  96. package/dist/nodes/Trezor/actions/solana/solana.d.ts +5 -0
  97. package/dist/nodes/Trezor/actions/solana/solana.d.ts.map +1 -0
  98. package/dist/nodes/Trezor/actions/solana/solana.js +106 -0
  99. package/dist/nodes/Trezor/actions/solana/solana.js.map +1 -0
  100. package/dist/nodes/Trezor/actions/stellar/stellar.d.ts +5 -0
  101. package/dist/nodes/Trezor/actions/stellar/stellar.d.ts.map +1 -0
  102. package/dist/nodes/Trezor/actions/stellar/stellar.js +94 -0
  103. package/dist/nodes/Trezor/actions/stellar/stellar.js.map +1 -0
  104. package/dist/nodes/Trezor/actions/suite/suite.d.ts +5 -0
  105. package/dist/nodes/Trezor/actions/suite/suite.d.ts.map +1 -0
  106. package/dist/nodes/Trezor/actions/suite/suite.js +99 -0
  107. package/dist/nodes/Trezor/actions/suite/suite.js.map +1 -0
  108. package/dist/nodes/Trezor/actions/tezos/tezos.d.ts +5 -0
  109. package/dist/nodes/Trezor/actions/tezos/tezos.d.ts.map +1 -0
  110. package/dist/nodes/Trezor/actions/tezos/tezos.js +100 -0
  111. package/dist/nodes/Trezor/actions/tezos/tezos.js.map +1 -0
  112. package/dist/nodes/Trezor/actions/transaction/transaction.d.ts +5 -0
  113. package/dist/nodes/Trezor/actions/transaction/transaction.d.ts.map +1 -0
  114. package/dist/nodes/Trezor/actions/transaction/transaction.js +207 -0
  115. package/dist/nodes/Trezor/actions/transaction/transaction.js.map +1 -0
  116. package/dist/nodes/Trezor/actions/utility/utility.d.ts +5 -0
  117. package/dist/nodes/Trezor/actions/utility/utility.d.ts.map +1 -0
  118. package/dist/nodes/Trezor/actions/utility/utility.js +249 -0
  119. package/dist/nodes/Trezor/actions/utility/utility.js.map +1 -0
  120. package/dist/nodes/Trezor/actions/webauthn/webauthn.d.ts +5 -0
  121. package/dist/nodes/Trezor/actions/webauthn/webauthn.d.ts.map +1 -0
  122. package/dist/nodes/Trezor/actions/webauthn/webauthn.js +195 -0
  123. package/dist/nodes/Trezor/actions/webauthn/webauthn.js.map +1 -0
  124. package/dist/nodes/Trezor/constants/coins.d.ts +29 -0
  125. package/dist/nodes/Trezor/constants/coins.d.ts.map +1 -0
  126. package/dist/nodes/Trezor/constants/coins.js +246 -0
  127. package/dist/nodes/Trezor/constants/coins.js.map +1 -0
  128. package/dist/nodes/Trezor/constants/devices.d.ts +26 -0
  129. package/dist/nodes/Trezor/constants/devices.d.ts.map +1 -0
  130. package/dist/nodes/Trezor/constants/devices.js +88 -0
  131. package/dist/nodes/Trezor/constants/devices.js.map +1 -0
  132. package/dist/nodes/Trezor/constants/index.d.ts +3 -0
  133. package/dist/nodes/Trezor/constants/index.d.ts.map +1 -0
  134. package/dist/nodes/Trezor/constants/index.js +25 -0
  135. package/dist/nodes/Trezor/constants/index.js.map +1 -0
  136. package/dist/nodes/Trezor/transport/TrezorTransport.d.ts +129 -0
  137. package/dist/nodes/Trezor/transport/TrezorTransport.d.ts.map +1 -0
  138. package/dist/nodes/Trezor/transport/TrezorTransport.js +346 -0
  139. package/dist/nodes/Trezor/transport/TrezorTransport.js.map +1 -0
  140. package/dist/nodes/Trezor/transport/index.d.ts +2 -0
  141. package/dist/nodes/Trezor/transport/index.d.ts.map +1 -0
  142. package/dist/nodes/Trezor/transport/index.js +24 -0
  143. package/dist/nodes/Trezor/transport/index.js.map +1 -0
  144. package/dist/nodes/Trezor/utils/addressUtils.d.ts +10 -0
  145. package/dist/nodes/Trezor/utils/addressUtils.d.ts.map +1 -0
  146. package/dist/nodes/Trezor/utils/addressUtils.js +109 -0
  147. package/dist/nodes/Trezor/utils/addressUtils.js.map +1 -0
  148. package/dist/nodes/Trezor/utils/formatUtils.d.ts +16 -0
  149. package/dist/nodes/Trezor/utils/formatUtils.d.ts.map +1 -0
  150. package/dist/nodes/Trezor/utils/formatUtils.js +102 -0
  151. package/dist/nodes/Trezor/utils/formatUtils.js.map +1 -0
  152. package/dist/nodes/Trezor/utils/index.d.ts +4 -0
  153. package/dist/nodes/Trezor/utils/index.d.ts.map +1 -0
  154. package/dist/nodes/Trezor/utils/index.js +26 -0
  155. package/dist/nodes/Trezor/utils/index.js.map +1 -0
  156. package/dist/nodes/Trezor/utils/validationUtils.d.ts +17 -0
  157. package/dist/nodes/Trezor/utils/validationUtils.d.ts.map +1 -0
  158. package/dist/nodes/Trezor/utils/validationUtils.js +123 -0
  159. package/dist/nodes/Trezor/utils/validationUtils.js.map +1 -0
  160. package/package.json +90 -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,267 @@
1
+ # n8n-nodes-trezor
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
+ Comprehensive n8n community node for Trezor hardware wallets providing 26 resources and 200+ operations for Bitcoin, Ethereum, Cardano, Solana, and 15+ blockchain networks. Includes transaction signing, device management, CoinJoin privacy, and real-time event triggers.
12
+
13
+ ![n8n](https://img.shields.io/badge/n8n-community--node-orange)
14
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)
15
+ ![License](https://img.shields.io/badge/license-BSL--1.1-blue)
16
+
17
+ ## Features
18
+
19
+ - **26 Resource Categories** - Device management, multi-chain support, security features
20
+ - **200+ Operations** - Comprehensive blockchain interactions
21
+ - **20+ Blockchain Networks** - Bitcoin, Ethereum, Cardano, Solana, Ripple, Stellar, and more
22
+ - **Hardware Security** - All signing operations happen on device
23
+ - **Real-time Triggers** - Device connection and blockchain event monitoring
24
+ - **CoinJoin Privacy** - Enhanced privacy for Bitcoin transactions
25
+ - **Multi-signature Support** - Complex signing workflows
26
+ - **WebAuthn/FIDO2** - Hardware-backed authentication
27
+
28
+ ## Installation
29
+
30
+ ### Community Nodes (Recommended)
31
+
32
+ 1. Open n8n Settings
33
+ 2. Go to "Community Nodes"
34
+ 3. Search for `n8n-nodes-trezor`
35
+ 4. Click Install
36
+
37
+ ### Manual Installation
38
+
39
+ ```bash
40
+ # Navigate to your n8n installation
41
+ cd ~/.n8n
42
+
43
+ # Install the package
44
+ npm install n8n-nodes-trezor
45
+ ```
46
+
47
+ ### Development Installation
48
+
49
+ ```bash
50
+ # Clone the repository
51
+ git clone https://github.com/velocity-bpa/n8n-nodes-trezor.git
52
+ cd n8n-nodes-trezor
53
+
54
+ # Install dependencies
55
+ npm install
56
+
57
+ # Build
58
+ npm run build
59
+
60
+ # Link to n8n
61
+ mkdir -p ~/.n8n/custom
62
+ ln -s $(pwd) ~/.n8n/custom/n8n-nodes-trezor
63
+
64
+ # Restart n8n
65
+ ```
66
+
67
+ ## Credentials Setup
68
+
69
+ ### Trezor Device API
70
+
71
+ | Field | Description |
72
+ |-------|-------------|
73
+ | Connection Type | USB (direct) or Bridge (via Trezor Bridge) |
74
+ | Device Path | Optional specific device path |
75
+ | Passphrase | Optional BIP39 passphrase for hidden wallets |
76
+
77
+ ### Trezor Connect API
78
+
79
+ | Field | Description |
80
+ |-------|-------------|
81
+ | Manifest Email | Contact email for Trezor Connect |
82
+ | Manifest App URL | Your application URL |
83
+ | Use Core Mode | Enable for headless operation |
84
+
85
+ ## Resources & Operations
86
+
87
+ ### Device Management
88
+ - **Device**: Get features, ping, wipe, reset, recover, apply settings
89
+ - **Firmware**: Check version, verify integrity
90
+ - **Backup**: Create seed backup, verify backup
91
+ - **Security**: Change PIN, enable/disable passphrase, lock device
92
+ - **Label**: Set device label, get device state
93
+
94
+ ### Cryptocurrency Operations
95
+ - **Bitcoin**: Get address, sign transaction, sign/verify message, get UTXO
96
+ - **Bitcoin-like**: Litecoin, Dogecoin, Dash, Bitcoin Cash, Zcash, and more
97
+ - **Ethereum**: Get address, sign transaction, sign message, sign typed data
98
+ - **EVM Chains**: Polygon, BSC, Avalanche, Arbitrum, Optimism, Base, Fantom
99
+ - **Cardano**: Get address/stake address, sign transaction
100
+ - **Solana**: Get address, sign transaction
101
+ - **Ripple (XRP)**: Get address, sign transaction
102
+ - **Stellar (XLM)**: Get address, sign transaction
103
+ - **Tezos (XTZ)**: Get address, sign transaction
104
+ - **EOS**: Get public key, sign transaction
105
+ - **Binance Chain**: Get address, sign transaction
106
+
107
+ ### Advanced Features
108
+ - **Multi-currency**: Batch operations across multiple coins
109
+ - **CoinJoin**: Privacy-enhanced Bitcoin transactions
110
+ - **Signing**: Raw message signing, proof of ownership
111
+ - **Passphrase**: Hidden wallet management
112
+ - **WebAuthn**: FIDO2 credential management
113
+ - **Suite**: Trezor Suite integration
114
+
115
+ ## Trigger Node
116
+
117
+ The TrezorTrigger node monitors for real-time events:
118
+
119
+ - **Device Events**: Connection, disconnection, button press, PIN entry
120
+ - **Blockchain Events**: New transactions, confirmations, balance changes
121
+ - **Security Events**: Failed PIN attempts, passphrase changes
122
+
123
+ ## Usage Examples
124
+
125
+ ### Get Bitcoin Address
126
+
127
+ ```javascript
128
+ // In n8n workflow
129
+ {
130
+ "resource": "bitcoin",
131
+ "operation": "getAddress",
132
+ "coin": "btc",
133
+ "path": "m/84'/0'/0'/0/0",
134
+ "showOnDevice": true
135
+ }
136
+ ```
137
+
138
+ ### Sign Ethereum Transaction
139
+
140
+ ```javascript
141
+ {
142
+ "resource": "ethereum",
143
+ "operation": "signTransaction",
144
+ "chainId": 1,
145
+ "to": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bEaC",
146
+ "value": "1000000000000000000",
147
+ "gasLimit": "21000",
148
+ "maxFeePerGas": "50000000000"
149
+ }
150
+ ```
151
+
152
+ ### Multi-chain Address Discovery
153
+
154
+ ```javascript
155
+ {
156
+ "resource": "multiCurrency",
157
+ "operation": "batchGetAddresses",
158
+ "coins": ["btc", "eth", "ltc", "ada"],
159
+ "accountIndex": 0
160
+ }
161
+ ```
162
+
163
+ ## Blockchain Networks
164
+
165
+ | Network | Coin Type | Address Format |
166
+ |---------|-----------|----------------|
167
+ | Bitcoin | BTC | P2PKH, P2SH-P2WPKH, P2WPKH |
168
+ | Ethereum | ETH | EIP-55 checksum |
169
+ | Litecoin | LTC | P2PKH, P2SH-P2WPKH |
170
+ | Cardano | ADA | Bech32 |
171
+ | Solana | SOL | Base58 |
172
+ | Ripple | XRP | Base58check |
173
+ | Stellar | XLM | Ed25519 public key |
174
+ | Dogecoin | DOGE | P2PKH |
175
+ | Bitcoin Cash | BCH | CashAddr |
176
+ | Polygon | MATIC | EIP-55 |
177
+ | Arbitrum | ARB | EIP-55 |
178
+ | Optimism | OP | EIP-55 |
179
+
180
+ ## Error Handling
181
+
182
+ The node provides detailed error information:
183
+
184
+ - **DeviceNotFound**: No Trezor device detected
185
+ - **ActionCancelled**: User cancelled operation on device
186
+ - **PinInvalid**: Incorrect PIN entered
187
+ - **PassphraseMismatch**: Passphrase confirmation failed
188
+ - **FirmwareOutdated**: Device firmware needs update
189
+ - **TransportError**: Communication failure with device
190
+
191
+ ## Security Best Practices
192
+
193
+ 1. **Always verify addresses on device** - Enable `showOnDevice` for address operations
194
+ 2. **Use passphrases for high-value accounts** - Adds an extra layer of security
195
+ 3. **Keep firmware updated** - Ensures latest security patches
196
+ 4. **Verify transaction details on device** - Never blind-sign transactions
197
+ 5. **Use dedicated workflows** - Isolate sensitive operations
198
+ 6. **Implement rate limiting** - Prevent automated attacks
199
+ 7. **Log all operations** - Maintain audit trail
200
+
201
+ ## Development
202
+
203
+ ```bash
204
+ # Install dependencies
205
+ npm install
206
+
207
+ # Build
208
+ npm run build
209
+
210
+ # Run tests
211
+ npm test
212
+
213
+ # Run tests with coverage
214
+ npm run test:coverage
215
+
216
+ # Lint
217
+ npm run lint
218
+
219
+ # Format code
220
+ npm run format
221
+
222
+ # Type check
223
+ npm run typecheck
224
+ ```
225
+
226
+ ## Author
227
+
228
+ **Velocity BPA**
229
+ - Website: [velobpa.com](https://velobpa.com)
230
+ - GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
231
+
232
+ ## Licensing
233
+
234
+ This n8n community node is licensed under the **Business Source License 1.1**.
235
+
236
+ ### Free Use
237
+ Permitted for personal, educational, research, and internal business use.
238
+
239
+ ### Commercial Use
240
+ Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
241
+
242
+ For licensing inquiries: **licensing@velobpa.com**
243
+
244
+ See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
245
+
246
+ ## Contributing
247
+
248
+ 1. Fork the repository
249
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
250
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
251
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
252
+ 5. Open a Pull Request
253
+
254
+ Please ensure your code follows the existing style and includes appropriate tests.
255
+
256
+ ## Support
257
+
258
+ - **Documentation**: [GitHub Wiki](https://github.com/velocity-bpa/n8n-nodes-trezor/wiki)
259
+ - **Issues**: [GitHub Issues](https://github.com/velocity-bpa/n8n-nodes-trezor/issues)
260
+ - **Discussions**: [GitHub Discussions](https://github.com/velocity-bpa/n8n-nodes-trezor/discussions)
261
+ - **Commercial Support**: [licensing@velobpa.com](mailto:licensing@velobpa.com)
262
+
263
+ ## Acknowledgments
264
+
265
+ - [Trezor](https://trezor.io) - Hardware wallet manufacturer
266
+ - [n8n](https://n8n.io) - Workflow automation platform
267
+ - [SatoshiLabs](https://satoshilabs.com) - Trezor Connect SDK
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <defs>
3
+ <linearGradient id="trezorGrad" x1="0%" y1="0%" x2="0%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#00A340;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#008732;stop-opacity:1" />
6
+ </linearGradient>
7
+ </defs>
8
+ <rect x="16" y="8" width="32" height="48" rx="4" ry="4" fill="url(#trezorGrad)"/>
9
+ <rect x="20" y="12" width="24" height="32" rx="2" ry="2" fill="#fff"/>
10
+ <circle cx="32" cy="50" r="3" fill="#fff"/>
11
+ <path d="M26 20h12v4H26z M26 28h12v4H26z" fill="#00A340"/>
12
+ </svg>
@@ -0,0 +1,8 @@
1
+ import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class TrezorConnectApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ }
8
+ //# sourceMappingURL=TrezorConnectApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrezorConnectApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/TrezorConnectApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,qBAAa,gBAAiB,YAAW,eAAe;IACtD,IAAI,SAAsB;IAC1B,WAAW,SAAoB;IAC/B,gBAAgB,SAA2D;IAE3E,UAAU,EAAE,eAAe,EAAE,CA6C3B;CACH"}
@@ -0,0 +1,64 @@
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.TrezorConnectApi = void 0;
10
+ class TrezorConnectApi {
11
+ constructor() {
12
+ this.name = 'trezorConnectApi';
13
+ this.displayName = 'Trezor Connect';
14
+ this.documentationUrl = 'https://docs.trezor.io/trezor-suite/packages/connect/';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Manifest Email',
18
+ name: 'manifestEmail',
19
+ type: 'string',
20
+ default: '',
21
+ required: true,
22
+ description: 'Contact email for the application (required by Trezor Connect)',
23
+ },
24
+ {
25
+ displayName: 'Manifest App URL',
26
+ name: 'manifestAppUrl',
27
+ type: 'string',
28
+ default: '',
29
+ required: true,
30
+ description: 'URL of the application using Trezor Connect',
31
+ },
32
+ {
33
+ displayName: 'Bridge URL',
34
+ name: 'bridgeUrl',
35
+ type: 'string',
36
+ default: 'http://127.0.0.1:21325',
37
+ description: 'URL of the Trezor Bridge service',
38
+ },
39
+ {
40
+ displayName: 'Webusb',
41
+ name: 'webusb',
42
+ type: 'boolean',
43
+ default: false,
44
+ description: 'Whether to use WebUSB for device communication',
45
+ },
46
+ {
47
+ displayName: 'Debug Mode',
48
+ name: 'debug',
49
+ type: 'boolean',
50
+ default: false,
51
+ description: 'Whether to enable debug logging',
52
+ },
53
+ {
54
+ displayName: 'Lazy Load',
55
+ name: 'lazyLoad',
56
+ type: 'boolean',
57
+ default: true,
58
+ description: 'Whether to lazy load Trezor Connect',
59
+ },
60
+ ];
61
+ }
62
+ }
63
+ exports.TrezorConnectApi = TrezorConnectApi;
64
+ //# sourceMappingURL=TrezorConnectApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrezorConnectApi.credentials.js","sourceRoot":"","sources":["../../credentials/TrezorConnectApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,MAAa,gBAAgB;IAA7B;QACE,SAAI,GAAG,kBAAkB,CAAC;QAC1B,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,uDAAuD,CAAC;QAE3E,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gEAAgE;aAC9E;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wBAAwB;gBACjC,WAAW,EAAE,kCAAkC;aAChD;YACD;gBACE,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,qCAAqC;aACnD;SACF,CAAC;IACJ,CAAC;CAAA;AAnDD,4CAmDC"}
@@ -0,0 +1,8 @@
1
+ import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class TrezorDeviceApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ }
8
+ //# sourceMappingURL=TrezorDeviceApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrezorDeviceApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/TrezorDeviceApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,qBAAa,eAAgB,YAAW,eAAe;IACrD,IAAI,SAAqB;IACzB,WAAW,SAAmB;IAC9B,gBAAgB,SAA2D;IAE3E,UAAU,EAAE,eAAe,EAAE,CA6B3B;CACH"}
@@ -0,0 +1,48 @@
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.TrezorDeviceApi = void 0;
10
+ class TrezorDeviceApi {
11
+ constructor() {
12
+ this.name = 'trezorDeviceApi';
13
+ this.displayName = 'Trezor Device';
14
+ this.documentationUrl = 'https://docs.trezor.io/trezor-suite/packages/connect/';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Device Label',
18
+ name: 'deviceLabel',
19
+ type: 'string',
20
+ default: '',
21
+ description: 'Optional label to identify the Trezor device',
22
+ },
23
+ {
24
+ displayName: 'Device Path',
25
+ name: 'devicePath',
26
+ type: 'string',
27
+ default: '',
28
+ description: 'USB path to the device (leave empty for auto-detection)',
29
+ },
30
+ {
31
+ displayName: 'Use Passphrase',
32
+ name: 'usePassphrase',
33
+ type: 'boolean',
34
+ default: false,
35
+ description: 'Whether to use passphrase protection for this device',
36
+ },
37
+ {
38
+ displayName: 'Default Account Index',
39
+ name: 'defaultAccountIndex',
40
+ type: 'number',
41
+ default: 0,
42
+ description: 'Default account index to use for operations',
43
+ },
44
+ ];
45
+ }
46
+ }
47
+ exports.TrezorDeviceApi = TrezorDeviceApi;
48
+ //# sourceMappingURL=TrezorDeviceApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrezorDeviceApi.credentials.js","sourceRoot":"","sources":["../../credentials/TrezorDeviceApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,MAAa,eAAe;IAA5B;QACE,SAAI,GAAG,iBAAiB,CAAC;QACzB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,uDAAuD,CAAC;QAE3E,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,8CAA8C;aAC5D;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,yDAAyD;aACvE;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,sDAAsD;aACpE;YACD;gBACE,WAAW,EAAE,uBAAuB;gBACpC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,6CAA6C;aAC3D;SACF,CAAC;IACJ,CAAC;CAAA;AAnCD,0CAmCC"}
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Trezor implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ //# sourceMappingURL=Trezor.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trezor.node.d.ts","sourceRoot":"","sources":["../../../nodes/Trezor/Trezor.node.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AA6CtB,qBAAa,MAAO,YAAW,SAAS;IACvC,WAAW,EAAE,oBAAoB,CA8G/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA6GvE"}