@exodus/headless 5.0.0-rc.39 → 5.0.0-rc.4
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 +0 -243
- package/README.md +64 -14
- package/package.json +64 -70
- package/src/api/index.js +26 -36
- package/src/api/reporting.js +1 -10
- package/src/application/atoms/backed-up.js +9 -0
- package/src/application/atoms/created-at.js +4 -0
- package/src/application/atoms/index.js +40 -0
- package/src/application/atoms/lock-history.js +15 -0
- package/src/application/atoms/locked.js +5 -0
- package/src/application/atoms/restore.js +5 -0
- package/src/application/constants.js +18 -0
- package/src/application/index.js +30 -0
- package/src/application/module/application.js +344 -0
- package/src/application/module/index.js +17 -0
- package/src/application/plugins/index.js +1 -0
- package/src/application/plugins/lifecycle.js +52 -0
- package/src/atoms/base-asset-names-to-monitor.js +2 -14
- package/src/dependencies/atoms.js +1 -6
- package/src/dependencies/configs.js +0 -1
- package/src/dependencies/index.js +8 -1
- package/src/dependencies/plugins.js +0 -2
- package/src/dependencies/utils.js +1 -6
- package/src/index.d.ts +26 -51
- package/src/index.js +26 -53
- package/src/migrations/attach.js +6 -18
- package/src/plugins/analytics.js +0 -1
- package/src/plugins/attach.js +7 -11
- package/src/plugins/log-lifecycle.js +0 -1
- package/src/unlock-encrypted-storage.js +0 -1
- package/src/utils/fusion.js +17 -0
- package/redux/index.d.ts +0 -1
- package/redux/index.js +0 -44
- package/src/features/keychain-rpc/index.js +0 -5
- package/src/features/wallet-rpc/index.js +0 -55
- package/src/plugins/headless-ui.js +0 -16
- package/src/utils/ioc.js +0 -45
package/CHANGELOG.md
CHANGED
|
@@ -3,249 +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.39](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.38...@exodus/headless@5.0.0-rc.39) (2024-10-14)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @exodus/headless
|
|
9
|
-
|
|
10
|
-
## [5.0.0-rc.38](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.37...@exodus/headless@5.0.0-rc.38) (2024-10-10)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @exodus/headless
|
|
13
|
-
|
|
14
|
-
## [5.0.0-rc.37](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.36...@exodus/headless@5.0.0-rc.37) (2024-10-03)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @exodus/headless
|
|
17
|
-
|
|
18
|
-
## [5.0.0-rc.36](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.35...@exodus/headless@5.0.0-rc.36) (2024-10-03)
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
- add error tracking API types ([#9579](https://github.com/ExodusMovement/exodus-hydra/issues/9579)) ([317e40b](https://github.com/ExodusMovement/exodus-hydra/commit/317e40bde1007f7d192379ab390e3aed0a6ebd1a))
|
|
23
|
-
- **headless:** inject startup-counter redux slice ([#9615](https://github.com/ExodusMovement/exodus-hydra/issues/9615)) ([cef0696](https://github.com/ExodusMovement/exodus-hydra/commit/cef069678edb8b9518957c72a545757eb5c48bd9))
|
|
24
|
-
- use atoms v9 ([#9651](https://github.com/ExodusMovement/exodus-hydra/issues/9651)) ([524aa61](https://github.com/ExodusMovement/exodus-hydra/commit/524aa61f69c81e6ac00b2f94ea830688a105b3e4))
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
- **types:** add application to ExodusApi union type ([#9404](https://github.com/ExodusMovement/exodus-hydra/issues/9404)) ([b2e4577](https://github.com/ExodusMovement/exodus-hydra/commit/b2e457752c9427d480a06b9d921d74b45752fa7d)), closes [#9405](https://github.com/ExodusMovement/exodus-hydra/issues/9405)
|
|
29
|
-
- **ui-config:** store syncable configs in storage ([#9581](https://github.com/ExodusMovement/exodus-hydra/issues/9581)) ([73b97d3](https://github.com/ExodusMovement/exodus-hydra/commit/73b97d392975b250aef35801f6acc658b72404ec))
|
|
30
|
-
|
|
31
|
-
## [5.0.0-rc.35](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.34...@exodus/headless@5.0.0-rc.35) (2024-09-23)
|
|
32
|
-
|
|
33
|
-
### Features
|
|
34
|
-
|
|
35
|
-
- add ability to ignore all sunset asset monitors ([#8875](https://github.com/ExodusMovement/exodus-hydra/issues/8875)) ([e7fafa4](https://github.com/ExodusMovement/exodus-hydra/commit/e7fafa437a17edd1aca2f430ce8cecfcd6088a72))
|
|
36
|
-
- allow supplying the wallet sdk as adapter to headless ([#9317](https://github.com/ExodusMovement/exodus-hydra/issues/9317)) ([de4dcca](https://github.com/ExodusMovement/exodus-hydra/commit/de4dccabd0126e28e5de08c946e60056eb9d149a))
|
|
37
|
-
- type dependency injection container ([#9398](https://github.com/ExodusMovement/exodus-hydra/issues/9398)) ([e347bfa](https://github.com/ExodusMovement/exodus-hydra/commit/e347bfaf210751fcfb62600f276402eb7fdce46d))
|
|
38
|
-
|
|
39
|
-
### Bug Fixes
|
|
40
|
-
|
|
41
|
-
- **headless:** bump @exodus/application ([#9230](https://github.com/ExodusMovement/exodus-hydra/issues/9230)) ([819597b](https://github.com/ExodusMovement/exodus-hydra/commit/819597b2042c5677651bf81f16d04b806bcfadec))
|
|
42
|
-
|
|
43
|
-
## [5.0.0-rc.34](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.32...@exodus/headless@5.0.0-rc.34) (2024-09-09)
|
|
44
|
-
|
|
45
|
-
### Features
|
|
46
|
-
|
|
47
|
-
- **headless:** move headless-ui plugin alongside others ([#8971](https://github.com/ExodusMovement/exodus-hydra/issues/8971)) ([4a5c72c](https://github.com/ExodusMovement/exodus-hydra/commit/4a5c72cd2271e835080e84be14d3a49364e43f3a))
|
|
48
|
-
- **headless:** clear headless-ui storage ([#8964](https://github.com/ExodusMovement/exodus-hydra/issues/8964)) ([5840128](https://github.com/ExodusMovement/exodus-hydra/commit/5840128c8d626278db51c4d06da33315603f3dc0))
|
|
49
|
-
- implement headless redux IOC ([#8857](https://github.com/ExodusMovement/exodus-hydra/issues/8857)) ([8520a07](https://github.com/ExodusMovement/exodus-hydra/commit/8520a07ba7d83db12051ad713fafbe00ad14ee13))
|
|
50
|
-
|
|
51
|
-
## [5.0.0-rc.33](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.32...@exodus/headless@5.0.0-rc.33) (2024-09-09)
|
|
52
|
-
|
|
53
|
-
### Features
|
|
54
|
-
|
|
55
|
-
- implement headless redux IOC ([#8857](https://github.com/ExodusMovement/exodus-hydra/issues/8857)) ([8520a07](https://github.com/ExodusMovement/exodus-hydra/commit/8520a07ba7d83db12051ad713fafbe00ad14ee13))
|
|
56
|
-
|
|
57
|
-
## [5.0.0-rc.32](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.31...@exodus/headless@5.0.0-rc.32) (2024-09-04)
|
|
58
|
-
|
|
59
|
-
### Bug Fixes
|
|
60
|
-
|
|
61
|
-
- required vs optional config ([#7987](https://github.com/ExodusMovement/exodus-hydra/issues/7987)) ([d9b5db1](https://github.com/ExodusMovement/exodus-hydra/commit/d9b5db1325d009a4970890f017736be04d086fe9))
|
|
62
|
-
|
|
63
|
-
## [5.0.0-rc.31](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.30...@exodus/headless@5.0.0-rc.31) (2024-08-26)
|
|
64
|
-
|
|
65
|
-
### Bug Fixes
|
|
66
|
-
|
|
67
|
-
- conditional customTokensMonitor creation ([#8269](https://github.com/ExodusMovement/exodus-hydra/issues/8269)) ([622bca7](https://github.com/ExodusMovement/exodus-hydra/commit/622bca7ae230ae302e9589ac00f3f7c8d5809a79))
|
|
68
|
-
|
|
69
|
-
## [5.0.0-rc.30](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.29...@exodus/headless@5.0.0-rc.30) (2024-08-12)
|
|
70
|
-
|
|
71
|
-
### Features
|
|
72
|
-
|
|
73
|
-
- **headless:** pass error tracking config ([#8328](https://github.com/ExodusMovement/exodus-hydra/issues/8328)) ([00d25c7](https://github.com/ExodusMovement/exodus-hydra/commit/00d25c794231565988e90ba3c5e1aba41159caba))
|
|
74
|
-
|
|
75
|
-
## [5.0.0-rc.29](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@5.0.0-rc.28...@exodus/headless@5.0.0-rc.29) (2024-08-06)
|
|
76
|
-
|
|
77
|
-
### Features
|
|
78
|
-
|
|
79
|
-
- move passphrase-cache to application feature ([#8213](https://github.com/ExodusMovement/exodus-hydra/issues/8213)) ([8b6cbf0](https://github.com/ExodusMovement/exodus-hydra/commit/8b6cbf02089cf6183767061757190fe7fc396262))
|
|
80
|
-
|
|
81
|
-
## [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)
|
|
82
|
-
|
|
83
|
-
### Features
|
|
84
|
-
|
|
85
|
-
- **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))
|
|
86
|
-
|
|
87
|
-
## [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)
|
|
88
|
-
|
|
89
|
-
### Bug Fixes
|
|
90
|
-
|
|
91
|
-
- migrate definitions ([#8030](https://github.com/ExodusMovement/exodus-hydra/issues/8030)) ([d2dfde5](https://github.com/ExodusMovement/exodus-hydra/commit/d2dfde55dfa843eb52842f64b3aac3a6f9a59069))
|
|
92
|
-
|
|
93
|
-
## [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)
|
|
94
|
-
|
|
95
|
-
- update address-provider version to v12.0.0 and updates its usage. config structure has not changed.
|
|
96
|
-
|
|
97
|
-
## [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)
|
|
98
|
-
|
|
99
|
-
### Features
|
|
100
|
-
|
|
101
|
-
- **headless:** add txlog monitors feature ([#7879](https://github.com/ExodusMovement/exodus-hydra/issues/7879)) ([cc5eaf4](https://github.com/ExodusMovement/exodus-hydra/commit/cc5eaf4fa46b2c1fe29bc4fd485c5adf724739a1))
|
|
102
|
-
|
|
103
|
-
## [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)
|
|
104
|
-
|
|
105
|
-
**Note:** Version bump only for package @exodus/headless
|
|
106
|
-
|
|
107
|
-
## [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)
|
|
108
|
-
|
|
109
|
-
### Features
|
|
110
|
-
|
|
111
|
-
- 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))
|
|
112
|
-
|
|
113
|
-
## [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)
|
|
114
|
-
|
|
115
|
-
**Note:** Version bump only for package @exodus/headless
|
|
116
|
-
|
|
117
|
-
## [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)
|
|
118
|
-
|
|
119
|
-
### Bug Fixes
|
|
120
|
-
|
|
121
|
-
- 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))
|
|
122
|
-
|
|
123
|
-
## [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)
|
|
124
|
-
|
|
125
|
-
### Features
|
|
126
|
-
|
|
127
|
-
- bump @exodus/error-tracking in headless ([#7824](https://github.com/ExodusMovement/exodus-hydra/issues/7824)) ([8e247f7](https://github.com/ExodusMovement/exodus-hydra/commit/8e247f7111bf847f6b06c0305be1f60f0061a9a2))
|
|
128
|
-
|
|
129
|
-
## [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)
|
|
130
|
-
|
|
131
|
-
### Features
|
|
132
|
-
|
|
133
|
-
- 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)
|
|
134
|
-
|
|
135
|
-
## [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)
|
|
136
|
-
|
|
137
|
-
### Features
|
|
138
|
-
|
|
139
|
-
- bump @exodus/assets in headless pkg ([#7802](https://github.com/ExodusMovement/exodus-hydra/issues/7802)) ([5a67601](https://github.com/ExodusMovement/exodus-hydra/commit/5a67601cfd72a6b76aec2abc3cf0d8212d80edca))
|
|
140
|
-
|
|
141
|
-
### Bug Fixes
|
|
142
|
-
|
|
143
|
-
- update referrals config key ([#7666](https://github.com/ExodusMovement/exodus-hydra/issues/7666)) ([17fd92a](https://github.com/ExodusMovement/exodus-hydra/commit/17fd92ab4c95757c4fbbd26b8bb7a4cf6fed87d8))
|
|
144
|
-
|
|
145
|
-
## [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)
|
|
146
|
-
|
|
147
|
-
### Features
|
|
148
|
-
|
|
149
|
-
- 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))
|
|
150
|
-
- log reporting duration per node ([#7574](https://github.com/ExodusMovement/exodus-hydra/issues/7574)) ([26ba1cb](https://github.com/ExodusMovement/exodus-hydra/commit/26ba1cbb8281072289e99b9ebdd26a940f23d605))
|
|
151
|
-
|
|
152
|
-
### Bug Fixes
|
|
153
|
-
|
|
154
|
-
- headless test ([#7476](https://github.com/ExodusMovement/exodus-hydra/issues/7476)) ([a901f32](https://github.com/ExodusMovement/exodus-hydra/commit/a901f32c0e9b5f23b04a322f4904a03b1d18f694))
|
|
155
|
-
|
|
156
|
-
## [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)
|
|
157
|
-
|
|
158
|
-
**Note:** Version bump only for package @exodus/headless
|
|
159
|
-
|
|
160
|
-
## [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)
|
|
161
|
-
|
|
162
|
-
**Note:** Version bump only for package @exodus/headless
|
|
163
|
-
|
|
164
|
-
### Features
|
|
165
|
-
|
|
166
|
-
- add header handling per domain ([#7439](https://github.com/ExodusMovement/exodus-hydra/issues/7439)) ([7c45192](https://github.com/ExodusMovement/exodus-hydra/commit/7c451924901bd118765bea8bc7e1bb6f8bf1b5f5))
|
|
167
|
-
|
|
168
|
-
## [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)
|
|
169
|
-
|
|
170
|
-
### Bug Fixes
|
|
171
|
-
|
|
172
|
-
- 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))
|
|
173
|
-
- revert to use legacy kyc ([#7294](https://github.com/ExodusMovement/exodus-hydra/issues/7294)) ([6b52bcc](https://github.com/ExodusMovement/exodus-hydra/commit/6b52bcc1aa1ed1f1553403d64bb1e3f209be72a6))
|
|
174
|
-
- chore: bump wallet-accounts in headless ([#7431](https://github.com/ExodusMovement/exodus-hydra/issues/7431)) ([d39d9cf](https://github.com/ExodusMovement/exodus-hydra/commit/ad94a2948ffe03aee9c86d3acc6a15e57d39d9cf))
|
|
175
|
-
|
|
176
|
-
## [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)
|
|
177
|
-
|
|
178
|
-
### Bug Fixes
|
|
179
|
-
|
|
180
|
-
- 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)
|
|
181
|
-
|
|
182
|
-
## [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)
|
|
183
|
-
|
|
184
|
-
### Features
|
|
185
|
-
|
|
186
|
-
- export `ApplicationWalletApi` type ([#7189](https://github.com/ExodusMovement/exodus-hydra/issues/7189)) ([3aced97](https://github.com/ExodusMovement/exodus-hydra/commit/3aced9749447cca0ebdc1824770eb8a0711f7d65))
|
|
187
|
-
|
|
188
|
-
### Bug Fixes
|
|
189
|
-
|
|
190
|
-
- await clearing personal notes storage ([#7055](https://github.com/ExodusMovement/exodus-hydra/issues/7055)) ([5522284](https://github.com/ExodusMovement/exodus-hydra/commit/5522284ccc3db4bf837a3ff752234396d10d8bce))
|
|
191
|
-
|
|
192
|
-
## [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)
|
|
193
|
-
|
|
194
|
-
### Bug Fixes
|
|
195
|
-
|
|
196
|
-
- set walletAccount defaultLabel in migration ([#7134](https://github.com/ExodusMovement/exodus-hydra/issues/7134)) ([3a24900](https://github.com/ExodusMovement/exodus-hydra/commit/3a24900e000af929e34f094fd4406e39b48c58dc))
|
|
197
|
-
|
|
198
|
-
## [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)
|
|
199
|
-
|
|
200
|
-
### ⚠ BREAKING CHANGES
|
|
201
|
-
|
|
202
|
-
- update kyc server url and endpoints (#6906)
|
|
203
|
-
|
|
204
|
-
### Features
|
|
205
|
-
|
|
206
|
-
- addressProvider.getDefaultPurpose ([#6910](https://github.com/ExodusMovement/exodus-hydra/issues/6910)) ([533a105](https://github.com/ExodusMovement/exodus-hydra/commit/533a105af69fabb690e2c0c5fd4b3a21a2500526))
|
|
207
|
-
- 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))
|
|
208
|
-
- 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))
|
|
209
|
-
|
|
210
|
-
### Bug Fixes
|
|
211
|
-
|
|
212
|
-
- 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))
|
|
213
|
-
- improve perf of onAssetsSynced ([#6893](https://github.com/ExodusMovement/exodus-hydra/issues/6893)) ([3a7ce3a](https://github.com/ExodusMovement/exodus-hydra/commit/3a7ce3a28e3a2890118f7f1702120136c2f6fff8))
|
|
214
|
-
- remove `compatibilityMode` from flagsStorage ([#7039](https://github.com/ExodusMovement/exodus-hydra/issues/7039)) ([50f5a7d](https://github.com/ExodusMovement/exodus-hydra/commit/50f5a7d48e039c1629cba6b64d0c952b86cdda3c))
|
|
215
|
-
- update kyc server url and endpoints ([#6906](https://github.com/ExodusMovement/exodus-hydra/issues/6906)) ([485cf5b](https://github.com/ExodusMovement/exodus-hydra/commit/485cf5bc3abc0cfa65b106c0f8af1ddb21f026f6))
|
|
216
|
-
|
|
217
|
-
## [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)
|
|
218
|
-
|
|
219
|
-
### Features
|
|
220
|
-
|
|
221
|
-
- **announcements:** add shownForcedAnnouncement ([#6797](https://github.com/ExodusMovement/exodus-hydra/issues/6797)) ([3af46d1](https://github.com/ExodusMovement/exodus-hydra/commit/3af46d196abdb03885091c03c9e8c86ced500193))
|
|
222
|
-
|
|
223
|
-
## [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)
|
|
224
|
-
|
|
225
|
-
### Features
|
|
226
|
-
|
|
227
|
-
- always pass config to features ([#6820](https://github.com/ExodusMovement/exodus-hydra/issues/6820)) ([656501d](https://github.com/ExodusMovement/exodus-hydra/commit/656501dc47948bf055decfed3a404bc92170532b))
|
|
228
|
-
|
|
229
|
-
### Bug Fixes
|
|
230
|
-
|
|
231
|
-
- `createExodus` return type ([#6739](https://github.com/ExodusMovement/exodus-hydra/issues/6739)) ([efa2d18](https://github.com/ExodusMovement/exodus-hydra/commit/efa2d18b60a60f625223515f38b065d0cb6b3827))
|
|
232
|
-
|
|
233
|
-
## [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)
|
|
234
|
-
|
|
235
|
-
### Features
|
|
236
|
-
|
|
237
|
-
- 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))
|
|
238
|
-
|
|
239
|
-
## [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)
|
|
240
|
-
|
|
241
|
-
**Note:** Version bump only for package @exodus/headless
|
|
242
|
-
|
|
243
|
-
## [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)
|
|
244
|
-
|
|
245
|
-
### Features
|
|
246
|
-
|
|
247
|
-
- add keychain api types ([#6679](https://github.com/ExodusMovement/exodus-hydra/issues/6679)) ([57d1bfc](https://github.com/ExodusMovement/exodus-hydra/commit/57d1bfcd6d98c5ec13a5801a2172e558fb4c3e1e))
|
|
248
|
-
|
|
249
6
|
## [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)
|
|
250
7
|
|
|
251
8
|
### Features
|
package/README.md
CHANGED
|
@@ -62,7 +62,57 @@ The headless wallet instance transitions through different states during his lif
|
|
|
62
62
|
- Fires hook call: Allows modules to subscribe and halt transition until listener resolves.
|
|
63
63
|
- Fires event call: Emitted after all hooks had been executed and resolved.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Below you can find a state diagram that visualize what hooks are triggered between state transitions:
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
stateDiagram-v2
|
|
69
|
+
direction LR
|
|
70
|
+
[*] --> Starting
|
|
71
|
+
|
|
72
|
+
state Starting {
|
|
73
|
+
direction LR
|
|
74
|
+
|
|
75
|
+
state "Needs clear storage?*" as NeedsClear
|
|
76
|
+
state "Is importing?" as IsImporting
|
|
77
|
+
|
|
78
|
+
NeedsClear --> Clearing : CLEAR
|
|
79
|
+
Clearing --> IsImporting
|
|
80
|
+
IsImporting --> Importing : IMPORT
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
Starting --> Started : START
|
|
84
|
+
|
|
85
|
+
state Started {
|
|
86
|
+
direction LR
|
|
87
|
+
|
|
88
|
+
state "Has seed?" as HasSeed
|
|
89
|
+
|
|
90
|
+
HasSeed --> Empty : No
|
|
91
|
+
HasSeed --> Locked : Yes
|
|
92
|
+
|
|
93
|
+
Empty --> Locked : CREATE \n---or---\nIMPORT
|
|
94
|
+
|
|
95
|
+
Locked --> Migrating : MIGRATE
|
|
96
|
+
Migrating --> Unlocked : UNLOCK
|
|
97
|
+
Unlocked --> Locked : LOCK
|
|
98
|
+
|
|
99
|
+
Unlocked --> Restarting : DELETE
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
Restarting --> [*] : RESTART
|
|
105
|
+
|
|
106
|
+
Started --> Started : LOAD
|
|
107
|
+
|
|
108
|
+
classDef conditional fill:#ededed,stroke:#c2c2c2,color:#a6a6a6,stroke-width:2;
|
|
109
|
+
|
|
110
|
+
class NeedsClear conditional
|
|
111
|
+
class IsImporting conditional
|
|
112
|
+
class HasSeed conditional
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
\* Wallet needs to clear storage if seed is not present or is restoring a new wallet
|
|
66
116
|
|
|
67
117
|
## Port
|
|
68
118
|
|
|
@@ -206,19 +256,19 @@ exodusContainer.debug.geolocation.merge({ countryCode: 'US' })
|
|
|
206
256
|
|
|
207
257
|
> Type: object
|
|
208
258
|
|
|
209
|
-
| Method | Type | Description
|
|
210
|
-
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
211
|
-
| getTxLog | `async ({ assetName, walletAccount }) => TxSet` | Get the TxSet for the provided `assetName`/`walletAccount` combination (AssetSource)
|
|
212
|
-
| getLoadedTxLogs | `async () => object` | Get the all loaded `TxSet`s as a `{ [walletAccount]: { [assetName]: TxSet } } object`
|
|
213
|
-
| updateTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Add or update txs with updates provided in `txs`
|
|
214
|
-
| overwriteTxs | `async ({ assetName: string, walletAccount: string, txs: object[], notifyReceivedTxs: ?boolean }) => void` | Overwrite specified txs.
|
|
215
|
-
| clearTxs | `async ({ assetName: string, walletAccount: string }) => void` | Remove txs for AssetSource.
|
|
216
|
-
| removeTxs | `async ({ assetName: string, walletAccount: string, txs: object[] }) => void` | Remove provided txs.
|
|
217
|
-
| getAccountState | `async ({ assetName, walletAccount }) => AccountState` | Get the AccountState for the provided AssetSource
|
|
218
|
-
| getLoadedAccountStates | `async () => object` | Get the all loaded `AccountState`s as a `{ [walletAccount]: { [assetName]: AccountState } } object`
|
|
219
|
-
| updateAccountState | `async ({ assetName: string, walletAccount: string, newData: object }) => void` | Update accountState for AssetSource.
|
|
220
|
-
| removeAccountState | `async ({ assetName: string, walletAccount: string }) => void` | Remove accountState for AssetSource.
|
|
221
|
-
| batch | `() => Batch` | Create a batch of updates. See [blockchainMetadata](
|
|
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. |
|
|
222
272
|
|
|
223
273
|
### assets
|
|
224
274
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/headless",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.4",
|
|
4
4
|
"description": "The platform-agnostic Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -15,94 +15,88 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"src",
|
|
18
|
-
"redux",
|
|
19
18
|
"README.md",
|
|
20
19
|
"CHANGELOG.md",
|
|
21
20
|
"!**/__tests__/**",
|
|
22
21
|
"!**/*.test.js"
|
|
23
22
|
],
|
|
24
23
|
"scripts": {
|
|
25
|
-
"lint": "run -T eslint .",
|
|
24
|
+
"lint": "run -T eslint . --ignore-path ../../.gitignore",
|
|
26
25
|
"lint:fix": "yarn lint --fix",
|
|
27
|
-
"test": "
|
|
28
|
-
"test:integration": "run test:single-process jest **/*.integration-test.js && run test:multi-process jest **/*.integration-test.js",
|
|
29
|
-
"test:single-process": "NODE_OPTIONS=--max-old-space-size=4096 run -T jest",
|
|
30
|
-
"test:multi-process": "MULTI_PROCESS=1 NODE_OPTIONS=--max-old-space-size=4096 run -T jest",
|
|
31
|
-
"test:types": "run -T tsc --noEmit"
|
|
26
|
+
"test": "NODE_OPTIONS=--max-old-space-size=4096 run -T jest"
|
|
32
27
|
},
|
|
33
28
|
"dependencies": {
|
|
34
|
-
"@exodus/address-provider": "^
|
|
35
|
-
"@exodus/
|
|
36
|
-
"@exodus/
|
|
37
|
-
"@exodus/
|
|
38
|
-
"@exodus/assets
|
|
39
|
-
"@exodus/
|
|
40
|
-
"@exodus/
|
|
41
|
-
"@exodus/
|
|
42
|
-
"@exodus/
|
|
43
|
-
"@exodus/
|
|
44
|
-
"@exodus/
|
|
45
|
-
"@exodus/feature-flags": "^6.0.
|
|
46
|
-
"@exodus/fee-data-monitors": "^
|
|
47
|
-
"@exodus/
|
|
48
|
-
"@exodus/
|
|
49
|
-
"@exodus/
|
|
50
|
-
"@exodus/
|
|
51
|
-
"@exodus/
|
|
52
|
-
"@exodus/
|
|
53
|
-
"@exodus/
|
|
54
|
-
"@exodus/
|
|
55
|
-
"@exodus/
|
|
56
|
-
"@exodus/
|
|
57
|
-
"@exodus/
|
|
58
|
-
"@exodus/
|
|
29
|
+
"@exodus/address-provider": "^10.0.1",
|
|
30
|
+
"@exodus/argo": "^1.0.0",
|
|
31
|
+
"@exodus/assets-feature": "^5.1.0",
|
|
32
|
+
"@exodus/atoms": "^7.0.0",
|
|
33
|
+
"@exodus/available-assets": "^8.1.0",
|
|
34
|
+
"@exodus/balances": "^13.0.0",
|
|
35
|
+
"@exodus/basic-utils": "^2.0.0",
|
|
36
|
+
"@exodus/blockchain-metadata": "^15.3.0",
|
|
37
|
+
"@exodus/dependency-injection": "^2.1.2",
|
|
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": "^4.2.0",
|
|
42
|
+
"@exodus/fetch": "^1.2.1",
|
|
43
|
+
"@exodus/filesystem": "^1.1.0",
|
|
44
|
+
"@exodus/fusion-atoms": "^1.1.2",
|
|
45
|
+
"@exodus/geolocation": "^4.1.0",
|
|
46
|
+
"@exodus/hd-key-slip-10": "^2.0.0",
|
|
47
|
+
"@exodus/key-ids": "^1.0.0",
|
|
48
|
+
"@exodus/keychain": "^6.3.0",
|
|
49
|
+
"@exodus/locale": "^2.2.0",
|
|
50
|
+
"@exodus/message-signer": "^1.1.1",
|
|
51
|
+
"@exodus/module": "^1.2.2",
|
|
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",
|
|
59
58
|
"@exodus/sodium-crypto": "^3.2.0",
|
|
60
|
-
"@exodus/startup-counter": "^1.
|
|
61
|
-
"@exodus/tx-
|
|
62
|
-
"@exodus/tx-signer": "^2.3.4",
|
|
59
|
+
"@exodus/startup-counter": "^1.0.0",
|
|
60
|
+
"@exodus/tx-signer": "^2.0.1",
|
|
63
61
|
"@exodus/typeforce": "^1.18.1",
|
|
64
|
-
"@exodus/wallet": "^
|
|
65
|
-
"@exodus/wallet-accounts": "^16.
|
|
62
|
+
"@exodus/wallet": "^14.1.0",
|
|
63
|
+
"@exodus/wallet-accounts": "^16.2.0",
|
|
66
64
|
"bip39": "^2.6.0",
|
|
65
|
+
"events": "^3.3.0",
|
|
67
66
|
"lodash": "npm:@exodus/lodash@^4.17.21-exodus.2",
|
|
68
|
-
"minimalistic-assert": "^1.0.1"
|
|
69
|
-
"ms": "^2.1.3"
|
|
67
|
+
"minimalistic-assert": "^1.0.1"
|
|
70
68
|
},
|
|
71
69
|
"devDependencies": {
|
|
72
|
-
"@exodus/ab-testing": "^7.
|
|
70
|
+
"@exodus/ab-testing": "^7.3.0",
|
|
73
71
|
"@exodus/algorand-lib": "^2.0.1",
|
|
74
72
|
"@exodus/algorand-meta": "^1.1.4",
|
|
75
|
-
"@exodus/analytics": "^
|
|
76
|
-
"@exodus/announcements": "^
|
|
77
|
-
"@exodus/apy-rates": "^3.
|
|
78
|
-
"@exodus/
|
|
79
|
-
"@exodus/bip32": "^
|
|
73
|
+
"@exodus/analytics": "^12.0.0",
|
|
74
|
+
"@exodus/announcements": "^2.7.0",
|
|
75
|
+
"@exodus/apy-rates": "^3.3.1",
|
|
76
|
+
"@exodus/assets-feature": "workspace:^",
|
|
77
|
+
"@exodus/bip32": "^2.1.1",
|
|
80
78
|
"@exodus/bitcoin-plugin": "^1.0.14",
|
|
81
|
-
"@exodus/
|
|
82
|
-
"@exodus/
|
|
83
|
-
"@exodus/
|
|
84
|
-
"@exodus/
|
|
85
|
-
"@exodus/dependency-types": "^2.1.0",
|
|
86
|
-
"@exodus/domain-serialization": "^1.3.1",
|
|
87
|
-
"@exodus/ethereum-lib": "^5.0.0",
|
|
79
|
+
"@exodus/connected-origins": "^3.3.0",
|
|
80
|
+
"@exodus/crypto-news-monitor": "^5.0.0",
|
|
81
|
+
"@exodus/currency": "^2.2.0",
|
|
82
|
+
"@exodus/ethereum-lib": "^4.5.0",
|
|
88
83
|
"@exodus/ethereum-meta": "^1.1.0",
|
|
89
|
-
"@exodus/exodus-pricing-client": "^1.
|
|
90
|
-
"@exodus/fetch": "^1.
|
|
91
|
-
"@exodus/
|
|
92
|
-
"@exodus/
|
|
93
|
-
"@exodus/
|
|
94
|
-
"@exodus/market-history": "^
|
|
95
|
-
"@exodus/models": "^
|
|
96
|
-
"@exodus/nfts": "^9.
|
|
97
|
-
"@exodus/personal-notes": "^3.6.
|
|
98
|
-
"@exodus/referrals": "^8.
|
|
99
|
-
"@exodus/solana-lib": "^
|
|
84
|
+
"@exodus/exodus-pricing-client": "^1.2.0",
|
|
85
|
+
"@exodus/fetch-factory": "^1.0.0",
|
|
86
|
+
"@exodus/key-utils": "^3.0.0",
|
|
87
|
+
"@exodus/kyc": "^5.0.0",
|
|
88
|
+
"@exodus/litecoin-meta": "^1.0.0",
|
|
89
|
+
"@exodus/market-history": "^7.4.0",
|
|
90
|
+
"@exodus/models": "^11.9.0",
|
|
91
|
+
"@exodus/nfts": "^9.1.6",
|
|
92
|
+
"@exodus/personal-notes": "^3.6.0",
|
|
93
|
+
"@exodus/referrals": "^8.3.0",
|
|
94
|
+
"@exodus/solana-lib": "^2.0.0",
|
|
100
95
|
"@exodus/solana-meta": "^1.0.2",
|
|
101
|
-
"@exodus/storage-encrypted": "^1.
|
|
102
|
-
"@exodus/storage-memory": "^2.
|
|
103
|
-
"@exodus/top-movers-monitor": "^4.
|
|
104
|
-
"@exodus/ui-config": "^3.
|
|
105
|
-
"@exodus/wallet-sdk": "^1.1.1",
|
|
96
|
+
"@exodus/storage-encrypted": "^1.3.0",
|
|
97
|
+
"@exodus/storage-memory": "^2.1.1",
|
|
98
|
+
"@exodus/top-movers-monitor": "^4.1.0",
|
|
99
|
+
"@exodus/ui-config": "^3.6.1",
|
|
106
100
|
"@exodus/wild-emitter": "^1.0.0",
|
|
107
101
|
"buffer-json": "^2.0.0",
|
|
108
102
|
"deepmerge": "^4.2.2",
|
|
@@ -112,5 +106,5 @@
|
|
|
112
106
|
"msw": "^2.0.0",
|
|
113
107
|
"p-defer": "^4.0.0"
|
|
114
108
|
},
|
|
115
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "452c36dc78f06002027a1d5f7923970afcba18ad"
|
|
116
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
|
|
7
|
+
const createApi = ({ ioc, port, config, debug }) => {
|
|
8
8
|
const apis = ioc.getByType('api')
|
|
9
|
-
|
|
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,46 +28,35 @@ const createApi = ({ ioc, port, config, debug, logger }) => {
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
|
39
|
-
|
|
37
|
+
// TODO: Improve api here. exodus.wallet.create makes sense, but it's confusing it calls application
|
|
38
|
+
featureApis.wallet = {
|
|
39
|
+
...featureApis.wallet,
|
|
40
40
|
addSeed: application.addSeed,
|
|
41
|
-
start:
|
|
42
|
-
stop:
|
|
43
|
-
load:
|
|
44
|
-
unload:
|
|
45
|
-
create:
|
|
46
|
-
lock:
|
|
47
|
-
unlock:
|
|
48
|
-
import:
|
|
49
|
-
delete:
|
|
50
|
-
getMnemonic:
|
|
51
|
-
setBackedUp:
|
|
52
|
-
changePassphrase:
|
|
53
|
-
changeLockTimer:
|
|
54
|
-
restartAutoLockTimer:
|
|
55
|
-
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,
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
// featureApis.wallet is a proxy when the wallet sdk is used from a separate process, do not spread!
|
|
59
|
-
featureApis.wallet = new Proxy(featureApis.wallet, {
|
|
60
|
-
get(target, prop) {
|
|
61
|
-
if (prop in applicationWalletApi) {
|
|
62
|
-
return applicationWalletApi[prop]
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return target[prop]
|
|
66
|
-
},
|
|
67
|
-
})
|
|
68
|
-
|
|
69
58
|
const debugApi = createDebug({ ioc, port, debug })
|
|
59
|
+
|
|
70
60
|
const reportingApi = createReporting({ ioc, config })
|
|
71
61
|
|
|
72
62
|
const api = {
|
package/src/api/reporting.js
CHANGED
|
@@ -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([
|
|
21
|
+
reports.map((report) => Promise.race([report.export(), timeoutPromise]))
|
|
31
22
|
)
|
|
32
23
|
|
|
33
24
|
const namespaces = reports.map((report) => report.namespace)
|