@exodus/headless 5.0.0-rc.28 → 5.0.0-rc.3

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 CHANGED
@@ -3,180 +3,6 @@
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
- ## [5.0.0-rc.28](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.27...@exodus/headless@5.0.0-rc.28) (2024-07-29)
7
-
8
- ### Features
9
-
10
- - **headless:** add timeout log for plugin methods ([#8044](https://github.com/ExodusMovement/exodus-hydra/issues/8044)) ([1fb051f](https://github.com/ExodusMovement/exodus-hydra/commit/1fb051fcb0478b7a3278efe8922339984fda0539))
11
-
12
- ## [5.0.0-rc.27](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.26...@exodus/headless@5.0.0-rc.27) (2024-07-25)
13
-
14
- ### Bug Fixes
15
-
16
- - migrate definitions ([#8030](https://github.com/ExodusMovement/exodus-hydra/issues/8030)) ([d2dfde5](https://github.com/ExodusMovement/exodus-hydra/commit/d2dfde55dfa843eb52842f64b3aac3a6f9a59069))
17
-
18
- ## [5.0.0-rc.26](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.25...@exodus/headless@5.0.0-rc.26) (2024-07-22)
19
-
20
- - update address-provider version to v12.0.0 and updates its usage. config structure has not changed.
21
-
22
- ## [5.0.0-rc.25](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.24...@exodus/headless@5.0.0-rc.25) (2024-07-18)
23
-
24
- ### Features
25
-
26
- - **headless:** add txlog monitors feature ([#7879](https://github.com/ExodusMovement/exodus-hydra/issues/7879)) ([cc5eaf4](https://github.com/ExodusMovement/exodus-hydra/commit/cc5eaf4fa46b2c1fe29bc4fd485c5adf724739a1))
27
-
28
- ## [5.0.0-rc.24](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.23...@exodus/headless@5.0.0-rc.24) (2024-07-18)
29
-
30
- **Note:** Version bump only for package @exodus/headless
31
-
32
- ## [5.0.0-rc.23](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.22...@exodus/headless@5.0.0-rc.23) (2024-07-17)
33
-
34
- ### Features
35
-
36
- - chainable ioc methods to infer types of external features ([#7892](https://github.com/ExodusMovement/exodus-hydra/issues/7892)) ([213e3ab](https://github.com/ExodusMovement/exodus-hydra/commit/213e3ab064cb5796a581b78c590b7c22246b8219))
37
-
38
- ## [5.0.0-rc.22](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.21...@exodus/headless@5.0.0-rc.22) (2024-07-16)
39
-
40
- **Note:** Version bump only for package @exodus/headless
41
-
42
- ## [5.0.0-rc.21](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.20...@exodus/headless@5.0.0-rc.21) (2024-07-16)
43
-
44
- ### Bug Fixes
45
-
46
- - use key identifier with enumerable derivation path ([#7854](https://github.com/ExodusMovement/exodus-hydra/issues/7854)) ([afd9653](https://github.com/ExodusMovement/exodus-hydra/commit/afd96533198a870568a83c4ecf03ead17d7797c1))
47
-
48
- ## [5.0.0-rc.20](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.19...@exodus/headless@5.0.0-rc.20) (2024-07-12)
49
-
50
- ### Features
51
-
52
- - bump @exodus/error-tracking in headless ([#7824](https://github.com/ExodusMovement/exodus-hydra/issues/7824)) ([8e247f7](https://github.com/ExodusMovement/exodus-hydra/commit/8e247f7111bf847f6b06c0305be1f60f0061a9a2))
53
-
54
- ## [5.0.0-rc.19](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.18...@exodus/headless@5.0.0-rc.19) (2024-07-12)
55
-
56
- ### Features
57
-
58
- - add errorTracking feature to sdk ([#7670](https://github.com/ExodusMovement/exodus-hydra/issues/7670)) ([34dbc5c](https://github.com/ExodusMovement/exodus-hydra/commit/34dbc5c1f0b94ef4213dfaec788790c475eb962c)), closes [#7708](https://github.com/ExodusMovement/exodus-hydra/issues/7708)
59
-
60
- ## [5.0.0-rc.18](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.17...@exodus/headless@5.0.0-rc.18) (2024-07-12)
61
-
62
- ### Features
63
-
64
- - bump @exodus/assets in headless pkg ([#7802](https://github.com/ExodusMovement/exodus-hydra/issues/7802)) ([5a67601](https://github.com/ExodusMovement/exodus-hydra/commit/5a67601cfd72a6b76aec2abc3cf0d8212d80edca))
65
-
66
- ### Bug Fixes
67
-
68
- - update referrals config key ([#7666](https://github.com/ExodusMovement/exodus-hydra/issues/7666)) ([17fd92a](https://github.com/ExodusMovement/exodus-hydra/commit/17fd92ab4c95757c4fbbd26b8bb7a4cf6fed87d8))
69
-
70
- ## [5.0.0-rc.17](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.16...@exodus/headless@5.0.0-rc.17) (2024-07-03)
71
-
72
- ### Features
73
-
74
- - allow subscribing to when a new seed is done restoring ([#7565](https://github.com/ExodusMovement/exodus-hydra/issues/7565)) ([1c9464e](https://github.com/ExodusMovement/exodus-hydra/commit/1c9464e8a9e1aafb6a9ebb5e9567ab33de6f2e33))
75
- - log reporting duration per node ([#7574](https://github.com/ExodusMovement/exodus-hydra/issues/7574)) ([26ba1cb](https://github.com/ExodusMovement/exodus-hydra/commit/26ba1cbb8281072289e99b9ebdd26a940f23d605))
76
-
77
- ### Bug Fixes
78
-
79
- - headless test ([#7476](https://github.com/ExodusMovement/exodus-hydra/issues/7476)) ([a901f32](https://github.com/ExodusMovement/exodus-hydra/commit/a901f32c0e9b5f23b04a322f4904a03b1d18f694))
80
-
81
- ## [5.0.0-rc.16](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.15...@exodus/headless@5.0.0-rc.16) (2024-06-25)
82
-
83
- **Note:** Version bump only for package @exodus/headless
84
-
85
- ## [5.0.0-rc.15](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.14...@exodus/headless@5.0.0-rc.15) (2024-06-24)
86
-
87
- **Note:** Version bump only for package @exodus/headless
88
-
89
- ### Features
90
-
91
- - add header handling per domain ([#7439](https://github.com/ExodusMovement/exodus-hydra/issues/7439)) ([7c45192](https://github.com/ExodusMovement/exodus-hydra/commit/7c451924901bd118765bea8bc7e1bb6f8bf1b5f5))
92
-
93
- ## [5.0.0-rc.14](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.13...@exodus/headless@5.0.0-rc.14) (2024-06-19)
94
-
95
- ### Bug Fixes
96
-
97
- - get kyc api-version && url from remote-config ([#7320](https://github.com/ExodusMovement/exodus-hydra/issues/7320)) ([5d22b13](https://github.com/ExodusMovement/exodus-hydra/commit/5d22b13e1c8d5e265f1f93498de7d83be25924ee))
98
- - revert to use legacy kyc ([#7294](https://github.com/ExodusMovement/exodus-hydra/issues/7294)) ([6b52bcc](https://github.com/ExodusMovement/exodus-hydra/commit/6b52bcc1aa1ed1f1553403d64bb1e3f209be72a6))
99
- - chore: bump wallet-accounts in headless ([#7431](https://github.com/ExodusMovement/exodus-hydra/issues/7431)) ([d39d9cf](https://github.com/ExodusMovement/exodus-hydra/commit/ad94a2948ffe03aee9c86d3acc6a15e57d39d9cf))
100
-
101
- ## [5.0.0-rc.13](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.12...@exodus/headless@5.0.0-rc.13) (2024-06-04)
102
-
103
- ### Bug Fixes
104
-
105
- - use updated api to persist referral info ([#7224](https://github.com/ExodusMovement/exodus-hydra/issues/7224)) ([4a9906a](https://github.com/ExodusMovement/exodus-hydra/commit/4a9906a8a1746a76fb6dbfd574c4c48865c463c1)), closes [#7225](https://github.com/ExodusMovement/exodus-hydra/issues/7225)
106
-
107
- ## [5.0.0-rc.12](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.11...@exodus/headless@5.0.0-rc.12) (2024-05-29)
108
-
109
- ### Features
110
-
111
- - export `ApplicationWalletApi` type ([#7189](https://github.com/ExodusMovement/exodus-hydra/issues/7189)) ([3aced97](https://github.com/ExodusMovement/exodus-hydra/commit/3aced9749447cca0ebdc1824770eb8a0711f7d65))
112
-
113
- ### Bug Fixes
114
-
115
- - await clearing personal notes storage ([#7055](https://github.com/ExodusMovement/exodus-hydra/issues/7055)) ([5522284](https://github.com/ExodusMovement/exodus-hydra/commit/5522284ccc3db4bf837a3ff752234396d10d8bce))
116
-
117
- ## [5.0.0-rc.11](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.10...@exodus/headless@5.0.0-rc.11) (2024-05-28)
118
-
119
- ### Bug Fixes
120
-
121
- - set walletAccount defaultLabel in migration ([#7134](https://github.com/ExodusMovement/exodus-hydra/issues/7134)) ([3a24900](https://github.com/ExodusMovement/exodus-hydra/commit/3a24900e000af929e34f094fd4406e39b48c58dc))
122
-
123
- ## [5.0.0-rc.10](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.9...@exodus/headless@5.0.0-rc.10) (2024-05-22)
124
-
125
- ### ⚠ BREAKING CHANGES
126
-
127
- - update kyc server url and endpoints (#6906)
128
-
129
- ### Features
130
-
131
- - addressProvider.getDefaultPurpose ([#6910](https://github.com/ExodusMovement/exodus-hydra/issues/6910)) ([533a105](https://github.com/ExodusMovement/exodus-hydra/commit/533a105af69fabb690e2c0c5fd4b3a21a2500526))
132
- - include assetSources feature in headless by default ([#7029](https://github.com/ExodusMovement/exodus-hydra/issues/7029)) ([7a9321e](https://github.com/ExodusMovement/exodus-hydra/commit/7a9321ef8503ecaf4bd126f5620720a520a5eda8))
133
- - update analytics in headless to kill keychain-atoms ([#7052](https://github.com/ExodusMovement/exodus-hydra/issues/7052)) ([c77e7fb](https://github.com/ExodusMovement/exodus-hydra/commit/c77e7fbabcd71ff70c69ce4057312b58b3cf2f77))
134
-
135
- ### Bug Fixes
136
-
137
- - atoms should not hit storage after first read or write ([#6834](https://github.com/ExodusMovement/exodus-hydra/issues/6834)) ([63e23f1](https://github.com/ExodusMovement/exodus-hydra/commit/63e23f1f0bf33732f67b70feb9e95e854a8fd90e))
138
- - improve perf of onAssetsSynced ([#6893](https://github.com/ExodusMovement/exodus-hydra/issues/6893)) ([3a7ce3a](https://github.com/ExodusMovement/exodus-hydra/commit/3a7ce3a28e3a2890118f7f1702120136c2f6fff8))
139
- - remove `compatibilityMode` from flagsStorage ([#7039](https://github.com/ExodusMovement/exodus-hydra/issues/7039)) ([50f5a7d](https://github.com/ExodusMovement/exodus-hydra/commit/50f5a7d48e039c1629cba6b64d0c952b86cdda3c))
140
- - update kyc server url and endpoints ([#6906](https://github.com/ExodusMovement/exodus-hydra/issues/6906)) ([485cf5b](https://github.com/ExodusMovement/exodus-hydra/commit/485cf5bc3abc0cfa65b106c0f8af1ddb21f026f6))
141
-
142
- ## [5.0.0-rc.9](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.8...@exodus/headless@5.0.0-rc.9) (2024-05-08)
143
-
144
- ### Features
145
-
146
- - **announcements:** add shownForcedAnnouncement ([#6797](https://github.com/ExodusMovement/exodus-hydra/issues/6797)) ([3af46d1](https://github.com/ExodusMovement/exodus-hydra/commit/3af46d196abdb03885091c03c9e8c86ced500193))
147
-
148
- ## [5.0.0-rc.8](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.7...@exodus/headless@5.0.0-rc.8) (2024-05-06)
149
-
150
- ### Features
151
-
152
- - always pass config to features ([#6820](https://github.com/ExodusMovement/exodus-hydra/issues/6820)) ([656501d](https://github.com/ExodusMovement/exodus-hydra/commit/656501dc47948bf055decfed3a404bc92170532b))
153
-
154
- ### Bug Fixes
155
-
156
- - `createExodus` return type ([#6739](https://github.com/ExodusMovement/exodus-hydra/issues/6739)) ([efa2d18](https://github.com/ExodusMovement/exodus-hydra/commit/efa2d18b60a60f625223515f38b065d0cb6b3827))
157
-
158
- ## [5.0.0-rc.7](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.6...@exodus/headless@5.0.0-rc.7) (2024-04-29)
159
-
160
- ### Features
161
-
162
- - add key-viewer to export encoded private keys ([#6713](https://github.com/ExodusMovement/exodus-hydra/issues/6713)) ([272a0cb](https://github.com/ExodusMovement/exodus-hydra/commit/272a0cb23cd5d76df801d661d16b0238b301e88c))
163
-
164
- ## [5.0.0-rc.6](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.5...@exodus/headless@5.0.0-rc.6) (2024-04-26)
165
-
166
- **Note:** Version bump only for package @exodus/headless
167
-
168
- ## [5.0.0-rc.5](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.3...@exodus/headless@5.0.0-rc.5) (2024-04-26)
169
-
170
- ### Features
171
-
172
- - add keychain api types ([#6679](https://github.com/ExodusMovement/exodus-hydra/issues/6679)) ([57d1bfc](https://github.com/ExodusMovement/exodus-hydra/commit/57d1bfcd6d98c5ec13a5801a2172e558fb4c3e1e))
173
-
174
- ## [5.0.0-rc.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.3...@exodus/headless@5.0.0-rc.4) (2024-04-25)
175
-
176
- ### Features
177
-
178
- - add keychain api types ([#6679](https://github.com/ExodusMovement/exodus-hydra/issues/6679)) ([57d1bfc](https://github.com/ExodusMovement/exodus-hydra/commit/57d1bfcd6d98c5ec13a5801a2172e558fb4c3e1e))
179
-
180
6
  ## [5.0.0-rc.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.2...@exodus/headless@5.0.0-rc.3) (2024-04-24)
181
7
 
182
8
  ### Features
package/README.md CHANGED
@@ -256,19 +256,19 @@ exodusContainer.debug.geolocation.merge({ countryCode: 'US' })
256
256
 
257
257
  > Type: object
258
258
 
259
- | Method | Type | Description |
260
- | ---------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
261
- | getTxLog | `async ({ assetName, walletAccount }) => TxSet` | Get the TxSet for the provided `assetName`/`walletAccount` combination (AssetSource) |
262
- | getLoadedTxLogs | `async () => object` | Get the all loaded `TxSet`s as a `{ [walletAccount]: { [assetName]: TxSet } } object` |
263
- | updateTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Add or update txs with updates provided in `txs` |
264
- | overwriteTxs | `async ({ assetName: string, walletAccount: string, txs: object[], notifyReceivedTxs: ?boolean }) => void` | Overwrite specified txs. |
265
- | clearTxs | `async ({ assetName: string, walletAccount: string }) => void` | Remove txs for AssetSource. |
266
- | removeTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Remove provided txs. |
267
- | getAccountState | `async ({ assetName, walletAccount }) => AccountState` | Get the AccountState for the provided AssetSource |
268
- | getLoadedAccountStates | `async () => object` | Get the all loaded `AccountState`s as a `{ [walletAccount]: { [assetName]: AccountState } } object` |
269
- | updateAccountState | `async ({ assetName: string, walletAccount: string, newData: object }) => void` | Update accountState for AssetSource. |
270
- | removeAccountState | `async ({ assetName: string, walletAccount: string }) => void` | Remove accountState for AssetSource. |
271
- | batch | `() => Batch` | Create a batch of updates. See [blockchainMetadata](../../features/blockchain-metadata/README.md) README for batching details. |
259
+ | Method | Type | Description |
260
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
261
+ | getTxLog | `async ({ assetName, walletAccount }) => TxSet` | Get the TxSet for the provided `assetName`/`walletAccount` combination (AssetSource) |
262
+ | getLoadedTxLogs | `async () => object` | Get the all loaded `TxSet`s as a `{ [walletAccount]: { [assetName]: TxSet } } object` |
263
+ | updateTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Add or update txs with updates provided in `txs` |
264
+ | overwriteTxs | `async ({ assetName: string, walletAccount: string, txs: object[], notifyReceivedTxs: ?boolean }) => void` | Overwrite specified txs. |
265
+ | clearTxs | `async ({ assetName: string, walletAccount: string }) => void` | Remove txs for AssetSource. |
266
+ | removeTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Remove provided txs. |
267
+ | getAccountState | `async ({ assetName, walletAccount }) => AccountState` | Get the AccountState for the provided AssetSource |
268
+ | getLoadedAccountStates | `async () => object` | Get the all loaded `AccountState`s as a `{ [walletAccount]: { [assetName]: AccountState } } object` |
269
+ | updateAccountState | `async ({ assetName: string, walletAccount: string, newData: object }) => void` | Update accountState for AssetSource. |
270
+ | removeAccountState | `async ({ assetName: string, walletAccount: string }) => void` | Remove accountState for AssetSource. |
271
+ | batch | `() => Batch` | Create a batch of updates. See [blockchainMetadata](../blockchain-metadata) README for batching details. |
272
272
 
273
273
  ### assets
274
274
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "5.0.0-rc.28",
3
+ "version": "5.0.0-rc.3",
4
4
  "description": "The platform-agnostic Exodus wallet SDK",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "main": "src/index.js",
@@ -23,89 +23,80 @@
23
23
  "scripts": {
24
24
  "lint": "run -T eslint . --ignore-path ../../.gitignore",
25
25
  "lint:fix": "yarn lint --fix",
26
- "test": "NODE_OPTIONS=--max-old-space-size=4096 run -T jest && yarn test:types",
27
- "test:types": "run -T tsc --noEmit"
26
+ "test": "NODE_OPTIONS=--max-old-space-size=4096 run -T jest"
28
27
  },
29
28
  "dependencies": {
30
- "@exodus/address-provider": "^12.0.1",
31
- "@exodus/application": "^1.2.4",
32
- "@exodus/argo": "^1.3.2",
33
- "@exodus/asset-sources": "^1.1.5",
34
- "@exodus/assets-feature": "^5.8.2",
35
- "@exodus/atoms": "^8.0.0",
36
- "@exodus/available-assets": "^8.4.0",
37
- "@exodus/balances": "^13.2.3",
29
+ "@exodus/address-provider": "^10.0.1",
30
+ "@exodus/argo": "^1.0.0",
31
+ "@exodus/assets-feature": "^4.0.1",
32
+ "@exodus/atoms": "^7.0.0",
33
+ "@exodus/available-assets": "^8.1.0",
34
+ "@exodus/balances": "^13.0.0",
38
35
  "@exodus/basic-utils": "^2.0.0",
39
- "@exodus/blockchain-metadata": "^15.3.5",
36
+ "@exodus/blockchain-metadata": "^15.3.0",
40
37
  "@exodus/dependency-injection": "^2.1.2",
41
- "@exodus/dependency-preprocessors": "^6.0.1",
42
- "@exodus/enabled-assets": "^10.5.1",
43
- "@exodus/error-tracking": "^1.1.3",
44
- "@exodus/feature-flags": "^6.0.2",
45
- "@exodus/fee-data-monitors": "^4.2.1",
38
+ "@exodus/dependency-preprocessors": "^5.1.0",
39
+ "@exodus/enabled-assets": "^10.2.0",
40
+ "@exodus/feature-flags": "^6.0.0",
41
+ "@exodus/fee-data-monitors": "^3.0.0",
46
42
  "@exodus/fetch": "^1.2.1",
47
- "@exodus/filesystem": "^1.1.2",
48
- "@exodus/fusion-atoms": "^1.2.1",
49
- "@exodus/geolocation": "^4.2.3",
43
+ "@exodus/filesystem": "^1.1.0",
44
+ "@exodus/fusion-atoms": "^1.1.2",
45
+ "@exodus/geolocation": "^4.1.0",
50
46
  "@exodus/hd-key-slip-10": "^2.0.0",
51
- "@exodus/key-ids": "^1.2.3",
52
- "@exodus/key-viewer": "^1.1.2",
53
- "@exodus/keychain": "^6.8.0",
54
- "@exodus/locale": "^2.2.2",
55
- "@exodus/message-signer": "^1.3.3",
47
+ "@exodus/key-ids": "^1.0.0",
48
+ "@exodus/keychain": "^6.1.0",
49
+ "@exodus/locale": "^2.2.0",
50
+ "@exodus/message-signer": "^1.1.1",
56
51
  "@exodus/module": "^1.2.2",
57
- "@exodus/pricing": "^1.3.2",
58
- "@exodus/public-key-provider": "^2.4.1",
59
- "@exodus/public-key-store": "^1.2.2",
60
- "@exodus/rates-monitor": "^4.3.3",
61
- "@exodus/remote-config": "^2.5.2",
62
- "@exodus/restore-progress-tracker": "^3.4.1",
52
+ "@exodus/pricing": "^1.2.0",
53
+ "@exodus/public-key-provider": "^2.0.0",
54
+ "@exodus/public-key-store": "^1.2.0",
55
+ "@exodus/rates-monitor": "^4.2.0",
56
+ "@exodus/remote-config": "^2.4.0",
57
+ "@exodus/restore-progress-tracker": "^3.0.0",
63
58
  "@exodus/sodium-crypto": "^3.2.0",
64
- "@exodus/startup-counter": "^1.0.3",
65
- "@exodus/tx-log-monitors": "^2.3.2",
66
- "@exodus/tx-signer": "^2.3.4",
59
+ "@exodus/startup-counter": "^1.0.0",
60
+ "@exodus/tx-signer": "^2.0.1",
67
61
  "@exodus/typeforce": "^1.18.1",
68
- "@exodus/wallet": "^14.5.3",
69
- "@exodus/wallet-accounts": "^16.8.2",
62
+ "@exodus/wallet": "^14.1.0",
63
+ "@exodus/wallet-accounts": "^16.2.0",
70
64
  "bip39": "^2.6.0",
71
65
  "events": "^3.3.0",
72
66
  "lodash": "npm:@exodus/lodash@^4.17.21-exodus.2",
73
- "minimalistic-assert": "^1.0.1",
74
- "ms": "^2.1.3"
67
+ "minimalistic-assert": "^1.0.1"
75
68
  },
76
69
  "devDependencies": {
77
- "@exodus/ab-testing": "^7.5.1",
70
+ "@exodus/ab-testing": "^7.3.0",
78
71
  "@exodus/algorand-lib": "^2.0.1",
79
72
  "@exodus/algorand-meta": "^1.1.4",
80
- "@exodus/analytics": "^13.3.1",
81
- "@exodus/announcements": "^2.11.2",
82
- "@exodus/apy-rates": "^3.4.2",
73
+ "@exodus/analytics": "^12.0.0",
74
+ "@exodus/announcements": "^2.7.0",
75
+ "@exodus/apy-rates": "^3.3.1",
83
76
  "@exodus/assets-feature": "workspace:^",
84
77
  "@exodus/bip32": "^2.1.1",
85
78
  "@exodus/bitcoin-plugin": "^1.0.14",
86
- "@exodus/connected-origins": "^3.3.4",
87
- "@exodus/crypto-news-monitor": "^5.0.2",
79
+ "@exodus/connected-origins": "^3.3.0",
80
+ "@exodus/crypto-news-monitor": "^5.0.0",
88
81
  "@exodus/currency": "^2.2.0",
89
- "@exodus/deferring-storage": "^1.0.1",
90
- "@exodus/ethereum-lib": "^5.0.0",
82
+ "@exodus/ethereum-lib": "^4.5.0",
91
83
  "@exodus/ethereum-meta": "^1.1.0",
92
84
  "@exodus/exodus-pricing-client": "^1.2.0",
93
- "@exodus/fetch-factory": "^2.2.0",
94
- "@exodus/key-identifier": "^1.2.1",
85
+ "@exodus/fetch-factory": "^1.0.0",
95
86
  "@exodus/key-utils": "^3.0.0",
96
- "@exodus/kyc": "^6.1.4",
87
+ "@exodus/kyc": "^5.0.0",
97
88
  "@exodus/litecoin-meta": "^1.0.0",
98
- "@exodus/market-history": "^9.0.3",
89
+ "@exodus/market-history": "^7.4.0",
99
90
  "@exodus/models": "^11.9.0",
100
- "@exodus/nfts": "^9.3.3",
101
- "@exodus/personal-notes": "^3.6.2",
102
- "@exodus/referrals": "^8.7.3",
91
+ "@exodus/nfts": "^9.1.5",
92
+ "@exodus/personal-notes": "^3.6.0",
93
+ "@exodus/referrals": "^8.3.0",
103
94
  "@exodus/solana-lib": "^2.0.0",
104
95
  "@exodus/solana-meta": "^1.0.2",
105
- "@exodus/storage-encrypted": "^1.4.1",
96
+ "@exodus/storage-encrypted": "^1.3.0",
106
97
  "@exodus/storage-memory": "^2.1.1",
107
- "@exodus/top-movers-monitor": "^4.2.3",
108
- "@exodus/ui-config": "^3.7.2",
98
+ "@exodus/top-movers-monitor": "^4.1.0",
99
+ "@exodus/ui-config": "^3.6.1",
109
100
  "@exodus/wild-emitter": "^1.0.0",
110
101
  "buffer-json": "^2.0.0",
111
102
  "deepmerge": "^4.2.2",
@@ -115,5 +106,5 @@
115
106
  "msw": "^2.0.0",
116
107
  "p-defer": "^4.0.0"
117
108
  },
118
- "gitHead": "95f2c3ed980cac4564367a8b0b3cc7d0badbe1f1"
109
+ "gitHead": "c93a3079a4f01f2839906d6e2dca0a2395c52a5b"
119
110
  }
package/src/api/index.js CHANGED
@@ -4,9 +4,10 @@ import assert from 'minimalistic-assert'
4
4
  import createDebug from './debug'
5
5
  import createReporting from './reporting'
6
6
 
7
- const createApi = ({ ioc, port, config, debug, logger }) => {
7
+ const createApi = ({ ioc, port, config, debug }) => {
8
8
  const apis = ioc.getByType('api')
9
- const { application } = ioc.get('applicationApi')
9
+
10
+ const { application, passphraseCache } = ioc.getByType('module')
10
11
 
11
12
  const featureApis = Object.create(null)
12
13
  for (const api of Object.values(apis)) {
@@ -27,36 +28,35 @@ const createApi = ({ ioc, port, config, debug, logger }) => {
27
28
  }
28
29
  }
29
30
 
30
- const deprecated = (fn) => {
31
- return (...args) => {
32
- logger.warn(
33
- `"wallet.${fn.name}" is deprecated and will be removed soon, please use "application.${fn.name}"`
34
- )
35
- return fn(...args)
36
- }
31
+ const restoreFromCurrentPhrase = async ({ passphrase } = {}) => {
32
+ if (!passphrase && passphraseCache) passphrase = await passphraseCache.get()
33
+ const mnemonic = await application.getMnemonic({ passphrase })
34
+ await application.import({ passphrase, mnemonic })
37
35
  }
38
36
 
37
+ // TODO: Improve api here. exodus.wallet.create makes sense, but it's confusing it calls application
39
38
  featureApis.wallet = {
40
39
  ...featureApis.wallet,
41
40
  addSeed: application.addSeed,
42
- start: deprecated(application.start),
43
- stop: deprecated(application.stop),
44
- load: deprecated(application.load),
45
- unload: deprecated(application.unload),
46
- create: deprecated(application.create),
47
- lock: deprecated(application.lock),
48
- unlock: deprecated(application.unlock),
49
- import: deprecated(application.import),
50
- delete: deprecated(application.delete),
51
- getMnemonic: deprecated(application.getMnemonic),
52
- setBackedUp: deprecated(application.setBackedUp),
53
- changePassphrase: deprecated(application.changePassphrase),
54
- changeLockTimer: deprecated(application.changeLockTimer),
55
- restartAutoLockTimer: deprecated(application.restartAutoLockTimer),
56
- restoreFromCurrentPhrase: deprecated(application.restoreFromCurrentPhrase),
41
+ start: application.start,
42
+ stop: application.stop,
43
+ load: application.load,
44
+ unload: application.unload,
45
+ create: application.create,
46
+ lock: application.lock,
47
+ unlock: application.unlock,
48
+ import: application.import,
49
+ delete: application.delete,
50
+ getMnemonic: application.getMnemonic,
51
+ setBackedUp: application.setBackedUp,
52
+ changePassphrase: application.changePassphrase,
53
+ changeLockTimer: application.changeLockTimer,
54
+ restartAutoLockTimer: application.restartAutoLockTimer,
55
+ restoreFromCurrentPhrase,
57
56
  }
58
57
 
59
58
  const debugApi = createDebug({ ioc, port, debug })
59
+
60
60
  const reportingApi = createReporting({ ioc, config })
61
61
 
62
62
  const api = {
@@ -3,7 +3,6 @@ import { zipObject } from 'lodash'
3
3
  import { rejectAfter } from '../utils/promises'
4
4
 
5
5
  const createReporting = ({ ioc, config: { exportTimeout = 2000 } }) => {
6
- const logger = ioc.get('createLogger')('reporting')
7
6
  const nodes = ioc.getByType('report')
8
7
 
9
8
  const { lockedAtom } = ioc.getByType('atom')
@@ -18,16 +17,8 @@ const createReporting = ({ ioc, config: { exportTimeout = 2000 } }) => {
18
17
  `Export took longer than the maximum export timeout of ${Math.ceil(exportTimeout / 1000)}s`
19
18
  )
20
19
 
21
- const exportReport = async (report) => {
22
- const start = performance.now()
23
- const result = await report.export()
24
- const duration = performance.now() - start
25
- logger.debug(`Exported report for ${report.namespace} in ${duration}ms`)
26
- return result
27
- }
28
-
29
20
  const resolvedReports = await Promise.allSettled(
30
- reports.map((report) => Promise.race([exportReport(report), timeoutPromise]))
21
+ reports.map((report) => Promise.race([report.export(), timeoutPromise]))
31
22
  )
32
23
 
33
24
  const namespaces = reports.map((report) => report.namespace)
@@ -0,0 +1,9 @@
1
+ import { createStorageAtomFactory } from '@exodus/atoms'
2
+
3
+ const createBackedUpAtom = ({ storage }) => {
4
+ const atomFactory = createStorageAtomFactory({ storage })
5
+
6
+ return atomFactory({ key: 'backedUp', defaultValue: false, isSoleWriter: true })
7
+ }
8
+
9
+ export default createBackedUpAtom
@@ -0,0 +1,4 @@
1
+ import { createFusionAtom } from '@exodus/fusion-atoms'
2
+
3
+ export const createWalletCreatedAtAtom = ({ fusion, logger }) =>
4
+ createFusionAtom({ fusion, logger, path: 'createdAt', defaultValue: new Date().toISOString() })
@@ -0,0 +1,40 @@
1
+ import createBackedUpAtom from './backed-up'
2
+ import { createWalletCreatedAtAtom } from './created-at'
3
+ import createLockHistoryAtom from './lock-history'
4
+ import createdLockedAtom from './locked'
5
+ import createRestoreAtom from './restore'
6
+
7
+ export const lockedAtomDefinition = {
8
+ id: 'lockedAtom',
9
+ type: 'atom',
10
+ factory: createdLockedAtom,
11
+ dependencies: [],
12
+ }
13
+
14
+ export const lockHistoryAtomDefinition = {
15
+ id: 'lockHistoryAtom',
16
+ type: 'atom',
17
+ factory: createLockHistoryAtom,
18
+ dependencies: ['lockedAtom', 'config?'],
19
+ }
20
+
21
+ export const restoreAtomDefinition = {
22
+ id: 'restoreAtom',
23
+ type: 'atom',
24
+ factory: createRestoreAtom,
25
+ dependencies: [],
26
+ }
27
+
28
+ export const backedUpAtomDefinition = {
29
+ id: 'backedUpAtom',
30
+ type: 'atom',
31
+ factory: createBackedUpAtom,
32
+ dependencies: ['storage'],
33
+ }
34
+
35
+ export const walletCreatedAtAtomDefinition = {
36
+ id: 'walletCreatedAtAtom',
37
+ type: 'atom',
38
+ factory: createWalletCreatedAtAtom,
39
+ dependencies: ['fusion', 'logger'],
40
+ }
@@ -0,0 +1,15 @@
1
+ import { createInMemoryAtom, difference } from '@exodus/atoms'
2
+
3
+ const createLockHistoryAtom = ({ lockedAtom, config: { maxEntries = 10 } = {} }) => {
4
+ const lockHistory = createInMemoryAtom({ defaultValue: [] })
5
+
6
+ difference(lockedAtom).observe(async ({ current: locked, previous: previouslyLocked }) => {
7
+ await lockHistory.set((current) =>
8
+ [{ locked, timestamp: new Date() }, ...current].slice(0, maxEntries)
9
+ )
10
+ })
11
+
12
+ return lockHistory
13
+ }
14
+
15
+ export default createLockHistoryAtom
@@ -0,0 +1,5 @@
1
+ import { createInMemoryAtom } from '@exodus/atoms'
2
+
3
+ const createLockedAtom = () => createInMemoryAtom({ defaultValue: true })
4
+
5
+ export default createLockedAtom
@@ -0,0 +1,5 @@
1
+ import { createInMemoryAtom } from '@exodus/atoms'
2
+
3
+ const createRestoreAtom = () => createInMemoryAtom() // eslint-disable-line @exodus/hydra/in-memory-atom-default-value
4
+
5
+ export default createRestoreAtom
@@ -0,0 +1,18 @@
1
+ export const LifecycleHook = Object.freeze({
2
+ Lock: 'lock',
3
+ Unlock: 'unlock',
4
+ Clear: 'clear',
5
+ Import: 'import',
6
+ AddSeed: 'add-seed',
7
+ Migrate: 'migrate',
8
+ Start: 'start',
9
+ Stop: 'stop',
10
+ Restart: 'restart',
11
+ Load: 'load',
12
+ Unload: 'unload',
13
+ Create: 'create',
14
+ Restore: 'restore',
15
+ RestoreCompleted: 'restore-completed',
16
+ AssetsSynced: 'assets-synced',
17
+ ChangePassphrase: 'change-passphrase',
18
+ })
@@ -0,0 +1,30 @@
1
+ import {
2
+ backedUpAtomDefinition,
3
+ lockedAtomDefinition,
4
+ lockHistoryAtomDefinition,
5
+ restoreAtomDefinition,
6
+ walletCreatedAtAtomDefinition,
7
+ } from './atoms'
8
+ import applicationDefinition from './module'
9
+ import applicationLifecyclePluginDefinition from './plugins/lifecycle'
10
+
11
+ const application = () => {
12
+ return {
13
+ id: 'application',
14
+ definitions: [
15
+ { definition: applicationDefinition },
16
+ { definition: lockedAtomDefinition },
17
+ { definition: restoreAtomDefinition },
18
+ { definition: lockHistoryAtomDefinition },
19
+ { definition: walletCreatedAtAtomDefinition },
20
+ { definition: applicationLifecyclePluginDefinition },
21
+ {
22
+ definition: backedUpAtomDefinition,
23
+ storage: { namespace: 'wallet' },
24
+ aliases: [{ interfaceId: 'storage', implementationId: 'unsafeStorage' }],
25
+ },
26
+ ],
27
+ }
28
+ }
29
+
30
+ export default application