@onekeyfe/hd-transport 0.1.39 → 0.1.42
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/.eslintrc +3 -1
- package/__tests__/build-receive.test.js +117 -0
- package/__tests__/encode-decode-basic.test.js +272 -0
- package/__tests__/encode-decode.test.js +532 -0
- package/__tests__/messages.test.js +86 -0
- package/dist/index.js +127 -161
- package/dist/serialization/protobuf/decode.d.ts +1 -1
- package/dist/serialization/protobuf/decode.d.ts.map +1 -1
- package/dist/serialization/protobuf/encode.d.ts +1 -1
- package/dist/serialization/protobuf/encode.d.ts.map +1 -1
- package/dist/serialization/receive.d.ts.map +1 -1
- package/dist/serialization/send.d.ts +1 -1
- package/dist/serialization/send.d.ts.map +1 -1
- package/jest.config.js +7 -0
- package/package.json +5 -3
- package/scripts/protobuf-build.sh +57 -0
- package/scripts/protobuf-patches/TxAck.js +44 -0
- package/scripts/protobuf-patches/TxInputType.js +49 -0
- package/scripts/protobuf-patches/TxOutputType.js +50 -0
- package/scripts/protobuf-patches/index.js +305 -0
- package/scripts/protobuf-types.js +283 -0
- package/src/serialization/protobuf/decode.ts +1 -1
- package/src/serialization/protobuf/encode.ts +1 -1
- package/src/serialization/receive.ts +1 -1
- package/src/serialization/send.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,35 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var protobuf = require('protobufjs/light');
|
|
6
|
-
var Long = require('long');
|
|
7
|
-
var ByteBuffer = require('bytebuffer');
|
|
8
|
-
var buffer = require('buffer');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
14
|
-
var n = Object.create(null);
|
|
15
|
-
if (e) {
|
|
16
|
-
Object.keys(e).forEach(function (k) {
|
|
17
|
-
if (k !== 'default') {
|
|
18
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return e[k]; }
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
n["default"] = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var protobuf__namespace = /*#__PURE__*/_interopNamespace(protobuf);
|
|
31
|
-
var Long__namespace = /*#__PURE__*/_interopNamespace(Long);
|
|
32
|
-
var ByteBuffer__default = /*#__PURE__*/_interopDefaultLegacy(ByteBuffer);
|
|
1
|
+
import * as protobuf from 'protobufjs/light';
|
|
2
|
+
import * as Long from 'long';
|
|
3
|
+
import ByteBuffer from 'bytebuffer';
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
33
5
|
|
|
34
6
|
/******************************************************************************
|
|
35
7
|
Copyright (c) Microsoft Corporation.
|
|
@@ -82,7 +54,7 @@ const transform$1 = (field, value) => {
|
|
|
82
54
|
return null;
|
|
83
55
|
}
|
|
84
56
|
if (field.type === 'bytes') {
|
|
85
|
-
return
|
|
57
|
+
return ByteBuffer.wrap(value).toString('hex');
|
|
86
58
|
}
|
|
87
59
|
if (field.long) {
|
|
88
60
|
if (Number.isSafeInteger(value.toNumber())) {
|
|
@@ -138,7 +110,7 @@ const transform = (fieldType, value) => {
|
|
|
138
110
|
if (fieldType === 'bytes') {
|
|
139
111
|
if (typeof value === 'string' && !value)
|
|
140
112
|
return value;
|
|
141
|
-
return
|
|
113
|
+
return Buffer.from(value, 'hex');
|
|
142
114
|
}
|
|
143
115
|
if (typeof value === 'number' && !Number.isSafeInteger(value)) {
|
|
144
116
|
throw new RangeError('field value is not within safe integer range');
|
|
@@ -187,7 +159,7 @@ const encode$1 = (Message, data) => {
|
|
|
187
159
|
const payload = patch(Message, data);
|
|
188
160
|
const message = Message.fromObject(payload);
|
|
189
161
|
const buffer = Message.encode(message).finish();
|
|
190
|
-
const bytebuffer = new
|
|
162
|
+
const bytebuffer = new ByteBuffer(buffer.byteLength);
|
|
191
163
|
bytebuffer.append(buffer);
|
|
192
164
|
bytebuffer.reset();
|
|
193
165
|
return bytebuffer;
|
|
@@ -195,9 +167,9 @@ const encode$1 = (Message, data) => {
|
|
|
195
167
|
|
|
196
168
|
function parseConfigure(data) {
|
|
197
169
|
if (typeof data === 'string') {
|
|
198
|
-
return
|
|
170
|
+
return protobuf.Root.fromJSON(JSON.parse(data));
|
|
199
171
|
}
|
|
200
|
-
return
|
|
172
|
+
return protobuf.Root.fromJSON(data);
|
|
201
173
|
}
|
|
202
174
|
const createMessageFromName = (messages, name) => {
|
|
203
175
|
const Message = messages.lookupType(name);
|
|
@@ -247,7 +219,7 @@ const decode = (byteBuffer) => {
|
|
|
247
219
|
};
|
|
248
220
|
};
|
|
249
221
|
const decodeChunked = (bytes) => {
|
|
250
|
-
const byteBuffer =
|
|
222
|
+
const byteBuffer = ByteBuffer.wrap(bytes, undefined, undefined, true);
|
|
251
223
|
const { sharp1, sharp2, typeId, length } = readHeaderChunked(byteBuffer);
|
|
252
224
|
if (sharp1 !== MESSAGE_HEADER_BYTE || sharp2 !== MESSAGE_HEADER_BYTE) {
|
|
253
225
|
throw new Error("Didn't receive expected header signature.");
|
|
@@ -264,7 +236,7 @@ var decodeProtocol = /*#__PURE__*/Object.freeze({
|
|
|
264
236
|
function encode(data, options) {
|
|
265
237
|
const { addTrezorHeaders, chunked, messageType } = options;
|
|
266
238
|
const fullSize = (addTrezorHeaders ? HEADER_SIZE : HEADER_SIZE - 2) + data.limit;
|
|
267
|
-
const encodedByteBuffer = new
|
|
239
|
+
const encodedByteBuffer = new ByteBuffer(fullSize);
|
|
268
240
|
if (addTrezorHeaders) {
|
|
269
241
|
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
270
242
|
encodedByteBuffer.writeByte(MESSAGE_HEADER_BYTE);
|
|
@@ -311,7 +283,7 @@ const buildBuffers = (messages, name, data) => {
|
|
|
311
283
|
const encodeBuffers = buildEncodeBuffers(messages, name, data);
|
|
312
284
|
const outBuffers = [];
|
|
313
285
|
for (const buf of encodeBuffers) {
|
|
314
|
-
const chunkBuffer = new
|
|
286
|
+
const chunkBuffer = new ByteBuffer(BUFFER_SIZE + 1);
|
|
315
287
|
chunkBuffer.writeByte(MESSAGE_TOP_CHAR);
|
|
316
288
|
chunkBuffer.append(buf);
|
|
317
289
|
chunkBuffer.reset();
|
|
@@ -321,7 +293,7 @@ const buildBuffers = (messages, name, data) => {
|
|
|
321
293
|
};
|
|
322
294
|
|
|
323
295
|
function receiveOne(messages, data) {
|
|
324
|
-
const bytebuffer =
|
|
296
|
+
const bytebuffer = ByteBuffer.wrap(data, 'hex');
|
|
325
297
|
const { typeId, buffer } = decode(bytebuffer);
|
|
326
298
|
const { Message, messageName } = createMessageFromType(messages, typeId);
|
|
327
299
|
const message = decode$1(Message, buffer);
|
|
@@ -418,27 +390,27 @@ var check = /*#__PURE__*/Object.freeze({
|
|
|
418
390
|
call: call
|
|
419
391
|
});
|
|
420
392
|
|
|
421
|
-
|
|
393
|
+
var BinanceOrderType;
|
|
422
394
|
(function (BinanceOrderType) {
|
|
423
395
|
BinanceOrderType[BinanceOrderType["OT_UNKNOWN"] = 0] = "OT_UNKNOWN";
|
|
424
396
|
BinanceOrderType[BinanceOrderType["MARKET"] = 1] = "MARKET";
|
|
425
397
|
BinanceOrderType[BinanceOrderType["LIMIT"] = 2] = "LIMIT";
|
|
426
398
|
BinanceOrderType[BinanceOrderType["OT_RESERVED"] = 3] = "OT_RESERVED";
|
|
427
|
-
})(
|
|
428
|
-
|
|
399
|
+
})(BinanceOrderType || (BinanceOrderType = {}));
|
|
400
|
+
var BinanceOrderSide;
|
|
429
401
|
(function (BinanceOrderSide) {
|
|
430
402
|
BinanceOrderSide[BinanceOrderSide["SIDE_UNKNOWN"] = 0] = "SIDE_UNKNOWN";
|
|
431
403
|
BinanceOrderSide[BinanceOrderSide["BUY"] = 1] = "BUY";
|
|
432
404
|
BinanceOrderSide[BinanceOrderSide["SELL"] = 2] = "SELL";
|
|
433
|
-
})(
|
|
434
|
-
|
|
405
|
+
})(BinanceOrderSide || (BinanceOrderSide = {}));
|
|
406
|
+
var BinanceTimeInForce;
|
|
435
407
|
(function (BinanceTimeInForce) {
|
|
436
408
|
BinanceTimeInForce[BinanceTimeInForce["TIF_UNKNOWN"] = 0] = "TIF_UNKNOWN";
|
|
437
409
|
BinanceTimeInForce[BinanceTimeInForce["GTE"] = 1] = "GTE";
|
|
438
410
|
BinanceTimeInForce[BinanceTimeInForce["TIF_RESERVED"] = 2] = "TIF_RESERVED";
|
|
439
411
|
BinanceTimeInForce[BinanceTimeInForce["IOC"] = 3] = "IOC";
|
|
440
|
-
})(
|
|
441
|
-
|
|
412
|
+
})(BinanceTimeInForce || (BinanceTimeInForce = {}));
|
|
413
|
+
var Enum_InputScriptType;
|
|
442
414
|
(function (Enum_InputScriptType) {
|
|
443
415
|
Enum_InputScriptType[Enum_InputScriptType["SPENDADDRESS"] = 0] = "SPENDADDRESS";
|
|
444
416
|
Enum_InputScriptType[Enum_InputScriptType["SPENDMULTISIG"] = 1] = "SPENDMULTISIG";
|
|
@@ -446,8 +418,8 @@ exports.Enum_InputScriptType = void 0;
|
|
|
446
418
|
Enum_InputScriptType[Enum_InputScriptType["SPENDWITNESS"] = 3] = "SPENDWITNESS";
|
|
447
419
|
Enum_InputScriptType[Enum_InputScriptType["SPENDP2SHWITNESS"] = 4] = "SPENDP2SHWITNESS";
|
|
448
420
|
Enum_InputScriptType[Enum_InputScriptType["SPENDTAPROOT"] = 5] = "SPENDTAPROOT";
|
|
449
|
-
})(
|
|
450
|
-
|
|
421
|
+
})(Enum_InputScriptType || (Enum_InputScriptType = {}));
|
|
422
|
+
var Enum_OutputScriptType;
|
|
451
423
|
(function (Enum_OutputScriptType) {
|
|
452
424
|
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOADDRESS"] = 0] = "PAYTOADDRESS";
|
|
453
425
|
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOSCRIPTHASH"] = 1] = "PAYTOSCRIPTHASH";
|
|
@@ -456,20 +428,20 @@ exports.Enum_OutputScriptType = void 0;
|
|
|
456
428
|
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOWITNESS"] = 4] = "PAYTOWITNESS";
|
|
457
429
|
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOP2SHWITNESS"] = 5] = "PAYTOP2SHWITNESS";
|
|
458
430
|
Enum_OutputScriptType[Enum_OutputScriptType["PAYTOTAPROOT"] = 6] = "PAYTOTAPROOT";
|
|
459
|
-
})(
|
|
460
|
-
|
|
431
|
+
})(Enum_OutputScriptType || (Enum_OutputScriptType = {}));
|
|
432
|
+
var DecredStakingSpendType;
|
|
461
433
|
(function (DecredStakingSpendType) {
|
|
462
434
|
DecredStakingSpendType[DecredStakingSpendType["SSGen"] = 0] = "SSGen";
|
|
463
435
|
DecredStakingSpendType[DecredStakingSpendType["SSRTX"] = 1] = "SSRTX";
|
|
464
|
-
})(
|
|
465
|
-
|
|
436
|
+
})(DecredStakingSpendType || (DecredStakingSpendType = {}));
|
|
437
|
+
var AmountUnit;
|
|
466
438
|
(function (AmountUnit) {
|
|
467
439
|
AmountUnit[AmountUnit["BITCOIN"] = 0] = "BITCOIN";
|
|
468
440
|
AmountUnit[AmountUnit["MILLIBITCOIN"] = 1] = "MILLIBITCOIN";
|
|
469
441
|
AmountUnit[AmountUnit["MICROBITCOIN"] = 2] = "MICROBITCOIN";
|
|
470
442
|
AmountUnit[AmountUnit["SATOSHI"] = 3] = "SATOSHI";
|
|
471
|
-
})(
|
|
472
|
-
|
|
443
|
+
})(AmountUnit || (AmountUnit = {}));
|
|
444
|
+
var Enum_RequestType;
|
|
473
445
|
(function (Enum_RequestType) {
|
|
474
446
|
Enum_RequestType[Enum_RequestType["TXINPUT"] = 0] = "TXINPUT";
|
|
475
447
|
Enum_RequestType[Enum_RequestType["TXOUTPUT"] = 1] = "TXOUTPUT";
|
|
@@ -479,14 +451,14 @@ exports.Enum_RequestType = void 0;
|
|
|
479
451
|
Enum_RequestType[Enum_RequestType["TXORIGINPUT"] = 5] = "TXORIGINPUT";
|
|
480
452
|
Enum_RequestType[Enum_RequestType["TXORIGOUTPUT"] = 6] = "TXORIGOUTPUT";
|
|
481
453
|
Enum_RequestType[Enum_RequestType["TXPAYMENTREQ"] = 7] = "TXPAYMENTREQ";
|
|
482
|
-
})(
|
|
483
|
-
|
|
454
|
+
})(Enum_RequestType || (Enum_RequestType = {}));
|
|
455
|
+
var CardanoDerivationType;
|
|
484
456
|
(function (CardanoDerivationType) {
|
|
485
457
|
CardanoDerivationType[CardanoDerivationType["LEDGER"] = 0] = "LEDGER";
|
|
486
458
|
CardanoDerivationType[CardanoDerivationType["ICARUS"] = 1] = "ICARUS";
|
|
487
459
|
CardanoDerivationType[CardanoDerivationType["ICARUS_TREZOR"] = 2] = "ICARUS_TREZOR";
|
|
488
|
-
})(
|
|
489
|
-
|
|
460
|
+
})(CardanoDerivationType || (CardanoDerivationType = {}));
|
|
461
|
+
var CardanoAddressType;
|
|
490
462
|
(function (CardanoAddressType) {
|
|
491
463
|
CardanoAddressType[CardanoAddressType["BASE"] = 0] = "BASE";
|
|
492
464
|
CardanoAddressType[CardanoAddressType["BASE_SCRIPT_KEY"] = 1] = "BASE_SCRIPT_KEY";
|
|
@@ -499,8 +471,8 @@ exports.CardanoAddressType = void 0;
|
|
|
499
471
|
CardanoAddressType[CardanoAddressType["BYRON"] = 8] = "BYRON";
|
|
500
472
|
CardanoAddressType[CardanoAddressType["REWARD"] = 14] = "REWARD";
|
|
501
473
|
CardanoAddressType[CardanoAddressType["REWARD_SCRIPT"] = 15] = "REWARD_SCRIPT";
|
|
502
|
-
})(
|
|
503
|
-
|
|
474
|
+
})(CardanoAddressType || (CardanoAddressType = {}));
|
|
475
|
+
var CardanoNativeScriptType;
|
|
504
476
|
(function (CardanoNativeScriptType) {
|
|
505
477
|
CardanoNativeScriptType[CardanoNativeScriptType["PUB_KEY"] = 0] = "PUB_KEY";
|
|
506
478
|
CardanoNativeScriptType[CardanoNativeScriptType["ALL"] = 1] = "ALL";
|
|
@@ -508,44 +480,44 @@ exports.CardanoNativeScriptType = void 0;
|
|
|
508
480
|
CardanoNativeScriptType[CardanoNativeScriptType["N_OF_K"] = 3] = "N_OF_K";
|
|
509
481
|
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_BEFORE"] = 4] = "INVALID_BEFORE";
|
|
510
482
|
CardanoNativeScriptType[CardanoNativeScriptType["INVALID_HEREAFTER"] = 5] = "INVALID_HEREAFTER";
|
|
511
|
-
})(
|
|
512
|
-
|
|
483
|
+
})(CardanoNativeScriptType || (CardanoNativeScriptType = {}));
|
|
484
|
+
var CardanoNativeScriptHashDisplayFormat;
|
|
513
485
|
(function (CardanoNativeScriptHashDisplayFormat) {
|
|
514
486
|
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["HIDE"] = 0] = "HIDE";
|
|
515
487
|
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["BECH32"] = 1] = "BECH32";
|
|
516
488
|
CardanoNativeScriptHashDisplayFormat[CardanoNativeScriptHashDisplayFormat["POLICY_ID"] = 2] = "POLICY_ID";
|
|
517
|
-
})(
|
|
518
|
-
|
|
489
|
+
})(CardanoNativeScriptHashDisplayFormat || (CardanoNativeScriptHashDisplayFormat = {}));
|
|
490
|
+
var CardanoCertificateType;
|
|
519
491
|
(function (CardanoCertificateType) {
|
|
520
492
|
CardanoCertificateType[CardanoCertificateType["STAKE_REGISTRATION"] = 0] = "STAKE_REGISTRATION";
|
|
521
493
|
CardanoCertificateType[CardanoCertificateType["STAKE_DEREGISTRATION"] = 1] = "STAKE_DEREGISTRATION";
|
|
522
494
|
CardanoCertificateType[CardanoCertificateType["STAKE_DELEGATION"] = 2] = "STAKE_DELEGATION";
|
|
523
495
|
CardanoCertificateType[CardanoCertificateType["STAKE_POOL_REGISTRATION"] = 3] = "STAKE_POOL_REGISTRATION";
|
|
524
|
-
})(
|
|
525
|
-
|
|
496
|
+
})(CardanoCertificateType || (CardanoCertificateType = {}));
|
|
497
|
+
var CardanoPoolRelayType;
|
|
526
498
|
(function (CardanoPoolRelayType) {
|
|
527
499
|
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_IP"] = 0] = "SINGLE_HOST_IP";
|
|
528
500
|
CardanoPoolRelayType[CardanoPoolRelayType["SINGLE_HOST_NAME"] = 1] = "SINGLE_HOST_NAME";
|
|
529
501
|
CardanoPoolRelayType[CardanoPoolRelayType["MULTIPLE_HOST_NAME"] = 2] = "MULTIPLE_HOST_NAME";
|
|
530
|
-
})(
|
|
531
|
-
|
|
502
|
+
})(CardanoPoolRelayType || (CardanoPoolRelayType = {}));
|
|
503
|
+
var CardanoTxAuxiliaryDataSupplementType;
|
|
532
504
|
(function (CardanoTxAuxiliaryDataSupplementType) {
|
|
533
505
|
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["NONE"] = 0] = "NONE";
|
|
534
506
|
CardanoTxAuxiliaryDataSupplementType[CardanoTxAuxiliaryDataSupplementType["CATALYST_REGISTRATION_SIGNATURE"] = 1] = "CATALYST_REGISTRATION_SIGNATURE";
|
|
535
|
-
})(
|
|
536
|
-
|
|
507
|
+
})(CardanoTxAuxiliaryDataSupplementType || (CardanoTxAuxiliaryDataSupplementType = {}));
|
|
508
|
+
var CardanoTxSigningMode;
|
|
537
509
|
(function (CardanoTxSigningMode) {
|
|
538
510
|
CardanoTxSigningMode[CardanoTxSigningMode["ORDINARY_TRANSACTION"] = 0] = "ORDINARY_TRANSACTION";
|
|
539
511
|
CardanoTxSigningMode[CardanoTxSigningMode["POOL_REGISTRATION_AS_OWNER"] = 1] = "POOL_REGISTRATION_AS_OWNER";
|
|
540
512
|
CardanoTxSigningMode[CardanoTxSigningMode["MULTISIG_TRANSACTION"] = 2] = "MULTISIG_TRANSACTION";
|
|
541
513
|
CardanoTxSigningMode[CardanoTxSigningMode["PLUTUS_TRANSACTION"] = 3] = "PLUTUS_TRANSACTION";
|
|
542
|
-
})(
|
|
543
|
-
|
|
514
|
+
})(CardanoTxSigningMode || (CardanoTxSigningMode = {}));
|
|
515
|
+
var CardanoTxWitnessType;
|
|
544
516
|
(function (CardanoTxWitnessType) {
|
|
545
517
|
CardanoTxWitnessType[CardanoTxWitnessType["BYRON_WITNESS"] = 0] = "BYRON_WITNESS";
|
|
546
518
|
CardanoTxWitnessType[CardanoTxWitnessType["SHELLEY_WITNESS"] = 1] = "SHELLEY_WITNESS";
|
|
547
|
-
})(
|
|
548
|
-
|
|
519
|
+
})(CardanoTxWitnessType || (CardanoTxWitnessType = {}));
|
|
520
|
+
var FailureType;
|
|
549
521
|
(function (FailureType) {
|
|
550
522
|
FailureType[FailureType["Failure_UnexpectedMessage"] = 1] = "Failure_UnexpectedMessage";
|
|
551
523
|
FailureType[FailureType["Failure_ButtonExpected"] = 2] = "Failure_ButtonExpected";
|
|
@@ -562,8 +534,8 @@ exports.FailureType = void 0;
|
|
|
562
534
|
FailureType[FailureType["Failure_WipeCodeMismatch"] = 13] = "Failure_WipeCodeMismatch";
|
|
563
535
|
FailureType[FailureType["Failure_InvalidSession"] = 14] = "Failure_InvalidSession";
|
|
564
536
|
FailureType[FailureType["Failure_FirmwareError"] = 99] = "Failure_FirmwareError";
|
|
565
|
-
})(
|
|
566
|
-
|
|
537
|
+
})(FailureType || (FailureType = {}));
|
|
538
|
+
var Enum_ButtonRequestType;
|
|
567
539
|
(function (Enum_ButtonRequestType) {
|
|
568
540
|
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Other"] = 1] = "ButtonRequest_Other";
|
|
569
541
|
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_FeeOverThreshold"] = 2] = "ButtonRequest_FeeOverThreshold";
|
|
@@ -585,22 +557,22 @@ exports.Enum_ButtonRequestType = void 0;
|
|
|
585
557
|
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_Warning"] = 18] = "ButtonRequest_Warning";
|
|
586
558
|
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PassphraseEntry"] = 19] = "ButtonRequest_PassphraseEntry";
|
|
587
559
|
Enum_ButtonRequestType[Enum_ButtonRequestType["ButtonRequest_PinEntry"] = 20] = "ButtonRequest_PinEntry";
|
|
588
|
-
})(
|
|
589
|
-
|
|
560
|
+
})(Enum_ButtonRequestType || (Enum_ButtonRequestType = {}));
|
|
561
|
+
var Enum_PinMatrixRequestType;
|
|
590
562
|
(function (Enum_PinMatrixRequestType) {
|
|
591
563
|
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_Current"] = 1] = "PinMatrixRequestType_Current";
|
|
592
564
|
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewFirst"] = 2] = "PinMatrixRequestType_NewFirst";
|
|
593
565
|
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_NewSecond"] = 3] = "PinMatrixRequestType_NewSecond";
|
|
594
566
|
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeFirst"] = 4] = "PinMatrixRequestType_WipeCodeFirst";
|
|
595
567
|
Enum_PinMatrixRequestType[Enum_PinMatrixRequestType["PinMatrixRequestType_WipeCodeSecond"] = 5] = "PinMatrixRequestType_WipeCodeSecond";
|
|
596
|
-
})(
|
|
597
|
-
|
|
568
|
+
})(Enum_PinMatrixRequestType || (Enum_PinMatrixRequestType = {}));
|
|
569
|
+
var DebugButton;
|
|
598
570
|
(function (DebugButton) {
|
|
599
571
|
DebugButton[DebugButton["NO"] = 0] = "NO";
|
|
600
572
|
DebugButton[DebugButton["YES"] = 1] = "YES";
|
|
601
573
|
DebugButton[DebugButton["INFO"] = 2] = "INFO";
|
|
602
|
-
})(
|
|
603
|
-
|
|
574
|
+
})(DebugButton || (DebugButton = {}));
|
|
575
|
+
var EthereumDataType;
|
|
604
576
|
(function (EthereumDataType) {
|
|
605
577
|
EthereumDataType[EthereumDataType["UINT"] = 1] = "UINT";
|
|
606
578
|
EthereumDataType[EthereumDataType["INT"] = 2] = "INT";
|
|
@@ -610,20 +582,20 @@ exports.EthereumDataType = void 0;
|
|
|
610
582
|
EthereumDataType[EthereumDataType["ADDRESS"] = 6] = "ADDRESS";
|
|
611
583
|
EthereumDataType[EthereumDataType["ARRAY"] = 7] = "ARRAY";
|
|
612
584
|
EthereumDataType[EthereumDataType["STRUCT"] = 8] = "STRUCT";
|
|
613
|
-
})(
|
|
614
|
-
|
|
585
|
+
})(EthereumDataType || (EthereumDataType = {}));
|
|
586
|
+
var Enum_BackupType;
|
|
615
587
|
(function (Enum_BackupType) {
|
|
616
588
|
Enum_BackupType[Enum_BackupType["Bip39"] = 0] = "Bip39";
|
|
617
589
|
Enum_BackupType[Enum_BackupType["Slip39_Basic"] = 1] = "Slip39_Basic";
|
|
618
590
|
Enum_BackupType[Enum_BackupType["Slip39_Advanced"] = 2] = "Slip39_Advanced";
|
|
619
|
-
})(
|
|
620
|
-
|
|
591
|
+
})(Enum_BackupType || (Enum_BackupType = {}));
|
|
592
|
+
var Enum_SafetyCheckLevel;
|
|
621
593
|
(function (Enum_SafetyCheckLevel) {
|
|
622
594
|
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["Strict"] = 0] = "Strict";
|
|
623
595
|
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptAlways"] = 1] = "PromptAlways";
|
|
624
596
|
Enum_SafetyCheckLevel[Enum_SafetyCheckLevel["PromptTemporarily"] = 2] = "PromptTemporarily";
|
|
625
|
-
})(
|
|
626
|
-
|
|
597
|
+
})(Enum_SafetyCheckLevel || (Enum_SafetyCheckLevel = {}));
|
|
598
|
+
var Enum_Capability;
|
|
627
599
|
(function (Enum_Capability) {
|
|
628
600
|
Enum_Capability[Enum_Capability["Capability_Bitcoin"] = 1] = "Capability_Bitcoin";
|
|
629
601
|
Enum_Capability[Enum_Capability["Capability_Bitcoin_like"] = 2] = "Capability_Bitcoin_like";
|
|
@@ -642,119 +614,119 @@ exports.Enum_Capability = void 0;
|
|
|
642
614
|
Enum_Capability[Enum_Capability["Capability_Shamir"] = 15] = "Capability_Shamir";
|
|
643
615
|
Enum_Capability[Enum_Capability["Capability_ShamirGroups"] = 16] = "Capability_ShamirGroups";
|
|
644
616
|
Enum_Capability[Enum_Capability["Capability_PassphraseEntry"] = 17] = "Capability_PassphraseEntry";
|
|
645
|
-
})(
|
|
646
|
-
|
|
617
|
+
})(Enum_Capability || (Enum_Capability = {}));
|
|
618
|
+
var SdProtectOperationType;
|
|
647
619
|
(function (SdProtectOperationType) {
|
|
648
620
|
SdProtectOperationType[SdProtectOperationType["DISABLE"] = 0] = "DISABLE";
|
|
649
621
|
SdProtectOperationType[SdProtectOperationType["ENABLE"] = 1] = "ENABLE";
|
|
650
622
|
SdProtectOperationType[SdProtectOperationType["REFRESH"] = 2] = "REFRESH";
|
|
651
|
-
})(
|
|
652
|
-
|
|
623
|
+
})(SdProtectOperationType || (SdProtectOperationType = {}));
|
|
624
|
+
var RecoveryDeviceType;
|
|
653
625
|
(function (RecoveryDeviceType) {
|
|
654
626
|
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_ScrambledWords"] = 0] = "RecoveryDeviceType_ScrambledWords";
|
|
655
627
|
RecoveryDeviceType[RecoveryDeviceType["RecoveryDeviceType_Matrix"] = 1] = "RecoveryDeviceType_Matrix";
|
|
656
|
-
})(
|
|
657
|
-
|
|
628
|
+
})(RecoveryDeviceType || (RecoveryDeviceType = {}));
|
|
629
|
+
var Enum_WordRequestType;
|
|
658
630
|
(function (Enum_WordRequestType) {
|
|
659
631
|
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Plain"] = 0] = "WordRequestType_Plain";
|
|
660
632
|
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix9"] = 1] = "WordRequestType_Matrix9";
|
|
661
633
|
Enum_WordRequestType[Enum_WordRequestType["WordRequestType_Matrix6"] = 2] = "WordRequestType_Matrix6";
|
|
662
|
-
})(
|
|
663
|
-
|
|
634
|
+
})(Enum_WordRequestType || (Enum_WordRequestType = {}));
|
|
635
|
+
var NEMMosaicLevy;
|
|
664
636
|
(function (NEMMosaicLevy) {
|
|
665
637
|
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Absolute"] = 1] = "MosaicLevy_Absolute";
|
|
666
638
|
NEMMosaicLevy[NEMMosaicLevy["MosaicLevy_Percentile"] = 2] = "MosaicLevy_Percentile";
|
|
667
|
-
})(
|
|
668
|
-
|
|
639
|
+
})(NEMMosaicLevy || (NEMMosaicLevy = {}));
|
|
640
|
+
var NEMSupplyChangeType;
|
|
669
641
|
(function (NEMSupplyChangeType) {
|
|
670
642
|
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Increase"] = 1] = "SupplyChange_Increase";
|
|
671
643
|
NEMSupplyChangeType[NEMSupplyChangeType["SupplyChange_Decrease"] = 2] = "SupplyChange_Decrease";
|
|
672
|
-
})(
|
|
673
|
-
|
|
644
|
+
})(NEMSupplyChangeType || (NEMSupplyChangeType = {}));
|
|
645
|
+
var NEMModificationType;
|
|
674
646
|
(function (NEMModificationType) {
|
|
675
647
|
NEMModificationType[NEMModificationType["CosignatoryModification_Add"] = 1] = "CosignatoryModification_Add";
|
|
676
648
|
NEMModificationType[NEMModificationType["CosignatoryModification_Delete"] = 2] = "CosignatoryModification_Delete";
|
|
677
|
-
})(
|
|
678
|
-
|
|
649
|
+
})(NEMModificationType || (NEMModificationType = {}));
|
|
650
|
+
var NEMImportanceTransferMode;
|
|
679
651
|
(function (NEMImportanceTransferMode) {
|
|
680
652
|
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Activate"] = 1] = "ImportanceTransfer_Activate";
|
|
681
653
|
NEMImportanceTransferMode[NEMImportanceTransferMode["ImportanceTransfer_Deactivate"] = 2] = "ImportanceTransfer_Deactivate";
|
|
682
|
-
})(
|
|
683
|
-
|
|
654
|
+
})(NEMImportanceTransferMode || (NEMImportanceTransferMode = {}));
|
|
655
|
+
var StellarAssetType;
|
|
684
656
|
(function (StellarAssetType) {
|
|
685
657
|
StellarAssetType[StellarAssetType["NATIVE"] = 0] = "NATIVE";
|
|
686
658
|
StellarAssetType[StellarAssetType["ALPHANUM4"] = 1] = "ALPHANUM4";
|
|
687
659
|
StellarAssetType[StellarAssetType["ALPHANUM12"] = 2] = "ALPHANUM12";
|
|
688
|
-
})(
|
|
689
|
-
|
|
660
|
+
})(StellarAssetType || (StellarAssetType = {}));
|
|
661
|
+
var StellarMemoType;
|
|
690
662
|
(function (StellarMemoType) {
|
|
691
663
|
StellarMemoType[StellarMemoType["NONE"] = 0] = "NONE";
|
|
692
664
|
StellarMemoType[StellarMemoType["TEXT"] = 1] = "TEXT";
|
|
693
665
|
StellarMemoType[StellarMemoType["ID"] = 2] = "ID";
|
|
694
666
|
StellarMemoType[StellarMemoType["HASH"] = 3] = "HASH";
|
|
695
667
|
StellarMemoType[StellarMemoType["RETURN"] = 4] = "RETURN";
|
|
696
|
-
})(
|
|
697
|
-
|
|
668
|
+
})(StellarMemoType || (StellarMemoType = {}));
|
|
669
|
+
var StellarSignerType;
|
|
698
670
|
(function (StellarSignerType) {
|
|
699
671
|
StellarSignerType[StellarSignerType["ACCOUNT"] = 0] = "ACCOUNT";
|
|
700
672
|
StellarSignerType[StellarSignerType["PRE_AUTH"] = 1] = "PRE_AUTH";
|
|
701
673
|
StellarSignerType[StellarSignerType["HASH"] = 2] = "HASH";
|
|
702
|
-
})(
|
|
703
|
-
|
|
674
|
+
})(StellarSignerType || (StellarSignerType = {}));
|
|
675
|
+
var TezosContractType;
|
|
704
676
|
(function (TezosContractType) {
|
|
705
677
|
TezosContractType[TezosContractType["Implicit"] = 0] = "Implicit";
|
|
706
678
|
TezosContractType[TezosContractType["Originated"] = 1] = "Originated";
|
|
707
|
-
})(
|
|
708
|
-
|
|
679
|
+
})(TezosContractType || (TezosContractType = {}));
|
|
680
|
+
var TezosBallotType;
|
|
709
681
|
(function (TezosBallotType) {
|
|
710
682
|
TezosBallotType[TezosBallotType["Yay"] = 0] = "Yay";
|
|
711
683
|
TezosBallotType[TezosBallotType["Nay"] = 1] = "Nay";
|
|
712
684
|
TezosBallotType[TezosBallotType["Pass"] = 2] = "Pass";
|
|
713
|
-
})(
|
|
685
|
+
})(TezosBallotType || (TezosBallotType = {}));
|
|
714
686
|
|
|
715
687
|
var messages = /*#__PURE__*/Object.freeze({
|
|
716
688
|
__proto__: null,
|
|
717
|
-
get BinanceOrderType () { return
|
|
718
|
-
get BinanceOrderSide () { return
|
|
719
|
-
get BinanceTimeInForce () { return
|
|
720
|
-
get Enum_InputScriptType () { return
|
|
721
|
-
get Enum_OutputScriptType () { return
|
|
722
|
-
get DecredStakingSpendType () { return
|
|
723
|
-
get AmountUnit () { return
|
|
724
|
-
get Enum_RequestType () { return
|
|
725
|
-
get CardanoDerivationType () { return
|
|
726
|
-
get CardanoAddressType () { return
|
|
727
|
-
get CardanoNativeScriptType () { return
|
|
728
|
-
get CardanoNativeScriptHashDisplayFormat () { return
|
|
729
|
-
get CardanoCertificateType () { return
|
|
730
|
-
get CardanoPoolRelayType () { return
|
|
731
|
-
get CardanoTxAuxiliaryDataSupplementType () { return
|
|
732
|
-
get CardanoTxSigningMode () { return
|
|
733
|
-
get CardanoTxWitnessType () { return
|
|
734
|
-
get FailureType () { return
|
|
735
|
-
get Enum_ButtonRequestType () { return
|
|
736
|
-
get Enum_PinMatrixRequestType () { return
|
|
737
|
-
get DebugButton () { return
|
|
738
|
-
get EthereumDataType () { return
|
|
739
|
-
get Enum_BackupType () { return
|
|
740
|
-
get Enum_SafetyCheckLevel () { return
|
|
741
|
-
get Enum_Capability () { return
|
|
742
|
-
get SdProtectOperationType () { return
|
|
743
|
-
get RecoveryDeviceType () { return
|
|
744
|
-
get Enum_WordRequestType () { return
|
|
745
|
-
get NEMMosaicLevy () { return
|
|
746
|
-
get NEMSupplyChangeType () { return
|
|
747
|
-
get NEMModificationType () { return
|
|
748
|
-
get NEMImportanceTransferMode () { return
|
|
749
|
-
get StellarAssetType () { return
|
|
750
|
-
get StellarMemoType () { return
|
|
751
|
-
get StellarSignerType () { return
|
|
752
|
-
get TezosContractType () { return
|
|
753
|
-
get TezosBallotType () { return
|
|
689
|
+
get BinanceOrderType () { return BinanceOrderType; },
|
|
690
|
+
get BinanceOrderSide () { return BinanceOrderSide; },
|
|
691
|
+
get BinanceTimeInForce () { return BinanceTimeInForce; },
|
|
692
|
+
get Enum_InputScriptType () { return Enum_InputScriptType; },
|
|
693
|
+
get Enum_OutputScriptType () { return Enum_OutputScriptType; },
|
|
694
|
+
get DecredStakingSpendType () { return DecredStakingSpendType; },
|
|
695
|
+
get AmountUnit () { return AmountUnit; },
|
|
696
|
+
get Enum_RequestType () { return Enum_RequestType; },
|
|
697
|
+
get CardanoDerivationType () { return CardanoDerivationType; },
|
|
698
|
+
get CardanoAddressType () { return CardanoAddressType; },
|
|
699
|
+
get CardanoNativeScriptType () { return CardanoNativeScriptType; },
|
|
700
|
+
get CardanoNativeScriptHashDisplayFormat () { return CardanoNativeScriptHashDisplayFormat; },
|
|
701
|
+
get CardanoCertificateType () { return CardanoCertificateType; },
|
|
702
|
+
get CardanoPoolRelayType () { return CardanoPoolRelayType; },
|
|
703
|
+
get CardanoTxAuxiliaryDataSupplementType () { return CardanoTxAuxiliaryDataSupplementType; },
|
|
704
|
+
get CardanoTxSigningMode () { return CardanoTxSigningMode; },
|
|
705
|
+
get CardanoTxWitnessType () { return CardanoTxWitnessType; },
|
|
706
|
+
get FailureType () { return FailureType; },
|
|
707
|
+
get Enum_ButtonRequestType () { return Enum_ButtonRequestType; },
|
|
708
|
+
get Enum_PinMatrixRequestType () { return Enum_PinMatrixRequestType; },
|
|
709
|
+
get DebugButton () { return DebugButton; },
|
|
710
|
+
get EthereumDataType () { return EthereumDataType; },
|
|
711
|
+
get Enum_BackupType () { return Enum_BackupType; },
|
|
712
|
+
get Enum_SafetyCheckLevel () { return Enum_SafetyCheckLevel; },
|
|
713
|
+
get Enum_Capability () { return Enum_Capability; },
|
|
714
|
+
get SdProtectOperationType () { return SdProtectOperationType; },
|
|
715
|
+
get RecoveryDeviceType () { return RecoveryDeviceType; },
|
|
716
|
+
get Enum_WordRequestType () { return Enum_WordRequestType; },
|
|
717
|
+
get NEMMosaicLevy () { return NEMMosaicLevy; },
|
|
718
|
+
get NEMSupplyChangeType () { return NEMSupplyChangeType; },
|
|
719
|
+
get NEMModificationType () { return NEMModificationType; },
|
|
720
|
+
get NEMImportanceTransferMode () { return NEMImportanceTransferMode; },
|
|
721
|
+
get StellarAssetType () { return StellarAssetType; },
|
|
722
|
+
get StellarMemoType () { return StellarMemoType; },
|
|
723
|
+
get StellarSignerType () { return StellarSignerType; },
|
|
724
|
+
get TezosContractType () { return TezosContractType; },
|
|
725
|
+
get TezosBallotType () { return TezosBallotType; }
|
|
754
726
|
});
|
|
755
727
|
|
|
756
|
-
|
|
757
|
-
|
|
728
|
+
protobuf.util.Long = Long;
|
|
729
|
+
protobuf.configure();
|
|
758
730
|
var index = {
|
|
759
731
|
check,
|
|
760
732
|
buildOne,
|
|
@@ -765,10 +737,4 @@ var index = {
|
|
|
765
737
|
decodeProtocol,
|
|
766
738
|
};
|
|
767
739
|
|
|
768
|
-
|
|
769
|
-
exports.COMMON_HEADER_SIZE = COMMON_HEADER_SIZE;
|
|
770
|
-
exports.HEADER_SIZE = HEADER_SIZE;
|
|
771
|
-
exports.MESSAGE_HEADER_BYTE = MESSAGE_HEADER_BYTE;
|
|
772
|
-
exports.MESSAGE_TOP_CHAR = MESSAGE_TOP_CHAR;
|
|
773
|
-
exports.Messages = messages;
|
|
774
|
-
exports["default"] = index;
|
|
740
|
+
export { AmountUnit, BUFFER_SIZE, BinanceOrderSide, BinanceOrderType, BinanceTimeInForce, COMMON_HEADER_SIZE, CardanoAddressType, CardanoCertificateType, CardanoDerivationType, CardanoNativeScriptHashDisplayFormat, CardanoNativeScriptType, CardanoPoolRelayType, CardanoTxAuxiliaryDataSupplementType, CardanoTxSigningMode, CardanoTxWitnessType, DebugButton, DecredStakingSpendType, Enum_BackupType, Enum_ButtonRequestType, Enum_Capability, Enum_InputScriptType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_RequestType, Enum_SafetyCheckLevel, Enum_WordRequestType, EthereumDataType, FailureType, HEADER_SIZE, MESSAGE_HEADER_BYTE, MESSAGE_TOP_CHAR, messages as Messages, NEMImportanceTransferMode, NEMModificationType, NEMMosaicLevy, NEMSupplyChangeType, RecoveryDeviceType, SdProtectOperationType, StellarAssetType, StellarMemoType, StellarSignerType, TezosBallotType, TezosContractType, index as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/decode.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/decode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,kBAAkB,CAAC;AACxD,OAAO,UAAU,MAAM,YAAY,CAAC;AAuEpC,eAAO,MAAM,MAAM,YAAa,IAAI,QAAQ,UAAU;;CAUrD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ByteBuffer from 'bytebuffer';
|
|
2
1
|
import { Type } from 'protobufjs/light';
|
|
2
|
+
import ByteBuffer from 'bytebuffer';
|
|
3
3
|
export declare function patch(Message: Type, payload: any): any;
|
|
4
4
|
export declare const encode: (Message: Type, data: Record<string, unknown>) => ByteBuffer;
|
|
5
5
|
//# sourceMappingURL=encode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/encode.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,UAAU,MAAM,YAAY,CAAC;AAqBpC,wBAAgB,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OA4ChD;AAED,eAAO,MAAM,MAAM,YAAa,IAAI,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,eASlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../src/serialization/receive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../src/serialization/receive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAOxC,wBAAgB,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM;;;;;EAUtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import ByteBuffer from 'bytebuffer';
|
|
3
2
|
import { Root } from 'protobufjs/light';
|
|
3
|
+
import ByteBuffer from 'bytebuffer';
|
|
4
4
|
export declare function buildOne(messages: Root, name: string, data: Record<string, unknown>): Buffer;
|
|
5
5
|
export declare const buildEncodeBuffers: (messages: Root, name: string, data: Record<string, unknown>) => Buffer[];
|
|
6
6
|
export declare const buildBuffers: (messages: Root, name: string, data: Record<string, unknown>) => ByteBuffer[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/serialization/send.ts"],"names":[],"mappings":";AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/serialization/send.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UASnF;AAED,eAAO,MAAM,kBAAkB,aAAc,IAAI,QAAQ,MAAM,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,aAQ7F,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,IAAI,QAAQ,MAAM,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,iBAsBvF,CAAC"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"dev": "rimraf dist && rollup -c ../../build/rollup.config.js -w",
|
|
15
15
|
"build": "rimraf dist && rollup -c ../../build/rollup.config.js",
|
|
16
|
+
"test": "jest",
|
|
16
17
|
"lint": "eslint .",
|
|
17
|
-
"lint:fix": "eslint . --fix"
|
|
18
|
+
"lint:fix": "eslint . --fix",
|
|
19
|
+
"update:protobuf": "./scripts/protobuf-build.sh"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|
|
20
22
|
"@types/bytebuffer": "^5.0.42"
|
|
@@ -24,5 +26,5 @@
|
|
|
24
26
|
"long": "^4.0.0",
|
|
25
27
|
"protobufjs": "^6.11.2"
|
|
26
28
|
},
|
|
27
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "fa65f27f4d043ebf89f03bd98393a9cb3a010199"
|
|
28
30
|
}
|