File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
packages/frames.js/src/middleware Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,21 @@ type FramesMessageContext = {
6767 clientProtocol ?: ClientProtocolId ;
6868} ;
6969
70+ /**
71+ * Middleware that extracts and validates Farcaster frame messages.
72+ * Adds the decoded message and client protocol information to the context.
73+ * Only processes POST requests with valid frame action payloads.
74+ *
75+ * @param options - Optional configuration for the Farcaster Hub HTTP URL
76+ * @returns A frames middleware that adds message context
77+ *
78+ * @example
79+ * ```typescript
80+ * const frames = createFrames({
81+ * middleware: [farcasterHubContext()],
82+ * });
83+ * ```
84+ */
7085export function farcasterHubContext (
7186 options ?: HubHttpUrlOptions
7287) : FramesMiddleware < any , FramesMessageContext > {
You can’t perform that action at this time.
0 commit comments