@trezor/connect 9.0.2 → 9.0.4
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 +5 -5
- package/lib/api/authorizeCoinJoin.js +6 -2
- package/lib/api/bitcoin/TransactionComposer.js +2 -1
- package/lib/api/bitcoin/enhanceSignTx.js +1 -1
- package/lib/api/bitcoin/inputs.js +3 -2
- package/lib/api/bitcoin/outputs.js +2 -4
- package/lib/api/bitcoin/refTx.js +3 -3
- package/lib/api/bitcoin/signtxVerify.d.ts +3 -3
- package/lib/api/bitcoin/signtxVerify.js +16 -15
- package/lib/api/blockchainDisconnect.js +1 -1
- package/lib/api/blockchainSetCustomBackend.js +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.js +38 -16
- package/lib/api/cardanoSignTransaction.d.ts +1 -0
- package/lib/api/cardanoSignTransaction.js +23 -3
- package/lib/api/getAddress.d.ts +2 -1
- package/lib/api/getAddress.js +12 -1
- package/lib/api/getOwnershipProof.d.ts +1 -5
- package/lib/api/getOwnershipProof.js +5 -3
- package/lib/api/getPublicKey.d.ts +1 -0
- package/lib/api/getPublicKey.js +22 -7
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +5 -1
- package/lib/api/setBusy.d.ts +7 -0
- package/lib/api/setBusy.js +27 -0
- package/lib/api/signTransaction.d.ts +2 -1
- package/lib/api/signTransaction.js +24 -5
- package/lib/api/unlockPath.d.ts +10 -0
- package/lib/api/unlockPath.js +35 -0
- package/lib/backend/BackendManager.d.ts +21 -0
- package/lib/backend/BackendManager.js +91 -0
- package/lib/backend/Blockchain.d.ts +72 -0
- package/lib/backend/Blockchain.js +204 -0
- package/lib/backend/BlockchainLink.d.ts +6 -71
- package/lib/backend/BlockchainLink.js +12 -288
- package/lib/constants/cardano.d.ts +3 -1
- package/lib/constants/cardano.js +3 -1
- package/lib/core/AbstractMethod.d.ts +1 -0
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +1 -1
- package/lib/core/method.d.ts +1 -1
- package/lib/data/config.js +2 -2
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +1 -1
- package/lib/device/Device.js +8 -2
- package/lib/device/DeviceCommands.d.ts +8 -2
- package/lib/device/DeviceCommands.js +48 -25
- package/lib/factory.js +2 -0
- package/lib/types/api/authorizeCoinJoin.d.ts +1 -0
- package/lib/types/api/bitcoin/index.d.ts +5 -0
- package/lib/types/api/cardano/index.d.ts +13 -10
- package/lib/types/api/eos/index.d.ts +0 -4
- package/lib/types/api/eosGetPublicKey.d.ts +4 -4
- package/lib/types/api/getAddress.d.ts +1 -0
- package/lib/types/api/getPublicKey.d.ts +5 -0
- package/lib/types/api/index.d.ts +4 -0
- package/lib/types/api/setBusy.d.ts +4 -0
- package/lib/types/api/setBusy.js +3 -0
- package/lib/types/api/unlockPath.d.ts +8 -0
- package/lib/types/api/unlockPath.js +3 -0
- package/lib/utils/pathUtils.d.ts +2 -3
- package/lib/utils/pathUtils.js +42 -15
- package/package.json +19 -7
- package/lib/api/bitcoin/__fixtures__/inputs.d.ts +0 -112
- package/lib/api/bitcoin/__fixtures__/inputs.js +0 -102
- package/lib/api/bitcoin/__fixtures__/signtxVerify.d.ts +0 -147
- package/lib/api/bitcoin/__fixtures__/signtxVerify.js +0 -216
- package/lib/api/common/__fixtures__/paramsValidator.d.ts +0 -596
- package/lib/api/common/__fixtures__/paramsValidator.js +0 -355
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.d.ts +0 -225
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +0 -341
- package/lib/utils/__fixtures__/accountUtils.d.ts +0 -4
- package/lib/utils/__fixtures__/accountUtils.js +0 -32
- package/lib/utils/__fixtures__/addressUtils.d.ts +0 -10
- package/lib/utils/__fixtures__/addressUtils.js +0 -214
- package/lib/utils/__fixtures__/ethereumUtils.d.ts +0 -3
- package/lib/utils/__fixtures__/ethereumUtils.js +0 -20
- package/lib/utils/__fixtures__/formatUtils.d.ts +0 -3
- package/lib/utils/__fixtures__/formatUtils.js +0 -15
- package/lib/utils/__fixtures__/hdnodeUtils.d.ts +0 -186
- package/lib/utils/__fixtures__/hdnodeUtils.js +0 -206
- package/lib/utils/bufferUtils.d.ts +0 -3
- package/lib/utils/bufferUtils.js +0 -11
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeData = exports.getFieldType = exports.parseArrayType = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
|
|
6
|
-
const errors_1 = require("../../../constants/errors");
|
|
7
|
-
const constants_1 = require("../../../constants");
|
|
8
|
-
exports.parseArrayType = [
|
|
9
|
-
{
|
|
10
|
-
description: 'should parse sized arrays',
|
|
11
|
-
input: 'uint8[26]',
|
|
12
|
-
output: {
|
|
13
|
-
entryTypeName: 'uint8',
|
|
14
|
-
arraySize: 26,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
description: 'should parse dynamic arrays',
|
|
19
|
-
input: 'int32[]',
|
|
20
|
-
output: {
|
|
21
|
-
entryTypeName: 'int32',
|
|
22
|
-
arraySize: null,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
description: 'should parse nested arrays',
|
|
27
|
-
input: 'int32[5][12]',
|
|
28
|
-
output: {
|
|
29
|
-
entryTypeName: 'int32[5]',
|
|
30
|
-
arraySize: 12,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
description: 'should throw error for non-array type',
|
|
35
|
-
input: 'bytes',
|
|
36
|
-
error: [errors_1.TrezorError, 'could not be parsed'],
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
exports.getFieldType = [
|
|
40
|
-
{
|
|
41
|
-
description: `should parse uints`,
|
|
42
|
-
input: {
|
|
43
|
-
typeName: 'uint256',
|
|
44
|
-
types: {},
|
|
45
|
-
},
|
|
46
|
-
output: {
|
|
47
|
-
data_type: constants_1.PROTO.EthereumDataType.UINT,
|
|
48
|
-
size: 32,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
description: `should parse ints`,
|
|
53
|
-
input: {
|
|
54
|
-
typeName: 'int8',
|
|
55
|
-
types: {},
|
|
56
|
-
},
|
|
57
|
-
output: {
|
|
58
|
-
data_type: constants_1.PROTO.EthereumDataType.INT,
|
|
59
|
-
size: 1,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
description: `should parse booleans`,
|
|
64
|
-
input: {
|
|
65
|
-
typeName: 'bool',
|
|
66
|
-
types: {},
|
|
67
|
-
},
|
|
68
|
-
output: {
|
|
69
|
-
data_type: constants_1.PROTO.EthereumDataType.BOOL,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
description: `should parse address`,
|
|
74
|
-
input: {
|
|
75
|
-
typeName: 'address',
|
|
76
|
-
types: {},
|
|
77
|
-
},
|
|
78
|
-
output: {
|
|
79
|
-
data_type: constants_1.PROTO.EthereumDataType.ADDRESS,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
description: `should parse dynamic bytes`,
|
|
84
|
-
input: {
|
|
85
|
-
typeName: 'bytes',
|
|
86
|
-
types: {},
|
|
87
|
-
},
|
|
88
|
-
output: {
|
|
89
|
-
data_type: constants_1.PROTO.EthereumDataType.BYTES,
|
|
90
|
-
size: undefined,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
description: `should parse fixed-size bytes`,
|
|
95
|
-
input: {
|
|
96
|
-
typeName: 'bytes18',
|
|
97
|
-
types: {},
|
|
98
|
-
},
|
|
99
|
-
output: {
|
|
100
|
-
data_type: constants_1.PROTO.EthereumDataType.BYTES,
|
|
101
|
-
size: 18,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
description: `should parse array types`,
|
|
106
|
-
input: {
|
|
107
|
-
typeName: 'uint256[57]',
|
|
108
|
-
types: {},
|
|
109
|
-
},
|
|
110
|
-
output: {
|
|
111
|
-
data_type: constants_1.PROTO.EthereumDataType.ARRAY,
|
|
112
|
-
size: 57,
|
|
113
|
-
entry_type: {
|
|
114
|
-
data_type: constants_1.PROTO.EthereumDataType.UINT,
|
|
115
|
-
size: 32,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
description: `should parse dynamic array types`,
|
|
121
|
-
input: {
|
|
122
|
-
typeName: 'uint256[]',
|
|
123
|
-
types: {},
|
|
124
|
-
},
|
|
125
|
-
output: {
|
|
126
|
-
data_type: constants_1.PROTO.EthereumDataType.ARRAY,
|
|
127
|
-
size: undefined,
|
|
128
|
-
entry_type: {
|
|
129
|
-
data_type: constants_1.PROTO.EthereumDataType.UINT,
|
|
130
|
-
size: 32,
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
description: 'should parse nested arrays',
|
|
136
|
-
input: {
|
|
137
|
-
typeName: 'int32[5][12]',
|
|
138
|
-
types: {},
|
|
139
|
-
},
|
|
140
|
-
output: {
|
|
141
|
-
data_type: constants_1.PROTO.EthereumDataType.ARRAY,
|
|
142
|
-
size: 12,
|
|
143
|
-
entry_type: {
|
|
144
|
-
data_type: constants_1.PROTO.EthereumDataType.ARRAY,
|
|
145
|
-
size: 5,
|
|
146
|
-
entry_type: {
|
|
147
|
-
data_type: constants_1.PROTO.EthereumDataType.INT,
|
|
148
|
-
size: 4,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
description: `should parse Struct types`,
|
|
155
|
-
input: {
|
|
156
|
-
typeName: 'ExampleStruct',
|
|
157
|
-
types: {
|
|
158
|
-
ExampleStruct: [
|
|
159
|
-
{ name: 'message', type: 'string' },
|
|
160
|
-
{ name: 'cost', type: 'int8' },
|
|
161
|
-
],
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
output: {
|
|
165
|
-
data_type: constants_1.PROTO.EthereumDataType.STRUCT,
|
|
166
|
-
size: 2,
|
|
167
|
-
struct_name: 'ExampleStruct',
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
description: `should throw if Struct type not defined`,
|
|
172
|
-
input: {
|
|
173
|
-
typeName: 'MissingType',
|
|
174
|
-
types: {},
|
|
175
|
-
},
|
|
176
|
-
error: [errors_1.TrezorError, 'No type definition specified: MissingType'],
|
|
177
|
-
},
|
|
178
|
-
];
|
|
179
|
-
exports.encodeData = [
|
|
180
|
-
{
|
|
181
|
-
description: 'should remove leading `0x` from byte hex-string',
|
|
182
|
-
input: {
|
|
183
|
-
typeName: 'bytes',
|
|
184
|
-
data: '0x0123456789abcdef',
|
|
185
|
-
},
|
|
186
|
-
output: '0123456789abcdef',
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
description: 'should pad hex to nearest byte',
|
|
190
|
-
input: {
|
|
191
|
-
typeName: 'bytes',
|
|
192
|
-
data: '0x1',
|
|
193
|
-
},
|
|
194
|
-
output: '01',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
description: 'should encode bytes from Buffer',
|
|
198
|
-
input: {
|
|
199
|
-
typeName: 'bytes',
|
|
200
|
-
data: Buffer.from('0123456789abcdef', 'hex'),
|
|
201
|
-
},
|
|
202
|
-
output: '0123456789abcdef',
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
description: 'should encode bytes from ArrayBuffer',
|
|
206
|
-
input: {
|
|
207
|
-
typeName: 'bytes',
|
|
208
|
-
data: new Uint8Array([0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]).buffer,
|
|
209
|
-
},
|
|
210
|
-
output: '0123456789abcdef',
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
description: 'should remove leading `0x` from Ethereum address',
|
|
214
|
-
input: {
|
|
215
|
-
typeName: 'address',
|
|
216
|
-
data: '0x000000000000000000000000000000000000dead',
|
|
217
|
-
},
|
|
218
|
-
output: '000000000000000000000000000000000000dead',
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
description: `should encode unsigned integers`,
|
|
222
|
-
input: {
|
|
223
|
-
typeName: 'uint8',
|
|
224
|
-
data: 255,
|
|
225
|
-
},
|
|
226
|
-
output: 'ff',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
description: `should encode positive signed integers`,
|
|
230
|
-
input: {
|
|
231
|
-
typeName: 'int8',
|
|
232
|
-
data: 127,
|
|
233
|
-
},
|
|
234
|
-
output: '7f',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
description: `should encode negative signed integers`,
|
|
238
|
-
input: {
|
|
239
|
-
typeName: 'int8',
|
|
240
|
-
data: -1,
|
|
241
|
-
},
|
|
242
|
-
output: 'ff',
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
description: `should encode int from bigint`,
|
|
246
|
-
input: {
|
|
247
|
-
typeName: 'int256',
|
|
248
|
-
data: -(1n << 254n) + 1n,
|
|
249
|
-
},
|
|
250
|
-
output: 'c000000000000000000000000000000000000000000000000000000000000001',
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
description: `should encode int from string`,
|
|
254
|
-
input: {
|
|
255
|
-
typeName: 'int256',
|
|
256
|
-
data: `${-(1n << 254n) + 1n}`,
|
|
257
|
-
},
|
|
258
|
-
output: 'c000000000000000000000000000000000000000000000000000000000000001',
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
description: `should encode int from BigNumber`,
|
|
262
|
-
input: {
|
|
263
|
-
typeName: 'int256',
|
|
264
|
-
data: new bignumber_js_1.default(2).pow(254).negated().plus(1),
|
|
265
|
-
},
|
|
266
|
-
output: 'c000000000000000000000000000000000000000000000000000000000000001',
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
description: `should encode uint from hex-string`,
|
|
270
|
-
input: {
|
|
271
|
-
typeName: 'uint256',
|
|
272
|
-
data: '0xc000000000000000000000000000000000000000000000000000000000000001',
|
|
273
|
-
},
|
|
274
|
-
output: 'c000000000000000000000000000000000000000000000000000000000000001',
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
description: `should throw overflow error when signed int is too large`,
|
|
278
|
-
input: {
|
|
279
|
-
typeName: 'int8',
|
|
280
|
-
data: 128,
|
|
281
|
-
},
|
|
282
|
-
error: [errors_1.TrezorError, 'overflow'],
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
description: `should throw overflow error when signed int is too small`,
|
|
286
|
-
input: {
|
|
287
|
-
typeName: 'int8',
|
|
288
|
-
data: -129,
|
|
289
|
-
},
|
|
290
|
-
error: [errors_1.TrezorError, 'overflow'],
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
description: `should throw overflow error when unsigned int is too large`,
|
|
294
|
-
input: {
|
|
295
|
-
typeName: 'uint8',
|
|
296
|
-
data: 256,
|
|
297
|
-
},
|
|
298
|
-
error: [errors_1.TrezorError, 'overflow'],
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
description: `should throw error when unsigned int is negative`,
|
|
302
|
-
input: {
|
|
303
|
-
typeName: 'uint8',
|
|
304
|
-
data: -1,
|
|
305
|
-
},
|
|
306
|
-
error: [errors_1.TrezorError, 'negative'],
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
description: 'should encode string as utf-8',
|
|
310
|
-
input: {
|
|
311
|
-
typeName: 'string',
|
|
312
|
-
data: 'Trezor Model T is an amazing piece of hardware. 😋😋',
|
|
313
|
-
},
|
|
314
|
-
output: '5472657a6f72204d6f64656c205420697320616e20616d617a696e67207069656365206f662068617264776172652e20f09f988bf09f988b',
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
description: 'should encode bool as a single byte',
|
|
318
|
-
input: {
|
|
319
|
-
typeName: 'bool',
|
|
320
|
-
data: true,
|
|
321
|
-
},
|
|
322
|
-
output: '01',
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
description: 'should encode bool as a single byte',
|
|
326
|
-
input: {
|
|
327
|
-
typeName: 'bool',
|
|
328
|
-
data: false,
|
|
329
|
-
},
|
|
330
|
-
output: '00',
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
description: 'should throw for array types',
|
|
334
|
-
input: {
|
|
335
|
-
typeName: 'bool[1]',
|
|
336
|
-
data: [true],
|
|
337
|
-
},
|
|
338
|
-
error: [errors_1.TrezorError, 'Unsupported'],
|
|
339
|
-
},
|
|
340
|
-
];
|
|
341
|
-
//# sourceMappingURL=ethereumSignTypedData.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isUtxoBasedFixtures = exports.getAccountLabelFixtures = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const coins_json_1 = tslib_1.__importDefault(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
-
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
-
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
-
exports.getAccountLabelFixtures = [
|
|
9
|
-
{
|
|
10
|
-
description: 'Legacy',
|
|
11
|
-
input: [[44], (0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
12
|
-
output: 'legacy <span>account #1</span>',
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
exports.isUtxoBasedFixtures = [
|
|
16
|
-
{
|
|
17
|
-
description: 'btc',
|
|
18
|
-
input: [(0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
19
|
-
output: true,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
description: 'ada',
|
|
23
|
-
input: [(0, coinInfo_1.getMiscNetwork)('ada')],
|
|
24
|
-
output: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
description: 'eth',
|
|
28
|
-
input: [(0, coinInfo_1.getEthereumNetwork)('eth')],
|
|
29
|
-
output: false,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
//# sourceMappingURL=accountUtils.js.map
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.invalidAddresses = exports.validAddresses = void 0;
|
|
4
|
-
exports.validAddresses = [
|
|
5
|
-
{
|
|
6
|
-
description: 'Bitcoin P2PKH',
|
|
7
|
-
coin: 'btc',
|
|
8
|
-
address: '12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
description: 'Bitcoin P2SH',
|
|
12
|
-
coin: 'btc',
|
|
13
|
-
address: '3FyVFsEyyBPzHjD3qUEgX7Jsn4tcHNZFkn',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
description: 'Bitcoin P2WPKH',
|
|
17
|
-
coin: 'btc',
|
|
18
|
-
address: 'BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
description: 'BTC P2WPKH version 1',
|
|
22
|
-
coin: 'btc',
|
|
23
|
-
address: 'bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7kt5nd6y',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
description: 'BTC P2WPKH version 2',
|
|
27
|
-
coin: 'btc',
|
|
28
|
-
address: 'bc1zw508d6qejxtdg4y5r3zarvaryvaxxpcs',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
description: 'BTC P2WPKH version 16',
|
|
32
|
-
coin: 'btc',
|
|
33
|
-
address: 'BC1SW50QGDZ25J',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
description: 'Testnet P2PKH',
|
|
37
|
-
coin: 'test',
|
|
38
|
-
address: 'mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
description: 'Testnet P2SH',
|
|
42
|
-
coin: 'test',
|
|
43
|
-
address: '2MxKEf2su6FGAUfCEAHreGFQvEYrfYNHvL7',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
description: 'Testnet P2SH',
|
|
47
|
-
coin: 'test',
|
|
48
|
-
address: '2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
description: 'Testnet P2WPKH',
|
|
52
|
-
coin: 'test',
|
|
53
|
-
address: 'tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
description: 'Testnet P2WPKH',
|
|
57
|
-
coin: 'test',
|
|
58
|
-
address: 'tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
description: 'Regtest P2PKH',
|
|
62
|
-
coin: 'regtest',
|
|
63
|
-
address: 'mvbu1Gdy8SUjTenqerxUaZyYjmveZvt33q',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
description: 'Regtest P2SH',
|
|
67
|
-
coin: 'regtest',
|
|
68
|
-
address: '2N4Q5FhU2497BryFfUgbqkAJE87aKHUhXMp',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
description: 'Regtest P2WPKH',
|
|
72
|
-
coin: 'regtest',
|
|
73
|
-
address: 'bcrt1qkvwu9g3k2pdxewfqr7syz89r3gj557l374sg5v',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
description: 'Regtest P2TR',
|
|
77
|
-
coin: 'regtest',
|
|
78
|
-
address: 'bcrt1pswrqtykue8r89t9u4rprjs0gt4qzkdfuursfnvqaa3f2yql07zmq2fdmpx',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
description: 'Litecoin P2PKH',
|
|
82
|
-
coin: 'ltc',
|
|
83
|
-
address: 'LVg2kJoFNg45Nbpy53h7Fe1wKyeXVRhMH9',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
description: 'Litecoin P2SH',
|
|
87
|
-
coin: 'ltc',
|
|
88
|
-
address: 'MUWheVyCBf3Fm3WNNXvotQ3Gj8NTSZCBVe',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
description: 'Litecoin P2WPKH',
|
|
92
|
-
coin: 'ltc',
|
|
93
|
-
address: 'ltc1qajkrze8gc5qdx2ehldsmd596a2gprnn50a53mj3xxvy0zgtdq6gqumv03a',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
description: 'BCH cash address',
|
|
97
|
-
coin: 'bch',
|
|
98
|
-
address: 'bitcoincash:qq4v32mtagxac29my6gwj6fd4tmqg8rysu23dax807',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
description: 'BCH cash address no prefix',
|
|
102
|
-
coin: 'bch',
|
|
103
|
-
address: 'qq4v32mtagxac29my6gwj6fd4tmqg8rysu23dax807',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
description: 'Bitcoin Gold P2PKH',
|
|
107
|
-
coin: 'btg',
|
|
108
|
-
address: 'GW3JrQyHtoVfEFES3Y9JagiX3VSKQStLwj',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
description: 'Bitcoin Gold P2SH',
|
|
112
|
-
coin: 'btg',
|
|
113
|
-
address: 'AQtK3tNjJUSn68fXdDoBU8o1jNxNvzMQ4A',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
description: 'Dash P2PKH',
|
|
117
|
-
coin: 'dash',
|
|
118
|
-
address: 'Xx4dYKgz3Zcv6kheaqog3fynaKWjbahb6b',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
description: 'Digibyte P2PKH',
|
|
122
|
-
coin: 'dgb',
|
|
123
|
-
address: 'D9TDZTR9Z9Mx2NoDJnhqhnYhDLKRAmsL9n',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
description: 'Digibyte P2SH',
|
|
127
|
-
coin: 'dgb',
|
|
128
|
-
address: 'SRrevBM5bfZNpFJ4MhzaNfkTghYKoTB6LV',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
description: 'Doge P2PKH',
|
|
132
|
-
coin: 'doge',
|
|
133
|
-
address: 'DPpJVPpvPNP6i6tMj4rTycAGh8wReTqaSU',
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
description: 'Vertcoin P2PKH',
|
|
137
|
-
coin: 'vtc',
|
|
138
|
-
address: 'VmoMjGf3zgZLy8sk3PMKd3xikZHXWvnYi7',
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
description: 'Vertcoin P2SH',
|
|
142
|
-
coin: 'vtc',
|
|
143
|
-
address: '3PgeyhEJEnS5CeBu3iFcu3JHVKemeHx1AW',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
description: 'Vertcoin P2WPKH',
|
|
147
|
-
coin: 'vtc',
|
|
148
|
-
address: 'vtc1qmzq3erafwvz23yfeu9tu45uz2kx3d7esk0rayg',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
description: 'ZCash P2PKH',
|
|
152
|
-
coin: 'zec',
|
|
153
|
-
address: 't1U9yhDa5XEjgfnTgZoKddeSiEN1aoLkQxq',
|
|
154
|
-
},
|
|
155
|
-
];
|
|
156
|
-
exports.invalidAddresses = [
|
|
157
|
-
{
|
|
158
|
-
address: 'LVg2kJoFNg45Nbpy53h7Fe1wKyeXVRhMH9',
|
|
159
|
-
coin: 'btc',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
address: 'tc1qw508d6qejxtdg4y5r3zarvary0c5xw7kg3g4ty',
|
|
163
|
-
coin: 'btc',
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
address: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t5',
|
|
167
|
-
coin: 'btc',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
address: 'bc1rw5uspcuh',
|
|
171
|
-
coin: 'btc',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
address: 'bc1gmk9yu',
|
|
175
|
-
coin: 'btc',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
address: 'bc1gmk9yu',
|
|
179
|
-
coin: 'btc',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
address: '12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP',
|
|
183
|
-
coin: 'bch',
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
address: '3NJZLcZEEYBpxYEUGewU4knsQRn1WM5Fkt',
|
|
187
|
-
coin: 'bch',
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
address: 'bitcoincash:qp3wjpa3tjlj042z2wv7hahsldgwhwy0rq9sywjpyya',
|
|
191
|
-
coin: 'bch',
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
address: 'vtc1qmzq3erafwvz23yabc9tu45uz2kx3d7esk0rayg',
|
|
195
|
-
coin: 'vtc',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
address: 'vtc1qhy8eqwqxpyryz4wctus36yl2uu60t0z6ecrvt',
|
|
199
|
-
coin: 'vtc',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
address: 'vtd1qhy8eqwqxpyryz4wctus36yl2uu60t0z6ecrvtc',
|
|
203
|
-
coin: 'vtc',
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
address: 't3Yz22vK5z2LcKEdg16Yv4FFneEL1zg9ojd',
|
|
207
|
-
coin: 'zec',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
address: 't2YNzUUx8mWBCRYPRezvA363EYXyEpHokyi',
|
|
211
|
-
coin: 'zec',
|
|
212
|
-
},
|
|
213
|
-
];
|
|
214
|
-
//# sourceMappingURL=addressUtils.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNetworkLabelFixtures = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const coins_json_1 = tslib_1.__importDefault(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
-
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
-
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
-
exports.getNetworkLabelFixtures = [
|
|
9
|
-
{
|
|
10
|
-
description: 'eth',
|
|
11
|
-
input: ['Export #NETWORK address', (0, coinInfo_1.getEthereumNetwork)('eth')],
|
|
12
|
-
output: 'Export Ethereum address',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
description: 'etc',
|
|
16
|
-
input: ['Export #NETWORK address', (0, coinInfo_1.getEthereumNetwork)('etc')],
|
|
17
|
-
output: 'Export Ethereum Classic address',
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
//# sourceMappingURL=ethereumUtils.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatAmountFixtures = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const coins_json_1 = tslib_1.__importDefault(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
-
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
-
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
-
exports.formatAmountFixtures = [
|
|
9
|
-
{
|
|
10
|
-
description: '10',
|
|
11
|
-
input: ['10', (0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
12
|
-
output: '0.0000001 BTC',
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
//# sourceMappingURL=formatUtils.js.map
|