@farcaster/miniapp-core 0.0.0-canary-20250630212526 → 0.0.0-canary-20250701152931

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 (51) hide show
  1. package/dist/actions/index.d.ts +1 -1
  2. package/dist/actions/index.js +2 -2
  3. package/dist/index.d.ts +3 -3
  4. package/dist/index.js +4 -4
  5. package/dist/schemas/embeds.d.ts +324 -40
  6. package/dist/schemas/embeds.js +11 -11
  7. package/dist/schemas/events.d.ts +156 -24
  8. package/dist/schemas/events.js +14 -14
  9. package/dist/schemas/index.d.ts +1 -1
  10. package/dist/schemas/index.js +1 -1
  11. package/dist/schemas/manifest.d.ts +750 -220
  12. package/dist/schemas/manifest.js +22 -16
  13. package/dist/schemas/notifications.d.ts +48 -10
  14. package/dist/schemas/notifications.js +14 -14
  15. package/dist/schemas/shared.d.ts +23 -7
  16. package/dist/schemas/shared.js +19 -19
  17. package/dist/solanaWire.js +1 -1
  18. package/dist/types.d.ts +1 -1
  19. package/dist/types.js +2 -2
  20. package/esm/actions/index.d.ts +1 -1
  21. package/esm/actions/index.js +1 -1
  22. package/esm/index.d.ts +3 -3
  23. package/esm/index.js +3 -3
  24. package/esm/schemas/embeds.d.ts +324 -40
  25. package/esm/schemas/embeds.js +1 -1
  26. package/esm/schemas/events.d.ts +156 -24
  27. package/esm/schemas/events.js +1 -1
  28. package/esm/schemas/index.d.ts +1 -1
  29. package/esm/schemas/index.js +1 -1
  30. package/esm/schemas/manifest.d.ts +750 -220
  31. package/esm/schemas/manifest.js +7 -1
  32. package/esm/schemas/notifications.d.ts +48 -10
  33. package/esm/schemas/notifications.js +1 -1
  34. package/esm/schemas/shared.d.ts +23 -7
  35. package/esm/schemas/shared.js +2 -2
  36. package/esm/solanaWire.js +1 -1
  37. package/esm/tsconfig.tsbuildinfo +1 -1
  38. package/esm/types.d.ts +1 -1
  39. package/esm/types.js +1 -1
  40. package/package.json +2 -2
  41. package/src/actions/index.ts +1 -1
  42. package/src/index.ts +3 -3
  43. package/src/schemas/embeds.ts +1 -1
  44. package/src/schemas/events.ts +1 -1
  45. package/src/schemas/index.ts +1 -1
  46. package/src/schemas/manifest.ts +7 -1
  47. package/src/schemas/notifications.ts +1 -1
  48. package/src/schemas/shared.ts +6 -3
  49. package/src/solana.ts +1 -3
  50. package/src/solanaWire.ts +1 -1
  51. package/src/types.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { miniAppHostCapabilityList } from "../types.js";
3
3
  import { buttonTitleSchema, createSimpleStringSchema, domainSchema, encodedJsonFarcasterSignatureSchema, hexColorSchema, miniAppNameSchema, secureUrlSchema, } from "./shared.js";
4
4
  const primaryCategorySchema = z.enum([
@@ -121,4 +121,10 @@ export const domainManifestSchema = z
121
121
  }, {
122
122
  message: 'If both "frame" and "miniapp" are provided, they must be identical',
123
123
  path: ['frame', 'miniapp'],
124
+ })
125
+ .transform((schema) => {
126
+ return {
127
+ ...schema,
128
+ frame: schema.frame ?? schema.miniapp,
129
+ };
124
130
  });
@@ -1,22 +1,60 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  export declare const notificationDetailsSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  token: z.ZodString;
5
- }, z.core.$strip>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ url: string;
7
+ token: string;
8
+ }, {
9
+ url: string;
10
+ token: string;
11
+ }>;
6
12
  export type MiniAppNotificationDetails = z.infer<typeof notificationDetailsSchema>;
7
13
  export declare const sendNotificationRequestSchema: z.ZodObject<{
8
14
  notificationId: z.ZodString;
9
15
  title: z.ZodString;
10
16
  body: z.ZodString;
11
- targetUrl: z.ZodString;
12
- tokens: z.ZodArray<z.ZodString>;
13
- }, z.core.$strip>;
17
+ targetUrl: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
18
+ tokens: z.ZodArray<z.ZodString, "many">;
19
+ }, "strip", z.ZodTypeAny, {
20
+ title: string;
21
+ notificationId: string;
22
+ body: string;
23
+ targetUrl: string;
24
+ tokens: string[];
25
+ }, {
26
+ title: string;
27
+ notificationId: string;
28
+ body: string;
29
+ targetUrl: string;
30
+ tokens: string[];
31
+ }>;
14
32
  export type SendNotificationRequest = z.infer<typeof sendNotificationRequestSchema>;
15
33
  export declare const sendNotificationResponseSchema: z.ZodObject<{
16
34
  result: z.ZodObject<{
17
- successfulTokens: z.ZodArray<z.ZodString>;
18
- invalidTokens: z.ZodArray<z.ZodString>;
19
- rateLimitedTokens: z.ZodArray<z.ZodString>;
20
- }, z.core.$strip>;
21
- }, z.core.$strip>;
35
+ successfulTokens: z.ZodArray<z.ZodString, "many">;
36
+ invalidTokens: z.ZodArray<z.ZodString, "many">;
37
+ rateLimitedTokens: z.ZodArray<z.ZodString, "many">;
38
+ }, "strip", z.ZodTypeAny, {
39
+ successfulTokens: string[];
40
+ invalidTokens: string[];
41
+ rateLimitedTokens: string[];
42
+ }, {
43
+ successfulTokens: string[];
44
+ invalidTokens: string[];
45
+ rateLimitedTokens: string[];
46
+ }>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ result: {
49
+ successfulTokens: string[];
50
+ invalidTokens: string[];
51
+ rateLimitedTokens: string[];
52
+ };
53
+ }, {
54
+ result: {
55
+ successfulTokens: string[];
56
+ invalidTokens: string[];
57
+ rateLimitedTokens: string[];
58
+ };
59
+ }>;
22
60
  export type SendNotificationResponse = z.infer<typeof sendNotificationResponseSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  import { secureUrlSchema } from "./shared.js";
3
3
  export const notificationDetailsSchema = z.object({
4
4
  url: z.string(),
@@ -1,24 +1,40 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from 'zod';
2
2
  export declare const createSimpleStringSchema: ({ max, noSpaces, }?: {
3
3
  max?: number;
4
4
  noSpaces?: boolean;
5
- }) => z.ZodString;
6
- export declare const secureUrlSchema: z.ZodString;
5
+ }) => z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
6
+ export declare const secureUrlSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
7
  export declare const miniAppNameSchema: 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.ZodString;
12
- export declare const aspectRatioSchema: z.ZodUnion<readonly [z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
11
+ export declare const domainSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
12
+ export declare const aspectRatioSchema: z.ZodUnion<[z.ZodLiteral<"1:1">, z.ZodLiteral<"3:2">]>;
13
13
  export declare const encodedJsonFarcasterSignatureSchema: z.ZodObject<{
14
14
  header: z.ZodString;
15
15
  payload: z.ZodString;
16
16
  signature: z.ZodString;
17
- }, z.core.$strip>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ header: string;
19
+ payload: string;
20
+ signature: string;
21
+ }, {
22
+ header: string;
23
+ payload: string;
24
+ signature: string;
25
+ }>;
18
26
  export type EncodedJsonFarcasterSignatureSchema = z.infer<typeof encodedJsonFarcasterSignatureSchema>;
19
27
  export declare const jsonFarcasterSignatureHeaderSchema: z.ZodObject<{
20
28
  fid: z.ZodNumber;
21
29
  type: z.ZodLiteral<"app_key">;
22
30
  key: z.ZodString;
23
- }, z.core.$strip>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ type: "app_key";
33
+ fid: number;
34
+ key: string;
35
+ }, {
36
+ type: "app_key";
37
+ fid: number;
38
+ key: string;
39
+ }>;
24
40
  export type JsonFarcasterSignatureHeaderSchema = z.infer<typeof jsonFarcasterSignatureHeaderSchema>;
@@ -1,5 +1,5 @@
1
- import { z } from 'zod/v4';
2
- const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=\/\\|~«»]/;
1
+ import { z } from 'zod';
2
+ const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/;
3
3
  const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
4
4
  // Unicode ranges for emoji detection:
5
5
  // \u{1F300}-\u{1F9FF} - Miscellaneous Symbols, Pictographs, Emoticons, Transport, Map, and Supplemental
package/esm/solanaWire.js CHANGED
@@ -55,7 +55,7 @@ export function unwrapSolanaProviderRequest(wrappedRequestFn) {
55
55
  return await wrappedRequestFn(request);
56
56
  }
57
57
  if (request.method === 'signAndSendTransaction') {
58
- const { transaction, options } = request.params;
58
+ const { transaction } = request.params;
59
59
  const params = {
60
60
  transaction: serializeTransaction(transaction),
61
61
  };