Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionPost = "post" ActionPostRedirect = "post_redirect" ActionMint = "mint" ActionLink = "link" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AspectRatio ¶
type AspectRatio string
const ( AspectRatio_1_1 AspectRatio = "1:1" AspectRatio_2_1 AspectRatio = "1.9:1" )
func (AspectRatio) String ¶
func (s AspectRatio) String() string
type Button ¶
type Button struct { // Label (required) a string to be displayed on the button Label string // Action must be `post`, `post_redirect`, `mint` or `link`. Defaults to `post` if not specified Action string // Target (optional) URL to send the Signature Packet to. Target string }
Button represents a button to be displayed in the farcaster client.
func NewLinkButton ¶
NewLinkButton creates a new button with the action set to `link`.
func NewMintButton ¶
NewMintButton creates a new button with the action set to `mint`.
func NewPostButton ¶
NewPostButton creates a new button with the action set to `post`.
func NewPostRedirectButton ¶
NewPostRedirectButton creates a new button with the action set to `post_redirect`.
type Frame ¶
type Frame struct { // Version (required) a valid frame version string. The string must be a release date (e.g. 2020-01-01) or vNext. Version string // Image (required) to be rendered in the frame Image Image // InputLabel (optional) when set, frame will include an input field with the given label InputLabel string // Buttons 0 or more buttons to be rendered in the frame Buttons []Button // PostURL is a 256-byte string which contains a valid URL to send the Signature Packet to PostURL string }
Frame represents a frame to be displayed in the farcaster client.
type FrameAction ¶
FrameAction represents an action performed within a frame in the farcaster client.
type Image ¶
type Image struct { URL string AspectRatio AspectRatio }
type Message ¶
type Message struct { Data MessageData Hash string HashScheme string Signature string SignatureScheme string Signer string }
Message represents a message from farcaster to the frame server
type MessageData ¶
type MessageData struct { Type string FID int Timestamp time.Time Network string FrameActionBody FrameAction }
MessageData holds the actual data of a message
Click to show internal directories.
Click to hide internal directories.