@exodus/headless 3.1.3 → 4.0.0-alpha.0
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 +7 -0
- package/package.json +26 -24
- package/src/application/module/application.js +2 -2
- package/src/index.js +2 -0
- package/src/migrations/attach.js +1 -1
- package/src/unlock-encrypted-storage.js +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
## [3.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@3.1.2...@exodus/headless@3.2.0) (2024-02-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add public key provider ([#5659](https://github.com/ExodusMovement/exodus-hydra/issues/5659)) ([b972507](https://github.com/ExodusMovement/exodus-hydra/commit/b972507d7ad7c998f37f15a716deee0901e68174))
|
|
11
|
+
- enabled-assets to v10.1.0 ([#5708](https://github.com/ExodusMovement/exodus-hydra/issues/5708)) ([cf484fa](https://github.com/ExodusMovement/exodus-hydra/commit/cf484fad2695a9cb4575edc0050ed604cc6235ac))
|
|
12
|
+
|
|
6
13
|
## [3.1.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@3.1.1...@exodus/headless@3.1.2) (2024-02-02)
|
|
7
14
|
|
|
8
15
|
**Note:** Version bump only for package @exodus/headless
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/headless",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "The platform-agnostic Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "NODE_OPTIONS=--max-old-space-size=4096 jest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@exodus/address-provider": "^
|
|
29
|
+
"@exodus/address-provider": "^10.0.0",
|
|
30
30
|
"@exodus/argo": "^1.0.0",
|
|
31
31
|
"@exodus/assets-feature": "^4.0.1",
|
|
32
32
|
"@exodus/atoms": "^7.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@exodus/blockchain-metadata": "^15.0.0",
|
|
37
37
|
"@exodus/dependency-injection": "^2.1.0",
|
|
38
38
|
"@exodus/dependency-preprocessors": "^5.1.0",
|
|
39
|
-
"@exodus/enabled-assets": "^
|
|
39
|
+
"@exodus/enabled-assets": "^10.1.0",
|
|
40
40
|
"@exodus/feature-flags": "^5.1.0",
|
|
41
41
|
"@exodus/fee-data-monitors": "^3.0.0",
|
|
42
42
|
"@exodus/fetch": "^1.2.1",
|
|
@@ -45,19 +45,21 @@
|
|
|
45
45
|
"@exodus/geolocation": "^4.1.0",
|
|
46
46
|
"@exodus/hd-key-slip-10": "^2.0.0",
|
|
47
47
|
"@exodus/key-identifier-provider": "^1.4.0",
|
|
48
|
-
"@exodus/
|
|
48
|
+
"@exodus/key-ids": "^1.0.0",
|
|
49
|
+
"@exodus/keychain": "^6.1.0",
|
|
49
50
|
"@exodus/locale": "^2.0.2",
|
|
50
51
|
"@exodus/module": "^1.2.2",
|
|
51
52
|
"@exodus/pricing": "^1.1.0",
|
|
53
|
+
"@exodus/public-key-provider": "^2.0.0",
|
|
52
54
|
"@exodus/public-key-store": "^1.2.0",
|
|
53
55
|
"@exodus/rates-monitor": "^4.0.2",
|
|
54
56
|
"@exodus/remote-config": "^2.3.0",
|
|
55
57
|
"@exodus/restore-progress-tracker": "^3.0.0",
|
|
56
58
|
"@exodus/sodium-crypto": "^3.2.0",
|
|
57
59
|
"@exodus/startup-counter": "^1.0.0",
|
|
58
|
-
"@exodus/tx-signer": "^
|
|
60
|
+
"@exodus/tx-signer": "^2.0.0",
|
|
59
61
|
"@exodus/wallet": "^11.0.0",
|
|
60
|
-
"@exodus/wallet-accounts": "^
|
|
62
|
+
"@exodus/wallet-accounts": "^16.0.0",
|
|
61
63
|
"@exodus/wallet-compatibility-modes": "^3.2.0",
|
|
62
64
|
"bip39": "^2.6.0",
|
|
63
65
|
"events": "^3.3.0",
|
|
@@ -65,33 +67,33 @@
|
|
|
65
67
|
"minimalistic-assert": "^1.0.1"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
68
|
-
"@exodus/ab-testing": "
|
|
70
|
+
"@exodus/ab-testing": "^7.3.0",
|
|
69
71
|
"@exodus/algorand-lib": "^2.0.1",
|
|
70
72
|
"@exodus/algorand-meta": "^1.1.4",
|
|
71
|
-
"@exodus/analytics": "
|
|
72
|
-
"@exodus/apy-rates": "
|
|
73
|
-
"@exodus/assets-feature": "
|
|
73
|
+
"@exodus/analytics": "^12.0.2",
|
|
74
|
+
"@exodus/apy-rates": "^3.3.1",
|
|
75
|
+
"@exodus/assets-feature": "^4.1.1",
|
|
74
76
|
"@exodus/bitcoin-plugin": "^1.0.14",
|
|
75
|
-
"@exodus/connected-origins": "
|
|
76
|
-
"@exodus/crypto-news-monitor": "
|
|
77
|
+
"@exodus/connected-origins": "^3.3.0",
|
|
78
|
+
"@exodus/crypto-news-monitor": "^4.1.0",
|
|
77
79
|
"@exodus/currency": "^2.2.0",
|
|
78
80
|
"@exodus/ethereum-lib": "^3.3.34",
|
|
79
81
|
"@exodus/ethereum-meta": "^1.0.23",
|
|
80
|
-
"@exodus/exodus-pricing-client": "
|
|
82
|
+
"@exodus/exodus-pricing-client": "^1.2.0",
|
|
81
83
|
"@exodus/key-utils": "^3.0.0",
|
|
82
|
-
"@exodus/kyc": "
|
|
84
|
+
"@exodus/kyc": "^4.3.1",
|
|
83
85
|
"@exodus/litecoin-meta": "^1.0.0",
|
|
84
|
-
"@exodus/market-history": "
|
|
85
|
-
"@exodus/models": "^
|
|
86
|
-
"@exodus/nfts": "
|
|
87
|
-
"@exodus/personal-notes": "
|
|
88
|
-
"@exodus/referrals": "
|
|
86
|
+
"@exodus/market-history": "^7.3.1",
|
|
87
|
+
"@exodus/models": "^11.9.0",
|
|
88
|
+
"@exodus/nfts": "^8.0.0",
|
|
89
|
+
"@exodus/personal-notes": "^3.6.0",
|
|
90
|
+
"@exodus/referrals": "^8.1.2",
|
|
89
91
|
"@exodus/solana-lib": "^1.3.11",
|
|
90
92
|
"@exodus/solana-meta": "^1.0.2",
|
|
91
|
-
"@exodus/storage-encrypted": "
|
|
92
|
-
"@exodus/storage-memory": "
|
|
93
|
-
"@exodus/top-movers-monitor": "
|
|
94
|
-
"@exodus/ui-config": "
|
|
93
|
+
"@exodus/storage-encrypted": "^1.1.2",
|
|
94
|
+
"@exodus/storage-memory": "^2.1.1",
|
|
95
|
+
"@exodus/top-movers-monitor": "^3.2.0",
|
|
96
|
+
"@exodus/ui-config": "^3.4.0",
|
|
95
97
|
"@exodus/wild-emitter": "^1.0.0",
|
|
96
98
|
"buffer-json": "^2.0.0",
|
|
97
99
|
"deepmerge": "^4.2.2",
|
|
@@ -103,4 +105,4 @@
|
|
|
103
105
|
"msw": "^2.0.0",
|
|
104
106
|
"p-defer": "^4.0.0"
|
|
105
107
|
}
|
|
106
|
-
}
|
|
108
|
+
}
|
|
@@ -296,9 +296,9 @@ class Application extends ExodusModule {
|
|
|
296
296
|
this._logger.log('passphrase changed')
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
delete = async ({ forgotPassphrase
|
|
299
|
+
delete = async ({ forgotPassphrase } = {}) => {
|
|
300
300
|
await this.#storage.set(DELETE_FLAG, true)
|
|
301
|
-
await this.fire(Hook.Restart, {
|
|
301
|
+
await this.fire(Hook.Restart, { reason: 'delete', forgotPassphrase })
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
stop = async () => {
|
package/src/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import geolocation from '@exodus/geolocation'
|
|
|
12
12
|
import keychain from '@exodus/keychain'
|
|
13
13
|
import locale from '@exodus/locale'
|
|
14
14
|
import pricing from '@exodus/pricing'
|
|
15
|
+
import publicKeyProvider from '@exodus/public-key-provider'
|
|
15
16
|
import publicKeyStore from '@exodus/public-key-store'
|
|
16
17
|
import rates from '@exodus/rates-monitor'
|
|
17
18
|
import remoteConfig from '@exodus/remote-config'
|
|
@@ -44,6 +45,7 @@ const createExodus = ({ adapters, config, port, debug = false }) => {
|
|
|
44
45
|
ioc.use(keychain(config.keychain))
|
|
45
46
|
ioc.use(locale())
|
|
46
47
|
ioc.use(pricing())
|
|
48
|
+
ioc.use(publicKeyProvider())
|
|
47
49
|
ioc.use(publicKeyStore())
|
|
48
50
|
ioc.use(rates())
|
|
49
51
|
ioc.use(remoteConfig())
|
package/src/migrations/attach.js
CHANGED
|
@@ -33,7 +33,7 @@ const attachMigrations = ({ migrations = [], application, modules, adapters, ...
|
|
|
33
33
|
} catch (error) {
|
|
34
34
|
logger.log(`migration failed: ${error.stack}`)
|
|
35
35
|
} finally {
|
|
36
|
-
analytics
|
|
36
|
+
analytics?.track({
|
|
37
37
|
event: 'ClientMigrationRun',
|
|
38
38
|
properties: { migrationId: name, success },
|
|
39
39
|
force: true,
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { EXODUS_KEY_IDS } from '@exodus/
|
|
1
|
+
import { EXODUS_KEY_IDS } from '@exodus/key-ids'
|
|
2
2
|
import sodium from '@exodus/sodium-crypto'
|
|
3
3
|
|
|
4
4
|
const WALLET_INFO_KEY = EXODUS_KEY_IDS.WALLET_INFO
|
|
5
5
|
|
|
6
|
-
const createUnlockEncryptedStorage = ({ keychain }) => {
|
|
6
|
+
const createUnlockEncryptedStorage = ({ keychain, primarySeedIdAtom }) => {
|
|
7
7
|
return async (encryptedStorage) => {
|
|
8
8
|
// Fusion might write on storage even after keychain is locked, so we get keys
|
|
9
9
|
// directly instead of creating encryptor that does not preserves it anymore
|
|
10
|
-
const
|
|
10
|
+
const primarySeedId = await primarySeedIdAtom.get()
|
|
11
|
+
const { privateKey } = await keychain.exportKey({
|
|
12
|
+
seedId: primarySeedId,
|
|
13
|
+
keyId: WALLET_INFO_KEY,
|
|
14
|
+
exportPrivate: true,
|
|
15
|
+
})
|
|
11
16
|
|
|
12
17
|
await encryptedStorage.unlock({
|
|
13
18
|
encrypt: (data) => sodium.encryptSecret(data, privateKey),
|
|
@@ -16,10 +21,11 @@ const createUnlockEncryptedStorage = ({ keychain }) => {
|
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
export default {
|
|
24
|
+
const unlockEncryptedStorageDefinition = {
|
|
21
25
|
id: 'unlockEncryptedStorage',
|
|
22
26
|
type: 'module',
|
|
23
27
|
factory: createUnlockEncryptedStorage,
|
|
24
|
-
dependencies: ['keychain'],
|
|
28
|
+
dependencies: ['keychain', 'primarySeedIdAtom'],
|
|
25
29
|
}
|
|
30
|
+
|
|
31
|
+
export default unlockEncryptedStorageDefinition
|