@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,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 };