@trezor/connect 9.4.2 → 9.4.3-beta.2
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 +90 -9
- package/README.md +1 -1
- package/lib/api/applyFlags.js +1 -1
- package/lib/api/applySettings.js +1 -1
- package/lib/api/authenticateDevice.js +1 -1
- package/lib/api/authorizeCoinjoin.js +1 -1
- package/lib/api/backupDevice.js +1 -1
- package/lib/api/binance/api/binanceGetAddress.js +2 -1
- package/lib/api/binance/api/binanceGetPublicKey.js +2 -1
- package/lib/api/binance/api/binanceSignTransaction.js +2 -1
- package/lib/api/binance/binanceSignTx.js +1 -1
- package/lib/api/bitcoin/Fees.js +2 -2
- package/lib/api/bitcoin/TransactionComposer.d.ts +3 -3
- package/lib/api/bitcoin/TransactionComposer.js +2 -2
- package/lib/api/bitcoin/refTx.js +1 -1
- package/lib/api/blockchainDisconnect.js +1 -1
- package/lib/api/blockchainEvmRpcCall.d.ts +16 -0
- package/lib/api/blockchainEvmRpcCall.js +45 -0
- package/lib/api/cancelCoinjoinAuthorization.js +1 -1
- package/lib/api/cardano/api/cardanoGetAddress.js +2 -1
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +2 -1
- package/lib/api/cardano/api/cardanoGetPublicKey.js +2 -1
- package/lib/api/cardano/api/cardanoSignTransaction.js +2 -1
- package/lib/api/cardano/cardanoAddressParameters.js +1 -1
- package/lib/api/cardano/cardanoAuxiliaryData.js +1 -1
- package/lib/api/cardano/cardanoCertificate.js +1 -1
- package/lib/api/cardano/cardanoInputs.d.ts +8 -8
- package/lib/api/cardano/cardanoInputs.js +1 -1
- package/lib/api/cardano/cardanoOutputs.d.ts +22 -22
- package/lib/api/cardano/cardanoOutputs.js +1 -1
- package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
- package/lib/api/cardano/cardanoTokenBundle.js +1 -1
- package/lib/api/changeLanguage.js +1 -1
- package/lib/api/changePin.js +1 -1
- package/lib/api/cipherKeyValue.js +1 -1
- package/lib/api/common/paramsValidator.js +1 -1
- package/lib/api/composeTransaction.d.ts +9 -3
- package/lib/api/composeTransaction.js +7 -4
- package/lib/api/eos/api/eosGetPublicKey.js +2 -1
- package/lib/api/eos/api/eosSignTransaction.js +2 -1
- package/lib/api/eos/eosSignTx.d.ts +3 -3
- package/lib/api/ethereum/api/ethereumGetAddress.js +2 -1
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +2 -1
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumSignMessage.js +2 -1
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +1 -1
- package/lib/api/ethereum/api/ethereumSignTransaction.js +13 -7
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +58 -57
- package/lib/api/ethereum/api/ethereumSignTypedData.js +3 -2
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +2 -1
- package/lib/api/ethereum/ethereumDefinitions.d.ts +21 -21
- package/lib/api/ethereum/ethereumDefinitions.js +6 -5
- package/lib/api/firmware/getBinary.d.ts +4 -5
- package/lib/api/firmware/getBinary.js +12 -13
- package/lib/api/firmware/getBinaryForFirmwareUpgrade.d.ts +3 -3
- package/lib/api/firmware/getBinaryForFirmwareUpgrade.js +2 -2
- package/lib/api/firmware/index.d.ts +1 -1
- package/lib/api/firmware/index.js +2 -1
- package/lib/api/firmware/x509certificate.js +3 -5
- package/lib/api/getAccountDescriptor.js +1 -1
- package/lib/api/getAddress.js +1 -1
- package/lib/api/getCoinInfo.d.ts +3 -0
- package/lib/api/getCoinInfo.js +1 -1
- package/lib/api/getFirmwareHash.js +1 -1
- package/lib/api/getOwnershipId.js +1 -1
- package/lib/api/getOwnershipProof.js +1 -1
- package/lib/api/getPublicKey.js +1 -1
- package/lib/api/index.d.ts +2 -1
- package/lib/api/index.js +5 -3
- package/lib/api/loadDevice.d.ts +14 -0
- package/lib/api/loadDevice.js +44 -0
- package/lib/api/nem/api/nemGetAddress.js +2 -1
- package/lib/api/nem/api/nemSignTransaction.js +2 -1
- package/lib/api/pushTransaction.js +1 -1
- package/lib/api/rebootToBootloader.js +1 -1
- package/lib/api/recoveryDevice.js +1 -1
- package/lib/api/requestLogin.js +1 -1
- package/lib/api/resetDevice.js +1 -2
- package/lib/api/ripple/api/rippleGetAddress.js +2 -1
- package/lib/api/ripple/api/rippleSignTransaction.js +2 -1
- package/lib/api/setBrightness.js +1 -1
- package/lib/api/setBusy.js +1 -1
- package/lib/api/signMessage.js +1 -1
- package/lib/api/solana/api/solanaGetAddress.js +2 -1
- package/lib/api/solana/api/solanaGetPublicKey.js +2 -1
- package/lib/api/solana/api/solanaSignTransaction.js +2 -1
- package/lib/api/stellar/api/stellarGetAddress.js +2 -1
- package/lib/api/stellar/api/stellarSignTransaction.js +2 -1
- package/lib/api/stellar/stellarSignTx.js +1 -1
- package/lib/api/tezos/api/tezosGetAddress.js +2 -1
- package/lib/api/tezos/api/tezosGetPublicKey.js +2 -1
- package/lib/api/tezos/api/tezosSignTransaction.js +2 -1
- package/lib/api/tezos/tezosSignTx.js +1 -1
- package/lib/api/unlockPath.js +1 -1
- package/lib/api/verifyMessage.js +1 -1
- package/lib/backend/Blockchain.d.ts +3 -0
- package/lib/backend/Blockchain.js +6 -6
- package/lib/constants/errors.d.ts +49 -38
- package/lib/constants/errors.js +10 -0
- package/lib/constants/firmware.d.ts +2 -0
- package/lib/constants/firmware.js +5 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/index.js +4 -1
- package/lib/constants/nem.d.ts +3 -3
- package/lib/constants/utxo.d.ts +3 -0
- package/lib/constants/utxo.js +5 -0
- package/lib/core/AbstractMethod.d.ts +13 -5
- package/lib/core/AbstractMethod.js +50 -24
- package/lib/core/index.js +41 -30
- package/lib/core/onCallFirmwareUpdate.d.ts +2 -2
- package/lib/core/onCallFirmwareUpdate.js +6 -6
- package/lib/data/DataManager.d.ts +0 -181
- package/lib/data/DataManager.js +40 -6
- package/lib/data/analyticsInfo.js +4 -2
- package/lib/data/coinInfo.d.ts +14 -0
- package/lib/data/config.d.ts +20 -22
- package/lib/data/config.js +15 -40
- package/lib/data/connectSettings.js +10 -4
- package/lib/data/deviceAuthenticityConfig.js +20 -0
- package/lib/data/deviceAuthenticityConfigTypes.d.ts +32 -23
- package/lib/data/firmwareInfo.d.ts +1 -1
- package/lib/data/models.d.ts +9 -0
- package/lib/data/models.js +9 -0
- package/lib/data/version.d.ts +2 -1
- package/lib/data/version.js +3 -2
- package/lib/device/Device.d.ts +144 -36
- package/lib/device/Device.js +270 -113
- package/lib/device/DeviceCommands.js +4 -4
- package/lib/device/DeviceList.d.ts +13 -21
- package/lib/device/DeviceList.js +54 -168
- package/lib/device/checkFirmwareRevision.js +4 -4
- package/lib/device/prompts.js +3 -2
- package/lib/device/resolveDescriptorForTaproot.d.ts +1 -1
- package/lib/events/call.d.ts +5 -5
- package/lib/events/call.js +2 -2
- package/lib/events/core.d.ts +4 -3
- package/lib/events/device.d.ts +0 -6
- package/lib/events/device.js +0 -6
- package/lib/events/transport.d.ts +1 -1
- package/lib/factory.d.ts +6 -6
- package/lib/factory.js +132 -136
- package/lib/impl/dynamic.d.ts +33 -0
- package/lib/impl/dynamic.js +75 -0
- package/lib/index-browser.d.ts +3 -1
- package/lib/index-browser.js +0 -3
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -13
- package/lib/types/api/applySettings.d.ts +13 -13
- package/lib/types/api/authenticateDevice.d.ts +33 -24
- package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
- package/lib/types/api/binance/index.d.ts +143 -143
- package/lib/types/api/binance/index.js +1 -1
- package/lib/types/api/bitcoin/index.d.ts +11 -11
- package/lib/types/api/bitcoin/index.js +1 -1
- package/lib/types/api/blockchainEvmRpcCall.d.ts +4 -0
- package/lib/types/api/{checkFirmwareAuthenticity.js → blockchainEvmRpcCall.js} +1 -1
- package/lib/types/api/cancelCoinjoinAuthorization.d.ts +1 -1
- package/lib/types/api/cardano/index.d.ts +507 -507
- package/lib/types/api/changeLanguage.d.ts +6 -6
- package/lib/types/api/cipherKeyValue.d.ts +8 -8
- package/lib/types/api/cipherKeyValue.js +1 -1
- package/lib/types/api/composeTransaction.d.ts +13 -7
- package/lib/types/api/eos/index.d.ts +525 -525
- package/lib/types/api/eos/index.js +1 -1
- package/lib/types/api/ethereum/index.d.ts +100 -100
- package/lib/types/api/firmwareUpdate.d.ts +5 -5
- package/lib/types/api/getAccountDescriptor.d.ts +4 -4
- package/lib/types/api/getAddress.d.ts +32 -32
- package/lib/types/api/getOwnershipId.d.ts +24 -24
- package/lib/types/api/getOwnershipProof.d.ts +28 -28
- package/lib/types/api/getPublicKey.d.ts +24 -24
- package/lib/types/api/getPublicKey.js +1 -1
- package/lib/types/api/index.d.ts +4 -8
- package/lib/types/api/init.d.ts +4 -2
- package/lib/types/api/loadDevice.d.ts +4 -0
- package/lib/types/api/loadDevice.js +3 -0
- package/lib/types/api/nem/index.d.ts +612 -612
- package/lib/types/api/nem/index.js +1 -1
- package/lib/types/api/nemGetAddress.d.ts +6 -6
- package/lib/types/api/pushTransaction.d.ts +3 -3
- package/lib/types/api/recoveryDevice.d.ts +9 -9
- package/lib/types/api/requestLogin.d.ts +25 -25
- package/lib/types/api/ripple/index.d.ts +21 -21
- package/lib/types/api/ripple/index.js +1 -1
- package/lib/types/api/solana/index.d.ts +23 -23
- package/lib/types/api/solana/index.js +1 -1
- package/lib/types/api/stellar/index.d.ts +582 -582
- package/lib/types/api/stellar/index.js +1 -1
- package/lib/types/api/tezos/index.d.ts +120 -120
- package/lib/types/api/tezos/index.js +1 -1
- package/lib/types/api/unlockPath.d.ts +2 -2
- package/lib/types/coinInfo.d.ts +231 -224
- package/lib/types/device.d.ts +33 -14
- package/lib/types/device.js +3 -1
- package/lib/types/fees.d.ts +19 -19
- package/lib/types/firmware.d.ts +1 -1
- package/lib/types/params.d.ts +23 -19
- package/lib/types/settings.d.ts +17 -10
- package/lib/types/utils.d.ts +1 -0
- package/lib/types/utils.js +3 -0
- package/lib/utils/addressUtils.js +2 -2
- package/lib/utils/assetUtils.d.ts +1 -1
- package/lib/utils/assetUtils.js +6 -6
- package/lib/utils/assets.js +1 -1
- package/lib/utils/assets.native.js +1 -1
- package/lib/utils/deviceFeaturesUtils.js +1 -1
- package/lib/utils/proxy-event-emitter.d.ts +21 -0
- package/lib/utils/proxy-event-emitter.js +65 -0
- package/lib/utils/uiPromiseManager.d.ts +2 -1
- package/lib/utils/uiPromiseManager.js +3 -3
- package/package.json +12 -12
- package/lib/api/checkFirmwareAuthenticity.d.ts +0 -11
- package/lib/api/checkFirmwareAuthenticity.js +0 -56
- package/lib/types/api/checkFirmwareAuthenticity.d.ts +0 -11
package/lib/device/Device.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypedEmitter } from '@trezor/utils';
|
|
2
2
|
import { Session } from '@trezor/transport';
|
|
3
3
|
import { TransportProtocol } from '@trezor/protocol';
|
|
4
|
+
import { type Transport, type Descriptor } from '@trezor/transport';
|
|
4
5
|
import { DeviceCommands } from './DeviceCommands';
|
|
5
|
-
import { PROTO
|
|
6
|
+
import { PROTO } from '../constants';
|
|
6
7
|
import { DEVICE, DeviceButtonRequestPayload, UiResponsePin, UiResponsePassphrase, UiResponseWord } from '../events';
|
|
7
|
-
import {
|
|
8
|
-
import { Device as DeviceTyped, DeviceFirmwareStatus, DeviceState, Features, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, KnownDevice } from '../types';
|
|
8
|
+
import { Device as DeviceTyped, DeviceFirmwareStatus, DeviceState, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, FirmwareHashCheckResult, DeviceUniquePath } from '../types';
|
|
9
9
|
import { IStateStorage } from './StateStorage';
|
|
10
10
|
import type { PromptCallback } from './prompts';
|
|
11
11
|
export type RunOptions = {
|
|
@@ -24,50 +24,155 @@ export interface DeviceEvents {
|
|
|
24
24
|
[DEVICE.PASSPHRASE]: (device: Device, callback: PromptCallback<UiResponsePassphrase['payload']>) => void;
|
|
25
25
|
[DEVICE.PASSPHRASE_ON_DEVICE]: () => void;
|
|
26
26
|
[DEVICE.BUTTON]: (device: Device, payload: DeviceButtonRequestPayload) => void;
|
|
27
|
-
[DEVICE.ACQUIRED]: () => void;
|
|
28
27
|
}
|
|
29
|
-
|
|
28
|
+
type DeviceLifecycle = typeof DEVICE.CONNECT | typeof DEVICE.CONNECT_UNACQUIRED | typeof DEVICE.DISCONNECT | typeof DEVICE.CHANGED;
|
|
29
|
+
type DeviceLifecycleListener = (lifecycle: DeviceLifecycle) => void;
|
|
30
|
+
type DeviceParams = {
|
|
31
|
+
id: DeviceUniquePath;
|
|
30
32
|
transport: Transport;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
descriptor: Descriptor;
|
|
34
|
+
listener: DeviceLifecycleListener;
|
|
35
|
+
};
|
|
36
|
+
export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
37
|
+
readonly transport: Transport;
|
|
38
|
+
readonly protocol: TransportProtocol;
|
|
39
|
+
private readonly transportPath;
|
|
40
|
+
private readonly transportSessionOwner;
|
|
41
|
+
private readonly transportDescriptorType;
|
|
42
|
+
private session;
|
|
43
|
+
private lastAcquiredHere;
|
|
44
|
+
private unreadableError?;
|
|
45
|
+
private _firmwareStatus;
|
|
46
|
+
get firmwareStatus(): DeviceFirmwareStatus;
|
|
47
|
+
private _firmwareRelease?;
|
|
48
|
+
get firmwareRelease(): ReleaseInfo | null | undefined;
|
|
49
|
+
private _features;
|
|
50
|
+
get features(): {
|
|
51
|
+
_passphrase_cached?: boolean | undefined;
|
|
52
|
+
busy?: boolean | undefined;
|
|
53
|
+
homescreen_format?: "Toif" | "Jpeg" | "ToiG" | undefined;
|
|
54
|
+
hide_passphrase_from_host?: boolean | undefined;
|
|
55
|
+
unit_color?: number | undefined;
|
|
56
|
+
unit_btconly?: boolean | undefined;
|
|
57
|
+
homescreen_width?: number | undefined;
|
|
58
|
+
homescreen_height?: number | undefined;
|
|
59
|
+
bootloader_locked?: boolean | undefined;
|
|
60
|
+
language_version_matches?: boolean | undefined;
|
|
61
|
+
unit_packaging?: number | undefined;
|
|
62
|
+
haptic_feedback?: boolean | undefined;
|
|
63
|
+
recovery_type?: "NormalRecovery" | "DryRun" | "UnlockRepeatedBackup" | undefined;
|
|
64
|
+
optiga_sec?: number | undefined;
|
|
65
|
+
vendor: string;
|
|
66
|
+
major_version: number;
|
|
67
|
+
minor_version: number;
|
|
68
|
+
patch_version: number;
|
|
69
|
+
bootloader_mode: boolean | null;
|
|
70
|
+
device_id: string | null;
|
|
71
|
+
pin_protection: boolean | null;
|
|
72
|
+
passphrase_protection: boolean | null;
|
|
73
|
+
language: string | null;
|
|
74
|
+
label: string | null;
|
|
75
|
+
initialized: boolean | null;
|
|
76
|
+
revision: string | null;
|
|
77
|
+
bootloader_hash: string | null;
|
|
78
|
+
imported: boolean | null;
|
|
79
|
+
unlocked: boolean | null;
|
|
80
|
+
firmware_present: boolean | null;
|
|
81
|
+
backup_availability: "NotAvailable" | "Required" | "Available" | null;
|
|
82
|
+
flags: number | null;
|
|
83
|
+
model: string;
|
|
84
|
+
fw_major: number | null;
|
|
85
|
+
fw_minor: number | null;
|
|
86
|
+
fw_patch: number | null;
|
|
87
|
+
fw_vendor: string | null;
|
|
88
|
+
unfinished_backup: boolean | null;
|
|
89
|
+
no_backup: boolean | null;
|
|
90
|
+
recovery_status: "Nothing" | "Recovery" | "Backup" | null;
|
|
91
|
+
capabilities: ("Capability_Bitcoin" | "Capability_Bitcoin_like" | "Capability_Binance" | "Capability_Cardano" | "Capability_Crypto" | "Capability_EOS" | "Capability_Ethereum" | "Capability_Lisk" | "Capability_Monero" | "Capability_NEM" | "Capability_Ripple" | "Capability_Stellar" | "Capability_Tezos" | "Capability_U2F" | "Capability_Shamir" | "Capability_ShamirGroups" | "Capability_PassphraseEntry" | "Capability_Solana" | "Capability_Translations" | "Capability_Brightness" | "Capability_Haptic")[];
|
|
92
|
+
backup_type: "Bip39" | "Slip39_Basic" | "Slip39_Advanced" | "Slip39_Single_Extendable" | "Slip39_Basic_Extendable" | "Slip39_Advanced_Extendable" | null;
|
|
93
|
+
sd_card_present: boolean | null;
|
|
94
|
+
sd_protection: boolean | null;
|
|
95
|
+
wipe_code_protection: boolean | null;
|
|
96
|
+
session_id: string | null;
|
|
97
|
+
passphrase_always_on_device: boolean | null;
|
|
98
|
+
safety_checks: "Strict" | "PromptAlways" | "PromptTemporarily" | null;
|
|
99
|
+
auto_lock_delay_ms: number | null;
|
|
100
|
+
display_rotation: number | null;
|
|
101
|
+
experimental_features: boolean | null;
|
|
102
|
+
internal_model: PROTO.DeviceModelInternal;
|
|
103
|
+
};
|
|
104
|
+
private _featuresNeedsReload;
|
|
38
105
|
private acquirePromise?;
|
|
39
106
|
private releasePromise?;
|
|
40
107
|
private runPromise?;
|
|
41
|
-
|
|
42
|
-
keepTransportSession: boolean;
|
|
108
|
+
private keepTransportSession;
|
|
43
109
|
commands?: DeviceCommands;
|
|
44
110
|
private cancelableAction?;
|
|
45
|
-
loaded
|
|
46
|
-
inconsistent
|
|
47
|
-
firstRunPromise
|
|
48
|
-
instance
|
|
111
|
+
private loaded;
|
|
112
|
+
private inconsistent;
|
|
113
|
+
private firstRunPromise;
|
|
114
|
+
private instance;
|
|
49
115
|
private state;
|
|
50
116
|
private stateStorage?;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
private
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
117
|
+
private _unavailableCapabilities;
|
|
118
|
+
get unavailableCapabilities(): Readonly<UnavailableCapabilities>;
|
|
119
|
+
private _firmwareType?;
|
|
120
|
+
get firmwareType(): FirmwareType | undefined;
|
|
121
|
+
private name;
|
|
122
|
+
private color?;
|
|
123
|
+
private availableTranslations;
|
|
124
|
+
private authenticityChecks;
|
|
125
|
+
private readonly uniquePath;
|
|
126
|
+
private readonly emitLifecycle;
|
|
127
|
+
private sessionDfd?;
|
|
128
|
+
constructor({ id, transport, descriptor, listener }: DeviceParams);
|
|
129
|
+
private getSessionChangePromise;
|
|
130
|
+
private waitAndCompareSession;
|
|
131
|
+
acquire(): import("@trezor/transport/lib/types").AsyncResultWithTypedError<Session, "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" | "descriptor not found">;
|
|
132
|
+
release(): Promise<{
|
|
133
|
+
success: false;
|
|
134
|
+
error: "session not found";
|
|
135
|
+
} | {
|
|
136
|
+
success: false;
|
|
137
|
+
error: "Network request failed";
|
|
138
|
+
} | {
|
|
139
|
+
success: false;
|
|
140
|
+
error: "Wrong result type.";
|
|
141
|
+
} | {
|
|
142
|
+
success: false;
|
|
143
|
+
error: "device disconnected during action";
|
|
144
|
+
} | {
|
|
145
|
+
success: false;
|
|
146
|
+
error: "unexpected error";
|
|
147
|
+
} | {
|
|
148
|
+
success: false;
|
|
149
|
+
error: "Aborted by timeout";
|
|
150
|
+
} | {
|
|
151
|
+
success: false;
|
|
152
|
+
error: "Aborted by signal";
|
|
153
|
+
} | {
|
|
154
|
+
success: false;
|
|
155
|
+
error: "This transport can not be used in this environment";
|
|
156
|
+
} | {
|
|
157
|
+
success: false;
|
|
158
|
+
error: "device not found";
|
|
159
|
+
} | {
|
|
160
|
+
success: false;
|
|
161
|
+
error: "Unable to open device";
|
|
162
|
+
} | {
|
|
163
|
+
success: false;
|
|
164
|
+
error: "wrong previous session";
|
|
165
|
+
} | import("@trezor/transport/lib/types").Success<null> | undefined>;
|
|
166
|
+
releaseTransportSession(): void;
|
|
64
167
|
cleanup(): Promise<void>;
|
|
168
|
+
handshake(delay?: number): Promise<void>;
|
|
169
|
+
updateDescriptor(descriptor: Descriptor): Promise<void>;
|
|
65
170
|
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
66
171
|
override(error: Error): Promise<void>;
|
|
67
172
|
setCancelableAction(callback: NonNullable<typeof this.cancelableAction>): void;
|
|
68
173
|
clearCancelableAction(): void;
|
|
69
174
|
interruptionFromUser(error: Error): Promise<void>;
|
|
70
|
-
|
|
175
|
+
usedElsewhere(): void;
|
|
71
176
|
_runInner<X>(fn: (() => Promise<X>) | undefined, options: RunOptions): Promise<void>;
|
|
72
177
|
getCommands(): DeviceCommands;
|
|
73
178
|
setInstance(instance?: number): void;
|
|
@@ -78,6 +183,7 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
78
183
|
initialize(useCardanoDerivation: boolean): Promise<void>;
|
|
79
184
|
initStorage(storage: IStateStorage): void;
|
|
80
185
|
getFeatures(): Promise<void>;
|
|
186
|
+
checkFirmwareHash(): Promise<FirmwareHashCheckResult | null>;
|
|
81
187
|
checkFirmwareRevision(): Promise<void>;
|
|
82
188
|
changeLanguage({ language, binary, }: {
|
|
83
189
|
language?: undefined;
|
|
@@ -91,6 +197,7 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
91
197
|
private _uploadTranslationData;
|
|
92
198
|
private _updateFeatures;
|
|
93
199
|
isUnacquired(): boolean;
|
|
200
|
+
isUnreadable(): boolean;
|
|
94
201
|
disconnect(): Promise<void>;
|
|
95
202
|
isBootloader(): boolean;
|
|
96
203
|
isInitialized(): boolean;
|
|
@@ -104,10 +211,10 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
104
211
|
isRunning(): boolean;
|
|
105
212
|
isLoaded(): boolean;
|
|
106
213
|
waitForFirstRun(): Promise<boolean>;
|
|
107
|
-
|
|
214
|
+
getLocalSession(): Session | null;
|
|
215
|
+
getUniquePath(): DeviceUniquePath;
|
|
108
216
|
isT1(): boolean;
|
|
109
217
|
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
110
|
-
updateDescriptor(descriptor: Descriptor): void;
|
|
111
218
|
dispose(): Promise<{
|
|
112
219
|
success: false;
|
|
113
220
|
error: "session not found";
|
|
@@ -141,8 +248,9 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
141
248
|
} | {
|
|
142
249
|
success: false;
|
|
143
250
|
error: "wrong previous session";
|
|
144
|
-
} | import("@trezor/transport/lib/types").Success<
|
|
251
|
+
} | import("@trezor/transport/lib/types").Success<null> | undefined>;
|
|
145
252
|
getMode(): "normal" | "bootloader" | "initialize" | "seedless";
|
|
146
253
|
toMessageObject(): DeviceTyped;
|
|
147
254
|
}
|
|
255
|
+
export {};
|
|
148
256
|
//# sourceMappingURL=Device.d.ts.map
|