@dynamic-labs/wallet-book 4.0.0-alpha.5 → 4.0.0-alpha.51

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 (42) hide show
  1. package/CHANGELOG.md +468 -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 +15 -7
  8. package/src/components/WalletIcon.d.ts +278 -3
  9. package/src/components/WalletIcon.js +17 -9
  10. package/src/helpers/getWalletBookWallet.d.ts +1 -1
  11. package/src/helpers/getWalletIconData.cjs +39 -0
  12. package/src/helpers/getWalletIconData.d.ts +5 -0
  13. package/src/helpers/getWalletIconData.js +35 -0
  14. package/src/helpers/index.d.ts +2 -4
  15. package/src/helpers/isWalletBookPopulated.cjs +8 -0
  16. package/src/helpers/isWalletBookPopulated.d.ts +2 -0
  17. package/src/helpers/isWalletBookPopulated.js +4 -0
  18. package/src/hooks/fetchWalletBook/fetchWalletBook.cjs +48 -0
  19. package/src/hooks/fetchWalletBook/fetchWalletBook.d.ts +97 -0
  20. package/src/hooks/fetchWalletBook/fetchWalletBook.js +38 -0
  21. package/src/hooks/fetchWalletBook/index.d.ts +1 -0
  22. package/src/hooks/useWalletBookCdn.cjs +22 -38
  23. package/src/hooks/useWalletBookCdn.js +22 -38
  24. package/src/index.cjs +9 -11
  25. package/src/index.d.ts +1 -2
  26. package/src/index.js +7 -6
  27. package/wallet-book-fallbacks.cjs +154 -8
  28. package/wallet-book-fallbacks.js +154 -8
  29. package/src/helpers/getWalletLinks.cjs +0 -34
  30. package/src/helpers/getWalletLinks.d.ts +0 -10
  31. package/src/helpers/getWalletLinks.js +0 -30
  32. package/src/helpers/getWalletPrimaryColor.cjs +0 -14
  33. package/src/helpers/getWalletPrimaryColor.d.ts +0 -2
  34. package/src/helpers/getWalletPrimaryColor.js +0 -10
  35. package/src/helpers/isWalletEventSupported.cjs +0 -8
  36. package/src/helpers/isWalletEventSupported.d.ts +0 -2
  37. package/src/helpers/isWalletEventSupported.js +0 -4
  38. package/src/helpers/isWalletMethodSupported.cjs +0 -8
  39. package/src/helpers/isWalletMethodSupported.d.ts +0 -2
  40. package/src/helpers/isWalletMethodSupported.js +0 -4
  41. package/src/schemas/walletConnectSourceSchema.cjs +0 -78
  42. package/src/schemas/walletConnectSourceSchema.js +0 -74
@@ -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",
@@ -113,7 +147,7 @@ var groups = {
113
147
  onekey: {
114
148
  brand: {
115
149
  alt: "OneKey Wallet",
116
- spriteId: "12bebb3f-8030-4892-8452-c60a6bac1500"
150
+ spriteId: "onekey"
117
151
  },
118
152
  key: "onekey",
119
153
  name: "OneKey"
@@ -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: [
@@ -1114,7 +1175,7 @@ var wallets = {
1114
1175
  iosId: "id1327268470",
1115
1176
  native: "okex://main/wc"
1116
1177
  },
1117
- name: "OKX",
1178
+ name: "OKX Wallet",
1118
1179
  shortName: "OKX Wallet",
1119
1180
  walletConnect: {
1120
1181
  sdks: [
@@ -1191,7 +1252,7 @@ var wallets = {
1191
1252
  inAppBrowser: "okx://wallet/dapp/url?dappUrl={{encodedDappURI}}",
1192
1253
  iosId: "id1327268470"
1193
1254
  },
1194
- name: "OKX",
1255
+ name: "OKX Wallet",
1195
1256
  shortName: "OKX Wallet (Bitcoin)",
1196
1257
  walletLimitations: {
1197
1258
  browserExtension: {
@@ -1223,7 +1284,7 @@ var wallets = {
1223
1284
  },
1224
1285
  unknown: {
1225
1286
  brand: {
1226
- spriteId: "captcha-wave"
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: "captcha-wave"
1346
+ spriteId: "unknown-wallet"
1289
1347
  },
1290
1348
  mobile: {
1291
1349
  androidId: "enable-android",
@@ -1299,6 +1357,94 @@ 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
+ onekeybtc: {
1410
+ brand: {
1411
+ alt: "OneKey Wallet",
1412
+ spriteId: "onekey"
1413
+ },
1414
+ chainGroup: "onekey",
1415
+ desktop: {
1416
+ chromeId: "jnmbobjmhlngoefaiojfljckilhhlhcj"
1417
+ },
1418
+ group: "onekey",
1419
+ injectedConfig: [
1420
+ {
1421
+ chain: "btc",
1422
+ extensionLocators: [
1423
+ ],
1424
+ windowLocations: [
1425
+ "$onekey.btc"
1426
+ ]
1427
+ }
1428
+ ],
1429
+ mobile: {
1430
+ androidId: "so.onekey.app.wallet",
1431
+ iosId: "id1609559473"
1432
+ },
1433
+ name: "OneKey"
1434
+ },
1435
+ intersend: {
1436
+ brand: {
1437
+ alt: "Intersend",
1438
+ spriteId: "intersend"
1439
+ },
1440
+ injectedConfig: [
1441
+ {
1442
+ chain: "evm",
1443
+ extensionLocators: [
1444
+ ]
1445
+ }
1446
+ ],
1447
+ name: "Intersend"
1302
1448
  }
1303
1449
  };
1304
1450
  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;
@@ -1,4 +0,0 @@
1
- 'use client'
2
- 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)); };
3
-
4
- export { isWalletMethodSupported };
@@ -1,78 +0,0 @@
1
- 'use client'
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var zod = require('zod');
7
-
8
- const walletConnectSourceValueSchema = zod.z
9
- .object({
10
- app: zod.z.object({
11
- android: zod.z.string().nullable(),
12
- browser: zod.z.string().nullable(),
13
- chrome: zod.z.string().nullable(),
14
- edge: zod.z.string().nullable(),
15
- firefox: zod.z.string().nullable(),
16
- ios: zod.z.string().nullable(),
17
- linux: zod.z.string().nullable(),
18
- mac: zod.z.string().nullable(),
19
- opera: zod.z.string().nullable(),
20
- safari: zod.z.string().nullable(),
21
- windows: zod.z.string().nullable(),
22
- }),
23
- app_type: zod.z.string(),
24
- category: zod.z.string().nullable(),
25
- chains: zod.z.array(zod.z.string()),
26
- description: zod.z.string().nullable(),
27
- desktop: zod.z.object({
28
- native: zod.z.string().nullable(),
29
- universal: zod.z.string().nullable(),
30
- }),
31
- homepage: zod.z.string(),
32
- id: zod.z.string(),
33
- image_id: zod.z.string(),
34
- image_url: zod.z.object({
35
- lg: zod.z.string(),
36
- md: zod.z.string(),
37
- sm: zod.z.string(),
38
- }),
39
- injected: zod.z
40
- .array(zod.z.object({
41
- injected_id: zod.z.string(),
42
- namespace: zod.z.string(),
43
- }))
44
- .nullable(),
45
- metadata: zod.z.object({
46
- colors: zod.z.object({
47
- primary: zod.z.string().nullable(),
48
- secondary: zod.z.string().nullable(),
49
- }),
50
- shortName: zod.z.string().nullable(),
51
- }),
52
- mobile: zod.z.object({
53
- native: zod.z.string().nullable(),
54
- universal: zod.z.string().nullable(),
55
- }),
56
- name: zod.z.string(),
57
- rdns: zod.z.string().nullable(),
58
- sdks: zod.z.array(zod.z.string()),
59
- slug: zod.z.string(),
60
- supported_standards: zod.z
61
- .array(zod.z.object({
62
- id: zod.z.string(),
63
- standard_id: zod.z.number(),
64
- standard_prefix: zod.z.string(),
65
- title: zod.z.string(),
66
- url: zod.z.string(),
67
- }))
68
- .optional(),
69
- updatedAt: zod.z.string(),
70
- versions: zod.z.array(zod.z.string()),
71
- })
72
- .strict();
73
- /**
74
- * Validates the walletconnect.json file to ensure it is in the correct format
75
- */
76
- zod.z.record(zod.z.string(), walletConnectSourceValueSchema);
77
-
78
- exports.walletConnectSourceValueSchema = walletConnectSourceValueSchema;
@@ -1,74 +0,0 @@
1
- 'use client'
2
- import { z } from 'zod';
3
-
4
- const walletConnectSourceValueSchema = z
5
- .object({
6
- app: z.object({
7
- android: z.string().nullable(),
8
- browser: z.string().nullable(),
9
- chrome: z.string().nullable(),
10
- edge: z.string().nullable(),
11
- firefox: z.string().nullable(),
12
- ios: z.string().nullable(),
13
- linux: z.string().nullable(),
14
- mac: z.string().nullable(),
15
- opera: z.string().nullable(),
16
- safari: z.string().nullable(),
17
- windows: z.string().nullable(),
18
- }),
19
- app_type: z.string(),
20
- category: z.string().nullable(),
21
- chains: z.array(z.string()),
22
- description: z.string().nullable(),
23
- desktop: z.object({
24
- native: z.string().nullable(),
25
- universal: z.string().nullable(),
26
- }),
27
- homepage: z.string(),
28
- id: z.string(),
29
- image_id: z.string(),
30
- image_url: z.object({
31
- lg: z.string(),
32
- md: z.string(),
33
- sm: z.string(),
34
- }),
35
- injected: z
36
- .array(z.object({
37
- injected_id: z.string(),
38
- namespace: z.string(),
39
- }))
40
- .nullable(),
41
- metadata: z.object({
42
- colors: z.object({
43
- primary: z.string().nullable(),
44
- secondary: z.string().nullable(),
45
- }),
46
- shortName: z.string().nullable(),
47
- }),
48
- mobile: z.object({
49
- native: z.string().nullable(),
50
- universal: z.string().nullable(),
51
- }),
52
- name: z.string(),
53
- rdns: z.string().nullable(),
54
- sdks: z.array(z.string()),
55
- slug: z.string(),
56
- supported_standards: z
57
- .array(z.object({
58
- id: z.string(),
59
- standard_id: z.number(),
60
- standard_prefix: z.string(),
61
- title: z.string(),
62
- url: z.string(),
63
- }))
64
- .optional(),
65
- updatedAt: z.string(),
66
- versions: z.array(z.string()),
67
- })
68
- .strict();
69
- /**
70
- * Validates the walletconnect.json file to ensure it is in the correct format
71
- */
72
- z.record(z.string(), walletConnectSourceValueSchema);
73
-
74
- export { walletConnectSourceValueSchema };