@trezor/connect 9.6.2-beta.3 → 9.6.3-beta.1
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 +15 -6
- package/README.md +1 -1
- package/lib/api/applySettings.js +16 -1
- package/lib/api/bitcoin/signtx.d.ts +2 -2
- package/lib/api/bitcoin/signtx.js +1 -1
- package/lib/api/bleUnpair.js +0 -1
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +1 -0
- package/lib/api/cardano/api/cardanoSignMessage.d.ts +25 -0
- package/lib/api/cardano/api/cardanoSignMessage.js +97 -0
- package/lib/api/cardano/api/index.d.ts +1 -0
- package/lib/api/cardano/api/index.js +3 -1
- package/lib/api/cardano/cardanoUtils.d.ts +1 -1
- package/lib/api/cardano/cardanoUtils.js +2 -2
- package/lib/api/discoverAccounts.js +61 -33
- package/lib/api/ethereum/api/ethereumGetAddress.js +1 -0
- package/lib/api/ethereum/api/ethereumSignTransaction.js +22 -4
- package/lib/api/ethereum/ethereumSignTx.d.ts +3 -2
- package/lib/api/ethereum/ethereumSignTx.js +4 -2
- package/lib/api/evoluGetNode.d.ts +11 -0
- package/lib/api/evoluGetNode.js +26 -0
- package/lib/api/firmware/calculateFirmwareHash.d.ts +2 -1
- package/lib/api/firmware/calculateFirmwareHash.js +17 -4
- package/lib/api/firmware/getBinary.d.ts +7 -6
- package/lib/api/firmware/getBinary.js +18 -6
- package/lib/api/firmware/index.d.ts +0 -2
- package/lib/api/firmware/index.js +1 -5
- package/lib/api/firmware/uploadFirmware.d.ts +10 -1
- package/lib/api/firmware/uploadFirmware.js +8 -7
- package/lib/api/getFeatures.d.ts +2 -1
- package/lib/api/index.d.ts +3 -0
- package/lib/api/index.js +8 -2
- package/lib/api/nem/nemSignTx.d.ts +1 -1
- package/lib/api/pushTransaction.d.ts +2 -1
- package/lib/api/pushTransaction.js +2 -1
- package/lib/api/resetDevice.js +2 -1
- package/lib/api/ripple/api/rippleGetAddress.d.ts +1 -0
- package/lib/api/signMessage.js +1 -1
- package/lib/api/signTransaction.d.ts +1 -1
- package/lib/api/solana/api/solanaGetAddress.d.ts +1 -0
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +2 -0
- package/lib/api/solana/api/solanaGetPublicKey.js +3 -0
- package/lib/api/stellar/api/stellarGetAddress.d.ts +1 -0
- package/lib/api/tezos/api/tezosGetAddress.d.ts +1 -0
- package/lib/api/tezos/tezosSignTx.d.ts +1 -1
- package/lib/api/thpGetCredentials.d.ts +10 -0
- package/lib/api/thpGetCredentials.js +31 -0
- package/lib/api/thpRemoveCredentials.d.ts +8 -0
- package/lib/api/thpRemoveCredentials.js +32 -0
- package/lib/api/wipeDevice.js +6 -2
- package/lib/backend/Blockchain.d.ts +4 -4
- package/lib/backend/Blockchain.js +12 -11
- package/lib/constants/cardano.d.ts +3 -0
- package/lib/constants/cardano.js +5 -1
- package/lib/constants/errors.d.ts +12 -9
- package/lib/constants/errors.js +18 -24
- package/lib/core/AbstractMethod.d.ts +5 -24
- package/lib/core/AbstractMethod.js +2 -2
- package/lib/core/index.js +5 -1
- package/lib/core/onCallFirmwareUpdate.d.ts +13 -1
- package/lib/core/onCallFirmwareUpdate.js +158 -94
- package/lib/data/DataManager.d.ts +13 -1
- package/lib/data/DataManager.js +44 -14
- package/lib/data/coinInfo.d.ts +8 -84
- package/lib/data/coinInfo.js +6 -9
- package/lib/data/config.d.ts +26 -192
- package/lib/data/config.js +37 -1
- package/lib/data/connectSettings.js +7 -0
- package/lib/data/defaultFeeLevels.js +2 -1
- package/lib/data/deviceAuthenticityConfig.js +10 -1
- package/lib/data/firmwareInfo.d.ts +44 -11
- package/lib/data/firmwareInfo.js +360 -122
- package/lib/data/thpSettings.js +5 -2
- package/lib/data/version.d.ts +2 -1
- package/lib/data/version.js +4 -3
- package/lib/device/Device.d.ts +17 -7
- package/lib/device/Device.js +72 -115
- package/lib/device/DeviceCommands.d.ts +1 -0
- package/lib/device/DeviceCurrentSession.d.ts +41 -20
- package/lib/device/DeviceCurrentSession.js +18 -22
- package/lib/device/TransportList.js +10 -5
- package/lib/device/checkFirmwareRevision.d.ts +3 -2
- package/lib/device/checkFirmwareRevision.js +6 -11
- package/lib/device/thp/handshake.d.ts +4 -0
- package/lib/device/thp/handshake.js +88 -0
- package/lib/device/thp/index.d.ts +4 -1
- package/lib/device/thp/index.js +24 -6
- package/lib/device/thp/pairing.d.ts +16 -0
- package/lib/device/thp/pairing.js +230 -0
- package/lib/device/thp/session.d.ts +3 -0
- package/lib/device/thp/session.js +27 -0
- package/lib/device/thp/thpCall.d.ts +41 -0
- package/lib/device/thp/thpCall.js +57 -0
- package/lib/device/workflow/checkFirmwareHash.d.ts +10 -0
- package/lib/device/workflow/checkFirmwareHash.js +79 -0
- package/lib/device/workflow/checkFirmwareHashWithRetries.d.ts +9 -0
- package/lib/device/workflow/checkFirmwareHashWithRetries.js +41 -0
- package/lib/device/workflow/handshake.js +7 -6
- package/lib/device/workflow/validateState.js +53 -10
- package/lib/events/ui-request.d.ts +1 -1
- package/lib/factory.js +4 -0
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/lib/types/api/bitcoin/index.d.ts +1 -1
- package/lib/types/api/cardano/index.d.ts +62 -1
- package/lib/types/api/cardano/index.js +30 -1
- package/lib/types/api/cardanoSignMessage.d.ts +4 -0
- package/lib/types/api/cardanoSignMessage.js +3 -0
- package/lib/types/api/discoverAccounts.d.ts +17 -12
- package/lib/types/api/ethereum/index.d.ts +108 -0
- package/lib/types/api/ethereum/index.js +3 -0
- package/lib/types/api/evoluGetNode.d.ts +4 -0
- package/lib/types/api/evoluGetNode.js +3 -0
- package/lib/types/api/index.d.ts +8 -0
- package/lib/types/api/pushTransaction.d.ts +4 -1
- package/lib/types/api/pushTransaction.js +7 -1
- package/lib/types/api/solana/index.d.ts +3 -0
- package/lib/types/api/solana/index.js +2 -0
- package/lib/types/api/thpGetCredentials.d.ts +4 -0
- package/lib/types/api/thpGetCredentials.js +3 -0
- package/lib/types/api/thpRemoveCredentials.d.ts +7 -0
- package/lib/types/api/thpRemoveCredentials.js +3 -0
- package/lib/types/device.d.ts +9 -9
- package/lib/types/firmware.d.ts +15 -12
- package/lib/types/firmware.js +0 -3
- package/lib/types/params.d.ts +1 -0
- package/lib/types/settings.d.ts +7 -0
- package/lib/utils/assetUtils.d.ts +5 -2
- package/lib/utils/assetUtils.js +14 -18
- package/lib/utils/assets.native.js +0 -2
- package/lib/utils/firmwareReleaseConfigUtils.d.ts +8 -5
- package/lib/utils/firmwareReleaseConfigUtils.js +74 -59
- package/lib/utils/firmwareUtils.d.ts +8 -4
- package/lib/utils/firmwareUtils.js +62 -20
- package/lib/utils/formatUtils.d.ts +1 -0
- package/lib/utils/formatUtils.js +3 -2
- package/package.json +19 -18
- package/lib/api/firmware/getBinaryForFirmwareUpgrade.d.ts +0 -12
- package/lib/api/firmware/getBinaryForFirmwareUpgrade.js +0 -32
- package/lib/data/getLanguage.d.ts +0 -6
- package/lib/data/getLanguage.js +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CardanoSignedTxData = exports.CardanoAuxiliaryDataSupplement = exports.CardanoSignedTxWitness = exports.CardanoSignTransactionExtended = exports.CardanoSignTransaction = exports.CardanoAuxiliaryData = exports.CardanoCVoteRegistrationParameters = exports.CardanoCVoteRegistrationDelegation = exports.CardanoReferenceInput = exports.CardanoRequiredSigner = exports.CardanoCollateralInput = exports.CardanoMint = exports.CardanoWithdrawal = exports.CardanoCertificate = exports.CardanoDRep = exports.CardanoPoolParameters = exports.CardanoPoolMargin = exports.CardanoPoolMetadata = exports.CardanoPoolRelay = exports.CardanoPoolOwner = exports.CardanoOutput = exports.CardanoAssetGroup = exports.CardanoToken = exports.CardanoInput = exports.CardanoGetPublicKey = exports.CardanoNativeScriptHash = exports.CardanoGetNativeScriptHash = exports.CardanoNativeScript = exports.CardanoGetAddress = exports.CardanoAddressParameters = exports.CardanoCertificatePointer = void 0;
|
|
3
|
+
exports.CardanoSignedMessage = exports.CardanoMessageHeaders = exports.CardanoMessageUnprotectedHeaders = exports.CardanoMessageProtectedHeaders = exports.CardanoSignMessage = exports.CardanoSignedTxData = exports.CardanoAuxiliaryDataSupplement = exports.CardanoSignedTxWitness = exports.CardanoSignTransactionExtended = exports.CardanoSignTransaction = exports.CardanoAuxiliaryData = exports.CardanoCVoteRegistrationParameters = exports.CardanoCVoteRegistrationDelegation = exports.CardanoReferenceInput = exports.CardanoRequiredSigner = exports.CardanoCollateralInput = exports.CardanoMint = exports.CardanoWithdrawal = exports.CardanoCertificate = exports.CardanoDRep = exports.CardanoPoolParameters = exports.CardanoPoolMargin = exports.CardanoPoolMetadata = exports.CardanoPoolRelay = exports.CardanoPoolOwner = exports.CardanoOutput = exports.CardanoAssetGroup = exports.CardanoToken = exports.CardanoInput = exports.CardanoGetPublicKey = exports.CardanoNativeScriptHash = exports.CardanoGetNativeScriptHash = exports.CardanoNativeScript = exports.CardanoGetAddress = exports.CardanoAddressParameters = exports.CardanoCertificatePointer = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const params_1 = require("../../params");
|
|
@@ -216,4 +216,33 @@ exports.CardanoSignedTxData = schema_utils_1.Type.Object({
|
|
|
216
216
|
witnesses: schema_utils_1.Type.Array(exports.CardanoSignedTxWitness),
|
|
217
217
|
auxiliaryDataSupplement: schema_utils_1.Type.Optional(exports.CardanoAuxiliaryDataSupplement),
|
|
218
218
|
});
|
|
219
|
+
exports.CardanoSignMessage = schema_utils_1.Type.Object({
|
|
220
|
+
path: params_1.DerivationPath,
|
|
221
|
+
payload: schema_utils_1.Type.String(),
|
|
222
|
+
preferHexDisplay: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
223
|
+
networkId: schema_utils_1.Type.Optional(schema_utils_1.Type.Number()),
|
|
224
|
+
protocolMagic: schema_utils_1.Type.Optional(schema_utils_1.Type.Number()),
|
|
225
|
+
addressParameters: schema_utils_1.Type.Optional(exports.CardanoAddressParameters),
|
|
226
|
+
derivationType: schema_utils_1.Type.Optional(constants_1.PROTO.EnumCardanoDerivationType),
|
|
227
|
+
});
|
|
228
|
+
exports.CardanoMessageProtectedHeaders = schema_utils_1.Type.Object({
|
|
229
|
+
1: schema_utils_1.Type.Literal(constants_1.CARDANO.ALGORITHM_IDS.EdDSA),
|
|
230
|
+
address: schema_utils_1.Type.String(),
|
|
231
|
+
});
|
|
232
|
+
exports.CardanoMessageUnprotectedHeaders = schema_utils_1.Type.Object({
|
|
233
|
+
hashed: schema_utils_1.Type.Boolean(),
|
|
234
|
+
version: schema_utils_1.Type.Number(),
|
|
235
|
+
});
|
|
236
|
+
exports.CardanoMessageHeaders = schema_utils_1.Type.Object({
|
|
237
|
+
protected: exports.CardanoMessageProtectedHeaders,
|
|
238
|
+
unprotected: exports.CardanoMessageUnprotectedHeaders,
|
|
239
|
+
});
|
|
240
|
+
exports.CardanoSignedMessage = schema_utils_1.Type.Object({
|
|
241
|
+
headers: exports.CardanoMessageHeaders,
|
|
242
|
+
payload: schema_utils_1.Type.String(),
|
|
243
|
+
signature: schema_utils_1.Type.String(),
|
|
244
|
+
pubKey: schema_utils_1.Type.String(),
|
|
245
|
+
coseSignature: schema_utils_1.Type.String(),
|
|
246
|
+
coseKey: schema_utils_1.Type.String(),
|
|
247
|
+
});
|
|
219
248
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Params, Response } from '../params';
|
|
2
|
+
import type { CardanoSignMessage, CardanoSignedMessage } from './cardano';
|
|
3
|
+
export declare function cardanoSignMessage(params: Params<CardanoSignMessage>): Response<CardanoSignedMessage>;
|
|
4
|
+
//# sourceMappingURL=cardanoSignMessage.d.ts.map
|
|
@@ -202,28 +202,33 @@ export type AccountTypeKey = DistributivePick<AccountTypeItem, 'symbol' | 'type'
|
|
|
202
202
|
export type AdditionalParams = Pick<BlockchainLinkParams<'getAccountInfo'>, 'details' | 'pageSize'> & {
|
|
203
203
|
identity?: string;
|
|
204
204
|
};
|
|
205
|
-
type
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
type
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
};
|
|
205
|
+
type CoinParam<T extends AccountTypeKey['symbol'] = AccountTypeKey['symbol']> = T extends T ? AdditionalParams & {
|
|
206
|
+
symbol: T;
|
|
207
|
+
known?: {
|
|
208
|
+
type: Extract<AccountTypeKey, {
|
|
209
|
+
symbol: T;
|
|
210
|
+
}>['type'];
|
|
211
|
+
skip?: number;
|
|
212
|
+
}[];
|
|
213
|
+
knownOnly?: boolean;
|
|
214
|
+
} : never;
|
|
213
215
|
type DiscoverAccountsParams = {
|
|
214
|
-
|
|
216
|
+
coins: CoinParam[];
|
|
215
217
|
};
|
|
216
218
|
type ProgressBaseType = AccountTypeKey & {
|
|
217
219
|
index: number;
|
|
218
|
-
};
|
|
219
|
-
export type DiscoverAccountsProgressOk = ProgressBaseType & AccountInfo & {
|
|
220
220
|
path: string;
|
|
221
221
|
backendType?: string;
|
|
222
222
|
};
|
|
223
|
-
|
|
223
|
+
type DiscoveryError = {
|
|
224
|
+
failed: true;
|
|
224
225
|
error: string;
|
|
225
226
|
code?: string;
|
|
226
227
|
};
|
|
228
|
+
export type DiscoverAccountsProgressOk = ProgressBaseType & AccountInfo & {
|
|
229
|
+
failed: false;
|
|
230
|
+
};
|
|
231
|
+
export type DiscoverAccountsProgressError = ProgressBaseType & DiscoveryError;
|
|
227
232
|
export type DiscoverAccountsProgress = DiscoverAccountsProgressOk | DiscoverAccountsProgressError;
|
|
228
233
|
type DiscoverAccountsResult = {
|
|
229
234
|
empty: number;
|
|
@@ -18,6 +18,33 @@ export declare const EthereumTransaction: import("@trezor/schema-utils").TObject
|
|
|
18
18
|
data: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
19
19
|
chainId: import("@trezor/schema-utils").TNumber;
|
|
20
20
|
txType: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
21
|
+
payment_req: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
22
|
+
nonce: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
23
|
+
recipient_name: import("@trezor/schema-utils").TString;
|
|
24
|
+
memos: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TObject<{
|
|
25
|
+
text_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
26
|
+
text: import("@trezor/schema-utils").TString;
|
|
27
|
+
}>>;
|
|
28
|
+
refund_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
29
|
+
address: import("@trezor/schema-utils").TString;
|
|
30
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
31
|
+
mac: import("@trezor/schema-utils").TString;
|
|
32
|
+
}>>;
|
|
33
|
+
coin_purchase_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
34
|
+
coin_type: import("@trezor/schema-utils").TNumber;
|
|
35
|
+
amount: import("@trezor/schema-utils").TString;
|
|
36
|
+
address: import("@trezor/schema-utils").TString;
|
|
37
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
38
|
+
mac: import("@trezor/schema-utils").TString;
|
|
39
|
+
}>>;
|
|
40
|
+
text_details_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
41
|
+
title: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
42
|
+
text: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
43
|
+
}>>;
|
|
44
|
+
}>>>;
|
|
45
|
+
amount: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
46
|
+
signature: import("@trezor/schema-utils").TString;
|
|
47
|
+
}>>;
|
|
21
48
|
}>;
|
|
22
49
|
export type EthereumAccessList = Static<typeof EthereumAccessList>;
|
|
23
50
|
export declare const EthereumAccessList: import("@trezor/schema-utils").TObject<{
|
|
@@ -39,6 +66,33 @@ export declare const EthereumTransactionEIP1559: import("@trezor/schema-utils").
|
|
|
39
66
|
address: import("@trezor/schema-utils").TString;
|
|
40
67
|
storageKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
|
|
41
68
|
}>>>;
|
|
69
|
+
payment_req: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
70
|
+
nonce: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
71
|
+
recipient_name: import("@trezor/schema-utils").TString;
|
|
72
|
+
memos: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TObject<{
|
|
73
|
+
text_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
74
|
+
text: import("@trezor/schema-utils").TString;
|
|
75
|
+
}>>;
|
|
76
|
+
refund_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
77
|
+
address: import("@trezor/schema-utils").TString;
|
|
78
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
79
|
+
mac: import("@trezor/schema-utils").TString;
|
|
80
|
+
}>>;
|
|
81
|
+
coin_purchase_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
82
|
+
coin_type: import("@trezor/schema-utils").TNumber;
|
|
83
|
+
amount: import("@trezor/schema-utils").TString;
|
|
84
|
+
address: import("@trezor/schema-utils").TString;
|
|
85
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
86
|
+
mac: import("@trezor/schema-utils").TString;
|
|
87
|
+
}>>;
|
|
88
|
+
text_details_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
89
|
+
title: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
90
|
+
text: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
91
|
+
}>>;
|
|
92
|
+
}>>>;
|
|
93
|
+
amount: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
94
|
+
signature: import("@trezor/schema-utils").TString;
|
|
95
|
+
}>>;
|
|
42
96
|
}>;
|
|
43
97
|
export type EthereumSignTransaction = Static<typeof EthereumSignTransaction>;
|
|
44
98
|
export declare const EthereumSignTransaction: import("@trezor/schema-utils").TObject<{
|
|
@@ -54,6 +108,33 @@ export declare const EthereumSignTransaction: import("@trezor/schema-utils").TOb
|
|
|
54
108
|
data: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
55
109
|
chainId: import("@trezor/schema-utils").TNumber;
|
|
56
110
|
txType: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
111
|
+
payment_req: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
112
|
+
nonce: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
113
|
+
recipient_name: import("@trezor/schema-utils").TString;
|
|
114
|
+
memos: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TObject<{
|
|
115
|
+
text_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
116
|
+
text: import("@trezor/schema-utils").TString;
|
|
117
|
+
}>>;
|
|
118
|
+
refund_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
119
|
+
address: import("@trezor/schema-utils").TString;
|
|
120
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
121
|
+
mac: import("@trezor/schema-utils").TString;
|
|
122
|
+
}>>;
|
|
123
|
+
coin_purchase_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
124
|
+
coin_type: import("@trezor/schema-utils").TNumber;
|
|
125
|
+
amount: import("@trezor/schema-utils").TString;
|
|
126
|
+
address: import("@trezor/schema-utils").TString;
|
|
127
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
128
|
+
mac: import("@trezor/schema-utils").TString;
|
|
129
|
+
}>>;
|
|
130
|
+
text_details_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
131
|
+
title: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
132
|
+
text: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
133
|
+
}>>;
|
|
134
|
+
}>>>;
|
|
135
|
+
amount: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
136
|
+
signature: import("@trezor/schema-utils").TString;
|
|
137
|
+
}>>;
|
|
57
138
|
}>, import("@trezor/schema-utils").TObject<{
|
|
58
139
|
to: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TNull]>;
|
|
59
140
|
value: import("@trezor/schema-utils").TString;
|
|
@@ -68,6 +149,33 @@ export declare const EthereumSignTransaction: import("@trezor/schema-utils").TOb
|
|
|
68
149
|
address: import("@trezor/schema-utils").TString;
|
|
69
150
|
storageKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
|
|
70
151
|
}>>>;
|
|
152
|
+
payment_req: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
153
|
+
nonce: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
154
|
+
recipient_name: import("@trezor/schema-utils").TString;
|
|
155
|
+
memos: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TObject<{
|
|
156
|
+
text_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
157
|
+
text: import("@trezor/schema-utils").TString;
|
|
158
|
+
}>>;
|
|
159
|
+
refund_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
160
|
+
address: import("@trezor/schema-utils").TString;
|
|
161
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
162
|
+
mac: import("@trezor/schema-utils").TString;
|
|
163
|
+
}>>;
|
|
164
|
+
coin_purchase_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
165
|
+
coin_type: import("@trezor/schema-utils").TNumber;
|
|
166
|
+
amount: import("@trezor/schema-utils").TString;
|
|
167
|
+
address: import("@trezor/schema-utils").TString;
|
|
168
|
+
address_n: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>;
|
|
169
|
+
mac: import("@trezor/schema-utils").TString;
|
|
170
|
+
}>>;
|
|
171
|
+
text_details_memo: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
|
|
172
|
+
title: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
173
|
+
text: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
174
|
+
}>>;
|
|
175
|
+
}>>>;
|
|
176
|
+
amount: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
177
|
+
signature: import("@trezor/schema-utils").TString;
|
|
178
|
+
}>>;
|
|
71
179
|
}>]>;
|
|
72
180
|
chunkify: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
73
181
|
}>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EthereumVerifyMessage = exports.EthereumSignTypedHash = exports.EthereumSignTypedData = exports.EthereumSignTypedDataMessage = exports.EthereumSignTypedDataTypes = exports.EthereumSignedTx = exports.EthereumSignTransaction = exports.EthereumTransactionEIP1559 = exports.EthereumAccessList = exports.EthereumTransaction = exports.EthereumSignMessage = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const params_1 = require("../../params");
|
|
6
7
|
exports.EthereumSignMessage = schema_utils_1.Type.Object({
|
|
7
8
|
path: params_1.DerivationPath,
|
|
@@ -19,6 +20,7 @@ exports.EthereumTransaction = schema_utils_1.Type.Object({
|
|
|
19
20
|
data: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
|
|
20
21
|
chainId: schema_utils_1.Type.Number(),
|
|
21
22
|
txType: schema_utils_1.Type.Optional(schema_utils_1.Type.Number()),
|
|
23
|
+
payment_req: schema_utils_1.Type.Optional(constants_1.PROTO.PaymentRequest),
|
|
22
24
|
});
|
|
23
25
|
exports.EthereumAccessList = schema_utils_1.Type.Object({
|
|
24
26
|
address: schema_utils_1.Type.String(),
|
|
@@ -35,6 +37,7 @@ exports.EthereumTransactionEIP1559 = schema_utils_1.Type.Object({
|
|
|
35
37
|
maxFeePerGas: schema_utils_1.Type.String(),
|
|
36
38
|
maxPriorityFeePerGas: schema_utils_1.Type.String(),
|
|
37
39
|
accessList: schema_utils_1.Type.Optional(schema_utils_1.Type.Array(exports.EthereumAccessList)),
|
|
40
|
+
payment_req: schema_utils_1.Type.Optional(constants_1.PROTO.PaymentRequest),
|
|
38
41
|
});
|
|
39
42
|
exports.EthereumSignTransaction = schema_utils_1.Type.Object({
|
|
40
43
|
path: params_1.DerivationPath,
|
package/lib/types/api/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { cardanoComposeTransaction } from './cardanoComposeTransaction';
|
|
|
23
23
|
import { cardanoGetAddress } from './cardanoGetAddress';
|
|
24
24
|
import { cardanoGetNativeScriptHash } from './cardanoGetNativeScriptHash';
|
|
25
25
|
import { cardanoGetPublicKey } from './cardanoGetPublicKey';
|
|
26
|
+
import { cardanoSignMessage } from './cardanoSignMessage';
|
|
26
27
|
import { cardanoSignTransaction } from './cardanoSignTransaction';
|
|
27
28
|
import { changeLanguage } from './changeLanguage';
|
|
28
29
|
import { changePin } from './changePin';
|
|
@@ -39,6 +40,7 @@ import { ethereumSignMessage } from './ethereumSignMessage';
|
|
|
39
40
|
import { ethereumSignTransaction } from './ethereumSignTransaction';
|
|
40
41
|
import { ethereumSignTypedData } from './ethereumSignTypedData';
|
|
41
42
|
import { ethereumVerifyMessage } from './ethereumVerifyMessage';
|
|
43
|
+
import { evoluGetNode } from './evoluGetNode';
|
|
42
44
|
import { firmwareUpdate } from './firmwareUpdate';
|
|
43
45
|
import { getAccountDescriptor } from './getAccountDescriptor';
|
|
44
46
|
import { getAccountInfo } from './getAccountInfo';
|
|
@@ -82,6 +84,8 @@ import { stellarSignTransaction } from './stellarSignTransaction';
|
|
|
82
84
|
import { tezosGetAddress } from './tezosGetAddress';
|
|
83
85
|
import { tezosGetPublicKey } from './tezosGetPublicKey';
|
|
84
86
|
import { tezosSignTransaction } from './tezosSignTransaction';
|
|
87
|
+
import { thpGetCredentials } from './thpGetCredentials';
|
|
88
|
+
import { thpRemoveCredentials } from './thpRemoveCredentials';
|
|
85
89
|
import { uiResponse } from './uiResponse';
|
|
86
90
|
import { unlockPath } from './unlockPath';
|
|
87
91
|
import { verifyMessage } from './verifyMessage';
|
|
@@ -113,11 +117,13 @@ export interface TrezorConnect {
|
|
|
113
117
|
cardanoGetNativeScriptHash: typeof cardanoGetNativeScriptHash;
|
|
114
118
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
115
119
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
120
|
+
cardanoSignMessage: typeof cardanoSignMessage;
|
|
116
121
|
cardanoComposeTransaction: typeof cardanoComposeTransaction;
|
|
117
122
|
changeLanguage: typeof changeLanguage;
|
|
118
123
|
changePin: typeof changePin;
|
|
119
124
|
changeWipeCode: typeof changeWipeCode;
|
|
120
125
|
cipherKeyValue: typeof cipherKeyValue;
|
|
126
|
+
evoluGetNode: typeof evoluGetNode;
|
|
121
127
|
composeTransaction: typeof composeTransaction;
|
|
122
128
|
dispose: typeof dispose;
|
|
123
129
|
eosGetPublicKey: typeof eosGetPublicKey;
|
|
@@ -142,6 +148,8 @@ export interface TrezorConnect {
|
|
|
142
148
|
getPublicKey: typeof getPublicKey;
|
|
143
149
|
getNonce: typeof getNonce;
|
|
144
150
|
getSettings: typeof getSettings;
|
|
151
|
+
thpGetCredentials: typeof thpGetCredentials;
|
|
152
|
+
thpRemoveCredentials: typeof thpRemoveCredentials;
|
|
145
153
|
init: typeof init;
|
|
146
154
|
manifest: typeof manifest;
|
|
147
155
|
nemGetAddress: typeof nemGetAddress;
|
|
@@ -2,7 +2,10 @@ import { Static } from '@trezor/schema-utils';
|
|
|
2
2
|
import type { Params, Response } from '../params';
|
|
3
3
|
export type PushTransaction = Static<typeof PushTransaction>;
|
|
4
4
|
export declare const PushTransaction: import("@trezor/schema-utils").TObject<{
|
|
5
|
-
tx: import("@trezor/schema-utils").TString
|
|
5
|
+
tx: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TObject<{
|
|
6
|
+
hex: import("@trezor/schema-utils").TString;
|
|
7
|
+
disableAlternativeRPC: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
8
|
+
}>]>;
|
|
6
9
|
coin: import("@trezor/schema-utils").TString;
|
|
7
10
|
identity: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
8
11
|
}>;
|
|
@@ -3,7 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PushTransaction = void 0;
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
exports.PushTransaction = schema_utils_1.Type.Object({
|
|
6
|
-
tx: schema_utils_1.Type.
|
|
6
|
+
tx: schema_utils_1.Type.Union([
|
|
7
|
+
schema_utils_1.Type.String(),
|
|
8
|
+
schema_utils_1.Type.Object({
|
|
9
|
+
hex: schema_utils_1.Type.String(),
|
|
10
|
+
disableAlternativeRPC: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
11
|
+
}),
|
|
12
|
+
]),
|
|
7
13
|
coin: schema_utils_1.Type.String(),
|
|
8
14
|
identity: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
|
|
9
15
|
});
|
|
@@ -6,6 +6,7 @@ export declare const SolanaPublicKey: import("@trezor/schema-utils").TIntersect<
|
|
|
6
6
|
serializedPath: import("@trezor/schema-utils").TString;
|
|
7
7
|
}>, import("@trezor/schema-utils").TObject<{
|
|
8
8
|
publicKey: import("@trezor/schema-utils").TString;
|
|
9
|
+
publicKeyBase58: import("@trezor/schema-utils").TString;
|
|
9
10
|
}>]>;
|
|
10
11
|
export type SolanaTxTokenAccountInfo = Static<typeof SolanaTxTokenAccountInfo>;
|
|
11
12
|
export declare const SolanaTxTokenAccountInfo: import("@trezor/schema-utils").TObject<{
|
|
@@ -24,6 +25,7 @@ export declare const SolanaTxAdditionalInfo: import("@trezor/schema-utils").TObj
|
|
|
24
25
|
tokenAccount: import("@trezor/schema-utils").TString;
|
|
25
26
|
symbol: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
26
27
|
}>>>;
|
|
28
|
+
isDevnet: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
27
29
|
}>;
|
|
28
30
|
export type SolanaSignTransaction = Static<typeof SolanaSignTransaction>;
|
|
29
31
|
export declare const SolanaSignTransaction: import("@trezor/schema-utils").TObject<{
|
|
@@ -37,6 +39,7 @@ export declare const SolanaSignTransaction: import("@trezor/schema-utils").TObje
|
|
|
37
39
|
tokenAccount: import("@trezor/schema-utils").TString;
|
|
38
40
|
symbol: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
39
41
|
}>>>;
|
|
42
|
+
isDevnet: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
40
43
|
}>>;
|
|
41
44
|
serialize: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
42
45
|
}>;
|
|
@@ -7,6 +7,7 @@ exports.SolanaPublicKey = schema_utils_1.Type.Intersect([
|
|
|
7
7
|
params_1.PublicKey,
|
|
8
8
|
schema_utils_1.Type.Object({
|
|
9
9
|
publicKey: schema_utils_1.Type.String(),
|
|
10
|
+
publicKeyBase58: schema_utils_1.Type.String(),
|
|
10
11
|
}),
|
|
11
12
|
]);
|
|
12
13
|
exports.SolanaTxTokenAccountInfo = schema_utils_1.Type.Object({
|
|
@@ -18,6 +19,7 @@ exports.SolanaTxTokenAccountInfo = schema_utils_1.Type.Object({
|
|
|
18
19
|
});
|
|
19
20
|
exports.SolanaTxAdditionalInfo = schema_utils_1.Type.Object({
|
|
20
21
|
tokenAccountsInfos: schema_utils_1.Type.Optional(schema_utils_1.Type.Array(exports.SolanaTxTokenAccountInfo, { minItems: 1 })),
|
|
22
|
+
isDevnet: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
21
23
|
});
|
|
22
24
|
exports.SolanaSignTransaction = schema_utils_1.Type.Object({
|
|
23
25
|
path: schema_utils_1.Type.Union([schema_utils_1.Type.String(), schema_utils_1.Type.Array(schema_utils_1.Type.Number())]),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThpCredentials } from '@trezor/protocol';
|
|
2
|
+
import type { PROTO } from '../../constants';
|
|
3
|
+
import type { CommonParams, Response } from '../params';
|
|
4
|
+
export declare function thpRemoveCredentials(params: CommonParams & {
|
|
5
|
+
credentials?: ThpCredentials[];
|
|
6
|
+
}): Response<PROTO.Success>;
|
|
7
|
+
//# sourceMappingURL=thpRemoveCredentials.d.ts.map
|
package/lib/types/device.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { FeaturesNarrowing, FirmwareType } from '@trezor/device-utils';
|
|
|
2
2
|
import type { ThpStateSerialized } from '@trezor/protocol';
|
|
3
3
|
import { Branded } from '@trezor/type-utils';
|
|
4
4
|
import type { PROTO } from '../constants';
|
|
5
|
-
import type {
|
|
6
|
-
export type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
5
|
+
import type { FirmwareReleaseConfigInfo } from './firmware';
|
|
6
|
+
export type DeviceStatus = 'available' | 'occupied' | 'used' | 'busy';
|
|
7
7
|
export type DeviceMode = 'normal' | 'bootloader' | 'initialize' | 'seedless';
|
|
8
8
|
export type DeviceFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'custom' | 'none';
|
|
9
9
|
export type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
|
|
@@ -24,7 +24,7 @@ export type FirmwareRevisionCheckResult = {
|
|
|
24
24
|
error: FirmwareRevisionCheckError;
|
|
25
25
|
errorPayload?: unknown;
|
|
26
26
|
};
|
|
27
|
-
export type FirmwareHashCheckError = 'hash-mismatch' | 'check-skipped' | 'check-unsupported' | 'unknown-release' | 'other-error';
|
|
27
|
+
export type FirmwareHashCheckError = 'hash-mismatch' | 'check-skipped' | 'check-unsupported' | 'unknown-release' | 'takes-too-long' | 'other-error';
|
|
28
28
|
export type FirmwareHashCheckResult = {
|
|
29
29
|
success: true;
|
|
30
30
|
attemptCount?: number;
|
|
@@ -50,7 +50,7 @@ export type KnownDevice = BaseDevice & {
|
|
|
50
50
|
label: string;
|
|
51
51
|
error?: typeof undefined;
|
|
52
52
|
firmware: DeviceFirmwareStatus;
|
|
53
|
-
|
|
53
|
+
firmwareReleaseConfigInfo?: FirmwareReleaseConfigInfo | null;
|
|
54
54
|
firmwareType?: FirmwareType;
|
|
55
55
|
color?: string;
|
|
56
56
|
status: DeviceStatus;
|
|
@@ -60,8 +60,8 @@ export type KnownDevice = BaseDevice & {
|
|
|
60
60
|
features: PROTO.Features;
|
|
61
61
|
thp?: ThpStateSerialized;
|
|
62
62
|
unavailableCapabilities: UnavailableCapabilities;
|
|
63
|
-
availableTranslations: string
|
|
64
|
-
authenticityChecks
|
|
63
|
+
availableTranslations: Record<string, string>;
|
|
64
|
+
authenticityChecks: {
|
|
65
65
|
firmwareRevision: FirmwareRevisionCheckResult | null;
|
|
66
66
|
firmwareHash: FirmwareHashCheckResult | null;
|
|
67
67
|
};
|
|
@@ -77,10 +77,10 @@ export type UnknownDevice = BaseDevice & {
|
|
|
77
77
|
features?: typeof undefined;
|
|
78
78
|
thp?: ThpStateSerialized;
|
|
79
79
|
firmware?: typeof undefined;
|
|
80
|
-
|
|
80
|
+
firmwareReleaseConfigInfo?: typeof undefined;
|
|
81
81
|
firmwareType?: typeof undefined;
|
|
82
82
|
color?: typeof undefined;
|
|
83
|
-
status?:
|
|
83
|
+
status?: DeviceStatus;
|
|
84
84
|
mode?: typeof undefined;
|
|
85
85
|
_state?: typeof undefined;
|
|
86
86
|
state?: typeof undefined;
|
|
@@ -98,7 +98,7 @@ export type UnreadableDevice = BaseDevice & {
|
|
|
98
98
|
features?: typeof undefined;
|
|
99
99
|
thp?: typeof undefined;
|
|
100
100
|
firmware?: typeof undefined;
|
|
101
|
-
|
|
101
|
+
firmwareReleaseConfigInfo?: typeof undefined;
|
|
102
102
|
firmwareType?: typeof undefined;
|
|
103
103
|
color?: typeof undefined;
|
|
104
104
|
status?: typeof undefined;
|
package/lib/types/firmware.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import type { DeviceModelInternal, FirmwareRelease, VersionArray } from '@trezor/device-utils';
|
|
1
|
+
import type { ConditionalRelease, DeviceModelInternal, FirmwareRelease, FirmwareType, IntermediaryReleaseConfig, VersionArray } from '@trezor/device-utils';
|
|
2
2
|
export type FirmwareRange = Record<DeviceModelInternal, {
|
|
3
3
|
min: string;
|
|
4
4
|
max: string;
|
|
5
5
|
}>;
|
|
6
|
-
export type IntermediaryVersion = 1 | 2 | 3;
|
|
7
|
-
export declare const IntermediaryVersion: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TLiteral<1>, import("@trezor/schema-utils").TLiteral<2>, import("@trezor/schema-utils").TLiteral<3>]>;
|
|
8
|
-
export type ReleaseInfo = {
|
|
9
|
-
changelog: FirmwareRelease[] | null;
|
|
10
|
-
release: FirmwareRelease;
|
|
11
|
-
isRequired: boolean | null;
|
|
12
|
-
isNewer: boolean | null;
|
|
13
|
-
intermediaryVersion?: IntermediaryVersion;
|
|
14
|
-
translations?: string[];
|
|
15
|
-
};
|
|
16
6
|
export type BinaryInfo = {
|
|
17
7
|
binary: ArrayBuffer;
|
|
18
8
|
binaryVersion: VersionArray;
|
|
19
|
-
releaseVersion
|
|
9
|
+
releaseVersion?: VersionArray;
|
|
10
|
+
};
|
|
11
|
+
export type FirmwareReleaseConfigInfo = {
|
|
12
|
+
firmwareType: FirmwareType;
|
|
13
|
+
isBitcoinOnlyAvailable: boolean;
|
|
14
|
+
releaseConditions: ConditionalRelease['conditions'] & {
|
|
15
|
+
shouldBeOffered: boolean;
|
|
16
|
+
};
|
|
17
|
+
release: FirmwareRelease;
|
|
18
|
+
intermediary: IntermediaryReleaseConfig | undefined;
|
|
19
|
+
isRequired: boolean | null;
|
|
20
|
+
isNewer: boolean | null;
|
|
21
|
+
translations?: Record<string, string>;
|
|
20
22
|
};
|
|
23
|
+
export type FirmwareUpdateFlowType = 'reboot_and_wait' | 'reboot_and_upgrade' | 'manual' | 'unknown_flow';
|
|
21
24
|
//# sourceMappingURL=firmware.d.ts.map
|
package/lib/types/firmware.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntermediaryVersion = void 0;
|
|
4
|
-
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
-
exports.IntermediaryVersion = schema_utils_1.Type.Union([schema_utils_1.Type.Literal(1), schema_utils_1.Type.Literal(2), schema_utils_1.Type.Literal(3)]);
|
|
6
3
|
//# sourceMappingURL=firmware.js.map
|
package/lib/types/params.d.ts
CHANGED
package/lib/types/settings.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { BlockchainSettings } from '@trezor/blockchain-link';
|
|
2
|
+
import type { DeviceModelInternal } from '@trezor/device-utils';
|
|
2
3
|
import type { ThpCredentials, ThpPairingMethod } from '@trezor/protocol';
|
|
3
4
|
import type { Transport } from '@trezor/transport';
|
|
5
|
+
import { PartialRecord } from '@trezor/type-utils';
|
|
6
|
+
import { FirmwareUpdateSource } from '../data/firmwareInfo';
|
|
4
7
|
export type { SystemInfo } from '@trezor/connect-common';
|
|
5
8
|
export interface Manifest {
|
|
6
9
|
appName: string;
|
|
@@ -8,6 +11,7 @@ export interface Manifest {
|
|
|
8
11
|
appUrl: string;
|
|
9
12
|
email: string;
|
|
10
13
|
}
|
|
14
|
+
export type FirmwareHashCheckTimeouts = PartialRecord<DeviceModelInternal, number>;
|
|
11
15
|
export type Proxy = BlockchainSettings['proxy'];
|
|
12
16
|
export type LocalFirmwares = {
|
|
13
17
|
firmwareDir: string;
|
|
@@ -16,6 +20,7 @@ export type LocalFirmwares = {
|
|
|
16
20
|
type KnownTransport = Exclude<Transport['name'], 'NativeUsbTransport' | 'BluetoothTransport'>;
|
|
17
21
|
export type ThpSettings = {
|
|
18
22
|
hostName?: string;
|
|
23
|
+
appName?: string;
|
|
19
24
|
staticKey?: string;
|
|
20
25
|
knownCredentials?: ThpCredentials[];
|
|
21
26
|
pairingMethods: ThpPairingMethod[] | (keyof typeof ThpPairingMethod)[];
|
|
@@ -34,6 +39,7 @@ export interface ConnectSettingsPublic {
|
|
|
34
39
|
trustedHost: boolean;
|
|
35
40
|
binFilesBaseUrl?: string;
|
|
36
41
|
enableFirmwareHashCheck?: boolean;
|
|
42
|
+
firmwareHashCheckTimeouts?: FirmwareHashCheckTimeouts;
|
|
37
43
|
thp?: ThpSettings;
|
|
38
44
|
}
|
|
39
45
|
export interface ConnectSettingsInternal {
|
|
@@ -52,6 +58,7 @@ export interface ConnectSettingsInternal {
|
|
|
52
58
|
sharedLogger?: boolean;
|
|
53
59
|
useCoreInPopup?: boolean;
|
|
54
60
|
localFirmwares?: LocalFirmwares;
|
|
61
|
+
firmwareUpdateSource?: FirmwareUpdateSource;
|
|
55
62
|
}
|
|
56
63
|
export interface ConnectSettingsWeb {
|
|
57
64
|
hostLabel?: string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { DeviceModelInternal } from '@trezor/device-utils';
|
|
2
|
-
export declare const
|
|
1
|
+
import { DeviceModelInternal, FirmwareRelease, FirmwareType, VersionArray } from '@trezor/device-utils';
|
|
2
|
+
export declare const getReleasesAssetByDeviceModelAndFirmwareType: (deviceModel: DeviceModelInternal, firmwareType: FirmwareType) => {
|
|
3
|
+
[file: string]: FirmwareRelease;
|
|
4
|
+
};
|
|
5
|
+
export declare const getReleaseAsset: (deviceModel: DeviceModelInternal, version: VersionArray, firmwareType: FirmwareType) => FirmwareRelease;
|
|
3
6
|
export declare const firmwareReleaseConfigAssets: any;
|
|
4
7
|
export declare const tryLocalAssetRequire: (url: string) => any;
|
|
5
8
|
//# sourceMappingURL=assetUtils.d.ts.map
|