@trezor/connect 9.0.1 → 9.0.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/README.md +1 -1
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/events/ui-request.d.ts +40 -4
- package/lib/utils/assets.d.ts +1 -1
- package/lib/utils/assets.js +2 -2
- package/package.json +1 -1
- package/lib/utils/bip39.d.ts +0 -3
- package/lib/utils/bip39.js +0 -2053
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @trezor/connect
|
|
2
2
|
|
|
3
|
-
API version 9.0.
|
|
3
|
+
API version 9.0.2
|
|
4
4
|
|
|
5
5
|
[](https://github.com/trezor/trezor-suite/actions/workflows/connect-test.yml)
|
|
6
6
|
[](https://www.npmjs.org/package/@trezor/connect)
|
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.DEFAULT_DOMAIN = exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '9.0.
|
|
4
|
+
exports.VERSION = '9.0.2';
|
|
5
5
|
const versionN = exports.VERSION.split('.').map(s => parseInt(s, 10));
|
|
6
6
|
exports.DEFAULT_DOMAIN = `https://connect.trezor.io/${versionN[0]}/`;
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -43,10 +43,28 @@ export declare const UI_REQUEST: {
|
|
|
43
43
|
readonly ADDRESS_VALIDATION: "ui-address_validation";
|
|
44
44
|
readonly IFRAME_FAILURE: "ui-iframe_failure";
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
type: typeof UI_REQUEST.LOADING
|
|
46
|
+
export declare type UiRequestWithoutPayload = {
|
|
47
|
+
type: typeof UI_REQUEST.LOADING;
|
|
48
48
|
payload?: typeof undefined;
|
|
49
|
-
}
|
|
49
|
+
} | {
|
|
50
|
+
type: typeof UI_REQUEST.REQUEST_UI_WINDOW;
|
|
51
|
+
payload?: typeof undefined;
|
|
52
|
+
} | {
|
|
53
|
+
type: typeof UI_REQUEST.IFRAME_FAILURE;
|
|
54
|
+
payload?: typeof undefined;
|
|
55
|
+
} | {
|
|
56
|
+
type: typeof UI_REQUEST.TRANSPORT;
|
|
57
|
+
payload?: typeof undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: typeof UI_REQUEST.INSUFFICIENT_FUNDS;
|
|
60
|
+
payload?: typeof undefined;
|
|
61
|
+
} | {
|
|
62
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
63
|
+
payload?: typeof undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: typeof UI_REQUEST.LOGIN_CHALLENGE_REQUEST;
|
|
66
|
+
payload?: typeof undefined;
|
|
67
|
+
};
|
|
50
68
|
export declare type UiRequestDeviceAction = {
|
|
51
69
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
52
70
|
payload: {
|
|
@@ -60,7 +78,25 @@ export declare type UiRequestDeviceAction = {
|
|
|
60
78
|
type: PROTO.WordRequestType;
|
|
61
79
|
};
|
|
62
80
|
} | {
|
|
63
|
-
type: typeof UI_REQUEST.INVALID_PIN
|
|
81
|
+
type: typeof UI_REQUEST.INVALID_PIN;
|
|
82
|
+
payload: {
|
|
83
|
+
device: Device;
|
|
84
|
+
type?: typeof undefined;
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
88
|
+
payload: {
|
|
89
|
+
device: Device;
|
|
90
|
+
type?: typeof undefined;
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
94
|
+
payload: {
|
|
95
|
+
device: Device;
|
|
96
|
+
type?: typeof undefined;
|
|
97
|
+
};
|
|
98
|
+
} | {
|
|
99
|
+
type: typeof UI_REQUEST.INVALID_PASSPHRASE;
|
|
64
100
|
payload: {
|
|
65
101
|
device: Device;
|
|
66
102
|
type?: typeof undefined;
|
package/lib/utils/assets.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const httpRequest: (url: string,
|
|
1
|
+
export declare const httpRequest: (url: string, type: string) => any;
|
|
2
2
|
//# sourceMappingURL=assets.d.ts.map
|
package/lib/utils/assets.js
CHANGED
|
@@ -9,10 +9,10 @@ const assetUtils_1 = require("./assetUtils");
|
|
|
9
9
|
if (global && typeof global.fetch !== 'function') {
|
|
10
10
|
global.fetch = cross_fetch_1.default;
|
|
11
11
|
}
|
|
12
|
-
const httpRequest = (url,
|
|
12
|
+
const httpRequest = (url, type) => {
|
|
13
13
|
const asset = (0, assetUtils_1.getAssetByUrl)(url);
|
|
14
14
|
if (!asset) {
|
|
15
|
-
return /^https?/.test(url) ? (0, assets_browser_1.httpRequest)(url) : fs_1.promises.readFile(url);
|
|
15
|
+
return /^https?/.test(url) ? (0, assets_browser_1.httpRequest)(url, type) : fs_1.promises.readFile(url);
|
|
16
16
|
}
|
|
17
17
|
return asset;
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.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.",
|
package/lib/utils/bip39.d.ts
DELETED