@farcaster/frame-core 0.0.29 → 0.0.32
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/README.md +13 -0
- package/dist/actions/ComposeCast.d.ts +32 -0
- package/dist/actions/ComposeCast.js +2 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +2 -1
- package/dist/errors.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/manifest.d.ts +101 -0
- package/dist/manifest.js +2 -0
- package/dist/schemas/embeds.d.ts +20 -20
- package/dist/schemas/embeds.js +1 -1
- package/dist/schemas/manifest.d.ts +92 -6
- package/dist/schemas/manifest.js +31 -0
- package/dist/schemas/shared.d.ts +4 -0
- package/dist/schemas/shared.js +29 -2
- package/dist/types.d.ts +3 -1
- package/dist/wallet/ethereum.d.ts +5 -1
- package/esm/actions/AddFrame.d.ts +23 -27
- package/esm/actions/AddFrame.js +9 -9
- package/esm/actions/ComposeCast.d.ts +32 -0
- package/esm/actions/ComposeCast.js +1 -0
- package/esm/actions/Ready.d.ts +11 -11
- package/esm/actions/Ready.js +2 -2
- package/esm/actions/SignIn.d.ts +33 -35
- package/esm/actions/SignIn.js +5 -5
- package/esm/actions/Swap.d.ts +43 -44
- 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 +7 -6
- package/esm/actions/index.js +7 -6
- package/esm/context.d.ts +61 -65
- package/esm/context.js +1 -1
- package/esm/errors.d.ts +10 -9
- package/esm/errors.js +6 -6
- package/esm/index.d.ts +7 -5
- package/esm/index.js +7 -5
- package/esm/internal/types.d.ts +7 -18
- package/esm/internal/types.js +1 -1
- package/esm/manifest.d.ts +101 -0
- package/esm/manifest.js +1 -0
- package/esm/schemas/embeds.d.ts +239 -346
- package/esm/schemas/embeds.js +23 -31
- package/esm/schemas/events.d.ts +129 -225
- 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 +196 -154
- package/esm/schemas/manifest.js +54 -29
- package/esm/schemas/notifications.d.ts +58 -86
- package/esm/schemas/notifications.js +17 -17
- package/esm/schemas/shared.d.ts +39 -53
- package/esm/schemas/shared.js +49 -25
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +53 -70
- package/esm/types.js +2 -2
- package/esm/wallet/ethereum.d.ts +39 -50
- 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 +1 -1
- package/src/actions/ComposeCast.ts +36 -0
- package/src/actions/index.ts +1 -0
- package/src/errors.ts +4 -0
- package/src/index.ts +2 -0
- package/src/manifest.ts +113 -0
- package/src/schemas/embeds.ts +1 -1
- package/src/schemas/manifest.ts +33 -0
- package/src/schemas/shared.ts +36 -1
- package/src/types.ts +7 -0
- package/src/wallet/ethereum.ts +5 -1
package/esm/internal/types.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
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
|
-
|
|
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
|
|
2
|
+
[key in keyof type]: type[key];
|
|
3
|
+
} & unknown;
|
|
4
|
+
type KeyofUnion<type> = type extends type ? keyof type : never;
|
|
5
|
+
export type OneOf<union extends object, fallback extends object | undefined = undefined, keys extends KeyofUnion<union> = KeyofUnion<union>> = union extends infer item ? Compute<item & {
|
|
6
|
+
[key in Exclude<keys, keyof item>]?: fallback extends object ? key extends keyof fallback ? fallback[key] : undefined : undefined;
|
|
7
|
+
}> : never;
|
|
8
|
+
export {};
|
package/esm/internal/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Farcaster manifest for a domain hosted at `/.well-known/farcaster.json`
|
|
3
|
+
*/
|
|
4
|
+
export type Manifest = {
|
|
5
|
+
accountAssociation: AccountAssociation;
|
|
6
|
+
frame: FrameConfig;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Signed domain association linking this frame to a Farcaster account
|
|
10
|
+
*
|
|
11
|
+
* A DomainAssociation can be generated using the {@link https://warpcast.com/~/developers/domains | Warpcast
|
|
12
|
+
* Domains Developer} tool.
|
|
13
|
+
*/
|
|
14
|
+
export type AccountAssociation = {
|
|
15
|
+
/**
|
|
16
|
+
* Base64URL encoded JFS signature
|
|
17
|
+
*/
|
|
18
|
+
header: string;
|
|
19
|
+
/**
|
|
20
|
+
* Base64URL encoded payload signature
|
|
21
|
+
*/
|
|
22
|
+
payload: string;
|
|
23
|
+
/**
|
|
24
|
+
* Base64URL encoded signature
|
|
25
|
+
*/
|
|
26
|
+
signature: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Frame configuration
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ``ts
|
|
33
|
+
* const frame: FrameConfig = {
|
|
34
|
+
* version: '1',
|
|
35
|
+
* name: 'Yoink!',
|
|
36
|
+
* homeUrl: 'https://yoink.party',
|
|
37
|
+
* iconUrl: 'https://yoink.party/img/icon.png',
|
|
38
|
+
* imageUrl: 'https://yoink.party/framesV2/opengraph-image',
|
|
39
|
+
* buttonTitle: '🚩 Start',
|
|
40
|
+
* splashImageUrl: 'https://yoink.party/img/splash.png',
|
|
41
|
+
* splashImageBackgroundColor: '#eeeee4',
|
|
42
|
+
* webhookUrl: 'https://yoink.party/webhook'
|
|
43
|
+
* };
|
|
44
|
+
* ``
|
|
45
|
+
*/
|
|
46
|
+
export type FrameConfig = {
|
|
47
|
+
/**
|
|
48
|
+
* Manifest version
|
|
49
|
+
*
|
|
50
|
+
* Must be the literal '1'.
|
|
51
|
+
*/
|
|
52
|
+
version: '1';
|
|
53
|
+
/**
|
|
54
|
+
* App name that will be displayed to users
|
|
55
|
+
*
|
|
56
|
+
* Max length of 32 characters.
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* Default launch URL
|
|
61
|
+
*
|
|
62
|
+
* Max length of 1024 characters.
|
|
63
|
+
*/
|
|
64
|
+
homeUrl: string;
|
|
65
|
+
/**
|
|
66
|
+
* Icon URL
|
|
67
|
+
*
|
|
68
|
+
* Max length of 1024 characters. Image must be 200x200px and less than 1MB.
|
|
69
|
+
*/
|
|
70
|
+
iconUrl: string;
|
|
71
|
+
/**
|
|
72
|
+
* Image URL
|
|
73
|
+
*
|
|
74
|
+
* Max length of 1024 characters. Image must have a 3:2 ratio.
|
|
75
|
+
*/
|
|
76
|
+
imageUrl: string;
|
|
77
|
+
/**
|
|
78
|
+
* Default button title to use when frame is rendered.
|
|
79
|
+
*
|
|
80
|
+
* Max length of 32 characters.
|
|
81
|
+
*/
|
|
82
|
+
buttonTitle: string;
|
|
83
|
+
/**
|
|
84
|
+
* Splash image URL
|
|
85
|
+
*
|
|
86
|
+
* Max length of 1024 characters. Image must be 200x200px and less than 1MB.
|
|
87
|
+
*/
|
|
88
|
+
splashImageUrl?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Splash background color
|
|
91
|
+
*
|
|
92
|
+
* Must be a hex color code.
|
|
93
|
+
*/
|
|
94
|
+
splashBackgroundColor?: string;
|
|
95
|
+
/**
|
|
96
|
+
* URL to which clients will POST server events.
|
|
97
|
+
* Max length of 1024 characters.
|
|
98
|
+
* Required if the frame application uses notifications.
|
|
99
|
+
*/
|
|
100
|
+
webhookUrl?: string;
|
|
101
|
+
};
|
package/esm/manifest.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|