-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
568 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Frog } from 'frog' | ||
|
||
export const app = new Frog({ verify: 'silent', title: 'Signature' }).frameV2( | ||
'/', | ||
(c) => { | ||
return c.res({ | ||
action: { | ||
name: 'My App', | ||
url: 'https://google.com', | ||
splashImageUrl: 'https://google.com', | ||
splashBackgroundColor: '#000', | ||
}, | ||
buttonTitle: 'Button!', | ||
image: 'https://yoink.party/img/start.png', | ||
}) | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import type { TypedResponse } from './response.js' | ||
|
||
export type FrameV2Response = { | ||
/** | ||
* Frame action options. | ||
*/ | ||
action: { | ||
/** | ||
* App name. Required. | ||
* | ||
* @example "Yoink!" | ||
*/ | ||
name: string | ||
/** | ||
* Default launch URL. Required | ||
* | ||
* @example "https://yoink.party/" | ||
*/ | ||
url: string | ||
/** | ||
* 200x200px splash image URL. Must be less than 1MB. | ||
* | ||
* @example "https://yoink.party/img/splash.png" | ||
*/ | ||
splashImageUrl: string | ||
/** | ||
* App Splash Image Background Color. | ||
* | ||
* @example '#000' | ||
*/ | ||
splashBackgroundColor: `#${string}` | ||
} | ||
/** | ||
* Title of the button. | ||
* | ||
* @example 'Yoink!' | ||
*/ | ||
buttonTitle: string | ||
/** | ||
* HTTP response headers. | ||
*/ | ||
headers?: Record<string, string> | undefined | ||
/** | ||
* Path or URI to the OG image. | ||
* | ||
* @default The `image` property. | ||
*/ | ||
ogImage?: string | undefined | ||
/** | ||
* Title of the frame (added as `og:title`). | ||
* | ||
* @example 'Hello Frog' | ||
*/ | ||
ogTitle?: string | undefined | ||
/** | ||
* Additional meta tags for the frame. | ||
*/ | ||
unstable_metaTags?: { property: string; content: string }[] | undefined | ||
/** | ||
* Frame image. Must be 3:2 aspect ratio. Must be less than 10 MB. | ||
* | ||
* | ||
* @example "https://yoink.party/img/start.png" | ||
* @example "/image-1" | ||
*/ | ||
image: string | ||
} | ||
|
||
export type FrameV2ResponseFn = ( | ||
response: FrameV2Response, | ||
) => TypedResponse<FrameV2Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.