@dynamic-labs/wallet-book 1.0.0-alpha.8 → 1.0.0

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 (40) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/_virtual/_tslib.cjs +43 -0
  3. package/_virtual/_tslib.js +38 -0
  4. package/package.json +2 -2
  5. package/src/build/index.d.ts +3 -0
  6. package/src/build/sources/walletConnect/index.d.ts +12 -9
  7. package/src/components/WalletIcon.cjs +4 -8
  8. package/src/components/WalletIcon.js +4 -8
  9. package/src/helpers/findWalletBookWallet.d.ts +3 -0
  10. package/src/helpers/getWalletBookCdnUrl.cjs +2 -4
  11. package/src/helpers/getWalletBookCdnUrl.js +2 -4
  12. package/src/helpers/getWalletBookWallet.cjs +3 -2
  13. package/src/helpers/getWalletBookWallet.js +3 -2
  14. package/src/helpers/getWalletIconUrl.cjs +3 -2
  15. package/src/helpers/getWalletIconUrl.js +3 -2
  16. package/src/helpers/getWalletLinks.cjs +7 -10
  17. package/src/helpers/getWalletLinks.js +7 -10
  18. package/src/helpers/getWalletPrimaryColor.cjs +2 -1
  19. package/src/helpers/getWalletPrimaryColor.js +2 -1
  20. package/src/helpers/normalizeWalletName.cjs +1 -1
  21. package/src/helpers/normalizeWalletName.js +1 -1
  22. package/src/hooks/useWalletBookCdn.cjs +5 -4
  23. package/src/hooks/useWalletBookCdn.d.ts +3 -0
  24. package/src/hooks/useWalletBookCdn.js +5 -4
  25. package/src/schemas/utils/transformAndroidId.cjs +2 -2
  26. package/src/schemas/utils/transformAndroidId.js +2 -2
  27. package/src/schemas/utils/transformChromeExtensionId.cjs +3 -3
  28. package/src/schemas/utils/transformChromeExtensionId.js +3 -3
  29. package/src/schemas/utils/transformEdgeExtensionId.cjs +3 -3
  30. package/src/schemas/utils/transformEdgeExtensionId.js +3 -3
  31. package/src/schemas/utils/transformFirefoxExtensionId.cjs +3 -3
  32. package/src/schemas/utils/transformFirefoxExtensionId.js +3 -3
  33. package/src/schemas/utils/transformIosId.cjs +4 -4
  34. package/src/schemas/utils/transformIosId.js +4 -4
  35. package/src/schemas/walletBookSchema.d.ts +44 -0
  36. package/src/schemas/walletSchema.cjs +6 -4
  37. package/src/schemas/walletSchema.d.ts +19 -0
  38. package/src/schemas/walletSchema.js +6 -4
  39. package/wallet-book-fallbacks.cjs +54 -0
  40. package/wallet-book-fallbacks.js +54 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,73 @@
1
1
 
2
+ ## [1.0.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.0.0) (2023-12-12)
3
+
4
+ Changelog: https://docs.dynamic.xyz/changelog/v1
5
+ Upgrade guide: https://docs.dynamic.xyz/react-sdk/upgrade
6
+
7
+
8
+ ## [1.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2023-12-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add user_media scope to instagram ([#4144](https://github.com/dynamic-labs/DynamicAuth/issues/4144)) ([57b9140](https://github.com/dynamic-labs/DynamicAuth/commit/57b91400cae7287157988cd6dfe7f30aeced10de))
14
+ * enable buy button onramp even with pregenerated wallets ([#4135](https://github.com/dynamic-labs/DynamicAuth/issues/4135)) ([fd94ecd](https://github.com/dynamic-labs/DynamicAuth/commit/fd94ecdcbe7190dc9abeb829cdcd933561afdd77))
15
+ * make the pin input fields responsive ([#4140](https://github.com/dynamic-labs/DynamicAuth/issues/4140)) ([4244744](https://github.com/dynamic-labs/DynamicAuth/commit/42447445ec32a3bca48a48d001c24dcd5b5cf004))
16
+
17
+ ## [1.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2023-12-12)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * embedded wallet connected flag not picking up ([#4128](https://github.com/dynamic-labs/DynamicAuth/issues/4128)) ([c6fbb1d](https://github.com/dynamic-labs/DynamicAuth/commit/c6fbb1de2027b186a4277a75545fd66d0d11ba95))
23
+
24
+ ## [1.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2023-12-11)
25
+
26
+
27
+ ### Features
28
+
29
+ * add useFunding hook ([#4098](https://github.com/dynamic-labs/DynamicAuth/issues/4098)) ([27424ab](https://github.com/dynamic-labs/DynamicAuth/commit/27424ab1a15202ee2b7c73c8a19f11e480e1794a))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * add primary color to the secure wallet text ([#4127](https://github.com/dynamic-labs/DynamicAuth/issues/4127)) ([7c642d0](https://github.com/dynamic-labs/DynamicAuth/commit/7c642d0385112289df52874bc5dd2eaa0e6cdf50))
35
+
36
+ ## [1.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2023-12-11)
37
+
38
+ ## [1.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2023-12-08)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * allow transaction error to read from viem error ([#4101](https://github.com/dynamic-labs/DynamicAuth/issues/4101)) ([0f46cbe](https://github.com/dynamic-labs/DynamicAuth/commit/0f46cbea1eb260c2efdeee9b62f669fb3cf4ab93))
44
+ * trigger claim flow for unclaimed embedded smart contract wallet signer ([#4108](https://github.com/dynamic-labs/DynamicAuth/issues/4108)) ([37c9013](https://github.com/dynamic-labs/DynamicAuth/commit/37c9013109f2d6a37bde041da9072c5f5fa2df67))
45
+ * WalletConnect v2 connector with non active chains ([#4085](https://github.com/dynamic-labs/DynamicAuth/issues/4085)) ([f69cbe9](https://github.com/dynamic-labs/DynamicAuth/commit/f69cbe96012563f71e89939c96f2a46926e7b394))
46
+
47
+ ## [1.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-12-07)
48
+
49
+
50
+ ### ⚠ BREAKING CHANGES
51
+
52
+ * how to migrate
53
+ Whenever you would use the property wallets from the object returned by useDynamicContext, you must now rename it to walletConnectorOptions.
54
+
55
+ ### Features
56
+
57
+ * add support for eip6963 ([#4064](https://github.com/dynamic-labs/DynamicAuth/issues/4064)) ([3f8cf0e](https://github.com/dynamic-labs/DynamicAuth/commit/3f8cf0e4250945f3a331f701d491a308fab5f7b8))
58
+ * allow AA wallets to access owner features ([#4079](https://github.com/dynamic-labs/DynamicAuth/issues/4079)) ([9efc2be](https://github.com/dynamic-labs/DynamicAuth/commit/9efc2bee87ec9193c3682863d72024b3586de724))
59
+ * introduce UserWalletsContext ([#4083](https://github.com/dynamic-labs/DynamicAuth/issues/4083)) ([b9ca7f6](https://github.com/dynamic-labs/DynamicAuth/commit/b9ca7f6b0aff4b3992325b70cc9a903ece445c7f))
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * ensure zero dev provider will receive a signer ([#4084](https://github.com/dynamic-labs/DynamicAuth/issues/4084)) ([f02a540](https://github.com/dynamic-labs/DynamicAuth/commit/f02a54036d39bfc5fb0c262f292acf914e4bd653))
65
+ * render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([5f29bd2](https://github.com/dynamic-labs/DynamicAuth/commit/5f29bd23ccca2e307822377be28396edc7ab1fda))
66
+ * reset selected social provider on logout ([#4078](https://github.com/dynamic-labs/DynamicAuth/issues/4078)) ([85dc611](https://github.com/dynamic-labs/DynamicAuth/commit/85dc611d9c0e733bdb9d316b008bdaa35bcc2a91))
67
+
68
+
69
+ * rename wallets > walletConnectorOptions ([#4086](https://github.com/dynamic-labs/DynamicAuth/issues/4086)) ([10a7795](https://github.com/dynamic-labs/DynamicAuth/commit/10a779567e751469a667095726da52d78facbd57))
70
+
2
71
  ## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
3
72
 
4
73
 
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /******************************************************************************
6
+ Copyright (c) Microsoft Corporation.
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any
9
+ purpose with or without fee is hereby granted.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ ***************************************************************************** */
19
+
20
+ function __rest(s, e) {
21
+ var t = {};
22
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23
+ t[p] = s[p];
24
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
25
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
26
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
27
+ t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ }
31
+
32
+ function __awaiter(thisArg, _arguments, P, generator) {
33
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
+ return new (P || (P = Promise))(function (resolve, reject) {
35
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
39
+ });
40
+ }
41
+
42
+ exports.__awaiter = __awaiter;
43
+ exports.__rest = __rest;
@@ -0,0 +1,38 @@
1
+ /******************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ function __rest(s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ }
27
+
28
+ function __awaiter(thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ }
37
+
38
+ export { __awaiter, __rest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-book",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "zod": "3.22.4",
29
- "@dynamic-labs/logger": "1.0.0-alpha.8"
29
+ "@dynamic-labs/logger": "1.0.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "^17.0.2 || ^18.0.0",
@@ -23,6 +23,9 @@ export declare const generateWalletFallbacks: (wallets: WalletRecordsSchema) =>
23
23
  safariId?: string | undefined;
24
24
  universal?: string | undefined;
25
25
  } | undefined;
26
+ eip6963Config?: {
27
+ rdns: string;
28
+ } | undefined;
26
29
  filterFromWalletConnect?: boolean | undefined;
27
30
  group?: string | undefined;
28
31
  injectedConfig?: {
@@ -5,11 +5,19 @@ export declare const walletConnectSourceData: Record<string, {
5
5
  native: string | null;
6
6
  universal: string | null;
7
7
  };
8
+ rdns: string | null;
8
9
  mobile: {
9
10
  native: string | null;
10
11
  universal: string | null;
11
12
  };
12
13
  sdks: string[];
14
+ metadata: {
15
+ shortName: string | null;
16
+ colors: {
17
+ primary: string | null;
18
+ secondary: string | null;
19
+ };
20
+ };
13
21
  app: {
14
22
  android: string | null;
15
23
  ios: string | null;
@@ -38,22 +46,14 @@ export declare const walletConnectSourceData: Record<string, {
38
46
  injected_id: string;
39
47
  namespace: string;
40
48
  }[] | null;
41
- metadata: {
42
- shortName: string | null;
43
- colors: {
44
- primary: string | null;
45
- secondary: string | null;
46
- };
47
- };
48
- rdns: string | null;
49
49
  slug: string;
50
50
  updatedAt: string;
51
51
  versions: string[];
52
52
  supported_standards?: {
53
+ title: string;
53
54
  id: string;
54
55
  standard_id: number;
55
56
  standard_prefix: string;
56
- title: string;
57
57
  url: string;
58
58
  }[] | undefined;
59
59
  }>;
@@ -75,6 +75,9 @@ export declare const walletConnectTransformedData: Promise<Record<string, {
75
75
  safariId?: string | undefined;
76
76
  universal?: string | undefined;
77
77
  } | undefined;
78
+ eip6963Config?: {
79
+ rdns: string;
80
+ } | undefined;
78
81
  filterFromWalletConnect?: boolean | undefined;
79
82
  group?: string | undefined;
80
83
  injectedConfig?: {
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _tslib = require('../../_virtual/_tslib.cjs');
5
6
  var react = require('react');
6
7
  var getWalletIconUrl = require('../helpers/getWalletIconUrl.cjs');
7
8
  var findWalletBookWallet = require('../helpers/findWalletBookWallet.cjs');
@@ -11,7 +12,8 @@ require('../schemas/walletBookSchema.cjs');
11
12
  require('../schemas/walletSchema.cjs');
12
13
  var useWalletBookContext = require('../hooks/useWalletBookContext.cjs');
13
14
 
14
- const WalletIcon = ({ walletKey, children, ...props }) => {
15
+ const WalletIcon = (_a) => {
16
+ var { walletKey, children } = _a, props = _tslib.__rest(_a, ["walletKey", "children"]);
15
17
  const { walletBook } = useWalletBookContext.useWalletBookContext();
16
18
  const walletData = findWalletBookWallet.findWalletBookWallet(walletBook, walletKey);
17
19
  const [imgError, setImgError] = react.useState(false);
@@ -23,13 +25,7 @@ const WalletIcon = ({ walletKey, children, ...props }) => {
23
25
  const onError = () => {
24
26
  setImgError(true);
25
27
  };
26
- return react.createElement('img', {
27
- 'data-testid': `wallet-icon-${walletKey}`,
28
- ...props,
29
- alt: walletData.brand.alt,
30
- onError: onError,
31
- src: imgError ? defaultWalletIconUrl : walletIconUrl,
32
- }, children);
28
+ return react.createElement('img', Object.assign(Object.assign({ 'data-testid': `wallet-icon-${walletKey}` }, props), { alt: walletData.brand.alt, onError: onError, src: imgError ? defaultWalletIconUrl : walletIconUrl }), children);
33
29
  };
34
30
 
35
31
  exports.WalletIcon = WalletIcon;
@@ -1,3 +1,4 @@
1
+ import { __rest } from '../../_virtual/_tslib.js';
1
2
  import { useState, createElement, Fragment } from 'react';
2
3
  import { getWalletIconUrl, getDefaultWalletIconUrl } from '../helpers/getWalletIconUrl.js';
3
4
  import { findWalletBookWallet } from '../helpers/findWalletBookWallet.js';
@@ -7,7 +8,8 @@ import '../schemas/walletBookSchema.js';
7
8
  import '../schemas/walletSchema.js';
8
9
  import { useWalletBookContext } from '../hooks/useWalletBookContext.js';
9
10
 
10
- const WalletIcon = ({ walletKey, children, ...props }) => {
11
+ const WalletIcon = (_a) => {
12
+ var { walletKey, children } = _a, props = __rest(_a, ["walletKey", "children"]);
11
13
  const { walletBook } = useWalletBookContext();
12
14
  const walletData = findWalletBookWallet(walletBook, walletKey);
13
15
  const [imgError, setImgError] = useState(false);
@@ -19,13 +21,7 @@ const WalletIcon = ({ walletKey, children, ...props }) => {
19
21
  const onError = () => {
20
22
  setImgError(true);
21
23
  };
22
- return createElement('img', {
23
- 'data-testid': `wallet-icon-${walletKey}`,
24
- ...props,
25
- alt: walletData.brand.alt,
26
- onError: onError,
27
- src: imgError ? defaultWalletIconUrl : walletIconUrl,
28
- }, children);
24
+ return createElement('img', Object.assign(Object.assign({ 'data-testid': `wallet-icon-${walletKey}` }, props), { alt: walletData.brand.alt, onError: onError, src: imgError ? defaultWalletIconUrl : walletIconUrl }), children);
29
25
  };
30
26
 
31
27
  export { WalletIcon };
@@ -17,6 +17,9 @@ export declare const findWalletBookWallet: (walletBook: WalletBookSchema, wallet
17
17
  safariId?: string | undefined;
18
18
  universal?: string | undefined;
19
19
  } | undefined;
20
+ eip6963Config?: {
21
+ rdns: string;
22
+ } | undefined;
20
23
  filterFromWalletConnect?: boolean | undefined;
21
24
  group?: string | undefined;
22
25
  injectedConfig?: {
@@ -6,10 +6,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  // This method needs to be wrapped correctly to avoid bundler issues
7
7
  // that may update process.env variable via custom configs in customers apps
8
8
  const getWalletBookCdnUrl = () => {
9
- return (process.env['WALLET_BOOK_CDN_URL'] ??
10
- process.env['NEXT_PUBLIC_WALLET_BOOK_CDN_URL'] ??
11
- process.env['REACT_APP_WALLET_BOOK_CDN_URL'] ??
12
- 'https://dynamic-static-assets.com/wallet-book/v1/stable/wallet-book.json');
9
+ var _a, _b, _c;
10
+ return ((_c = (_b = (_a = process.env['WALLET_BOOK_CDN_URL']) !== null && _a !== void 0 ? _a : process.env['NEXT_PUBLIC_WALLET_BOOK_CDN_URL']) !== null && _b !== void 0 ? _b : process.env['REACT_APP_WALLET_BOOK_CDN_URL']) !== null && _c !== void 0 ? _c : 'https://dynamic-static-assets.com/wallet-book/v1/stable/wallet-book.json');
13
11
  };
14
12
 
15
13
  exports.getWalletBookCdnUrl = getWalletBookCdnUrl;
@@ -2,10 +2,8 @@
2
2
  // This method needs to be wrapped correctly to avoid bundler issues
3
3
  // that may update process.env variable via custom configs in customers apps
4
4
  const getWalletBookCdnUrl = () => {
5
- return (process.env['WALLET_BOOK_CDN_URL'] ??
6
- process.env['NEXT_PUBLIC_WALLET_BOOK_CDN_URL'] ??
7
- process.env['REACT_APP_WALLET_BOOK_CDN_URL'] ??
8
- 'https://dynamic-static-assets.com/wallet-book/v1/stable/wallet-book.json');
5
+ var _a, _b, _c;
6
+ return ((_c = (_b = (_a = process.env['WALLET_BOOK_CDN_URL']) !== null && _a !== void 0 ? _a : process.env['NEXT_PUBLIC_WALLET_BOOK_CDN_URL']) !== null && _b !== void 0 ? _b : process.env['REACT_APP_WALLET_BOOK_CDN_URL']) !== null && _c !== void 0 ? _c : 'https://dynamic-static-assets.com/wallet-book/v1/stable/wallet-book.json');
9
7
  };
10
8
 
11
9
  export { getWalletBookCdnUrl };
@@ -5,10 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var normalizeWalletName = require('./normalizeWalletName.cjs');
6
6
 
7
7
  const getWalletBookWallet = (walletBook, walletName) => {
8
+ var _a, _b;
8
9
  const normalizedWalletName = normalizeWalletName.normalizeWalletName(walletName);
9
- const walletData = walletBook?.wallets?.[normalizedWalletName];
10
+ const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[normalizedWalletName];
10
11
  if (!walletData)
11
- throw new Error(`Wallet ${walletName} not found in wallet book (${Object.keys(walletBook?.wallets ?? {}).length} wallets found)`);
12
+ throw new Error(`Wallet ${walletName} not found in wallet book (${Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length} wallets found)`);
12
13
  return walletData;
13
14
  };
14
15
 
@@ -1,10 +1,11 @@
1
1
  import { normalizeWalletName } from './normalizeWalletName.js';
2
2
 
3
3
  const getWalletBookWallet = (walletBook, walletName) => {
4
+ var _a, _b;
4
5
  const normalizedWalletName = normalizeWalletName(walletName);
5
- const walletData = walletBook?.wallets?.[normalizedWalletName];
6
+ const walletData = (_a = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) === null || _a === void 0 ? void 0 : _a[normalizedWalletName];
6
7
  if (!walletData)
7
- throw new Error(`Wallet ${walletName} not found in wallet book (${Object.keys(walletBook?.wallets ?? {}).length} wallets found)`);
8
+ throw new Error(`Wallet ${walletName} not found in wallet book (${Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length} wallets found)`);
8
9
  return walletData;
9
10
  };
10
11
 
@@ -7,12 +7,13 @@ var logger = require('./logger.cjs');
7
7
  var renderTemplate = require('./renderTemplate.cjs');
8
8
 
9
9
  const getWalletIconUrl = (walletBook, walletKey) => {
10
+ var _a, _b;
10
11
  try {
11
12
  const walletData = getWalletBookWallet.getWalletBookWallet(walletBook, walletKey);
12
- if (walletData?.brand?.spriteId) {
13
+ if ((_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.spriteId) {
13
14
  return renderTemplate.renderTemplate('iconicUrl', walletData.brand.spriteId);
14
15
  }
15
- if (walletData?.brand?.imageId) {
16
+ if ((_b = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _b === void 0 ? void 0 : _b.imageId) {
16
17
  return renderTemplate.renderTemplate('walletConnectUrl', walletData.brand.imageId);
17
18
  }
18
19
  }
@@ -3,12 +3,13 @@ import { logger } from './logger.js';
3
3
  import { renderTemplate } from './renderTemplate.js';
4
4
 
5
5
  const getWalletIconUrl = (walletBook, walletKey) => {
6
+ var _a, _b;
6
7
  try {
7
8
  const walletData = getWalletBookWallet(walletBook, walletKey);
8
- if (walletData?.brand?.spriteId) {
9
+ if ((_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.spriteId) {
9
10
  return renderTemplate('iconicUrl', walletData.brand.spriteId);
10
11
  }
11
- if (walletData?.brand?.imageId) {
12
+ if ((_b = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _b === void 0 ? void 0 : _b.imageId) {
12
13
  return renderTemplate('walletConnectUrl', walletData.brand.imageId);
13
14
  }
14
15
  }
@@ -6,6 +6,7 @@ var findWalletBookWallet = require('./findWalletBookWallet.cjs');
6
6
  var renderTemplate = require('./renderTemplate.cjs');
7
7
 
8
8
  const getWalletLinks = (walletBook, walletKey) => {
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
9
10
  const walletData = findWalletBookWallet.findWalletBookWallet(walletBook, walletKey);
10
11
  const links = {
11
12
  android: '',
@@ -16,20 +17,16 @@ const getWalletLinks = (walletBook, walletKey) => {
16
17
  ios: '',
17
18
  };
18
19
  links.brave =
19
- renderTemplate.renderTemplate('chromeUrl', walletData?.desktop?.chromeId) ?? '';
20
+ (_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 : '';
20
21
  links.chrome =
21
- renderTemplate.renderTemplate('chromeUrl', walletData?.desktop?.chromeId) ?? '';
22
- links.edge = renderTemplate.renderTemplate('edgeUrl', walletData?.desktop?.edgeId) ?? '';
22
+ (_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 : '';
23
+ 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 : '';
23
24
  links.firefox =
24
- renderTemplate.renderTemplate('firefoxUrl', walletData?.desktop?.firefoxId) ?? '';
25
+ (_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 : '';
25
26
  links.ios =
26
- renderTemplate.renderTemplate('iosUrl', walletData?.mobile?.iosId) ??
27
- walletData?.mobile?.ios ??
28
- '';
27
+ (_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
28
  links.android =
30
- renderTemplate.renderTemplate('androidUrl', walletData?.mobile?.androidId) ??
31
- walletData?.mobile?.android ??
32
- '';
29
+ (_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 : '';
33
30
  return links;
34
31
  };
35
32
 
@@ -2,6 +2,7 @@ import { findWalletBookWallet } from './findWalletBookWallet.js';
2
2
  import { renderTemplate } from './renderTemplate.js';
3
3
 
4
4
  const getWalletLinks = (walletBook, walletKey) => {
5
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
5
6
  const walletData = findWalletBookWallet(walletBook, walletKey);
6
7
  const links = {
7
8
  android: '',
@@ -12,20 +13,16 @@ const getWalletLinks = (walletBook, walletKey) => {
12
13
  ios: '',
13
14
  };
14
15
  links.brave =
15
- renderTemplate('chromeUrl', walletData?.desktop?.chromeId) ?? '';
16
+ (_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 : '';
16
17
  links.chrome =
17
- renderTemplate('chromeUrl', walletData?.desktop?.chromeId) ?? '';
18
- links.edge = renderTemplate('edgeUrl', walletData?.desktop?.edgeId) ?? '';
18
+ (_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 : '';
19
+ 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 : '';
19
20
  links.firefox =
20
- renderTemplate('firefoxUrl', walletData?.desktop?.firefoxId) ?? '';
21
+ (_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 : '';
21
22
  links.ios =
22
- renderTemplate('iosUrl', walletData?.mobile?.iosId) ??
23
- walletData?.mobile?.ios ??
24
- '';
23
+ (_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
24
  links.android =
26
- renderTemplate('androidUrl', walletData?.mobile?.androidId) ??
27
- walletData?.mobile?.android ??
28
- '';
25
+ (_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 : '';
29
26
  return links;
30
27
  };
31
28
 
@@ -5,8 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var getWalletBookWallet = require('./getWalletBookWallet.cjs');
6
6
 
7
7
  const getWalletPrimaryColor = (walletBook, walletKey) => {
8
+ var _a;
8
9
  const walletData = getWalletBookWallet.getWalletBookWallet(walletBook, walletKey);
9
- return walletData?.brand?.primaryColor;
10
+ return (_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.primaryColor;
10
11
  };
11
12
 
12
13
  exports.getWalletPrimaryColor = getWalletPrimaryColor;
@@ -1,8 +1,9 @@
1
1
  import { getWalletBookWallet } from './getWalletBookWallet.js';
2
2
 
3
3
  const getWalletPrimaryColor = (walletBook, walletKey) => {
4
+ var _a;
4
5
  const walletData = getWalletBookWallet(walletBook, walletKey);
5
- return walletData?.brand?.primaryColor;
6
+ return (_a = walletData === null || walletData === void 0 ? void 0 : walletData.brand) === null || _a === void 0 ? void 0 : _a.primaryColor;
6
7
  };
7
8
 
8
9
  export { getWalletPrimaryColor };
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const normalizeWalletName = (name) => name?.toLowerCase().replace(/\W/g, '') ?? 'undefined-wallet';
5
+ const normalizeWalletName = (name) => { var _a; return (_a = name === null || name === void 0 ? void 0 : name.toLowerCase().replace(/\W/g, '')) !== null && _a !== void 0 ? _a : 'undefined-wallet'; };
6
6
 
7
7
  exports.normalizeWalletName = normalizeWalletName;
@@ -1,3 +1,3 @@
1
- const normalizeWalletName = (name) => name?.toLowerCase().replace(/\W/g, '') ?? 'undefined-wallet';
1
+ const normalizeWalletName = (name) => { var _a; return (_a = name === null || name === void 0 ? void 0 : name.toLowerCase().replace(/\W/g, '')) !== null && _a !== void 0 ? _a : 'undefined-wallet'; };
2
2
 
3
3
  export { normalizeWalletName };
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _tslib = require('../../_virtual/_tslib.cjs');
5
6
  var react = require('react');
6
7
  require('../schemas/walletConnectSourceSchema.cjs');
7
8
  var walletBookSchema = require('../schemas/walletBookSchema.cjs');
@@ -13,13 +14,13 @@ var walletBookFallbacks = require('../../wallet-book-fallbacks.cjs');
13
14
  const useWalletBookCdn = () => {
14
15
  const [walletBook, setWalletBook] = react.useState({});
15
16
  react.useEffect(() => {
16
- const fetchWalletBook = async () => {
17
+ const fetchWalletBook = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
17
18
  const url = getWalletBookCdnUrl.getWalletBookCdnUrl();
18
19
  let data;
19
20
  try {
20
- const response = await fetch(url);
21
+ const response = yield fetch(url);
21
22
  if (response.ok) {
22
- data = walletBookSchema.walletBookSchema.parse(await response.json());
23
+ data = walletBookSchema.walletBookSchema.parse(yield response.json());
23
24
  }
24
25
  else {
25
26
  throw new Error('Fetch Failed with status: ' + response.status);
@@ -33,7 +34,7 @@ const useWalletBookCdn = () => {
33
34
  data = walletBookSchema.walletBookSchema.parse(walletBookFallbacks["default"]);
34
35
  }
35
36
  setWalletBook(data);
36
- };
37
+ });
37
38
  fetchWalletBook();
38
39
  }, []);
39
40
  return walletBook;
@@ -27,6 +27,9 @@ export declare const useWalletBookCdn: () => {
27
27
  safariId?: string | undefined;
28
28
  universal?: string | undefined;
29
29
  } | undefined;
30
+ eip6963Config?: {
31
+ rdns: string;
32
+ } | undefined;
30
33
  filterFromWalletConnect?: boolean | undefined;
31
34
  group?: string | undefined;
32
35
  injectedConfig?: {
@@ -1,3 +1,4 @@
1
+ import { __awaiter } from '../../_virtual/_tslib.js';
1
2
  import { useState, useEffect } from 'react';
2
3
  import '../schemas/walletConnectSourceSchema.js';
3
4
  import { walletBookSchema } from '../schemas/walletBookSchema.js';
@@ -9,13 +10,13 @@ import walletBookFallbacks from '../../wallet-book-fallbacks.js';
9
10
  const useWalletBookCdn = () => {
10
11
  const [walletBook, setWalletBook] = useState({});
11
12
  useEffect(() => {
12
- const fetchWalletBook = async () => {
13
+ const fetchWalletBook = () => __awaiter(void 0, void 0, void 0, function* () {
13
14
  const url = getWalletBookCdnUrl();
14
15
  let data;
15
16
  try {
16
- const response = await fetch(url);
17
+ const response = yield fetch(url);
17
18
  if (response.ok) {
18
- data = walletBookSchema.parse(await response.json());
19
+ data = walletBookSchema.parse(yield response.json());
19
20
  }
20
21
  else {
21
22
  throw new Error('Fetch Failed with status: ' + response.status);
@@ -29,7 +30,7 @@ const useWalletBookCdn = () => {
29
30
  data = walletBookSchema.parse(walletBookFallbacks);
30
31
  }
31
32
  setWalletBook(data);
32
- };
33
+ });
33
34
  fetchWalletBook();
34
35
  }, []);
35
36
  return walletBook;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const transformAndroidId = (url) => {
6
- if (!url?.match(/^https?:\/\//))
6
+ if (!(url === null || url === void 0 ? void 0 : url.match(/^https?:\/\//)))
7
7
  return url;
8
8
  if (!url)
9
9
  return;
@@ -14,7 +14,7 @@ const transformAndroidId = (url) => {
14
14
  return id;
15
15
  }
16
16
  }
17
- catch {
17
+ catch (_a) {
18
18
  // ignore
19
19
  }
20
20
  return;
@@ -1,5 +1,5 @@
1
1
  const transformAndroidId = (url) => {
2
- if (!url?.match(/^https?:\/\//))
2
+ if (!(url === null || url === void 0 ? void 0 : url.match(/^https?:\/\//)))
3
3
  return url;
4
4
  if (!url)
5
5
  return;
@@ -10,7 +10,7 @@ const transformAndroidId = (url) => {
10
10
  return id;
11
11
  }
12
12
  }
13
- catch {
13
+ catch (_a) {
14
14
  // ignore
15
15
  }
16
16
  return;
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const transformChromeExtensionId = (url) => {
6
- if (url?.match(/^[a-z]{32}$/))
6
+ if (url === null || url === void 0 ? void 0 : url.match(/^[a-z]{32}$/))
7
7
  return url;
8
- if (url?.includes('chrome.google.com/webstore/detail/')) {
8
+ if (url === null || url === void 0 ? void 0 : url.includes('chrome.google.com/webstore/detail/')) {
9
9
  try {
10
10
  const urlObject = new URL(url);
11
11
  return urlObject.pathname.split('/').at(-1);
12
12
  }
13
- catch {
13
+ catch (_a) {
14
14
  // ignore
15
15
  }
16
16
  }
@@ -1,12 +1,12 @@
1
1
  const transformChromeExtensionId = (url) => {
2
- if (url?.match(/^[a-z]{32}$/))
2
+ if (url === null || url === void 0 ? void 0 : url.match(/^[a-z]{32}$/))
3
3
  return url;
4
- if (url?.includes('chrome.google.com/webstore/detail/')) {
4
+ if (url === null || url === void 0 ? void 0 : url.includes('chrome.google.com/webstore/detail/')) {
5
5
  try {
6
6
  const urlObject = new URL(url);
7
7
  return urlObject.pathname.split('/').at(-1);
8
8
  }
9
- catch {
9
+ catch (_a) {
10
10
  // ignore
11
11
  }
12
12
  }
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const transformEdgeExtensionId = (url) => {
6
- if (url?.match(/^[a-z]{32}$/))
6
+ if (url === null || url === void 0 ? void 0 : url.match(/^[a-z]{32}$/))
7
7
  return url;
8
- if (url?.includes('microsoftedge.microsoft.com/addons/detail/')) {
8
+ if (url === null || url === void 0 ? void 0 : url.includes('microsoftedge.microsoft.com/addons/detail/')) {
9
9
  try {
10
10
  const urlObject = new URL(url);
11
11
  return urlObject.pathname.split('/').at(-1);
12
12
  }
13
- catch {
13
+ catch (_a) {
14
14
  // ignore
15
15
  }
16
16
  }
@@ -1,12 +1,12 @@
1
1
  const transformEdgeExtensionId = (url) => {
2
- if (url?.match(/^[a-z]{32}$/))
2
+ if (url === null || url === void 0 ? void 0 : url.match(/^[a-z]{32}$/))
3
3
  return url;
4
- if (url?.includes('microsoftedge.microsoft.com/addons/detail/')) {
4
+ if (url === null || url === void 0 ? void 0 : url.includes('microsoftedge.microsoft.com/addons/detail/')) {
5
5
  try {
6
6
  const urlObject = new URL(url);
7
7
  return urlObject.pathname.split('/').at(-1);
8
8
  }
9
- catch {
9
+ catch (_a) {
10
10
  // ignore
11
11
  }
12
12
  }
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const transformFirefoxExtensionId = (url) => {
6
- if (!url?.match(/^https?:\/\//))
6
+ if (!(url === null || url === void 0 ? void 0 : url.match(/^https?:\/\//)))
7
7
  return url;
8
- if (url?.includes('addons.mozilla.org')) {
8
+ if (url === null || url === void 0 ? void 0 : url.includes('addons.mozilla.org')) {
9
9
  try {
10
10
  const urlObject = new URL(url);
11
11
  return urlObject.pathname.replace(/\/$/, '').split('/').at(-1);
12
12
  }
13
- catch {
13
+ catch (_a) {
14
14
  // ignore
15
15
  }
16
16
  }
@@ -1,12 +1,12 @@
1
1
  const transformFirefoxExtensionId = (url) => {
2
- if (!url?.match(/^https?:\/\//))
2
+ if (!(url === null || url === void 0 ? void 0 : url.match(/^https?:\/\//)))
3
3
  return url;
4
- if (url?.includes('addons.mozilla.org')) {
4
+ if (url === null || url === void 0 ? void 0 : url.includes('addons.mozilla.org')) {
5
5
  try {
6
6
  const urlObject = new URL(url);
7
7
  return urlObject.pathname.replace(/\/$/, '').split('/').at(-1);
8
8
  }
9
- catch {
9
+ catch (_a) {
10
10
  // ignore
11
11
  }
12
12
  }
@@ -4,20 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const idRegex = /^id[0-9]{1,36}$/;
6
6
  const transformIosId = (url) => {
7
- if (url?.match(idRegex))
7
+ if (url === null || url === void 0 ? void 0 : url.match(idRegex))
8
8
  return url;
9
- if (url?.match(/^https:\/\/[a-zA-Z0-9-]+\.apple\.com/)) {
9
+ if (url === null || url === void 0 ? void 0 : url.match(/^https:\/\/[a-zA-Z0-9-]+\.apple\.com/)) {
10
10
  try {
11
11
  const urlObject = new URL(url);
12
12
  const expectedId = urlObject.pathname
13
13
  .replace(/\/$/, '')
14
14
  .split('/')
15
15
  .at(-1);
16
- if (expectedId?.match(idRegex)) {
16
+ if (expectedId === null || expectedId === void 0 ? void 0 : expectedId.match(idRegex)) {
17
17
  return expectedId;
18
18
  }
19
19
  }
20
- catch {
20
+ catch (_a) {
21
21
  // ignore
22
22
  }
23
23
  }
@@ -1,19 +1,19 @@
1
1
  const idRegex = /^id[0-9]{1,36}$/;
2
2
  const transformIosId = (url) => {
3
- if (url?.match(idRegex))
3
+ if (url === null || url === void 0 ? void 0 : url.match(idRegex))
4
4
  return url;
5
- if (url?.match(/^https:\/\/[a-zA-Z0-9-]+\.apple\.com/)) {
5
+ if (url === null || url === void 0 ? void 0 : url.match(/^https:\/\/[a-zA-Z0-9-]+\.apple\.com/)) {
6
6
  try {
7
7
  const urlObject = new URL(url);
8
8
  const expectedId = urlObject.pathname
9
9
  .replace(/\/$/, '')
10
10
  .split('/')
11
11
  .at(-1);
12
- if (expectedId?.match(idRegex)) {
12
+ if (expectedId === null || expectedId === void 0 ? void 0 : expectedId.match(idRegex)) {
13
13
  return expectedId;
14
14
  }
15
15
  }
16
- catch {
16
+ catch (_a) {
17
17
  // ignore
18
18
  }
19
19
  }
@@ -68,6 +68,13 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
68
68
  safariId?: unknown;
69
69
  universal?: unknown;
70
70
  } | undefined>;
71
+ eip6963Config: z.ZodOptional<z.ZodObject<{
72
+ rdns: z.ZodString;
73
+ }, "strip", z.ZodTypeAny, {
74
+ rdns: string;
75
+ }, {
76
+ rdns: string;
77
+ }>>;
71
78
  filterFromWalletConnect: z.ZodOptional<z.ZodBoolean>;
72
79
  group: z.ZodOptional<z.ZodString>;
73
80
  injectedConfig: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -167,6 +174,9 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
167
174
  safariId?: string | undefined;
168
175
  universal?: string | undefined;
169
176
  } | undefined;
177
+ eip6963Config?: {
178
+ rdns: string;
179
+ } | undefined;
170
180
  filterFromWalletConnect?: boolean | undefined;
171
181
  group?: string | undefined;
172
182
  injectedConfig?: {
@@ -209,6 +219,9 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
209
219
  safariId?: unknown;
210
220
  universal?: unknown;
211
221
  } | undefined;
222
+ eip6963Config?: {
223
+ rdns: string;
224
+ } | undefined;
212
225
  filterFromWalletConnect?: boolean | undefined;
213
226
  group?: string | undefined;
214
227
  injectedConfig?: {
@@ -251,6 +264,9 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
251
264
  safariId?: string | undefined;
252
265
  universal?: string | undefined;
253
266
  } | undefined;
267
+ eip6963Config?: {
268
+ rdns: string;
269
+ } | undefined;
254
270
  filterFromWalletConnect?: boolean | undefined;
255
271
  group?: string | undefined;
256
272
  injectedConfig?: {
@@ -293,6 +309,9 @@ export declare const walletRecordsSchema: z.ZodRecord<z.ZodString, z.ZodEffects<
293
309
  safariId?: string | undefined;
294
310
  universal?: string | undefined;
295
311
  } | undefined;
312
+ eip6963Config?: {
313
+ rdns: string;
314
+ } | undefined;
296
315
  filterFromWalletConnect?: boolean | undefined;
297
316
  group?: string | undefined;
298
317
  injectedConfig?: {
@@ -436,6 +455,13 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
436
455
  safariId?: unknown;
437
456
  universal?: unknown;
438
457
  } | undefined>;
458
+ eip6963Config: z.ZodOptional<z.ZodObject<{
459
+ rdns: z.ZodString;
460
+ }, "strip", z.ZodTypeAny, {
461
+ rdns: string;
462
+ }, {
463
+ rdns: string;
464
+ }>>;
439
465
  filterFromWalletConnect: z.ZodOptional<z.ZodBoolean>;
440
466
  group: z.ZodOptional<z.ZodString>;
441
467
  injectedConfig: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -535,6 +561,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
535
561
  safariId?: string | undefined;
536
562
  universal?: string | undefined;
537
563
  } | undefined;
564
+ eip6963Config?: {
565
+ rdns: string;
566
+ } | undefined;
538
567
  filterFromWalletConnect?: boolean | undefined;
539
568
  group?: string | undefined;
540
569
  injectedConfig?: {
@@ -577,6 +606,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
577
606
  safariId?: unknown;
578
607
  universal?: unknown;
579
608
  } | undefined;
609
+ eip6963Config?: {
610
+ rdns: string;
611
+ } | undefined;
580
612
  filterFromWalletConnect?: boolean | undefined;
581
613
  group?: string | undefined;
582
614
  injectedConfig?: {
@@ -619,6 +651,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
619
651
  safariId?: string | undefined;
620
652
  universal?: string | undefined;
621
653
  } | undefined;
654
+ eip6963Config?: {
655
+ rdns: string;
656
+ } | undefined;
622
657
  filterFromWalletConnect?: boolean | undefined;
623
658
  group?: string | undefined;
624
659
  injectedConfig?: {
@@ -661,6 +696,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
661
696
  safariId?: string | undefined;
662
697
  universal?: string | undefined;
663
698
  } | undefined;
699
+ eip6963Config?: {
700
+ rdns: string;
701
+ } | undefined;
664
702
  filterFromWalletConnect?: boolean | undefined;
665
703
  group?: string | undefined;
666
704
  injectedConfig?: {
@@ -715,6 +753,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
715
753
  safariId?: string | undefined;
716
754
  universal?: string | undefined;
717
755
  } | undefined;
756
+ eip6963Config?: {
757
+ rdns: string;
758
+ } | undefined;
718
759
  filterFromWalletConnect?: boolean | undefined;
719
760
  group?: string | undefined;
720
761
  injectedConfig?: {
@@ -781,6 +822,9 @@ export declare const walletBookSchema: z.ZodEffects<z.ZodObject<{
781
822
  safariId?: string | undefined;
782
823
  universal?: string | undefined;
783
824
  } | undefined;
825
+ eip6963Config?: {
826
+ rdns: string;
827
+ } | undefined;
784
828
  filterFromWalletConnect?: boolean | undefined;
785
829
  group?: string | undefined;
786
830
  injectedConfig?: {
@@ -67,6 +67,7 @@ const walletSchema = zod.z
67
67
  })
68
68
  .optional()
69
69
  .transform(filterEmptyObject.filterEmptyObject),
70
+ eip6963Config: zod.z.object({ rdns: zod.z.string() }).optional(),
70
71
  filterFromWalletConnect: zod.z.boolean().optional(),
71
72
  group: zod.z.string().optional(),
72
73
  injectedConfig: zod.z.array(injectedConfigSchema).optional(),
@@ -93,11 +94,12 @@ const walletSchema = zod.z
93
94
  .transform(filterEmptyObject.filterEmptyObject),
94
95
  }))
95
96
  .transform((val) => {
96
- if (val.mobile?.iosId || val.mobile?.ios === null) {
97
- delete val.mobile?.ios;
97
+ var _a, _b, _c, _d, _e, _f;
98
+ if (((_a = val.mobile) === null || _a === void 0 ? void 0 : _a.iosId) || ((_b = val.mobile) === null || _b === void 0 ? void 0 : _b.ios) === null) {
99
+ (_c = val.mobile) === null || _c === void 0 ? true : delete _c.ios;
98
100
  }
99
- if (val.mobile?.androidId || val.mobile?.android === null) {
100
- delete val.mobile?.android;
101
+ if (((_d = val.mobile) === null || _d === void 0 ? void 0 : _d.androidId) || ((_e = val.mobile) === null || _e === void 0 ? void 0 : _e.android) === null) {
102
+ (_f = val.mobile) === null || _f === void 0 ? true : delete _f.android;
101
103
  }
102
104
  return val;
103
105
  });
@@ -96,6 +96,13 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
96
96
  safariId?: unknown;
97
97
  universal?: unknown;
98
98
  } | undefined>;
99
+ eip6963Config: z.ZodOptional<z.ZodObject<{
100
+ rdns: z.ZodString;
101
+ }, "strip", z.ZodTypeAny, {
102
+ rdns: string;
103
+ }, {
104
+ rdns: string;
105
+ }>>;
99
106
  filterFromWalletConnect: z.ZodOptional<z.ZodBoolean>;
100
107
  group: z.ZodOptional<z.ZodString>;
101
108
  injectedConfig: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -195,6 +202,9 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
195
202
  safariId?: string | undefined;
196
203
  universal?: string | undefined;
197
204
  } | undefined;
205
+ eip6963Config?: {
206
+ rdns: string;
207
+ } | undefined;
198
208
  filterFromWalletConnect?: boolean | undefined;
199
209
  group?: string | undefined;
200
210
  injectedConfig?: {
@@ -237,6 +247,9 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
237
247
  safariId?: unknown;
238
248
  universal?: unknown;
239
249
  } | undefined;
250
+ eip6963Config?: {
251
+ rdns: string;
252
+ } | undefined;
240
253
  filterFromWalletConnect?: boolean | undefined;
241
254
  group?: string | undefined;
242
255
  injectedConfig?: {
@@ -279,6 +292,9 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
279
292
  safariId?: string | undefined;
280
293
  universal?: string | undefined;
281
294
  } | undefined;
295
+ eip6963Config?: {
296
+ rdns: string;
297
+ } | undefined;
282
298
  filterFromWalletConnect?: boolean | undefined;
283
299
  group?: string | undefined;
284
300
  injectedConfig?: {
@@ -321,6 +337,9 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
321
337
  safariId?: string | undefined;
322
338
  universal?: string | undefined;
323
339
  } | undefined;
340
+ eip6963Config?: {
341
+ rdns: string;
342
+ } | undefined;
324
343
  filterFromWalletConnect?: boolean | undefined;
325
344
  group?: string | undefined;
326
345
  injectedConfig?: {
@@ -63,6 +63,7 @@ const walletSchema = z
63
63
  })
64
64
  .optional()
65
65
  .transform(filterEmptyObject),
66
+ eip6963Config: z.object({ rdns: z.string() }).optional(),
66
67
  filterFromWalletConnect: z.boolean().optional(),
67
68
  group: z.string().optional(),
68
69
  injectedConfig: z.array(injectedConfigSchema).optional(),
@@ -89,11 +90,12 @@ const walletSchema = z
89
90
  .transform(filterEmptyObject),
90
91
  }))
91
92
  .transform((val) => {
92
- if (val.mobile?.iosId || val.mobile?.ios === null) {
93
- delete val.mobile?.ios;
93
+ var _a, _b, _c, _d, _e, _f;
94
+ if (((_a = val.mobile) === null || _a === void 0 ? void 0 : _a.iosId) || ((_b = val.mobile) === null || _b === void 0 ? void 0 : _b.ios) === null) {
95
+ (_c = val.mobile) === null || _c === void 0 ? true : delete _c.ios;
94
96
  }
95
- if (val.mobile?.androidId || val.mobile?.android === null) {
96
- delete val.mobile?.android;
97
+ if (((_d = val.mobile) === null || _d === void 0 ? void 0 : _d.androidId) || ((_e = val.mobile) === null || _e === void 0 ? void 0 : _e.android) === null) {
98
+ (_f = val.mobile) === null || _f === void 0 ? true : delete _f.android;
97
99
  }
98
100
  return val;
99
101
  });
@@ -38,6 +38,14 @@ var groups = {
38
38
  key: "exodus",
39
39
  name: "Exodus"
40
40
  },
41
+ magiceden: {
42
+ brand: {
43
+ alt: "Magic Eden",
44
+ spriteId: "magiceden"
45
+ },
46
+ key: "magiceden",
47
+ name: "Magic Eden"
48
+ },
41
49
  phantom: {
42
50
  brand: {
43
51
  alt: "Phantom",
@@ -63,6 +71,9 @@ var wallets = {
63
71
  edgeId: "ejbalbakoplchlghecdalmeeeajnimhm",
64
72
  firefoxId: "ether-metamask"
65
73
  },
74
+ eip6963Config: {
75
+ rdns: "io.metamask"
76
+ },
66
77
  filterFromWalletConnect: true,
67
78
  injectedConfig: [
68
79
  {
@@ -119,6 +130,10 @@ var wallets = {
119
130
  {
120
131
  flag: "isAvalanche",
121
132
  value: false
133
+ },
134
+ {
135
+ flag: "isMagicEden",
136
+ value: false
122
137
  }
123
138
  ]
124
139
  }
@@ -147,6 +162,9 @@ var wallets = {
147
162
  desktop: {
148
163
  chromeId: "hnfanknocfeofbddgcijnmhnfnkdnaad"
149
164
  },
165
+ eip6963Config: {
166
+ rdns: "com.coinbase"
167
+ },
150
168
  group: "coinbase",
151
169
  mobile: {
152
170
  androidId: "org.toshi",
@@ -384,6 +402,42 @@ var wallets = {
384
402
  spriteId: "magiclink"
385
403
  },
386
404
  name: "Magic Social"
405
+ },
406
+ magiceden: {
407
+ brand: {
408
+ alt: "Magic Eden",
409
+ spriteId: "magiceden"
410
+ },
411
+ desktop: {
412
+ chromeId: "mkpegjkblkkefacfnmkajcjmabijhclg"
413
+ },
414
+ group: "magiceden",
415
+ injectedConfig: [
416
+ {
417
+ chain: "evm",
418
+ extensionLocators: [
419
+ {
420
+ flag: "isMagicEden",
421
+ value: true
422
+ }
423
+ ],
424
+ windowLocations: [
425
+ "magicEden.ethereum"
426
+ ]
427
+ }
428
+ ],
429
+ name: "Magic Eden"
430
+ },
431
+ magicedensol: {
432
+ brand: {
433
+ alt: "Magic Eden",
434
+ spriteId: "magiceden"
435
+ },
436
+ desktop: {
437
+ chromeId: "mkpegjkblkkefacfnmkajcjmabijhclg"
438
+ },
439
+ group: "magiceden",
440
+ name: "Magic Eden (Solana)"
387
441
  }
388
442
  };
389
443
  var walletBookFallbacks = {
@@ -34,6 +34,14 @@ var groups = {
34
34
  key: "exodus",
35
35
  name: "Exodus"
36
36
  },
37
+ magiceden: {
38
+ brand: {
39
+ alt: "Magic Eden",
40
+ spriteId: "magiceden"
41
+ },
42
+ key: "magiceden",
43
+ name: "Magic Eden"
44
+ },
37
45
  phantom: {
38
46
  brand: {
39
47
  alt: "Phantom",
@@ -59,6 +67,9 @@ var wallets = {
59
67
  edgeId: "ejbalbakoplchlghecdalmeeeajnimhm",
60
68
  firefoxId: "ether-metamask"
61
69
  },
70
+ eip6963Config: {
71
+ rdns: "io.metamask"
72
+ },
62
73
  filterFromWalletConnect: true,
63
74
  injectedConfig: [
64
75
  {
@@ -115,6 +126,10 @@ var wallets = {
115
126
  {
116
127
  flag: "isAvalanche",
117
128
  value: false
129
+ },
130
+ {
131
+ flag: "isMagicEden",
132
+ value: false
118
133
  }
119
134
  ]
120
135
  }
@@ -143,6 +158,9 @@ var wallets = {
143
158
  desktop: {
144
159
  chromeId: "hnfanknocfeofbddgcijnmhnfnkdnaad"
145
160
  },
161
+ eip6963Config: {
162
+ rdns: "com.coinbase"
163
+ },
146
164
  group: "coinbase",
147
165
  mobile: {
148
166
  androidId: "org.toshi",
@@ -380,6 +398,42 @@ var wallets = {
380
398
  spriteId: "magiclink"
381
399
  },
382
400
  name: "Magic Social"
401
+ },
402
+ magiceden: {
403
+ brand: {
404
+ alt: "Magic Eden",
405
+ spriteId: "magiceden"
406
+ },
407
+ desktop: {
408
+ chromeId: "mkpegjkblkkefacfnmkajcjmabijhclg"
409
+ },
410
+ group: "magiceden",
411
+ injectedConfig: [
412
+ {
413
+ chain: "evm",
414
+ extensionLocators: [
415
+ {
416
+ flag: "isMagicEden",
417
+ value: true
418
+ }
419
+ ],
420
+ windowLocations: [
421
+ "magicEden.ethereum"
422
+ ]
423
+ }
424
+ ],
425
+ name: "Magic Eden"
426
+ },
427
+ magicedensol: {
428
+ brand: {
429
+ alt: "Magic Eden",
430
+ spriteId: "magiceden"
431
+ },
432
+ desktop: {
433
+ chromeId: "mkpegjkblkkefacfnmkajcjmabijhclg"
434
+ },
435
+ group: "magiceden",
436
+ name: "Magic Eden (Solana)"
383
437
  }
384
438
  };
385
439
  var walletBookFallbacks = {