@dynamic-labs/wallet-book 4.0.0-alpha.4 → 4.0.0-alpha.40

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +349 -0
  2. package/README.md +1 -1
  3. package/package.cjs +8 -0
  4. package/package.js +4 -0
  5. package/package.json +7 -13
  6. package/src/build/sources/walletConnectOverrides/index.d.ts +26 -0
  7. package/src/components/WalletIcon.cjs +10 -2
  8. package/src/components/WalletIcon.d.ts +277 -3
  9. package/src/components/WalletIcon.js +11 -3
  10. package/src/helpers/getWalletBookWallet.d.ts +1 -1
  11. package/src/helpers/index.d.ts +0 -4
  12. package/src/hooks/fetchWalletBook/fetchWalletBook.cjs +49 -0
  13. package/src/hooks/fetchWalletBook/fetchWalletBook.d.ts +97 -0
  14. package/src/hooks/fetchWalletBook/fetchWalletBook.js +39 -0
  15. package/src/hooks/fetchWalletBook/index.d.ts +1 -0
  16. package/src/hooks/useWalletBookCdn.cjs +22 -38
  17. package/src/hooks/useWalletBookCdn.js +22 -38
  18. package/src/index.cjs +5 -10
  19. package/src/index.d.ts +1 -2
  20. package/src/index.js +5 -5
  21. package/wallet-book-fallbacks.cjs +117 -5
  22. package/wallet-book-fallbacks.js +117 -5
  23. package/src/helpers/getWalletLinks.cjs +0 -34
  24. package/src/helpers/getWalletLinks.d.ts +0 -10
  25. package/src/helpers/getWalletLinks.js +0 -30
  26. package/src/helpers/getWalletPrimaryColor.cjs +0 -14
  27. package/src/helpers/getWalletPrimaryColor.d.ts +0 -2
  28. package/src/helpers/getWalletPrimaryColor.js +0 -10
  29. package/src/helpers/isWalletEventSupported.cjs +0 -8
  30. package/src/helpers/isWalletEventSupported.d.ts +0 -2
  31. package/src/helpers/isWalletEventSupported.js +0 -4
  32. package/src/helpers/isWalletMethodSupported.cjs +0 -8
  33. package/src/helpers/isWalletMethodSupported.d.ts +0 -2
  34. package/src/helpers/isWalletMethodSupported.js +0 -4
  35. package/src/schemas/walletConnectSourceSchema.cjs +0 -78
  36. package/src/schemas/walletConnectSourceSchema.js +0 -74
@@ -1,47 +1,31 @@
1
1
  'use client'
2
- import { __awaiter } from '../../_virtual/_tslib.js';
3
2
  import { useState, useEffect } from 'react';
4
- import { retryableFn } from '@dynamic-labs/utils';
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 [walletBook, setWalletBook] = useState({});
8
+ const [walletBookState, setWalletBookState] = useState(walletBookCache.current);
15
9
  useEffect(() => {
16
- const fetchWalletBook = () => __awaiter(void 0, void 0, void 0, function* () {
17
- const url = getWalletBookCdnUrl();
18
- const fn = () => __awaiter(void 0, void 0, void 0, function* () {
19
- const res = yield fetch(url, { mode: 'cors' });
20
- if (res.ok) {
21
- const json = yield res.json();
22
- try {
23
- const parsedData = walletBookSchema.parse(json);
24
- return parsedData;
25
- }
26
- catch (e) {
27
- logger.error('Error parsing wallet book data', e, json);
28
- throw e;
29
- }
30
- }
31
- throw new Error(`Failed to fetch wallet book data from ${url} with status code ${res.status}`);
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 walletBook;
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 getWalletLinks = require('./helpers/getWalletLinks.cjs');
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.getWalletLinks = getWalletLinks.getWalletLinks;
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, getWalletLinks, getWalletPrimaryColor, getWalletGroup, getWalletBookCdnUrl, findWalletBookWallet, findWalletGroup, getBrandIconUrl, findWalletGroupOverride, isWalletMethodSupported, isWalletEventSupported, } from './helpers';
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 { getWalletLinks } from './helpers/getWalletLinks.js';
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",
@@ -628,8 +654,19 @@ var wallets = {
628
654
  edgeId: "hkkpjehhcnhgefhbdcgfkeegglpjchdc",
629
655
  firefoxId: "braavos-wallet"
630
656
  },
657
+ injectedConfig: [
658
+ {
659
+ chain: "starknet",
660
+ extensionLocators: [
661
+ ],
662
+ windowLocations: [
663
+ "braavos"
664
+ ]
665
+ }
666
+ ],
631
667
  mobile: {
632
668
  androidId: "app.braavos.wallet",
669
+ inAppBrowser: "https://link.braavos.app/dapp/{{encodedDappURI}}",
633
670
  iosId: "id1636013523"
634
671
  },
635
672
  name: "Braavos"
@@ -811,6 +848,19 @@ var wallets = {
811
848
  filterFromWalletConnect: true,
812
849
  name: "Lilico"
813
850
  },
851
+ flowwalletflow: {
852
+ brand: {
853
+ alt: "Flow Wallet",
854
+ spriteId: "flowwallet"
855
+ },
856
+ chainGroup: "flowwallet",
857
+ desktop: {
858
+ chromeId: "hpclkefagolihohboafpheddmmgdffjm"
859
+ },
860
+ filterFromWalletConnect: true,
861
+ group: "flowwallet",
862
+ name: "Flow Wallet"
863
+ },
814
864
  magicemailotp: {
815
865
  brand: {
816
866
  alt: "Magic Email OTP",
@@ -1011,6 +1061,9 @@ var wallets = {
1011
1061
  desktop: {
1012
1062
  chromeId: "aholpfdialjgjfhomihkjbmgjidlcdno"
1013
1063
  },
1064
+ eip6963Config: {
1065
+ rdns: "com.exodus.web3-wallet"
1066
+ },
1014
1067
  filterFromWalletConnect: true,
1015
1068
  group: "exodus",
1016
1069
  injectedConfig: [
@@ -1227,7 +1280,7 @@ var wallets = {
1227
1280
  },
1228
1281
  unknown: {
1229
1282
  brand: {
1230
- spriteId: "captcha-wave"
1283
+ spriteId: "unknown-wallet"
1231
1284
  },
1232
1285
  mobile: {
1233
1286
  androidId: "enable-android",
@@ -1278,9 +1331,6 @@ var wallets = {
1278
1331
  name: "Xverse",
1279
1332
  walletLimitations: {
1280
1333
  browserExtension: {
1281
- unsupportedEvents: [
1282
- "accountChanged"
1283
- ],
1284
1334
  unsupportedMethods: [
1285
1335
  "getConnectedAccounts"
1286
1336
  ]
@@ -1289,7 +1339,7 @@ var wallets = {
1289
1339
  },
1290
1340
  fallbackconnector: {
1291
1341
  brand: {
1292
- spriteId: "captcha-wave"
1342
+ spriteId: "unknown-wallet"
1293
1343
  },
1294
1344
  mobile: {
1295
1345
  androidId: "enable-android",
@@ -1303,6 +1353,68 @@ var wallets = {
1303
1353
  ]
1304
1354
  }
1305
1355
  }
1356
+ },
1357
+ oylwallet: {
1358
+ brand: {
1359
+ alt: "Oyl Wallet",
1360
+ spriteId: "oyl"
1361
+ },
1362
+ desktop: {
1363
+ chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
1364
+ },
1365
+ injectedConfig: [
1366
+ {
1367
+ chain: "btc",
1368
+ extensionLocators: [
1369
+ ],
1370
+ windowLocations: [
1371
+ "oyl"
1372
+ ]
1373
+ }
1374
+ ],
1375
+ name: "Oyl Wallet"
1376
+ },
1377
+ abstract: {
1378
+ brand: {
1379
+ alt: "Abstract",
1380
+ spriteId: "abstract"
1381
+ },
1382
+ injectedConfig: [
1383
+ {
1384
+ chain: "evm",
1385
+ extensionLocators: [
1386
+ ]
1387
+ }
1388
+ ],
1389
+ name: "Abstract"
1390
+ },
1391
+ edenonline: {
1392
+ brand: {
1393
+ alt: "Eden Online",
1394
+ spriteId: "edenonline"
1395
+ },
1396
+ injectedConfig: [
1397
+ {
1398
+ chain: "evm",
1399
+ extensionLocators: [
1400
+ ]
1401
+ }
1402
+ ],
1403
+ name: "Eden Online"
1404
+ },
1405
+ intersend: {
1406
+ brand: {
1407
+ alt: "Intersend",
1408
+ spriteId: "intersend"
1409
+ },
1410
+ injectedConfig: [
1411
+ {
1412
+ chain: "evm",
1413
+ extensionLocators: [
1414
+ ]
1415
+ }
1416
+ ],
1417
+ name: "Intersend"
1306
1418
  }
1307
1419
  };
1308
1420
  var walletBookFallbacks = {
@@ -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",
@@ -624,8 +650,19 @@ var wallets = {
624
650
  edgeId: "hkkpjehhcnhgefhbdcgfkeegglpjchdc",
625
651
  firefoxId: "braavos-wallet"
626
652
  },
653
+ injectedConfig: [
654
+ {
655
+ chain: "starknet",
656
+ extensionLocators: [
657
+ ],
658
+ windowLocations: [
659
+ "braavos"
660
+ ]
661
+ }
662
+ ],
627
663
  mobile: {
628
664
  androidId: "app.braavos.wallet",
665
+ inAppBrowser: "https://link.braavos.app/dapp/{{encodedDappURI}}",
629
666
  iosId: "id1636013523"
630
667
  },
631
668
  name: "Braavos"
@@ -807,6 +844,19 @@ var wallets = {
807
844
  filterFromWalletConnect: true,
808
845
  name: "Lilico"
809
846
  },
847
+ flowwalletflow: {
848
+ brand: {
849
+ alt: "Flow Wallet",
850
+ spriteId: "flowwallet"
851
+ },
852
+ chainGroup: "flowwallet",
853
+ desktop: {
854
+ chromeId: "hpclkefagolihohboafpheddmmgdffjm"
855
+ },
856
+ filterFromWalletConnect: true,
857
+ group: "flowwallet",
858
+ name: "Flow Wallet"
859
+ },
810
860
  magicemailotp: {
811
861
  brand: {
812
862
  alt: "Magic Email OTP",
@@ -1007,6 +1057,9 @@ var wallets = {
1007
1057
  desktop: {
1008
1058
  chromeId: "aholpfdialjgjfhomihkjbmgjidlcdno"
1009
1059
  },
1060
+ eip6963Config: {
1061
+ rdns: "com.exodus.web3-wallet"
1062
+ },
1010
1063
  filterFromWalletConnect: true,
1011
1064
  group: "exodus",
1012
1065
  injectedConfig: [
@@ -1223,7 +1276,7 @@ var wallets = {
1223
1276
  },
1224
1277
  unknown: {
1225
1278
  brand: {
1226
- spriteId: "captcha-wave"
1279
+ spriteId: "unknown-wallet"
1227
1280
  },
1228
1281
  mobile: {
1229
1282
  androidId: "enable-android",
@@ -1274,9 +1327,6 @@ var wallets = {
1274
1327
  name: "Xverse",
1275
1328
  walletLimitations: {
1276
1329
  browserExtension: {
1277
- unsupportedEvents: [
1278
- "accountChanged"
1279
- ],
1280
1330
  unsupportedMethods: [
1281
1331
  "getConnectedAccounts"
1282
1332
  ]
@@ -1285,7 +1335,7 @@ var wallets = {
1285
1335
  },
1286
1336
  fallbackconnector: {
1287
1337
  brand: {
1288
- spriteId: "captcha-wave"
1338
+ spriteId: "unknown-wallet"
1289
1339
  },
1290
1340
  mobile: {
1291
1341
  androidId: "enable-android",
@@ -1299,6 +1349,68 @@ var wallets = {
1299
1349
  ]
1300
1350
  }
1301
1351
  }
1352
+ },
1353
+ oylwallet: {
1354
+ brand: {
1355
+ alt: "Oyl Wallet",
1356
+ spriteId: "oyl"
1357
+ },
1358
+ desktop: {
1359
+ chromeId: "ilolmnhjbbggkmopnemiphomhaojndmb"
1360
+ },
1361
+ injectedConfig: [
1362
+ {
1363
+ chain: "btc",
1364
+ extensionLocators: [
1365
+ ],
1366
+ windowLocations: [
1367
+ "oyl"
1368
+ ]
1369
+ }
1370
+ ],
1371
+ name: "Oyl Wallet"
1372
+ },
1373
+ abstract: {
1374
+ brand: {
1375
+ alt: "Abstract",
1376
+ spriteId: "abstract"
1377
+ },
1378
+ injectedConfig: [
1379
+ {
1380
+ chain: "evm",
1381
+ extensionLocators: [
1382
+ ]
1383
+ }
1384
+ ],
1385
+ name: "Abstract"
1386
+ },
1387
+ edenonline: {
1388
+ brand: {
1389
+ alt: "Eden Online",
1390
+ spriteId: "edenonline"
1391
+ },
1392
+ injectedConfig: [
1393
+ {
1394
+ chain: "evm",
1395
+ extensionLocators: [
1396
+ ]
1397
+ }
1398
+ ],
1399
+ name: "Eden Online"
1400
+ },
1401
+ intersend: {
1402
+ brand: {
1403
+ alt: "Intersend",
1404
+ spriteId: "intersend"
1405
+ },
1406
+ injectedConfig: [
1407
+ {
1408
+ chain: "evm",
1409
+ extensionLocators: [
1410
+ ]
1411
+ }
1412
+ ],
1413
+ name: "Intersend"
1302
1414
  }
1303
1415
  };
1304
1416
  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;
@@ -1,30 +0,0 @@
1
- 'use client'
2
- import { findWalletBookWallet } from './findWalletBookWallet.js';
3
- import { renderTemplate } from './renderTemplate.js';
4
-
5
- const getWalletLinks = (walletBook, walletKey) => {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
7
- const walletData = findWalletBookWallet(walletBook, walletKey);
8
- const links = {
9
- android: '',
10
- brave: '',
11
- chrome: '',
12
- edge: '',
13
- firefox: '',
14
- ios: '',
15
- };
16
- links.brave =
17
- (_b = 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 : '';
18
- links.chrome =
19
- (_d = 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 : '';
20
- links.edge = (_f = 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 : '';
21
- links.firefox =
22
- (_h = 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 : '';
23
- links.ios =
24
- (_m = (_k = 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 : '';
25
- links.android =
26
- (_r = (_p = 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 : '';
27
- return links;
28
- };
29
-
30
- export { getWalletLinks };
@@ -1,14 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var getWalletBookWallet = require('./getWalletBookWallet.cjs');
7
-
8
- const getWalletPrimaryColor = (walletBook, walletKey) => {
9
- var _a;
10
- const walletData = getWalletBookWallet.getWalletBookWallet(walletBook, walletKey);
11
- return (_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.primaryColor;
12
- };
13
-
14
- exports.getWalletPrimaryColor = getWalletPrimaryColor;
@@ -1,2 +0,0 @@
1
- import { WalletBookSchema } from '../schemas';
2
- export declare const getWalletPrimaryColor: (walletBook: WalletBookSchema, walletKey: string) => string | undefined;
@@ -1,10 +0,0 @@
1
- 'use client'
2
- import { getWalletBookWallet } from './getWalletBookWallet.js';
3
-
4
- const getWalletPrimaryColor = (walletBook, walletKey) => {
5
- var _a;
6
- const walletData = getWalletBookWallet(walletBook, walletKey);
7
- return (_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.primaryColor;
8
- };
9
-
10
- export { getWalletPrimaryColor };
@@ -1,8 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- const isWalletEventSupported = (wallet, event, platform) => { var _a, _b, _c; return !((_c = (_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.walletLimitations) === null || _a === void 0 ? void 0 : _a[platform]) === null || _b === void 0 ? void 0 : _b.unsupportedEvents) === null || _c === void 0 ? void 0 : _c.includes(event)); };
7
-
8
- exports.isWalletEventSupported = isWalletEventSupported;
@@ -1,2 +0,0 @@
1
- import { WalletSchema } from '../schemas';
2
- export declare const isWalletEventSupported: (wallet: WalletSchema | undefined, event: string, platform: keyof NonNullable<WalletSchema['walletLimitations']>) => boolean;
@@ -1,4 +0,0 @@
1
- 'use client'
2
- const isWalletEventSupported = (wallet, event, platform) => { var _a, _b, _c; return !((_c = (_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.walletLimitations) === null || _a === void 0 ? void 0 : _a[platform]) === null || _b === void 0 ? void 0 : _b.unsupportedEvents) === null || _c === void 0 ? void 0 : _c.includes(event)); };
3
-
4
- export { isWalletEventSupported };
@@ -1,8 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- const isWalletMethodSupported = (wallet, method, platform) => { var _a, _b, _c; return !((_c = (_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.walletLimitations) === null || _a === void 0 ? void 0 : _a[platform]) === null || _b === void 0 ? void 0 : _b.unsupportedMethods) === null || _c === void 0 ? void 0 : _c.includes(method)); };
7
-
8
- exports.isWalletMethodSupported = isWalletMethodSupported;
@@ -1,2 +0,0 @@
1
- import { WalletSchema } from '../schemas';
2
- export declare const isWalletMethodSupported: (wallet: WalletSchema | undefined, method: string, platform: keyof NonNullable<WalletSchema['walletLimitations']>) => boolean;