@farcaster/frame-core 0.1.10 → 0.3.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 (142) hide show
  1. package/dist/index.d.ts +153 -10
  2. package/dist/index.js +18 -33
  3. package/esm/index.d.ts +153 -10
  4. package/esm/index.js +17 -10
  5. package/esm/tsconfig.tsbuildinfo +1 -1
  6. package/package.json +6 -8
  7. package/src/index.ts +50 -10
  8. package/dist/actions/AddMiniApp.d.ts +0 -36
  9. package/dist/actions/AddMiniApp.js +0 -57
  10. package/dist/actions/ComposeCast.d.ts +0 -37
  11. package/dist/actions/ComposeCast.js +0 -2
  12. package/dist/actions/Haptics.d.ts +0 -5
  13. package/dist/actions/Haptics.js +0 -2
  14. package/dist/actions/Ready.d.ts +0 -13
  15. package/dist/actions/Ready.js +0 -6
  16. package/dist/actions/SendToken.d.ts +0 -48
  17. package/dist/actions/SendToken.js +0 -2
  18. package/dist/actions/SignIn.d.ts +0 -55
  19. package/dist/actions/SignIn.js +0 -47
  20. package/dist/actions/SwapToken.d.ts +0 -46
  21. package/dist/actions/SwapToken.js +0 -2
  22. package/dist/actions/ViewCast.d.ts +0 -25
  23. package/dist/actions/ViewCast.js +0 -2
  24. package/dist/actions/ViewProfile.d.ts +0 -4
  25. package/dist/actions/ViewProfile.js +0 -2
  26. package/dist/actions/ViewToken.d.ts +0 -4
  27. package/dist/actions/ViewToken.js +0 -2
  28. package/dist/actions/index.d.ts +0 -10
  29. package/dist/actions/index.js +0 -46
  30. package/dist/back.d.ts +0 -13
  31. package/dist/back.js +0 -6
  32. package/dist/context.d.ts +0 -94
  33. package/dist/context.js +0 -2
  34. package/dist/errors.d.ts +0 -13
  35. package/dist/errors.js +0 -12
  36. package/dist/internal/types.d.ts +0 -8
  37. package/dist/internal/types.js +0 -2
  38. package/dist/manifest.d.ts +0 -101
  39. package/dist/manifest.js +0 -2
  40. package/dist/schemas/embeds.d.ts +0 -243
  41. package/dist/schemas/embeds.js +0 -32
  42. package/dist/schemas/events.d.ts +0 -131
  43. package/dist/schemas/events.js +0 -25
  44. package/dist/schemas/index.d.ts +0 -5
  45. package/dist/schemas/index.js +0 -21
  46. package/dist/schemas/manifest.d.ts +0 -334
  47. package/dist/schemas/manifest.js +0 -112
  48. package/dist/schemas/notifications.d.ts +0 -60
  49. package/dist/schemas/notifications.js +0 -23
  50. package/dist/schemas/shared.d.ts +0 -39
  51. package/dist/schemas/shared.js +0 -58
  52. package/dist/solana.d.ts +0 -72
  53. package/dist/solana.js +0 -15
  54. package/dist/solanaWire.d.ts +0 -3
  55. package/dist/solanaWire.js +0 -84
  56. package/dist/types.d.ts +0 -87
  57. package/dist/types.js +0 -41
  58. package/dist/wallet/ethereum.d.ts +0 -47
  59. package/dist/wallet/ethereum.js +0 -2
  60. package/dist/wallet/index.d.ts +0 -1
  61. package/dist/wallet/index.js +0 -37
  62. package/esm/actions/AddMiniApp.d.ts +0 -36
  63. package/esm/actions/AddMiniApp.js +0 -19
  64. package/esm/actions/ComposeCast.d.ts +0 -37
  65. package/esm/actions/ComposeCast.js +0 -1
  66. package/esm/actions/Haptics.d.ts +0 -5
  67. package/esm/actions/Haptics.js +0 -1
  68. package/esm/actions/Ready.d.ts +0 -13
  69. package/esm/actions/Ready.js +0 -3
  70. package/esm/actions/SendToken.d.ts +0 -48
  71. package/esm/actions/SendToken.js +0 -1
  72. package/esm/actions/SignIn.d.ts +0 -55
  73. package/esm/actions/SignIn.js +0 -10
  74. package/esm/actions/SwapToken.d.ts +0 -46
  75. package/esm/actions/SwapToken.js +0 -1
  76. package/esm/actions/ViewCast.d.ts +0 -25
  77. package/esm/actions/ViewCast.js +0 -1
  78. package/esm/actions/ViewProfile.d.ts +0 -4
  79. package/esm/actions/ViewProfile.js +0 -1
  80. package/esm/actions/ViewToken.d.ts +0 -4
  81. package/esm/actions/ViewToken.js +0 -1
  82. package/esm/actions/index.d.ts +0 -10
  83. package/esm/actions/index.js +0 -10
  84. package/esm/back.d.ts +0 -13
  85. package/esm/back.js +0 -3
  86. package/esm/context.d.ts +0 -94
  87. package/esm/context.js +0 -1
  88. package/esm/errors.d.ts +0 -13
  89. package/esm/errors.js +0 -8
  90. package/esm/internal/types.d.ts +0 -8
  91. package/esm/internal/types.js +0 -1
  92. package/esm/manifest.d.ts +0 -101
  93. package/esm/manifest.js +0 -1
  94. package/esm/schemas/embeds.d.ts +0 -243
  95. package/esm/schemas/embeds.js +0 -28
  96. package/esm/schemas/events.d.ts +0 -131
  97. package/esm/schemas/events.js +0 -22
  98. package/esm/schemas/index.d.ts +0 -5
  99. package/esm/schemas/index.js +0 -5
  100. package/esm/schemas/manifest.d.ts +0 -334
  101. package/esm/schemas/manifest.js +0 -109
  102. package/esm/schemas/notifications.d.ts +0 -60
  103. package/esm/schemas/notifications.js +0 -20
  104. package/esm/schemas/shared.d.ts +0 -39
  105. package/esm/schemas/shared.js +0 -54
  106. package/esm/solana.d.ts +0 -72
  107. package/esm/solana.js +0 -11
  108. package/esm/solanaWire.d.ts +0 -3
  109. package/esm/solanaWire.js +0 -80
  110. package/esm/types.d.ts +0 -87
  111. package/esm/types.js +0 -23
  112. package/esm/wallet/ethereum.d.ts +0 -47
  113. package/esm/wallet/ethereum.js +0 -1
  114. package/esm/wallet/index.d.ts +0 -1
  115. package/esm/wallet/index.js +0 -1
  116. package/src/actions/AddMiniApp.ts +0 -51
  117. package/src/actions/ComposeCast.ts +0 -44
  118. package/src/actions/Haptics.ts +0 -9
  119. package/src/actions/Ready.ts +0 -15
  120. package/src/actions/SendToken.ts +0 -57
  121. package/src/actions/SignIn.ts +0 -67
  122. package/src/actions/SwapToken.ts +0 -54
  123. package/src/actions/ViewCast.ts +0 -27
  124. package/src/actions/ViewProfile.ts +0 -5
  125. package/src/actions/ViewToken.ts +0 -5
  126. package/src/actions/index.ts +0 -10
  127. package/src/back.ts +0 -15
  128. package/src/context.ts +0 -117
  129. package/src/errors.ts +0 -21
  130. package/src/internal/types.ts +0 -20
  131. package/src/manifest.ts +0 -113
  132. package/src/schemas/embeds.ts +0 -44
  133. package/src/schemas/events.ts +0 -41
  134. package/src/schemas/index.ts +0 -5
  135. package/src/schemas/manifest.ts +0 -122
  136. package/src/schemas/notifications.ts +0 -33
  137. package/src/schemas/shared.ts +0 -81
  138. package/src/solana.ts +0 -108
  139. package/src/solanaWire.ts +0 -120
  140. package/src/types.ts +0 -155
  141. package/src/wallet/ethereum.ts +0 -65
  142. package/src/wallet/index.ts +0 -1
@@ -1,131 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const eventFrameAddedSchema: z.ZodObject<{
3
- event: z.ZodLiteral<"frame_added">;
4
- notificationDetails: z.ZodOptional<z.ZodObject<{
5
- url: z.ZodString;
6
- token: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- url: string;
9
- token: string;
10
- }, {
11
- url: string;
12
- token: string;
13
- }>>;
14
- }, "strip", z.ZodTypeAny, {
15
- event: "frame_added";
16
- notificationDetails?: {
17
- url: string;
18
- token: string;
19
- } | undefined;
20
- }, {
21
- event: "frame_added";
22
- notificationDetails?: {
23
- url: string;
24
- token: string;
25
- } | undefined;
26
- }>;
27
- export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>;
28
- export declare const eventFrameRemovedSchema: z.ZodObject<{
29
- event: z.ZodLiteral<"frame_removed">;
30
- }, "strip", z.ZodTypeAny, {
31
- event: "frame_removed";
32
- }, {
33
- event: "frame_removed";
34
- }>;
35
- export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>;
36
- export declare const eventNotificationsEnabledSchema: z.ZodObject<{
37
- event: z.ZodLiteral<"notifications_enabled">;
38
- notificationDetails: z.ZodObject<{
39
- url: z.ZodString;
40
- token: z.ZodString;
41
- }, "strip", z.ZodTypeAny, {
42
- url: string;
43
- token: string;
44
- }, {
45
- url: string;
46
- token: string;
47
- }>;
48
- }, "strip", z.ZodTypeAny, {
49
- event: "notifications_enabled";
50
- notificationDetails: {
51
- url: string;
52
- token: string;
53
- };
54
- }, {
55
- event: "notifications_enabled";
56
- notificationDetails: {
57
- url: string;
58
- token: string;
59
- };
60
- }>;
61
- export type EventNotificationsEnabled = z.infer<typeof eventNotificationsEnabledSchema>;
62
- export declare const notificationsDisabledSchema: z.ZodObject<{
63
- event: z.ZodLiteral<"notifications_disabled">;
64
- }, "strip", z.ZodTypeAny, {
65
- event: "notifications_disabled";
66
- }, {
67
- event: "notifications_disabled";
68
- }>;
69
- export type EventNotificationsDisabled = z.infer<typeof notificationsDisabledSchema>;
70
- export declare const serverEventSchema: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
71
- event: z.ZodLiteral<"frame_added">;
72
- notificationDetails: z.ZodOptional<z.ZodObject<{
73
- url: z.ZodString;
74
- token: z.ZodString;
75
- }, "strip", z.ZodTypeAny, {
76
- url: string;
77
- token: string;
78
- }, {
79
- url: string;
80
- token: string;
81
- }>>;
82
- }, "strip", z.ZodTypeAny, {
83
- event: "frame_added";
84
- notificationDetails?: {
85
- url: string;
86
- token: string;
87
- } | undefined;
88
- }, {
89
- event: "frame_added";
90
- notificationDetails?: {
91
- url: string;
92
- token: string;
93
- } | undefined;
94
- }>, z.ZodObject<{
95
- event: z.ZodLiteral<"frame_removed">;
96
- }, "strip", z.ZodTypeAny, {
97
- event: "frame_removed";
98
- }, {
99
- event: "frame_removed";
100
- }>, z.ZodObject<{
101
- event: z.ZodLiteral<"notifications_enabled">;
102
- notificationDetails: z.ZodObject<{
103
- url: z.ZodString;
104
- token: z.ZodString;
105
- }, "strip", z.ZodTypeAny, {
106
- url: string;
107
- token: string;
108
- }, {
109
- url: string;
110
- token: string;
111
- }>;
112
- }, "strip", z.ZodTypeAny, {
113
- event: "notifications_enabled";
114
- notificationDetails: {
115
- url: string;
116
- token: string;
117
- };
118
- }, {
119
- event: "notifications_enabled";
120
- notificationDetails: {
121
- url: string;
122
- token: string;
123
- };
124
- }>, z.ZodObject<{
125
- event: z.ZodLiteral<"notifications_disabled">;
126
- }, "strip", z.ZodTypeAny, {
127
- event: "notifications_disabled";
128
- }, {
129
- event: "notifications_disabled";
130
- }>]>;
131
- export type FrameServerEvent = z.infer<typeof serverEventSchema>;
@@ -1,22 +0,0 @@
1
- import { z } from 'zod';
2
- import { notificationDetailsSchema } from "./notifications.js";
3
- export const eventFrameAddedSchema = z.object({
4
- event: z.literal('frame_added'),
5
- notificationDetails: notificationDetailsSchema.optional(),
6
- });
7
- export const eventFrameRemovedSchema = z.object({
8
- event: z.literal('frame_removed'),
9
- });
10
- export const eventNotificationsEnabledSchema = z.object({
11
- event: z.literal('notifications_enabled'),
12
- notificationDetails: notificationDetailsSchema.required(),
13
- });
14
- export const notificationsDisabledSchema = z.object({
15
- event: z.literal('notifications_disabled'),
16
- });
17
- export const serverEventSchema = z.discriminatedUnion('event', [
18
- eventFrameAddedSchema,
19
- eventFrameRemovedSchema,
20
- eventNotificationsEnabledSchema,
21
- notificationsDisabledSchema,
22
- ]);
@@ -1,5 +0,0 @@
1
- export * from './embeds.ts';
2
- export * from './events.ts';
3
- export * from './shared.ts';
4
- export * from './manifest.ts';
5
- export * from './notifications.ts';
@@ -1,5 +0,0 @@
1
- export * from "./embeds.js";
2
- export * from "./events.js";
3
- export * from "./shared.js";
4
- export * from "./manifest.js";
5
- export * from "./notifications.js";
@@ -1,334 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
3
- version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
4
- name: z.ZodString;
5
- iconUrl: z.ZodString;
6
- homeUrl: z.ZodString;
7
- /** deprecated, set ogImageUrl instead */
8
- imageUrl: z.ZodOptional<z.ZodString>;
9
- /** deprecated, will rely on fc:frame meta tag */
10
- buttonTitle: z.ZodOptional<z.ZodString>;
11
- splashImageUrl: z.ZodOptional<z.ZodString>;
12
- splashBackgroundColor: z.ZodOptional<z.ZodString>;
13
- webhookUrl: z.ZodOptional<z.ZodString>;
14
- /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
15
- subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
16
- description: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
17
- screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
- primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
19
- tags: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, "many">>;
20
- heroImageUrl: z.ZodOptional<z.ZodString>;
21
- tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
22
- ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
23
- ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
24
- ogImageUrl: z.ZodOptional<z.ZodString>;
25
- /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
26
- noindex: z.ZodOptional<z.ZodBoolean>;
27
- /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
28
- requiredChains: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["eip155:1", "eip155:8453", "eip155:42161", "eip155:421614", "eip155:84532", "eip155:666666666", "eip155:100", "eip155:10", "eip155:11155420", "eip155:137", "eip155:11155111", "eip155:7777777", "eip155:130", "eip155:10143", "eip155:42220", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]>, "many">, ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[], ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[]>>;
29
- requiredCapabilities: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["wallet.getEthereumProvider", "wallet.getSolanaProvider", "actions.ready", "actions.openUrl", "actions.close", "actions.setPrimaryButton", "actions.addMiniApp", "actions.signIn", "actions.viewCast", "actions.viewProfile", "actions.composeCast", "actions.viewToken", "actions.sendToken", "actions.swapToken", "haptics.impactOccurred", "haptics.notificationOccurred", "haptics.selectionChanged", "back"]>, "many">, ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[], ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[]>>;
30
- /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
31
- /** Documentation will be added once this feature is finalized. */
32
- castShareUrl: z.ZodOptional<z.ZodString>;
33
- }, "strip", z.ZodTypeAny, {
34
- name: string;
35
- version: "1" | "next" | "0.0.0" | "0.0.1";
36
- iconUrl: string;
37
- homeUrl: string;
38
- splashImageUrl?: string | undefined;
39
- splashBackgroundColor?: string | undefined;
40
- imageUrl?: string | undefined;
41
- buttonTitle?: string | undefined;
42
- webhookUrl?: string | undefined;
43
- subtitle?: string | undefined;
44
- description?: string | undefined;
45
- screenshotUrls?: string[] | undefined;
46
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
47
- tags?: string[] | undefined;
48
- heroImageUrl?: string | undefined;
49
- tagline?: string | undefined;
50
- ogTitle?: string | undefined;
51
- ogDescription?: string | undefined;
52
- ogImageUrl?: string | undefined;
53
- noindex?: boolean | undefined;
54
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
55
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
56
- castShareUrl?: string | undefined;
57
- }, {
58
- name: string;
59
- version: "1" | "next" | "0.0.0" | "0.0.1";
60
- iconUrl: string;
61
- homeUrl: string;
62
- splashImageUrl?: string | undefined;
63
- splashBackgroundColor?: string | undefined;
64
- imageUrl?: string | undefined;
65
- buttonTitle?: string | undefined;
66
- webhookUrl?: string | undefined;
67
- subtitle?: string | undefined;
68
- description?: string | undefined;
69
- screenshotUrls?: string[] | undefined;
70
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
71
- tags?: string[] | undefined;
72
- heroImageUrl?: string | undefined;
73
- tagline?: string | undefined;
74
- ogTitle?: string | undefined;
75
- ogDescription?: string | undefined;
76
- ogImageUrl?: string | undefined;
77
- noindex?: boolean | undefined;
78
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
79
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
80
- castShareUrl?: string | undefined;
81
- }>, {
82
- name: string;
83
- version: "1" | "next" | "0.0.0" | "0.0.1";
84
- iconUrl: string;
85
- homeUrl: string;
86
- splashImageUrl?: string | undefined;
87
- splashBackgroundColor?: string | undefined;
88
- imageUrl?: string | undefined;
89
- buttonTitle?: string | undefined;
90
- webhookUrl?: string | undefined;
91
- subtitle?: string | undefined;
92
- description?: string | undefined;
93
- screenshotUrls?: string[] | undefined;
94
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
95
- tags?: string[] | undefined;
96
- heroImageUrl?: string | undefined;
97
- tagline?: string | undefined;
98
- ogTitle?: string | undefined;
99
- ogDescription?: string | undefined;
100
- ogImageUrl?: string | undefined;
101
- noindex?: boolean | undefined;
102
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
103
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
104
- castShareUrl?: string | undefined;
105
- }, {
106
- name: string;
107
- version: "1" | "next" | "0.0.0" | "0.0.1";
108
- iconUrl: string;
109
- homeUrl: string;
110
- splashImageUrl?: string | undefined;
111
- splashBackgroundColor?: string | undefined;
112
- imageUrl?: string | undefined;
113
- buttonTitle?: string | undefined;
114
- webhookUrl?: string | undefined;
115
- subtitle?: string | undefined;
116
- description?: string | undefined;
117
- screenshotUrls?: string[] | undefined;
118
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
119
- tags?: string[] | undefined;
120
- heroImageUrl?: string | undefined;
121
- tagline?: string | undefined;
122
- ogTitle?: string | undefined;
123
- ogDescription?: string | undefined;
124
- ogImageUrl?: string | undefined;
125
- noindex?: boolean | undefined;
126
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
127
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
128
- castShareUrl?: string | undefined;
129
- }>;
130
- export declare const domainManifestSchema: z.ZodObject<{
131
- accountAssociation: z.ZodObject<{
132
- header: z.ZodString;
133
- payload: z.ZodString;
134
- signature: z.ZodString;
135
- }, "strip", z.ZodTypeAny, {
136
- header: string;
137
- payload: string;
138
- signature: string;
139
- }, {
140
- header: string;
141
- payload: string;
142
- signature: string;
143
- }>;
144
- frame: z.ZodOptional<z.ZodEffects<z.ZodObject<{
145
- version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
146
- name: z.ZodString;
147
- iconUrl: z.ZodString;
148
- homeUrl: z.ZodString;
149
- /** deprecated, set ogImageUrl instead */
150
- imageUrl: z.ZodOptional<z.ZodString>;
151
- /** deprecated, will rely on fc:frame meta tag */
152
- buttonTitle: z.ZodOptional<z.ZodString>;
153
- splashImageUrl: z.ZodOptional<z.ZodString>;
154
- splashBackgroundColor: z.ZodOptional<z.ZodString>;
155
- webhookUrl: z.ZodOptional<z.ZodString>;
156
- /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
157
- subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
158
- description: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
159
- screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
160
- primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
161
- tags: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, "many">>;
162
- heroImageUrl: z.ZodOptional<z.ZodString>;
163
- tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
164
- ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
165
- ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
166
- ogImageUrl: z.ZodOptional<z.ZodString>;
167
- /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
168
- noindex: z.ZodOptional<z.ZodBoolean>;
169
- /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
170
- requiredChains: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["eip155:1", "eip155:8453", "eip155:42161", "eip155:421614", "eip155:84532", "eip155:666666666", "eip155:100", "eip155:10", "eip155:11155420", "eip155:137", "eip155:11155111", "eip155:7777777", "eip155:130", "eip155:10143", "eip155:42220", "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]>, "many">, ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[], ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[]>>;
171
- requiredCapabilities: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["wallet.getEthereumProvider", "wallet.getSolanaProvider", "actions.ready", "actions.openUrl", "actions.close", "actions.setPrimaryButton", "actions.addMiniApp", "actions.signIn", "actions.viewCast", "actions.viewProfile", "actions.composeCast", "actions.viewToken", "actions.sendToken", "actions.swapToken", "haptics.impactOccurred", "haptics.notificationOccurred", "haptics.selectionChanged", "back"]>, "many">, ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[], ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[]>>;
172
- /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
173
- /** Documentation will be added once this feature is finalized. */
174
- castShareUrl: z.ZodOptional<z.ZodString>;
175
- }, "strip", z.ZodTypeAny, {
176
- name: string;
177
- version: "1" | "next" | "0.0.0" | "0.0.1";
178
- iconUrl: string;
179
- homeUrl: string;
180
- splashImageUrl?: string | undefined;
181
- splashBackgroundColor?: string | undefined;
182
- imageUrl?: string | undefined;
183
- buttonTitle?: string | undefined;
184
- webhookUrl?: string | undefined;
185
- subtitle?: string | undefined;
186
- description?: string | undefined;
187
- screenshotUrls?: string[] | undefined;
188
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
189
- tags?: string[] | undefined;
190
- heroImageUrl?: string | undefined;
191
- tagline?: string | undefined;
192
- ogTitle?: string | undefined;
193
- ogDescription?: string | undefined;
194
- ogImageUrl?: string | undefined;
195
- noindex?: boolean | undefined;
196
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
197
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
198
- castShareUrl?: string | undefined;
199
- }, {
200
- name: string;
201
- version: "1" | "next" | "0.0.0" | "0.0.1";
202
- iconUrl: string;
203
- homeUrl: string;
204
- splashImageUrl?: string | undefined;
205
- splashBackgroundColor?: string | undefined;
206
- imageUrl?: string | undefined;
207
- buttonTitle?: string | undefined;
208
- webhookUrl?: string | undefined;
209
- subtitle?: string | undefined;
210
- description?: string | undefined;
211
- screenshotUrls?: string[] | undefined;
212
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
213
- tags?: string[] | undefined;
214
- heroImageUrl?: string | undefined;
215
- tagline?: string | undefined;
216
- ogTitle?: string | undefined;
217
- ogDescription?: string | undefined;
218
- ogImageUrl?: string | undefined;
219
- noindex?: boolean | undefined;
220
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
221
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
222
- castShareUrl?: string | undefined;
223
- }>, {
224
- name: string;
225
- version: "1" | "next" | "0.0.0" | "0.0.1";
226
- iconUrl: string;
227
- homeUrl: string;
228
- splashImageUrl?: string | undefined;
229
- splashBackgroundColor?: string | undefined;
230
- imageUrl?: string | undefined;
231
- buttonTitle?: string | undefined;
232
- webhookUrl?: string | undefined;
233
- subtitle?: string | undefined;
234
- description?: string | undefined;
235
- screenshotUrls?: string[] | undefined;
236
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
237
- tags?: string[] | undefined;
238
- heroImageUrl?: string | undefined;
239
- tagline?: string | undefined;
240
- ogTitle?: string | undefined;
241
- ogDescription?: string | undefined;
242
- ogImageUrl?: string | undefined;
243
- noindex?: boolean | undefined;
244
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
245
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
246
- castShareUrl?: string | undefined;
247
- }, {
248
- name: string;
249
- version: "1" | "next" | "0.0.0" | "0.0.1";
250
- iconUrl: string;
251
- homeUrl: string;
252
- splashImageUrl?: string | undefined;
253
- splashBackgroundColor?: string | undefined;
254
- imageUrl?: string | undefined;
255
- buttonTitle?: string | undefined;
256
- webhookUrl?: string | undefined;
257
- subtitle?: string | undefined;
258
- description?: string | undefined;
259
- screenshotUrls?: string[] | undefined;
260
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
261
- tags?: string[] | undefined;
262
- heroImageUrl?: string | undefined;
263
- tagline?: string | undefined;
264
- ogTitle?: string | undefined;
265
- ogDescription?: string | undefined;
266
- ogImageUrl?: string | undefined;
267
- noindex?: boolean | undefined;
268
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
269
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
270
- castShareUrl?: string | undefined;
271
- }>>;
272
- }, "strip", z.ZodTypeAny, {
273
- accountAssociation: {
274
- header: string;
275
- payload: string;
276
- signature: string;
277
- };
278
- frame?: {
279
- name: string;
280
- version: "1" | "next" | "0.0.0" | "0.0.1";
281
- iconUrl: string;
282
- homeUrl: string;
283
- splashImageUrl?: string | undefined;
284
- splashBackgroundColor?: string | undefined;
285
- imageUrl?: string | undefined;
286
- buttonTitle?: string | undefined;
287
- webhookUrl?: string | undefined;
288
- subtitle?: string | undefined;
289
- description?: string | undefined;
290
- screenshotUrls?: string[] | undefined;
291
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
292
- tags?: string[] | undefined;
293
- heroImageUrl?: string | undefined;
294
- tagline?: string | undefined;
295
- ogTitle?: string | undefined;
296
- ogDescription?: string | undefined;
297
- ogImageUrl?: string | undefined;
298
- noindex?: boolean | undefined;
299
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
300
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
301
- castShareUrl?: string | undefined;
302
- } | undefined;
303
- }, {
304
- accountAssociation: {
305
- header: string;
306
- payload: string;
307
- signature: string;
308
- };
309
- frame?: {
310
- name: string;
311
- version: "1" | "next" | "0.0.0" | "0.0.1";
312
- iconUrl: string;
313
- homeUrl: string;
314
- splashImageUrl?: string | undefined;
315
- splashBackgroundColor?: string | undefined;
316
- imageUrl?: string | undefined;
317
- buttonTitle?: string | undefined;
318
- webhookUrl?: string | undefined;
319
- subtitle?: string | undefined;
320
- description?: string | undefined;
321
- screenshotUrls?: string[] | undefined;
322
- primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
323
- tags?: string[] | undefined;
324
- heroImageUrl?: string | undefined;
325
- tagline?: string | undefined;
326
- ogTitle?: string | undefined;
327
- ogDescription?: string | undefined;
328
- ogImageUrl?: string | undefined;
329
- noindex?: boolean | undefined;
330
- requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
331
- requiredCapabilities?: ("wallet.getEthereumProvider" | "wallet.getSolanaProvider" | "actions.ready" | "actions.openUrl" | "actions.close" | "actions.setPrimaryButton" | "actions.addMiniApp" | "actions.signIn" | "actions.viewCast" | "actions.viewProfile" | "actions.composeCast" | "actions.viewToken" | "actions.sendToken" | "actions.swapToken" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
332
- castShareUrl?: string | undefined;
333
- } | undefined;
334
- }>;
@@ -1,109 +0,0 @@
1
- import { z } from 'zod';
2
- import { miniAppHostCapabilityList } from "../types.js";
3
- import { buttonTitleSchema, createSimpleStringSchema, encodedJsonFarcasterSignatureSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from "./shared.js";
4
- const primaryCategorySchema = z.enum([
5
- 'games',
6
- 'social',
7
- 'finance',
8
- 'utility',
9
- 'productivity',
10
- 'health-fitness',
11
- 'news-media',
12
- 'music',
13
- 'shopping',
14
- 'education',
15
- 'developer-tools',
16
- 'entertainment',
17
- 'art-creativity',
18
- ]);
19
- const chainList = [
20
- 'eip155:1', // Ethereum mainnet
21
- 'eip155:8453', // Base mainnet
22
- 'eip155:42161', // Arbitrum One
23
- 'eip155:421614', // Arbitrum Sepolia
24
- 'eip155:84532', // Base Sepolia
25
- 'eip155:666666666', // Degen
26
- 'eip155:100', // Gnosis
27
- 'eip155:10', // Optimism
28
- 'eip155:11155420', // Optimism Sepolia
29
- 'eip155:137', // Polygon
30
- 'eip155:11155111', // Ethereum Sepolia
31
- 'eip155:7777777', // Zora
32
- 'eip155:130', // Unichain
33
- 'eip155:10143', // Monad testnet
34
- 'eip155:42220', // Celo
35
- 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', // Solana
36
- ];
37
- function removeArrayDuplicates(arr) {
38
- const set = new Set(arr);
39
- return Array.from(set);
40
- }
41
- export const domainFrameConfigSchema = z
42
- .object({
43
- // 0.0.0 and 0.0.1 are not technically part of the spec but kept for
44
- // backwards compatibility. next should always resolve to the most recent
45
- // schema version.
46
- version: z.union([
47
- z.literal('0.0.0'),
48
- z.literal('0.0.1'),
49
- z.literal('1'),
50
- z.literal('next'),
51
- ]),
52
- name: frameNameSchema,
53
- iconUrl: secureUrlSchema,
54
- homeUrl: secureUrlSchema,
55
- /** deprecated, set ogImageUrl instead */
56
- imageUrl: secureUrlSchema.optional(),
57
- /** deprecated, will rely on fc:frame meta tag */
58
- buttonTitle: buttonTitleSchema.optional(),
59
- splashImageUrl: secureUrlSchema.optional(),
60
- splashBackgroundColor: hexColorSchema.optional(),
61
- webhookUrl: secureUrlSchema.optional(),
62
- /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
63
- subtitle: createSimpleStringSchema({ max: 30 }).optional(),
64
- description: createSimpleStringSchema({ max: 170 }).optional(),
65
- screenshotUrls: z.array(secureUrlSchema).max(3).optional(),
66
- primaryCategory: primaryCategorySchema.optional(),
67
- tags: z
68
- .array(createSimpleStringSchema({ max: 20, noSpaces: true }))
69
- .max(5)
70
- .optional(),
71
- heroImageUrl: secureUrlSchema.optional(),
72
- tagline: createSimpleStringSchema({ max: 30 }).optional(),
73
- ogTitle: createSimpleStringSchema({ max: 30 }).optional(),
74
- ogDescription: createSimpleStringSchema({ max: 100 }).optional(),
75
- ogImageUrl: secureUrlSchema.optional(),
76
- /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
77
- noindex: z.boolean().optional(),
78
- /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
79
- requiredChains: z
80
- .array(z.enum(chainList))
81
- .transform(removeArrayDuplicates)
82
- .optional(),
83
- requiredCapabilities: z
84
- .array(z.enum(miniAppHostCapabilityList))
85
- .transform(removeArrayDuplicates)
86
- .optional(),
87
- /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
88
- /** Documentation will be added once this feature is finalized. */
89
- castShareUrl: secureUrlSchema.optional(),
90
- })
91
- .refine((data) => {
92
- if (data.castShareUrl === undefined)
93
- return true;
94
- try {
95
- const homeUrlDomain = new URL(data.homeUrl).hostname;
96
- const castShareUrlDomain = new URL(data.castShareUrl).hostname;
97
- return homeUrlDomain === castShareUrlDomain;
98
- }
99
- catch {
100
- return false;
101
- }
102
- }, {
103
- message: 'castShareUrl must have the same domain as homeUrl',
104
- path: ['castShareUrl'],
105
- });
106
- export const domainManifestSchema = z.object({
107
- accountAssociation: encodedJsonFarcasterSignatureSchema,
108
- frame: domainFrameConfigSchema.optional(),
109
- });