@dynamic-labs/wallet-book 4.0.0-alpha.4 → 4.0.0-alpha.41
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 +361 -0
- package/README.md +1 -1
- package/package.cjs +8 -0
- package/package.js +4 -0
- package/package.json +7 -13
- package/src/build/sources/walletConnectOverrides/index.d.ts +26 -0
- package/src/components/WalletIcon.cjs +15 -7
- package/src/components/WalletIcon.d.ts +278 -3
- package/src/components/WalletIcon.js +17 -9
- package/src/helpers/getWalletBookWallet.d.ts +1 -1
- package/src/helpers/getWalletIconData.cjs +39 -0
- package/src/helpers/getWalletIconData.d.ts +5 -0
- package/src/helpers/getWalletIconData.js +35 -0
- package/src/helpers/index.d.ts +1 -4
- package/src/hooks/fetchWalletBook/fetchWalletBook.cjs +49 -0
- package/src/hooks/fetchWalletBook/fetchWalletBook.d.ts +97 -0
- package/src/hooks/fetchWalletBook/fetchWalletBook.js +39 -0
- package/src/hooks/fetchWalletBook/index.d.ts +1 -0
- package/src/hooks/useWalletBookCdn.cjs +22 -38
- package/src/hooks/useWalletBookCdn.js +22 -38
- package/src/index.cjs +5 -10
- package/src/index.d.ts +1 -2
- package/src/index.js +5 -5
- package/wallet-book-fallbacks.cjs +125 -5
- package/wallet-book-fallbacks.js +125 -5
- package/src/helpers/getWalletLinks.cjs +0 -34
- package/src/helpers/getWalletLinks.d.ts +0 -10
- package/src/helpers/getWalletLinks.js +0 -30
- package/src/helpers/getWalletPrimaryColor.cjs +0 -14
- package/src/helpers/getWalletPrimaryColor.d.ts +0 -2
- package/src/helpers/getWalletPrimaryColor.js +0 -10
- package/src/helpers/isWalletEventSupported.cjs +0 -8
- package/src/helpers/isWalletEventSupported.d.ts +0 -2
- package/src/helpers/isWalletEventSupported.js +0 -4
- package/src/helpers/isWalletMethodSupported.cjs +0 -8
- package/src/helpers/isWalletMethodSupported.d.ts +0 -2
- package/src/helpers/isWalletMethodSupported.js +0 -4
- package/src/schemas/walletConnectSourceSchema.cjs +0 -78
- package/src/schemas/walletConnectSourceSchema.js +0 -74
|
@@ -3,49 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var _tslib = require('../../_virtual/_tslib.cjs');
|
|
7
6
|
var react = require('react');
|
|
8
|
-
var
|
|
9
|
-
require('../schemas/walletConnectSourceSchema.cjs');
|
|
10
|
-
var walletBookSchema = require('../schemas/walletBookSchema.cjs');
|
|
11
|
-
require('../schemas/walletSchema.cjs');
|
|
12
|
-
require('../helpers/renderTemplate.cjs');
|
|
13
|
-
var logger = require('../helpers/logger.cjs');
|
|
14
|
-
var getWalletBookCdnUrl = require('../helpers/getWalletBookCdnUrl.cjs');
|
|
15
|
-
var walletBookFallbacks = require('../../wallet-book-fallbacks.cjs');
|
|
7
|
+
var fetchWalletBook = require('./fetchWalletBook/fetchWalletBook.cjs');
|
|
16
8
|
|
|
9
|
+
// Initiate wallet book fetch immediately
|
|
10
|
+
fetchWalletBook.fetchWalletBook();
|
|
17
11
|
const useWalletBookCdn = () => {
|
|
18
|
-
const [
|
|
12
|
+
const [walletBookState, setWalletBookState] = react.useState(fetchWalletBook.walletBookCache.current);
|
|
19
13
|
react.useEffect(() => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const data = yield utils.retryableFn(fn, {
|
|
38
|
-
fallbackValue: walletBookSchema.walletBookSchema.parse(walletBookFallbacks["default"]),
|
|
39
|
-
logger: logger.logger.createLogger('useWalletBookCdn'),
|
|
40
|
-
maxRetries: 3,
|
|
41
|
-
retryStrategy: 'timeout-and-rejection',
|
|
42
|
-
timeoutMs: 30000,
|
|
43
|
-
});
|
|
44
|
-
setWalletBook(data);
|
|
45
|
-
});
|
|
46
|
-
fetchWalletBook();
|
|
14
|
+
fetchWalletBook.walletBookEmitter.on('walletBookLoaded', setWalletBookState);
|
|
15
|
+
/**
|
|
16
|
+
* Justification for this setWalletBookState call — imagine the following scenario:
|
|
17
|
+
*
|
|
18
|
+
* 1. fetchWalletBook() is called — the wallet book is not yet loaded
|
|
19
|
+
* 2. useState(walletBookCache.current) is called, and therefore initializes walletBookState to {}
|
|
20
|
+
* 3. Before this effect runs — wallet book is loaded, and the walletBookLoaded event is emitted
|
|
21
|
+
* 4. This effect finally runs and only then subscribes to the walletBookLoaded event
|
|
22
|
+
*
|
|
23
|
+
* In this case, walletBookState would be initialized to {}, and would never be updated to the actual wallet book
|
|
24
|
+
* Therefore, we need to call setWalletBookState(walletBookCache.current)
|
|
25
|
+
* to ensure that walletBookState is initialized to the correct value in this edge case
|
|
26
|
+
*/
|
|
27
|
+
setWalletBookState(fetchWalletBook.walletBookCache.current);
|
|
28
|
+
return () => {
|
|
29
|
+
fetchWalletBook.walletBookEmitter.off('walletBookLoaded', setWalletBookState);
|
|
30
|
+
};
|
|
47
31
|
}, []);
|
|
48
|
-
return
|
|
32
|
+
return walletBookState;
|
|
49
33
|
};
|
|
50
34
|
|
|
51
35
|
exports.useWalletBookCdn = useWalletBookCdn;
|
|
@@ -1,47 +1,31 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
3
2
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import '../schemas/walletConnectSourceSchema.js';
|
|
6
|
-
import { walletBookSchema } from '../schemas/walletBookSchema.js';
|
|
7
|
-
import '../schemas/walletSchema.js';
|
|
8
|
-
import '../helpers/renderTemplate.js';
|
|
9
|
-
import { logger } from '../helpers/logger.js';
|
|
10
|
-
import { getWalletBookCdnUrl } from '../helpers/getWalletBookCdnUrl.js';
|
|
11
|
-
import walletBookFallbacks from '../../wallet-book-fallbacks.js';
|
|
3
|
+
import { fetchWalletBook, walletBookCache, walletBookEmitter } from './fetchWalletBook/fetchWalletBook.js';
|
|
12
4
|
|
|
5
|
+
// Initiate wallet book fetch immediately
|
|
6
|
+
fetchWalletBook();
|
|
13
7
|
const useWalletBookCdn = () => {
|
|
14
|
-
const [
|
|
8
|
+
const [walletBookState, setWalletBookState] = useState(walletBookCache.current);
|
|
15
9
|
useEffect(() => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const data = yield retryableFn(fn, {
|
|
34
|
-
fallbackValue: walletBookSchema.parse(walletBookFallbacks),
|
|
35
|
-
logger: logger.createLogger('useWalletBookCdn'),
|
|
36
|
-
maxRetries: 3,
|
|
37
|
-
retryStrategy: 'timeout-and-rejection',
|
|
38
|
-
timeoutMs: 30000,
|
|
39
|
-
});
|
|
40
|
-
setWalletBook(data);
|
|
41
|
-
});
|
|
42
|
-
fetchWalletBook();
|
|
10
|
+
walletBookEmitter.on('walletBookLoaded', setWalletBookState);
|
|
11
|
+
/**
|
|
12
|
+
* Justification for this setWalletBookState call — imagine the following scenario:
|
|
13
|
+
*
|
|
14
|
+
* 1. fetchWalletBook() is called — the wallet book is not yet loaded
|
|
15
|
+
* 2. useState(walletBookCache.current) is called, and therefore initializes walletBookState to {}
|
|
16
|
+
* 3. Before this effect runs — wallet book is loaded, and the walletBookLoaded event is emitted
|
|
17
|
+
* 4. This effect finally runs and only then subscribes to the walletBookLoaded event
|
|
18
|
+
*
|
|
19
|
+
* In this case, walletBookState would be initialized to {}, and would never be updated to the actual wallet book
|
|
20
|
+
* Therefore, we need to call setWalletBookState(walletBookCache.current)
|
|
21
|
+
* to ensure that walletBookState is initialized to the correct value in this edge case
|
|
22
|
+
*/
|
|
23
|
+
setWalletBookState(walletBookCache.current);
|
|
24
|
+
return () => {
|
|
25
|
+
walletBookEmitter.off('walletBookLoaded', setWalletBookState);
|
|
26
|
+
};
|
|
43
27
|
}, []);
|
|
44
|
-
return
|
|
28
|
+
return walletBookState;
|
|
45
29
|
};
|
|
46
30
|
|
|
47
31
|
export { useWalletBookCdn };
|
package/src/index.cjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var assertPackageVersion = require('@dynamic-labs/assert-package-version');
|
|
7
|
+
var _package = require('../package.cjs');
|
|
6
8
|
var WalletBookContext = require('./context/WalletBookContext.cjs');
|
|
7
9
|
var getWalletIconUrl = require('./helpers/getWalletIconUrl.cjs');
|
|
8
10
|
var getWalletBookWallet = require('./helpers/getWalletBookWallet.cjs');
|
|
9
|
-
var
|
|
10
|
-
var getWalletPrimaryColor = require('./helpers/getWalletPrimaryColor.cjs');
|
|
11
|
-
require('./helpers/renderTemplate.cjs');
|
|
11
|
+
var renderTemplate = require('./helpers/renderTemplate.cjs');
|
|
12
12
|
var findWalletBookWallet = require('./helpers/findWalletBookWallet.cjs');
|
|
13
13
|
require('./helpers/logger.cjs');
|
|
14
14
|
var getWalletGroup = require('./helpers/getWalletGroup.cjs');
|
|
@@ -16,28 +16,23 @@ var findWalletGroup = require('./helpers/findWalletGroup.cjs');
|
|
|
16
16
|
var getWalletBookCdnUrl = require('./helpers/getWalletBookCdnUrl.cjs');
|
|
17
17
|
var getBrandIconUrl = require('./helpers/getBrandIconUrl.cjs');
|
|
18
18
|
var findWalletGroupOverride = require('./helpers/findWalletGroupOverride.cjs');
|
|
19
|
-
var isWalletMethodSupported = require('./helpers/isWalletMethodSupported.cjs');
|
|
20
|
-
var isWalletEventSupported = require('./helpers/isWalletEventSupported.cjs');
|
|
21
19
|
var useWalletBookCdn = require('./hooks/useWalletBookCdn.cjs');
|
|
22
20
|
var WalletIcon = require('./components/WalletIcon.cjs');
|
|
23
21
|
var WalletBookContextProvider = require('./components/WalletBookContextProvider.cjs');
|
|
24
22
|
var BrandIcon = require('./components/BrandIcon.cjs');
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
assertPackageVersion.assertPackageVersion('@dynamic-labs/wallet-book', _package.version);
|
|
27
25
|
|
|
28
26
|
exports.useWalletBookContext = WalletBookContext.useWalletBookContext;
|
|
29
27
|
exports.getWalletIconUrl = getWalletIconUrl.getWalletIconUrl;
|
|
30
28
|
exports.getWalletBookWallet = getWalletBookWallet.getWalletBookWallet;
|
|
31
|
-
exports.
|
|
32
|
-
exports.getWalletPrimaryColor = getWalletPrimaryColor.getWalletPrimaryColor;
|
|
29
|
+
exports.renderTemplate = renderTemplate.renderTemplate;
|
|
33
30
|
exports.findWalletBookWallet = findWalletBookWallet.findWalletBookWallet;
|
|
34
31
|
exports.getWalletGroup = getWalletGroup.getWalletGroup;
|
|
35
32
|
exports.findWalletGroup = findWalletGroup.findWalletGroup;
|
|
36
33
|
exports.getWalletBookCdnUrl = getWalletBookCdnUrl.getWalletBookCdnUrl;
|
|
37
34
|
exports.getBrandIconUrl = getBrandIconUrl.getBrandIconUrl;
|
|
38
35
|
exports.findWalletGroupOverride = findWalletGroupOverride.findWalletGroupOverride;
|
|
39
|
-
exports.isWalletMethodSupported = isWalletMethodSupported.isWalletMethodSupported;
|
|
40
|
-
exports.isWalletEventSupported = isWalletEventSupported.isWalletEventSupported;
|
|
41
36
|
exports.useWalletBookCdn = useWalletBookCdn.useWalletBookCdn;
|
|
42
37
|
exports.WalletIcon = WalletIcon.WalletIcon;
|
|
43
38
|
exports.WalletBookContextProvider = WalletBookContextProvider.WalletBookContextProvider;
|
package/src/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export type { WalletBookSchema, WalletRecordsSchema, } from './schemas/walletBookSchema';
|
|
5
5
|
export type { WalletSchema } from './schemas/walletSchema';
|
|
6
|
-
export type { WalletLinks } from './helpers';
|
|
7
6
|
/**
|
|
8
7
|
* CONTEXT
|
|
9
8
|
*/
|
|
@@ -11,7 +10,7 @@ export { useWalletBookContext } from './context/WalletBookContext';
|
|
|
11
10
|
/**
|
|
12
11
|
* HELPERS
|
|
13
12
|
*/
|
|
14
|
-
export { getWalletBookWallet, getWalletIconUrl,
|
|
13
|
+
export { getWalletBookWallet, getWalletIconUrl, getWalletGroup, getWalletBookCdnUrl, findWalletBookWallet, findWalletGroup, getBrandIconUrl, findWalletGroupOverride, renderTemplate, } from './helpers';
|
|
15
14
|
/**
|
|
16
15
|
* HOOKS
|
|
17
16
|
*/
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import { assertPackageVersion } from '@dynamic-labs/assert-package-version';
|
|
3
|
+
import { version } from '../package.js';
|
|
2
4
|
export { useWalletBookContext } from './context/WalletBookContext.js';
|
|
3
5
|
export { getWalletIconUrl } from './helpers/getWalletIconUrl.js';
|
|
4
6
|
export { getWalletBookWallet } from './helpers/getWalletBookWallet.js';
|
|
5
|
-
export {
|
|
6
|
-
export { getWalletPrimaryColor } from './helpers/getWalletPrimaryColor.js';
|
|
7
|
-
import './helpers/renderTemplate.js';
|
|
7
|
+
export { renderTemplate } from './helpers/renderTemplate.js';
|
|
8
8
|
export { findWalletBookWallet } from './helpers/findWalletBookWallet.js';
|
|
9
9
|
import './helpers/logger.js';
|
|
10
10
|
export { getWalletGroup } from './helpers/getWalletGroup.js';
|
|
@@ -12,9 +12,9 @@ export { findWalletGroup } from './helpers/findWalletGroup.js';
|
|
|
12
12
|
export { getWalletBookCdnUrl } from './helpers/getWalletBookCdnUrl.js';
|
|
13
13
|
export { getBrandIconUrl } from './helpers/getBrandIconUrl.js';
|
|
14
14
|
export { findWalletGroupOverride } from './helpers/findWalletGroupOverride.js';
|
|
15
|
-
export { isWalletMethodSupported } from './helpers/isWalletMethodSupported.js';
|
|
16
|
-
export { isWalletEventSupported } from './helpers/isWalletEventSupported.js';
|
|
17
15
|
export { useWalletBookCdn } from './hooks/useWalletBookCdn.js';
|
|
18
16
|
export { WalletIcon } from './components/WalletIcon.js';
|
|
19
17
|
export { WalletBookContextProvider } from './components/WalletBookContextProvider.js';
|
|
20
18
|
export { BrandIcon } from './components/BrandIcon.js';
|
|
19
|
+
|
|
20
|
+
assertPackageVersion('@dynamic-labs/wallet-book', version);
|
|
@@ -65,6 +65,15 @@ var groups = {
|
|
|
65
65
|
key: "coinbase",
|
|
66
66
|
name: "Coinbase"
|
|
67
67
|
},
|
|
68
|
+
compasswallet: {
|
|
69
|
+
brand: {
|
|
70
|
+
alt: "Compass",
|
|
71
|
+
primaryColor: "#4B49C6",
|
|
72
|
+
spriteId: "1d7dea00-96be-4ce8-ca15-d14bddbb5000"
|
|
73
|
+
},
|
|
74
|
+
key: "compasswallet",
|
|
75
|
+
name: "Compass"
|
|
76
|
+
},
|
|
68
77
|
exodus: {
|
|
69
78
|
brand: {
|
|
70
79
|
alt: "Exodus Wallet",
|
|
@@ -73,6 +82,23 @@ var groups = {
|
|
|
73
82
|
key: "exodus",
|
|
74
83
|
name: "Exodus"
|
|
75
84
|
},
|
|
85
|
+
fireblocks: {
|
|
86
|
+
brand: {
|
|
87
|
+
alt: "Fireblocks",
|
|
88
|
+
spriteId: "fireblocks"
|
|
89
|
+
},
|
|
90
|
+
key: "fireblocks",
|
|
91
|
+
name: "Fireblocks"
|
|
92
|
+
},
|
|
93
|
+
flowwallet: {
|
|
94
|
+
brand: {
|
|
95
|
+
alt: "Flow Wallet",
|
|
96
|
+
primaryColor: "#2BE829",
|
|
97
|
+
spriteId: "flowwallet"
|
|
98
|
+
},
|
|
99
|
+
key: "flowwallet",
|
|
100
|
+
name: "Flow Wallet"
|
|
101
|
+
},
|
|
76
102
|
keplr: {
|
|
77
103
|
brand: {
|
|
78
104
|
alt: "Keplr",
|
|
@@ -106,6 +132,14 @@ var groups = {
|
|
|
106
132
|
key: "metamask",
|
|
107
133
|
name: "MetaMask"
|
|
108
134
|
},
|
|
135
|
+
nightly: {
|
|
136
|
+
brand: {
|
|
137
|
+
alt: "Nightly Wallet",
|
|
138
|
+
spriteId: "nightly"
|
|
139
|
+
},
|
|
140
|
+
key: "nightly",
|
|
141
|
+
name: "Nightly"
|
|
142
|
+
},
|
|
109
143
|
okxwallet: {
|
|
110
144
|
brand: {
|
|
111
145
|
alt: "OKX Wallet",
|
|
@@ -628,8 +662,19 @@ var wallets = {
|
|
|
628
662
|
edgeId: "hkkpjehhcnhgefhbdcgfkeegglpjchdc",
|
|
629
663
|
firefoxId: "braavos-wallet"
|
|
630
664
|
},
|
|
665
|
+
injectedConfig: [
|
|
666
|
+
{
|
|
667
|
+
chain: "starknet",
|
|
668
|
+
extensionLocators: [
|
|
669
|
+
],
|
|
670
|
+
windowLocations: [
|
|
671
|
+
"braavos"
|
|
672
|
+
]
|
|
673
|
+
}
|
|
674
|
+
],
|
|
631
675
|
mobile: {
|
|
632
676
|
androidId: "app.braavos.wallet",
|
|
677
|
+
inAppBrowser: "https://link.braavos.app/dapp/{{encodedDappURI}}",
|
|
633
678
|
iosId: "id1636013523"
|
|
634
679
|
},
|
|
635
680
|
name: "Braavos"
|
|
@@ -811,6 +856,19 @@ var wallets = {
|
|
|
811
856
|
filterFromWalletConnect: true,
|
|
812
857
|
name: "Lilico"
|
|
813
858
|
},
|
|
859
|
+
flowwalletflow: {
|
|
860
|
+
brand: {
|
|
861
|
+
alt: "Flow Wallet",
|
|
862
|
+
spriteId: "flowwallet"
|
|
863
|
+
},
|
|
864
|
+
chainGroup: "flowwallet",
|
|
865
|
+
desktop: {
|
|
866
|
+
chromeId: "hpclkefagolihohboafpheddmmgdffjm"
|
|
867
|
+
},
|
|
868
|
+
filterFromWalletConnect: true,
|
|
869
|
+
group: "flowwallet",
|
|
870
|
+
name: "Flow Wallet"
|
|
871
|
+
},
|
|
814
872
|
magicemailotp: {
|
|
815
873
|
brand: {
|
|
816
874
|
alt: "Magic Email OTP",
|
|
@@ -1011,6 +1069,9 @@ var wallets = {
|
|
|
1011
1069
|
desktop: {
|
|
1012
1070
|
chromeId: "aholpfdialjgjfhomihkjbmgjidlcdno"
|
|
1013
1071
|
},
|
|
1072
|
+
eip6963Config: {
|
|
1073
|
+
rdns: "com.exodus.web3-wallet"
|
|
1074
|
+
},
|
|
1014
1075
|
filterFromWalletConnect: true,
|
|
1015
1076
|
group: "exodus",
|
|
1016
1077
|
injectedConfig: [
|
|
@@ -1227,7 +1288,7 @@ var wallets = {
|
|
|
1227
1288
|
},
|
|
1228
1289
|
unknown: {
|
|
1229
1290
|
brand: {
|
|
1230
|
-
spriteId: "
|
|
1291
|
+
spriteId: "unknown-wallet"
|
|
1231
1292
|
},
|
|
1232
1293
|
mobile: {
|
|
1233
1294
|
androidId: "enable-android",
|
|
@@ -1278,9 +1339,6 @@ var wallets = {
|
|
|
1278
1339
|
name: "Xverse",
|
|
1279
1340
|
walletLimitations: {
|
|
1280
1341
|
browserExtension: {
|
|
1281
|
-
unsupportedEvents: [
|
|
1282
|
-
"accountChanged"
|
|
1283
|
-
],
|
|
1284
1342
|
unsupportedMethods: [
|
|
1285
1343
|
"getConnectedAccounts"
|
|
1286
1344
|
]
|
|
@@ -1289,7 +1347,7 @@ var wallets = {
|
|
|
1289
1347
|
},
|
|
1290
1348
|
fallbackconnector: {
|
|
1291
1349
|
brand: {
|
|
1292
|
-
spriteId: "
|
|
1350
|
+
spriteId: "unknown-wallet"
|
|
1293
1351
|
},
|
|
1294
1352
|
mobile: {
|
|
1295
1353
|
androidId: "enable-android",
|
|
@@ -1303,6 +1361,68 @@ var wallets = {
|
|
|
1303
1361
|
]
|
|
1304
1362
|
}
|
|
1305
1363
|
}
|
|
1364
|
+
},
|
|
1365
|
+
oylwallet: {
|
|
1366
|
+
brand: {
|
|
1367
|
+
alt: "Oyl Wallet",
|
|
1368
|
+
spriteId: "oyl"
|
|
1369
|
+
},
|
|
1370
|
+
desktop: {
|
|
1371
|
+
chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
|
|
1372
|
+
},
|
|
1373
|
+
injectedConfig: [
|
|
1374
|
+
{
|
|
1375
|
+
chain: "btc",
|
|
1376
|
+
extensionLocators: [
|
|
1377
|
+
],
|
|
1378
|
+
windowLocations: [
|
|
1379
|
+
"oyl"
|
|
1380
|
+
]
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
name: "Oyl Wallet"
|
|
1384
|
+
},
|
|
1385
|
+
abstract: {
|
|
1386
|
+
brand: {
|
|
1387
|
+
alt: "Abstract",
|
|
1388
|
+
spriteId: "abstract"
|
|
1389
|
+
},
|
|
1390
|
+
injectedConfig: [
|
|
1391
|
+
{
|
|
1392
|
+
chain: "evm",
|
|
1393
|
+
extensionLocators: [
|
|
1394
|
+
]
|
|
1395
|
+
}
|
|
1396
|
+
],
|
|
1397
|
+
name: "Abstract"
|
|
1398
|
+
},
|
|
1399
|
+
edenonline: {
|
|
1400
|
+
brand: {
|
|
1401
|
+
alt: "Eden Online",
|
|
1402
|
+
spriteId: "edenonline"
|
|
1403
|
+
},
|
|
1404
|
+
injectedConfig: [
|
|
1405
|
+
{
|
|
1406
|
+
chain: "evm",
|
|
1407
|
+
extensionLocators: [
|
|
1408
|
+
]
|
|
1409
|
+
}
|
|
1410
|
+
],
|
|
1411
|
+
name: "Eden Online"
|
|
1412
|
+
},
|
|
1413
|
+
intersend: {
|
|
1414
|
+
brand: {
|
|
1415
|
+
alt: "Intersend",
|
|
1416
|
+
spriteId: "intersend"
|
|
1417
|
+
},
|
|
1418
|
+
injectedConfig: [
|
|
1419
|
+
{
|
|
1420
|
+
chain: "evm",
|
|
1421
|
+
extensionLocators: [
|
|
1422
|
+
]
|
|
1423
|
+
}
|
|
1424
|
+
],
|
|
1425
|
+
name: "Intersend"
|
|
1306
1426
|
}
|
|
1307
1427
|
};
|
|
1308
1428
|
var walletBookFallbacks = {
|
package/wallet-book-fallbacks.js
CHANGED
|
@@ -61,6 +61,15 @@ var groups = {
|
|
|
61
61
|
key: "coinbase",
|
|
62
62
|
name: "Coinbase"
|
|
63
63
|
},
|
|
64
|
+
compasswallet: {
|
|
65
|
+
brand: {
|
|
66
|
+
alt: "Compass",
|
|
67
|
+
primaryColor: "#4B49C6",
|
|
68
|
+
spriteId: "1d7dea00-96be-4ce8-ca15-d14bddbb5000"
|
|
69
|
+
},
|
|
70
|
+
key: "compasswallet",
|
|
71
|
+
name: "Compass"
|
|
72
|
+
},
|
|
64
73
|
exodus: {
|
|
65
74
|
brand: {
|
|
66
75
|
alt: "Exodus Wallet",
|
|
@@ -69,6 +78,23 @@ var groups = {
|
|
|
69
78
|
key: "exodus",
|
|
70
79
|
name: "Exodus"
|
|
71
80
|
},
|
|
81
|
+
fireblocks: {
|
|
82
|
+
brand: {
|
|
83
|
+
alt: "Fireblocks",
|
|
84
|
+
spriteId: "fireblocks"
|
|
85
|
+
},
|
|
86
|
+
key: "fireblocks",
|
|
87
|
+
name: "Fireblocks"
|
|
88
|
+
},
|
|
89
|
+
flowwallet: {
|
|
90
|
+
brand: {
|
|
91
|
+
alt: "Flow Wallet",
|
|
92
|
+
primaryColor: "#2BE829",
|
|
93
|
+
spriteId: "flowwallet"
|
|
94
|
+
},
|
|
95
|
+
key: "flowwallet",
|
|
96
|
+
name: "Flow Wallet"
|
|
97
|
+
},
|
|
72
98
|
keplr: {
|
|
73
99
|
brand: {
|
|
74
100
|
alt: "Keplr",
|
|
@@ -102,6 +128,14 @@ var groups = {
|
|
|
102
128
|
key: "metamask",
|
|
103
129
|
name: "MetaMask"
|
|
104
130
|
},
|
|
131
|
+
nightly: {
|
|
132
|
+
brand: {
|
|
133
|
+
alt: "Nightly Wallet",
|
|
134
|
+
spriteId: "nightly"
|
|
135
|
+
},
|
|
136
|
+
key: "nightly",
|
|
137
|
+
name: "Nightly"
|
|
138
|
+
},
|
|
105
139
|
okxwallet: {
|
|
106
140
|
brand: {
|
|
107
141
|
alt: "OKX Wallet",
|
|
@@ -624,8 +658,19 @@ var wallets = {
|
|
|
624
658
|
edgeId: "hkkpjehhcnhgefhbdcgfkeegglpjchdc",
|
|
625
659
|
firefoxId: "braavos-wallet"
|
|
626
660
|
},
|
|
661
|
+
injectedConfig: [
|
|
662
|
+
{
|
|
663
|
+
chain: "starknet",
|
|
664
|
+
extensionLocators: [
|
|
665
|
+
],
|
|
666
|
+
windowLocations: [
|
|
667
|
+
"braavos"
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
],
|
|
627
671
|
mobile: {
|
|
628
672
|
androidId: "app.braavos.wallet",
|
|
673
|
+
inAppBrowser: "https://link.braavos.app/dapp/{{encodedDappURI}}",
|
|
629
674
|
iosId: "id1636013523"
|
|
630
675
|
},
|
|
631
676
|
name: "Braavos"
|
|
@@ -807,6 +852,19 @@ var wallets = {
|
|
|
807
852
|
filterFromWalletConnect: true,
|
|
808
853
|
name: "Lilico"
|
|
809
854
|
},
|
|
855
|
+
flowwalletflow: {
|
|
856
|
+
brand: {
|
|
857
|
+
alt: "Flow Wallet",
|
|
858
|
+
spriteId: "flowwallet"
|
|
859
|
+
},
|
|
860
|
+
chainGroup: "flowwallet",
|
|
861
|
+
desktop: {
|
|
862
|
+
chromeId: "hpclkefagolihohboafpheddmmgdffjm"
|
|
863
|
+
},
|
|
864
|
+
filterFromWalletConnect: true,
|
|
865
|
+
group: "flowwallet",
|
|
866
|
+
name: "Flow Wallet"
|
|
867
|
+
},
|
|
810
868
|
magicemailotp: {
|
|
811
869
|
brand: {
|
|
812
870
|
alt: "Magic Email OTP",
|
|
@@ -1007,6 +1065,9 @@ var wallets = {
|
|
|
1007
1065
|
desktop: {
|
|
1008
1066
|
chromeId: "aholpfdialjgjfhomihkjbmgjidlcdno"
|
|
1009
1067
|
},
|
|
1068
|
+
eip6963Config: {
|
|
1069
|
+
rdns: "com.exodus.web3-wallet"
|
|
1070
|
+
},
|
|
1010
1071
|
filterFromWalletConnect: true,
|
|
1011
1072
|
group: "exodus",
|
|
1012
1073
|
injectedConfig: [
|
|
@@ -1223,7 +1284,7 @@ var wallets = {
|
|
|
1223
1284
|
},
|
|
1224
1285
|
unknown: {
|
|
1225
1286
|
brand: {
|
|
1226
|
-
spriteId: "
|
|
1287
|
+
spriteId: "unknown-wallet"
|
|
1227
1288
|
},
|
|
1228
1289
|
mobile: {
|
|
1229
1290
|
androidId: "enable-android",
|
|
@@ -1274,9 +1335,6 @@ var wallets = {
|
|
|
1274
1335
|
name: "Xverse",
|
|
1275
1336
|
walletLimitations: {
|
|
1276
1337
|
browserExtension: {
|
|
1277
|
-
unsupportedEvents: [
|
|
1278
|
-
"accountChanged"
|
|
1279
|
-
],
|
|
1280
1338
|
unsupportedMethods: [
|
|
1281
1339
|
"getConnectedAccounts"
|
|
1282
1340
|
]
|
|
@@ -1285,7 +1343,7 @@ var wallets = {
|
|
|
1285
1343
|
},
|
|
1286
1344
|
fallbackconnector: {
|
|
1287
1345
|
brand: {
|
|
1288
|
-
spriteId: "
|
|
1346
|
+
spriteId: "unknown-wallet"
|
|
1289
1347
|
},
|
|
1290
1348
|
mobile: {
|
|
1291
1349
|
androidId: "enable-android",
|
|
@@ -1299,6 +1357,68 @@ var wallets = {
|
|
|
1299
1357
|
]
|
|
1300
1358
|
}
|
|
1301
1359
|
}
|
|
1360
|
+
},
|
|
1361
|
+
oylwallet: {
|
|
1362
|
+
brand: {
|
|
1363
|
+
alt: "Oyl Wallet",
|
|
1364
|
+
spriteId: "oyl"
|
|
1365
|
+
},
|
|
1366
|
+
desktop: {
|
|
1367
|
+
chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
|
|
1368
|
+
},
|
|
1369
|
+
injectedConfig: [
|
|
1370
|
+
{
|
|
1371
|
+
chain: "btc",
|
|
1372
|
+
extensionLocators: [
|
|
1373
|
+
],
|
|
1374
|
+
windowLocations: [
|
|
1375
|
+
"oyl"
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
],
|
|
1379
|
+
name: "Oyl Wallet"
|
|
1380
|
+
},
|
|
1381
|
+
abstract: {
|
|
1382
|
+
brand: {
|
|
1383
|
+
alt: "Abstract",
|
|
1384
|
+
spriteId: "abstract"
|
|
1385
|
+
},
|
|
1386
|
+
injectedConfig: [
|
|
1387
|
+
{
|
|
1388
|
+
chain: "evm",
|
|
1389
|
+
extensionLocators: [
|
|
1390
|
+
]
|
|
1391
|
+
}
|
|
1392
|
+
],
|
|
1393
|
+
name: "Abstract"
|
|
1394
|
+
},
|
|
1395
|
+
edenonline: {
|
|
1396
|
+
brand: {
|
|
1397
|
+
alt: "Eden Online",
|
|
1398
|
+
spriteId: "edenonline"
|
|
1399
|
+
},
|
|
1400
|
+
injectedConfig: [
|
|
1401
|
+
{
|
|
1402
|
+
chain: "evm",
|
|
1403
|
+
extensionLocators: [
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
name: "Eden Online"
|
|
1408
|
+
},
|
|
1409
|
+
intersend: {
|
|
1410
|
+
brand: {
|
|
1411
|
+
alt: "Intersend",
|
|
1412
|
+
spriteId: "intersend"
|
|
1413
|
+
},
|
|
1414
|
+
injectedConfig: [
|
|
1415
|
+
{
|
|
1416
|
+
chain: "evm",
|
|
1417
|
+
extensionLocators: [
|
|
1418
|
+
]
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
name: "Intersend"
|
|
1302
1422
|
}
|
|
1303
1423
|
};
|
|
1304
1424
|
var walletBookFallbacks = {
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var findWalletBookWallet = require('./findWalletBookWallet.cjs');
|
|
7
|
-
var renderTemplate = require('./renderTemplate.cjs');
|
|
8
|
-
|
|
9
|
-
const getWalletLinks = (walletBook, walletKey) => {
|
|
10
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
11
|
-
const walletData = findWalletBookWallet.findWalletBookWallet(walletBook, walletKey);
|
|
12
|
-
const links = {
|
|
13
|
-
android: '',
|
|
14
|
-
brave: '',
|
|
15
|
-
chrome: '',
|
|
16
|
-
edge: '',
|
|
17
|
-
firefox: '',
|
|
18
|
-
ios: '',
|
|
19
|
-
};
|
|
20
|
-
links.brave =
|
|
21
|
-
(_b = renderTemplate.renderTemplate('chromeUrl', (_a = walletData === null || walletData === void 0 ? void 0 : walletData.desktop) === null || _a === void 0 ? void 0 : _a.chromeId)) !== null && _b !== void 0 ? _b : '';
|
|
22
|
-
links.chrome =
|
|
23
|
-
(_d = renderTemplate.renderTemplate('chromeUrl', (_c = walletData === null || walletData === void 0 ? void 0 : walletData.desktop) === null || _c === void 0 ? void 0 : _c.chromeId)) !== null && _d !== void 0 ? _d : '';
|
|
24
|
-
links.edge = (_f = renderTemplate.renderTemplate('edgeUrl', (_e = walletData === null || walletData === void 0 ? void 0 : walletData.desktop) === null || _e === void 0 ? void 0 : _e.edgeId)) !== null && _f !== void 0 ? _f : '';
|
|
25
|
-
links.firefox =
|
|
26
|
-
(_h = renderTemplate.renderTemplate('firefoxUrl', (_g = walletData === null || walletData === void 0 ? void 0 : walletData.desktop) === null || _g === void 0 ? void 0 : _g.firefoxId)) !== null && _h !== void 0 ? _h : '';
|
|
27
|
-
links.ios =
|
|
28
|
-
(_m = (_k = renderTemplate.renderTemplate('iosUrl', (_j = walletData === null || walletData === void 0 ? void 0 : walletData.mobile) === null || _j === void 0 ? void 0 : _j.iosId)) !== null && _k !== void 0 ? _k : (_l = walletData === null || walletData === void 0 ? void 0 : walletData.mobile) === null || _l === void 0 ? void 0 : _l.ios) !== null && _m !== void 0 ? _m : '';
|
|
29
|
-
links.android =
|
|
30
|
-
(_r = (_p = renderTemplate.renderTemplate('androidUrl', (_o = walletData === null || walletData === void 0 ? void 0 : walletData.mobile) === null || _o === void 0 ? void 0 : _o.androidId)) !== null && _p !== void 0 ? _p : (_q = walletData === null || walletData === void 0 ? void 0 : walletData.mobile) === null || _q === void 0 ? void 0 : _q.android) !== null && _r !== void 0 ? _r : '';
|
|
31
|
-
return links;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.getWalletLinks = getWalletLinks;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WalletBookSchema } from '../schemas';
|
|
2
|
-
export type WalletLinks = {
|
|
3
|
-
android: string;
|
|
4
|
-
brave: string;
|
|
5
|
-
chrome: string;
|
|
6
|
-
edge: string;
|
|
7
|
-
firefox: string;
|
|
8
|
-
ios: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const getWalletLinks: (walletBook: WalletBookSchema, walletKey: string) => WalletLinks;
|