Skip to content

Commit

Permalink
Merge pull request #182 from xmtp/dj/frames-readme
Browse files Browse the repository at this point in the history
Update README for new frames client spec
  • Loading branch information
daria-github authored Feb 6, 2024
2 parents c019140 + ab0dd5d commit 54a7e9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-mugs-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@xmtp/frames-client": patch
---

updated readme
9 changes: 7 additions & 2 deletions packages/frames-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const frameUrl = "https://www.myframe.xyz";
// Read data from a frame
const frameMetadata = await readMetadata(frameUrl);

// Handle a click to button 2 from a conversation with topic "/xmtp/0/123" on messageId "45678"
const payload = await signFrameAction(frameUrl, 2, "/xmtp/0/123", "45678");
// 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,
buttonIndex: 2,
conversationTopic: "/xmtp/0/123",
participantAccountAddresses: ["abc", "xyz"],
});
const updatedFrameMetadata = await postToFrame(frameUrl, payload);
```

0 comments on commit 54a7e9e

Please sign in to comment.