@trezor/connect 9.2.0 → 9.2.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 +44 -0
- package/README.md +1 -1
- package/lib/api/binance/api/binanceSignTransaction.d.ts +1 -1
- package/lib/api/binance/binanceSignTx.d.ts +1 -1
- package/lib/api/bitcoin/Fees.d.ts +2 -2
- package/lib/api/bitcoin/TransactionComposer.d.ts +2 -2
- package/lib/api/blockchainEstimateFee.js +1 -0
- package/lib/api/cardano/cardanoOutputs.d.ts +1 -1
- package/lib/api/cardano/cardanoTokenBundle.d.ts +2 -2
- package/lib/api/changeLanguage.js +11 -5
- package/lib/api/eos/eosSignTx.d.ts +58 -58
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +8 -6
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +4 -4
- package/lib/api/getAccountInfo.d.ts +2 -2
- package/lib/api/getAccountInfo.js +3 -0
- package/lib/api/getCoinInfo.d.ts +22 -22
- package/lib/api/getFeatures.d.ts +13 -12
- package/lib/api/getPublicKey.d.ts +8 -6
- package/lib/api/nem/nemSignTx.d.ts +13 -13
- package/lib/api/stellar/stellarSignTx.d.ts +1 -1
- package/lib/api/tezos/tezosSignTx.d.ts +18 -18
- package/lib/backend/BackendManager.d.ts +1 -2
- package/lib/backend/BackendManager.js +15 -15
- package/lib/backend/Blockchain.d.ts +1 -1
- package/lib/backend/Blockchain.js +1 -1
- package/lib/core/index.js +33 -4
- package/lib/data/coinInfo.d.ts +117 -117
- package/lib/data/config.js +15 -1
- package/lib/data/defaultFeeLevels.js +9 -1
- package/lib/data/deviceAuthenticityConfig.js +4 -1
- package/lib/data/firmwareInfo.d.ts +1 -1
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +3 -2
- package/lib/device/Device.js +2 -1
- package/lib/device/DeviceCommands.d.ts +10 -6
- package/lib/device/DeviceCommands.js +8 -5
- package/lib/device/resolveDescriptorForTaproot.d.ts +15 -0
- package/lib/device/resolveDescriptorForTaproot.js +31 -0
- package/lib/events/device.d.ts +1 -0
- package/lib/events/device.js +1 -0
- package/lib/types/account.d.ts +2 -0
- package/lib/types/api/applySettings.d.ts +6 -6
- package/lib/types/api/binance/index.d.ts +10 -10
- package/lib/types/api/cardano/index.d.ts +4 -4
- package/lib/types/api/changeLanguage.d.ts +1 -1
- package/lib/types/api/cipherKeyValue.d.ts +2 -2
- package/lib/types/api/eos/index.d.ts +3 -3
- package/lib/types/api/ethereum/index.d.ts +3 -3
- package/lib/types/api/firmwareUpdate.d.ts +1 -1
- package/lib/types/api/getAddress.d.ts +5 -5
- package/lib/types/api/getPublicKey.d.ts +1 -0
- package/lib/types/api/getPublicKey.js +5 -1
- package/lib/types/api/nem/index.d.ts +7 -7
- package/lib/types/api/recoveryDevice.d.ts +1 -1
- package/lib/types/api/stellar/index.d.ts +146 -146
- package/lib/types/params.js +6 -2
- package/lib/utils/{assets-native.d.ts → assets.native.d.ts} +1 -1
- package/lib/utils/{assets-native.js → assets.native.js} +1 -1
- package/lib/utils/debug.d.ts +5 -31
- package/lib/utils/debug.js +8 -110
- package/lib/utils/hdnodeUtils.d.ts +3 -3
- package/lib/utils/pathUtils.d.ts +3 -3
- package/lib/workers/{workers-react-native.d.ts → workers.native.d.ts} +1 -1
- package/lib/workers/{workers-react-native.js → workers.native.js} +1 -1
- package/package.json +39 -19
package/lib/types/params.js
CHANGED
|
@@ -4,11 +4,15 @@ exports.PublicKey = exports.GetPublicKey = exports.GetAddress = exports.Derivati
|
|
|
4
4
|
const schema_utils_1 = require("@trezor/schema-utils");
|
|
5
5
|
const Bundle = (type) => schema_utils_1.Type.Object({ bundle: schema_utils_1.Type.Array(type, { minItems: 1 }) });
|
|
6
6
|
exports.Bundle = Bundle;
|
|
7
|
-
exports.DerivationPath = schema_utils_1.Type.Union([schema_utils_1.Type.String(), schema_utils_1.Type.Array(schema_utils_1.Type.Number())]
|
|
7
|
+
exports.DerivationPath = schema_utils_1.Type.Union([schema_utils_1.Type.String(), schema_utils_1.Type.Array(schema_utils_1.Type.Number())], {
|
|
8
|
+
description: 'Derivation Path. minimum length is `1`',
|
|
9
|
+
default: `m/49'/0'/0'`,
|
|
10
|
+
$id: 'DerivationPath',
|
|
11
|
+
});
|
|
8
12
|
exports.GetAddress = schema_utils_1.Type.Object({
|
|
9
13
|
path: exports.DerivationPath,
|
|
10
14
|
address: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
|
|
11
|
-
showOnTrezor: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
15
|
+
showOnTrezor: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean({ default: true })),
|
|
12
16
|
chunkify: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
13
17
|
useEventListener: schema_utils_1.Type.Optional(schema_utils_1.Type.Boolean()),
|
|
14
18
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const httpRequest: (url: string, _type: string) => any;
|
|
2
|
-
//# sourceMappingURL=assets
|
|
2
|
+
//# sourceMappingURL=assets.native.d.ts.map
|
|
@@ -4,4 +4,4 @@ exports.httpRequest = void 0;
|
|
|
4
4
|
const assetUtils_1 = require("./assetUtils");
|
|
5
5
|
const httpRequest = (url, _type) => (0, assetUtils_1.getAssetByUrl)(url);
|
|
6
6
|
exports.httpRequest = httpRequest;
|
|
7
|
-
//# sourceMappingURL=assets
|
|
7
|
+
//# sourceMappingURL=assets.native.js.map
|
package/lib/utils/debug.d.ts
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
message: any[];
|
|
5
|
-
timestamp: number;
|
|
6
|
-
};
|
|
7
|
-
export type LogWriter = {
|
|
8
|
-
add: (message: LogMessage) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare class Log {
|
|
11
|
-
prefix: string;
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
css: string;
|
|
14
|
-
messages: LogMessage[];
|
|
15
|
-
logWriter: LogWriter | undefined;
|
|
16
|
-
constructor(prefix: string, enabled: boolean, logWriter?: LogWriter);
|
|
17
|
-
addMessage({ level, prefix, timestamp }: {
|
|
18
|
-
level: string;
|
|
19
|
-
prefix: string;
|
|
20
|
-
timestamp?: number;
|
|
21
|
-
}, ...args: any[]): void;
|
|
22
|
-
setWriter(logWriter: any): void;
|
|
23
|
-
log(...args: any[]): void;
|
|
24
|
-
error(...args: any[]): void;
|
|
25
|
-
warn(...args: any[]): void;
|
|
26
|
-
debug(...args: any[]): void;
|
|
27
|
-
}
|
|
28
|
-
export declare const initLog: (prefix: string, enabled?: boolean, logWriter?: LogWriter) => Log;
|
|
29
|
-
export declare const setLogWriter: (logWriterFactory: () => LogWriter | undefined) => void;
|
|
30
|
-
export declare const enableLog: (enabled?: boolean) => void;
|
|
1
|
+
export declare const initLog: (prefix: string, enabled?: boolean | undefined, logWriter?: import("@trezor/utils").LogWriter | undefined) => import("@trezor/utils").Log;
|
|
2
|
+
export declare const setLogWriter: (logWriterFactory: () => import("@trezor/utils").LogWriter | undefined) => void;
|
|
3
|
+
export declare const enableLog: (enabled?: boolean | undefined) => void;
|
|
31
4
|
export declare const enableLogByPrefix: (prefix: string, enabled: boolean) => void;
|
|
32
|
-
export declare const getLog: () => LogMessage[];
|
|
5
|
+
export declare const getLog: () => import("@trezor/utils").LogMessage[];
|
|
6
|
+
export type { LogMessage, LogWriter, Log } from '@trezor/utils';
|
|
33
7
|
//# sourceMappingURL=debug.d.ts.map
|
package/lib/utils/debug.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLog = exports.enableLogByPrefix = exports.enableLog = exports.setLogWriter = exports.initLog =
|
|
3
|
+
exports.getLog = exports.enableLogByPrefix = exports.enableLog = exports.setLogWriter = exports.initLog = void 0;
|
|
4
|
+
const utils_1 = require("@trezor/utils");
|
|
4
5
|
const green = '#bada55';
|
|
5
6
|
const blue = '#20abd8';
|
|
6
7
|
const orange = '#f4a744';
|
|
@@ -18,113 +19,10 @@ const colors = {
|
|
|
18
19
|
InteractionTimeout: `color: ${green}; background: #000;`,
|
|
19
20
|
'@trezor/connect-popup': `color: ${yellow}; background: #000;`,
|
|
20
21
|
};
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.css = typeof window !== 'undefined' && colors[prefix] ? colors[prefix] : '';
|
|
28
|
-
if (logWriter) {
|
|
29
|
-
this.logWriter = logWriter;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
addMessage({ level, prefix, timestamp }, ...args) {
|
|
33
|
-
const message = {
|
|
34
|
-
level,
|
|
35
|
-
prefix,
|
|
36
|
-
css: this.css,
|
|
37
|
-
message: args,
|
|
38
|
-
timestamp: timestamp || Date.now(),
|
|
39
|
-
};
|
|
40
|
-
this.messages.push(message);
|
|
41
|
-
if (this.logWriter) {
|
|
42
|
-
try {
|
|
43
|
-
this.logWriter.add(message);
|
|
44
|
-
}
|
|
45
|
-
catch (err) {
|
|
46
|
-
console.error('There was an error adding log message', err, message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (this.messages.length > MAX_ENTRIES) {
|
|
50
|
-
this.messages.shift();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
setWriter(logWriter) {
|
|
54
|
-
this.logWriter = logWriter;
|
|
55
|
-
}
|
|
56
|
-
log(...args) {
|
|
57
|
-
this.addMessage({ level: 'log', prefix: this.prefix }, ...args);
|
|
58
|
-
if (this.enabled) {
|
|
59
|
-
console.log(`%c${this.prefix}`, this.css, ...args);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
error(...args) {
|
|
63
|
-
this.addMessage({ level: 'error', prefix: this.prefix }, ...args);
|
|
64
|
-
if (this.enabled) {
|
|
65
|
-
console.error(`%c${this.prefix}`, this.css, ...args);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
warn(...args) {
|
|
69
|
-
this.addMessage({ level: 'warn', prefix: this.prefix }, ...args);
|
|
70
|
-
if (this.enabled) {
|
|
71
|
-
console.warn(`%c${this.prefix}`, this.css, ...args);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
debug(...args) {
|
|
75
|
-
this.addMessage({ level: 'debug', prefix: this.prefix }, ...args);
|
|
76
|
-
if (this.enabled) {
|
|
77
|
-
if (this.css) {
|
|
78
|
-
console.log(`%c${this.prefix}`, this.css, ...args);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
console.log(this.prefix, ...args);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.Log = Log;
|
|
87
|
-
const _logs = {};
|
|
88
|
-
let writer;
|
|
89
|
-
const initLog = (prefix, enabled, logWriter) => {
|
|
90
|
-
const instanceWriter = logWriter || writer;
|
|
91
|
-
const instance = new Log(prefix, !!enabled, instanceWriter);
|
|
92
|
-
_logs[prefix] = instance;
|
|
93
|
-
return instance;
|
|
94
|
-
};
|
|
95
|
-
exports.initLog = initLog;
|
|
96
|
-
const setLogWriter = (logWriterFactory) => {
|
|
97
|
-
Object.keys(_logs).forEach(key => {
|
|
98
|
-
writer = logWriterFactory();
|
|
99
|
-
if (writer) {
|
|
100
|
-
_logs[key].setWriter(writer);
|
|
101
|
-
const { messages } = _logs[key];
|
|
102
|
-
messages.forEach(message => {
|
|
103
|
-
writer === null || writer === void 0 ? void 0 : writer.add(message);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
exports.setLogWriter = setLogWriter;
|
|
109
|
-
const enableLog = (enabled) => {
|
|
110
|
-
Object.keys(_logs).forEach(key => {
|
|
111
|
-
_logs[key].enabled = !!enabled;
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
exports.enableLog = enableLog;
|
|
115
|
-
const enableLogByPrefix = (prefix, enabled) => {
|
|
116
|
-
if (_logs[prefix]) {
|
|
117
|
-
_logs[prefix].enabled = enabled;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
exports.enableLogByPrefix = enableLogByPrefix;
|
|
121
|
-
const getLog = () => {
|
|
122
|
-
let logs = [];
|
|
123
|
-
Object.keys(_logs).forEach(key => {
|
|
124
|
-
logs = logs.concat(_logs[key].messages);
|
|
125
|
-
});
|
|
126
|
-
logs.sort((a, b) => a.timestamp - b.timestamp);
|
|
127
|
-
return logs;
|
|
128
|
-
};
|
|
129
|
-
exports.getLog = getLog;
|
|
22
|
+
const logsManager = new utils_1.LogsManager({ colors });
|
|
23
|
+
exports.initLog = logsManager.initLog.bind(logsManager);
|
|
24
|
+
exports.setLogWriter = logsManager.setLogWriter.bind(logsManager);
|
|
25
|
+
exports.enableLog = logsManager.enableLog.bind(logsManager);
|
|
26
|
+
exports.enableLogByPrefix = logsManager.enableLogByPrefix.bind(logsManager);
|
|
27
|
+
exports.getLog = logsManager.getLog.bind(logsManager);
|
|
130
28
|
//# sourceMappingURL=debug.js.map
|
|
@@ -87,8 +87,8 @@ export declare const convertMultisigPubKey: <T extends ({
|
|
|
87
87
|
prev_index: number;
|
|
88
88
|
} & {
|
|
89
89
|
address_n?: undefined;
|
|
90
|
-
script_type: "EXTERNAL";
|
|
91
90
|
script_pubkey: string;
|
|
91
|
+
script_type: "EXTERNAL";
|
|
92
92
|
}) | {
|
|
93
93
|
address_n?: undefined;
|
|
94
94
|
multisig?: {
|
|
@@ -123,7 +123,6 @@ export declare const convertMultisigPubKey: <T extends ({
|
|
|
123
123
|
script_type: "PAYTOADDRESS";
|
|
124
124
|
} | {
|
|
125
125
|
address?: undefined;
|
|
126
|
-
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
127
126
|
multisig?: {
|
|
128
127
|
address_n?: number[] | undefined;
|
|
129
128
|
nodes?: {
|
|
@@ -150,12 +149,12 @@ export declare const convertMultisigPubKey: <T extends ({
|
|
|
150
149
|
} | undefined;
|
|
151
150
|
orig_hash?: string | undefined;
|
|
152
151
|
orig_index?: number | undefined;
|
|
152
|
+
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
153
153
|
payment_req_index?: number | undefined;
|
|
154
154
|
address_n: number[];
|
|
155
155
|
amount: string | number;
|
|
156
156
|
} | {
|
|
157
157
|
address_n?: undefined;
|
|
158
|
-
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
159
158
|
multisig?: {
|
|
160
159
|
address_n?: number[] | undefined;
|
|
161
160
|
nodes?: {
|
|
@@ -182,6 +181,7 @@ export declare const convertMultisigPubKey: <T extends ({
|
|
|
182
181
|
} | undefined;
|
|
183
182
|
orig_hash?: string | undefined;
|
|
184
183
|
orig_index?: number | undefined;
|
|
184
|
+
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
185
185
|
payment_req_index?: number | undefined;
|
|
186
186
|
address: string;
|
|
187
187
|
amount: string | number;
|
package/lib/utils/pathUtils.d.ts
CHANGED
|
@@ -98,8 +98,8 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
|
|
|
98
98
|
prev_index: number;
|
|
99
99
|
} & {
|
|
100
100
|
address_n?: undefined;
|
|
101
|
-
script_type: "EXTERNAL";
|
|
102
101
|
script_pubkey: string;
|
|
102
|
+
script_type: "EXTERNAL";
|
|
103
103
|
})> | ProtoWithDerivationPath<{
|
|
104
104
|
address_n?: undefined;
|
|
105
105
|
multisig?: {
|
|
@@ -134,7 +134,6 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
|
|
|
134
134
|
script_type: "PAYTOADDRESS";
|
|
135
135
|
} | {
|
|
136
136
|
address?: undefined;
|
|
137
|
-
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
138
137
|
multisig?: {
|
|
139
138
|
address_n?: number[] | undefined;
|
|
140
139
|
nodes?: {
|
|
@@ -161,12 +160,12 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
|
|
|
161
160
|
} | undefined;
|
|
162
161
|
orig_hash?: string | undefined;
|
|
163
162
|
orig_index?: number | undefined;
|
|
163
|
+
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
164
164
|
payment_req_index?: number | undefined;
|
|
165
165
|
address_n: number[];
|
|
166
166
|
amount: string | number;
|
|
167
167
|
} | {
|
|
168
168
|
address_n?: undefined;
|
|
169
|
-
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
170
169
|
multisig?: {
|
|
171
170
|
address_n?: number[] | undefined;
|
|
172
171
|
nodes?: {
|
|
@@ -193,6 +192,7 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
|
|
|
193
192
|
} | undefined;
|
|
194
193
|
orig_hash?: string | undefined;
|
|
195
194
|
orig_index?: number | undefined;
|
|
195
|
+
script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
|
|
196
196
|
payment_req_index?: number | undefined;
|
|
197
197
|
address: string;
|
|
198
198
|
amount: string | number;
|
|
@@ -4,4 +4,4 @@ import BlockfrostWorker from '@trezor/blockchain-link/lib/workers/blockfrost';
|
|
|
4
4
|
import SolanaWorker from '@trezor/blockchain-link/lib/workers/solana';
|
|
5
5
|
declare const ElectrumWorker: undefined;
|
|
6
6
|
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker };
|
|
7
|
-
//# sourceMappingURL=workers
|
|
7
|
+
//# sourceMappingURL=workers.native.d.ts.map
|
|
@@ -12,4 +12,4 @@ const solana_1 = tslib_1.__importDefault(require("@trezor/blockchain-link/lib/wo
|
|
|
12
12
|
exports.SolanaWorker = solana_1.default;
|
|
13
13
|
const ElectrumWorker = undefined;
|
|
14
14
|
exports.ElectrumWorker = ElectrumWorker;
|
|
15
|
-
//# sourceMappingURL=workers
|
|
15
|
+
//# sourceMappingURL=workers.native.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
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.",
|
|
@@ -19,16 +19,33 @@
|
|
|
19
19
|
"javascript"
|
|
20
20
|
],
|
|
21
21
|
"sideEffects": false,
|
|
22
|
-
"main": "lib/index",
|
|
22
|
+
"main": "lib/index.js",
|
|
23
23
|
"browser": {
|
|
24
|
-
"./lib/index": "./lib/index-browser",
|
|
25
|
-
"./lib/
|
|
26
|
-
"./lib/
|
|
24
|
+
"./lib/index.js": "./lib/index-browser.js",
|
|
25
|
+
"./lib/index": "./lib/index-browser.js",
|
|
26
|
+
"./lib/utils/assets": "./lib/utils/assets-browser.js",
|
|
27
|
+
"./lib/workers/workers": "./lib/workers/workers-browser.js"
|
|
27
28
|
},
|
|
28
29
|
"react-native": {
|
|
29
|
-
"./
|
|
30
|
-
"./
|
|
31
|
-
"./
|
|
30
|
+
"./src/index": "./src/index.ts",
|
|
31
|
+
"./src/index.ts": "./src/index.ts",
|
|
32
|
+
"./src/utils/assets": "./src/utils/assets.native.ts",
|
|
33
|
+
"./src/workers/workers": "./src/workers/workers.native.ts"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"main": "lib/index.js",
|
|
37
|
+
"browser": {
|
|
38
|
+
"./lib/index.js": "./lib/index-browser.js",
|
|
39
|
+
"./lib/index": "./lib/index-browser.js",
|
|
40
|
+
"./lib/utils/assets": "./lib/utils/assets-browser.js",
|
|
41
|
+
"./lib/workers/workers": "./lib/workers/workers-browser.js"
|
|
42
|
+
},
|
|
43
|
+
"react-native": {
|
|
44
|
+
"./lib/index": "./lib/index.js",
|
|
45
|
+
"./lib/index.ts": "./lib/index.js",
|
|
46
|
+
"./lib/utils/assets": "./lib/utils/assets.native.js",
|
|
47
|
+
"./lib/workers/workers": "./lib/workers/workers.native.js"
|
|
48
|
+
}
|
|
32
49
|
},
|
|
33
50
|
"files": [
|
|
34
51
|
"lib/",
|
|
@@ -38,7 +55,7 @@
|
|
|
38
55
|
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
|
|
39
56
|
"test:unit": "jest --version && jest",
|
|
40
57
|
"type-check": "yarn g:tsc --build",
|
|
41
|
-
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json",
|
|
58
|
+
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/replace-imports.sh ./lib",
|
|
42
59
|
"version:beta": "yarn g:tsx scripts/bump-version.ts prerelease",
|
|
43
60
|
"version:patch": "yarn g:tsx scripts/bump-version.ts patch",
|
|
44
61
|
"version:minor": "yarn g:tsx scripts/bump-version.ts minor",
|
|
@@ -49,19 +66,20 @@
|
|
|
49
66
|
"prepublish": "yarn tsx ../../scripts/prepublish.js"
|
|
50
67
|
},
|
|
51
68
|
"dependencies": {
|
|
69
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
52
70
|
"@ethereumjs/common": "^4.2.0",
|
|
53
71
|
"@ethereumjs/tx": "^5.2.1",
|
|
54
72
|
"@fivebinaries/coin-selection": "2.2.1",
|
|
55
|
-
"@trezor/blockchain-link": "2.1.
|
|
56
|
-
"@trezor/blockchain-link-types": "1.0.
|
|
57
|
-
"@trezor/connect-analytics": "1.0.
|
|
58
|
-
"@trezor/connect-common": "0.0.
|
|
59
|
-
"@trezor/protobuf": "1.0.
|
|
60
|
-
"@trezor/protocol": "1.0.
|
|
61
|
-
"@trezor/schema-utils": "1.0.
|
|
62
|
-
"@trezor/transport": "1.1.
|
|
63
|
-
"@trezor/utils": "9.0.
|
|
64
|
-
"@trezor/utxo-lib": "2.0.
|
|
73
|
+
"@trezor/blockchain-link": "2.1.28",
|
|
74
|
+
"@trezor/blockchain-link-types": "1.0.15",
|
|
75
|
+
"@trezor/connect-analytics": "1.0.14",
|
|
76
|
+
"@trezor/connect-common": "0.0.31",
|
|
77
|
+
"@trezor/protobuf": "1.0.11",
|
|
78
|
+
"@trezor/protocol": "1.0.7",
|
|
79
|
+
"@trezor/schema-utils": "1.0.3",
|
|
80
|
+
"@trezor/transport": "1.1.27",
|
|
81
|
+
"@trezor/utils": "9.0.23",
|
|
82
|
+
"@trezor/utxo-lib": "2.0.8",
|
|
65
83
|
"bignumber.js": "^9.1.2",
|
|
66
84
|
"blakejs": "^1.2.1",
|
|
67
85
|
"bs58": "^5.0.0",
|
|
@@ -73,6 +91,7 @@
|
|
|
73
91
|
"@trezor/trezor-user-env-link": "1.0.2",
|
|
74
92
|
"@types/karma": "^6.3.8",
|
|
75
93
|
"@types/parse-uri": "^1.0.2",
|
|
94
|
+
"babel-loader": "^9.1.3",
|
|
76
95
|
"ethereum-cryptography": "^2.1.3",
|
|
77
96
|
"jest": "29.7.0",
|
|
78
97
|
"karma": "^6.4.2",
|
|
@@ -82,6 +101,7 @@
|
|
|
82
101
|
"karma-jasmine-async": "^0.0.1",
|
|
83
102
|
"karma-sourcemap-loader": "^0.4.0",
|
|
84
103
|
"karma-webpack": "^5.0.1",
|
|
104
|
+
"node-libs-browser": "^2.2.1",
|
|
85
105
|
"ts-node": "^10.9.1",
|
|
86
106
|
"tsx": "^4.7.0",
|
|
87
107
|
"webpack": "^5.90.1",
|