@injectivelabs/wallet-trezor 1.16.13-alpha.0 → 1.16.13-alpha.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/dist/cjs/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const TrezorDerivationPathType: {
|
|
|
7
7
|
readonly Bip44: "bip44";
|
|
8
8
|
readonly Legacy: "legacy";
|
|
9
9
|
};
|
|
10
|
-
export type TrezorDerivationPathType = typeof TrezorDerivationPathType[keyof typeof TrezorDerivationPathType];
|
|
10
|
+
export type TrezorDerivationPathType = (typeof TrezorDerivationPathType)[keyof typeof TrezorDerivationPathType];
|
|
11
11
|
export interface TrezorWalletInfo {
|
|
12
12
|
address: string;
|
|
13
13
|
hdKey: HDNodeLike;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -23,7 +23,9 @@ const transformTypedData = (data, metamask_v4_compat = true) => {
|
|
|
23
23
|
const domainSeparatorHash = (0, sdk_ts_1.TypedDataUtilsHashStruct)('EIP712Domain', (0, sdk_ts_1.sanitizeTypedData)(domain), types, version).toString('hex');
|
|
24
24
|
let messageHash = null;
|
|
25
25
|
if (primaryType !== 'EIP712Domain') {
|
|
26
|
-
|
|
26
|
+
// For message hash, we need to pass the domain data as well
|
|
27
|
+
// We'll modify the hashStruct function to handle this
|
|
28
|
+
messageHash = (0, sdk_ts_1.TypedDataUtilsHashStruct)(primaryType, (0, sdk_ts_1.sanitizeTypedData)(message), { ...types, domain: (0, sdk_ts_1.sanitizeTypedData)(domain) }, version).toString('hex');
|
|
27
29
|
}
|
|
28
30
|
return {
|
|
29
31
|
domain_separator_hash: domainSeparatorHash,
|
|
@@ -2,7 +2,7 @@ import { TrezorException } from '@injectivelabs/exceptions';
|
|
|
2
2
|
import { addHexPrefix, publicKeyToAddress } from '@injectivelabs/sdk-ts';
|
|
3
3
|
import { DEFAULT_NUM_ADDRESSES_TO_FETCH } from '@injectivelabs/wallet-base';
|
|
4
4
|
import { loadTrezorConnect } from '../lib.js';
|
|
5
|
-
import { TrezorDerivationPathType
|
|
5
|
+
import { TrezorDerivationPathType } from '../../types.js';
|
|
6
6
|
const addressOfHDKey = (hdKey) => {
|
|
7
7
|
const shouldSanitizePublicKey = true;
|
|
8
8
|
const derivedPublicKey = hdKey.publicKey;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const TrezorDerivationPathType: {
|
|
|
7
7
|
readonly Bip44: "bip44";
|
|
8
8
|
readonly Legacy: "legacy";
|
|
9
9
|
};
|
|
10
|
-
export type TrezorDerivationPathType = typeof TrezorDerivationPathType[keyof typeof TrezorDerivationPathType];
|
|
10
|
+
export type TrezorDerivationPathType = (typeof TrezorDerivationPathType)[keyof typeof TrezorDerivationPathType];
|
|
11
11
|
export interface TrezorWalletInfo {
|
|
12
12
|
address: string;
|
|
13
13
|
hdKey: HDNodeLike;
|
package/dist/esm/utils.js
CHANGED
|
@@ -20,7 +20,9 @@ export const transformTypedData = (data, metamask_v4_compat = true) => {
|
|
|
20
20
|
const domainSeparatorHash = TypedDataUtilsHashStruct('EIP712Domain', sanitizeTypedData(domain), types, version).toString('hex');
|
|
21
21
|
let messageHash = null;
|
|
22
22
|
if (primaryType !== 'EIP712Domain') {
|
|
23
|
-
|
|
23
|
+
// For message hash, we need to pass the domain data as well
|
|
24
|
+
// We'll modify the hashStruct function to handle this
|
|
25
|
+
messageHash = TypedDataUtilsHashStruct(primaryType, sanitizeTypedData(message), { ...types, domain: sanitizeTypedData(domain) }, version).toString('hex');
|
|
24
26
|
}
|
|
25
27
|
return {
|
|
26
28
|
domain_separator_hash: domainSeparatorHash,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-trezor",
|
|
3
3
|
"description": "Trezor wallet strategy for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.16.13-alpha.
|
|
4
|
+
"version": "1.16.13-alpha.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@bangjelkoski/trezor-connect-web": "^9.4.7-beta.1",
|
|
60
|
-
"@injectivelabs/exceptions": "1.16.13-alpha.
|
|
61
|
-
"@injectivelabs/sdk-ts": "1.16.13-alpha.
|
|
62
|
-
"@injectivelabs/ts-types": "1.16.13-alpha.
|
|
63
|
-
"@injectivelabs/wallet-base": "1.16.13-alpha.
|
|
60
|
+
"@injectivelabs/exceptions": "1.16.13-alpha.2",
|
|
61
|
+
"@injectivelabs/sdk-ts": "1.16.13-alpha.2",
|
|
62
|
+
"@injectivelabs/ts-types": "1.16.13-alpha.2",
|
|
63
|
+
"@injectivelabs/wallet-base": "1.16.13-alpha.2",
|
|
64
64
|
"alchemy-sdk": "^3.4.7",
|
|
65
65
|
"viem": "^2.33.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"shx": "^0.3.3"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "c60f210698d2ee266855a6bb7342d0147964bad4"
|
|
71
71
|
}
|