@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
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export * from './actions/index.ts'
2
+ export * from './wallet/index.ts'
2
3
  export * as Back from './back.ts'
3
- export * as Context from './context.ts'
4
4
  export * as Errors from './errors.ts'
5
+ export * as Context from './context.ts'
5
6
  export * as Manifest from './manifest.ts'
7
+ export * from './types.ts'
6
8
  export * from './schemas/index.ts'
7
9
  export * from './solana.ts'
8
10
  export * from './solanaWire.ts'
9
- export * from './types.ts'
10
- export * from './wallet/index.ts'
@@ -1,4 +1,4 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
  import {
3
3
  aspectRatioSchema,
4
4
  buttonTitleSchema,
@@ -1,4 +1,4 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
  import { notificationDetailsSchema } from './notifications.ts'
3
3
 
4
4
  export const eventMiniAppAddedSchema = z.object({
@@ -1,5 +1,5 @@
1
1
  export * from './embeds.ts'
2
2
  export * from './events.ts'
3
+ export * from './shared.ts'
3
4
  export * from './manifest.ts'
4
5
  export * from './notifications.ts'
5
- export * from './shared.ts'
@@ -1,4 +1,4 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
  import { miniAppHostCapabilityList } from '../types.ts'
3
3
  import {
4
4
  buttonTitleSchema,
@@ -140,9 +140,3 @@ export const domainManifestSchema = z
140
140
  path: ['frame', 'miniapp'],
141
141
  },
142
142
  )
143
- .transform((schema) => {
144
- return {
145
- ...schema,
146
- frame: schema.frame ?? schema.miniapp,
147
- }
148
- })
@@ -1,4 +1,4 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
  import { secureUrlSchema } from './shared.ts'
3
3
 
4
4
  export const notificationDetailsSchema = z.object({
@@ -1,6 +1,6 @@
1
- import { z } from 'zod'
1
+ import { z } from 'zod/v4'
2
2
 
3
- const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/
3
+ const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=\/\\|~«»]/
4
4
  const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/
5
5
 
6
6
  // Unicode ranges for emoji detection:
@@ -14,10 +14,7 @@ const EMOJI_PATTERN =
14
14
  export const createSimpleStringSchema = ({
15
15
  max,
16
16
  noSpaces,
17
- }: {
18
- max?: number
19
- noSpaces?: boolean
20
- } = {}) => {
17
+ }: { max?: number; noSpaces?: boolean } = {}) => {
21
18
  const stringValidations = noSpaces
22
19
  ? z
23
20
  .string()
package/src/solana.ts CHANGED
@@ -70,7 +70,9 @@ export const createSolanaWalletProvider = (
70
70
  request({ method: 'signMessage', params: { message: msg } }),
71
71
  signTransaction: <T extends SolanaCombinedTransaction>(transaction: T) =>
72
72
  request({ method: 'signTransaction', params: { transaction } }),
73
- signAndSendTransaction: (input: { transaction: SolanaCombinedTransaction }) =>
73
+ signAndSendTransaction: (input: {
74
+ transaction: SolanaCombinedTransaction
75
+ }) =>
74
76
  request({
75
77
  method: 'signAndSendTransaction',
76
78
  params: input,
package/src/solanaWire.ts CHANGED
@@ -95,7 +95,7 @@ export function unwrapSolanaProviderRequest(
95
95
  return await wrappedRequestFn(request)
96
96
  }
97
97
  if (request.method === 'signAndSendTransaction') {
98
- const { transaction } = request.params
98
+ const { transaction, options } = request.params
99
99
  const params = {
100
100
  transaction: serializeTransaction(transaction),
101
101
  }
package/src/types.ts CHANGED
@@ -34,9 +34,9 @@ export type SetPrimaryButtonOptions = {
34
34
  hidden?: boolean
35
35
  }
36
36
 
37
- export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts'
38
37
  // start backwards compat, remove in 1.0
39
38
  export * from './wallet/ethereum.ts'
39
+ export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts'
40
40
  export type SignInOptions = SignIn.SignInOptions
41
41
  // end backwards compat
42
42