@trezor/connect 9.6.5-beta.1 → 9.7.0-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 +10 -13
- package/README.md +1 -1
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +2 -0
- package/lib/api/ethereum/api/ethereumSignTypedData.js +10 -0
- package/lib/api/evoluGetDelegatedIdentityKey.d.ts +11 -0
- package/lib/api/evoluGetDelegatedIdentityKey.js +37 -0
- package/lib/api/evoluGetNode.js +3 -1
- package/lib/api/evoluSignRegistrationRequest.d.ts +12 -0
- package/lib/api/evoluSignRegistrationRequest.js +30 -0
- package/lib/api/getFeatures.d.ts +4 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +6 -2
- package/lib/api/monero/api/moneroGetAddress.js +18 -3
- package/lib/data/config.js +9 -5
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +4 -0
- package/lib/device/DeviceCurrentSession.d.ts +146 -56
- package/lib/device/checkFirmwareRevision.js +2 -1
- package/lib/device/thp/session.js +1 -1
- package/lib/device/workflow/trezorPushNotification.js +1 -0
- package/lib/device/workflow/validateState.js +12 -5
- package/lib/factory.js +2 -0
- package/lib/impl/core-in-module.d.ts +0 -2
- package/lib/impl/core-in-module.js +2 -23
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/lib/types/api/applySettings.d.ts +1 -1
- package/lib/types/api/ethereum/index.d.ts +4 -0
- package/lib/types/api/ethereum/index.js +2 -0
- package/lib/types/api/evoluGetDelegatedIdentityKey.d.ts +9 -0
- package/lib/types/api/evoluGetDelegatedIdentityKey.js +3 -0
- package/lib/types/api/evoluSignRegistrationRequest.d.ts +4 -0
- package/lib/types/api/evoluSignRegistrationRequest.js +3 -0
- package/lib/types/api/index.d.ts +4 -0
- package/lib/types/device.d.ts +4 -0
- package/lib/types/device.js +3 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
| Package | Stable | Canary |
|
|
2
2
|
| :------------------------------: | :----: | :----------: |
|
|
3
|
-
| npm @trezor/connect | 9.6.4 | 9.
|
|
4
|
-
| npm @trezor/connect-web | 9.6.4 | 9.
|
|
5
|
-
| npm @trezor/connect-webextension | 9.6.4 | 9.
|
|
6
|
-
| npm @trezor/connect-mobile | 9.6.4 | 9.
|
|
3
|
+
| npm @trezor/connect | 9.6.4 | 9.7.0-beta.1 |
|
|
4
|
+
| npm @trezor/connect-web | 9.6.4 | 9.7.0-beta.1 |
|
|
5
|
+
| npm @trezor/connect-webextension | 9.6.4 | 9.7.0-beta.1 |
|
|
6
|
+
| npm @trezor/connect-mobile | 9.6.4 | 9.7.0-beta.1 |
|
|
7
7
|
|
|
8
8
|
| Deployment | Stable | Canary |
|
|
9
9
|
| :----------------: | :----: | :----------: |
|
|
10
|
-
| connect.trezor.io/ | 9.6.4 | 9.
|
|
10
|
+
| connect.trezor.io/ | 9.6.4 | 9.7.0-beta.1 |
|
|
11
11
|
|
|
12
12
|
Use the persistent link [connect.trezor.io/9](https://connect.trezor.io/9/) to access the latest stable version of Connect Explorer.
|
|
13
13
|
|
|
14
|
-
# 9.
|
|
14
|
+
# 9.7.0-beta.1
|
|
15
15
|
|
|
16
|
-
This release
|
|
16
|
+
This release enables a new flow that replaces the old popup with web-based Suite. It allows for TS7 support on the web and provides an improved UI, consistent with Suite Desktop.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
feat(connect): use existing message channels for suite web (314464a)
|
|
22
|
-
feat(connect-explorer): suite web popup setting (9252ce3)
|
|
23
|
-
feat(connect): suite web popup implementation (6bafb1e)
|
|
18
|
+
Additionally, Monero support has been added to Connect APIs.
|
|
19
|
+
|
|
20
|
+
If you encounter any issues with the new flow, please let us know.
|
|
24
21
|
|
|
25
22
|
# 9.6.4
|
|
26
23
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @trezor/connect
|
|
2
2
|
|
|
3
|
-
API version 9.
|
|
3
|
+
API version 9.7.0-beta.1
|
|
4
4
|
|
|
5
5
|
[](https://github.com/trezor/trezor-suite/actions/workflows/test-connect.yml)
|
|
6
6
|
[](https://www.npmjs.org/package/@trezor/connect)
|
|
@@ -26,6 +26,7 @@ declare const Params: import("@trezor/schema-utils").TIntersect<[import("@trezor
|
|
|
26
26
|
message: import("@trezor/schema-utils").TObject<{}>;
|
|
27
27
|
}>;
|
|
28
28
|
metamask_v4_compat: import("@trezor/schema-utils").TBoolean;
|
|
29
|
+
show_message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
29
30
|
domain_separator_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
|
|
30
31
|
message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
|
|
31
32
|
}>, import("@trezor/schema-utils").TObject<{
|
|
@@ -47,6 +48,7 @@ declare const Params: import("@trezor/schema-utils").TIntersect<[import("@trezor
|
|
|
47
48
|
message: import("@trezor/schema-utils").TObject<{}>;
|
|
48
49
|
}>;
|
|
49
50
|
metamask_v4_compat: import("@trezor/schema-utils").TBoolean;
|
|
51
|
+
show_message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
50
52
|
domain_separator_hash: import("@trezor/schema-utils").TString;
|
|
51
53
|
message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
52
54
|
}>]>, import("@trezor/schema-utils").TObject<{
|
|
@@ -61,6 +61,12 @@ class EthereumSignTypedData extends AbstractMethod_1.AbstractMethod {
|
|
|
61
61
|
throw constants_1.ERRORS.TypedError('Method_InvalidParameter', 'message_hash should be empty when data.primaryType=EIP712Domain');
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
if (payload.show_message_hash !== undefined) {
|
|
65
|
+
this.params.show_message_hash = payload.show_message_hash;
|
|
66
|
+
}
|
|
67
|
+
else if (this.params.data.primaryType === 'SafeTx') {
|
|
68
|
+
this.params.show_message_hash = true;
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
async initAsync() {
|
|
66
72
|
if (this.params.network)
|
|
@@ -82,6 +88,7 @@ class EthereumSignTypedData extends AbstractMethod_1.AbstractMethod {
|
|
|
82
88
|
'should_show_struct',
|
|
83
89
|
'should_show_array',
|
|
84
90
|
'confirm_typed_value',
|
|
91
|
+
'confirm_message_hash',
|
|
85
92
|
'confirm_empty_typed_message',
|
|
86
93
|
'confirm_typed_data_final',
|
|
87
94
|
].includes(name)) ||
|
|
@@ -126,6 +133,9 @@ class EthereumSignTypedData extends AbstractMethod_1.AbstractMethod {
|
|
|
126
133
|
primary_type: primaryType,
|
|
127
134
|
metamask_v4_compat,
|
|
128
135
|
definitions,
|
|
136
|
+
show_message_hash: this.params.show_message_hash
|
|
137
|
+
? this.params.message_hash
|
|
138
|
+
: undefined,
|
|
129
139
|
});
|
|
130
140
|
while (response.type === 'EthereumTypedDataStructRequest') {
|
|
131
141
|
const { name: typeDefinitionName } = response.message;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
2
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
|
+
export default class EvoluGetDelegatedIdentityKey extends AbstractMethod<'evoluGetDelegatedIdentityKey', PROTO.EvoluGetDelegatedIdentityKey> {
|
|
4
|
+
hasBundle?: boolean;
|
|
5
|
+
init(): void;
|
|
6
|
+
get info(): string;
|
|
7
|
+
run(): Promise<{
|
|
8
|
+
private_key: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=evoluGetDelegatedIdentityKey.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const protobuf_1 = require("@trezor/protobuf");
|
|
4
|
+
const protocol_1 = require("@trezor/protocol");
|
|
5
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
6
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
7
|
+
const paramsValidator_1 = require("./common/paramsValidator");
|
|
8
|
+
class EvoluGetDelegatedIdentityKey extends AbstractMethod_1.AbstractMethod {
|
|
9
|
+
hasBundle;
|
|
10
|
+
init() {
|
|
11
|
+
this.requiredPermissions = ['read'];
|
|
12
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null, this.firmwareRange);
|
|
13
|
+
const { payload } = this;
|
|
14
|
+
(0, schema_utils_1.Assert)(protobuf_1.MessagesSchema.EvoluGetDelegatedIdentityKey, payload);
|
|
15
|
+
if (payload.thp !== undefined) {
|
|
16
|
+
const staticKey = Buffer.from(payload.thp.staticHostKey, 'hex');
|
|
17
|
+
const hostStaticKeys = protocol_1.thp.getCurve25519KeyPair(staticKey);
|
|
18
|
+
this.params = {
|
|
19
|
+
thp_credential: payload.thp.credential,
|
|
20
|
+
host_static_public_key: hostStaticKeys.publicKey.toString('hex'),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.params = {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
get info() {
|
|
28
|
+
return 'Evolu get delegated identity key';
|
|
29
|
+
}
|
|
30
|
+
async run() {
|
|
31
|
+
const cmd = this.device.getCommands();
|
|
32
|
+
const response = await cmd.typedCall('EvoluGetDelegatedIdentityKey', 'EvoluDelegatedIdentityKey', this.params);
|
|
33
|
+
return response.message;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = EvoluGetDelegatedIdentityKey;
|
|
37
|
+
//# sourceMappingURL=evoluGetDelegatedIdentityKey.js.map
|
package/lib/api/evoluGetNode.js
CHANGED
|
@@ -11,7 +11,9 @@ class EvoluGetNode extends AbstractMethod_1.AbstractMethod {
|
|
|
11
11
|
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null, this.firmwareRange);
|
|
12
12
|
const { payload } = this;
|
|
13
13
|
(0, schema_utils_1.Assert)(protobuf_1.MessagesSchema.EvoluGetNode, payload);
|
|
14
|
-
this.params = {
|
|
14
|
+
this.params = {
|
|
15
|
+
proof_of_delegated_identity: payload.proof_of_delegated_identity,
|
|
16
|
+
};
|
|
15
17
|
}
|
|
16
18
|
get info() {
|
|
17
19
|
return 'Evolu get node';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
2
|
+
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
|
+
export default class EvoluSignRegistrationRequest extends AbstractMethod<'evoluSignRegistrationRequest', PROTO.EvoluSignRegistrationRequest> {
|
|
4
|
+
hasBundle?: boolean;
|
|
5
|
+
init(): void;
|
|
6
|
+
get info(): string;
|
|
7
|
+
run(): Promise<{
|
|
8
|
+
signature: string;
|
|
9
|
+
certificate_chain: string[];
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=evoluSignRegistrationRequest.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const protobuf_1 = require("@trezor/protobuf");
|
|
4
|
+
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
|
+
const AbstractMethod_1 = require("../core/AbstractMethod");
|
|
6
|
+
const paramsValidator_1 = require("./common/paramsValidator");
|
|
7
|
+
class EvoluSignRegistrationRequest extends AbstractMethod_1.AbstractMethod {
|
|
8
|
+
hasBundle;
|
|
9
|
+
init() {
|
|
10
|
+
this.requiredPermissions = ['read'];
|
|
11
|
+
this.firmwareRange = (0, paramsValidator_1.getFirmwareRange)(this.name, null, this.firmwareRange);
|
|
12
|
+
const { payload } = this;
|
|
13
|
+
(0, schema_utils_1.Assert)(protobuf_1.MessagesSchema.EvoluSignRegistrationRequest, payload);
|
|
14
|
+
this.params = {
|
|
15
|
+
challenge_from_server: payload.challenge_from_server,
|
|
16
|
+
size_to_acquire: payload.size_to_acquire,
|
|
17
|
+
proof_of_delegated_identity: payload.proof_of_delegated_identity,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
get info() {
|
|
21
|
+
return 'Evolu sign registration request';
|
|
22
|
+
}
|
|
23
|
+
async run() {
|
|
24
|
+
const cmd = this.device.getCommands();
|
|
25
|
+
const response = await cmd.typedCall('EvoluSignRegistrationRequest', 'EvoluRegistrationRequest', this.params);
|
|
26
|
+
return response.message;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = EvoluSignRegistrationRequest;
|
|
30
|
+
//# sourceMappingURL=evoluSignRegistrationRequest.js.map
|
package/lib/api/getFeatures.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export default class GetFeatures extends AbstractMethod<'getFeatures'> {
|
|
|
18
18
|
optiga_sec?: number | undefined;
|
|
19
19
|
soc?: number | undefined;
|
|
20
20
|
firmware_corrupted?: boolean | undefined;
|
|
21
|
+
auto_lock_delay_battery_ms?: number | undefined;
|
|
22
|
+
led?: boolean | undefined;
|
|
23
|
+
usb_connected?: boolean | undefined;
|
|
24
|
+
wireless_connected?: boolean | undefined;
|
|
21
25
|
vendor: string;
|
|
22
26
|
major_version: number;
|
|
23
27
|
minor_version: number;
|
package/lib/api/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export { default as changePin } from './changePin';
|
|
|
24
24
|
export { default as changeWipeCode } from './changeWipeCode';
|
|
25
25
|
export { default as cipherKeyValue } from './cipherKeyValue';
|
|
26
26
|
export { default as evoluGetNode } from './evoluGetNode';
|
|
27
|
+
export { default as evoluSignRegistrationRequest } from './evoluSignRegistrationRequest';
|
|
28
|
+
export { default as evoluGetDelegatedIdentityKey } from './evoluGetDelegatedIdentityKey';
|
|
27
29
|
export { default as composeTransaction } from './composeTransaction';
|
|
28
30
|
export { default as discoverAccounts } from './discoverAccounts';
|
|
29
31
|
export { default as getAccountDescriptor } from './getAccountDescriptor';
|
package/lib/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.wipeDevice = exports.verifyMessage = exports.thpRemoveCredentials = exports.thpGetCredentials = exports.unlockPath = void 0;
|
|
3
|
+
exports.setProxy = exports.setBusy = exports.setBrightness = exports.loadDevice = exports.resetDevice = exports.requestLogin = exports.recoveryDevice = exports.pushTransaction = exports.getSettings = exports.getPublicKey = exports.getOwnershipProof = exports.getOwnershipId = exports.getNonce = exports.getFirmwareHash = exports.getFeatures = exports.getDeviceState = exports.getCoinInfo = exports.getAddress = exports.getAccountInfo = exports.getAccountDescriptor = exports.discoverAccounts = exports.composeTransaction = exports.evoluGetDelegatedIdentityKey = exports.evoluSignRegistrationRequest = exports.evoluGetNode = exports.cipherKeyValue = exports.changeWipeCode = exports.changePin = exports.changeLanguage = exports.blockchainUnsubscribeFiatRates = exports.blockchainUnsubscribe = exports.blockchainSubscribeFiatRates = exports.blockchainSubscribe = exports.blockchainSetCustomBackend = exports.blockchainGetTransactions = exports.blockchainGetFiatRatesForTimestamps = exports.blockchainEvmRpcCall = exports.blockchainGetInfo = exports.blockchainGetCurrentFiatRates = exports.blockchainGetAccountBalanceHistory = exports.blockchainEstimateFee = exports.blockchainDisconnect = exports.bleUnpair = exports.backupDevice = exports.showDeviceTutorial = exports.cancelCoinjoinAuthorization = exports.authorizeCoinjoin = exports.authenticateDevice = exports.applySettings = exports.applyFlags = void 0;
|
|
4
|
+
exports.wipeDevice = exports.verifyMessage = exports.thpRemoveCredentials = exports.thpGetCredentials = exports.unlockPath = exports.signTransaction = exports.signMessage = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
var applyFlags_1 = require("./applyFlags");
|
|
7
7
|
Object.defineProperty(exports, "applyFlags", { enumerable: true, get: function () { return tslib_1.__importDefault(applyFlags_1).default; } });
|
|
@@ -55,6 +55,10 @@ var cipherKeyValue_1 = require("./cipherKeyValue");
|
|
|
55
55
|
Object.defineProperty(exports, "cipherKeyValue", { enumerable: true, get: function () { return tslib_1.__importDefault(cipherKeyValue_1).default; } });
|
|
56
56
|
var evoluGetNode_1 = require("./evoluGetNode");
|
|
57
57
|
Object.defineProperty(exports, "evoluGetNode", { enumerable: true, get: function () { return tslib_1.__importDefault(evoluGetNode_1).default; } });
|
|
58
|
+
var evoluSignRegistrationRequest_1 = require("./evoluSignRegistrationRequest");
|
|
59
|
+
Object.defineProperty(exports, "evoluSignRegistrationRequest", { enumerable: true, get: function () { return tslib_1.__importDefault(evoluSignRegistrationRequest_1).default; } });
|
|
60
|
+
var evoluGetDelegatedIdentityKey_1 = require("./evoluGetDelegatedIdentityKey");
|
|
61
|
+
Object.defineProperty(exports, "evoluGetDelegatedIdentityKey", { enumerable: true, get: function () { return tslib_1.__importDefault(evoluGetDelegatedIdentityKey_1).default; } });
|
|
58
62
|
var composeTransaction_1 = require("./composeTransaction");
|
|
59
63
|
Object.defineProperty(exports, "composeTransaction", { enumerable: true, get: function () { return tslib_1.__importDefault(composeTransaction_1).default; } });
|
|
60
64
|
var discoverAccounts_1 = require("./discoverAccounts");
|
|
@@ -81,11 +81,26 @@ class MoneroGetAddress extends AbstractMethod_1.AbstractMethod {
|
|
|
81
81
|
async run() {
|
|
82
82
|
const responses = [];
|
|
83
83
|
for (let i = 0; i < this.params.length; i++) {
|
|
84
|
-
const
|
|
84
|
+
const batch = this.params[i];
|
|
85
|
+
if (batch.show_display) {
|
|
86
|
+
const silent = await this._call({
|
|
87
|
+
...batch,
|
|
88
|
+
show_display: false,
|
|
89
|
+
});
|
|
90
|
+
if (typeof batch.address === 'string') {
|
|
91
|
+
if (batch.address !== silent.address) {
|
|
92
|
+
throw constants_1.ERRORS.TypedError('Method_AddressNotMatch');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
batch.address = silent.address;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const response = await this._call(batch);
|
|
85
100
|
responses.push({
|
|
86
101
|
address: response.address,
|
|
87
|
-
path:
|
|
88
|
-
serializedPath: (0, pathUtils_1.getSerializedPath)(
|
|
102
|
+
path: batch.address_n,
|
|
103
|
+
serializedPath: (0, pathUtils_1.getSerializedPath)(batch.address_n),
|
|
89
104
|
});
|
|
90
105
|
this.progress++;
|
|
91
106
|
}
|
package/lib/data/config.js
CHANGED
|
@@ -306,13 +306,17 @@ exports.config = {
|
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
capabilities: ['evolu'],
|
|
309
|
-
methods: [
|
|
309
|
+
methods: [
|
|
310
|
+
'evoluGetNode',
|
|
311
|
+
'evoluSignRegistrationRequest',
|
|
312
|
+
'evoluGetDelegatedIdentityKey',
|
|
313
|
+
],
|
|
310
314
|
min: {
|
|
311
315
|
T1B1: '0',
|
|
312
|
-
T2T1: '2.9.
|
|
313
|
-
T2B1: '2.9.
|
|
314
|
-
T3B1: '2.9.
|
|
315
|
-
T3T1: '2.9.
|
|
316
|
+
T2T1: '2.9.5',
|
|
317
|
+
T2B1: '2.9.5',
|
|
318
|
+
T3B1: '2.9.5',
|
|
319
|
+
T3T1: '2.9.5',
|
|
316
320
|
},
|
|
317
321
|
},
|
|
318
322
|
{
|
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.DEEPLINK_VERSION = exports.CONTENT_SCRIPT_VERSION = exports.DEFAULT_DOMAIN = exports.DEFAULT_DOMAIN_MAJOR_VER = exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '9.
|
|
4
|
+
exports.VERSION = '9.7.0-beta.1';
|
|
5
5
|
const versionN = exports.VERSION.split('.').map(s => parseInt(s, 10));
|
|
6
6
|
const isBeta = exports.VERSION.includes('beta');
|
|
7
7
|
exports.DEFAULT_DOMAIN_MAJOR_VER = `https://connect.trezor.io/${versionN[0]}/`;
|
package/lib/device/Device.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
|
|
|
96
96
|
optiga_sec?: number | undefined;
|
|
97
97
|
soc?: number | undefined;
|
|
98
98
|
firmware_corrupted?: boolean | undefined;
|
|
99
|
+
auto_lock_delay_battery_ms?: number | undefined;
|
|
100
|
+
led?: boolean | undefined;
|
|
101
|
+
usb_connected?: boolean | undefined;
|
|
102
|
+
wireless_connected?: boolean | undefined;
|
|
99
103
|
vendor: string;
|
|
100
104
|
major_version: number;
|
|
101
105
|
minor_version: number;
|
|
@@ -523,6 +523,18 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
523
523
|
} | {
|
|
524
524
|
type: "EvoluNode";
|
|
525
525
|
message: import("@trezor/protobuf/lib/messages").EvoluNode;
|
|
526
|
+
} | {
|
|
527
|
+
type: "EvoluSignRegistrationRequest";
|
|
528
|
+
message: import("@trezor/protobuf/lib/messages").EvoluSignRegistrationRequest;
|
|
529
|
+
} | {
|
|
530
|
+
type: "EvoluRegistrationRequest";
|
|
531
|
+
message: import("@trezor/protobuf/lib/messages").EvoluRegistrationRequest;
|
|
532
|
+
} | {
|
|
533
|
+
type: "EvoluGetDelegatedIdentityKey";
|
|
534
|
+
message: import("@trezor/protobuf/lib/messages").EvoluGetDelegatedIdentityKey;
|
|
535
|
+
} | {
|
|
536
|
+
type: "EvoluDelegatedIdentityKey";
|
|
537
|
+
message: import("@trezor/protobuf/lib/messages").EvoluDelegatedIdentityKey;
|
|
526
538
|
} | {
|
|
527
539
|
type: "Initialize";
|
|
528
540
|
message: import("@trezor/protobuf/lib/messages").Initialize;
|
|
@@ -662,53 +674,32 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
662
674
|
type: "SetBrightness";
|
|
663
675
|
message: import("@trezor/protobuf/lib/messages").SetBrightness;
|
|
664
676
|
} | {
|
|
665
|
-
type: "
|
|
666
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
667
|
-
} | {
|
|
668
|
-
type: "NEMAddress";
|
|
669
|
-
message: import("@trezor/protobuf/lib/messages").NEMAddress;
|
|
670
|
-
} | {
|
|
671
|
-
type: "NEMTransactionCommon";
|
|
672
|
-
message: import("@trezor/protobuf/lib/messages").NEMTransactionCommon;
|
|
673
|
-
} | {
|
|
674
|
-
type: "NEMMosaic";
|
|
675
|
-
message: import("@trezor/protobuf/lib/messages").NEMMosaic;
|
|
676
|
-
} | {
|
|
677
|
-
type: "NEMTransfer";
|
|
678
|
-
message: import("@trezor/protobuf/lib/messages").NEMTransfer;
|
|
677
|
+
type: "GetSerialNumber";
|
|
678
|
+
message: import("@trezor/protobuf/lib/messages").GetSerialNumber;
|
|
679
679
|
} | {
|
|
680
|
-
type: "
|
|
681
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
680
|
+
type: "SerialNumber";
|
|
681
|
+
message: import("@trezor/protobuf/lib/messages").SerialNumber;
|
|
682
682
|
} | {
|
|
683
|
-
type: "
|
|
684
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
683
|
+
type: "MoneroRctKeyPublic";
|
|
684
|
+
message: import("@trezor/protobuf/lib/messages").MoneroRctKeyPublic;
|
|
685
685
|
} | {
|
|
686
|
-
type: "
|
|
687
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
686
|
+
type: "MoneroOutputEntry";
|
|
687
|
+
message: import("@trezor/protobuf/lib/messages").MoneroOutputEntry;
|
|
688
688
|
} | {
|
|
689
|
-
type: "
|
|
690
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
689
|
+
type: "MoneroMultisigKLRki";
|
|
690
|
+
message: import("@trezor/protobuf/lib/messages").MoneroMultisigKLRki;
|
|
691
691
|
} | {
|
|
692
|
-
type: "
|
|
693
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
692
|
+
type: "MoneroTransactionSourceEntry";
|
|
693
|
+
message: import("@trezor/protobuf/lib/messages").MoneroTransactionSourceEntry;
|
|
694
694
|
} | {
|
|
695
|
-
type: "
|
|
696
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
695
|
+
type: "MoneroAccountPublicAddress";
|
|
696
|
+
message: import("@trezor/protobuf/lib/messages").MoneroAccountPublicAddress;
|
|
697
697
|
} | {
|
|
698
|
-
type: "
|
|
699
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
698
|
+
type: "MoneroTransactionDestinationEntry";
|
|
699
|
+
message: import("@trezor/protobuf/lib/messages").MoneroTransactionDestinationEntry;
|
|
700
700
|
} | {
|
|
701
|
-
type: "
|
|
702
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
703
|
-
} | {
|
|
704
|
-
type: "NEMSignedTx";
|
|
705
|
-
message: import("@trezor/protobuf/lib/messages").NEMSignedTx;
|
|
706
|
-
} | {
|
|
707
|
-
type: "NEMDecryptMessage";
|
|
708
|
-
message: import("@trezor/protobuf/lib/messages").NEMDecryptMessage;
|
|
709
|
-
} | {
|
|
710
|
-
type: "NEMDecryptedMessage";
|
|
711
|
-
message: import("@trezor/protobuf/lib/messages").NEMDecryptedMessage;
|
|
701
|
+
type: "MoneroTransactionRsigData";
|
|
702
|
+
message: import("@trezor/protobuf/lib/messages").MoneroTransactionRsigData;
|
|
712
703
|
} | {
|
|
713
704
|
type: "MoneroGetAddress";
|
|
714
705
|
message: import("@trezor/protobuf/lib/messages").MoneroGetAddress;
|
|
@@ -722,23 +713,8 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
722
713
|
type: "MoneroWatchKey";
|
|
723
714
|
message: import("@trezor/protobuf/lib/messages").MoneroWatchKey;
|
|
724
715
|
} | {
|
|
725
|
-
type: "
|
|
726
|
-
message: import("@trezor/protobuf/lib/messages").
|
|
727
|
-
} | {
|
|
728
|
-
type: "MoneroKeyImageExportInitAck";
|
|
729
|
-
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageExportInitAck;
|
|
730
|
-
} | {
|
|
731
|
-
type: "MoneroKeyImageSyncStepRequest";
|
|
732
|
-
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncStepRequest;
|
|
733
|
-
} | {
|
|
734
|
-
type: "MoneroKeyImageSyncStepAck";
|
|
735
|
-
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncStepAck;
|
|
736
|
-
} | {
|
|
737
|
-
type: "MoneroKeyImageSyncFinalRequest";
|
|
738
|
-
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncFinalRequest;
|
|
739
|
-
} | {
|
|
740
|
-
type: "MoneroKeyImageSyncFinalAck";
|
|
741
|
-
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncFinalAck;
|
|
716
|
+
type: "MoneroTransactionData";
|
|
717
|
+
message: import("@trezor/protobuf/lib/messages").MoneroTransactionData;
|
|
742
718
|
} | {
|
|
743
719
|
type: "MoneroTransactionInitRequest";
|
|
744
720
|
message: import("@trezor/protobuf/lib/messages").MoneroTransactionInitRequest;
|
|
@@ -772,6 +748,9 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
772
748
|
} | {
|
|
773
749
|
type: "MoneroTransactionAllOutSetRequest";
|
|
774
750
|
message: import("@trezor/protobuf/lib/messages").MoneroTransactionAllOutSetRequest;
|
|
751
|
+
} | {
|
|
752
|
+
type: "MoneroRingCtSig";
|
|
753
|
+
message: import("@trezor/protobuf/lib/messages").MoneroRingCtSig;
|
|
775
754
|
} | {
|
|
776
755
|
type: "MoneroTransactionAllOutSetAck";
|
|
777
756
|
message: import("@trezor/protobuf/lib/messages").MoneroTransactionAllOutSetAck;
|
|
@@ -787,6 +766,111 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
787
766
|
} | {
|
|
788
767
|
type: "MoneroTransactionFinalAck";
|
|
789
768
|
message: import("@trezor/protobuf/lib/messages").MoneroTransactionFinalAck;
|
|
769
|
+
} | {
|
|
770
|
+
type: "MoneroSubAddressIndicesList";
|
|
771
|
+
message: import("@trezor/protobuf/lib/messages").MoneroSubAddressIndicesList;
|
|
772
|
+
} | {
|
|
773
|
+
type: "MoneroKeyImageExportInitRequest";
|
|
774
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageExportInitRequest;
|
|
775
|
+
} | {
|
|
776
|
+
type: "MoneroKeyImageExportInitAck";
|
|
777
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageExportInitAck;
|
|
778
|
+
} | {
|
|
779
|
+
type: "MoneroTransferDetails";
|
|
780
|
+
message: import("@trezor/protobuf/lib/messages").MoneroTransferDetails;
|
|
781
|
+
} | {
|
|
782
|
+
type: "MoneroKeyImageSyncStepRequest";
|
|
783
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncStepRequest;
|
|
784
|
+
} | {
|
|
785
|
+
type: "MoneroExportedKeyImage";
|
|
786
|
+
message: import("@trezor/protobuf/lib/messages").MoneroExportedKeyImage;
|
|
787
|
+
} | {
|
|
788
|
+
type: "MoneroKeyImageSyncStepAck";
|
|
789
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncStepAck;
|
|
790
|
+
} | {
|
|
791
|
+
type: "MoneroKeyImageSyncFinalRequest";
|
|
792
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncFinalRequest;
|
|
793
|
+
} | {
|
|
794
|
+
type: "MoneroKeyImageSyncFinalAck";
|
|
795
|
+
message: import("@trezor/protobuf/lib/messages").MoneroKeyImageSyncFinalAck;
|
|
796
|
+
} | {
|
|
797
|
+
type: "MoneroGetTxKeyRequest";
|
|
798
|
+
message: import("@trezor/protobuf/lib/messages").MoneroGetTxKeyRequest;
|
|
799
|
+
} | {
|
|
800
|
+
type: "MoneroGetTxKeyAck";
|
|
801
|
+
message: import("@trezor/protobuf/lib/messages").MoneroGetTxKeyAck;
|
|
802
|
+
} | {
|
|
803
|
+
type: "MoneroLiveRefreshStartRequest";
|
|
804
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshStartRequest;
|
|
805
|
+
} | {
|
|
806
|
+
type: "MoneroLiveRefreshStartAck";
|
|
807
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshStartAck;
|
|
808
|
+
} | {
|
|
809
|
+
type: "MoneroLiveRefreshStepRequest";
|
|
810
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshStepRequest;
|
|
811
|
+
} | {
|
|
812
|
+
type: "MoneroLiveRefreshStepAck";
|
|
813
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshStepAck;
|
|
814
|
+
} | {
|
|
815
|
+
type: "MoneroLiveRefreshFinalRequest";
|
|
816
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshFinalRequest;
|
|
817
|
+
} | {
|
|
818
|
+
type: "MoneroLiveRefreshFinalAck";
|
|
819
|
+
message: import("@trezor/protobuf/lib/messages").MoneroLiveRefreshFinalAck;
|
|
820
|
+
} | {
|
|
821
|
+
type: "DebugMoneroDiagRequest";
|
|
822
|
+
message: import("@trezor/protobuf/lib/messages").DebugMoneroDiagRequest;
|
|
823
|
+
} | {
|
|
824
|
+
type: "DebugMoneroDiagAck";
|
|
825
|
+
message: import("@trezor/protobuf/lib/messages").DebugMoneroDiagAck;
|
|
826
|
+
} | {
|
|
827
|
+
type: "NEMGetAddress";
|
|
828
|
+
message: import("@trezor/protobuf/lib/messages").NEMGetAddress;
|
|
829
|
+
} | {
|
|
830
|
+
type: "NEMAddress";
|
|
831
|
+
message: import("@trezor/protobuf/lib/messages").NEMAddress;
|
|
832
|
+
} | {
|
|
833
|
+
type: "NEMTransactionCommon";
|
|
834
|
+
message: import("@trezor/protobuf/lib/messages").NEMTransactionCommon;
|
|
835
|
+
} | {
|
|
836
|
+
type: "NEMMosaic";
|
|
837
|
+
message: import("@trezor/protobuf/lib/messages").NEMMosaic;
|
|
838
|
+
} | {
|
|
839
|
+
type: "NEMTransfer";
|
|
840
|
+
message: import("@trezor/protobuf/lib/messages").NEMTransfer;
|
|
841
|
+
} | {
|
|
842
|
+
type: "NEMProvisionNamespace";
|
|
843
|
+
message: import("@trezor/protobuf/lib/messages").NEMProvisionNamespace;
|
|
844
|
+
} | {
|
|
845
|
+
type: "NEMMosaicDefinition";
|
|
846
|
+
message: import("@trezor/protobuf/lib/messages").NEMMosaicDefinition;
|
|
847
|
+
} | {
|
|
848
|
+
type: "NEMMosaicCreation";
|
|
849
|
+
message: import("@trezor/protobuf/lib/messages").NEMMosaicCreation;
|
|
850
|
+
} | {
|
|
851
|
+
type: "NEMMosaicSupplyChange";
|
|
852
|
+
message: import("@trezor/protobuf/lib/messages").NEMMosaicSupplyChange;
|
|
853
|
+
} | {
|
|
854
|
+
type: "NEMCosignatoryModification";
|
|
855
|
+
message: import("@trezor/protobuf/lib/messages").NEMCosignatoryModification;
|
|
856
|
+
} | {
|
|
857
|
+
type: "NEMAggregateModification";
|
|
858
|
+
message: import("@trezor/protobuf/lib/messages").NEMAggregateModification;
|
|
859
|
+
} | {
|
|
860
|
+
type: "NEMImportanceTransfer";
|
|
861
|
+
message: import("@trezor/protobuf/lib/messages").NEMImportanceTransfer;
|
|
862
|
+
} | {
|
|
863
|
+
type: "NEMSignTx";
|
|
864
|
+
message: import("@trezor/protobuf/lib/messages").NEMSignTx;
|
|
865
|
+
} | {
|
|
866
|
+
type: "NEMSignedTx";
|
|
867
|
+
message: import("@trezor/protobuf/lib/messages").NEMSignedTx;
|
|
868
|
+
} | {
|
|
869
|
+
type: "NEMDecryptMessage";
|
|
870
|
+
message: import("@trezor/protobuf/lib/messages").NEMDecryptMessage;
|
|
871
|
+
} | {
|
|
872
|
+
type: "NEMDecryptedMessage";
|
|
873
|
+
message: import("@trezor/protobuf/lib/messages").NEMDecryptedMessage;
|
|
790
874
|
} | {
|
|
791
875
|
type: "RippleGetAddress";
|
|
792
876
|
message: import("@trezor/protobuf/lib/messages").RippleGetAddress;
|
|
@@ -931,6 +1015,12 @@ export declare class DeviceCurrentSession implements TypedCallProvider {
|
|
|
931
1015
|
} | {
|
|
932
1016
|
type: "TezosSignedTx";
|
|
933
1017
|
message: import("@trezor/protobuf/lib/messages").TezosSignedTx;
|
|
1018
|
+
} | {
|
|
1019
|
+
type: "TronGetAddress";
|
|
1020
|
+
message: import("@trezor/protobuf/lib/messages").TronGetAddress;
|
|
1021
|
+
} | {
|
|
1022
|
+
type: "TronAddress";
|
|
1023
|
+
message: import("@trezor/protobuf/lib/messages").TronAddress;
|
|
934
1024
|
}>;
|
|
935
1025
|
private needCancelWorkaround;
|
|
936
1026
|
private callLoop;
|
|
@@ -8,7 +8,8 @@ const assetUtils_1 = require("../utils/assetUtils");
|
|
|
8
8
|
const isNotFoundError = (e) => e instanceof assetUtils_1.HttpRequestError && e.response.status === 404;
|
|
9
9
|
const isNodeJSOfflineError = (e) => ['FetchError', 'AbortError'].includes(e.name);
|
|
10
10
|
const isReactNativeOfflineError = (e) => e.name === 'TypeError' && e.message.includes('Network request failed');
|
|
11
|
-
const isAbortControllerTimeout = (e) => e.
|
|
11
|
+
const isAbortControllerTimeout = (e) => e.message.includes('Aborted') ||
|
|
12
|
+
e.name === 'AbortError' ||
|
|
12
13
|
(e.name === 'TimeoutError' && e.message.includes('signal timed out'));
|
|
13
14
|
const isOfflineError = (e) => {
|
|
14
15
|
if (!(e instanceof Error))
|
|
@@ -14,7 +14,7 @@ const createThpSession = async (device, deriveCardano) => {
|
|
|
14
14
|
}
|
|
15
15
|
return promptRes.payload.passphraseOnDevice
|
|
16
16
|
? { on_device: true }
|
|
17
|
-
: { passphrase: promptRes.payload.value };
|
|
17
|
+
: { passphrase: promptRes.payload.value.normalize('NFKD') };
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
await (0, thpCall_1.thpCall)(device, 'ThpCreateNewSession', {
|
|
@@ -45,6 +45,7 @@ const trezorPushNotificationHandler = async ({ device, message }) => {
|
|
|
45
45
|
switch (type) {
|
|
46
46
|
case protocol_1.TrezorPushNotificationType.SETTING_CHANGE:
|
|
47
47
|
case protocol_1.TrezorPushNotificationType.PIN_CHANGE:
|
|
48
|
+
case protocol_1.TrezorPushNotificationType.NOTIFY_POWER_STATUS_CHANGE:
|
|
48
49
|
if (!device.isUsed()) {
|
|
49
50
|
await device.acquire();
|
|
50
51
|
await device.getFeatures();
|
|
@@ -14,13 +14,17 @@ const getStaticSessionId = (device) => device
|
|
|
14
14
|
script_type: 'SPENDADDRESS',
|
|
15
15
|
})
|
|
16
16
|
.then(({ message }) => `${message.address}@${device.features.device_id}:${device.getInstance()}`);
|
|
17
|
-
const
|
|
17
|
+
const preauthorizeState = ({ device, method }) => {
|
|
18
|
+
if (!device.features.unlocked && method.preauthorized) {
|
|
19
|
+
return device.getCommands().preauthorize(false);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const getState = async (context) => {
|
|
23
|
+
const { device } = context;
|
|
18
24
|
if (!device.features)
|
|
19
25
|
return;
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
26
|
+
if (await preauthorizeState(context)) {
|
|
27
|
+
return;
|
|
24
28
|
}
|
|
25
29
|
const expectedState = device.getState()?.staticSessionId;
|
|
26
30
|
const uniqueState = await getStaticSessionId(device);
|
|
@@ -65,6 +69,9 @@ const getInvalidThpDeviceState = async (context) => {
|
|
|
65
69
|
const expectedSessionId = currentState?.sessionId
|
|
66
70
|
? Buffer.from(currentState.sessionId, 'hex')
|
|
67
71
|
: undefined;
|
|
72
|
+
if (await preauthorizeState(context)) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
68
75
|
let uniqueState;
|
|
69
76
|
const thpState = device.getThpState();
|
|
70
77
|
if (expectedSessionId) {
|
package/lib/factory.js
CHANGED
|
@@ -48,6 +48,8 @@ const factory = ({ eventEmitter, manifest, init, call, setTransports, requestLog
|
|
|
48
48
|
cardanoComposeTransaction: params => call({ ...params, method: 'cardanoComposeTransaction' }),
|
|
49
49
|
cipherKeyValue: params => call({ ...params, method: 'cipherKeyValue' }),
|
|
50
50
|
evoluGetNode: params => call({ ...params, method: 'evoluGetNode' }),
|
|
51
|
+
evoluGetDelegatedIdentityKey: params => call({ ...params, method: 'evoluGetDelegatedIdentityKey' }),
|
|
52
|
+
evoluSignRegistrationRequest: params => call({ ...params, method: 'evoluSignRegistrationRequest' }),
|
|
51
53
|
composeTransaction: params => call({ ...params, method: 'composeTransaction' }),
|
|
52
54
|
discoverAccounts: params => call({ ...params, method: 'discoverAccounts' }),
|
|
53
55
|
ethereumGetAddress: params => call({
|
|
@@ -20,8 +20,6 @@ export declare class CoreInModule implements ConnectFactoryDependencies<ConnectS
|
|
|
20
20
|
private onCoreEvent;
|
|
21
21
|
init(settings?: Partial<ConnectSettings>): Promise<void>;
|
|
22
22
|
setTransports({ transports }: SetTransports): void;
|
|
23
|
-
private initSettings;
|
|
24
|
-
initCore(): any;
|
|
25
23
|
call(params: CallMethodPayload): Promise<import("../types").Unsuccessful | {
|
|
26
24
|
id: number;
|
|
27
25
|
success: boolean;
|
|
@@ -31,15 +31,11 @@ class CoreInModule {
|
|
|
31
31
|
});
|
|
32
32
|
if (!importResult) {
|
|
33
33
|
this._log.error(`importResult is empty! Cannot load "${connectCorePath}"`);
|
|
34
|
-
throw new Error(`importResult is empty! Cannot load "${connectCorePath}
|
|
34
|
+
throw new Error(`importResult is empty! Cannot load "${connectCorePath}"`);
|
|
35
35
|
}
|
|
36
|
-
const { initCoreState
|
|
36
|
+
const { initCoreState } = importResult;
|
|
37
37
|
if (!initCoreState)
|
|
38
38
|
return;
|
|
39
|
-
if (initTransport) {
|
|
40
|
-
this._log.debug('initiating transport with settings: ', this._settings);
|
|
41
|
-
await initTransport(this._settings);
|
|
42
|
-
}
|
|
43
39
|
this._coreManager = initCoreState();
|
|
44
40
|
return this._coreManager;
|
|
45
41
|
}
|
|
@@ -149,23 +145,6 @@ class CoreInModule {
|
|
|
149
145
|
payload: { transports },
|
|
150
146
|
});
|
|
151
147
|
}
|
|
152
|
-
initSettings = (settings = {}) => {
|
|
153
|
-
this._settings = (0, connectSettings_1.parseConnectSettings)({
|
|
154
|
-
...this._settings,
|
|
155
|
-
...settings,
|
|
156
|
-
popup: false,
|
|
157
|
-
});
|
|
158
|
-
if (!this._settings.manifest) {
|
|
159
|
-
throw ERRORS.TypedError('Init_ManifestMissing');
|
|
160
|
-
}
|
|
161
|
-
if (!this._settings.transports?.length) {
|
|
162
|
-
this._settings.transports = ['BridgeTransport'];
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
initCore() {
|
|
166
|
-
this.initSettings({ lazyLoad: false });
|
|
167
|
-
return this._coreManager.getOrInit(this._settings, this.boundOnCoreEvent);
|
|
168
|
-
}
|
|
169
148
|
async call(params) {
|
|
170
149
|
try {
|
|
171
150
|
const { promiseId, promise } = this._messagePromises.create();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/exports.ts","../src/factory.ts","../src/index-browser.ts","../src/index.ts","../src/api/applyFlags.ts","../src/api/applySettings.ts","../src/api/authenticateDevice.ts","../src/api/authorizeCoinjoin.ts","../src/api/backupDevice.ts","../src/api/bleUnpair.ts","../src/api/blockchainDisconnect.ts","../src/api/blockchainEstimateFee.ts","../src/api/blockchainEvmRpcCall.ts","../src/api/blockchainGetAccountBalanceHistory.ts","../src/api/blockchainGetCurrentFiatRates.ts","../src/api/blockchainGetFiatRatesForTimestamps.ts","../src/api/blockchainGetInfo.ts","../src/api/blockchainGetTransactions.ts","../src/api/blockchainSetCustomBackend.ts","../src/api/blockchainSubscribe.ts","../src/api/blockchainSubscribeFiatRates.ts","../src/api/blockchainUnsubscribe.ts","../src/api/blockchainUnsubscribeFiatRates.ts","../src/api/cancelCoinjoinAuthorization.ts","../src/api/changeLanguage.ts","../src/api/changePin.ts","../src/api/changeWipeCode.ts","../src/api/cipherKeyValue.ts","../src/api/composeTransaction.ts","../src/api/discoverAccounts.ts","../src/api/evoluGetNode.ts","../src/api/getAccountDescriptor.ts","../src/api/getAccountInfo.ts","../src/api/getAddress.ts","../src/api/getCoinInfo.ts","../src/api/getDeviceState.ts","../src/api/getFeatures.ts","../src/api/getFirmwareHash.ts","../src/api/getNonce.ts","../src/api/getOwnershipId.ts","../src/api/getOwnershipProof.ts","../src/api/getPublicKey.ts","../src/api/getSettings.ts","../src/api/index.ts","../src/api/loadDevice.ts","../src/api/pushTransaction.ts","../src/api/recoveryDevice.ts","../src/api/requestLogin.ts","../src/api/resetDevice.ts","../src/api/setBrightness.ts","../src/api/setBusy.ts","../src/api/setProxy.ts","../src/api/showDeviceTutorial.ts","../src/api/signMessage.ts","../src/api/signTransaction.ts","../src/api/thpGetCredentials.ts","../src/api/thpRemoveCredentials.ts","../src/api/unlockPath.ts","../src/api/verifyMessage.ts","../src/api/wipeDevice.ts","../src/api/bitcoin/TransactionComposer.ts","../src/api/bitcoin/createPendingTx.ts","../src/api/bitcoin/enhanceSignTx.ts","../src/api/bitcoin/index.ts","../src/api/bitcoin/inputs.ts","../src/api/bitcoin/outputs.ts","../src/api/bitcoin/refTx.ts","../src/api/bitcoin/signtx.ts","../src/api/bitcoin/signtxLegacy.ts","../src/api/bitcoin/signtxVerify.ts","../src/api/bitcoin/transactionBytes.ts","../src/api/cardano/cardanoAddressParameters.ts","../src/api/cardano/cardanoAuxiliaryData.ts","../src/api/cardano/cardanoCertificate.ts","../src/api/cardano/cardanoInputs.ts","../src/api/cardano/cardanoOutputs.ts","../src/api/cardano/cardanoTokenBundle.ts","../src/api/cardano/cardanoUtils.ts","../src/api/cardano/cardanoWitnesses.ts","../src/api/cardano/api/cardanoComposeTransaction.ts","../src/api/cardano/api/cardanoGetAddress.ts","../src/api/cardano/api/cardanoGetNativeScriptHash.ts","../src/api/cardano/api/cardanoGetPublicKey.ts","../src/api/cardano/api/cardanoSignMessage.ts","../src/api/cardano/api/cardanoSignTransaction.ts","../src/api/cardano/api/index.ts","../src/api/common/Discovery.ts","../src/api/common/paramsValidator.ts","../src/api/eos/eosSignTx.ts","../src/api/eos/api/eosGetPublicKey.ts","../src/api/eos/api/eosSignTransaction.ts","../src/api/eos/api/index.ts","../src/api/ethereum/ethereumDefinitions.ts","../src/api/ethereum/ethereumSignTx.ts","../src/api/ethereum/ethereumSignTypedData.ts","../src/api/ethereum/api/ethereumGetAddress.ts","../src/api/ethereum/api/ethereumGetPublicKey.ts","../src/api/ethereum/api/ethereumSignMessage.ts","../src/api/ethereum/api/ethereumSignTransaction.ts","../src/api/ethereum/api/ethereumSignTypedData.ts","../src/api/ethereum/api/ethereumVerifyMessage.ts","../src/api/ethereum/api/index.ts","../src/api/firmware/calculateFirmwareHash.ts","../src/api/firmware/getBinary.ts","../src/api/firmware/index.ts","../src/api/firmware/modifyFirmware.ts","../src/api/firmware/parseFirmwareHeaders.ts","../src/api/firmware/uploadFirmware.ts","../src/api/firmware/verifyEntropy.ts","../src/api/monero/api/index.ts","../src/api/monero/api/moneroGetAddress.ts","../src/api/monero/api/moneroGetWatchKey.ts","../src/api/monero/api/moneroKeyImageSync.ts","../src/api/monero/api/moneroSignTransaction.ts","../src/api/nem/nemSignTx.ts","../src/api/nem/api/index.ts","../src/api/nem/api/nemGetAddress.ts","../src/api/nem/api/nemSignTransaction.ts","../src/api/ripple/api/index.ts","../src/api/ripple/api/rippleGetAddress.ts","../src/api/ripple/api/rippleSignTransaction.ts","../src/api/solana/additionalInfo.ts","../src/api/solana/solanaDefinitions.ts","../src/api/solana/solanaUtils.ts","../src/api/solana/api/index.ts","../src/api/solana/api/solanaComposeTransaction.ts","../src/api/solana/api/solanaGetAddress.ts","../src/api/solana/api/solanaGetPublicKey.ts","../src/api/solana/api/solanaSignTransaction.ts","../src/api/stellar/stellarSignTx.ts","../src/api/stellar/api/index.ts","../src/api/stellar/api/stellarGetAddress.ts","../src/api/stellar/api/stellarSignTransaction.ts","../src/api/tezos/tezosSignTx.ts","../src/api/tezos/api/index.ts","../src/api/tezos/api/tezosGetAddress.ts","../src/api/tezos/api/tezosGetPublicKey.ts","../src/api/tezos/api/tezosSignTransaction.ts","../src/backend/BackendManager.ts","../src/backend/Blockchain.ts","../src/backend/BlockchainLink.ts","../src/backend/fees/BitcoinFeeLevels.ts","../src/backend/fees/EthereumFeeLevels.ts","../src/backend/fees/MiscFeeLevels.ts","../src/backend/fees/index.ts","../src/constants/cardano.ts","../src/constants/errors.ts","../src/constants/firmware.ts","../src/constants/index.ts","../src/constants/nem.ts","../src/constants/network.ts","../src/constants/utxo.ts","../src/core/AbstractMethod.ts","../src/core/index.ts","../src/core/method.native.ts","../src/core/method.ts","../src/core/onCallFirmwareUpdate.ts","../src/data/DataManager.ts","../src/data/analyticsInfo.ts","../src/data/coinInfo.ts","../src/data/config.ts","../src/data/connectSettings.ts","../src/data/defaultFeeLevels.ts","../src/data/firmwareInfo.ts","../src/data/thpSettings.ts","../src/data/udevInfo.ts","../src/data/version.ts","../src/device/Device.ts","../src/device/DeviceCommands.ts","../src/device/DeviceCurrentSession.ts","../src/device/DeviceList.ts","../src/device/StateStorage.ts","../src/device/TransportList.ts","../src/device/TransportManager.ts","../src/device/calculateRevisionForDevice.ts","../src/device/checkFirmwareRevision.ts","../src/device/resolveDescriptorForTaproot.ts","../src/device/thp/handshake.ts","../src/device/thp/index.ts","../src/device/thp/pairing.ts","../src/device/thp/session.ts","../src/device/thp/thpCall.ts","../src/device/workflow/checkFirmwareHash.ts","../src/device/workflow/checkFirmwareHashWithRetries.ts","../src/device/workflow/handshake.ts","../src/device/workflow/index.ts","../src/device/workflow/trezorPushNotification.ts","../src/device/workflow/validateState.ts","../src/events/blockchain.ts","../src/events/call.ts","../src/events/core.ts","../src/events/device.ts","../src/events/iframe.ts","../src/events/index.ts","../src/events/popup.ts","../src/events/transport.ts","../src/events/ui-promise.ts","../src/events/ui-request.ts","../src/events/ui-response.ts","../src/events/webextension.ts","../src/impl/core-in-module.ts","../src/impl/dynamic.ts","../src/types/account.ts","../src/types/coinInfo.ts","../src/types/device.ts","../src/types/fees.ts","../src/types/firmware.ts","../src/types/index.ts","../src/types/params.ts","../src/types/settings.ts","../src/types/utils.ts","../src/types/workflow.ts","../src/types/api/applyFlags.ts","../src/types/api/applySettings.ts","../src/types/api/authenticateDevice.ts","../src/types/api/authorizeCoinjoin.ts","../src/types/api/backupDevice.ts","../src/types/api/bleUnpair.ts","../src/types/api/blockchainDisconnect.ts","../src/types/api/blockchainEstimateFee.ts","../src/types/api/blockchainEvmRpcCall.ts","../src/types/api/blockchainGetAccountBalanceHistory.ts","../src/types/api/blockchainGetCurrentFiatRates.ts","../src/types/api/blockchainGetFiatRatesForTimestamps.ts","../src/types/api/blockchainGetInfo.ts","../src/types/api/blockchainGetTransactions.ts","../src/types/api/blockchainSetCustomBackend.ts","../src/types/api/blockchainSubscribe.ts","../src/types/api/blockchainSubscribeFiatRates.ts","../src/types/api/blockchainUnsubscribe.ts","../src/types/api/blockchainUnsubscribeFiatRates.ts","../src/types/api/cancel.ts","../src/types/api/cancelCoinjoinAuthorization.ts","../src/types/api/cardanoComposeTransaction.ts","../src/types/api/cardanoGetAddress.ts","../src/types/api/cardanoGetNativeScriptHash.ts","../src/types/api/cardanoGetPublicKey.ts","../src/types/api/cardanoSignMessage.ts","../src/types/api/cardanoSignTransaction.ts","../src/types/api/changeLanguage.ts","../src/types/api/changePin.ts","../src/types/api/changeWipeCode.ts","../src/types/api/cipherKeyValue.ts","../src/types/api/composeTransaction.ts","../src/types/api/device.ts","../src/types/api/disableWebUSB.ts","../src/types/api/discoverAccounts.ts","../src/types/api/dispose.ts","../src/types/api/eosGetPublicKey.ts","../src/types/api/eosSignTransaction.ts","../src/types/api/ethereumGetAddress.ts","../src/types/api/ethereumGetPublicKey.ts","../src/types/api/ethereumSignMessage.ts","../src/types/api/ethereumSignTransaction.ts","../src/types/api/ethereumSignTypedData.ts","../src/types/api/ethereumVerifyMessage.ts","../src/types/api/evoluGetNode.ts","../src/types/api/firmwareUpdate.ts","../src/types/api/getAccountDescriptor.ts","../src/types/api/getAccountInfo.ts","../src/types/api/getAddress.ts","../src/types/api/getCoinInfo.ts","../src/types/api/getDeviceState.ts","../src/types/api/getFeatures.ts","../src/types/api/getFirmwareHash.ts","../src/types/api/getNonce.ts","../src/types/api/getOwnershipId.ts","../src/types/api/getOwnershipProof.ts","../src/types/api/getPublicKey.ts","../src/types/api/getSettings.ts","../src/types/api/index.ts","../src/types/api/init.ts","../src/types/api/loadDevice.ts","../src/types/api/manifest.ts","../src/types/api/moneroGetAddress.ts","../src/types/api/moneroGetWatchKey.ts","../src/types/api/moneroKeyImageSync.ts","../src/types/api/moneroSignTransaction.ts","../src/types/api/nemGetAddress.ts","../src/types/api/nemSignTransaction.ts","../src/types/api/off.ts","../src/types/api/on.ts","../src/types/api/pushTransaction.ts","../src/types/api/recoveryDevice.ts","../src/types/api/removeAllListeners.ts","../src/types/api/renderWebUSBButton.ts","../src/types/api/requestLogin.ts","../src/types/api/requestWebUSBDevice.ts","../src/types/api/resetDevice.ts","../src/types/api/rippleGetAddress.ts","../src/types/api/rippleSignTransaction.ts","../src/types/api/setBrightness.ts","../src/types/api/setBusy.ts","../src/types/api/setProxy.ts","../src/types/api/setTransports.ts","../src/types/api/showDeviceTutorial.ts","../src/types/api/signMessage.ts","../src/types/api/signTransaction.ts","../src/types/api/solanaComposeTransaction.ts","../src/types/api/solanaGetAddress.ts","../src/types/api/solanaGetPublicKey.ts","../src/types/api/solanaSignTransaction.ts","../src/types/api/stellarGetAddress.ts","../src/types/api/stellarSignTransaction.ts","../src/types/api/tezosGetAddress.ts","../src/types/api/tezosGetPublicKey.ts","../src/types/api/tezosSignTransaction.ts","../src/types/api/thpGetCredentials.ts","../src/types/api/thpRemoveCredentials.ts","../src/types/api/uiResponse.ts","../src/types/api/unlockPath.ts","../src/types/api/verifyMessage.ts","../src/types/api/wipeDevice.ts","../src/types/api/bitcoin/index.ts","../src/types/api/cardano/index.ts","../src/types/api/eos/index.ts","../src/types/api/ethereum/index.ts","../src/types/api/monero/index.ts","../src/types/api/nem/index.ts","../src/types/api/ripple/index.ts","../src/types/api/solana/index.ts","../src/types/api/stellar/index.ts","../src/types/api/tezos/index.ts","../src/utils/accountUtils.ts","../src/utils/addressUtils.ts","../src/utils/assetUtils.ts","../src/utils/assets-browser.ts","../src/utils/assets.native.ts","../src/utils/assets.ts","../src/utils/assetsTypes.ts","../src/utils/debug.ts","../src/utils/deviceFeaturesUtils.ts","../src/utils/ethereumUtils.ts","../src/utils/firmwareReleaseConfigUtils.ts","../src/utils/firmwareUtils.ts","../src/utils/formatUtils.ts","../src/utils/hdnodeUtils.ts","../src/utils/interactionTimeout.ts","../src/utils/pathUtils.ts","../src/utils/popupPromiseManager.ts","../src/utils/proxy-event-emitter.ts","../src/utils/uiPromiseManager.ts","../src/utils/urlUtils.ts","../src/utils/versionCheck.ts","../src/workers/workers-browser.ts","../src/workers/workers.native.ts","../src/workers/workers.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../src/exports.ts","../src/factory.ts","../src/index-browser.ts","../src/index.ts","../src/api/applyFlags.ts","../src/api/applySettings.ts","../src/api/authenticateDevice.ts","../src/api/authorizeCoinjoin.ts","../src/api/backupDevice.ts","../src/api/bleUnpair.ts","../src/api/blockchainDisconnect.ts","../src/api/blockchainEstimateFee.ts","../src/api/blockchainEvmRpcCall.ts","../src/api/blockchainGetAccountBalanceHistory.ts","../src/api/blockchainGetCurrentFiatRates.ts","../src/api/blockchainGetFiatRatesForTimestamps.ts","../src/api/blockchainGetInfo.ts","../src/api/blockchainGetTransactions.ts","../src/api/blockchainSetCustomBackend.ts","../src/api/blockchainSubscribe.ts","../src/api/blockchainSubscribeFiatRates.ts","../src/api/blockchainUnsubscribe.ts","../src/api/blockchainUnsubscribeFiatRates.ts","../src/api/cancelCoinjoinAuthorization.ts","../src/api/changeLanguage.ts","../src/api/changePin.ts","../src/api/changeWipeCode.ts","../src/api/cipherKeyValue.ts","../src/api/composeTransaction.ts","../src/api/discoverAccounts.ts","../src/api/evoluGetDelegatedIdentityKey.ts","../src/api/evoluGetNode.ts","../src/api/evoluSignRegistrationRequest.ts","../src/api/getAccountDescriptor.ts","../src/api/getAccountInfo.ts","../src/api/getAddress.ts","../src/api/getCoinInfo.ts","../src/api/getDeviceState.ts","../src/api/getFeatures.ts","../src/api/getFirmwareHash.ts","../src/api/getNonce.ts","../src/api/getOwnershipId.ts","../src/api/getOwnershipProof.ts","../src/api/getPublicKey.ts","../src/api/getSettings.ts","../src/api/index.ts","../src/api/loadDevice.ts","../src/api/pushTransaction.ts","../src/api/recoveryDevice.ts","../src/api/requestLogin.ts","../src/api/resetDevice.ts","../src/api/setBrightness.ts","../src/api/setBusy.ts","../src/api/setProxy.ts","../src/api/showDeviceTutorial.ts","../src/api/signMessage.ts","../src/api/signTransaction.ts","../src/api/thpGetCredentials.ts","../src/api/thpRemoveCredentials.ts","../src/api/unlockPath.ts","../src/api/verifyMessage.ts","../src/api/wipeDevice.ts","../src/api/bitcoin/TransactionComposer.ts","../src/api/bitcoin/createPendingTx.ts","../src/api/bitcoin/enhanceSignTx.ts","../src/api/bitcoin/index.ts","../src/api/bitcoin/inputs.ts","../src/api/bitcoin/outputs.ts","../src/api/bitcoin/refTx.ts","../src/api/bitcoin/signtx.ts","../src/api/bitcoin/signtxLegacy.ts","../src/api/bitcoin/signtxVerify.ts","../src/api/bitcoin/transactionBytes.ts","../src/api/cardano/cardanoAddressParameters.ts","../src/api/cardano/cardanoAuxiliaryData.ts","../src/api/cardano/cardanoCertificate.ts","../src/api/cardano/cardanoInputs.ts","../src/api/cardano/cardanoOutputs.ts","../src/api/cardano/cardanoTokenBundle.ts","../src/api/cardano/cardanoUtils.ts","../src/api/cardano/cardanoWitnesses.ts","../src/api/cardano/api/cardanoComposeTransaction.ts","../src/api/cardano/api/cardanoGetAddress.ts","../src/api/cardano/api/cardanoGetNativeScriptHash.ts","../src/api/cardano/api/cardanoGetPublicKey.ts","../src/api/cardano/api/cardanoSignMessage.ts","../src/api/cardano/api/cardanoSignTransaction.ts","../src/api/cardano/api/index.ts","../src/api/common/Discovery.ts","../src/api/common/paramsValidator.ts","../src/api/eos/eosSignTx.ts","../src/api/eos/api/eosGetPublicKey.ts","../src/api/eos/api/eosSignTransaction.ts","../src/api/eos/api/index.ts","../src/api/ethereum/ethereumDefinitions.ts","../src/api/ethereum/ethereumSignTx.ts","../src/api/ethereum/ethereumSignTypedData.ts","../src/api/ethereum/api/ethereumGetAddress.ts","../src/api/ethereum/api/ethereumGetPublicKey.ts","../src/api/ethereum/api/ethereumSignMessage.ts","../src/api/ethereum/api/ethereumSignTransaction.ts","../src/api/ethereum/api/ethereumSignTypedData.ts","../src/api/ethereum/api/ethereumVerifyMessage.ts","../src/api/ethereum/api/index.ts","../src/api/firmware/calculateFirmwareHash.ts","../src/api/firmware/getBinary.ts","../src/api/firmware/index.ts","../src/api/firmware/modifyFirmware.ts","../src/api/firmware/parseFirmwareHeaders.ts","../src/api/firmware/uploadFirmware.ts","../src/api/firmware/verifyEntropy.ts","../src/api/monero/api/index.ts","../src/api/monero/api/moneroGetAddress.ts","../src/api/monero/api/moneroGetWatchKey.ts","../src/api/monero/api/moneroKeyImageSync.ts","../src/api/monero/api/moneroSignTransaction.ts","../src/api/nem/nemSignTx.ts","../src/api/nem/api/index.ts","../src/api/nem/api/nemGetAddress.ts","../src/api/nem/api/nemSignTransaction.ts","../src/api/ripple/api/index.ts","../src/api/ripple/api/rippleGetAddress.ts","../src/api/ripple/api/rippleSignTransaction.ts","../src/api/solana/additionalInfo.ts","../src/api/solana/solanaDefinitions.ts","../src/api/solana/solanaUtils.ts","../src/api/solana/api/index.ts","../src/api/solana/api/solanaComposeTransaction.ts","../src/api/solana/api/solanaGetAddress.ts","../src/api/solana/api/solanaGetPublicKey.ts","../src/api/solana/api/solanaSignTransaction.ts","../src/api/stellar/stellarSignTx.ts","../src/api/stellar/api/index.ts","../src/api/stellar/api/stellarGetAddress.ts","../src/api/stellar/api/stellarSignTransaction.ts","../src/api/tezos/tezosSignTx.ts","../src/api/tezos/api/index.ts","../src/api/tezos/api/tezosGetAddress.ts","../src/api/tezos/api/tezosGetPublicKey.ts","../src/api/tezos/api/tezosSignTransaction.ts","../src/backend/BackendManager.ts","../src/backend/Blockchain.ts","../src/backend/BlockchainLink.ts","../src/backend/fees/BitcoinFeeLevels.ts","../src/backend/fees/EthereumFeeLevels.ts","../src/backend/fees/MiscFeeLevels.ts","../src/backend/fees/index.ts","../src/constants/cardano.ts","../src/constants/errors.ts","../src/constants/firmware.ts","../src/constants/index.ts","../src/constants/nem.ts","../src/constants/network.ts","../src/constants/utxo.ts","../src/core/AbstractMethod.ts","../src/core/index.ts","../src/core/method.native.ts","../src/core/method.ts","../src/core/onCallFirmwareUpdate.ts","../src/data/DataManager.ts","../src/data/analyticsInfo.ts","../src/data/coinInfo.ts","../src/data/config.ts","../src/data/connectSettings.ts","../src/data/defaultFeeLevels.ts","../src/data/firmwareInfo.ts","../src/data/thpSettings.ts","../src/data/udevInfo.ts","../src/data/version.ts","../src/device/Device.ts","../src/device/DeviceCommands.ts","../src/device/DeviceCurrentSession.ts","../src/device/DeviceList.ts","../src/device/StateStorage.ts","../src/device/TransportList.ts","../src/device/TransportManager.ts","../src/device/calculateRevisionForDevice.ts","../src/device/checkFirmwareRevision.ts","../src/device/resolveDescriptorForTaproot.ts","../src/device/thp/handshake.ts","../src/device/thp/index.ts","../src/device/thp/pairing.ts","../src/device/thp/session.ts","../src/device/thp/thpCall.ts","../src/device/workflow/checkFirmwareHash.ts","../src/device/workflow/checkFirmwareHashWithRetries.ts","../src/device/workflow/handshake.ts","../src/device/workflow/index.ts","../src/device/workflow/trezorPushNotification.ts","../src/device/workflow/validateState.ts","../src/events/blockchain.ts","../src/events/call.ts","../src/events/core.ts","../src/events/device.ts","../src/events/iframe.ts","../src/events/index.ts","../src/events/popup.ts","../src/events/transport.ts","../src/events/ui-promise.ts","../src/events/ui-request.ts","../src/events/ui-response.ts","../src/events/webextension.ts","../src/impl/core-in-module.ts","../src/impl/dynamic.ts","../src/types/account.ts","../src/types/coinInfo.ts","../src/types/device.ts","../src/types/fees.ts","../src/types/firmware.ts","../src/types/index.ts","../src/types/params.ts","../src/types/settings.ts","../src/types/utils.ts","../src/types/workflow.ts","../src/types/api/applyFlags.ts","../src/types/api/applySettings.ts","../src/types/api/authenticateDevice.ts","../src/types/api/authorizeCoinjoin.ts","../src/types/api/backupDevice.ts","../src/types/api/bleUnpair.ts","../src/types/api/blockchainDisconnect.ts","../src/types/api/blockchainEstimateFee.ts","../src/types/api/blockchainEvmRpcCall.ts","../src/types/api/blockchainGetAccountBalanceHistory.ts","../src/types/api/blockchainGetCurrentFiatRates.ts","../src/types/api/blockchainGetFiatRatesForTimestamps.ts","../src/types/api/blockchainGetInfo.ts","../src/types/api/blockchainGetTransactions.ts","../src/types/api/blockchainSetCustomBackend.ts","../src/types/api/blockchainSubscribe.ts","../src/types/api/blockchainSubscribeFiatRates.ts","../src/types/api/blockchainUnsubscribe.ts","../src/types/api/blockchainUnsubscribeFiatRates.ts","../src/types/api/cancel.ts","../src/types/api/cancelCoinjoinAuthorization.ts","../src/types/api/cardanoComposeTransaction.ts","../src/types/api/cardanoGetAddress.ts","../src/types/api/cardanoGetNativeScriptHash.ts","../src/types/api/cardanoGetPublicKey.ts","../src/types/api/cardanoSignMessage.ts","../src/types/api/cardanoSignTransaction.ts","../src/types/api/changeLanguage.ts","../src/types/api/changePin.ts","../src/types/api/changeWipeCode.ts","../src/types/api/cipherKeyValue.ts","../src/types/api/composeTransaction.ts","../src/types/api/device.ts","../src/types/api/disableWebUSB.ts","../src/types/api/discoverAccounts.ts","../src/types/api/dispose.ts","../src/types/api/eosGetPublicKey.ts","../src/types/api/eosSignTransaction.ts","../src/types/api/ethereumGetAddress.ts","../src/types/api/ethereumGetPublicKey.ts","../src/types/api/ethereumSignMessage.ts","../src/types/api/ethereumSignTransaction.ts","../src/types/api/ethereumSignTypedData.ts","../src/types/api/ethereumVerifyMessage.ts","../src/types/api/evoluGetDelegatedIdentityKey.ts","../src/types/api/evoluGetNode.ts","../src/types/api/evoluSignRegistrationRequest.ts","../src/types/api/firmwareUpdate.ts","../src/types/api/getAccountDescriptor.ts","../src/types/api/getAccountInfo.ts","../src/types/api/getAddress.ts","../src/types/api/getCoinInfo.ts","../src/types/api/getDeviceState.ts","../src/types/api/getFeatures.ts","../src/types/api/getFirmwareHash.ts","../src/types/api/getNonce.ts","../src/types/api/getOwnershipId.ts","../src/types/api/getOwnershipProof.ts","../src/types/api/getPublicKey.ts","../src/types/api/getSettings.ts","../src/types/api/index.ts","../src/types/api/init.ts","../src/types/api/loadDevice.ts","../src/types/api/manifest.ts","../src/types/api/moneroGetAddress.ts","../src/types/api/moneroGetWatchKey.ts","../src/types/api/moneroKeyImageSync.ts","../src/types/api/moneroSignTransaction.ts","../src/types/api/nemGetAddress.ts","../src/types/api/nemSignTransaction.ts","../src/types/api/off.ts","../src/types/api/on.ts","../src/types/api/pushTransaction.ts","../src/types/api/recoveryDevice.ts","../src/types/api/removeAllListeners.ts","../src/types/api/renderWebUSBButton.ts","../src/types/api/requestLogin.ts","../src/types/api/requestWebUSBDevice.ts","../src/types/api/resetDevice.ts","../src/types/api/rippleGetAddress.ts","../src/types/api/rippleSignTransaction.ts","../src/types/api/setBrightness.ts","../src/types/api/setBusy.ts","../src/types/api/setProxy.ts","../src/types/api/setTransports.ts","../src/types/api/showDeviceTutorial.ts","../src/types/api/signMessage.ts","../src/types/api/signTransaction.ts","../src/types/api/solanaComposeTransaction.ts","../src/types/api/solanaGetAddress.ts","../src/types/api/solanaGetPublicKey.ts","../src/types/api/solanaSignTransaction.ts","../src/types/api/stellarGetAddress.ts","../src/types/api/stellarSignTransaction.ts","../src/types/api/tezosGetAddress.ts","../src/types/api/tezosGetPublicKey.ts","../src/types/api/tezosSignTransaction.ts","../src/types/api/thpGetCredentials.ts","../src/types/api/thpRemoveCredentials.ts","../src/types/api/uiResponse.ts","../src/types/api/unlockPath.ts","../src/types/api/verifyMessage.ts","../src/types/api/wipeDevice.ts","../src/types/api/bitcoin/index.ts","../src/types/api/cardano/index.ts","../src/types/api/eos/index.ts","../src/types/api/ethereum/index.ts","../src/types/api/monero/index.ts","../src/types/api/nem/index.ts","../src/types/api/ripple/index.ts","../src/types/api/solana/index.ts","../src/types/api/stellar/index.ts","../src/types/api/tezos/index.ts","../src/utils/accountUtils.ts","../src/utils/addressUtils.ts","../src/utils/assetUtils.ts","../src/utils/assets-browser.ts","../src/utils/assets.native.ts","../src/utils/assets.ts","../src/utils/assetsTypes.ts","../src/utils/debug.ts","../src/utils/deviceFeaturesUtils.ts","../src/utils/ethereumUtils.ts","../src/utils/firmwareReleaseConfigUtils.ts","../src/utils/firmwareUtils.ts","../src/utils/formatUtils.ts","../src/utils/hdnodeUtils.ts","../src/utils/interactionTimeout.ts","../src/utils/pathUtils.ts","../src/utils/popupPromiseManager.ts","../src/utils/proxy-event-emitter.ts","../src/utils/uiPromiseManager.ts","../src/utils/urlUtils.ts","../src/utils/versionCheck.ts","../src/workers/workers-browser.ts","../src/workers/workers.native.ts","../src/workers/workers.ts"],"version":"5.8.3"}
|
|
@@ -12,11 +12,11 @@ export declare const ApplySettings: import("@trezor/schema-utils").TObject<{
|
|
|
12
12
|
experimental_features: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
13
13
|
hide_passphrase_from_host: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
14
14
|
haptic_feedback: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
15
|
+
auto_lock_delay_battery_ms: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
15
16
|
use_passphrase: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
16
17
|
homescreen: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
17
18
|
_passphrase_source: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
18
19
|
homescreen_length: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
19
|
-
auto_lock_delay_battery_ms: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
20
20
|
passphrase_source: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TNumber>;
|
|
21
21
|
}>;
|
|
22
22
|
export declare function applySettings(params: Params<ApplySettings>): Response<PROTO.Success>;
|
|
@@ -238,6 +238,7 @@ export interface EthereumSignTypedData<T extends EthereumSignTypedDataTypes> {
|
|
|
238
238
|
metamask_v4_compat: boolean;
|
|
239
239
|
domain_separator_hash?: undefined;
|
|
240
240
|
message_hash?: undefined;
|
|
241
|
+
show_message_hash?: boolean;
|
|
241
242
|
}
|
|
242
243
|
export declare const EthereumSignTypedData: import("@trezor/schema-utils").TObject<{
|
|
243
244
|
path: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>]>;
|
|
@@ -261,6 +262,7 @@ export declare const EthereumSignTypedData: import("@trezor/schema-utils").TObje
|
|
|
261
262
|
metamask_v4_compat: import("@trezor/schema-utils").TBoolean;
|
|
262
263
|
domain_separator_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
|
|
263
264
|
message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
|
|
265
|
+
show_message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
264
266
|
}>;
|
|
265
267
|
export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
|
|
266
268
|
path: DerivationPath;
|
|
@@ -268,6 +270,7 @@ export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
|
|
|
268
270
|
metamask_v4_compat: boolean;
|
|
269
271
|
domain_separator_hash: string;
|
|
270
272
|
message_hash?: string;
|
|
273
|
+
show_message_hash?: boolean;
|
|
271
274
|
}
|
|
272
275
|
export declare const EthereumSignTypedHash: import("@trezor/schema-utils").TObject<{
|
|
273
276
|
path: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>]>;
|
|
@@ -291,6 +294,7 @@ export declare const EthereumSignTypedHash: import("@trezor/schema-utils").TObje
|
|
|
291
294
|
metamask_v4_compat: import("@trezor/schema-utils").TBoolean;
|
|
292
295
|
domain_separator_hash: import("@trezor/schema-utils").TString;
|
|
293
296
|
message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
|
|
297
|
+
show_message_hash: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
|
|
294
298
|
}>;
|
|
295
299
|
export type EthereumVerifyMessage = Static<typeof EthereumVerifyMessage>;
|
|
296
300
|
export declare const EthereumVerifyMessage: import("@trezor/schema-utils").TObject<{
|
|
@@ -79,6 +79,7 @@ exports.EthereumSignTypedData = schema_utils_1.Type.Object({
|
|
|
79
79
|
metamask_v4_compat: schema_utils_1.Type.Boolean(),
|
|
80
80
|
domain_separator_hash: schema_utils_1.Type.Optional(schema_utils_1.Type.Undefined()),
|
|
81
81
|
message_hash: schema_utils_1.Type.Optional(schema_utils_1.Type.Undefined()),
|
|
82
|
+
show_message_hash: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
82
83
|
});
|
|
83
84
|
exports.EthereumSignTypedHash = schema_utils_1.Type.Object({
|
|
84
85
|
path: params_1.DerivationPath,
|
|
@@ -86,6 +87,7 @@ exports.EthereumSignTypedHash = schema_utils_1.Type.Object({
|
|
|
86
87
|
metamask_v4_compat: schema_utils_1.Type.Boolean(),
|
|
87
88
|
domain_separator_hash: schema_utils_1.Type.String(),
|
|
88
89
|
message_hash: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
|
|
90
|
+
show_message_hash: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
89
91
|
});
|
|
90
92
|
exports.EthereumVerifyMessage = schema_utils_1.Type.Object({
|
|
91
93
|
address: schema_utils_1.Type.String(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PROTO } from '../../constants';
|
|
2
|
+
import { Params, Response } from '../params';
|
|
3
|
+
export declare function evoluGetDelegatedIdentityKey(params: Params<{
|
|
4
|
+
thp?: {
|
|
5
|
+
staticHostKey: string;
|
|
6
|
+
credential: string;
|
|
7
|
+
};
|
|
8
|
+
}>): Response<PROTO.EvoluDelegatedIdentityKey>;
|
|
9
|
+
//# sourceMappingURL=evoluGetDelegatedIdentityKey.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PROTO } from '../../constants';
|
|
2
|
+
import { Params, Response } from '../params';
|
|
3
|
+
export declare function evoluSignRegistrationRequest(params: Params<PROTO.EvoluSignRegistrationRequest>): Response<PROTO.EvoluRegistrationRequest>;
|
|
4
|
+
//# sourceMappingURL=evoluSignRegistrationRequest.d.ts.map
|
package/lib/types/api/index.d.ts
CHANGED
|
@@ -40,7 +40,9 @@ import { ethereumSignMessage } from './ethereumSignMessage';
|
|
|
40
40
|
import { ethereumSignTransaction } from './ethereumSignTransaction';
|
|
41
41
|
import { ethereumSignTypedData } from './ethereumSignTypedData';
|
|
42
42
|
import { ethereumVerifyMessage } from './ethereumVerifyMessage';
|
|
43
|
+
import { evoluGetDelegatedIdentityKey } from './evoluGetDelegatedIdentityKey';
|
|
43
44
|
import { evoluGetNode } from './evoluGetNode';
|
|
45
|
+
import { evoluSignRegistrationRequest } from './evoluSignRegistrationRequest';
|
|
44
46
|
import { firmwareUpdate } from './firmwareUpdate';
|
|
45
47
|
import { getAccountDescriptor } from './getAccountDescriptor';
|
|
46
48
|
import { getAccountInfo } from './getAccountInfo';
|
|
@@ -128,6 +130,8 @@ export interface TrezorConnect {
|
|
|
128
130
|
changeWipeCode: typeof changeWipeCode;
|
|
129
131
|
cipherKeyValue: typeof cipherKeyValue;
|
|
130
132
|
evoluGetNode: typeof evoluGetNode;
|
|
133
|
+
evoluSignRegistrationRequest: typeof evoluSignRegistrationRequest;
|
|
134
|
+
evoluGetDelegatedIdentityKey: typeof evoluGetDelegatedIdentityKey;
|
|
131
135
|
composeTransaction: typeof composeTransaction;
|
|
132
136
|
dispose: typeof dispose;
|
|
133
137
|
eosGetPublicKey: typeof eosGetPublicKey;
|
package/lib/types/device.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export type KnownDevice = BaseDevice & {
|
|
|
73
73
|
transportSessionOwner?: undefined;
|
|
74
74
|
hid?: undefined;
|
|
75
75
|
bluetoothProps?: BluetoothDeviceProps;
|
|
76
|
+
usb_connected?: boolean;
|
|
77
|
+
wireless_connected?: boolean;
|
|
76
78
|
};
|
|
77
79
|
export type UnknownDevice = BaseDevice & {
|
|
78
80
|
type: 'unacquired';
|
|
@@ -120,5 +122,7 @@ export type Device = KnownDevice | UnknownDevice | UnreadableDevice;
|
|
|
120
122
|
export type Features = PROTO.Features;
|
|
121
123
|
export type DisplayRotation = PROTO.DisplayRotation;
|
|
122
124
|
export type StrictFeatures = Features & FeaturesNarrowing;
|
|
125
|
+
export type ProofOfDelegatedIdentity = string & Branded<'ProofOfDelegatedIdentity'>;
|
|
126
|
+
export declare const asProofOfDelegatedIdentity: (value: string) => ProofOfDelegatedIdentity;
|
|
123
127
|
export {};
|
|
124
128
|
//# sourceMappingURL=device.d.ts.map
|
package/lib/types/device.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asBluetoothDeviceId = exports.asDeviceUniquePath = void 0;
|
|
3
|
+
exports.asProofOfDelegatedIdentity = exports.asBluetoothDeviceId = exports.asDeviceUniquePath = void 0;
|
|
4
4
|
const asDeviceUniquePath = (id) => id;
|
|
5
5
|
exports.asDeviceUniquePath = asDeviceUniquePath;
|
|
6
6
|
const asBluetoothDeviceId = (id) => id;
|
|
7
7
|
exports.asBluetoothDeviceId = asBluetoothDeviceId;
|
|
8
|
+
const asProofOfDelegatedIdentity = (value) => value;
|
|
9
|
+
exports.asProofOfDelegatedIdentity = asProofOfDelegatedIdentity;
|
|
8
10
|
//# sourceMappingURL=device.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0-beta.1",
|
|
4
4
|
"author": "Trezor <info@trezor.io>",
|
|
5
5
|
"homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
|
|
6
6
|
"description": "High-level javascript interface for Trezor hardware wallet.",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"prepublish": "yarn tsx ../../scripts/prepublish.js"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@ethereumjs/common": "^10.
|
|
72
|
-
"@ethereumjs/tx": "^10.
|
|
71
|
+
"@ethereumjs/common": "^10.1.0",
|
|
72
|
+
"@ethereumjs/tx": "^10.1.0",
|
|
73
73
|
"@fivebinaries/coin-selection": "3.0.0",
|
|
74
74
|
"@mobily/ts-belt": "^3.13.1",
|
|
75
75
|
"@noble/hashes": "^1.6.1",
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"@solana-program/token": "^0.5.1",
|
|
80
80
|
"@solana-program/token-2022": "^0.4.2",
|
|
81
81
|
"@solana/kit": "^2.3.0",
|
|
82
|
-
"@trezor/blockchain-link": "2.
|
|
83
|
-
"@trezor/blockchain-link-types": "1.
|
|
84
|
-
"@trezor/blockchain-link-utils": "1.
|
|
85
|
-
"@trezor/connect-analytics": "1.
|
|
86
|
-
"@trezor/connect-common": "0.
|
|
82
|
+
"@trezor/blockchain-link": "2.6.0-beta.1",
|
|
83
|
+
"@trezor/blockchain-link-types": "1.5.0-beta.1",
|
|
84
|
+
"@trezor/blockchain-link-utils": "1.5.0-beta.1",
|
|
85
|
+
"@trezor/connect-analytics": "1.4.0-beta.1",
|
|
86
|
+
"@trezor/connect-common": "0.5.0-beta.1",
|
|
87
87
|
"@trezor/crypto-utils": "1.1.5",
|
|
88
|
-
"@trezor/device-authenticity": "1.0.
|
|
88
|
+
"@trezor/device-authenticity": "1.1.0-beta.1",
|
|
89
89
|
"@trezor/device-utils": "1.1.5-beta.1",
|
|
90
|
-
"@trezor/env-utils": "^1.
|
|
91
|
-
"@trezor/protobuf": "1.
|
|
92
|
-
"@trezor/protocol": "1.
|
|
90
|
+
"@trezor/env-utils": "^1.5.0-beta.1",
|
|
91
|
+
"@trezor/protobuf": "1.5.0-beta.1",
|
|
92
|
+
"@trezor/protocol": "1.3.0-beta.1",
|
|
93
93
|
"@trezor/schema-utils": "1.3.4",
|
|
94
|
-
"@trezor/transport": "1.
|
|
95
|
-
"@trezor/type-utils": "1.1
|
|
94
|
+
"@trezor/transport": "1.6.0-beta.1",
|
|
95
|
+
"@trezor/type-utils": "1.2.0-beta.1",
|
|
96
96
|
"@trezor/utils": "9.4.5-beta.1",
|
|
97
97
|
"@trezor/utxo-lib": "2.4.5-beta.1",
|
|
98
98
|
"blakejs": "^1.2.1",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"jws": "^4.0.0"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@babel/preset-typescript": "^7.
|
|
106
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
107
107
|
"@trezor/eslint": "1.0.0",
|
|
108
108
|
"@trezor/trezor-user-env-link": "1.0.2",
|
|
109
109
|
"@types/jws": "^3.2.10",
|