@trezor/connect 9.1.8 → 9.1.10
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 +11 -0
- package/README.md +1 -1
- package/lib/api/applyFlags.d.ts +4 -2
- package/lib/api/applyFlags.js +3 -2
- package/lib/api/applySettings.d.ts +4 -2
- package/lib/api/applySettings.js +3 -13
- package/lib/api/authenticateDevice.js +3 -11
- package/lib/api/authorizeCoinjoin.d.ts +3 -1
- package/lib/api/authorizeCoinjoin.js +3 -11
- package/lib/api/backupDevice.d.ts +3 -1
- package/lib/api/binance/api/binanceGetAddress.d.ts +4 -2
- package/lib/api/binance/api/binanceGetAddress.js +4 -10
- package/lib/api/binance/api/binanceGetPublicKey.d.ts +9 -1
- package/lib/api/binance/api/binanceGetPublicKey.js +3 -5
- package/lib/api/binance/api/binanceSignTransaction.d.ts +4 -1
- package/lib/api/binance/api/binanceSignTransaction.js +5 -6
- package/lib/api/binance/binanceSignTx.d.ts +84 -3
- package/lib/api/binance/binanceSignTx.js +3 -26
- package/lib/api/bitcoin/Fees.d.ts +14 -2
- package/lib/api/bitcoin/TransactionComposer.d.ts +13 -2
- package/lib/api/bitcoin/refTx.d.ts +2 -2
- package/lib/api/bitcoin/refTx.js +22 -24
- package/lib/api/bitcoin/signtxVerify.d.ts +1 -1
- package/lib/api/blockchainDisconnect.d.ts +1 -1
- package/lib/api/blockchainDisconnect.js +3 -2
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +1 -1
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
- package/lib/api/blockchainGetTransactions.d.ts +1 -1
- package/lib/api/cancelCoinjoinAuthorization.d.ts +3 -1
- package/lib/api/cancelCoinjoinAuthorization.js +3 -0
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +4 -2
- package/lib/api/cardano/api/cardanoGetAddress.js +4 -13
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.d.ts +1 -1
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +3 -13
- package/lib/api/cardano/api/cardanoGetPublicKey.d.ts +1 -1
- package/lib/api/cardano/api/cardanoGetPublicKey.js +4 -7
- package/lib/api/cardano/api/cardanoSignTransaction.d.ts +26 -4
- package/lib/api/cardano/api/cardanoSignTransaction.js +15 -46
- package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
- package/lib/api/cardano/cardanoAddressParameters.js +3 -14
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.js +5 -20
- package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
- package/lib/api/cardano/cardanoCertificate.js +20 -59
- package/lib/api/cardano/cardanoInputs.d.ts +20 -8
- package/lib/api/cardano/cardanoInputs.js +18 -14
- package/lib/api/cardano/cardanoOutputs.d.ts +31 -2
- package/lib/api/cardano/cardanoOutputs.js +14 -11
- package/lib/api/cardano/cardanoTokenBundle.d.ts +11 -6
- package/lib/api/cardano/cardanoTokenBundle.js +9 -21
- package/lib/api/changePin.d.ts +4 -2
- package/lib/api/changePin.js +3 -2
- package/lib/api/changeWipeCode.d.ts +3 -1
- package/lib/api/cipherKeyValue.d.ts +5 -1
- package/lib/api/cipherKeyValue.js +13 -21
- package/lib/api/common/paramsValidator.js +5 -4
- package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -1
- package/lib/api/eos/api/eosGetPublicKey.js +3 -6
- package/lib/api/eos/api/eosSignTransaction.js +3 -5
- package/lib/api/eos/eosSignTx.d.ts +160 -2
- package/lib/api/ethereum/api/ethereumGetAddress.js +4 -10
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +21 -1
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +3 -5
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +6 -3
- package/lib/api/ethereum/api/ethereumSignMessage.js +3 -5
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
- package/lib/api/ethereum/api/ethereumSignTransaction.js +3 -25
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +83 -3
- package/lib/api/ethereum/api/ethereumSignTypedData.js +20 -12
- package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +3 -1
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +3 -6
- package/lib/api/ethereum/ethereumDefinitions.d.ts +37 -19
- package/lib/api/ethereum/ethereumDefinitions.js +21 -15
- package/lib/api/ethereum/ethereumSignTx.d.ts +1 -1
- package/lib/api/firmware/getBinary.js +5 -4
- package/lib/api/firmware/modifyFirmware.js +3 -2
- package/lib/api/firmware/uploadFirmware.d.ts +3 -1
- package/lib/api/firmware/verifyAuthenticityProof.js +3 -3
- package/lib/api/firmwareUpdate.js +10 -15
- package/lib/api/getAccountDescriptor.d.ts +2 -2
- package/lib/api/getAccountDescriptor.js +4 -7
- package/lib/api/getAccountInfo.d.ts +8 -8
- package/lib/api/getAddress.d.ts +8 -2
- package/lib/api/getAddress.js +4 -20
- package/lib/api/getCoinInfo.d.ts +117 -2
- package/lib/api/getCoinInfo.js +3 -2
- package/lib/api/getFeatures.d.ts +49 -1
- package/lib/api/getFirmwareHash.d.ts +3 -1
- package/lib/api/getFirmwareHash.js +3 -1
- package/lib/api/getOwnershipId.js +4 -7
- package/lib/api/getOwnershipProof.js +4 -11
- package/lib/api/getPublicKey.d.ts +21 -1
- package/lib/api/getPublicKey.js +4 -18
- package/lib/api/nem/api/nemGetAddress.d.ts +4 -2
- package/lib/api/nem/api/nemGetAddress.js +4 -11
- package/lib/api/nem/api/nemSignTransaction.d.ts +4 -1
- package/lib/api/nem/api/nemSignTransaction.js +3 -5
- package/lib/api/nem/nemSignTx.d.ts +75 -1
- package/lib/api/pushTransaction.js +3 -5
- package/lib/api/rebootToBootloader.d.ts +3 -1
- package/lib/api/recoveryDevice.d.ts +3 -1
- package/lib/api/recoveryDevice.js +3 -12
- package/lib/api/requestLogin.js +7 -9
- package/lib/api/resetDevice.d.ts +3 -1
- package/lib/api/resetDevice.js +3 -12
- package/lib/api/ripple/api/rippleGetAddress.d.ts +4 -2
- package/lib/api/ripple/api/rippleGetAddress.js +4 -10
- package/lib/api/ripple/api/rippleSignTransaction.js +3 -17
- package/lib/api/setBusy.d.ts +3 -1
- package/lib/api/setBusy.js +3 -1
- package/lib/api/showDeviceTutorial.d.ts +3 -1
- package/lib/api/signMessage.d.ts +4 -1
- package/lib/api/signMessage.js +3 -7
- package/lib/api/solana/additionalInfo.js +3 -14
- package/lib/api/solana/api/solanaGetAddress.d.ts +4 -2
- package/lib/api/solana/api/solanaGetAddress.js +4 -7
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +13 -1
- package/lib/api/solana/api/solanaGetPublicKey.js +3 -5
- package/lib/api/solana/api/solanaSignTransaction.js +3 -4
- package/lib/api/stellar/api/stellarGetAddress.d.ts +4 -2
- package/lib/api/stellar/api/stellarGetAddress.js +4 -10
- package/lib/api/stellar/api/stellarSignTransaction.js +3 -5
- package/lib/api/stellar/stellarSignTx.d.ts +5 -3
- package/lib/api/stellar/stellarSignTx.js +3 -15
- package/lib/api/tezos/api/tezosGetAddress.d.ts +4 -2
- package/lib/api/tezos/api/tezosGetAddress.js +4 -10
- package/lib/api/tezos/api/tezosGetPublicKey.d.ts +9 -1
- package/lib/api/tezos/api/tezosGetPublicKey.js +3 -6
- package/lib/api/tezos/api/tezosSignTransaction.d.ts +5 -1
- package/lib/api/tezos/api/tezosSignTransaction.js +3 -5
- package/lib/api/tezos/tezosSignTx.d.ts +70 -2
- package/lib/api/tezos/tezosSignTx.js +3 -44
- package/lib/api/unlockPath.js +3 -4
- package/lib/api/verifyMessage.d.ts +3 -1
- package/lib/api/verifyMessage.js +3 -7
- package/lib/api/wipeDevice.d.ts +3 -1
- package/lib/constants/index.d.ts +1 -1
- package/lib/constants/index.js +1 -1
- package/lib/constants/nem.d.ts +7 -0
- package/lib/constants/nem.js +5 -1
- package/lib/core/AbstractMethod.d.ts +1 -1
- package/lib/core/AbstractMethod.js +4 -3
- package/lib/core/index.js +3 -3
- package/lib/data/coinInfo.d.ts +588 -12
- package/lib/data/coinInfo.js +6 -6
- package/lib/data/config.js +5 -0
- package/lib/data/deviceAuthenticityConfig.d.ts +19 -13
- package/lib/data/deviceAuthenticityConfig.js +23 -1
- package/lib/data/firmwareInfo.js +11 -10
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +2 -6
- package/lib/device/Device.js +8 -27
- package/lib/device/DeviceCommands.d.ts +36 -4
- package/lib/device/DeviceCommands.js +5 -2
- package/lib/device/DeviceList.js +1 -1
- package/lib/events/index.d.ts +1 -0
- package/lib/events/index.js +1 -0
- package/lib/events/ui-promise.d.ts +1 -1
- package/lib/events/webextension.d.ts +7 -0
- package/lib/events/webextension.js +10 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/types/api/applySettings.d.ts +18 -2
- package/lib/types/api/applySettings.js +9 -0
- package/lib/types/api/authenticateDevice.d.ts +22 -5
- package/lib/types/api/authenticateDevice.js +7 -0
- package/lib/types/api/authorizeCoinjoin.d.ts +15 -13
- package/lib/types/api/authorizeCoinjoin.js +15 -0
- package/lib/types/api/binance/index.d.ts +203 -30
- package/lib/types/api/binance/index.js +48 -0
- package/lib/types/api/bitcoin/index.d.ts +18 -15
- package/lib/types/api/bitcoin/index.js +17 -0
- package/lib/types/api/cancelCoinjoinAuthorization.d.ts +5 -4
- package/lib/types/api/cancelCoinjoinAuthorization.js +5 -0
- package/lib/types/api/cardano/index.d.ts +685 -187
- package/lib/types/api/cardano/index.js +208 -0
- package/lib/types/api/cardanoSignTransaction.d.ts +5 -8
- package/lib/types/api/cipherKeyValue.d.ts +12 -11
- package/lib/types/api/cipherKeyValue.js +12 -0
- package/lib/types/api/eos/index.d.ts +783 -116
- package/lib/types/api/eos/index.js +177 -0
- package/lib/types/api/ethereum/index.d.ts +162 -56
- package/lib/types/api/ethereum/index.js +90 -0
- package/lib/types/api/firmwareUpdate.d.ts +11 -11
- package/lib/types/api/firmwareUpdate.js +15 -0
- package/lib/types/api/getAccountDescriptor.d.ts +10 -8
- package/lib/types/api/getAccountDescriptor.js +10 -0
- package/lib/types/api/getAddress.d.ts +42 -9
- package/lib/types/api/getAddress.js +14 -0
- package/lib/types/api/getOwnershipId.d.ts +33 -8
- package/lib/types/api/getOwnershipId.js +10 -0
- package/lib/types/api/getOwnershipProof.d.ts +37 -12
- package/lib/types/api/getOwnershipProof.js +14 -0
- package/lib/types/api/getPublicKey.d.ts +31 -21
- package/lib/types/api/getPublicKey.js +26 -0
- package/lib/types/api/nem/index.d.ts +841 -91
- package/lib/types/api/nem/index.js +130 -0
- package/lib/types/api/pushTransaction.d.ts +6 -4
- package/lib/types/api/pushTransaction.js +6 -0
- package/lib/types/api/recoveryDevice.d.ts +14 -4
- package/lib/types/api/recoveryDevice.js +9 -0
- package/lib/types/api/requestLogin.d.ts +38 -13
- package/lib/types/api/requestLogin.js +15 -0
- package/lib/types/api/resetDevice.d.ts +15 -13
- package/lib/types/api/resetDevice.js +9 -0
- package/lib/types/api/ripple/index.d.ts +40 -22
- package/lib/types/api/ripple/index.js +24 -0
- package/lib/types/api/solana/index.d.ts +42 -21
- package/lib/types/api/solana/index.js +26 -0
- package/lib/types/api/stellar/index.d.ts +890 -180
- package/lib/types/api/stellar/index.js +249 -0
- package/lib/types/api/tezos/index.d.ts +162 -59
- package/lib/types/api/tezos/index.js +61 -0
- package/lib/types/api/unlockPath.d.ts +7 -5
- package/lib/types/api/unlockPath.js +7 -0
- package/lib/types/coinInfo.d.ts +273 -56
- package/lib/types/coinInfo.js +81 -0
- package/lib/types/device.d.ts +1 -1
- package/lib/types/device.js +2 -2
- package/lib/types/fees.d.ts +29 -25
- package/lib/types/fees.js +36 -0
- package/lib/types/firmware.d.ts +1 -0
- package/lib/types/firmware.js +3 -0
- package/lib/types/params.d.ts +26 -17
- package/lib/types/params.js +23 -0
- package/lib/utils/deviceFeaturesUtils.js +5 -4
- package/lib/utils/firmwareUtils.js +5 -4
- package/lib/utils/hdnodeUtils.d.ts +191 -1
- package/lib/utils/pathUtils.d.ts +191 -1
- package/lib/utils/urlUtils.js +3 -3
- package/package.json +10 -9
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
1
|
+
import { Static } from '@trezor/schema-utils';
|
|
2
|
+
export type DeviceAuthenticityConfig = Static<typeof DeviceAuthenticityConfig>;
|
|
3
|
+
export declare const DeviceAuthenticityConfig: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
4
|
+
T2B1: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
5
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
6
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
7
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
8
|
+
debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
9
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
10
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
|
+
}>>;
|
|
12
|
+
}>]>;
|
|
13
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
14
|
+
T1B1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
15
|
+
T2T1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
16
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
17
|
+
version: import("@sinclair/typebox").TNumber;
|
|
18
|
+
timestamp: import("@sinclair/typebox").TString;
|
|
19
|
+
}>]>;
|
|
13
20
|
export declare const deviceAuthenticityConfig: DeviceAuthenticityConfig;
|
|
14
|
-
export {};
|
|
15
21
|
//# sourceMappingURL=deviceAuthenticityConfig.d.ts.map
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deviceAuthenticityConfig = void 0;
|
|
3
|
+
exports.deviceAuthenticityConfig = exports.DeviceAuthenticityConfig = void 0;
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const CertPubKeys = schema_utils_1.Type.Object({
|
|
7
|
+
rootPubKeys: schema_utils_1.Type.Array(schema_utils_1.Type.String()),
|
|
8
|
+
caPubKeys: schema_utils_1.Type.Array(schema_utils_1.Type.String()),
|
|
9
|
+
});
|
|
10
|
+
const ModelPubKeys = schema_utils_1.Type.Intersect([
|
|
11
|
+
schema_utils_1.Type.Record(schema_utils_1.Type.Literal(constants_1.PROTO.DeviceModelInternal.T2B1), schema_utils_1.Type.Intersect([
|
|
12
|
+
CertPubKeys,
|
|
13
|
+
schema_utils_1.Type.Object({
|
|
14
|
+
debug: schema_utils_1.Type.Optional(CertPubKeys),
|
|
15
|
+
}),
|
|
16
|
+
])),
|
|
17
|
+
schema_utils_1.Type.Partial(schema_utils_1.Type.Record(schema_utils_1.Type.Exclude(schema_utils_1.Type.KeyOfEnum(constants_1.PROTO.DeviceModelInternal), schema_utils_1.Type.Literal('T2B1')), schema_utils_1.Type.Undefined())),
|
|
18
|
+
]);
|
|
19
|
+
exports.DeviceAuthenticityConfig = schema_utils_1.Type.Intersect([
|
|
20
|
+
ModelPubKeys,
|
|
21
|
+
schema_utils_1.Type.Object({
|
|
22
|
+
version: schema_utils_1.Type.Number(),
|
|
23
|
+
timestamp: schema_utils_1.Type.String(),
|
|
24
|
+
}),
|
|
25
|
+
]);
|
|
4
26
|
exports.deviceAuthenticityConfig = {
|
|
5
27
|
version: 1,
|
|
6
28
|
timestamp: '2023-12-14T12:00:00+00:00',
|
package/lib/data/firmwareInfo.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getReleases = exports.getRelease = exports.getFirmwareStatus = exports.getInfo = exports.parseFirmware = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const versionUtils = tslib_1.__importStar(require("@trezor/utils/lib/versionUtils"));
|
|
5
6
|
const firmwareUtils_1 = require("../utils/firmwareUtils");
|
|
6
7
|
const types_1 = require("../types");
|
|
7
8
|
const releases = {
|
|
@@ -24,7 +25,7 @@ const getChangelog = (releases, features) => {
|
|
|
24
25
|
return null;
|
|
25
26
|
}
|
|
26
27
|
if (features.firmware_present && features.major_version === 2) {
|
|
27
|
-
return releases.filter(r =>
|
|
28
|
+
return releases.filter(r => versionUtils.isNewer(r.version, [
|
|
28
29
|
features.fw_major,
|
|
29
30
|
features.fw_minor,
|
|
30
31
|
features.fw_patch,
|
|
@@ -32,7 +33,7 @@ const getChangelog = (releases, features) => {
|
|
|
32
33
|
}
|
|
33
34
|
return releases;
|
|
34
35
|
}
|
|
35
|
-
return releases.filter(r =>
|
|
36
|
+
return releases.filter(r => versionUtils.isNewer(r.version, [
|
|
36
37
|
features.major_version,
|
|
37
38
|
features.minor_version,
|
|
38
39
|
features.patch_version,
|
|
@@ -42,7 +43,7 @@ const isNewer = (release, features) => {
|
|
|
42
43
|
if (features.major_version === 1 && features.bootloader_mode) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
+
return versionUtils.isNewer(release.version, [
|
|
46
47
|
features.major_version,
|
|
47
48
|
features.minor_version,
|
|
48
49
|
features.patch_version,
|
|
@@ -53,14 +54,14 @@ const isRequired = (changelog) => {
|
|
|
53
54
|
return null;
|
|
54
55
|
return changelog.some(item => item.required);
|
|
55
56
|
};
|
|
56
|
-
const isEqual = (release, latest) =>
|
|
57
|
+
const isEqual = (release, latest) => versionUtils.isEqual(release.version, latest.version);
|
|
57
58
|
const getT1BootloaderVersion = (releases, features) => {
|
|
58
59
|
const { bootloader_mode, major_version, minor_version, patch_version } = features;
|
|
59
60
|
const versionArray = [major_version, minor_version, patch_version];
|
|
60
61
|
if (bootloader_mode) {
|
|
61
62
|
return versionArray;
|
|
62
63
|
}
|
|
63
|
-
const release = releases.find(({ version }) =>
|
|
64
|
+
const release = releases.find(({ version }) => versionUtils.isEqual(version, versionArray));
|
|
64
65
|
return (release === null || release === void 0 ? void 0 : release.bootloader_version) || [1, 0, 0];
|
|
65
66
|
};
|
|
66
67
|
const getIntermediaryVersion = (releases, features, offerLatest) => {
|
|
@@ -68,10 +69,10 @@ const getIntermediaryVersion = (releases, features, offerLatest) => {
|
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
71
|
const bootloaderVersion = getT1BootloaderVersion(releases, features);
|
|
71
|
-
if (
|
|
72
|
+
if (versionUtils.isNewerOrEqual(bootloaderVersion, [1, 12, 0])) {
|
|
72
73
|
return 3;
|
|
73
74
|
}
|
|
74
|
-
if (
|
|
75
|
+
if (versionUtils.isNewerOrEqual(bootloaderVersion, [1, 8, 0])) {
|
|
75
76
|
return 2;
|
|
76
77
|
}
|
|
77
78
|
return 1;
|
|
@@ -79,12 +80,12 @@ const getIntermediaryVersion = (releases, features, offerLatest) => {
|
|
|
79
80
|
const getSafeReleases = ({ features, releases }) => {
|
|
80
81
|
const { bootloader_mode, major_version, minor_version, patch_version, fw_major, fw_minor, fw_patch, } = features;
|
|
81
82
|
const firmwareVersion = [major_version, minor_version, patch_version];
|
|
82
|
-
if (!
|
|
83
|
+
if (!versionUtils.isVersionArray(firmwareVersion)) {
|
|
83
84
|
return [];
|
|
84
85
|
}
|
|
85
86
|
if (major_version === 2 && bootloader_mode) {
|
|
86
87
|
const fwVersion = [fw_major, fw_minor, fw_patch];
|
|
87
|
-
if (
|
|
88
|
+
if (versionUtils.isVersionArray(fwVersion)) {
|
|
88
89
|
return (0, firmwareUtils_1.filterSafeListByFirmware)(releases, fwVersion);
|
|
89
90
|
}
|
|
90
91
|
return (0, firmwareUtils_1.filterSafeListByBootloader)(releases, firmwareVersion);
|
package/lib/data/version.d.ts
CHANGED
package/lib/data/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_DOMAIN = exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '9.1.
|
|
4
|
+
exports.VERSION = '9.1.10';
|
|
5
5
|
const versionN = exports.VERSION.split('.').map(s => parseInt(s, 10));
|
|
6
6
|
exports.DEFAULT_DOMAIN = `https://connect.trezor.io/${versionN[0]}/`;
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
package/lib/device/Device.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedEmitter } from '@trezor/utils/lib/typedEventEmitter';
|
|
2
|
-
import { Deferred } from '@trezor/utils';
|
|
2
|
+
import { Deferred } from '@trezor/utils/lib/createDeferred';
|
|
3
3
|
import { TransportProtocol } from '@trezor/protocol';
|
|
4
4
|
import { DeviceCommands } from './DeviceCommands';
|
|
5
5
|
import { PROTO, NETWORK } from '../constants';
|
|
@@ -89,13 +89,9 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
89
89
|
getDevicePath(): string;
|
|
90
90
|
isT1(): boolean;
|
|
91
91
|
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
92
|
-
dispose(): import("
|
|
92
|
+
dispose(): import("@trezor/transport/lib/types").AbortableCall<void, "Network request failed" | "Wrong result type." | "device disconnected during action" | "unexpected error" | "Aborted by timeout" | "Aborted by signal" | "This transport can not be used in this environment" | "device not found" | "Unable to open device" | "wrong previous session" | "session not found"> | undefined;
|
|
93
93
|
getMode(): "normal" | "bootloader" | "initialize" | "seedless";
|
|
94
94
|
toMessageObject(): DeviceTyped;
|
|
95
|
-
_getNetworkTypeState(): "binance" | "cardano" | "eos" | "ethereum" | "nem" | "ripple" | "solana" | "stellar" | "tezos" | "bitcoin";
|
|
96
|
-
_setNetworkTypeState(networkType?: NETWORK.NetworkType): void;
|
|
97
|
-
_altModeChange(networkType?: NETWORK.NetworkType): boolean;
|
|
98
|
-
_isAltModeNetworkType(networkType?: keyof typeof NETWORK.TYPES): boolean;
|
|
99
95
|
legacyForceRelease(): Promise<void>;
|
|
100
96
|
}
|
|
101
97
|
//# sourceMappingURL=Device.d.ts.map
|
package/lib/device/Device.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Device = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const typedEventEmitter_1 = require("@trezor/utils/lib/typedEventEmitter");
|
|
5
|
-
const
|
|
6
|
+
const createDeferred_1 = require("@trezor/utils/lib/createDeferred");
|
|
7
|
+
const versionUtils = tslib_1.__importStar(require("@trezor/utils/lib/versionUtils"));
|
|
6
8
|
const protocol_1 = require("@trezor/protocol");
|
|
7
9
|
const DeviceCommands_1 = require("./DeviceCommands");
|
|
8
10
|
const constants_1 = require("../constants");
|
|
@@ -42,7 +44,7 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
42
44
|
}
|
|
43
45
|
this.transport = transport;
|
|
44
46
|
this.originalDescriptor = descriptor;
|
|
45
|
-
this.firstRunPromise = (0,
|
|
47
|
+
this.firstRunPromise = (0, createDeferred_1.createDeferred)();
|
|
46
48
|
}
|
|
47
49
|
static fromDescriptor(transport, originalDescriptor) {
|
|
48
50
|
const descriptor = { ...originalDescriptor, session: null };
|
|
@@ -122,7 +124,7 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
122
124
|
throw constants_1.ERRORS.TypedError('Device_CallInProgress');
|
|
123
125
|
}
|
|
124
126
|
options = parseRunOptions(options);
|
|
125
|
-
const runPromise = (0,
|
|
127
|
+
const runPromise = (0, createDeferred_1.createDeferred)();
|
|
126
128
|
this.runPromise = runPromise;
|
|
127
129
|
this._runInner(fn, options).catch(err => {
|
|
128
130
|
runPromise.reject(err);
|
|
@@ -267,8 +269,7 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
267
269
|
return;
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
|
-
const
|
|
271
|
-
const expectedState = altMode ? undefined : this.getExternalState();
|
|
272
|
+
const expectedState = this.getExternalState();
|
|
272
273
|
const state = await this.getCommands().getDeviceState(networkType);
|
|
273
274
|
const uniqueState = `${state}@${this.features.device_id || 'device_id'}:${this.instance}`;
|
|
274
275
|
if (!this.useLegacyPassphrase() && this.features.session_id) {
|
|
@@ -330,7 +331,7 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
330
331
|
feat.minor_version,
|
|
331
332
|
feat.patch_version,
|
|
332
333
|
];
|
|
333
|
-
if (!
|
|
334
|
+
if (!versionUtils.isEqual(version, this.getVersion())) {
|
|
334
335
|
this.unavailableCapabilities = (0, deviceFeaturesUtils_1.getUnavailableCapabilities)(feat, (0, coinInfo_1.getAllNetworks)());
|
|
335
336
|
this.firmwareStatus = (0, firmwareInfo_1.getFirmwareStatus)(feat);
|
|
336
337
|
this.firmwareRelease = (0, firmwareInfo_1.getRelease)(feat);
|
|
@@ -397,7 +398,7 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
397
398
|
if (!this.features)
|
|
398
399
|
return false;
|
|
399
400
|
const modelVersion = typeof versions === 'string' ? versions : versions[this.features.major_version - 1];
|
|
400
|
-
return
|
|
401
|
+
return versionUtils.isNewerOrEqual(this.getVersion().join('.'), modelVersion);
|
|
401
402
|
}
|
|
402
403
|
isUsed() {
|
|
403
404
|
return typeof this.originalDescriptor.session === 'string';
|
|
@@ -506,26 +507,6 @@ class Device extends typedEventEmitter_1.TypedEmitter {
|
|
|
506
507
|
unavailableCapabilities: this.unavailableCapabilities,
|
|
507
508
|
};
|
|
508
509
|
}
|
|
509
|
-
_getNetworkTypeState() {
|
|
510
|
-
return this.networkTypeState[this.instance];
|
|
511
|
-
}
|
|
512
|
-
_setNetworkTypeState(networkType) {
|
|
513
|
-
if (typeof networkType !== 'string') {
|
|
514
|
-
delete this.networkTypeState[this.instance];
|
|
515
|
-
}
|
|
516
|
-
else {
|
|
517
|
-
this.networkTypeState[this.instance] = networkType;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
_altModeChange(networkType) {
|
|
521
|
-
const prevAltMode = this._isAltModeNetworkType(this._getNetworkTypeState());
|
|
522
|
-
const nextAltMode = this._isAltModeNetworkType(networkType);
|
|
523
|
-
this._setNetworkTypeState(networkType);
|
|
524
|
-
return prevAltMode !== nextAltMode;
|
|
525
|
-
}
|
|
526
|
-
_isAltModeNetworkType(networkType) {
|
|
527
|
-
return networkType ? ['cardano'].includes(networkType) : false;
|
|
528
|
-
}
|
|
529
510
|
async legacyForceRelease() {
|
|
530
511
|
if (this.isUsedHere()) {
|
|
531
512
|
await this.acquire();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Transport
|
|
1
|
+
import { Transport } from '@trezor/transport';
|
|
2
|
+
import * as Messages from '@trezor/protobuf/lib/messages-schema';
|
|
2
3
|
import type { Device } from './Device';
|
|
3
4
|
import type { CoinInfo, BitcoinNetworkInfo } from '../types';
|
|
4
5
|
import type { HDNodeResponse } from '../types/api/getPublicKey';
|
|
@@ -29,13 +30,44 @@ export declare class DeviceCommands {
|
|
|
29
30
|
dispose(): void;
|
|
30
31
|
isDisposed(): boolean;
|
|
31
32
|
unlockPath(params?: Messages.UnlockPath): Promise<TypedResponseMessage<"UnlockedPathRequest">>;
|
|
32
|
-
getPublicKey(params: Messages.GetPublicKey, unlockPath?: Messages.UnlockPath): Promise<
|
|
33
|
+
getPublicKey(params: Messages.GetPublicKey, unlockPath?: Messages.UnlockPath): Promise<{
|
|
34
|
+
root_fingerprint?: number | undefined;
|
|
35
|
+
node: {
|
|
36
|
+
private_key?: string | undefined;
|
|
37
|
+
public_key: string;
|
|
38
|
+
depth: number;
|
|
39
|
+
fingerprint: number;
|
|
40
|
+
child_num: number;
|
|
41
|
+
chain_code: string;
|
|
42
|
+
};
|
|
43
|
+
xpub: string;
|
|
44
|
+
}>;
|
|
33
45
|
getHDNode(params: Messages.GetPublicKey, options?: {
|
|
34
46
|
coinInfo?: BitcoinNetworkInfo;
|
|
35
47
|
validation?: boolean;
|
|
36
48
|
unlockPath?: Messages.UnlockPath;
|
|
37
|
-
}): Promise<
|
|
38
|
-
|
|
49
|
+
}): Promise<{
|
|
50
|
+
xpubSegwit?: string | undefined;
|
|
51
|
+
path: number[];
|
|
52
|
+
publicKey: string;
|
|
53
|
+
serializedPath: string;
|
|
54
|
+
depth: number;
|
|
55
|
+
fingerprint: number;
|
|
56
|
+
chainCode: string;
|
|
57
|
+
childNum: number;
|
|
58
|
+
xpub: string;
|
|
59
|
+
}>;
|
|
60
|
+
getBitcoinHDNode(path: number[], coinInfo?: BitcoinNetworkInfo, validation?: boolean): Promise<{
|
|
61
|
+
xpubSegwit?: string | undefined;
|
|
62
|
+
path: number[];
|
|
63
|
+
publicKey: string;
|
|
64
|
+
serializedPath: string;
|
|
65
|
+
depth: number;
|
|
66
|
+
fingerprint: number;
|
|
67
|
+
chainCode: string;
|
|
68
|
+
childNum: number;
|
|
69
|
+
xpub: string;
|
|
70
|
+
}>;
|
|
39
71
|
getAddress({ address_n, show_display, multisig, script_type, chunkify }: Messages.GetAddress, coinInfo: BitcoinNetworkInfo): Promise<{
|
|
40
72
|
path: number[];
|
|
41
73
|
serializedPath: string;
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeviceCommands = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const crypto_1 = require("crypto");
|
|
6
|
-
const
|
|
6
|
+
const Messages = tslib_1.__importStar(require("@trezor/protobuf/lib/messages-schema"));
|
|
7
|
+
const versionUtils = tslib_1.__importStar(require("@trezor/utils/lib/versionUtils"));
|
|
7
8
|
const constants_1 = require("../constants");
|
|
8
9
|
const events_1 = require("../events");
|
|
9
10
|
const hdnodeUtils = tslib_1.__importStar(require("../utils/hdnodeUtils"));
|
|
@@ -11,6 +12,7 @@ const pathUtils_1 = require("../utils/pathUtils");
|
|
|
11
12
|
const accountUtils_1 = require("../utils/accountUtils");
|
|
12
13
|
const coinInfo_1 = require("../data/coinInfo");
|
|
13
14
|
const debug_1 = require("../utils/debug");
|
|
15
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
14
16
|
const logger = (0, debug_1.initLog)('DeviceCommands');
|
|
15
17
|
const assertType = (res, resType) => {
|
|
16
18
|
const splitResTypes = Array.isArray(resType) ? resType : resType.split('|');
|
|
@@ -262,6 +264,7 @@ class DeviceCommands {
|
|
|
262
264
|
if (this.disposed) {
|
|
263
265
|
throw constants_1.ERRORS.TypedError('Runtime', 'typedCall: DeviceCommands already disposed');
|
|
264
266
|
}
|
|
267
|
+
(0, schema_utils_1.Assert)(Messages.MessageType.properties[type], msg !== null && msg !== void 0 ? msg : {});
|
|
265
268
|
const response = await this._commonCall(type, msg);
|
|
266
269
|
try {
|
|
267
270
|
assertType(response, resType);
|
|
@@ -508,7 +511,7 @@ class DeviceCommands {
|
|
|
508
511
|
return;
|
|
509
512
|
}
|
|
510
513
|
const { name, version } = this.transport;
|
|
511
|
-
if (name === 'BridgeTransport' && !
|
|
514
|
+
if (name === 'BridgeTransport' && !versionUtils.isNewer(version, '2.0.28')) {
|
|
512
515
|
try {
|
|
513
516
|
await this.device.legacyForceRelease();
|
|
514
517
|
}
|
package/lib/device/DeviceList.js
CHANGED
|
@@ -59,7 +59,7 @@ class DeviceList extends typedEventEmitter_1.TypedEmitter {
|
|
|
59
59
|
throw constants_1.ERRORS.TypedError('Runtime', `DeviceList.init: transports[] of unexpected type: ${transportType}`);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
else if (
|
|
62
|
+
else if ((0, transport_1.isTransportInstance)(transportType)) {
|
|
63
63
|
if (!transportType.getMessage()) {
|
|
64
64
|
transportType.updateMessages(this.messages);
|
|
65
65
|
}
|
package/lib/events/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './transport';
|
|
|
8
8
|
export * from './ui-promise';
|
|
9
9
|
export * from './ui-request';
|
|
10
10
|
export * from './ui-response';
|
|
11
|
+
export * from './webextension';
|
|
11
12
|
export declare const UI: {
|
|
12
13
|
readonly RECEIVE_PERMISSION: "ui-receive_permission";
|
|
13
14
|
readonly RECEIVE_CONFIRMATION: "ui-receive_confirmation";
|
package/lib/events/index.js
CHANGED
|
@@ -14,6 +14,7 @@ tslib_1.__exportStar(require("./transport"), exports);
|
|
|
14
14
|
tslib_1.__exportStar(require("./ui-promise"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./ui-request"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./ui-response"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./webextension"), exports);
|
|
17
18
|
exports.UI = {
|
|
18
19
|
...ui_request_1.UI_REQUEST,
|
|
19
20
|
...ui_response_1.UI_RESPONSE,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WEBEXTENSION = void 0;
|
|
4
|
+
exports.WEBEXTENSION = {
|
|
5
|
+
USB_PERMISSIONS_BROADCAST: 'usb-permissions',
|
|
6
|
+
USB_PERMISSIONS_INIT: 'usb-permissions-init',
|
|
7
|
+
USB_PERMISSIONS_CLOSE: 'usb-permissions-close',
|
|
8
|
+
USB_PERMISSIONS_FINISHED: 'usb-permissions-finished',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=webextension.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
|
-
import { Deferred } from '@trezor/utils';
|
|
3
|
+
import { Deferred } from '@trezor/utils/lib/createDeferred';
|
|
4
4
|
export declare const eventEmitter: EventEmitter;
|
|
5
5
|
export declare const messagePromises: {
|
|
6
6
|
[key: number]: Deferred<any>;
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.messagePromises = exports.eventEmitter = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const events_1 = tslib_1.__importDefault(require("events"));
|
|
6
|
-
const
|
|
6
|
+
const createDeferred_1 = require("@trezor/utils/lib/createDeferred");
|
|
7
7
|
const core_1 = require("./core");
|
|
8
8
|
const factory_1 = require("./factory");
|
|
9
9
|
const connectSettings_1 = require("./data/connectSettings");
|
|
@@ -82,7 +82,7 @@ function postMessage(message, usePromise = true) {
|
|
|
82
82
|
}
|
|
83
83
|
if (usePromise) {
|
|
84
84
|
_messageID++;
|
|
85
|
-
exports.messagePromises[_messageID] = (0,
|
|
85
|
+
exports.messagePromises[_messageID] = (0, createDeferred_1.createDeferred)();
|
|
86
86
|
const { promise } = exports.messagePromises[_messageID];
|
|
87
87
|
_core.handleMessage({ ...message, id: _messageID });
|
|
88
88
|
return promise;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Static } from '@trezor/schema-utils';
|
|
2
|
+
import { PROTO } from '../../constants';
|
|
2
3
|
import type { Params, Response } from '../params';
|
|
3
|
-
export
|
|
4
|
+
export type ApplySettings = Static<typeof ApplySettings>;
|
|
5
|
+
export declare const ApplySettings: import("@sinclair/typebox").TObject<{
|
|
6
|
+
passphrase_source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
7
|
+
language: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
use_passphrase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
10
|
+
homescreen: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
|
+
_passphrase_source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
12
|
+
auto_lock_delay_ms: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
13
|
+
display_rotation: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
14
|
+
passphrase_always_on_device: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
15
|
+
safety_checks: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/keyof-enum").TKeyOfEnum<typeof PROTO.Enum_SafetyCheckLevel>>;
|
|
16
|
+
experimental_features: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
17
|
+
hide_passphrase_from_host: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function applySettings(params: Params<ApplySettings>): Response<PROTO.Success>;
|
|
4
20
|
//# sourceMappingURL=applySettings.d.ts.map
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplySettings = void 0;
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.ApplySettings = schema_utils_1.Type.Composite([
|
|
7
|
+
constants_1.PROTO.ApplySettings,
|
|
8
|
+
schema_utils_1.Type.Object({
|
|
9
|
+
passphrase_source: schema_utils_1.Type.Optional(schema_utils_1.Type.Number()),
|
|
10
|
+
}),
|
|
11
|
+
]);
|
|
3
12
|
//# sourceMappingURL=applySettings.js.map
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Static } from '@trezor/schema-utils';
|
|
2
2
|
import type { Params, Response } from '../params';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type AuthenticateDeviceParams = Static<typeof AuthenticateDeviceParams>;
|
|
4
|
+
export declare const AuthenticateDeviceParams: import("@sinclair/typebox").TObject<{
|
|
5
|
+
config: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
6
|
+
T2B1: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
7
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
8
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
9
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
10
|
+
debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
11
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
12
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
13
|
+
}>>;
|
|
14
|
+
}>]>;
|
|
15
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
16
|
+
T1B1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
17
|
+
T2T1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
18
|
+
}>]>, import("@sinclair/typebox").TObject<{
|
|
19
|
+
version: import("@sinclair/typebox").TNumber;
|
|
20
|
+
timestamp: import("@sinclair/typebox").TString;
|
|
21
|
+
}>]>>;
|
|
22
|
+
allowDebugKeys: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
23
|
+
}>;
|
|
7
24
|
export type AuthenticateDeviceResult = {
|
|
8
25
|
valid: true;
|
|
9
26
|
caPubKey: string;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticateDeviceParams = void 0;
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const deviceAuthenticityConfig_1 = require("../../data/deviceAuthenticityConfig");
|
|
6
|
+
exports.AuthenticateDeviceParams = schema_utils_1.Type.Object({
|
|
7
|
+
config: schema_utils_1.Type.Optional(deviceAuthenticityConfig_1.DeviceAuthenticityConfig),
|
|
8
|
+
allowDebugKeys: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
9
|
+
});
|
|
3
10
|
//# sourceMappingURL=authenticateDevice.js.map
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import type { Params, Response } from '../params';
|
|
2
|
+
import { Static } from '@trezor/schema-utils';
|
|
3
|
+
import { PROTO } from '../../constants';
|
|
4
|
+
export type AuthorizeCoinjoin = Static<typeof AuthorizeCoinjoin>;
|
|
5
|
+
export declare const AuthorizeCoinjoin: import("@sinclair/typebox").TObject<{
|
|
6
|
+
path: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>;
|
|
7
|
+
coordinator: import("@sinclair/typebox").TString;
|
|
8
|
+
maxRounds: import("@sinclair/typebox").TNumber;
|
|
9
|
+
maxCoordinatorFeeRate: import("@sinclair/typebox").TNumber;
|
|
10
|
+
maxFeePerKvbyte: import("@sinclair/typebox").TNumber;
|
|
11
|
+
coin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
+
scriptType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"SPENDADDRESS">, import("@sinclair/typebox").TLiteral<"SPENDMULTISIG">, import("@sinclair/typebox").TLiteral<"SPENDWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDP2SHWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDTAPROOT">]>>;
|
|
13
|
+
amountUnit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof PROTO.AmountUnit>>;
|
|
14
|
+
preauthorized: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
15
|
+
}>;
|
|
14
16
|
export declare function authorizeCoinjoin(params: Params<AuthorizeCoinjoin>): Response<PROTO.Success>;
|
|
15
17
|
//# sourceMappingURL=authorizeCoinjoin.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizeCoinjoin = void 0;
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const params_1 = require("../params");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
exports.AuthorizeCoinjoin = schema_utils_1.Type.Object({
|
|
8
|
+
path: params_1.DerivationPath,
|
|
9
|
+
coordinator: schema_utils_1.Type.String(),
|
|
10
|
+
maxRounds: schema_utils_1.Type.Number(),
|
|
11
|
+
maxCoordinatorFeeRate: schema_utils_1.Type.Number(),
|
|
12
|
+
maxFeePerKvbyte: schema_utils_1.Type.Number(),
|
|
13
|
+
coin: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
|
|
14
|
+
scriptType: schema_utils_1.Type.Optional(constants_1.PROTO.InternalInputScriptType),
|
|
15
|
+
amountUnit: schema_utils_1.Type.Optional(constants_1.PROTO.EnumAmountUnit),
|
|
16
|
+
preauthorized: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
17
|
+
});
|
|
3
18
|
//# sourceMappingURL=authorizeCoinjoin.js.map
|