@exodus/headless 2.0.0-alpha.93 → 2.0.0-alpha.95
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 +17 -0
- package/package.json +6 -6
- package/src/api.js +3 -0
- package/src/index.js +2 -2
- package/src/reporting.js +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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.95](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.94...@exodus/headless@2.0.0-alpha.95) (2023-08-01)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- ship nfts with nfts proxy (#3062)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **headless:** clear fusion ([#3033](https://github.com/ExodusMovement/exodus-hydra/issues/3033)) ([bf5cfd6](https://github.com/ExodusMovement/exodus-hydra/commit/bf5cfd672a639ef933fbcc52d4c394cbd28d8b5f))
|
|
15
|
+
- ship nfts with nfts proxy ([#3062](https://github.com/ExodusMovement/exodus-hydra/issues/3062)) ([f32734d](https://github.com/ExodusMovement/exodus-hydra/commit/f32734decfaafff624cd0ee784473855b343bd9e))
|
|
16
|
+
|
|
17
|
+
## [2.0.0-alpha.94](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.93...@exodus/headless@2.0.0-alpha.94) (2023-07-27)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- integrate safe report into headless ([#2952](https://github.com/ExodusMovement/exodus-hydra/issues/2952)) ([49c8cf9](https://github.com/ExodusMovement/exodus-hydra/commit/49c8cf93022204c3e2dfadf95b5af2ca7151976e))
|
|
22
|
+
|
|
6
23
|
## [2.0.0-alpha.93](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.89...@exodus/headless@2.0.0-alpha.93) (2023-07-26)
|
|
7
24
|
|
|
8
25
|
### ⚠ BREAKING CHANGES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/headless",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.95",
|
|
4
4
|
"description": "The platform-agnostic Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@exodus/address-provider": "^6.0.0",
|
|
30
|
-
"@exodus/atoms": "^5.
|
|
30
|
+
"@exodus/atoms": "^5.4.0",
|
|
31
31
|
"@exodus/auto-enable-assets-plugin": "^4.0.1",
|
|
32
32
|
"@exodus/available-assets": "^3.0.0",
|
|
33
33
|
"@exodus/balances": "^7.0.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@exodus/dependency-preprocessors": "^2.8.4",
|
|
38
38
|
"@exodus/enabled-assets": "^7.0.0",
|
|
39
39
|
"@exodus/feature-flags": "^4.0.0",
|
|
40
|
-
"@exodus/fee-monitors": "^2.
|
|
40
|
+
"@exodus/fee-monitors": "^2.1.0",
|
|
41
41
|
"@exodus/fetch": "^1.2.1",
|
|
42
42
|
"@exodus/fusion": "^6.0.0",
|
|
43
43
|
"@exodus/geolocation": "^2.1.1",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@exodus/kyc": "^4.0.0",
|
|
74
74
|
"@exodus/market-history": "^5.0.1",
|
|
75
75
|
"@exodus/models": "^8.11.1",
|
|
76
|
-
"@exodus/nfts": "^
|
|
76
|
+
"@exodus/nfts": "^5.0.0",
|
|
77
77
|
"@exodus/personal-notes": "^3.3.0",
|
|
78
|
-
"@exodus/referrals": "^
|
|
78
|
+
"@exodus/referrals": "^7.0.0",
|
|
79
79
|
"@exodus/solana-lib": "^1.3.11",
|
|
80
80
|
"@exodus/solana-meta": "^1.0.2",
|
|
81
81
|
"@exodus/storage-encrypted": "^1.1.2",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"nock": "^13.3.1",
|
|
93
93
|
"p-defer": "^4.0.0"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "d61968fe3e496fb4d2a9c233acf793fde05227b0"
|
|
96
96
|
}
|
package/src/api.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { validateMnemonic as isMnemonicValid } from 'bip39'
|
|
2
2
|
|
|
3
|
+
import createReporting from './reporting'
|
|
4
|
+
|
|
3
5
|
const createApi = ({ ioc, port }) => {
|
|
4
6
|
const apis = ioc.getByType('api')
|
|
5
7
|
const { remoteConfig } = ioc.getByType('module')
|
|
@@ -14,6 +16,7 @@ const createApi = ({ ioc, port }) => {
|
|
|
14
16
|
|
|
15
17
|
return {
|
|
16
18
|
...Object.assign({}, ...Object.values(apis)),
|
|
19
|
+
...createReporting({ ioc }),
|
|
17
20
|
isMnemonicValid,
|
|
18
21
|
subscribe: port.subscribe.bind(port),
|
|
19
22
|
unsubscribe: port.unsubscribe.bind(port),
|
package/src/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const createExodus = ({ adapters, config, port }) => {
|
|
|
47
47
|
const resolve = () => {
|
|
48
48
|
ioc.resolve()
|
|
49
49
|
|
|
50
|
-
const { assetsModule, storage } = ioc.getByType('adapter')
|
|
50
|
+
const { assetsModule, storage, fusion } = ioc.getByType('adapter')
|
|
51
51
|
|
|
52
52
|
const { application, wallet, unlockEncryptedStorage } = ioc.getByType('module')
|
|
53
53
|
|
|
@@ -90,7 +90,7 @@ const createExodus = ({ adapters, config, port }) => {
|
|
|
90
90
|
})
|
|
91
91
|
|
|
92
92
|
application.hook('clear', async () => {
|
|
93
|
-
await assetsModule.clear()
|
|
93
|
+
await Promise.all([assetsModule.clear(), fusion.clearStorage()])
|
|
94
94
|
})
|
|
95
95
|
|
|
96
96
|
application.on('clear', () => port.emit('clear'))
|
package/src/reporting.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { zipObject } from 'lodash'
|
|
2
|
+
|
|
3
|
+
const createReporting = ({ ioc }) => {
|
|
4
|
+
const getReports = async () => {
|
|
5
|
+
const nodes = ioc.getByType('report')
|
|
6
|
+
const reports = Object.values(nodes)
|
|
7
|
+
|
|
8
|
+
const resolvedReports = await Promise.allSettled(reports.map((report) => report.export()))
|
|
9
|
+
|
|
10
|
+
const namespaces = reports.map((report) => report.namespace)
|
|
11
|
+
const data = resolvedReports.map((outcome) =>
|
|
12
|
+
outcome.status === 'fulfilled' ? outcome.value : { error: outcome.reason }
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
return zipObject(namespaces, data)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
reporting: {
|
|
20
|
+
export: getReports,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default createReporting
|