@trezor/connect 9.0.0-beta.1 → 9.0.0-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 +26 -0
- package/README.md +14 -4
- package/lib/device/Device.d.ts +0 -1
- package/lib/device/Device.js +2 -11
- package/lib/events/ui-response.d.ts +1 -1
- package/lib/factory.js +6 -1
- package/lib/types/params.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 9.0.0
|
|
2
|
+
|
|
3
|
+
## Breaking changes:
|
|
4
|
+
|
|
5
|
+
- Changed codebase to typescript.
|
|
6
|
+
- Removed `Lisk` methods from api.
|
|
7
|
+
- Exported constants:
|
|
8
|
+
- `CARDANO.ADDRESS_TYPE` => `PROTO.CardanoAddressType`
|
|
9
|
+
- `CARDANO.CERTIFICATE_TYPE` => `PROTO.CardanoCertificateType`
|
|
10
|
+
- `CARDANO.POOL_RELAY_TYPE` => `PROTO.CardanoPoolRelayType`
|
|
11
|
+
- `CardanoCertificateType`
|
|
12
|
+
- `CardanoNativeScriptType` => `PROTO.CardanoNativeScriptType`
|
|
13
|
+
- `CardanoNativeScriptHashDisplayFormat` => `PROTO.CardanoNativeScriptHashDisplayFormat`
|
|
14
|
+
- `CardanoPoolRelayType` => `PROTO.CardanoPoolRelayType`
|
|
15
|
+
- `CardanoTxSigningMode` => `PROTO.CardanoTxSigningMode`
|
|
16
|
+
- `CardanoTxWitnessType` => `PROTO.CardanoTxWitnessType`
|
|
17
|
+
- removed unused `DEVICE.WAIT_FOR_SELECTION`
|
|
18
|
+
- removed unused `UI.CHANGE_ACCOUNT`
|
|
19
|
+
- Minimum firmware requirements bumped:
|
|
20
|
+
- 2.4.2 CardanoSignTransaction
|
|
21
|
+
|
|
22
|
+
## Added:
|
|
23
|
+
|
|
24
|
+
- `getOwnershipId` method
|
|
25
|
+
- `getOwnershipProof` method
|
|
26
|
+
- `authorizeCoinJoin` method
|
package/README.md
CHANGED
|
@@ -10,9 +10,7 @@ User interface is presented in a secure popup window served from `connect.trezor
|
|
|
10
10
|
|
|
11
11
|
- [Integration](https://github.com/trezor/trezor-suite/blob/develop/docs/packages/connect/index.md)
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
### Version 9+ (experimental)
|
|
13
|
+
## Version 9+ (experimental)
|
|
16
14
|
|
|
17
15
|
Since version 9 we are adopting a new versioning strategy. With every release, we are going to update two urls
|
|
18
16
|
|
|
@@ -21,7 +19,17 @@ Since version 9 we are adopting a new versioning strategy. With every release, w
|
|
|
21
19
|
|
|
22
20
|
Version 9+ will be available as `@trezor/connect` and `@trezor/connect-web` npm packages.
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
## Step by step release process
|
|
23
|
+
|
|
24
|
+
- Make sure you have released all [npm dependencies](../../releases/npm-packages.md)
|
|
25
|
+
- bump version in all @trezor/connect\* packages (except plugin packages).
|
|
26
|
+
- make sure CHANGELOG files have been updated
|
|
27
|
+
- merge into develop branch
|
|
28
|
+
- from develop branch create a pull requests into branch `release/connect-v9`
|
|
29
|
+
- gitlab: click manual release `@trezor/connect-web` and `@trezor/connect` into npm
|
|
30
|
+
- gitlab: click manual release `@trezor/connect-web` and `@trezor/connect` into npm
|
|
31
|
+
|
|
32
|
+
## Version 8 (stable)
|
|
25
33
|
|
|
26
34
|
Currently, we are at version 8, which has an url https://connect.trezor.io/8/trezor-connect.js.
|
|
27
35
|
|
|
@@ -33,6 +41,8 @@ If you would like to find out which version is deployed precisely simply run:
|
|
|
33
41
|
|
|
34
42
|
With regards to this repo - All updates should go to current version branch, the previous releases are in corresponding branches. The gh-pages is the same older version, that is used at trezor.github.io/connect/connect.js, and it's there for backwards compatibility; please don't touch.
|
|
35
43
|
|
|
44
|
+
For deployment process of trezor-connect v8 refer to [trezor/connect repository](https://github.com/trezor/connect/blob/develop/docs/deployment/index.md)
|
|
45
|
+
|
|
36
46
|
## Tests
|
|
37
47
|
|
|
38
48
|
For integration testing against trezord and emulator refer to [this document](https://github.com/trezor/trezor-suite/blob/develop/packages/integration-tests/projects/connect/README.md).
|
package/lib/device/Device.d.ts
CHANGED
|
@@ -90,7 +90,6 @@ export declare class Device extends EventEmitter {
|
|
|
90
90
|
isLoaded(): boolean;
|
|
91
91
|
waitForFirstRun(): Promise<boolean>;
|
|
92
92
|
getDevicePath(): string;
|
|
93
|
-
needAuthentication(): any;
|
|
94
93
|
isT1(): boolean;
|
|
95
94
|
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
96
95
|
dispose(): void;
|
package/lib/device/Device.js
CHANGED
|
@@ -271,10 +271,10 @@ class Device extends events_1.default {
|
|
|
271
271
|
payload.session_id = internalState;
|
|
272
272
|
}
|
|
273
273
|
if (legacy && !this.isT1()) {
|
|
274
|
-
payload.
|
|
274
|
+
payload.session_id = internalState;
|
|
275
275
|
if (useEmptyPassphrase) {
|
|
276
276
|
payload._skip_passphrase = useEmptyPassphrase;
|
|
277
|
-
payload.
|
|
277
|
+
payload.session_id = undefined;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -409,15 +409,6 @@ class Device extends events_1.default {
|
|
|
409
409
|
getDevicePath() {
|
|
410
410
|
return this.originalDescriptor.path;
|
|
411
411
|
}
|
|
412
|
-
needAuthentication() {
|
|
413
|
-
if (this.isUnacquired() || this.isUsedElsewhere() || this.featuresNeedsReload)
|
|
414
|
-
return true;
|
|
415
|
-
if (this.features.bootloader_mode || !this.features.initialized)
|
|
416
|
-
return true;
|
|
417
|
-
const pin = this.features.pin_protection ? !!this.features.unlocked : true;
|
|
418
|
-
const pass = this.features.passphrase_protection ? this.features.passphrase_cached : true;
|
|
419
|
-
return pin && pass;
|
|
420
|
-
}
|
|
421
412
|
isT1() {
|
|
422
413
|
return this.features ? this.features.major_version === 1 : false;
|
|
423
414
|
}
|
|
@@ -49,9 +49,9 @@ export interface UiResponseWord {
|
|
|
49
49
|
export interface UiResponsePassphrase {
|
|
50
50
|
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
51
51
|
payload: {
|
|
52
|
-
save: boolean;
|
|
53
52
|
value: string;
|
|
54
53
|
passphraseOnDevice?: boolean;
|
|
54
|
+
save?: boolean;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
export interface UiResponsePassphraseAction {
|
package/lib/factory.js
CHANGED
|
@@ -14,7 +14,12 @@ const factory = ({ eventEmitter, manifest, init, call, customMessage, requestLog
|
|
|
14
14
|
eventEmitter.removeListener(type, fn);
|
|
15
15
|
},
|
|
16
16
|
removeAllListeners: type => {
|
|
17
|
-
|
|
17
|
+
if (typeof type === 'string') {
|
|
18
|
+
eventEmitter.removeAllListeners(type);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
eventEmitter.removeAllListeners();
|
|
22
|
+
}
|
|
18
23
|
},
|
|
19
24
|
uiResponse,
|
|
20
25
|
blockchainGetAccountBalanceHistory: params => call({ ...params, method: 'blockchainGetAccountBalanceHistory' }),
|
package/lib/types/params.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.2",
|
|
4
4
|
"author": "Trezor <info@trezor.io>",
|
|
5
|
-
"homepage": "https://github.com/trezor/trezor-suite/packages/connect",
|
|
5
|
+
"homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
|
|
6
6
|
"description": "High-level javascript interface for Trezor hardware wallet.",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
8
8
|
"repository": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@trezor/blockchain-link": "^2.1.3",
|
|
46
|
-
"@trezor/transport": "^1.1.
|
|
47
|
-
"@trezor/utils": "^9.0.
|
|
46
|
+
"@trezor/transport": "^1.1.3",
|
|
47
|
+
"@trezor/utils": "^9.0.2",
|
|
48
48
|
"@trezor/utxo-lib": "^1.0.0",
|
|
49
49
|
"bignumber.js": "^9.0.2",
|
|
50
50
|
"bowser": "^2.11.0",
|