@farcaster/miniapp-core 0.0.0-canary-20250701152931 → 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 (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 +40 -324
  6. package/dist/schemas/embeds.js +11 -11
  7. package/dist/schemas/events.d.ts +24 -156
  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 +220 -750
  12. package/dist/schemas/manifest.js +16 -22
  13. package/dist/schemas/notifications.d.ts +10 -48
  14. package/dist/schemas/notifications.js +14 -14
  15. package/dist/schemas/shared.d.ts +7 -23
  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 +40 -324
  25. package/esm/schemas/embeds.js +1 -1
  26. package/esm/schemas/events.d.ts +24 -156
  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 +220 -750
  31. package/esm/schemas/manifest.js +1 -7
  32. package/esm/schemas/notifications.d.ts +10 -48
  33. package/esm/schemas/notifications.js +1 -1
  34. package/esm/schemas/shared.d.ts +7 -23
  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 +1 -1
  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 +1 -7
  47. package/src/schemas/notifications.ts +1 -1
  48. package/src/schemas/shared.ts +3 -6
  49. package/src/solana.ts +3 -1
  50. package/src/solanaWire.ts +1 -1
  51. package/src/types.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
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,10 +121,4 @@ 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
- };
130
124
  });
@@ -1,60 +1,22 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  export declare const notificationDetailsSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  token: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- url: string;
7
- token: string;
8
- }, {
9
- url: string;
10
- token: string;
11
- }>;
5
+ }, z.core.$strip>;
12
6
  export type MiniAppNotificationDetails = z.infer<typeof notificationDetailsSchema>;
13
7
  export declare const sendNotificationRequestSchema: z.ZodObject<{
14
8
  notificationId: z.ZodString;
15
9
  title: z.ZodString;
16
10
  body: z.ZodString;
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
- }>;
11
+ targetUrl: z.ZodString;
12
+ tokens: z.ZodArray<z.ZodString>;
13
+ }, z.core.$strip>;
32
14
  export type SendNotificationRequest = z.infer<typeof sendNotificationRequestSchema>;
33
15
  export declare const sendNotificationResponseSchema: z.ZodObject<{
34
16
  result: z.ZodObject<{
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
- }>;
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>;
60
22
  export type SendNotificationResponse = z.infer<typeof sendNotificationResponseSchema>;
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  import { secureUrlSchema } from "./shared.js";
3
3
  export const notificationDetailsSchema = z.object({
4
4
  url: z.string(),
@@ -1,40 +1,24 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4';
2
2
  export declare const createSimpleStringSchema: ({ max, noSpaces, }?: {
3
3
  max?: number;
4
4
  noSpaces?: boolean;
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>;
5
+ }) => z.ZodString;
6
+ export declare const secureUrlSchema: z.ZodString;
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.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">]>;
11
+ export declare const domainSchema: z.ZodString;
12
+ export declare const aspectRatioSchema: z.ZodUnion<readonly [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
- }, "strip", z.ZodTypeAny, {
18
- header: string;
19
- payload: string;
20
- signature: string;
21
- }, {
22
- header: string;
23
- payload: string;
24
- signature: string;
25
- }>;
17
+ }, z.core.$strip>;
26
18
  export type EncodedJsonFarcasterSignatureSchema = z.infer<typeof encodedJsonFarcasterSignatureSchema>;
27
19
  export declare const jsonFarcasterSignatureHeaderSchema: z.ZodObject<{
28
20
  fid: z.ZodNumber;
29
21
  type: z.ZodLiteral<"app_key">;
30
22
  key: z.ZodString;
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
- }>;
23
+ }, z.core.$strip>;
40
24
  export type JsonFarcasterSignatureHeaderSchema = z.infer<typeof jsonFarcasterSignatureHeaderSchema>;
@@ -1,5 +1,5 @@
1
- import { z } from 'zod';
2
- const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/;
1
+ import { z } from 'zod/v4';
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 } = request.params;
58
+ const { transaction, options } = request.params;
59
59
  const params = {
60
60
  transaction: serializeTransaction(transaction),
61
61
  };