From 68c5121e6f451b86dbf2a382ee6c6314cb9149ed Mon Sep 17 00:00:00 2001 From: Fabri Date: Tue, 30 Apr 2024 18:28:31 -0300 Subject: [PATCH 1/2] Update README.md Added state to Docs --- packages/frames-client/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/frames-client/README.md b/packages/frames-client/README.md index ccca7e38..216b28b3 100644 --- a/packages/frames-client/README.md +++ b/packages/frames-client/README.md @@ -20,10 +20,12 @@ const imageUrl = framesClient.proxy.mediaUrl( // Handle a click to button 2 from a conversation with topic "/xmtp/0/123" and participant addresses "abc" and "xyz" const payload = await signFrameAction({ frameUrl, + inputText: textInputValue || undefined, buttonIndex: 2, conversationTopic: "/xmtp/0/123", participantAccountAddresses: ["abc", "xyz"], address: "0x...", + state: frameInfo.state, }); // If the button action type was `post` From 470b956333e3ed3019391a72d2def386e466077d Mon Sep 17 00:00:00 2001 From: fabri Date: Tue, 30 Apr 2024 20:26:45 -0300 Subject: [PATCH 2/2] =?UTF-8?q?=E2=80=9Cupdate=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frames-client/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/frames-client/README.md b/packages/frames-client/README.md index 216b28b3..edeacbcd 100644 --- a/packages/frames-client/README.md +++ b/packages/frames-client/README.md @@ -1,4 +1,6 @@ -# frames-client +# Frames Client + +This repo is used by messaging apps to render Open Frames. ## Usage @@ -18,6 +20,7 @@ const imageUrl = framesClient.proxy.mediaUrl( ); // Handle a click to button 2 from a conversation with topic "/xmtp/0/123" and participant addresses "abc" and "xyz" +const textInputValue = "Your value"; const payload = await signFrameAction({ frameUrl, inputText: textInputValue || undefined, @@ -25,7 +28,7 @@ const payload = await signFrameAction({ conversationTopic: "/xmtp/0/123", participantAccountAddresses: ["abc", "xyz"], address: "0x...", - state: frameInfo.state, + state: frameMetadata?.frameInfo?.state, // Pulled from frame metadata }); // If the button action type was `post`