@exodus/headless 2.0.0-alpha.47 → 2.0.0-alpha.49
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 +12 -3
- package/package.json +20 -19
- package/src/modules/ab-testing/index.js +1 -1
- package/src/modules/locale/index.js +6 -4
- package/src/modules/nfts/index.js +1 -1
- package/src/modules/personal-notes/index.js +4 -1
- package/src/modules/wallet/index.js +1 -1
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.49](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.48...@exodus/headless@2.0.0-alpha.49) (2023-06-21)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- rename fusionAtomFactory => createFusionAtom (#2042)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- rename fusionAtomFactory => createFusionAtom ([#2042](https://github.com/ExodusMovement/exodus-hydra/issues/2042)) ([9db4d3f](https://github.com/ExodusMovement/exodus-hydra/commit/9db4d3f1367a16aeaa36e60a49352d36d3189cca))
|
|
15
|
+
|
|
16
|
+
## [2.0.0-alpha.48](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.47...@exodus/headless@2.0.0-alpha.48) (2023-06-20)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- declare atoms in writesAtoms ([#2006](https://github.com/ExodusMovement/exodus-hydra/issues/2006)) ([02b7227](https://github.com/ExodusMovement/exodus-hydra/commit/02b72271116b4e3b034b7f889b0dc333fda17413))
|
|
21
|
+
|
|
6
22
|
## [2.0.0-alpha.47](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.46...@exodus/headless@2.0.0-alpha.47) (2023-06-18)
|
|
7
23
|
|
|
8
24
|
### Features
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ The headless Exodus wallet SDK
|
|
|
15
15
|
|
|
16
16
|
```js
|
|
17
17
|
import createExodus from '@exodus/headless'
|
|
18
|
+
import referrals from '@exodus/headless/src/modules/referrals'
|
|
18
19
|
import Emitter from '@exodus/wild-emitter'
|
|
19
20
|
|
|
20
21
|
// 1. Create port. Acts as an event bus between headless wallet and client
|
|
@@ -25,10 +26,10 @@ const adapters = {}
|
|
|
25
26
|
const config = {}
|
|
26
27
|
|
|
27
28
|
// 3. Create Exodus container
|
|
28
|
-
const
|
|
29
|
+
const exodusContainer = createExodus({ port, adapters, config })
|
|
29
30
|
|
|
30
31
|
// 4. Register external modules. Does not support overriding modules at the moment.
|
|
31
|
-
|
|
32
|
+
exodusContainer.register({
|
|
32
33
|
definition: {
|
|
33
34
|
id: 'remoteConfig',
|
|
34
35
|
factory: createRemoteConfig,
|
|
@@ -36,14 +37,22 @@ container.register({
|
|
|
36
37
|
},
|
|
37
38
|
})
|
|
38
39
|
|
|
40
|
+
// see an example feature definition:
|
|
41
|
+
// https://github.com/ExodusMovement/exodus-hydra/blob/2e8d63426421ffcbec84a9b6fbc83eb913b47eba/modules/headless/src/modules/geolocation/index.js
|
|
42
|
+
exodusContainer.use(referrals())
|
|
43
|
+
exodusContainer.use(myCustomFeature({ id: 'myCustomFeature', ... }))
|
|
44
|
+
|
|
39
45
|
// 5. Resolve exodus instance
|
|
40
|
-
const exodus =
|
|
46
|
+
const exodus = exodusContainer.resolve()
|
|
41
47
|
|
|
42
48
|
// 6. Start exodus instance
|
|
43
49
|
await exodus.wallet.start()
|
|
44
50
|
|
|
45
51
|
// 7. Use it!
|
|
46
52
|
await exodus.wallet.create({ passphrase: 'my-super-secure-passphrase' })
|
|
53
|
+
|
|
54
|
+
// 8. Use your custom feature API, if any
|
|
55
|
+
exodus.myCustomFeature.doThatThingYouDo()
|
|
47
56
|
```
|
|
48
57
|
|
|
49
58
|
## Lifecycle
|
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.49",
|
|
4
4
|
"description": "The headless Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -26,35 +26,36 @@
|
|
|
26
26
|
"test": "jest --runInBand"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@exodus/ab-testing": "^5.1.
|
|
30
|
-
"@exodus/address-provider": "^4.
|
|
31
|
-
"@exodus/apy-rates": "^2.1.
|
|
32
|
-
"@exodus/atoms": "^
|
|
29
|
+
"@exodus/ab-testing": "^5.1.1",
|
|
30
|
+
"@exodus/address-provider": "^4.1.1",
|
|
31
|
+
"@exodus/apy-rates": "^2.1.1",
|
|
32
|
+
"@exodus/atoms": "^5.0.0",
|
|
33
33
|
"@exodus/auto-enable-assets-plugin": "^4.0.1",
|
|
34
|
-
"@exodus/available-assets": "^2.0.
|
|
35
|
-
"@exodus/balances": "^6.0.
|
|
34
|
+
"@exodus/available-assets": "^2.0.2",
|
|
35
|
+
"@exodus/balances": "^6.0.1",
|
|
36
36
|
"@exodus/basic-utils": "^2.0.0",
|
|
37
37
|
"@exodus/blockchain-metadata": "^8.0.1",
|
|
38
38
|
"@exodus/config": "^7.0.0",
|
|
39
39
|
"@exodus/connected-origins": "^1.1.2",
|
|
40
40
|
"@exodus/crypto-news-monitor": "^2.0.0",
|
|
41
41
|
"@exodus/dependency-injection": "^2.0.0",
|
|
42
|
-
"@exodus/dependency-preprocessors": "^2.8.
|
|
43
|
-
"@exodus/enabled-assets": "^6.0.
|
|
42
|
+
"@exodus/dependency-preprocessors": "^2.8.1",
|
|
43
|
+
"@exodus/enabled-assets": "^6.0.2",
|
|
44
44
|
"@exodus/exodus-pricing-client": "^1.2.0",
|
|
45
|
-
"@exodus/feature-flags": "^2.1.
|
|
45
|
+
"@exodus/feature-flags": "^2.1.1",
|
|
46
46
|
"@exodus/fee-monitors": "^1.0.0",
|
|
47
47
|
"@exodus/fetch": "^1.2.1",
|
|
48
|
-
"@exodus/
|
|
48
|
+
"@exodus/fusion": "^6.0.0",
|
|
49
|
+
"@exodus/geolocation": "^2.0.1",
|
|
49
50
|
"@exodus/key-identifier-provider": "^1.1.3",
|
|
50
|
-
"@exodus/keychain": "^4.0.
|
|
51
|
-
"@exodus/kyc": "^3.
|
|
52
|
-
"@exodus/market-history": "^3.1.
|
|
51
|
+
"@exodus/keychain": "^4.0.2",
|
|
52
|
+
"@exodus/kyc": "^3.5.1",
|
|
53
|
+
"@exodus/market-history": "^3.1.2",
|
|
53
54
|
"@exodus/module": "^1.0.0",
|
|
54
|
-
"@exodus/nfts": "^2.
|
|
55
|
-
"@exodus/personal-notes": "^3.2.
|
|
56
|
-
"@exodus/rates-monitor": "^2.0.
|
|
57
|
-
"@exodus/referrals": "^6.0.
|
|
55
|
+
"@exodus/nfts": "^2.1.0",
|
|
56
|
+
"@exodus/personal-notes": "^3.2.1",
|
|
57
|
+
"@exodus/rates-monitor": "^2.0.1",
|
|
58
|
+
"@exodus/referrals": "^6.0.1",
|
|
58
59
|
"@exodus/top-movers-monitor": "^2.0.1",
|
|
59
60
|
"@exodus/wallet": "^6.0.1",
|
|
60
61
|
"@exodus/wallet-accounts": "^8.0.1",
|
|
@@ -88,5 +89,5 @@
|
|
|
88
89
|
"nock": "^13.3.1",
|
|
89
90
|
"p-defer": "^4.0.0"
|
|
90
91
|
},
|
|
91
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "f0a3d249bf994a6d5c106a106b5e4b2b6c61a6e8"
|
|
92
93
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createStorageAtomFactory } from '@exodus/atoms'
|
|
2
|
+
import { createFusionAtom } from '@exodus/fusion/atoms'
|
|
2
3
|
|
|
3
4
|
import localeApiDefinition from './api'
|
|
4
5
|
import localePluginDefinition from './plugin'
|
|
@@ -12,7 +13,8 @@ const locale = () => {
|
|
|
12
13
|
id: 'currencyAtom',
|
|
13
14
|
type: 'atom',
|
|
14
15
|
factory: ({ fusion, config }) =>
|
|
15
|
-
|
|
16
|
+
createFusionAtom({
|
|
17
|
+
fusion,
|
|
16
18
|
path: `private.currency`,
|
|
17
19
|
defaultValue: config.defaultValue,
|
|
18
20
|
}),
|
|
@@ -39,8 +41,8 @@ const locale = () => {
|
|
|
39
41
|
],
|
|
40
42
|
storage: { namespace: 'locale' },
|
|
41
43
|
},
|
|
42
|
-
{ definition: localePluginDefinition },
|
|
43
|
-
{ definition: localeApiDefinition },
|
|
44
|
+
{ definition: localePluginDefinition, writesAtoms: ['languageAtom'] },
|
|
45
|
+
{ definition: localeApiDefinition, writesAtoms: ['languageAtom', 'currencyAtom'] },
|
|
44
46
|
],
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -23,7 +23,7 @@ const nfts = () => {
|
|
|
23
23
|
definition: { type: 'monitor', ...nftsMonitorDefinition },
|
|
24
24
|
writesAtoms: ['nftsCacheAtom'],
|
|
25
25
|
},
|
|
26
|
-
{ definition: nftsModuleDefinition },
|
|
26
|
+
{ definition: nftsModuleDefinition, writesAtoms: ['nftsCacheAtom', 'nftsConfigAtom'] },
|
|
27
27
|
{ definition: nftsPluginDefinition },
|
|
28
28
|
{ definition: nftsApiDefinition },
|
|
29
29
|
],
|
|
@@ -18,7 +18,10 @@ const personalNotes = () => {
|
|
|
18
18
|
},
|
|
19
19
|
],
|
|
20
20
|
},
|
|
21
|
-
{
|
|
21
|
+
{
|
|
22
|
+
definition: { type: 'module', ...personalNotesDefinition },
|
|
23
|
+
writesAtoms: ['personalNotesAtom'],
|
|
24
|
+
},
|
|
22
25
|
{ definition: personalNotesPluginDefinition },
|
|
23
26
|
{ definition: personalNotesApiDefinition },
|
|
24
27
|
],
|
|
@@ -15,7 +15,7 @@ const wallet = () => {
|
|
|
15
15
|
},
|
|
16
16
|
{ definition: lockedAtomDefinition },
|
|
17
17
|
{ definition: restoreAtomDefinition },
|
|
18
|
-
{ definition: restorePluginDefinition },
|
|
18
|
+
{ definition: restorePluginDefinition, writesAtoms: ['restoreAtom'] },
|
|
19
19
|
{ definition: walletApi },
|
|
20
20
|
],
|
|
21
21
|
}
|