@trezor/connect 9.1.4 → 9.1.6
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/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/lib/api/authenticateDevice.d.ts +7 -0
- package/lib/api/authenticateDevice.js +51 -0
- package/lib/api/{binanceGetAddress.d.ts → binance/api/binanceGetAddress.d.ts} +3 -3
- package/lib/api/{binanceGetAddress.js → binance/api/binanceGetAddress.js} +6 -6
- package/lib/api/{binanceGetPublicKey.d.ts → binance/api/binanceGetPublicKey.d.ts} +3 -3
- package/lib/api/{binanceGetPublicKey.js → binance/api/binanceGetPublicKey.js} +5 -5
- package/lib/api/{binanceSignTransaction.d.ts → binance/api/binanceSignTransaction.d.ts} +2 -2
- package/lib/api/{binanceSignTransaction.js → binance/api/binanceSignTransaction.js} +5 -5
- package/lib/api/binance/api/index.d.ts +4 -0
- package/lib/api/binance/api/index.js +13 -0
- package/lib/api/bitcoin/TransactionComposer.d.ts +4 -4
- package/lib/api/bitcoin/TransactionComposer.js +4 -18
- package/lib/api/bitcoin/inputs.d.ts +2 -2
- package/lib/api/bitcoin/inputs.js +4 -5
- package/lib/api/bitcoin/outputs.d.ts +4 -4
- package/lib/api/bitcoin/outputs.js +14 -23
- package/lib/api/blockchainEstimateFee.d.ts +2 -2
- package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +8 -0
- package/lib/api/cardano/api/cardanoComposeTransaction.js +69 -0
- package/lib/api/{cardanoGetAddress.d.ts → cardano/api/cardanoGetAddress.d.ts} +3 -3
- package/lib/api/{cardanoGetAddress.js → cardano/api/cardanoGetAddress.js} +7 -7
- package/lib/api/{cardanoGetNativeScriptHash.d.ts → cardano/api/cardanoGetNativeScriptHash.d.ts} +3 -3
- package/lib/api/{cardanoGetNativeScriptHash.js → cardano/api/cardanoGetNativeScriptHash.js} +5 -5
- package/lib/api/{cardanoGetPublicKey.d.ts → cardano/api/cardanoGetPublicKey.d.ts} +3 -3
- package/lib/api/{cardanoGetPublicKey.js → cardano/api/cardanoGetPublicKey.js} +6 -6
- package/lib/api/{cardanoSignTransaction.d.ts → cardano/api/cardanoSignTransaction.d.ts} +18 -8
- package/lib/api/{cardanoSignTransaction.js → cardano/api/cardanoSignTransaction.js} +30 -13
- package/lib/api/cardano/api/index.d.ts +6 -0
- package/lib/api/cardano/api/index.js +17 -0
- package/lib/api/cardano/cardanoUtils.d.ts +6 -0
- package/lib/api/cardano/cardanoUtils.js +64 -1
- package/lib/api/checkFirmwareAuthenticity.js +7 -5
- package/lib/api/common/paramsValidator.js +45 -51
- package/lib/api/composeTransaction.d.ts +5 -5
- package/lib/api/composeTransaction.js +14 -19
- package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -0
- package/lib/api/{eosGetPublicKey.js → eos/api/eosGetPublicKey.js} +5 -5
- package/lib/api/{eosSignTransaction.d.ts → eos/api/eosSignTransaction.d.ts} +2 -2
- package/lib/api/{eosSignTransaction.js → eos/api/eosSignTransaction.js} +5 -5
- package/lib/api/eos/api/index.d.ts +3 -0
- package/lib/api/eos/api/index.js +11 -0
- package/lib/api/{ethereumGetAddress.d.ts → ethereum/api/ethereumGetAddress.d.ts} +4 -4
- package/lib/api/{ethereumGetAddress.js → ethereum/api/ethereumGetAddress.js} +9 -9
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +16 -0
- package/lib/api/{ethereumGetPublicKey.js → ethereum/api/ethereumGetPublicKey.js} +6 -6
- package/lib/api/{ethereumSignMessage.d.ts → ethereum/api/ethereumSignMessage.d.ts} +3 -3
- package/lib/api/{ethereumSignMessage.js → ethereum/api/ethereumSignMessage.js} +7 -7
- package/lib/api/{ethereumSignTransaction.d.ts → ethereum/api/ethereumSignTransaction.d.ts} +11 -9
- package/lib/api/{ethereumSignTransaction.js → ethereum/api/ethereumSignTransaction.js} +36 -43
- package/lib/api/{ethereumSignTypedData.d.ts → ethereum/api/ethereumSignTypedData.d.ts} +3 -3
- package/lib/api/{ethereumSignTypedData.js → ethereum/api/ethereumSignTypedData.js} +10 -10
- package/lib/api/{ethereumVerifyMessage.d.ts → ethereum/api/ethereumVerifyMessage.d.ts} +2 -2
- package/lib/api/{ethereumVerifyMessage.js → ethereum/api/ethereumVerifyMessage.js} +3 -3
- package/lib/api/ethereum/api/index.d.ts +7 -0
- package/lib/api/ethereum/api/index.js +19 -0
- package/lib/api/ethereum/ethereumDefinitions.js +3 -2
- package/lib/api/ethereum/ethereumSignTx.d.ts +2 -0
- package/lib/api/ethereum/ethereumSignTx.js +15 -1
- package/lib/api/firmware/getBinary.js +1 -1
- package/lib/api/firmware/verifyAuthenticityProof.d.ts +14 -0
- package/lib/api/firmware/verifyAuthenticityProof.js +103 -0
- package/lib/api/firmware/x509certificate.d.ts +74 -0
- package/lib/api/firmware/x509certificate.js +235 -0
- package/lib/api/firmwareUpdate.js +2 -1
- package/lib/api/getAccountDescriptor.d.ts +20 -0
- package/lib/api/getAccountDescriptor.js +162 -0
- package/lib/api/getAccountInfo.d.ts +2 -0
- package/lib/api/getAccountInfo.js +1 -5
- package/lib/api/getFirmwareHash.js +1 -4
- package/lib/api/index.d.ts +2 -24
- package/lib/api/index.js +5 -50
- package/lib/api/nem/api/index.d.ts +3 -0
- package/lib/api/nem/api/index.js +11 -0
- package/lib/api/{nemGetAddress.d.ts → nem/api/nemGetAddress.d.ts} +3 -3
- package/lib/api/{nemGetAddress.js → nem/api/nemGetAddress.js} +6 -6
- package/lib/api/{nemSignTransaction.d.ts → nem/api/nemSignTransaction.d.ts} +2 -2
- package/lib/api/{nemSignTransaction.js → nem/api/nemSignTransaction.js} +5 -5
- package/lib/api/rebootToBootloader.js +1 -4
- package/lib/api/ripple/api/index.d.ts +3 -0
- package/lib/api/ripple/api/index.js +11 -0
- package/lib/api/{rippleGetAddress.d.ts → ripple/api/rippleGetAddress.d.ts} +3 -3
- package/lib/api/{rippleGetAddress.js → ripple/api/rippleGetAddress.js} +6 -6
- package/lib/api/{rippleSignTransaction.d.ts → ripple/api/rippleSignTransaction.d.ts} +2 -2
- package/lib/api/{rippleSignTransaction.js → ripple/api/rippleSignTransaction.js} +4 -4
- package/lib/api/solana/api/index.d.ts +4 -0
- package/lib/api/solana/api/index.js +13 -0
- package/lib/api/solana/api/solanaGetAddress.d.ts +23 -0
- package/lib/api/solana/api/solanaGetAddress.js +131 -0
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +12 -0
- package/lib/api/solana/api/solanaGetPublicKey.js +84 -0
- package/lib/api/solana/api/solanaSignTransaction.d.ts +10 -0
- package/lib/api/solana/api/solanaSignTransaction.js +33 -0
- package/lib/api/stellar/api/index.d.ts +3 -0
- package/lib/api/stellar/api/index.js +11 -0
- package/lib/api/{stellarGetAddress.d.ts → stellar/api/stellarGetAddress.d.ts} +3 -3
- package/lib/api/{stellarGetAddress.js → stellar/api/stellarGetAddress.js} +6 -6
- package/lib/api/{stellarSignTransaction.d.ts → stellar/api/stellarSignTransaction.d.ts} +2 -2
- package/lib/api/{stellarSignTransaction.js → stellar/api/stellarSignTransaction.js} +6 -6
- package/lib/api/tezos/api/index.d.ts +4 -0
- package/lib/api/tezos/api/index.js +13 -0
- package/lib/api/{tezosGetAddress.d.ts → tezos/api/tezosGetAddress.d.ts} +3 -3
- package/lib/api/{tezosGetAddress.js → tezos/api/tezosGetAddress.js} +6 -6
- package/lib/api/{tezosGetPublicKey.d.ts → tezos/api/tezosGetPublicKey.d.ts} +3 -3
- package/lib/api/{tezosGetPublicKey.js → tezos/api/tezosGetPublicKey.js} +5 -5
- package/lib/api/{tezosSignTransaction.d.ts → tezos/api/tezosSignTransaction.d.ts} +2 -2
- package/lib/api/{tezosSignTransaction.js → tezos/api/tezosSignTransaction.js} +5 -5
- package/lib/backend/Blockchain.js +2 -0
- package/lib/constants/cardano.js +2 -2
- package/lib/constants/nem.js +3 -3
- package/lib/constants/network.d.ts +3 -0
- package/lib/constants/network.js +13 -1
- package/lib/core/AbstractMethod.d.ts +1 -0
- package/lib/core/AbstractMethod.js +11 -10
- package/lib/core/index.d.ts +5 -2
- package/lib/core/index.js +28 -7
- package/lib/core/method.d.ts +2 -2
- package/lib/core/method.js +8 -2
- package/lib/core/method.native.d.ts +5 -0
- package/lib/core/method.native.js +34 -0
- package/lib/data/DataManager.d.ts +64 -7
- package/lib/data/DataManager.js +4 -2
- package/lib/data/config.d.ts +63 -6
- package/lib/data/config.js +39 -23
- package/lib/data/connectSettings.js +7 -0
- package/lib/data/defaultFeeLevels.js +8 -0
- package/lib/data/deviceAuthenticityConfig.d.ts +15 -0
- package/lib/data/deviceAuthenticityConfig.js +26 -0
- package/lib/data/firmwareInfo.d.ts +3 -2
- package/lib/data/firmwareInfo.js +17 -8
- package/lib/data/models.d.ts +4 -1
- package/lib/data/models.js +6 -3
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +2 -2
- package/lib/device/Device.js +22 -13
- package/lib/device/DeviceCommands.js +9 -0
- package/lib/device/DeviceList.d.ts +1 -0
- package/lib/device/DeviceList.js +8 -4
- package/lib/events/iframe.d.ts +7 -1
- package/lib/events/iframe.js +1 -0
- package/lib/events/popup.d.ts +19 -3
- package/lib/events/popup.js +3 -0
- package/lib/factory.js +6 -0
- package/lib/types/api/authenticateDevice.d.ts +21 -0
- package/lib/types/api/authenticateDevice.js +3 -0
- package/lib/types/api/cardanoComposeTransaction.d.ts +44 -0
- package/lib/types/api/cardanoComposeTransaction.js +3 -0
- package/lib/types/api/cardanoSignTransaction.d.ts +9 -0
- package/lib/types/api/composeTransaction.d.ts +28 -54
- package/lib/types/api/ethereum/index.d.ts +1 -0
- package/lib/types/api/getAccountDescriptor.d.ts +16 -0
- package/lib/types/api/getAccountDescriptor.js +3 -0
- package/lib/types/api/index.d.ts +12 -0
- package/lib/types/api/solana/index.d.ts +12 -0
- package/lib/types/api/solana/index.js +3 -0
- package/lib/types/api/solanaGetAddress.d.ts +4 -0
- package/lib/types/api/solanaGetAddress.js +3 -0
- package/lib/types/api/solanaGetPublicKey.d.ts +5 -0
- package/lib/types/api/solanaGetPublicKey.js +3 -0
- package/lib/types/api/solanaSignTransaction.d.ts +4 -0
- package/lib/types/api/solanaSignTransaction.js +3 -0
- package/lib/types/coinInfo.d.ts +5 -15
- package/lib/types/device.js +1 -1
- package/lib/types/firmware.d.ts +6 -2
- package/lib/types/index.d.ts +4 -1
- package/lib/types/index.js +1 -0
- package/lib/types/settings.d.ts +1 -0
- package/lib/utils/assetUtils.js +6 -4
- package/lib/utils/debug.d.ts +10 -5
- package/lib/utils/debug.js +55 -17
- package/lib/utils/deviceFeaturesUtils.js +5 -3
- package/lib/utils/formatUtils.d.ts +2 -0
- package/lib/utils/formatUtils.js +19 -1
- package/lib/workers/workers-browser.d.ts +2 -1
- package/lib/workers/workers-browser.js +3 -1
- package/lib/workers/workers-react-native.d.ts +2 -1
- package/lib/workers/workers-react-native.js +3 -1
- package/lib/workers/workers.d.ts +8 -5
- package/lib/workers/workers.js +34 -10
- package/package.json +25 -18
- package/lib/api/eosGetPublicKey.d.ts +0 -11
- package/lib/api/ethereumGetPublicKey.d.ts +0 -16
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseCertificate = exports.parseName = exports.fixSignature = void 0;
|
|
4
|
+
const derToAsn1 = (byteArray) => {
|
|
5
|
+
let position = 0;
|
|
6
|
+
function getTag() {
|
|
7
|
+
let tag = byteArray[0] & 0x1f;
|
|
8
|
+
position += 1;
|
|
9
|
+
if (tag === 0x1f) {
|
|
10
|
+
tag = 0;
|
|
11
|
+
while (byteArray[position] >= 0x80) {
|
|
12
|
+
tag = tag * 128 + byteArray[position] - 0x80;
|
|
13
|
+
position += 1;
|
|
14
|
+
}
|
|
15
|
+
tag = tag * 128 + byteArray[position] - 0x80;
|
|
16
|
+
position += 1;
|
|
17
|
+
}
|
|
18
|
+
return tag;
|
|
19
|
+
}
|
|
20
|
+
function getLength() {
|
|
21
|
+
let length = 0;
|
|
22
|
+
if (byteArray[position] < 0x80) {
|
|
23
|
+
length = byteArray[position];
|
|
24
|
+
position += 1;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const numberOfDigits = byteArray[position] & 0x7f;
|
|
28
|
+
position += 1;
|
|
29
|
+
length = 0;
|
|
30
|
+
for (let i = 0; i < numberOfDigits; i++) {
|
|
31
|
+
length = length * 256 + byteArray[position];
|
|
32
|
+
position += 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return length;
|
|
36
|
+
}
|
|
37
|
+
const cls = (byteArray[0] & 0xc0) / 64;
|
|
38
|
+
const structured = (byteArray[0] & 0x20) === 0x20;
|
|
39
|
+
const tag = getTag();
|
|
40
|
+
let length = getLength();
|
|
41
|
+
let byteLength;
|
|
42
|
+
let contents;
|
|
43
|
+
if (length === 0x80) {
|
|
44
|
+
length = 0;
|
|
45
|
+
while (byteArray[position + length] !== 0 || byteArray[position + length + 1] !== 0) {
|
|
46
|
+
length += 1;
|
|
47
|
+
}
|
|
48
|
+
byteLength = position + length + 2;
|
|
49
|
+
contents = byteArray.subarray(position, position + length);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
byteLength = position + length;
|
|
53
|
+
contents = byteArray.subarray(position, byteLength);
|
|
54
|
+
}
|
|
55
|
+
const raw = byteArray.subarray(0, byteLength);
|
|
56
|
+
return {
|
|
57
|
+
cls,
|
|
58
|
+
tag,
|
|
59
|
+
structured,
|
|
60
|
+
byteLength,
|
|
61
|
+
contents,
|
|
62
|
+
raw,
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const derToAsn1List = (byteArray) => {
|
|
66
|
+
const result = [];
|
|
67
|
+
let nextPosition = 0;
|
|
68
|
+
while (nextPosition < byteArray.length) {
|
|
69
|
+
const nextPiece = derToAsn1(byteArray.subarray(nextPosition));
|
|
70
|
+
result.push(nextPiece);
|
|
71
|
+
nextPosition += nextPiece.byteLength;
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
};
|
|
75
|
+
const derBitStringValue = (byteArray) => ({
|
|
76
|
+
unusedBits: byteArray[0],
|
|
77
|
+
bytes: byteArray.subarray(1),
|
|
78
|
+
});
|
|
79
|
+
const fixSignature = (byteArray) => {
|
|
80
|
+
const asn1 = derToAsn1(byteArray);
|
|
81
|
+
if (asn1.cls !== 0 || asn1.tag !== 16 || !asn1.structured) {
|
|
82
|
+
throw new Error('Bad signature. Not a SEQUENCE.');
|
|
83
|
+
}
|
|
84
|
+
const items = derToAsn1List(asn1.contents);
|
|
85
|
+
let newLength = 0;
|
|
86
|
+
const fixedItems = items.map(chunk => {
|
|
87
|
+
const index = chunk.contents.findIndex(value => value > 0x00);
|
|
88
|
+
const data = chunk.contents.subarray(index);
|
|
89
|
+
const offset = data[0] >= 0x80 ? 1 : 0;
|
|
90
|
+
const chunkLength = data.length + offset;
|
|
91
|
+
const newChunk = new Uint8Array(chunkLength + 2);
|
|
92
|
+
newChunk.set([chunk.raw[0], chunkLength]);
|
|
93
|
+
if (offset > 0) {
|
|
94
|
+
newChunk.set([0], 2);
|
|
95
|
+
}
|
|
96
|
+
newChunk.set(data, 2 + offset);
|
|
97
|
+
newLength += newChunk.length;
|
|
98
|
+
return newChunk;
|
|
99
|
+
});
|
|
100
|
+
const signature = new Uint8Array(newLength + 2);
|
|
101
|
+
signature.set([byteArray[0], newLength]);
|
|
102
|
+
let signatureOffset = 2;
|
|
103
|
+
fixedItems.forEach(item => {
|
|
104
|
+
signature.set(item, signatureOffset);
|
|
105
|
+
signatureOffset += item.length;
|
|
106
|
+
});
|
|
107
|
+
return signature;
|
|
108
|
+
};
|
|
109
|
+
exports.fixSignature = fixSignature;
|
|
110
|
+
const parseSignatureValue = (asn1) => {
|
|
111
|
+
if (asn1.cls !== 0 || asn1.tag !== 3 || asn1.structured) {
|
|
112
|
+
throw new Error('Bad signature value. Not a BIT STRING.');
|
|
113
|
+
}
|
|
114
|
+
const { unusedBits, bytes } = derBitStringValue(asn1.contents);
|
|
115
|
+
return {
|
|
116
|
+
asn1,
|
|
117
|
+
bits: { unusedBits, bytes: (0, exports.fixSignature)(bytes) },
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const derObjectIdentifierValue = (byteArray) => {
|
|
121
|
+
let oid = `${Math.floor(byteArray[0] / 40)}.${byteArray[0] % 40}`;
|
|
122
|
+
let position = 1;
|
|
123
|
+
while (position < byteArray.length) {
|
|
124
|
+
let nextInteger = 0;
|
|
125
|
+
while (byteArray[position] >= 0x80) {
|
|
126
|
+
nextInteger = nextInteger * 0x80 + (byteArray[position] & 0x7f);
|
|
127
|
+
position += 1;
|
|
128
|
+
}
|
|
129
|
+
nextInteger = nextInteger * 0x80 + byteArray[position];
|
|
130
|
+
position += 1;
|
|
131
|
+
oid += `.${nextInteger}`;
|
|
132
|
+
}
|
|
133
|
+
return oid;
|
|
134
|
+
};
|
|
135
|
+
const parseAlgorithmIdentifier = (asn1) => {
|
|
136
|
+
if (asn1.cls !== 0 || asn1.tag !== 16 || !asn1.structured) {
|
|
137
|
+
throw new Error('Bad algorithm identifier. Not a SEQUENCE.');
|
|
138
|
+
}
|
|
139
|
+
const pieces = derToAsn1List(asn1.contents);
|
|
140
|
+
if (pieces.length > 2) {
|
|
141
|
+
throw new Error('Bad algorithm identifier. Contains too many child objects.');
|
|
142
|
+
}
|
|
143
|
+
const encodedAlgorithm = pieces[0];
|
|
144
|
+
if (encodedAlgorithm.cls !== 0 || encodedAlgorithm.tag !== 6 || encodedAlgorithm.structured) {
|
|
145
|
+
throw new Error('Bad algorithm identifier. Does not begin with an OBJECT IDENTIFIER.');
|
|
146
|
+
}
|
|
147
|
+
const algorithm = derObjectIdentifierValue(encodedAlgorithm.contents);
|
|
148
|
+
return {
|
|
149
|
+
asn1,
|
|
150
|
+
algorithm,
|
|
151
|
+
parameters: pieces.length === 2 ? { asn1: pieces[1] } : null,
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
const parseName = (asn1) => derToAsn1List(asn1.contents).map(item => {
|
|
155
|
+
const attrSet = derToAsn1(item.contents);
|
|
156
|
+
return parseAlgorithmIdentifier(attrSet);
|
|
157
|
+
});
|
|
158
|
+
exports.parseName = parseName;
|
|
159
|
+
const parseSubjectPublicKeyInfo = (asn1) => {
|
|
160
|
+
if (asn1.cls !== 0 || asn1.tag !== 16 || !asn1.structured) {
|
|
161
|
+
throw new Error('Bad SPKI. Not a SEQUENCE.');
|
|
162
|
+
}
|
|
163
|
+
const pieces = derToAsn1List(asn1.contents);
|
|
164
|
+
if (pieces.length !== 2) {
|
|
165
|
+
throw new Error('Bad SubjectPublicKeyInfo. Wrong number of child objects.');
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
asn1,
|
|
169
|
+
algorithm: parseAlgorithmIdentifier(pieces[0]),
|
|
170
|
+
bits: derBitStringValue(pieces[1].contents),
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
const parseUtcTime = (time) => {
|
|
174
|
+
let offset = 4;
|
|
175
|
+
let yearOffset = 0;
|
|
176
|
+
if (time.tag === 23) {
|
|
177
|
+
offset = 2;
|
|
178
|
+
yearOffset = 2000;
|
|
179
|
+
}
|
|
180
|
+
const utc = Buffer.from(time.contents).toString();
|
|
181
|
+
const year = yearOffset + Number(utc.substring(0, offset));
|
|
182
|
+
const month = Number(utc.substring(offset, offset + 2)) - 1;
|
|
183
|
+
const day = Number(utc.substring(offset + 2, offset + 4));
|
|
184
|
+
const hour = Number(utc.substring(offset + 4, offset + 6));
|
|
185
|
+
const minute = Number(utc.substring(offset + 6, offset + 8));
|
|
186
|
+
const date = new Date();
|
|
187
|
+
date.setUTCFullYear(year, month, day);
|
|
188
|
+
date.setUTCHours(hour, minute, 0);
|
|
189
|
+
return date;
|
|
190
|
+
};
|
|
191
|
+
const parseValidity = (asn1) => {
|
|
192
|
+
const [from, to] = derToAsn1List(asn1.contents);
|
|
193
|
+
return {
|
|
194
|
+
from: parseUtcTime(from),
|
|
195
|
+
to: parseUtcTime(to),
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
const parseTBSCertificate = (asn1) => {
|
|
199
|
+
if (asn1.cls !== 0 || asn1.tag !== 16 || !asn1.structured) {
|
|
200
|
+
throw new Error("This can't be a TBSCertificate. Wrong data type.");
|
|
201
|
+
}
|
|
202
|
+
const pieces = derToAsn1List(asn1.contents);
|
|
203
|
+
if (pieces.length < 7) {
|
|
204
|
+
throw new Error('Bad TBS Certificate. There are fewer than the seven required children.');
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
asn1,
|
|
208
|
+
version: pieces[0],
|
|
209
|
+
serialNumber: pieces[1],
|
|
210
|
+
signature: parseAlgorithmIdentifier(pieces[2]),
|
|
211
|
+
issuer: pieces[3],
|
|
212
|
+
validity: parseValidity(pieces[4]),
|
|
213
|
+
subject: (0, exports.parseName)(pieces[5]),
|
|
214
|
+
subjectPublicKeyInfo: parseSubjectPublicKeyInfo(pieces[6]),
|
|
215
|
+
extensions: pieces[7],
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
const parseCertificate = (byteArray) => {
|
|
219
|
+
const asn1 = derToAsn1(byteArray);
|
|
220
|
+
if (asn1.cls !== 0 || asn1.tag !== 16 || !asn1.structured) {
|
|
221
|
+
throw new Error("This can't be an X.509 certificate. Wrong data type.");
|
|
222
|
+
}
|
|
223
|
+
const pieces = derToAsn1List(asn1.contents);
|
|
224
|
+
if (pieces.length !== 3) {
|
|
225
|
+
throw new Error('Certificate contains more than the three specified children.');
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
asn1,
|
|
229
|
+
tbsCertificate: parseTBSCertificate(pieces[0]),
|
|
230
|
+
signatureAlgorithm: parseAlgorithmIdentifier(pieces[1]),
|
|
231
|
+
signatureValue: parseSignatureValue(pieces[2]),
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
exports.parseCertificate = parseCertificate;
|
|
235
|
+
//# sourceMappingURL=x509certificate.js.map
|
|
@@ -53,6 +53,7 @@ class FirmwareUpdate extends AbstractMethod_1.AbstractMethod {
|
|
|
53
53
|
return uiResp.payload;
|
|
54
54
|
}
|
|
55
55
|
async run() {
|
|
56
|
+
var _a;
|
|
56
57
|
const { device, params } = this;
|
|
57
58
|
let binary;
|
|
58
59
|
try {
|
|
@@ -62,7 +63,7 @@ class FirmwareUpdate extends AbstractMethod_1.AbstractMethod {
|
|
|
62
63
|
else {
|
|
63
64
|
binary = await (0, firmware_1.getBinary)({
|
|
64
65
|
features: device.features,
|
|
65
|
-
releases: (0, firmwareInfo_1.getReleases)(device.features.
|
|
66
|
+
releases: (0, firmwareInfo_1.getReleases)((_a = device.features) === null || _a === void 0 ? void 0 : _a.internal_model),
|
|
66
67
|
version: params.version,
|
|
67
68
|
btcOnly: params.btcOnly,
|
|
68
69
|
baseUrl: params.baseUrl,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
2
|
+
import type { CoinInfo } from '../types';
|
|
3
|
+
import type { GetAccountDescriptorParams, GetAccountDescriptorResponse } from '../types/api/getAccountDescriptor';
|
|
4
|
+
type Request = GetAccountDescriptorParams & {
|
|
5
|
+
address_n: number[];
|
|
6
|
+
coinInfo: CoinInfo;
|
|
7
|
+
};
|
|
8
|
+
export default class GetAccountDescriptor extends AbstractMethod<'getAccountDescriptor', Request[]> {
|
|
9
|
+
disposed: boolean;
|
|
10
|
+
hasBundle?: boolean;
|
|
11
|
+
init(): void;
|
|
12
|
+
get info(): string;
|
|
13
|
+
confirmation(): Promise<boolean>;
|
|
14
|
+
noBackupConfirmation(allowSuppression?: boolean): Promise<boolean>;
|
|
15
|
+
checkFirmwareRange(_isUsingPopup: boolean): Promise<undefined>;
|
|
16
|
+
run(): Promise<GetAccountDescriptorResponse | (GetAccountDescriptorResponse | null)[]>;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=getAccountDescriptor.d.ts.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
4
|
+
const paramsValidator_1 = require("./common/paramsValidator");
|
|
5
|
+
const pathUtils_1 = require("../utils/pathUtils");
|
|
6
|
+
const accountUtils_1 = require("../utils/accountUtils");
|
|
7
|
+
const coinInfo_1 = require("../data/coinInfo");
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const events_1 = require("../events");
|
|
10
|
+
class GetAccountDescriptor extends AbstractMethod_1.AbstractMethod {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.disposed = false;
|
|
14
|
+
}
|
|
15
|
+
init() {
|
|
16
|
+
this.requiredPermissions = ['read'];
|
|
17
|
+
this.useDevice = true;
|
|
18
|
+
this.useUi = true;
|
|
19
|
+
this.hasBundle = !!this.payload.bundle;
|
|
20
|
+
const payload = !this.payload.bundle
|
|
21
|
+
? { ...this.payload, bundle: [this.payload] }
|
|
22
|
+
: this.payload;
|
|
23
|
+
(0, paramsValidator_1.validateParams)(payload, [{ name: 'bundle', type: 'array' }]);
|
|
24
|
+
this.params = payload.bundle.map(batch => {
|
|
25
|
+
(0, paramsValidator_1.validateParams)(batch, [
|
|
26
|
+
{ name: 'coin', type: 'string', required: true },
|
|
27
|
+
{ name: 'path', type: 'string', required: true },
|
|
28
|
+
{ name: 'derivationType', type: 'number' },
|
|
29
|
+
{ name: 'suppressBackupWarning', type: 'boolean' },
|
|
30
|
+
]);
|
|
31
|
+
const coinInfo = (0, coinInfo_1.getCoinInfo)(batch.coin);
|
|
32
|
+
if (!coinInfo) {
|
|
33
|
+
throw constants_1.ERRORS.TypedError('Method_UnknownCoin');
|
|
34
|
+
}
|
|
35
|
+
const address_n = (0, pathUtils_1.validatePath)(batch.path, 3);
|
|
36
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, coinInfo, this.firmwareRange);
|
|
37
|
+
return {
|
|
38
|
+
...batch,
|
|
39
|
+
address_n,
|
|
40
|
+
coinInfo,
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
get info() {
|
|
45
|
+
return 'Export account descriptor';
|
|
46
|
+
}
|
|
47
|
+
async confirmation() {
|
|
48
|
+
await this.getPopupPromise().promise;
|
|
49
|
+
const uiPromise = this.createUiPromise(events_1.UI.RECEIVE_CONFIRMATION);
|
|
50
|
+
const keys = {};
|
|
51
|
+
this.params.forEach(b => {
|
|
52
|
+
if (!keys[b.coinInfo.label]) {
|
|
53
|
+
keys[b.coinInfo.label] = {
|
|
54
|
+
coinInfo: b.coinInfo,
|
|
55
|
+
values: [],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
keys[b.coinInfo.label].values.push(b.address_n);
|
|
59
|
+
});
|
|
60
|
+
const str = [];
|
|
61
|
+
Object.keys(keys).forEach((k, _i, _a) => {
|
|
62
|
+
const details = keys[k];
|
|
63
|
+
details.values.forEach(acc => {
|
|
64
|
+
str.push('<span>');
|
|
65
|
+
str.push(k);
|
|
66
|
+
str.push(' ');
|
|
67
|
+
if (typeof acc === 'string') {
|
|
68
|
+
str.push(acc);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
str.push((0, accountUtils_1.getAccountLabel)(acc, details.coinInfo));
|
|
72
|
+
}
|
|
73
|
+
str.push('</span>');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
this.postMessage((0, events_1.createUiMessage)(events_1.UI.REQUEST_CONFIRMATION, {
|
|
77
|
+
view: 'export-account-info',
|
|
78
|
+
label: `Export descriptor for: ${str.join('')}`,
|
|
79
|
+
}));
|
|
80
|
+
const uiResp = await uiPromise.promise;
|
|
81
|
+
return uiResp.payload;
|
|
82
|
+
}
|
|
83
|
+
async noBackupConfirmation(allowSuppression) {
|
|
84
|
+
if (allowSuppression && this.params.every(batch => batch.suppressBackupWarning)) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
await this.getPopupPromise().promise;
|
|
88
|
+
const uiPromise = this.createUiPromise(events_1.UI.RECEIVE_CONFIRMATION);
|
|
89
|
+
this.postMessage((0, events_1.createUiMessage)(events_1.UI.REQUEST_CONFIRMATION, {
|
|
90
|
+
view: 'no-backup',
|
|
91
|
+
}));
|
|
92
|
+
const uiResp = await uiPromise.promise;
|
|
93
|
+
return uiResp.payload;
|
|
94
|
+
}
|
|
95
|
+
async checkFirmwareRange(_isUsingPopup) {
|
|
96
|
+
const invalid = [];
|
|
97
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
98
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, this.params[i].coinInfo, AbstractMethod_1.DEFAULT_FIRMWARE_RANGE);
|
|
99
|
+
const exception = await super.checkFirmwareRange(false);
|
|
100
|
+
if (exception) {
|
|
101
|
+
invalid.push({
|
|
102
|
+
index: i,
|
|
103
|
+
exception,
|
|
104
|
+
coin: this.params[i].coin,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (invalid.length > 0) {
|
|
109
|
+
throw constants_1.ERRORS.TypedError('Method_Discovery_BundleException', JSON.stringify(invalid));
|
|
110
|
+
}
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
async run() {
|
|
114
|
+
const responses = [];
|
|
115
|
+
const sendProgress = (progress, response, error) => {
|
|
116
|
+
if (!this.hasBundle || this.disposed)
|
|
117
|
+
return;
|
|
118
|
+
this.postMessage((0, events_1.createUiMessage)(events_1.UI.BUNDLE_PROGRESS, {
|
|
119
|
+
progress,
|
|
120
|
+
response,
|
|
121
|
+
error,
|
|
122
|
+
}));
|
|
123
|
+
};
|
|
124
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
125
|
+
const request = this.params[i];
|
|
126
|
+
if (this.disposed)
|
|
127
|
+
break;
|
|
128
|
+
try {
|
|
129
|
+
const { descriptor, address_n, legacyXpub } = await this.device
|
|
130
|
+
.getCommands()
|
|
131
|
+
.getAccountDescriptor(request.coinInfo, request.address_n, typeof request.derivationType !== 'undefined'
|
|
132
|
+
? request.derivationType
|
|
133
|
+
: constants_1.PROTO.CardanoDerivationType.ICARUS_TREZOR);
|
|
134
|
+
const response = {
|
|
135
|
+
descriptor,
|
|
136
|
+
path: (0, pathUtils_1.getSerializedPath)(address_n),
|
|
137
|
+
legacyXpub,
|
|
138
|
+
};
|
|
139
|
+
sendProgress(i, response);
|
|
140
|
+
responses.push(response);
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
if (this.hasBundle) {
|
|
144
|
+
responses.push(null);
|
|
145
|
+
sendProgress(i, null, error.message);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (this.disposed)
|
|
154
|
+
return new Promise(() => []);
|
|
155
|
+
return this.hasBundle ? responses : responses[0];
|
|
156
|
+
}
|
|
157
|
+
dispose() {
|
|
158
|
+
this.disposed = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.default = GetAccountDescriptor;
|
|
162
|
+
//# sourceMappingURL=getAccountDescriptor.js.map
|
|
@@ -43,6 +43,7 @@ export default class GetAccountInfo extends AbstractMethod<'getAccountInfo', Req
|
|
|
43
43
|
rewards: string;
|
|
44
44
|
poolId: string | null;
|
|
45
45
|
} | undefined;
|
|
46
|
+
owner?: string | undefined;
|
|
46
47
|
} | undefined;
|
|
47
48
|
page?: {
|
|
48
49
|
index: number;
|
|
@@ -83,6 +84,7 @@ export default class GetAccountInfo extends AbstractMethod<'getAccountInfo', Req
|
|
|
83
84
|
rewards: string;
|
|
84
85
|
poolId: string | null;
|
|
85
86
|
} | undefined;
|
|
87
|
+
owner?: string | undefined;
|
|
86
88
|
} | undefined;
|
|
87
89
|
page?: {
|
|
88
90
|
index: number;
|
|
@@ -136,13 +136,9 @@ class GetAccountInfo extends AbstractMethod_1.AbstractMethod {
|
|
|
136
136
|
if (isUsingPopup || this.params.length === 1) {
|
|
137
137
|
return super.checkFirmwareRange(isUsingPopup);
|
|
138
138
|
}
|
|
139
|
-
const defaultRange = {
|
|
140
|
-
1: { min: '1.0.0', max: '0' },
|
|
141
|
-
2: { min: '2.0.0', max: '0' },
|
|
142
|
-
};
|
|
143
139
|
const invalid = [];
|
|
144
140
|
for (let i = 0; i < this.params.length; i++) {
|
|
145
|
-
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, this.params[i].coinInfo,
|
|
141
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, this.params[i].coinInfo, AbstractMethod_1.DEFAULT_FIRMWARE_RANGE);
|
|
146
142
|
const exception = await super.checkFirmwareRange(false);
|
|
147
143
|
if (exception) {
|
|
148
144
|
invalid.push({
|
|
@@ -11,10 +11,7 @@ class GetFirmwareHash extends AbstractMethod_1.AbstractMethod {
|
|
|
11
11
|
this.allowDeviceMode = [events_1.UI.INITIALIZE];
|
|
12
12
|
const { payload } = this;
|
|
13
13
|
(0, paramsValidator_1.validateParams)(payload, [{ name: 'challenge', type: 'string' }]);
|
|
14
|
-
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null,
|
|
15
|
-
1: { min: '1.11.1', max: '0' },
|
|
16
|
-
2: { min: '2.5.1', max: '0' },
|
|
17
|
-
});
|
|
14
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null, this.firmwareRange);
|
|
18
15
|
this.params = {
|
|
19
16
|
challenge: payload.challenge,
|
|
20
17
|
};
|
package/lib/api/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
export { default as applyFlags } from './applyFlags';
|
|
2
2
|
export { default as applySettings } from './applySettings';
|
|
3
|
+
export { default as authenticateDevice } from './authenticateDevice';
|
|
3
4
|
export { default as authorizeCoinjoin } from './authorizeCoinjoin';
|
|
4
5
|
export { default as cancelCoinjoinAuthorization } from './cancelCoinjoinAuthorization';
|
|
5
6
|
export { default as showDeviceTutorial } from './showDeviceTutorial';
|
|
6
7
|
export { default as backupDevice } from './backupDevice';
|
|
7
|
-
export { default as binanceGetAddress } from './binanceGetAddress';
|
|
8
|
-
export { default as binanceGetPublicKey } from './binanceGetPublicKey';
|
|
9
|
-
export { default as binanceSignTransaction } from './binanceSignTransaction';
|
|
10
8
|
export { default as blockchainDisconnect } from './blockchainDisconnect';
|
|
11
9
|
export { default as blockchainEstimateFee } from './blockchainEstimateFee';
|
|
12
10
|
export { default as blockchainGetAccountBalanceHistory } from './blockchainGetAccountBalanceHistory';
|
|
@@ -18,22 +16,11 @@ export { default as blockchainSubscribe } from './blockchainSubscribe';
|
|
|
18
16
|
export { default as blockchainSubscribeFiatRates } from './blockchainSubscribeFiatRates';
|
|
19
17
|
export { default as blockchainUnsubscribe } from './blockchainUnsubscribe';
|
|
20
18
|
export { default as blockchainUnsubscribeFiatRates } from './blockchainUnsubscribeFiatRates';
|
|
21
|
-
export { default as cardanoGetAddress } from './cardanoGetAddress';
|
|
22
|
-
export { default as cardanoGetNativeScriptHash } from './cardanoGetNativeScriptHash';
|
|
23
|
-
export { default as cardanoGetPublicKey } from './cardanoGetPublicKey';
|
|
24
|
-
export { default as cardanoSignTransaction } from './cardanoSignTransaction';
|
|
25
19
|
export { default as changePin } from './changePin';
|
|
26
20
|
export { default as cipherKeyValue } from './cipherKeyValue';
|
|
27
21
|
export { default as composeTransaction } from './composeTransaction';
|
|
28
|
-
export { default as eosGetPublicKey } from './eosGetPublicKey';
|
|
29
|
-
export { default as eosSignTransaction } from './eosSignTransaction';
|
|
30
|
-
export { default as ethereumGetAddress } from './ethereumGetAddress';
|
|
31
|
-
export { default as ethereumGetPublicKey } from './ethereumGetPublicKey';
|
|
32
|
-
export { default as ethereumSignMessage } from './ethereumSignMessage';
|
|
33
|
-
export { default as ethereumSignTransaction } from './ethereumSignTransaction';
|
|
34
|
-
export { default as ethereumSignTypedData } from './ethereumSignTypedData';
|
|
35
|
-
export { default as ethereumVerifyMessage } from './ethereumVerifyMessage';
|
|
36
22
|
export { default as firmwareUpdate } from './firmwareUpdate';
|
|
23
|
+
export { default as getAccountDescriptor } from './getAccountDescriptor';
|
|
37
24
|
export { default as getAccountInfo } from './getAccountInfo';
|
|
38
25
|
export { default as getAddress } from './getAddress';
|
|
39
26
|
export { default as getCoinInfo } from './getCoinInfo';
|
|
@@ -44,24 +31,15 @@ export { default as getOwnershipId } from './getOwnershipId';
|
|
|
44
31
|
export { default as getOwnershipProof } from './getOwnershipProof';
|
|
45
32
|
export { default as getPublicKey } from './getPublicKey';
|
|
46
33
|
export { default as getSettings } from './getSettings';
|
|
47
|
-
export { default as nemGetAddress } from './nemGetAddress';
|
|
48
|
-
export { default as nemSignTransaction } from './nemSignTransaction';
|
|
49
34
|
export { default as pushTransaction } from './pushTransaction';
|
|
50
35
|
export { default as rebootToBootloader } from './rebootToBootloader';
|
|
51
36
|
export { default as recoveryDevice } from './recoveryDevice';
|
|
52
37
|
export { default as requestLogin } from './requestLogin';
|
|
53
38
|
export { default as resetDevice } from './resetDevice';
|
|
54
|
-
export { default as rippleGetAddress } from './rippleGetAddress';
|
|
55
|
-
export { default as rippleSignTransaction } from './rippleSignTransaction';
|
|
56
39
|
export { default as setBusy } from './setBusy';
|
|
57
40
|
export { default as setProxy } from './setProxy';
|
|
58
41
|
export { default as signMessage } from './signMessage';
|
|
59
42
|
export { default as signTransaction } from './signTransaction';
|
|
60
|
-
export { default as stellarGetAddress } from './stellarGetAddress';
|
|
61
|
-
export { default as stellarSignTransaction } from './stellarSignTransaction';
|
|
62
|
-
export { default as tezosGetAddress } from './tezosGetAddress';
|
|
63
|
-
export { default as tezosGetPublicKey } from './tezosGetPublicKey';
|
|
64
|
-
export { default as tezosSignTransaction } from './tezosSignTransaction';
|
|
65
43
|
export { default as unlockPath } from './unlockPath';
|
|
66
44
|
export { default as verifyMessage } from './verifyMessage';
|
|
67
45
|
export { default as wipeDevice } from './wipeDevice';
|
package/lib/api/index.js
CHANGED
|
@@ -3,12 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.checkFirmwareAuthenticity = exports.wipeDevice = exports.verifyMessage = exports.unlockPath = exports.tezosSignTransaction = exports.tezosGetPublicKey = exports.tezosGetAddress = exports.stellarSignTransaction = exports.stellarGetAddress = exports.signTransaction = exports.signMessage = exports.setProxy = exports.setBusy = exports.rippleSignTransaction = exports.rippleGetAddress = exports.resetDevice = exports.requestLogin = exports.recoveryDevice = void 0;
|
|
6
|
+
exports.checkFirmwareAuthenticity = exports.wipeDevice = exports.verifyMessage = exports.unlockPath = exports.signTransaction = exports.signMessage = exports.setProxy = exports.setBusy = exports.resetDevice = exports.requestLogin = exports.recoveryDevice = exports.rebootToBootloader = exports.pushTransaction = exports.getSettings = exports.getPublicKey = exports.getOwnershipProof = exports.getOwnershipId = exports.getFirmwareHash = exports.getFeatures = exports.getDeviceState = exports.getCoinInfo = exports.getAddress = exports.getAccountInfo = exports.getAccountDescriptor = exports.firmwareUpdate = exports.composeTransaction = exports.cipherKeyValue = exports.changePin = exports.blockchainUnsubscribeFiatRates = exports.blockchainUnsubscribe = exports.blockchainSubscribeFiatRates = exports.blockchainSubscribe = exports.blockchainSetCustomBackend = exports.blockchainGetTransactions = exports.blockchainGetFiatRatesForTimestamps = exports.blockchainGetCurrentFiatRates = exports.blockchainGetAccountBalanceHistory = exports.blockchainEstimateFee = exports.blockchainDisconnect = exports.backupDevice = exports.showDeviceTutorial = exports.cancelCoinjoinAuthorization = exports.authorizeCoinjoin = exports.authenticateDevice = exports.applySettings = exports.applyFlags = void 0;
|
|
8
7
|
var applyFlags_1 = require("./applyFlags");
|
|
9
8
|
Object.defineProperty(exports, "applyFlags", { enumerable: true, get: function () { return __importDefault(applyFlags_1).default; } });
|
|
10
9
|
var applySettings_1 = require("./applySettings");
|
|
11
10
|
Object.defineProperty(exports, "applySettings", { enumerable: true, get: function () { return __importDefault(applySettings_1).default; } });
|
|
11
|
+
var authenticateDevice_1 = require("./authenticateDevice");
|
|
12
|
+
Object.defineProperty(exports, "authenticateDevice", { enumerable: true, get: function () { return __importDefault(authenticateDevice_1).default; } });
|
|
12
13
|
var authorizeCoinjoin_1 = require("./authorizeCoinjoin");
|
|
13
14
|
Object.defineProperty(exports, "authorizeCoinjoin", { enumerable: true, get: function () { return __importDefault(authorizeCoinjoin_1).default; } });
|
|
14
15
|
var cancelCoinjoinAuthorization_1 = require("./cancelCoinjoinAuthorization");
|
|
@@ -17,12 +18,6 @@ var showDeviceTutorial_1 = require("./showDeviceTutorial");
|
|
|
17
18
|
Object.defineProperty(exports, "showDeviceTutorial", { enumerable: true, get: function () { return __importDefault(showDeviceTutorial_1).default; } });
|
|
18
19
|
var backupDevice_1 = require("./backupDevice");
|
|
19
20
|
Object.defineProperty(exports, "backupDevice", { enumerable: true, get: function () { return __importDefault(backupDevice_1).default; } });
|
|
20
|
-
var binanceGetAddress_1 = require("./binanceGetAddress");
|
|
21
|
-
Object.defineProperty(exports, "binanceGetAddress", { enumerable: true, get: function () { return __importDefault(binanceGetAddress_1).default; } });
|
|
22
|
-
var binanceGetPublicKey_1 = require("./binanceGetPublicKey");
|
|
23
|
-
Object.defineProperty(exports, "binanceGetPublicKey", { enumerable: true, get: function () { return __importDefault(binanceGetPublicKey_1).default; } });
|
|
24
|
-
var binanceSignTransaction_1 = require("./binanceSignTransaction");
|
|
25
|
-
Object.defineProperty(exports, "binanceSignTransaction", { enumerable: true, get: function () { return __importDefault(binanceSignTransaction_1).default; } });
|
|
26
21
|
var blockchainDisconnect_1 = require("./blockchainDisconnect");
|
|
27
22
|
Object.defineProperty(exports, "blockchainDisconnect", { enumerable: true, get: function () { return __importDefault(blockchainDisconnect_1).default; } });
|
|
28
23
|
var blockchainEstimateFee_1 = require("./blockchainEstimateFee");
|
|
@@ -45,38 +40,16 @@ var blockchainUnsubscribe_1 = require("./blockchainUnsubscribe");
|
|
|
45
40
|
Object.defineProperty(exports, "blockchainUnsubscribe", { enumerable: true, get: function () { return __importDefault(blockchainUnsubscribe_1).default; } });
|
|
46
41
|
var blockchainUnsubscribeFiatRates_1 = require("./blockchainUnsubscribeFiatRates");
|
|
47
42
|
Object.defineProperty(exports, "blockchainUnsubscribeFiatRates", { enumerable: true, get: function () { return __importDefault(blockchainUnsubscribeFiatRates_1).default; } });
|
|
48
|
-
var cardanoGetAddress_1 = require("./cardanoGetAddress");
|
|
49
|
-
Object.defineProperty(exports, "cardanoGetAddress", { enumerable: true, get: function () { return __importDefault(cardanoGetAddress_1).default; } });
|
|
50
|
-
var cardanoGetNativeScriptHash_1 = require("./cardanoGetNativeScriptHash");
|
|
51
|
-
Object.defineProperty(exports, "cardanoGetNativeScriptHash", { enumerable: true, get: function () { return __importDefault(cardanoGetNativeScriptHash_1).default; } });
|
|
52
|
-
var cardanoGetPublicKey_1 = require("./cardanoGetPublicKey");
|
|
53
|
-
Object.defineProperty(exports, "cardanoGetPublicKey", { enumerable: true, get: function () { return __importDefault(cardanoGetPublicKey_1).default; } });
|
|
54
|
-
var cardanoSignTransaction_1 = require("./cardanoSignTransaction");
|
|
55
|
-
Object.defineProperty(exports, "cardanoSignTransaction", { enumerable: true, get: function () { return __importDefault(cardanoSignTransaction_1).default; } });
|
|
56
43
|
var changePin_1 = require("./changePin");
|
|
57
44
|
Object.defineProperty(exports, "changePin", { enumerable: true, get: function () { return __importDefault(changePin_1).default; } });
|
|
58
45
|
var cipherKeyValue_1 = require("./cipherKeyValue");
|
|
59
46
|
Object.defineProperty(exports, "cipherKeyValue", { enumerable: true, get: function () { return __importDefault(cipherKeyValue_1).default; } });
|
|
60
47
|
var composeTransaction_1 = require("./composeTransaction");
|
|
61
48
|
Object.defineProperty(exports, "composeTransaction", { enumerable: true, get: function () { return __importDefault(composeTransaction_1).default; } });
|
|
62
|
-
var eosGetPublicKey_1 = require("./eosGetPublicKey");
|
|
63
|
-
Object.defineProperty(exports, "eosGetPublicKey", { enumerable: true, get: function () { return __importDefault(eosGetPublicKey_1).default; } });
|
|
64
|
-
var eosSignTransaction_1 = require("./eosSignTransaction");
|
|
65
|
-
Object.defineProperty(exports, "eosSignTransaction", { enumerable: true, get: function () { return __importDefault(eosSignTransaction_1).default; } });
|
|
66
|
-
var ethereumGetAddress_1 = require("./ethereumGetAddress");
|
|
67
|
-
Object.defineProperty(exports, "ethereumGetAddress", { enumerable: true, get: function () { return __importDefault(ethereumGetAddress_1).default; } });
|
|
68
|
-
var ethereumGetPublicKey_1 = require("./ethereumGetPublicKey");
|
|
69
|
-
Object.defineProperty(exports, "ethereumGetPublicKey", { enumerable: true, get: function () { return __importDefault(ethereumGetPublicKey_1).default; } });
|
|
70
|
-
var ethereumSignMessage_1 = require("./ethereumSignMessage");
|
|
71
|
-
Object.defineProperty(exports, "ethereumSignMessage", { enumerable: true, get: function () { return __importDefault(ethereumSignMessage_1).default; } });
|
|
72
|
-
var ethereumSignTransaction_1 = require("./ethereumSignTransaction");
|
|
73
|
-
Object.defineProperty(exports, "ethereumSignTransaction", { enumerable: true, get: function () { return __importDefault(ethereumSignTransaction_1).default; } });
|
|
74
|
-
var ethereumSignTypedData_1 = require("./ethereumSignTypedData");
|
|
75
|
-
Object.defineProperty(exports, "ethereumSignTypedData", { enumerable: true, get: function () { return __importDefault(ethereumSignTypedData_1).default; } });
|
|
76
|
-
var ethereumVerifyMessage_1 = require("./ethereumVerifyMessage");
|
|
77
|
-
Object.defineProperty(exports, "ethereumVerifyMessage", { enumerable: true, get: function () { return __importDefault(ethereumVerifyMessage_1).default; } });
|
|
78
49
|
var firmwareUpdate_1 = require("./firmwareUpdate");
|
|
79
50
|
Object.defineProperty(exports, "firmwareUpdate", { enumerable: true, get: function () { return __importDefault(firmwareUpdate_1).default; } });
|
|
51
|
+
var getAccountDescriptor_1 = require("./getAccountDescriptor");
|
|
52
|
+
Object.defineProperty(exports, "getAccountDescriptor", { enumerable: true, get: function () { return __importDefault(getAccountDescriptor_1).default; } });
|
|
80
53
|
var getAccountInfo_1 = require("./getAccountInfo");
|
|
81
54
|
Object.defineProperty(exports, "getAccountInfo", { enumerable: true, get: function () { return __importDefault(getAccountInfo_1).default; } });
|
|
82
55
|
var getAddress_1 = require("./getAddress");
|
|
@@ -97,10 +70,6 @@ var getPublicKey_1 = require("./getPublicKey");
|
|
|
97
70
|
Object.defineProperty(exports, "getPublicKey", { enumerable: true, get: function () { return __importDefault(getPublicKey_1).default; } });
|
|
98
71
|
var getSettings_1 = require("./getSettings");
|
|
99
72
|
Object.defineProperty(exports, "getSettings", { enumerable: true, get: function () { return __importDefault(getSettings_1).default; } });
|
|
100
|
-
var nemGetAddress_1 = require("./nemGetAddress");
|
|
101
|
-
Object.defineProperty(exports, "nemGetAddress", { enumerable: true, get: function () { return __importDefault(nemGetAddress_1).default; } });
|
|
102
|
-
var nemSignTransaction_1 = require("./nemSignTransaction");
|
|
103
|
-
Object.defineProperty(exports, "nemSignTransaction", { enumerable: true, get: function () { return __importDefault(nemSignTransaction_1).default; } });
|
|
104
73
|
var pushTransaction_1 = require("./pushTransaction");
|
|
105
74
|
Object.defineProperty(exports, "pushTransaction", { enumerable: true, get: function () { return __importDefault(pushTransaction_1).default; } });
|
|
106
75
|
var rebootToBootloader_1 = require("./rebootToBootloader");
|
|
@@ -111,10 +80,6 @@ var requestLogin_1 = require("./requestLogin");
|
|
|
111
80
|
Object.defineProperty(exports, "requestLogin", { enumerable: true, get: function () { return __importDefault(requestLogin_1).default; } });
|
|
112
81
|
var resetDevice_1 = require("./resetDevice");
|
|
113
82
|
Object.defineProperty(exports, "resetDevice", { enumerable: true, get: function () { return __importDefault(resetDevice_1).default; } });
|
|
114
|
-
var rippleGetAddress_1 = require("./rippleGetAddress");
|
|
115
|
-
Object.defineProperty(exports, "rippleGetAddress", { enumerable: true, get: function () { return __importDefault(rippleGetAddress_1).default; } });
|
|
116
|
-
var rippleSignTransaction_1 = require("./rippleSignTransaction");
|
|
117
|
-
Object.defineProperty(exports, "rippleSignTransaction", { enumerable: true, get: function () { return __importDefault(rippleSignTransaction_1).default; } });
|
|
118
83
|
var setBusy_1 = require("./setBusy");
|
|
119
84
|
Object.defineProperty(exports, "setBusy", { enumerable: true, get: function () { return __importDefault(setBusy_1).default; } });
|
|
120
85
|
var setProxy_1 = require("./setProxy");
|
|
@@ -123,16 +88,6 @@ var signMessage_1 = require("./signMessage");
|
|
|
123
88
|
Object.defineProperty(exports, "signMessage", { enumerable: true, get: function () { return __importDefault(signMessage_1).default; } });
|
|
124
89
|
var signTransaction_1 = require("./signTransaction");
|
|
125
90
|
Object.defineProperty(exports, "signTransaction", { enumerable: true, get: function () { return __importDefault(signTransaction_1).default; } });
|
|
126
|
-
var stellarGetAddress_1 = require("./stellarGetAddress");
|
|
127
|
-
Object.defineProperty(exports, "stellarGetAddress", { enumerable: true, get: function () { return __importDefault(stellarGetAddress_1).default; } });
|
|
128
|
-
var stellarSignTransaction_1 = require("./stellarSignTransaction");
|
|
129
|
-
Object.defineProperty(exports, "stellarSignTransaction", { enumerable: true, get: function () { return __importDefault(stellarSignTransaction_1).default; } });
|
|
130
|
-
var tezosGetAddress_1 = require("./tezosGetAddress");
|
|
131
|
-
Object.defineProperty(exports, "tezosGetAddress", { enumerable: true, get: function () { return __importDefault(tezosGetAddress_1).default; } });
|
|
132
|
-
var tezosGetPublicKey_1 = require("./tezosGetPublicKey");
|
|
133
|
-
Object.defineProperty(exports, "tezosGetPublicKey", { enumerable: true, get: function () { return __importDefault(tezosGetPublicKey_1).default; } });
|
|
134
|
-
var tezosSignTransaction_1 = require("./tezosSignTransaction");
|
|
135
|
-
Object.defineProperty(exports, "tezosSignTransaction", { enumerable: true, get: function () { return __importDefault(tezosSignTransaction_1).default; } });
|
|
136
91
|
var unlockPath_1 = require("./unlockPath");
|
|
137
92
|
Object.defineProperty(exports, "unlockPath", { enumerable: true, get: function () { return __importDefault(unlockPath_1).default; } });
|
|
138
93
|
var verifyMessage_1 = require("./verifyMessage");
|