@farcaster/frame-core 0.0.27 → 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/dist/actions/Ready.d.ts +13 -0
- package/dist/actions/Ready.js +6 -0
- package/dist/actions/index.d.ts +3 -2
- package/dist/actions/index.js +4 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +12 -77
- package/dist/types.js +18 -3
- package/dist/wallet/ethereum.d.ts +43 -0
- package/dist/wallet/ethereum.js +2 -0
- package/dist/wallet/index.d.ts +1 -0
- package/dist/wallet/index.js +37 -0
- package/esm/actions/AddFrame.d.ts +27 -23
- package/esm/actions/AddFrame.js +9 -9
- package/esm/actions/Ready.d.ts +13 -0
- package/esm/actions/Ready.js +3 -0
- 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 -5
- package/esm/actions/index.js +6 -5
- 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 -4
- package/esm/index.js +5 -4
- 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/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +69 -115
- package/esm/types.js +3 -3
- package/esm/wallet/ethereum.d.ts +58 -0
- package/esm/wallet/ethereum.js +1 -0
- package/esm/wallet/index.d.ts +1 -0
- package/esm/wallet/index.js +1 -0
- package/package.json +8 -2
- package/src/actions/Ready.ts +15 -0
- package/src/actions/index.ts +3 -2
- package/src/index.ts +1 -0
- package/src/types.ts +22 -100
- package/src/wallet/ethereum.ts +61 -0
- package/src/wallet/index.ts +1 -0
package/esm/actions/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * as AddFrame from './AddFrame'
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
1
|
+
export * as AddFrame from './AddFrame'
|
|
2
|
+
export * as Ready from './Ready'
|
|
3
|
+
export * as SignIn from './SignIn'
|
|
4
|
+
export * as Swap from './Swap'
|
|
5
|
+
export * as ViewProfile from './ViewProfile'
|
|
6
|
+
export * as ViewToken from './ViewToken'
|
package/esm/actions/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * as AddFrame from './AddFrame'
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
1
|
+
export * as AddFrame from './AddFrame'
|
|
2
|
+
export * as Ready from './Ready'
|
|
3
|
+
export * as SignIn from './SignIn'
|
|
4
|
+
export * as Swap from './Swap'
|
|
5
|
+
export * as ViewProfile from './ViewProfile'
|
|
6
|
+
export * as ViewToken from './ViewToken'
|
package/esm/context.d.ts
CHANGED
|
@@ -1,72 +1,76 @@
|
|
|
1
|
-
import type { FrameNotificationDetails } from './schemas'
|
|
1
|
+
import type { FrameNotificationDetails } from './schemas'
|
|
2
2
|
export type CastEmbedLocationContext = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
type: 'cast_embed'
|
|
4
|
+
embed: string
|
|
5
|
+
cast: {
|
|
6
|
+
fid: number
|
|
7
|
+
hash: string
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
10
|
export type NotificationLocationContext = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
11
|
+
type: 'notification'
|
|
12
|
+
notification: {
|
|
13
|
+
notificationId: string
|
|
14
|
+
title: string
|
|
15
|
+
body: string
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
export type LauncherLocationContext = {
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
type: 'launcher'
|
|
20
|
+
}
|
|
21
21
|
export type ChannelLocationContext = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Channel key identifier
|
|
26
|
-
*/
|
|
27
|
-
key: string;
|
|
28
|
-
/**
|
|
29
|
-
* Channel name
|
|
30
|
-
*/
|
|
31
|
-
name: string;
|
|
32
|
-
/**
|
|
33
|
-
* Channel profile image URL
|
|
34
|
-
*/
|
|
35
|
-
imageUrl?: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export type LocationContext = CastEmbedLocationContext | NotificationLocationContext | LauncherLocationContext | ChannelLocationContext;
|
|
39
|
-
export type AccountLocation = {
|
|
40
|
-
placeId: string;
|
|
22
|
+
type: 'channel'
|
|
23
|
+
channel: {
|
|
41
24
|
/**
|
|
42
|
-
*
|
|
25
|
+
* Channel key identifier
|
|
43
26
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
displayName?: string;
|
|
27
|
+
key: string
|
|
28
|
+
/**
|
|
29
|
+
* Channel name
|
|
30
|
+
*/
|
|
31
|
+
name: string
|
|
50
32
|
/**
|
|
51
|
-
*
|
|
33
|
+
* Channel profile image URL
|
|
52
34
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
35
|
+
imageUrl?: string
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export type LocationContext =
|
|
39
|
+
| CastEmbedLocationContext
|
|
40
|
+
| NotificationLocationContext
|
|
41
|
+
| LauncherLocationContext
|
|
42
|
+
| ChannelLocationContext
|
|
43
|
+
export type AccountLocation = {
|
|
44
|
+
placeId: string
|
|
45
|
+
/**
|
|
46
|
+
* Human-readable string describing the location
|
|
47
|
+
*/
|
|
48
|
+
description: string
|
|
49
|
+
}
|
|
50
|
+
export type UserContext = {
|
|
51
|
+
fid: number
|
|
52
|
+
username?: string
|
|
53
|
+
displayName?: string
|
|
54
|
+
/**
|
|
55
|
+
* Profile image URL
|
|
56
|
+
*/
|
|
57
|
+
pfpUrl?: string
|
|
58
|
+
location?: AccountLocation
|
|
59
|
+
}
|
|
56
60
|
export type SafeAreaInsets = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
61
|
+
top: number
|
|
62
|
+
bottom: number
|
|
63
|
+
left: number
|
|
64
|
+
right: number
|
|
65
|
+
}
|
|
62
66
|
export type ClientContext = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
67
|
+
clientFid: number
|
|
68
|
+
added: boolean
|
|
69
|
+
notificationDetails?: FrameNotificationDetails
|
|
70
|
+
safeAreaInsets?: SafeAreaInsets
|
|
71
|
+
}
|
|
68
72
|
export type FrameContext = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
+
client: ClientContext
|
|
74
|
+
user: UserContext
|
|
75
|
+
location?: LocationContext
|
|
76
|
+
}
|
package/esm/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {}
|
package/esm/errors.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export declare class BaseError<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare class BaseError<
|
|
2
|
+
cause extends Error | undefined = undefined,
|
|
3
|
+
> extends Error {
|
|
4
|
+
name: string
|
|
5
|
+
cause: cause
|
|
6
|
+
constructor(message: string, options?: BaseError.Options<cause>)
|
|
5
7
|
}
|
|
6
8
|
export declare namespace BaseError {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
type Options<cause extends Error | undefined = Error | undefined> = {
|
|
10
|
+
cause?: cause | undefined
|
|
11
|
+
}
|
|
10
12
|
}
|
package/esm/errors.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class BaseError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
name = 'BaseError'
|
|
3
|
+
cause
|
|
4
|
+
constructor(message, options = {}) {
|
|
5
|
+
super(message, options.cause ? { cause: options.cause } : undefined)
|
|
6
|
+
this.cause = options.cause
|
|
7
|
+
}
|
|
8
8
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './actions'
|
|
2
|
-
export *
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
1
|
+
export * from './actions'
|
|
2
|
+
export * from './wallet'
|
|
3
|
+
export * as Context from './context'
|
|
4
|
+
export * from './types'
|
|
5
|
+
export * from './schemas'
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './actions'
|
|
2
|
-
export *
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
1
|
+
export * from './actions'
|
|
2
|
+
export * from './wallet'
|
|
3
|
+
export * as Context from './context'
|
|
4
|
+
export * from './types'
|
|
5
|
+
export * from './schemas'
|
package/esm/internal/types.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
type Compute<type> = {
|
|
2
|
-
|
|
3
|
-
} & unknown
|
|
4
|
-
type KeyofUnion<type> = type extends type ? keyof type : never
|
|
5
|
-
export type OneOf<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
[key in keyof type]: type[key]
|
|
3
|
+
} & unknown
|
|
4
|
+
type KeyofUnion<type> = type extends type ? keyof type : never
|
|
5
|
+
export type OneOf<
|
|
6
|
+
union extends object,
|
|
7
|
+
fallback extends object | undefined = undefined,
|
|
8
|
+
keys extends KeyofUnion<union> = KeyofUnion<union>,
|
|
9
|
+
> = union extends infer item
|
|
10
|
+
? Compute<
|
|
11
|
+
item & {
|
|
12
|
+
[key in Exclude<keys, keyof item>]?: fallback extends object
|
|
13
|
+
? key extends keyof fallback
|
|
14
|
+
? fallback[key]
|
|
15
|
+
: undefined
|
|
16
|
+
: undefined
|
|
17
|
+
}
|
|
18
|
+
>
|
|
19
|
+
: never
|
package/esm/internal/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {}
|