@farcaster/frame-core 0.0.0-canary-20250611151843 → 0.0.0-canary-20250627213014

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.
@@ -98,4 +98,10 @@ export type FrameConfig = {
98
98
  * Required if the frame application uses notifications.
99
99
  */
100
100
  webhookUrl?: string;
101
+ /**
102
+ * Canonical domain for the frame application.
103
+ * If specified, this domain will be treated as the primary domain for the frame.
104
+ * Max length of 1024 characters.
105
+ */
106
+ canonicalDomain?: string;
101
107
  };
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  export declare const actionLaunchFrameSchema: z.ZodObject<{
3
3
  type: z.ZodLiteral<"launch_frame">;
4
4
  name: z.ZodString;
5
- url: z.ZodOptional<z.ZodString>;
6
- splashImageUrl: z.ZodOptional<z.ZodString>;
5
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
7
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  type: "launch_frame";
@@ -31,8 +31,8 @@ export declare const actionViewTokenSchema: z.ZodObject<{
31
31
  export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
32
32
  type: z.ZodLiteral<"launch_frame">;
33
33
  name: z.ZodString;
34
- url: z.ZodOptional<z.ZodString>;
35
- splashImageUrl: z.ZodOptional<z.ZodString>;
34
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
35
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
36
36
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
37
37
  }, "strip", z.ZodTypeAny, {
38
38
  type: "launch_frame";
@@ -61,8 +61,8 @@ export declare const buttonSchema: z.ZodObject<{
61
61
  action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
62
62
  type: z.ZodLiteral<"launch_frame">;
63
63
  name: z.ZodString;
64
- url: z.ZodOptional<z.ZodString>;
65
- splashImageUrl: z.ZodOptional<z.ZodString>;
64
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
65
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
66
66
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
67
67
  }, "strip", z.ZodTypeAny, {
68
68
  type: "launch_frame";
@@ -113,15 +113,15 @@ export declare const buttonSchema: z.ZodObject<{
113
113
  }>;
114
114
  export declare const frameEmbedNextSchema: z.ZodObject<{
115
115
  version: z.ZodLiteral<"next">;
116
- imageUrl: z.ZodString;
116
+ imageUrl: z.ZodEffects<z.ZodString, string, string>;
117
117
  aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
118
118
  button: z.ZodObject<{
119
119
  title: z.ZodString;
120
120
  action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
121
121
  type: z.ZodLiteral<"launch_frame">;
122
122
  name: z.ZodString;
123
- url: z.ZodOptional<z.ZodString>;
124
- splashImageUrl: z.ZodOptional<z.ZodString>;
123
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
124
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
125
125
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
126
126
  }, "strip", z.ZodTypeAny, {
127
127
  type: "launch_frame";
@@ -2,26 +2,26 @@ import { z } from 'zod';
2
2
  export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
3
3
  version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
4
4
  name: z.ZodString;
5
- iconUrl: z.ZodString;
6
- homeUrl: z.ZodString;
5
+ iconUrl: z.ZodEffects<z.ZodString, string, string>;
6
+ homeUrl: z.ZodEffects<z.ZodString, string, string>;
7
7
  /** deprecated, set ogImageUrl instead */
8
- imageUrl: z.ZodOptional<z.ZodString>;
8
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
9
9
  /** deprecated, will rely on fc:frame meta tag */
10
10
  buttonTitle: z.ZodOptional<z.ZodString>;
11
- splashImageUrl: z.ZodOptional<z.ZodString>;
11
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
12
12
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
13
- webhookUrl: z.ZodOptional<z.ZodString>;
13
+ webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
14
14
  /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
15
15
  subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
16
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">>;
17
+ screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
18
18
  primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
19
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>;
20
+ heroImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
21
21
  tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
22
22
  ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
23
23
  ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
24
- ogImageUrl: z.ZodOptional<z.ZodString>;
24
+ ogImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
25
25
  /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
26
26
  noindex: z.ZodOptional<z.ZodBoolean>;
27
27
  /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
@@ -29,7 +29,9 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
29
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
30
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
31
31
  /** Documentation will be added once this feature is finalized. */
32
- castShareUrl: z.ZodOptional<z.ZodString>;
32
+ castShareUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
33
+ /** Canonical domain for the frame application */
34
+ canonicalDomain: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
33
35
  }, "strip", z.ZodTypeAny, {
34
36
  name: string;
35
37
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -54,6 +56,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
54
56
  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
57
  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
58
  castShareUrl?: string | undefined;
59
+ canonicalDomain?: string | undefined;
57
60
  }, {
58
61
  name: string;
59
62
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -78,6 +81,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
78
81
  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
82
  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
83
  castShareUrl?: string | undefined;
84
+ canonicalDomain?: string | undefined;
81
85
  }>, {
82
86
  name: string;
83
87
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -102,6 +106,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
102
106
  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
107
  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
108
  castShareUrl?: string | undefined;
109
+ canonicalDomain?: string | undefined;
105
110
  }, {
106
111
  name: string;
107
112
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -126,6 +131,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
126
131
  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
132
  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
133
  castShareUrl?: string | undefined;
134
+ canonicalDomain?: string | undefined;
129
135
  }>;
130
136
  export declare const domainManifestSchema: z.ZodObject<{
131
137
  accountAssociation: z.ZodObject<{
@@ -144,26 +150,26 @@ export declare const domainManifestSchema: z.ZodObject<{
144
150
  frame: z.ZodOptional<z.ZodEffects<z.ZodObject<{
145
151
  version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
146
152
  name: z.ZodString;
147
- iconUrl: z.ZodString;
148
- homeUrl: z.ZodString;
153
+ iconUrl: z.ZodEffects<z.ZodString, string, string>;
154
+ homeUrl: z.ZodEffects<z.ZodString, string, string>;
149
155
  /** deprecated, set ogImageUrl instead */
150
- imageUrl: z.ZodOptional<z.ZodString>;
156
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
151
157
  /** deprecated, will rely on fc:frame meta tag */
152
158
  buttonTitle: z.ZodOptional<z.ZodString>;
153
- splashImageUrl: z.ZodOptional<z.ZodString>;
159
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
154
160
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
155
- webhookUrl: z.ZodOptional<z.ZodString>;
161
+ webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
156
162
  /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
157
163
  subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
158
164
  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">>;
165
+ screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
160
166
  primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
161
167
  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>;
168
+ heroImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
163
169
  tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
164
170
  ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
165
171
  ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
166
- ogImageUrl: z.ZodOptional<z.ZodString>;
172
+ ogImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
167
173
  /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
168
174
  noindex: z.ZodOptional<z.ZodBoolean>;
169
175
  /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
@@ -171,7 +177,9 @@ export declare const domainManifestSchema: z.ZodObject<{
171
177
  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
178
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
173
179
  /** Documentation will be added once this feature is finalized. */
174
- castShareUrl: z.ZodOptional<z.ZodString>;
180
+ castShareUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
181
+ /** Canonical domain for the frame application */
182
+ canonicalDomain: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
175
183
  }, "strip", z.ZodTypeAny, {
176
184
  name: string;
177
185
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -196,6 +204,7 @@ export declare const domainManifestSchema: z.ZodObject<{
196
204
  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
205
  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
206
  castShareUrl?: string | undefined;
207
+ canonicalDomain?: string | undefined;
199
208
  }, {
200
209
  name: string;
201
210
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -220,6 +229,7 @@ export declare const domainManifestSchema: z.ZodObject<{
220
229
  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
230
  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
231
  castShareUrl?: string | undefined;
232
+ canonicalDomain?: string | undefined;
223
233
  }>, {
224
234
  name: string;
225
235
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -244,6 +254,7 @@ export declare const domainManifestSchema: z.ZodObject<{
244
254
  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
255
  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
256
  castShareUrl?: string | undefined;
257
+ canonicalDomain?: string | undefined;
247
258
  }, {
248
259
  name: string;
249
260
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -268,6 +279,7 @@ export declare const domainManifestSchema: z.ZodObject<{
268
279
  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
280
  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
281
  castShareUrl?: string | undefined;
282
+ canonicalDomain?: string | undefined;
271
283
  }>>;
272
284
  }, "strip", z.ZodTypeAny, {
273
285
  accountAssociation: {
@@ -299,6 +311,7 @@ export declare const domainManifestSchema: z.ZodObject<{
299
311
  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
312
  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
313
  castShareUrl?: string | undefined;
314
+ canonicalDomain?: string | undefined;
302
315
  } | undefined;
303
316
  }, {
304
317
  accountAssociation: {
@@ -330,5 +343,6 @@ export declare const domainManifestSchema: z.ZodObject<{
330
343
  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
344
  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
345
  castShareUrl?: string | undefined;
346
+ canonicalDomain?: string | undefined;
333
347
  } | undefined;
334
348
  }>;
@@ -90,6 +90,8 @@ exports.domainFrameConfigSchema = zod_1.z
90
90
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
91
91
  /** Documentation will be added once this feature is finalized. */
92
92
  castShareUrl: shared_ts_1.secureUrlSchema.optional(),
93
+ /** Canonical domain for the frame application */
94
+ canonicalDomain: shared_ts_1.domainSchema.optional(),
93
95
  })
94
96
  .refine((data) => {
95
97
  if (data.castShareUrl === undefined)
@@ -14,7 +14,7 @@ export declare const sendNotificationRequestSchema: z.ZodObject<{
14
14
  notificationId: z.ZodString;
15
15
  title: z.ZodString;
16
16
  body: z.ZodString;
17
- targetUrl: z.ZodString;
17
+ targetUrl: z.ZodEffects<z.ZodString, string, string>;
18
18
  tokens: z.ZodArray<z.ZodString, "many">;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  title: string;
@@ -3,11 +3,12 @@ export declare const createSimpleStringSchema: ({ max, noSpaces, }?: {
3
3
  max?: number;
4
4
  noSpaces?: boolean;
5
5
  }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
6
- export declare const secureUrlSchema: z.ZodString;
6
+ export declare const secureUrlSchema: z.ZodEffects<z.ZodString, string, string>;
7
7
  export declare const frameNameSchema: z.ZodString;
8
8
  export declare const buttonTitleSchema: z.ZodString;
9
9
  export declare const caip19TokenSchema: z.ZodString;
10
10
  export declare const hexColorSchema: z.ZodString;
11
+ export declare const domainSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
11
12
  export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
12
13
  export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{
13
14
  header: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.aspectRatioSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.frameNameSchema = exports.secureUrlSchema = exports.createSimpleStringSchema = void 0;
3
+ exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.aspectRatioSchema = exports.domainSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.frameNameSchema = exports.secureUrlSchema = exports.createSimpleStringSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=\/\\|~«»]/;
6
6
  const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
@@ -33,7 +33,10 @@ exports.secureUrlSchema = zod_1.z
33
33
  .string()
34
34
  .url()
35
35
  .startsWith('https://', { message: 'Must be an https url' })
36
- .max(1024);
36
+ .max(1024)
37
+ .refine((url) => !url.includes(' '), {
38
+ message: 'URL must not contain spaces',
39
+ });
37
40
  exports.frameNameSchema = zod_1.z.string().max(32);
38
41
  exports.buttonTitleSchema = zod_1.z.string().max(32);
39
42
  const CAIP_19_REGEX = /^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/;
@@ -45,6 +48,31 @@ exports.hexColorSchema = zod_1.z
45
48
  .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, {
46
49
  message: 'Invalid hex color code. It should be in the format #RRGGBB or #RGB.',
47
50
  });
51
+ // Domain validation regex:
52
+ // - Each label (part between dots) must start and end with alphanumeric
53
+ // - Labels can contain hyphens in the middle
54
+ // - Cannot have consecutive dots
55
+ // - Must have at least one dot (TLD required)
56
+ // - TLD must be at least 2 characters and only letters
57
+ const DOMAIN_REGEX = /^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
58
+ exports.domainSchema = zod_1.z
59
+ .string()
60
+ .max(1024)
61
+ .regex(DOMAIN_REGEX, {
62
+ message: 'Must be a valid domain name (e.g., example.com, sub.example.com)',
63
+ })
64
+ .refine((value) => !value.includes('://'), {
65
+ message: 'Domain must not include protocol (http://, https://, etc.)',
66
+ })
67
+ .refine((value) => !value.includes('/'), {
68
+ message: 'Domain must not include path separators',
69
+ })
70
+ .refine((value) => !value.includes('@'), {
71
+ message: 'Domain must not include @ symbol',
72
+ })
73
+ .refine((value) => !value.includes(':'), {
74
+ message: 'Domain must not include port numbers',
75
+ });
48
76
  exports.aspectRatioSchema = zod_1.z.union([zod_1.z.literal('1:1'), zod_1.z.literal('3:2')]);
49
77
  exports.encodedJsonFarcasterSignatureSchema = zod_1.z.object({
50
78
  header: zod_1.z.string(),
package/esm/manifest.d.ts CHANGED
@@ -98,4 +98,10 @@ export type FrameConfig = {
98
98
  * Required if the frame application uses notifications.
99
99
  */
100
100
  webhookUrl?: string;
101
+ /**
102
+ * Canonical domain for the frame application.
103
+ * If specified, this domain will be treated as the primary domain for the frame.
104
+ * Max length of 1024 characters.
105
+ */
106
+ canonicalDomain?: string;
101
107
  };
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  export declare const actionLaunchFrameSchema: z.ZodObject<{
3
3
  type: z.ZodLiteral<"launch_frame">;
4
4
  name: z.ZodString;
5
- url: z.ZodOptional<z.ZodString>;
6
- splashImageUrl: z.ZodOptional<z.ZodString>;
5
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
6
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
7
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  type: "launch_frame";
@@ -31,8 +31,8 @@ export declare const actionViewTokenSchema: z.ZodObject<{
31
31
  export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
32
32
  type: z.ZodLiteral<"launch_frame">;
33
33
  name: z.ZodString;
34
- url: z.ZodOptional<z.ZodString>;
35
- splashImageUrl: z.ZodOptional<z.ZodString>;
34
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
35
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
36
36
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
37
37
  }, "strip", z.ZodTypeAny, {
38
38
  type: "launch_frame";
@@ -61,8 +61,8 @@ export declare const buttonSchema: z.ZodObject<{
61
61
  action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
62
62
  type: z.ZodLiteral<"launch_frame">;
63
63
  name: z.ZodString;
64
- url: z.ZodOptional<z.ZodString>;
65
- splashImageUrl: z.ZodOptional<z.ZodString>;
64
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
65
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
66
66
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
67
67
  }, "strip", z.ZodTypeAny, {
68
68
  type: "launch_frame";
@@ -113,15 +113,15 @@ export declare const buttonSchema: z.ZodObject<{
113
113
  }>;
114
114
  export declare const frameEmbedNextSchema: z.ZodObject<{
115
115
  version: z.ZodLiteral<"next">;
116
- imageUrl: z.ZodString;
116
+ imageUrl: z.ZodEffects<z.ZodString, string, string>;
117
117
  aspectRatio: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>>;
118
118
  button: z.ZodObject<{
119
119
  title: z.ZodString;
120
120
  action: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
121
121
  type: z.ZodLiteral<"launch_frame">;
122
122
  name: z.ZodString;
123
- url: z.ZodOptional<z.ZodString>;
124
- splashImageUrl: z.ZodOptional<z.ZodString>;
123
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
124
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
125
125
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
126
126
  }, "strip", z.ZodTypeAny, {
127
127
  type: "launch_frame";
@@ -2,26 +2,26 @@ import { z } from 'zod';
2
2
  export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
3
3
  version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
4
4
  name: z.ZodString;
5
- iconUrl: z.ZodString;
6
- homeUrl: z.ZodString;
5
+ iconUrl: z.ZodEffects<z.ZodString, string, string>;
6
+ homeUrl: z.ZodEffects<z.ZodString, string, string>;
7
7
  /** deprecated, set ogImageUrl instead */
8
- imageUrl: z.ZodOptional<z.ZodString>;
8
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
9
9
  /** deprecated, will rely on fc:frame meta tag */
10
10
  buttonTitle: z.ZodOptional<z.ZodString>;
11
- splashImageUrl: z.ZodOptional<z.ZodString>;
11
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
12
12
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
13
- webhookUrl: z.ZodOptional<z.ZodString>;
13
+ webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
14
14
  /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
15
15
  subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
16
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">>;
17
+ screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
18
18
  primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
19
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>;
20
+ heroImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
21
21
  tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
22
22
  ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
23
23
  ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
24
- ogImageUrl: z.ZodOptional<z.ZodString>;
24
+ ogImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
25
25
  /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
26
26
  noindex: z.ZodOptional<z.ZodBoolean>;
27
27
  /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
@@ -29,7 +29,9 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
29
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
30
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
31
31
  /** Documentation will be added once this feature is finalized. */
32
- castShareUrl: z.ZodOptional<z.ZodString>;
32
+ castShareUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
33
+ /** Canonical domain for the frame application */
34
+ canonicalDomain: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
33
35
  }, "strip", z.ZodTypeAny, {
34
36
  name: string;
35
37
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -54,6 +56,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
54
56
  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
57
  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
58
  castShareUrl?: string | undefined;
59
+ canonicalDomain?: string | undefined;
57
60
  }, {
58
61
  name: string;
59
62
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -78,6 +81,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
78
81
  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
82
  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
83
  castShareUrl?: string | undefined;
84
+ canonicalDomain?: string | undefined;
81
85
  }>, {
82
86
  name: string;
83
87
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -102,6 +106,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
102
106
  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
107
  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
108
  castShareUrl?: string | undefined;
109
+ canonicalDomain?: string | undefined;
105
110
  }, {
106
111
  name: string;
107
112
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -126,6 +131,7 @@ export declare const domainFrameConfigSchema: z.ZodEffects<z.ZodObject<{
126
131
  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
132
  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
133
  castShareUrl?: string | undefined;
134
+ canonicalDomain?: string | undefined;
129
135
  }>;
130
136
  export declare const domainManifestSchema: z.ZodObject<{
131
137
  accountAssociation: z.ZodObject<{
@@ -144,26 +150,26 @@ export declare const domainManifestSchema: z.ZodObject<{
144
150
  frame: z.ZodOptional<z.ZodEffects<z.ZodObject<{
145
151
  version: z.ZodUnion<[z.ZodLiteral<"0.0.0">, z.ZodLiteral<"0.0.1">, z.ZodLiteral<"1">, z.ZodLiteral<"next">]>;
146
152
  name: z.ZodString;
147
- iconUrl: z.ZodString;
148
- homeUrl: z.ZodString;
153
+ iconUrl: z.ZodEffects<z.ZodString, string, string>;
154
+ homeUrl: z.ZodEffects<z.ZodString, string, string>;
149
155
  /** deprecated, set ogImageUrl instead */
150
- imageUrl: z.ZodOptional<z.ZodString>;
156
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
151
157
  /** deprecated, will rely on fc:frame meta tag */
152
158
  buttonTitle: z.ZodOptional<z.ZodString>;
153
- splashImageUrl: z.ZodOptional<z.ZodString>;
159
+ splashImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
154
160
  splashBackgroundColor: z.ZodOptional<z.ZodString>;
155
- webhookUrl: z.ZodOptional<z.ZodString>;
161
+ webhookUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
156
162
  /** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
157
163
  subtitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
158
164
  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">>;
165
+ screenshotUrls: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
160
166
  primaryCategory: z.ZodOptional<z.ZodEnum<["games", "social", "finance", "utility", "productivity", "health-fitness", "news-media", "music", "shopping", "education", "developer-tools", "entertainment", "art-creativity"]>>;
161
167
  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>;
168
+ heroImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
163
169
  tagline: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
164
170
  ogTitle: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
165
171
  ogDescription: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
166
- ogImageUrl: z.ZodOptional<z.ZodString>;
172
+ ogImageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
167
173
  /** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
168
174
  noindex: z.ZodOptional<z.ZodBoolean>;
169
175
  /** see https://github.com/farcasterxyz/miniapps/discussions/256 */
@@ -171,7 +177,9 @@ export declare const domainManifestSchema: z.ZodObject<{
171
177
  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
178
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
173
179
  /** Documentation will be added once this feature is finalized. */
174
- castShareUrl: z.ZodOptional<z.ZodString>;
180
+ castShareUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
181
+ /** Canonical domain for the frame application */
182
+ canonicalDomain: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
175
183
  }, "strip", z.ZodTypeAny, {
176
184
  name: string;
177
185
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -196,6 +204,7 @@ export declare const domainManifestSchema: z.ZodObject<{
196
204
  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
205
  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
206
  castShareUrl?: string | undefined;
207
+ canonicalDomain?: string | undefined;
199
208
  }, {
200
209
  name: string;
201
210
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -220,6 +229,7 @@ export declare const domainManifestSchema: z.ZodObject<{
220
229
  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
230
  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
231
  castShareUrl?: string | undefined;
232
+ canonicalDomain?: string | undefined;
223
233
  }>, {
224
234
  name: string;
225
235
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -244,6 +254,7 @@ export declare const domainManifestSchema: z.ZodObject<{
244
254
  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
255
  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
256
  castShareUrl?: string | undefined;
257
+ canonicalDomain?: string | undefined;
247
258
  }, {
248
259
  name: string;
249
260
  version: "1" | "next" | "0.0.0" | "0.0.1";
@@ -268,6 +279,7 @@ export declare const domainManifestSchema: z.ZodObject<{
268
279
  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
280
  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
281
  castShareUrl?: string | undefined;
282
+ canonicalDomain?: string | undefined;
271
283
  }>>;
272
284
  }, "strip", z.ZodTypeAny, {
273
285
  accountAssociation: {
@@ -299,6 +311,7 @@ export declare const domainManifestSchema: z.ZodObject<{
299
311
  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
312
  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
313
  castShareUrl?: string | undefined;
314
+ canonicalDomain?: string | undefined;
302
315
  } | undefined;
303
316
  }, {
304
317
  accountAssociation: {
@@ -330,5 +343,6 @@ export declare const domainManifestSchema: z.ZodObject<{
330
343
  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
344
  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
345
  castShareUrl?: string | undefined;
346
+ canonicalDomain?: string | undefined;
333
347
  } | undefined;
334
348
  }>;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { miniAppHostCapabilityList } from "../types.js";
3
- import { buttonTitleSchema, createSimpleStringSchema, encodedJsonFarcasterSignatureSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from "./shared.js";
3
+ import { buttonTitleSchema, createSimpleStringSchema, domainSchema, encodedJsonFarcasterSignatureSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from "./shared.js";
4
4
  const primaryCategorySchema = z.enum([
5
5
  'games',
6
6
  'social',
@@ -87,6 +87,8 @@ export const domainFrameConfigSchema = z
87
87
  /** see https://github.com/farcasterxyz/miniapps/discussions/158 */
88
88
  /** Documentation will be added once this feature is finalized. */
89
89
  castShareUrl: secureUrlSchema.optional(),
90
+ /** Canonical domain for the frame application */
91
+ canonicalDomain: domainSchema.optional(),
90
92
  })
91
93
  .refine((data) => {
92
94
  if (data.castShareUrl === undefined)