@exodus/headless 1.1.2 → 2.0.0-alpha.1
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 +16 -0
- package/README.md +5 -6
- package/package.json +4 -3
- package/src/application.js +10 -3
- package/src/dependencies/index.js +1 -1
- package/src/dependencies/modules.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.0-alpha.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0...@exodus/headless@2.0.0-alpha.1) (2023-04-05)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- backup after restore ([#1123](https://github.com/ExodusMovement/exodus-hydra/issues/1123)) ([c08ece2](https://github.com/ExodusMovement/exodus-hydra/commit/c08ece22d8a80e995a0249abadcc20765350840d))
|
|
11
|
+
|
|
12
|
+
## [2.0.0-alpha.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@1.1.2...@exodus/headless@2.2.0-alpha.0) (2023-04-04)
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
- pass seed storage adapter to wallet (#1066)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- pass seed storage adapter to wallet ([#1066](https://github.com/ExodusMovement/exodus-hydra/issues/1066)) ([d3f57a3](https://github.com/ExodusMovement/exodus-hydra/commit/d3f57a32f51b3d29a851ed497797ab585c0ad104))
|
|
21
|
+
|
|
6
22
|
## [1.1.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@1.1.1...@exodus/headless@1.1.2) (2023-03-28)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @exodus/headless
|
package/README.md
CHANGED
|
@@ -89,14 +89,13 @@ In most cases you probably want to use encrypted storage instead (not yet migrat
|
|
|
89
89
|
|
|
90
90
|
Check [storage-spec](https://github.com/ExodusMovement/exodus-hydra/tree/master/modules/storage-spec) for more details about Storage API
|
|
91
91
|
|
|
92
|
-
###
|
|
92
|
+
### seedStorage
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Storage instance used unquely by wallet module to store seed and autogenerated passphrase (if present).
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| decryptString | `({ data: string, key: string, encoding?: string }) => string` | Decrypt string. |
|
|
96
|
+
Check [storage-spec](https://github.com/ExodusMovement/exodus-hydra/tree/master/modules/storage-spec) for more details about Storage API
|
|
97
|
+
|
|
98
|
+
> **Note:** Because Browser Extension needs the passphrase to encrypt/decrypt seed, it get's passed as a 3rd parameter to get/set
|
|
100
99
|
|
|
101
100
|
### passphraseCache
|
|
102
101
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/headless",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "The headless Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@exodus/key-identifier-provider": "^1.1.1",
|
|
34
34
|
"@exodus/keychain": "^3.2.1",
|
|
35
35
|
"@exodus/module": "^1.0.0",
|
|
36
|
-
"@exodus/wallet": "
|
|
36
|
+
"@exodus/wallet": "^5.0.0",
|
|
37
37
|
"@exodus/wallet-compatibility-modes": "1.0.2",
|
|
38
38
|
"bip39": "2.6.0",
|
|
39
39
|
"lodash": "https://registry.yarnpkg.com/@exodus/lodash/-/lodash-4.17.21-exodus.2.tgz",
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
"@exodus/solana-lib": "^1.3.11",
|
|
45
45
|
"@exodus/storage-memory": "^1.1.0",
|
|
46
46
|
"@exodus/wild-emitter": "^1.0.0",
|
|
47
|
+
"buffer-json": "^2.0.0",
|
|
47
48
|
"eslint": "^8.33.0",
|
|
48
49
|
"jest": "^29.1.2"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "885fc898545049d57c52696e9456aab6c2ecc1a2"
|
|
51
52
|
}
|
package/src/application.js
CHANGED
|
@@ -80,16 +80,22 @@ class Application extends ExodusModule {
|
|
|
80
80
|
load = async () => {
|
|
81
81
|
await this.#applicationStarted
|
|
82
82
|
|
|
83
|
-
const [walletExists, hasPassphraseSet, isLocked, isBackedUp] = await Promise.all([
|
|
83
|
+
const [walletExists, hasPassphraseSet, isLocked, isBackedUp, isRestoring] = await Promise.all([
|
|
84
84
|
this.#wallet.exists(),
|
|
85
85
|
this.#wallet.hasPassphraseSet(),
|
|
86
86
|
this.#wallet.isLocked(),
|
|
87
87
|
this.#wallet.isBackedUp(),
|
|
88
|
+
this.isRestoring(),
|
|
88
89
|
])
|
|
89
90
|
|
|
90
|
-
await this.fire(HOOKS.load, {
|
|
91
|
+
await this.fire(HOOKS.load, {
|
|
92
|
+
walletExists,
|
|
93
|
+
hasPassphraseSet,
|
|
94
|
+
isLocked,
|
|
95
|
+
isBackedUp,
|
|
96
|
+
isRestoring,
|
|
97
|
+
})
|
|
91
98
|
}
|
|
92
|
-
|
|
93
99
|
unload = async () => {
|
|
94
100
|
await this.#applicationStarted
|
|
95
101
|
await this.#passphraseCache.scheduleClear()
|
|
@@ -174,6 +180,7 @@ class Application extends ExodusModule {
|
|
|
174
180
|
if (isRestoring) {
|
|
175
181
|
await this.fire(HOOKS.restore)
|
|
176
182
|
await this.#storage.delete(RESTORE_FLAG)
|
|
183
|
+
await this.setBackedUp()
|
|
177
184
|
await this.fire(HOOKS['restore-completed'])
|
|
178
185
|
}
|
|
179
186
|
|