@farcaster/frame-core 0.0.28 → 0.0.29
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.
- package/LICENSE +21 -0
- package/esm/actions/AddFrame.d.ts +27 -23
- package/esm/actions/AddFrame.js +9 -9
- package/esm/actions/Ready.d.ts +11 -11
- package/esm/actions/Ready.js +2 -2
- package/esm/actions/SignIn.d.ts +35 -33
- package/esm/actions/SignIn.js +5 -5
- package/esm/actions/Swap.d.ts +44 -43
- package/esm/actions/Swap.js +1 -1
- package/esm/actions/ViewProfile.d.ts +3 -3
- package/esm/actions/ViewProfile.js +1 -1
- package/esm/actions/ViewToken.d.ts +3 -3
- package/esm/actions/ViewToken.js +1 -1
- package/esm/actions/index.d.ts +6 -6
- package/esm/actions/index.js +6 -6
- package/esm/context.d.ts +65 -61
- package/esm/context.js +1 -1
- package/esm/errors.d.ts +9 -7
- package/esm/errors.js +6 -6
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/internal/types.d.ts +18 -7
- package/esm/internal/types.js +1 -1
- package/esm/schemas/embeds.d.ts +346 -239
- package/esm/schemas/embeds.js +31 -23
- package/esm/schemas/events.d.ts +225 -129
- package/esm/schemas/events.js +17 -17
- package/esm/schemas/index.d.ts +5 -5
- package/esm/schemas/index.js +5 -5
- package/esm/schemas/manifest.d.ts +154 -110
- package/esm/schemas/manifest.js +29 -23
- package/esm/schemas/notifications.d.ts +86 -58
- package/esm/schemas/notifications.js +17 -17
- package/esm/schemas/shared.d.ts +53 -35
- package/esm/schemas/shared.js +25 -23
- package/esm/types.d.ts +70 -51
- package/esm/types.js +2 -2
- package/esm/wallet/ethereum.d.ts +50 -35
- package/esm/wallet/ethereum.js +1 -1
- package/esm/wallet/index.d.ts +1 -1
- package/esm/wallet/index.js +1 -1
- package/package.json +7 -1
package/esm/schemas/events.d.ts
CHANGED
|
@@ -1,131 +1,227 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
export declare const eventFrameAddedSchema: z.ZodObject<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
import type { z } from 'zod'
|
|
2
|
+
export declare const eventFrameAddedSchema: z.ZodObject<
|
|
3
|
+
{
|
|
4
|
+
event: z.ZodLiteral<'frame_added'>
|
|
5
|
+
notificationDetails: z.ZodOptional<
|
|
6
|
+
z.ZodObject<
|
|
7
|
+
{
|
|
8
|
+
url: z.ZodString
|
|
9
|
+
token: z.ZodString
|
|
10
|
+
},
|
|
11
|
+
'strip',
|
|
12
|
+
z.ZodTypeAny,
|
|
13
|
+
{
|
|
14
|
+
url: string
|
|
15
|
+
token: string
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
url: string
|
|
19
|
+
token: string
|
|
20
|
+
}
|
|
21
|
+
>
|
|
22
|
+
>
|
|
23
|
+
},
|
|
24
|
+
'strip',
|
|
25
|
+
z.ZodTypeAny,
|
|
26
|
+
{
|
|
27
|
+
event: 'frame_added'
|
|
28
|
+
notificationDetails?:
|
|
29
|
+
| {
|
|
30
|
+
url: string
|
|
31
|
+
token: string
|
|
32
|
+
}
|
|
33
|
+
| undefined
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
event: 'frame_added'
|
|
37
|
+
notificationDetails?:
|
|
38
|
+
| {
|
|
39
|
+
url: string
|
|
40
|
+
token: string
|
|
41
|
+
}
|
|
42
|
+
| undefined
|
|
43
|
+
}
|
|
44
|
+
>
|
|
45
|
+
export type EventFrameAdded = z.infer<typeof eventFrameAddedSchema>
|
|
46
|
+
export declare const eventFrameRemovedSchema: z.ZodObject<
|
|
47
|
+
{
|
|
48
|
+
event: z.ZodLiteral<'frame_removed'>
|
|
49
|
+
},
|
|
50
|
+
'strip',
|
|
51
|
+
z.ZodTypeAny,
|
|
52
|
+
{
|
|
53
|
+
event: 'frame_removed'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
event: 'frame_removed'
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
export type EventFrameRemoved = z.infer<typeof eventFrameRemovedSchema>
|
|
60
|
+
export declare const eventNotificationsEnabledSchema: z.ZodObject<
|
|
61
|
+
{
|
|
62
|
+
event: z.ZodLiteral<'notifications_enabled'>
|
|
63
|
+
notificationDetails: z.ZodObject<
|
|
64
|
+
{
|
|
65
|
+
url: z.ZodString
|
|
66
|
+
token: z.ZodString
|
|
67
|
+
},
|
|
68
|
+
'strip',
|
|
69
|
+
z.ZodTypeAny,
|
|
70
|
+
{
|
|
71
|
+
url: string
|
|
72
|
+
token: string
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
url: string
|
|
76
|
+
token: string
|
|
77
|
+
}
|
|
78
|
+
>
|
|
79
|
+
},
|
|
80
|
+
'strip',
|
|
81
|
+
z.ZodTypeAny,
|
|
82
|
+
{
|
|
83
|
+
event: 'notifications_enabled'
|
|
50
84
|
notificationDetails: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
|
|
85
|
+
url: string
|
|
86
|
+
token: string
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
event: 'notifications_enabled'
|
|
56
91
|
notificationDetails: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
event:
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
92
|
+
url: string
|
|
93
|
+
token: string
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
>
|
|
97
|
+
export type EventNotificationsEnabled = z.infer<
|
|
98
|
+
typeof eventNotificationsEnabledSchema
|
|
99
|
+
>
|
|
100
|
+
export declare const notificationsDisabledSchema: z.ZodObject<
|
|
101
|
+
{
|
|
102
|
+
event: z.ZodLiteral<'notifications_disabled'>
|
|
103
|
+
},
|
|
104
|
+
'strip',
|
|
105
|
+
z.ZodTypeAny,
|
|
106
|
+
{
|
|
107
|
+
event: 'notifications_disabled'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
event: 'notifications_disabled'
|
|
111
|
+
}
|
|
112
|
+
>
|
|
113
|
+
export type EventNotificationsDisabled = z.infer<
|
|
114
|
+
typeof notificationsDisabledSchema
|
|
115
|
+
>
|
|
116
|
+
export declare const serverEventSchema: z.ZodDiscriminatedUnion<
|
|
117
|
+
'event',
|
|
118
|
+
[
|
|
119
|
+
z.ZodObject<
|
|
120
|
+
{
|
|
121
|
+
event: z.ZodLiteral<'frame_added'>
|
|
122
|
+
notificationDetails: z.ZodOptional<
|
|
123
|
+
z.ZodObject<
|
|
124
|
+
{
|
|
125
|
+
url: z.ZodString
|
|
126
|
+
token: z.ZodString
|
|
127
|
+
},
|
|
128
|
+
'strip',
|
|
129
|
+
z.ZodTypeAny,
|
|
130
|
+
{
|
|
131
|
+
url: string
|
|
132
|
+
token: string
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
url: string
|
|
136
|
+
token: string
|
|
137
|
+
}
|
|
138
|
+
>
|
|
139
|
+
>
|
|
140
|
+
},
|
|
141
|
+
'strip',
|
|
142
|
+
z.ZodTypeAny,
|
|
143
|
+
{
|
|
144
|
+
event: 'frame_added'
|
|
145
|
+
notificationDetails?:
|
|
146
|
+
| {
|
|
147
|
+
url: string
|
|
148
|
+
token: string
|
|
149
|
+
}
|
|
150
|
+
| undefined
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
event: 'frame_added'
|
|
154
|
+
notificationDetails?:
|
|
155
|
+
| {
|
|
156
|
+
url: string
|
|
157
|
+
token: string
|
|
158
|
+
}
|
|
159
|
+
| undefined
|
|
160
|
+
}
|
|
161
|
+
>,
|
|
162
|
+
z.ZodObject<
|
|
163
|
+
{
|
|
164
|
+
event: z.ZodLiteral<'frame_removed'>
|
|
165
|
+
},
|
|
166
|
+
'strip',
|
|
167
|
+
z.ZodTypeAny,
|
|
168
|
+
{
|
|
169
|
+
event: 'frame_removed'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
event: 'frame_removed'
|
|
173
|
+
}
|
|
174
|
+
>,
|
|
175
|
+
z.ZodObject<
|
|
176
|
+
{
|
|
177
|
+
event: z.ZodLiteral<'notifications_enabled'>
|
|
178
|
+
notificationDetails: z.ZodObject<
|
|
179
|
+
{
|
|
180
|
+
url: z.ZodString
|
|
181
|
+
token: z.ZodString
|
|
182
|
+
},
|
|
183
|
+
'strip',
|
|
184
|
+
z.ZodTypeAny,
|
|
185
|
+
{
|
|
186
|
+
url: string
|
|
187
|
+
token: string
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
url: string
|
|
191
|
+
token: string
|
|
192
|
+
}
|
|
193
|
+
>
|
|
194
|
+
},
|
|
195
|
+
'strip',
|
|
196
|
+
z.ZodTypeAny,
|
|
197
|
+
{
|
|
198
|
+
event: 'notifications_enabled'
|
|
199
|
+
notificationDetails: {
|
|
200
|
+
url: string
|
|
201
|
+
token: string
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
event: 'notifications_enabled'
|
|
206
|
+
notificationDetails: {
|
|
207
|
+
url: string
|
|
208
|
+
token: string
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
>,
|
|
212
|
+
z.ZodObject<
|
|
213
|
+
{
|
|
214
|
+
event: z.ZodLiteral<'notifications_disabled'>
|
|
215
|
+
},
|
|
216
|
+
'strip',
|
|
217
|
+
z.ZodTypeAny,
|
|
218
|
+
{
|
|
219
|
+
event: 'notifications_disabled'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
event: 'notifications_disabled'
|
|
223
|
+
}
|
|
224
|
+
>,
|
|
225
|
+
]
|
|
226
|
+
>
|
|
227
|
+
export type FrameServerEvent = z.infer<typeof serverEventSchema>
|
package/esm/schemas/events.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
import { notificationDetailsSchema } from './notifications'
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
import { notificationDetailsSchema } from './notifications'
|
|
3
3
|
export const eventFrameAddedSchema = z.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
4
|
+
event: z.literal('frame_added'),
|
|
5
|
+
notificationDetails: notificationDetailsSchema.optional(),
|
|
6
|
+
})
|
|
7
7
|
export const eventFrameRemovedSchema = z.object({
|
|
8
|
-
|
|
9
|
-
})
|
|
8
|
+
event: z.literal('frame_removed'),
|
|
9
|
+
})
|
|
10
10
|
export const eventNotificationsEnabledSchema = z.object({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
11
|
+
event: z.literal('notifications_enabled'),
|
|
12
|
+
notificationDetails: notificationDetailsSchema.required(),
|
|
13
|
+
})
|
|
14
14
|
export const notificationsDisabledSchema = z.object({
|
|
15
|
-
|
|
16
|
-
})
|
|
15
|
+
event: z.literal('notifications_disabled'),
|
|
16
|
+
})
|
|
17
17
|
export const serverEventSchema = z.discriminatedUnion('event', [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
])
|
|
18
|
+
eventFrameAddedSchema,
|
|
19
|
+
eventFrameRemovedSchema,
|
|
20
|
+
eventNotificationsEnabledSchema,
|
|
21
|
+
notificationsDisabledSchema,
|
|
22
|
+
])
|
package/esm/schemas/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './embeds'
|
|
2
|
-
export * from './events'
|
|
3
|
-
export * from './shared'
|
|
4
|
-
export * from './manifest'
|
|
5
|
-
export * from './notifications'
|
|
1
|
+
export * from './embeds'
|
|
2
|
+
export * from './events'
|
|
3
|
+
export * from './shared'
|
|
4
|
+
export * from './manifest'
|
|
5
|
+
export * from './notifications'
|
package/esm/schemas/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './embeds'
|
|
2
|
-
export * from './events'
|
|
3
|
-
export * from './shared'
|
|
4
|
-
export * from './manifest'
|
|
5
|
-
export * from './notifications'
|
|
1
|
+
export * from './embeds'
|
|
2
|
+
export * from './events'
|
|
3
|
+
export * from './shared'
|
|
4
|
+
export * from './manifest'
|
|
5
|
+
export * from './notifications'
|