@farcaster/miniapp-core 0.3.0 → 0.3.2

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 +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 +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
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export * from './actions/index.ts'
2
- export * from './wallet/index.ts'
3
2
  export * as Back from './back.ts'
4
- export * as Errors from './errors.ts'
5
3
  export * as Context from './context.ts'
4
+ export * as Errors from './errors.ts'
6
5
  export * as Manifest from './manifest.ts'
7
- export * from './types.ts'
8
6
  export * from './schemas/index.ts'
9
7
  export * from './solana.ts'
10
8
  export * from './solanaWire.ts'
9
+ export * from './types.ts'
10
+ export * from './wallet/index.ts'
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4'
1
+ import { z } from 'zod'
2
2
  import {
3
3
  aspectRatioSchema,
4
4
  buttonTitleSchema,
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4'
1
+ import { z } from 'zod'
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'
4
3
  export * from './manifest.ts'
5
4
  export * from './notifications.ts'
5
+ export * from './shared.ts'
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4'
1
+ import { z } from 'zod'
2
2
  import { miniAppHostCapabilityList } from '../types.ts'
3
3
  import {
4
4
  buttonTitleSchema,
@@ -140,3 +140,9 @@ 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/v4'
1
+ import { z } from 'zod'
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/v4'
1
+ import { z } from 'zod'
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,7 +14,10 @@ const EMOJI_PATTERN =
14
14
  export const createSimpleStringSchema = ({
15
15
  max,
16
16
  noSpaces,
17
- }: { max?: number; noSpaces?: boolean } = {}) => {
17
+ }: {
18
+ max?: number
19
+ noSpaces?: boolean
20
+ } = {}) => {
18
21
  const stringValidations = noSpaces
19
22
  ? z
20
23
  .string()
package/src/solana.ts CHANGED
@@ -70,9 +70,7 @@ 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: {
74
- transaction: SolanaCombinedTransaction
75
- }) =>
73
+ signAndSendTransaction: (input: { transaction: SolanaCombinedTransaction }) =>
76
74
  request({
77
75
  method: 'signAndSendTransaction',
78
76
  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, options } = request.params
98
+ const { transaction } = 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'
37
38
  // start backwards compat, remove in 1.0
38
39
  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