@trezor/connect 9.4.2-beta.1 → 9.4.2-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 +31 -5
- package/README.md +1 -1
- package/lib/api/cardano/cardanoInputs.d.ts +7 -7
- package/lib/api/cardano/cardanoOutputs.d.ts +22 -22
- package/lib/api/cardano/cardanoTokenBundle.d.ts +5 -5
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +56 -56
- package/lib/api/ethereum/ethereumDefinitions.d.ts +20 -20
- package/lib/backend/Blockchain.js +10 -3
- package/lib/constants/nem.d.ts +3 -3
- package/lib/core/index.js +24 -13
- package/lib/data/connectSettings.js +3 -0
- package/lib/data/deviceAuthenticityConfigTypes.d.ts +23 -23
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +15 -11
- package/lib/device/Device.js +19 -15
- package/lib/device/DeviceCommands.d.ts +40 -10
- package/lib/device/DeviceCommands.js +25 -90
- package/lib/device/DeviceList.d.ts +2 -2
- package/lib/device/DeviceList.js +2 -3
- package/lib/device/prompts.d.ts +15 -0
- package/lib/device/prompts.js +63 -0
- package/lib/events/ui-response.d.ts +3 -3
- package/lib/types/api/applySettings.d.ts +13 -13
- package/lib/types/api/authenticateDevice.d.ts +24 -24
- package/lib/types/api/authorizeCoinjoin.d.ts +9 -9
- package/lib/types/api/binance/index.d.ts +142 -142
- package/lib/types/api/bitcoin/index.d.ts +10 -10
- 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 +7 -7
- package/lib/types/api/eos/index.d.ts +525 -525
- 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 +23 -23
- package/lib/types/api/nem/index.d.ts +611 -611
- 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/solana/index.d.ts +23 -23
- package/lib/types/api/stellar/index.d.ts +581 -581
- package/lib/types/api/tezos/index.d.ts +120 -120
- package/lib/types/api/unlockPath.d.ts +2 -2
- package/lib/types/coinInfo.d.ts +224 -224
- package/lib/types/fees.d.ts +19 -19
- package/lib/types/firmware.d.ts +1 -1
- package/lib/types/params.d.ts +14 -14
- package/lib/types/settings.d.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,42 @@
|
|
|
1
1
|
| Package | Stable | Canary |
|
|
2
2
|
| :------------------------------: | :----: | :----------: |
|
|
3
|
-
| npm @trezor/connect | 9.4.1 | 9.4.2-beta.
|
|
4
|
-
| npm @trezor/connect-web | 9.4.1 | 9.4.2-beta.
|
|
5
|
-
| npm @trezor/connect-webextension | 9.4.1 | 9.4.2-beta.
|
|
3
|
+
| npm @trezor/connect | 9.4.1 | 9.4.2-beta.2 |
|
|
4
|
+
| npm @trezor/connect-web | 9.4.1 | 9.4.2-beta.2 |
|
|
5
|
+
| npm @trezor/connect-webextension | 9.4.1 | 9.4.2-beta.2 |
|
|
6
6
|
|
|
7
7
|
| Deployment | Stable | Canary |
|
|
8
8
|
| :----------------: | :----: | :----------: |
|
|
9
|
-
| connect.trezor.io/ | 9.4.1 | 9.4.2-beta.
|
|
9
|
+
| connect.trezor.io/ | 9.4.1 | 9.4.2-beta.2 |
|
|
10
10
|
|
|
11
11
|
Use the persistent link [connect.trezor.io/9](https://connect.trezor.io/9/) to access the latest stable version of Connect Explorer.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
# 9.4.2-beta.2
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- feat(connect): return device info with method response (a378def)
|
|
18
|
+
- docs(connect-explorer): flowchart for auto core mode (9501d3d)
|
|
19
|
+
- docs(connect-explorer): diagram and explanation for core in popup (3bbb032)
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
|
|
23
|
+
- Fixing an issue with typescript not being able to resolve @sinclair/typebox and USB types correctly (98d6437)
|
|
24
|
+
- Fixing regression that made it impossible to acquire (steal) device session over webusb (5cf83b4)
|
|
25
|
+
- Couple of other fixes and improvements of device handling:
|
|
26
|
+
|
|
27
|
+
- fix(connect): pending transport event fix (231899f)
|
|
28
|
+
- fix(connect): DeviceList create devices sequentially (b4a915b)
|
|
29
|
+
- chore(connect): use cancelableAction instead of \_cancelableRequestBySend (66c9beb)
|
|
30
|
+
- fix(connect): Device prompts cancel action (pin, word, passphrase) (e8257f4)
|
|
31
|
+
|
|
32
|
+
- Connect Explorer fixes:
|
|
33
|
+
|
|
34
|
+
- fix(connect-explorer): icons on index page (fef3791)
|
|
35
|
+
- fix(connect-explorer): Button as Link not working (d788a06)
|
|
36
|
+
- chore(connect-explorer): improve fallback schema illustration (d0619b7)
|
|
37
|
+
- chore(connect-explorer): improve typography (f730904)
|
|
38
|
+
|
|
39
|
+
# 9.4.2-beta.1
|
|
14
40
|
|
|
15
41
|
### Features
|
|
16
42
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @trezor/connect
|
|
2
2
|
|
|
3
|
-
API version 9.4.2-beta.
|
|
3
|
+
API version 9.4.2-beta.2
|
|
4
4
|
|
|
5
5
|
[](https://github.com/trezor/trezor-suite/actions/workflows/test-connect.yml)
|
|
6
6
|
[](https://www.npmjs.org/package/@trezor/connect)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PROTO } from '../../constants';
|
|
2
2
|
import { Static } from '@trezor/schema-utils';
|
|
3
3
|
export type Path = number[];
|
|
4
|
-
export declare const Path: import("@sinclair/typebox
|
|
4
|
+
export declare const Path: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
5
5
|
export type CollateralInputWithPath = {
|
|
6
6
|
collateralInput: PROTO.CardanoTxCollateralInput;
|
|
7
7
|
path?: Path;
|
|
@@ -9,16 +9,16 @@ export type CollateralInputWithPath = {
|
|
|
9
9
|
export type InputWithPath = Static<typeof InputWithPath>;
|
|
10
10
|
export declare const InputWithPath: import("@trezor/schema-utils").TObject<{
|
|
11
11
|
input: import("@trezor/schema-utils").TObject<{
|
|
12
|
-
prev_hash: import("@sinclair/typebox
|
|
13
|
-
prev_index: import("@sinclair/typebox
|
|
12
|
+
prev_hash: import("@sinclair/typebox").TString;
|
|
13
|
+
prev_index: import("@sinclair/typebox").TNumber;
|
|
14
14
|
}>;
|
|
15
|
-
path: import("@sinclair/typebox
|
|
15
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
|
|
16
16
|
}>;
|
|
17
17
|
export type InputWithPathParam = Static<typeof InputWithPath>;
|
|
18
18
|
export declare const InputWithPathParam: import("@trezor/schema-utils").TObject<{
|
|
19
|
-
prev_hash: import("@sinclair/typebox
|
|
20
|
-
prev_index: import("@sinclair/typebox
|
|
21
|
-
path: import("@sinclair/typebox
|
|
19
|
+
prev_hash: import("@sinclair/typebox").TString;
|
|
20
|
+
prev_index: import("@sinclair/typebox").TNumber;
|
|
21
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
|
|
22
22
|
}>;
|
|
23
23
|
export declare const transformInput: (input: unknown) => InputWithPath;
|
|
24
24
|
export declare const transformCollateralInput: (collateralInput: unknown) => CollateralInputWithPath;
|
|
@@ -7,32 +7,32 @@ export type OutputWithData = {
|
|
|
7
7
|
referenceScript?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const OutputValidation: import("@trezor/schema-utils").TObject<{
|
|
10
|
-
address: import("@sinclair/typebox
|
|
10
|
+
address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
11
|
amount: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
|
|
12
|
-
tokenBundle: import("@sinclair/typebox
|
|
13
|
-
policyId: import("@sinclair/typebox
|
|
14
|
-
tokenAmounts: import("@sinclair/typebox
|
|
15
|
-
assetNameBytes: import("@sinclair/typebox
|
|
16
|
-
amount: import("@sinclair/typebox
|
|
17
|
-
mintAmount: import("@sinclair/typebox
|
|
12
|
+
tokenBundle: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
13
|
+
policyId: import("@sinclair/typebox").TString;
|
|
14
|
+
tokenAmounts: import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
15
|
+
assetNameBytes: import("@sinclair/typebox").TString;
|
|
16
|
+
amount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
|
+
mintAmount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
18
18
|
}>>;
|
|
19
19
|
}>>>;
|
|
20
|
-
datumHash: import("@sinclair/typebox
|
|
21
|
-
format: import("@sinclair/typebox
|
|
22
|
-
inlineDatum: import("@sinclair/typebox
|
|
23
|
-
referenceScript: import("@sinclair/typebox
|
|
24
|
-
addressParameters: import("@sinclair/typebox
|
|
25
|
-
addressType: import("@sinclair/typebox
|
|
26
|
-
path: import("@sinclair/typebox
|
|
27
|
-
stakingPath: import("@sinclair/typebox
|
|
28
|
-
stakingKeyHash: import("@sinclair/typebox
|
|
29
|
-
certificatePointer: import("@sinclair/typebox
|
|
30
|
-
blockIndex: import("@sinclair/typebox
|
|
31
|
-
txIndex: import("@sinclair/typebox
|
|
32
|
-
certificateIndex: import("@sinclair/typebox
|
|
20
|
+
datumHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
|
+
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
22
|
+
inlineDatum: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
23
|
+
referenceScript: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
addressParameters: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
25
|
+
addressType: import("@sinclair/typebox").TEnum<typeof PROTO.CardanoAddressType>;
|
|
26
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
|
|
27
|
+
stakingPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
|
|
28
|
+
stakingKeyHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
certificatePointer: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
30
|
+
blockIndex: import("@sinclair/typebox").TNumber;
|
|
31
|
+
txIndex: import("@sinclair/typebox").TNumber;
|
|
32
|
+
certificateIndex: import("@sinclair/typebox").TNumber;
|
|
33
33
|
}>>;
|
|
34
|
-
paymentScriptHash: import("@sinclair/typebox
|
|
35
|
-
stakingScriptHash: import("@sinclair/typebox
|
|
34
|
+
paymentScriptHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
35
|
+
stakingScriptHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
36
36
|
}>>;
|
|
37
37
|
}>;
|
|
38
38
|
export declare const transformOutput: (output: unknown) => OutputWithData;
|
|
@@ -2,11 +2,11 @@ import { CardanoAssetGroup } from '../../types/api/cardano';
|
|
|
2
2
|
import { Static } from '@trezor/schema-utils';
|
|
3
3
|
export type AssetGroupWithTokens = Static<typeof AssetGroupWithTokens>;
|
|
4
4
|
export declare const AssetGroupWithTokens: import("@trezor/schema-utils").TObject<{
|
|
5
|
-
policyId: import("@sinclair/typebox
|
|
6
|
-
tokens: import("@sinclair/typebox
|
|
7
|
-
asset_name_bytes: import("@sinclair/typebox
|
|
8
|
-
amount: import("@sinclair/typebox
|
|
9
|
-
mint_amount: import("@sinclair/typebox
|
|
5
|
+
policyId: import("@sinclair/typebox").TString;
|
|
6
|
+
tokens: import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
7
|
+
asset_name_bytes: import("@sinclair/typebox").TString;
|
|
8
|
+
amount: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
9
|
+
mint_amount: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
|
|
10
10
|
}>>;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const tokenBundleToProto: (tokenBundle: CardanoAssetGroup[]) => AssetGroupWithTokens[];
|
|
@@ -7,86 +7,86 @@ type Params = (Omit<EthereumSignTypedDataParams<EthereumSignTypedDataTypes>, 'pa
|
|
|
7
7
|
network?: EthereumNetworkInfo;
|
|
8
8
|
definitions?: MessagesSchema.EthereumDefinitions;
|
|
9
9
|
};
|
|
10
|
-
declare const Params: import("@sinclair/typebox
|
|
10
|
+
declare const Params: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TUnion<[import("@trezor/schema-utils").TObject<{
|
|
11
11
|
data: import("@trezor/schema-utils").TObject<{
|
|
12
12
|
types: import("@trezor/schema-utils").TObject<{
|
|
13
|
-
EIP712Domain: import("@sinclair/typebox
|
|
14
|
-
name: import("@sinclair/typebox
|
|
15
|
-
type: import("@sinclair/typebox
|
|
13
|
+
EIP712Domain: import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
14
|
+
name: import("@sinclair/typebox").TString;
|
|
15
|
+
type: import("@sinclair/typebox").TString;
|
|
16
16
|
}>>;
|
|
17
17
|
}>;
|
|
18
|
-
primaryType: import("@sinclair/typebox
|
|
18
|
+
primaryType: import("@sinclair/typebox").TString;
|
|
19
19
|
domain: import("@trezor/schema-utils").TObject<{
|
|
20
|
-
name: import("@sinclair/typebox
|
|
21
|
-
version: import("@sinclair/typebox
|
|
22
|
-
chainId: import("@sinclair/typebox
|
|
23
|
-
verifyingContract: import("@sinclair/typebox
|
|
24
|
-
salt: import("@sinclair/typebox
|
|
20
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
|
+
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
22
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>>;
|
|
23
|
+
verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@trezor/schema-utils/lib/custom-types/array-buffer").TArrayBuffer, import("@sinclair/typebox").TString]>>;
|
|
25
25
|
}>;
|
|
26
26
|
message: import("@trezor/schema-utils").TObject<{}>;
|
|
27
27
|
}>;
|
|
28
|
-
metamask_v4_compat: import("@sinclair/typebox
|
|
29
|
-
domain_separator_hash: import("@sinclair/typebox
|
|
30
|
-
message_hash: import("@sinclair/typebox
|
|
28
|
+
metamask_v4_compat: import("@sinclair/typebox").TBoolean;
|
|
29
|
+
domain_separator_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
30
|
+
message_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
31
31
|
}>, import("@trezor/schema-utils").TObject<{
|
|
32
32
|
data: import("@trezor/schema-utils").TObject<{
|
|
33
33
|
types: import("@trezor/schema-utils").TObject<{
|
|
34
|
-
EIP712Domain: import("@sinclair/typebox
|
|
35
|
-
name: import("@sinclair/typebox
|
|
36
|
-
type: import("@sinclair/typebox
|
|
34
|
+
EIP712Domain: import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
35
|
+
name: import("@sinclair/typebox").TString;
|
|
36
|
+
type: import("@sinclair/typebox").TString;
|
|
37
37
|
}>>;
|
|
38
38
|
}>;
|
|
39
|
-
primaryType: import("@sinclair/typebox
|
|
39
|
+
primaryType: import("@sinclair/typebox").TString;
|
|
40
40
|
domain: import("@trezor/schema-utils").TObject<{
|
|
41
|
-
name: import("@sinclair/typebox
|
|
42
|
-
version: import("@sinclair/typebox
|
|
43
|
-
chainId: import("@sinclair/typebox
|
|
44
|
-
verifyingContract: import("@sinclair/typebox
|
|
45
|
-
salt: import("@sinclair/typebox
|
|
41
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
42
|
+
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
43
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>>;
|
|
44
|
+
verifyingContract: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@trezor/schema-utils/lib/custom-types/array-buffer").TArrayBuffer, import("@sinclair/typebox").TString]>>;
|
|
46
46
|
}>;
|
|
47
47
|
message: import("@trezor/schema-utils").TObject<{}>;
|
|
48
48
|
}>;
|
|
49
|
-
metamask_v4_compat: import("@sinclair/typebox
|
|
50
|
-
domain_separator_hash: import("@sinclair/typebox
|
|
51
|
-
message_hash: import("@sinclair/typebox
|
|
49
|
+
metamask_v4_compat: import("@sinclair/typebox").TBoolean;
|
|
50
|
+
domain_separator_hash: import("@sinclair/typebox").TString;
|
|
51
|
+
message_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
52
|
}>]>, import("@trezor/schema-utils").TObject<{
|
|
53
|
-
address_n: import("@sinclair/typebox
|
|
54
|
-
network: import("@sinclair/typebox
|
|
55
|
-
label: import("@sinclair/typebox
|
|
56
|
-
name: import("@sinclair/typebox
|
|
57
|
-
shortcut: import("@sinclair/typebox
|
|
58
|
-
slip44: import("@sinclair/typebox
|
|
53
|
+
address_n: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
|
|
54
|
+
network: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
|
|
55
|
+
label: import("@sinclair/typebox").TString;
|
|
56
|
+
name: import("@sinclair/typebox").TString;
|
|
57
|
+
shortcut: import("@sinclair/typebox").TString;
|
|
58
|
+
slip44: import("@sinclair/typebox").TNumber;
|
|
59
59
|
support: import("@trezor/schema-utils").TObject<{
|
|
60
|
-
connect: import("@sinclair/typebox
|
|
61
|
-
T1B1: import("@sinclair/typebox
|
|
62
|
-
T2T1: import("@sinclair/typebox
|
|
63
|
-
T2B1: import("@sinclair/typebox
|
|
64
|
-
T3B1: import("@sinclair/typebox
|
|
65
|
-
T3T1: import("@sinclair/typebox
|
|
60
|
+
connect: import("@sinclair/typebox").TBoolean;
|
|
61
|
+
T1B1: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TLiteral<false>]>;
|
|
62
|
+
T2T1: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TLiteral<false>]>;
|
|
63
|
+
T2B1: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TLiteral<false>]>;
|
|
64
|
+
T3B1: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TLiteral<false>]>;
|
|
65
|
+
T3T1: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TLiteral<false>]>;
|
|
66
66
|
}>;
|
|
67
|
-
decimals: import("@sinclair/typebox
|
|
68
|
-
blockchainLink: import("@sinclair/typebox
|
|
69
|
-
type: import("@sinclair/typebox
|
|
70
|
-
url: import("@sinclair/typebox
|
|
67
|
+
decimals: import("@sinclair/typebox").TNumber;
|
|
68
|
+
blockchainLink: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
69
|
+
type: import("@sinclair/typebox").TString;
|
|
70
|
+
url: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
71
71
|
}>>;
|
|
72
|
-
blockTime: import("@sinclair/typebox
|
|
73
|
-
minFee: import("@sinclair/typebox
|
|
74
|
-
maxFee: import("@sinclair/typebox
|
|
75
|
-
defaultFees: import("@sinclair/typebox
|
|
76
|
-
label: import("@sinclair/typebox
|
|
77
|
-
feePerUnit: import("@sinclair/typebox
|
|
78
|
-
blocks: import("@sinclair/typebox
|
|
79
|
-
feeLimit: import("@sinclair/typebox
|
|
80
|
-
feePerTx: import("@sinclair/typebox
|
|
72
|
+
blockTime: import("@sinclair/typebox").TNumber;
|
|
73
|
+
minFee: import("@sinclair/typebox").TNumber;
|
|
74
|
+
maxFee: import("@sinclair/typebox").TNumber;
|
|
75
|
+
defaultFees: import("@sinclair/typebox").TArray<import("@trezor/schema-utils").TObject<{
|
|
76
|
+
label: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"high">, import("@sinclair/typebox").TLiteral<"normal">, import("@sinclair/typebox").TLiteral<"economy">, import("@sinclair/typebox").TLiteral<"low">, import("@sinclair/typebox").TLiteral<"custom">]>;
|
|
77
|
+
feePerUnit: import("@sinclair/typebox").TString;
|
|
78
|
+
blocks: import("@sinclair/typebox").TNumber;
|
|
79
|
+
feeLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
80
|
+
feePerTx: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
81
81
|
}>>;
|
|
82
82
|
}>, import("@trezor/schema-utils").TObject<{
|
|
83
|
-
type: import("@sinclair/typebox
|
|
84
|
-
chainId: import("@sinclair/typebox
|
|
85
|
-
network: import("@sinclair/typebox
|
|
83
|
+
type: import("@sinclair/typebox").TLiteral<"ethereum">;
|
|
84
|
+
chainId: import("@sinclair/typebox").TNumber;
|
|
85
|
+
network: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
86
86
|
}>]>>;
|
|
87
|
-
definitions: import("@sinclair/typebox
|
|
88
|
-
encoded_network: import("@sinclair/typebox
|
|
89
|
-
encoded_token: import("@sinclair/typebox
|
|
87
|
+
definitions: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
88
|
+
encoded_network: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/array-buffer").TArrayBuffer>;
|
|
89
|
+
encoded_token: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/array-buffer").TArrayBuffer>;
|
|
90
90
|
}>>;
|
|
91
91
|
}>]>;
|
|
92
92
|
export default class EthereumSignTypedData extends AbstractMethod<'ethereumSignTypedData', Params> {
|
|
@@ -12,33 +12,33 @@ export declare const getEthereumDefinitions: ({ chainId, slip44, contractAddress
|
|
|
12
12
|
}>;
|
|
13
13
|
export type EthereumNetworkDefinitionDecoded = Static<typeof EthereumNetworkDefinitionDecoded>;
|
|
14
14
|
export declare const EthereumNetworkDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
15
|
-
chain_id: import("@sinclair/typebox
|
|
16
|
-
name: import("@sinclair/typebox
|
|
17
|
-
slip44: import("@sinclair/typebox
|
|
18
|
-
symbol: import("@sinclair/typebox
|
|
15
|
+
chain_id: import("@sinclair/typebox").TNumber;
|
|
16
|
+
name: import("@sinclair/typebox").TString;
|
|
17
|
+
slip44: import("@sinclair/typebox").TNumber;
|
|
18
|
+
symbol: import("@sinclair/typebox").TString;
|
|
19
19
|
}>;
|
|
20
20
|
export type EthereumTokenDefinitionDecoded = Static<typeof EthereumTokenDefinitionDecoded>;
|
|
21
21
|
export declare const EthereumTokenDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
22
|
-
address: import("@sinclair/typebox
|
|
23
|
-
chain_id: import("@sinclair/typebox
|
|
24
|
-
decimals: import("@sinclair/typebox
|
|
25
|
-
name: import("@sinclair/typebox
|
|
26
|
-
symbol: import("@sinclair/typebox
|
|
22
|
+
address: import("@sinclair/typebox").TString;
|
|
23
|
+
chain_id: import("@sinclair/typebox").TNumber;
|
|
24
|
+
decimals: import("@sinclair/typebox").TNumber;
|
|
25
|
+
name: import("@sinclair/typebox").TString;
|
|
26
|
+
symbol: import("@sinclair/typebox").TString;
|
|
27
27
|
}>;
|
|
28
28
|
export type EthereumDefinitionDecoded = Static<typeof EthereumDefinitionDecoded>;
|
|
29
29
|
export declare const EthereumDefinitionDecoded: import("@trezor/schema-utils").TObject<{
|
|
30
|
-
network: import("@sinclair/typebox
|
|
31
|
-
chain_id: import("@sinclair/typebox
|
|
32
|
-
name: import("@sinclair/typebox
|
|
33
|
-
slip44: import("@sinclair/typebox
|
|
34
|
-
symbol: import("@sinclair/typebox
|
|
30
|
+
network: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
31
|
+
chain_id: import("@sinclair/typebox").TNumber;
|
|
32
|
+
name: import("@sinclair/typebox").TString;
|
|
33
|
+
slip44: import("@sinclair/typebox").TNumber;
|
|
34
|
+
symbol: import("@sinclair/typebox").TString;
|
|
35
35
|
}>>;
|
|
36
|
-
token: import("@sinclair/typebox
|
|
37
|
-
address: import("@sinclair/typebox
|
|
38
|
-
chain_id: import("@sinclair/typebox
|
|
39
|
-
decimals: import("@sinclair/typebox
|
|
40
|
-
name: import("@sinclair/typebox
|
|
41
|
-
symbol: import("@sinclair/typebox
|
|
36
|
+
token: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
37
|
+
address: import("@sinclair/typebox").TString;
|
|
38
|
+
chain_id: import("@sinclair/typebox").TNumber;
|
|
39
|
+
decimals: import("@sinclair/typebox").TNumber;
|
|
40
|
+
name: import("@sinclair/typebox").TString;
|
|
41
|
+
symbol: import("@sinclair/typebox").TString;
|
|
42
42
|
}>>;
|
|
43
43
|
}>;
|
|
44
44
|
export declare const decodeEthereumDefinition: (encodedDefinition: MessagesSchema.EthereumDefinitions) => EthereumDefinitionDecoded;
|
|
@@ -22,12 +22,18 @@ const getWorker = (type) => {
|
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const getNormalizedTrezorShortcut = (shortcut) => {
|
|
26
26
|
if (shortcut === 'tXRP') {
|
|
27
27
|
return 'XRP';
|
|
28
28
|
}
|
|
29
29
|
return shortcut;
|
|
30
30
|
};
|
|
31
|
+
const getNormalizedBackendShortcut = (shortcut) => {
|
|
32
|
+
if (shortcut.toLowerCase() === 'matic') {
|
|
33
|
+
return 'pol';
|
|
34
|
+
}
|
|
35
|
+
return shortcut;
|
|
36
|
+
};
|
|
31
37
|
class Blockchain {
|
|
32
38
|
constructor(options) {
|
|
33
39
|
this.feeForBlock = [];
|
|
@@ -78,8 +84,9 @@ class Blockchain {
|
|
|
78
84
|
throw constants_1.ERRORS.TypedError('Backend_Error', error.message);
|
|
79
85
|
}
|
|
80
86
|
this.serverInfo = info;
|
|
81
|
-
const
|
|
82
|
-
|
|
87
|
+
const trezorShortcut = getNormalizedTrezorShortcut(this.coinInfo.shortcut);
|
|
88
|
+
const backendShortcut = getNormalizedBackendShortcut(this.serverInfo.shortcut);
|
|
89
|
+
if (trezorShortcut.toLowerCase() !== backendShortcut.toLowerCase()) {
|
|
83
90
|
throw constants_1.ERRORS.TypedError('Backend_Invalid');
|
|
84
91
|
}
|
|
85
92
|
this.link.on('disconnected', () => {
|
package/lib/constants/nem.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare enum Networks {
|
|
|
5
5
|
mijin = 96
|
|
6
6
|
}
|
|
7
7
|
export type EnumNetworks = Static<typeof EnumNetworks>;
|
|
8
|
-
export declare const EnumNetworks: import("@sinclair/typebox
|
|
8
|
+
export declare const EnumNetworks: import("@sinclair/typebox").TEnum<typeof Networks>;
|
|
9
9
|
export declare enum TxType {
|
|
10
10
|
TRANSFER = 257,
|
|
11
11
|
COSIGNING = 258,
|
|
@@ -18,12 +18,12 @@ export declare enum TxType {
|
|
|
18
18
|
SUPPLY_CHANGE = 16386
|
|
19
19
|
}
|
|
20
20
|
export type EnumTxType = Static<typeof EnumTxType>;
|
|
21
|
-
export declare const EnumTxType: import("@sinclair/typebox
|
|
21
|
+
export declare const EnumTxType: import("@sinclair/typebox").TEnum<typeof TxType>;
|
|
22
22
|
export declare enum TxVersion {
|
|
23
23
|
mainnet = 1744830464,
|
|
24
24
|
testnet = -1744830464,
|
|
25
25
|
mijin = 1610612736
|
|
26
26
|
}
|
|
27
27
|
export type EnumTxVersion = Static<typeof EnumTxVersion>;
|
|
28
|
-
export declare const EnumTxVersion: import("@sinclair/typebox
|
|
28
|
+
export declare const EnumTxVersion: import("@sinclair/typebox").TEnum<typeof TxVersion>;
|
|
29
29
|
//# sourceMappingURL=nem.d.ts.map
|
package/lib/core/index.js
CHANGED
|
@@ -481,32 +481,42 @@ const onDevicePinHandler = (context) => async (...[device, type, callback]) => {
|
|
|
481
481
|
await waitForPopup(context);
|
|
482
482
|
const uiPromise = uiPromises.create(events_2.UI.RECEIVE_PIN, device);
|
|
483
483
|
sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_PIN, { device: device.toMessageObject(), type }));
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
try {
|
|
485
|
+
const uiResp = await uiPromise.promise;
|
|
486
|
+
callback(uiResp.payload);
|
|
487
|
+
}
|
|
488
|
+
catch (error) {
|
|
489
|
+
callback(null, error);
|
|
490
|
+
}
|
|
486
491
|
};
|
|
487
492
|
const onDeviceWordHandler = (context) => async (...[device, type, callback]) => {
|
|
488
493
|
const { uiPromises, sendCoreMessage } = context;
|
|
489
494
|
await waitForPopup(context);
|
|
490
495
|
const uiPromise = uiPromises.create(events_2.UI.RECEIVE_WORD, device);
|
|
491
496
|
sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_WORD, { device: device.toMessageObject(), type }));
|
|
492
|
-
|
|
493
|
-
|
|
497
|
+
try {
|
|
498
|
+
const uiResp = await uiPromise.promise;
|
|
499
|
+
callback(uiResp.payload);
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
callback(null, error);
|
|
503
|
+
}
|
|
494
504
|
};
|
|
495
505
|
const onDevicePassphraseHandler = (context) => async (...[device, callback]) => {
|
|
496
506
|
const { uiPromises, sendCoreMessage } = context;
|
|
497
507
|
await waitForPopup(context);
|
|
498
508
|
const uiPromise = uiPromises.create(events_2.UI.RECEIVE_PASSPHRASE, device);
|
|
499
509
|
sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_PASSPHRASE, { device: device.toMessageObject() }));
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
510
|
+
try {
|
|
511
|
+
const uiResp = await uiPromise.promise;
|
|
512
|
+
callback(uiResp.payload);
|
|
513
|
+
}
|
|
514
|
+
catch (error) {
|
|
515
|
+
callback(null, error);
|
|
516
|
+
}
|
|
507
517
|
};
|
|
508
518
|
const onEmptyPassphraseHandler = () => (...[_, callback]) => {
|
|
509
|
-
callback({
|
|
519
|
+
callback({ value: '' });
|
|
510
520
|
};
|
|
511
521
|
const onPopupClosed = (context, customErrorMessage) => {
|
|
512
522
|
const { uiPromises, popupPromise, deviceList, callMethods, resetWaitForFirstMethod, setOverridePromise, sendCoreMessage, } = context;
|
|
@@ -731,7 +741,7 @@ class Core extends events_1.default {
|
|
|
731
741
|
const onCoreEventThrottled = (message) => throttlePromise.promise.then(() => onCoreEvent(message));
|
|
732
742
|
try {
|
|
733
743
|
await DataManager_1.DataManager.load(settings);
|
|
734
|
-
const { debug, priority } = DataManager_1.DataManager.getSettings();
|
|
744
|
+
const { debug, priority, _sessionsBackgroundUrl } = DataManager_1.DataManager.getSettings();
|
|
735
745
|
const messages = DataManager_1.DataManager.getProtobufMessages();
|
|
736
746
|
(0, debug_1.enableLog)(debug);
|
|
737
747
|
this._interactionTimeout = new interactionTimeout_1.InteractionTimeout(settings.popup ? settings.interactionTimeout : 0);
|
|
@@ -739,6 +749,7 @@ class Core extends events_1.default {
|
|
|
739
749
|
debug,
|
|
740
750
|
messages,
|
|
741
751
|
priority,
|
|
752
|
+
_sessionsBackgroundUrl,
|
|
742
753
|
});
|
|
743
754
|
initDeviceList(this.getCoreContext());
|
|
744
755
|
this.on(events_2.CORE_EVENT, onCoreEventThrottled);
|
|
@@ -114,6 +114,9 @@ const parseConnectSettings = (input = {}) => {
|
|
|
114
114
|
if (typeof input._extendWebextensionLifetime === 'boolean') {
|
|
115
115
|
settings._extendWebextensionLifetime = input._extendWebextensionLifetime;
|
|
116
116
|
}
|
|
117
|
+
if (typeof input._sessionsBackgroundUrl === 'string') {
|
|
118
|
+
settings._sessionsBackgroundUrl = input._sessionsBackgroundUrl;
|
|
119
|
+
}
|
|
117
120
|
return settings;
|
|
118
121
|
};
|
|
119
122
|
exports.parseConnectSettings = parseConnectSettings;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { Static } from '@trezor/schema-utils';
|
|
2
2
|
export type DeviceAuthenticityConfig = Static<typeof DeviceAuthenticityConfig>;
|
|
3
|
-
export declare const DeviceAuthenticityConfig: import("@sinclair/typebox
|
|
4
|
-
T2B1: import("@sinclair/typebox
|
|
5
|
-
rootPubKeys: import("@sinclair/typebox
|
|
6
|
-
caPubKeys: import("@sinclair/typebox
|
|
3
|
+
export declare const DeviceAuthenticityConfig: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
|
|
4
|
+
T2B1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
|
|
5
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
6
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
7
7
|
}>, import("@trezor/schema-utils").TObject<{
|
|
8
|
-
debug: import("@sinclair/typebox
|
|
9
|
-
rootPubKeys: import("@sinclair/typebox
|
|
10
|
-
caPubKeys: import("@sinclair/typebox
|
|
8
|
+
debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
9
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
10
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
11
|
}>>;
|
|
12
12
|
}>]>;
|
|
13
|
-
T3B1: import("@sinclair/typebox
|
|
14
|
-
rootPubKeys: import("@sinclair/typebox
|
|
15
|
-
caPubKeys: import("@sinclair/typebox
|
|
13
|
+
T3B1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
|
|
14
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
15
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
16
16
|
}>, import("@trezor/schema-utils").TObject<{
|
|
17
|
-
debug: import("@sinclair/typebox
|
|
18
|
-
rootPubKeys: import("@sinclair/typebox
|
|
19
|
-
caPubKeys: import("@sinclair/typebox
|
|
17
|
+
debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
18
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
19
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
20
20
|
}>>;
|
|
21
21
|
}>]>;
|
|
22
|
-
T3T1: import("@sinclair/typebox
|
|
23
|
-
rootPubKeys: import("@sinclair/typebox
|
|
24
|
-
caPubKeys: import("@sinclair/typebox
|
|
22
|
+
T3T1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
|
|
23
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
24
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
25
25
|
}>, import("@trezor/schema-utils").TObject<{
|
|
26
|
-
debug: import("@sinclair/typebox
|
|
27
|
-
rootPubKeys: import("@sinclair/typebox
|
|
28
|
-
caPubKeys: import("@sinclair/typebox
|
|
26
|
+
debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
|
|
27
|
+
rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
28
|
+
caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
29
29
|
}>>;
|
|
30
30
|
}>]>;
|
|
31
31
|
}>, import("@trezor/schema-utils").TObject<{
|
|
32
|
-
T1B1: import("@sinclair/typebox
|
|
33
|
-
T2T1: import("@sinclair/typebox
|
|
32
|
+
T1B1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
33
|
+
T2T1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
|
|
34
34
|
}>]>, import("@trezor/schema-utils").TObject<{
|
|
35
|
-
version: import("@sinclair/typebox
|
|
36
|
-
timestamp: import("@sinclair/typebox
|
|
35
|
+
version: import("@sinclair/typebox").TNumber;
|
|
36
|
+
timestamp: import("@sinclair/typebox").TString;
|
|
37
37
|
}>]>;
|
|
38
38
|
//# sourceMappingURL=deviceAuthenticityConfigTypes.d.ts.map
|
package/lib/data/version.d.ts
CHANGED