From 10cbf5162bf0748f7927ef2798811f24295285bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 23 Nov 2024 17:38:08 +0000 Subject: [PATCH 1/4] release: version packages --- .changeset/blue-wasps-hunt.md | 6 ------ packages/frames-client/CHANGELOG.md | 6 ++++++ packages/frames-client/package.json | 2 +- packages/frames-validator/CHANGELOG.md | 6 ++++++ packages/frames-validator/package.json | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 .changeset/blue-wasps-hunt.md diff --git a/.changeset/blue-wasps-hunt.md b/.changeset/blue-wasps-hunt.md deleted file mode 100644 index 5b25c2e42..000000000 --- a/.changeset/blue-wasps-hunt.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@xmtp/frames-client": major -"@xmtp/frames-validator": major ---- - -Add V3 support to Frames client and validator diff --git a/packages/frames-client/CHANGELOG.md b/packages/frames-client/CHANGELOG.md index 17fd80c38..62d8bac7f 100644 --- a/packages/frames-client/CHANGELOG.md +++ b/packages/frames-client/CHANGELOG.md @@ -1,5 +1,11 @@ # @xmtp/frames-client +## 1.0.0 + +### Major Changes + +- 86a8f9f: Add V3 support to Frames client and validator + ## 0.5.5 ### Patch Changes diff --git a/packages/frames-client/package.json b/packages/frames-client/package.json index a1096a3e5..c36b9ba50 100644 --- a/packages/frames-client/package.json +++ b/packages/frames-client/package.json @@ -1,6 +1,6 @@ { "name": "@xmtp/frames-client", - "version": "0.5.5", + "version": "1.0.0", "keywords": [ "xmtp", "messaging", diff --git a/packages/frames-validator/CHANGELOG.md b/packages/frames-validator/CHANGELOG.md index 24ee51a30..7883c90b0 100644 --- a/packages/frames-validator/CHANGELOG.md +++ b/packages/frames-validator/CHANGELOG.md @@ -1,5 +1,11 @@ # @xmtp/frames-validator +## 1.0.0 + +### Major Changes + +- 86a8f9f: Add V3 support to Frames client and validator + ## 0.6.3 ### Patch Changes diff --git a/packages/frames-validator/package.json b/packages/frames-validator/package.json index 8e1d214c8..68f618913 100644 --- a/packages/frames-validator/package.json +++ b/packages/frames-validator/package.json @@ -1,6 +1,6 @@ { "name": "@xmtp/frames-validator", - "version": "0.6.3", + "version": "1.0.0", "description": "A validator for XMTP frames requests", "homepage": "https://github.com/xmtp/xmtp-js", "bugs": { @@ -49,7 +49,7 @@ "@open-frames/types": "^0.1.1", "@rollup/plugin-typescript": "^12.1.1", "@types/bl": "^5.1.4", - "@xmtp/frames-client": "^0.5.5", + "@xmtp/frames-client": "^1.0.0", "@xmtp/xmtp-js": "^12.1.0", "ethers": "^6.10.0", "fast-glob": "^3.3.2", From d2301c27cd8078ec3a62c920c2c8523aea0d95ac Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Sat, 23 Nov 2024 11:44:12 -0600 Subject: [PATCH 2/4] Update CHANGELOG.md --- packages/frames-client/CHANGELOG.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/frames-client/CHANGELOG.md b/packages/frames-client/CHANGELOG.md index 62d8bac7f..aabb811d6 100644 --- a/packages/frames-client/CHANGELOG.md +++ b/packages/frames-client/CHANGELOG.md @@ -2,9 +2,28 @@ ## 1.0.0 -### Major Changes +### BREAKING CHANGE -- 86a8f9f: Add V3 support to Frames client and validator +- 86a8f9f: Refactored signing process using a new `FramesSigner` type + +The `FramesClient` class now accepts a `FramesSigner` that handles signing of the frame actions. It supports both V2 and V3 signers. + +```ts +type V2FramesSigner = { + address: () => Promise | string; + getPublicKeyBundle: () => Promise; + sign: (message: Uint8Array) => Promise; +}; + +type V3FramesSigner = { + installationId: () => Promise | Uint8Array; + inboxId: () => Promise | string; + address: () => Promise | string; + sign: (message: Uint8Array) => Promise | Uint8Array; +}; + +type FramesSigner = V2FramesSigner | V3FramesSigner; +``` ## 0.5.5 From eab35c236ebe7cf67a1d2851c7df0303f235b5bb Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Sat, 23 Nov 2024 11:52:18 -0600 Subject: [PATCH 3/4] Update CHANGELOG.md --- packages/frames-validator/CHANGELOG.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/frames-validator/CHANGELOG.md b/packages/frames-validator/CHANGELOG.md index 7883c90b0..231be21fe 100644 --- a/packages/frames-validator/CHANGELOG.md +++ b/packages/frames-validator/CHANGELOG.md @@ -2,9 +2,22 @@ ## 1.0.0 -### Major Changes +### BREAKING CHANGE -- 86a8f9f: Add V3 support to Frames client and validator +- 86a8f9f: Added support for validating V3 frames + +`validateFramesPost` is now async to support fetching the inbox ID of an account address when validating V3 frames. It also accepts a second parameter to specify the environment to use when looking up inbox IDs. In production, this parameter **must** be set to `production`. + +```ts +import { XmtpValidator, validateFramesPost } from "@xmtp/frames-validator"; + +const validator = new XmtpValidator(); +// environment must be set in production (default: "dev") +const validation = await validator(payload, "production"); + +// now async, also requires environment in production (default: "dev") +const validation = await validateFramesPost(payload, "production"); +``` ## 0.6.3 From dcdd09b5a8c36f9dac9a877fd64cd375f602664f Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Sat, 23 Nov 2024 11:54:59 -0600 Subject: [PATCH 4/4] Update yarn.lock --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 64021aed1..011b1f852 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5024,7 +5024,7 @@ __metadata: languageName: unknown linkType: soft -"@xmtp/frames-client@npm:^0.5.5, @xmtp/frames-client@workspace:packages/frames-client": +"@xmtp/frames-client@npm:^1.0.0, @xmtp/frames-client@workspace:packages/frames-client": version: 0.0.0-use.local resolution: "@xmtp/frames-client@workspace:packages/frames-client" dependencies: @@ -5064,7 +5064,7 @@ __metadata: "@open-frames/types": "npm:^0.1.1" "@rollup/plugin-typescript": "npm:^12.1.1" "@types/bl": "npm:^5.1.4" - "@xmtp/frames-client": "npm:^0.5.5" + "@xmtp/frames-client": "npm:^1.0.0" "@xmtp/node-sdk": "npm:^0.0.27" "@xmtp/proto": "npm:^3.72.3" "@xmtp/xmtp-js": "npm:^12.1.0"