diff --git a/README.md b/README.md index d90804b2..9ede07dd 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,6 @@ To learn more about the contents of this repository, see this README and the REA - [`eslint-config-xmtp-web`](https://github.com/xmtp/xmtp-web/blob/main/packages/eslint-config-xmtp-web): An opinionated ESLint configuration for XMTP web projects - [`react-sdk`](https://github.com/xmtp/xmtp-web/blob/main/packages/react-sdk): XMTP React client SDK -- [`frames-client`](https://github.com/xmtp/xmtp-web/blob/main/packages/frames-client): XMTP Open Frames client -- [`consent-proof-signature`](https://github.com/xmtp/xmtp-web/blob/main/packages/consent-proof-signature): Lightweight package for creating consent proofs - ### Examples diff --git a/packages/consent-proof-signature/.eslintrc.cjs b/packages/consent-proof-signature/.eslintrc.cjs deleted file mode 100644 index 0e3d6a26..00000000 --- a/packages/consent-proof-signature/.eslintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - root: true, - extends: ["xmtp-web"], - parserOptions: { - project: "./tsconfig.eslint.json", - }, -}; diff --git a/packages/consent-proof-signature/CHANGELOG.md b/packages/consent-proof-signature/CHANGELOG.md deleted file mode 100644 index 00abb598..00000000 --- a/packages/consent-proof-signature/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# @xmtp/consent-proof-signature - -## 0.1.3 - -### Patch Changes - -- 8adc23f: Add CommonJS export to `consent-proof-signature` package - -## 0.1.1 - -### Patch Changes - -- 6fbe931: Created package diff --git a/packages/consent-proof-signature/README.md b/packages/consent-proof-signature/README.md index afb9a5cc..33bc5fdd 100644 --- a/packages/consent-proof-signature/README.md +++ b/packages/consent-proof-signature/README.md @@ -1,3 +1,6 @@ +> [!NOTE] +> This package has been removed from this repository. Its contents and all active development have been moved to the [xmtp-js](https://github.com/xmtp/xmtp-js) repository. + # Consent Proof Signature ## Usage diff --git a/packages/consent-proof-signature/package.json b/packages/consent-proof-signature/package.json deleted file mode 100644 index 80167bbb..00000000 --- a/packages/consent-proof-signature/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@xmtp/consent-proof-signature", - "version": "0.1.3", - "keywords": [ - "xmtp", - "messaging", - "web3", - "sdk", - "js", - "ts", - "javascript", - "typescript" - ], - "homepage": "https://github.com/xmtp/xmtp-web", - "bugs": { - "url": "https://github.com/xmtp/xmtp-web/issues" - }, - "repository": { - "type": "git", - "url": "git@github.com:xmtp/xmtp-web.git", - "directory": "packages/consent-proof-signature" - }, - "license": "MIT", - "author": "XMTP Labs ", - "sideEffects": false, - "type": "module", - "exports": { - ".": { - "types": "./lib/index.d.ts", - "require": "./lib/index.cjs", - "import": "./lib/index.js" - } - }, - "main": "lib/index.cjs", - "module": "lib/index.js", - "browser": "lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib", - "src", - "!src/**/*.test.*", - "tsconfig.json" - ], - "scripts": { - "build": "yarn clean:lib && yarn rollup -c", - "clean": "rm -rf .turbo && rm -rf node_modules && yarn clean:lib", - "clean:lib": "rm -rf lib", - "dev": "yarn clean:lib && yarn rollup -c --watch", - "format": "yarn format:base -w .", - "format:base": "prettier --ignore-path ../../.gitignore", - "format:check": "yarn format:base -c .", - "lint": "eslint . --ignore-path ../../.gitignore", - "test": "vitest run --passWithNoTests", - "typecheck": "tsc", - "typedoc": "typedoc" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 3 chrome versions", - "last 3 firefox versions", - "last 3 safari versions" - ] - }, - "dependencies": { - "@xmtp/proto": "3.62.1", - "long": "^5.2.3" - }, - "devDependencies": { - "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-typescript": "^11.1.6", - "@xmtp/tsconfig": "workspace:*", - "eslint": "^8.57.0", - "eslint-config-xmtp-web": "workspace:*", - "ethers": "^6.13.1", - "prettier": "^3.3.3", - "prettier-plugin-packagejson": "^2.5.0", - "rollup": "^4.18.1", - "rollup-plugin-dts": "^6.1.1", - "rollup-plugin-filesize": "^10.0.0", - "typedoc": "^0.26.4", - "typescript": "^5.5.3", - "vite": "^5.3.3", - "vitest": "^2.0.3" - }, - "packageManager": "yarn@4.3.1", - "publishConfig": { - "access": "public", - "provenance": true, - "registry": "https://registry.npmjs.org/" - } -} diff --git a/packages/consent-proof-signature/rollup.config.js b/packages/consent-proof-signature/rollup.config.js deleted file mode 100644 index 87f1b47b..00000000 --- a/packages/consent-proof-signature/rollup.config.js +++ /dev/null @@ -1,58 +0,0 @@ -import { defineConfig } from "rollup"; -import typescript from "@rollup/plugin-typescript"; -import { dts } from "rollup-plugin-dts"; -import terser from "@rollup/plugin-terser"; -import filesize from "rollup-plugin-filesize"; - -const plugins = [ - typescript({ - declaration: false, - declarationMap: false, - }), - filesize({ - showMinifiedSize: false, - }), -]; - -const external = ["@xmtp/proto", "node:crypto", "long"]; - -export default defineConfig([ - { - input: "src/index.ts", - output: { - file: "lib/index.js", - format: "es", - sourcemap: true, - }, - external, - plugins, - }, - { - input: "src/index.ts", - output: { - file: "lib/index.cjs", - format: "cjs", - sourcemap: true, - }, - external, - plugins, - }, - { - input: "src/index.ts", - output: { - file: "lib/browser/index.js", - format: "es", - sourcemap: true, - }, - external, - plugins: [terser(), ...plugins], - }, - { - input: "src/index.ts", - output: { - file: "lib/index.d.ts", - format: "es", - }, - plugins: [dts()], - }, -]); diff --git a/packages/consent-proof-signature/src/index.test.ts b/packages/consent-proof-signature/src/index.test.ts deleted file mode 100644 index 22383103..00000000 --- a/packages/consent-proof-signature/src/index.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { createConsentMessage, createConsentProofPayload } from "."; - -describe("createConsentMessage", () => { - it("should return a signature", () => { - const timestampMs = 1581663600000; - const exampleAddress = "0x1234567890abcdef"; - const signatureMessage = createConsentMessage(exampleAddress, timestampMs); - expect(signatureMessage).toEqual( - "XMTP : Grant inbox consent to sender\n\nCurrent Time: Fri, 14 Feb 2020 07:00:00 GMT\nFrom Address: 0x1234567890abcdef\n\nFor more info: https://xmtp.org/signatures/", - ); - }); -}); - -describe("createConsentProofPayload", () => { - it("should return data of consent proof", () => { - const timestampMs = 1581663600000; - const exampleSignature = "0x1234567890abcdef"; - const signatureMessage = createConsentProofPayload( - exampleSignature, - timestampMs, - ); - expect(signatureMessage).toEqual( - Buffer.from([ - 10, 18, 48, 120, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 97, 98, 99, - 100, 101, 102, 16, 128, 251, 252, 147, 132, 46, 24, 1, - ]), - ); - }); -}); diff --git a/packages/consent-proof-signature/src/index.ts b/packages/consent-proof-signature/src/index.ts deleted file mode 100644 index b3a54f7c..00000000 --- a/packages/consent-proof-signature/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import Long from "long"; -import { invitation } from "@xmtp/proto"; -/** - * - * @param peerAddress - Ethereum address of the broadcaster - * @param timestampMs - Timestamp in milliseconds used in the signature - * @returns - */ -export const createConsentMessage = ( - peerAddress: string, - timestampMs: number, -): string => - "XMTP : Grant inbox consent to sender\n" + - "\n" + - `Current Time: ${new Date(timestampMs).toUTCString()}\n` + - `From Address: ${peerAddress}\n` + - "\n" + - "For more info: https://xmtp.org/signatures/"; - -/** - * - * @param signature hex string of the signature - * @param timestampMs timestamp in milliseconds used in the signature - * @returns Uint8Array of the consent proof payload - */ -export const createConsentProofPayload = ( - signature: string, - timestampMs: number, -): Uint8Array => - invitation.ConsentProofPayload.encode({ - signature, - timestamp: Long.fromNumber(timestampMs), - payloadVersion: - invitation.ConsentProofPayloadVersion.CONSENT_PROOF_PAYLOAD_VERSION_1, - }).finish(); diff --git a/packages/consent-proof-signature/tsconfig.eslint.json b/packages/consent-proof-signature/tsconfig.eslint.json deleted file mode 100644 index bf165d3f..00000000 --- a/packages/consent-proof-signature/tsconfig.eslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [".", ".eslintrc.cjs", "rollup.config.js"], - "exclude": ["lib", "node_modules"] -} diff --git a/packages/consent-proof-signature/tsconfig.json b/packages/consent-proof-signature/tsconfig.json deleted file mode 100644 index 235fbd5e..00000000 --- a/packages/consent-proof-signature/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@xmtp/tsconfig/react-sdk.json", - "include": ["src", ".eslintrc.cjs", "vitest.config.ts", "vitest.setup.ts"] -} diff --git a/packages/consent-proof-signature/vitest.config.ts b/packages/consent-proof-signature/vitest.config.ts deleted file mode 100644 index b6ebdaef..00000000 --- a/packages/consent-proof-signature/vitest.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig, mergeConfig } from "vite"; -import { defineConfig as defineVitestConfig } from "vitest/config"; - -// https://vitejs.dev/config/ -const viteConfig = defineConfig({}); - -const vitestConfig = defineVitestConfig({ - test: { - globals: true, - environment: "happy-dom", - }, -}); - -export default mergeConfig(viteConfig, vitestConfig); diff --git a/packages/frames-client/.eslintrc.cjs b/packages/frames-client/.eslintrc.cjs deleted file mode 100644 index 0e3d6a26..00000000 --- a/packages/frames-client/.eslintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - root: true, - extends: ["xmtp-web"], - parserOptions: { - project: "./tsconfig.eslint.json", - }, -}; diff --git a/packages/frames-client/CHANGELOG.md b/packages/frames-client/CHANGELOG.md deleted file mode 100644 index 54c68f6f..00000000 --- a/packages/frames-client/CHANGELOG.md +++ /dev/null @@ -1,122 +0,0 @@ -# @xmtp/frames-client - -## 0.5.4 - -### Patch Changes - -- 3fc5b82: Upgraded dependencies - -## 0.5.3 - -### Patch Changes - -- 815ef8f: fix for transaction id - -## 0.5.2 - -### Patch Changes - -- 7db2728: adds transactionId to type - -## 0.5.1 - -### Patch Changes - -- 3ffc491: bumped packages to pass postUrl through in frameInfo - -## 0.5.0 - -### Minor Changes - -- e1ac826: add postTransaction support - -## 0.4.3 - -### Patch Changes - -- cab6fb3: Add support for the state field - -## 0.4.2 - -### Patch Changes - -- d01544d: Add support for optional inputText - -## 0.4.1 - -### Patch Changes - -- f822a36: Upgrade to 0.2.0 of the Frames Proxy client - -## 0.4.0 - -### Minor Changes - -- 893bf17: Use new Frames Proxy with support for frameInfo field - -## 0.3.2 - -### Patch Changes - -- b8297be: Add more exports - -## 0.3.1 - -### Patch Changes - -- 71cb3a3: Fix bug with identity key translation - -## 0.3.0 - -### Minor Changes - -- 65a7cc1: Add new Frames Proxy service and support for redirects and image URLs - -## 0.2.2 - -### Patch Changes - -- c323d3b: Makes the payloads Open Frames compatible and allows overriding the OG proxy URL - -## 0.2.1 - -### Patch Changes - -- 3bbf05c: updated readme - -## 0.2.0 - -### Minor Changes - -- b955667: Updates to the latest format of the proto message and tries to make safe for RN usage - -## 0.1.4 - -### Patch Changes - -- 8b21c05: Updated crypto imports, build, and exports - -## 0.1.3 - -### Patch Changes - -- 4c735d0: Add dynamic crypto import - -## 0.1.2 - -### Patch Changes - -- aa1cc83: Fix polyfill for webcrypto in Node.js - -## 0.1.1 - -### Patch Changes - -- fd952ee: Adds ability to post frame to a destination and see an updated response - -## 0.1.0 - -### Minor Changes - -- a04afac: Add support for preparing signed payloads for the Frames API -- 502c402: Initialize Frames Client diff --git a/packages/frames-client/README.md b/packages/frames-client/README.md index edeacbcd..2cae5b44 100644 --- a/packages/frames-client/README.md +++ b/packages/frames-client/README.md @@ -1,3 +1,6 @@ +> [!NOTE] +> This package has been removed from this repository. Its contents and all active development have been moved to the [xmtp-js](https://github.com/xmtp/xmtp-js) repository. + # Frames Client This repo is used by messaging apps to render Open Frames. diff --git a/packages/frames-client/package.json b/packages/frames-client/package.json deleted file mode 100644 index 9f88132a..00000000 --- a/packages/frames-client/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "@xmtp/frames-client", - "version": "0.5.4", - "keywords": [ - "xmtp", - "messaging", - "web3", - "sdk", - "js", - "ts", - "javascript", - "typescript" - ], - "homepage": "https://github.com/xmtp/xmtp-web", - "bugs": { - "url": "https://github.com/xmtp/xmtp-web/issues" - }, - "repository": { - "type": "git", - "url": "git@github.com:xmtp/xmtp-web.git", - "directory": "packages/frames-client" - }, - "license": "MIT", - "author": "XMTP Labs ", - "sideEffects": false, - "type": "module", - "exports": { - ".": { - "types": "./lib/index.d.ts", - "default": "./lib/index.js" - } - }, - "module": "lib/index.js", - "browser": "lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib", - "src", - "!src/**/*.test.*", - "tsconfig.json" - ], - "scripts": { - "build": "yarn clean:lib && yarn rollup -c", - "clean": "rm -rf .turbo && rm -rf node_modules && yarn clean:lib", - "clean:lib": "rm -rf lib", - "dev": "yarn clean:lib && yarn rollup -c --watch", - "format": "yarn format:base -w .", - "format:base": "prettier --ignore-path ../../.gitignore", - "format:check": "yarn format:base -c .", - "lint": "eslint . --ignore-path ../../.gitignore", - "test": "vitest run --passWithNoTests", - "typecheck": "tsc", - "typedoc": "typedoc" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 3 chrome versions", - "last 3 firefox versions", - "last 3 safari versions" - ] - }, - "dependencies": { - "@noble/hashes": "^1.4.0", - "@open-frames/proxy-client": "^0.3.3", - "@xmtp/proto": "3.62.1", - "long": "^5.2.3" - }, - "devDependencies": { - "@open-frames/types": "^0.1.1", - "@rollup/plugin-terser": "^0.4.4", - "@rollup/plugin-typescript": "^11.1.6", - "@xmtp/tsconfig": "workspace:*", - "@xmtp/xmtp-js": "^12.0.0", - "eslint": "^8.57.0", - "eslint-config-xmtp-web": "workspace:*", - "ethers": "^6.13.1", - "prettier": "^3.3.3", - "prettier-plugin-packagejson": "^2.5.0", - "rollup": "^4.18.1", - "rollup-plugin-dts": "^6.1.1", - "rollup-plugin-filesize": "^10.0.0", - "rollup-plugin-tsconfig-paths": "^1.5.2", - "typedoc": "^0.26.4", - "typescript": "^5.5.3", - "vite": "^5.3.3", - "vite-tsconfig-paths": "^4.3.2", - "vitest": "^2.0.3" - }, - "peerDependencies": { - "@xmtp/xmtp-js": ">9.3.1" - }, - "packageManager": "yarn@4.3.1", - "publishConfig": { - "access": "public", - "provenance": true, - "registry": "https://registry.npmjs.org/" - } -} diff --git a/packages/frames-client/rollup.config.js b/packages/frames-client/rollup.config.js deleted file mode 100644 index 6871bf8c..00000000 --- a/packages/frames-client/rollup.config.js +++ /dev/null @@ -1,56 +0,0 @@ -import { defineConfig } from "rollup"; -import typescript from "@rollup/plugin-typescript"; -import { dts } from "rollup-plugin-dts"; -import tsConfigPaths from "rollup-plugin-tsconfig-paths"; -import terser from "@rollup/plugin-terser"; -import filesize from "rollup-plugin-filesize"; - -const plugins = [ - tsConfigPaths(), - typescript({ - declaration: false, - declarationMap: false, - }), - filesize({ - showMinifiedSize: false, - }), -]; - -const external = [ - "@xmtp/proto", - "node:crypto", - "@open-frames/proxy-client", - "@noble/hashes/sha256", - "long", -]; - -export default defineConfig([ - { - input: "src/index.ts", - output: { - file: "lib/index.js", - format: "es", - sourcemap: true, - }, - external, - plugins, - }, - { - input: "src/index.ts", - output: { - file: "lib/browser/index.js", - format: "es", - sourcemap: true, - }, - external, - plugins: [terser(), ...plugins], - }, - { - input: "src/index.ts", - output: { - file: "lib/index.d.ts", - format: "es", - }, - plugins: [tsConfigPaths(), dts()], - }, -]); diff --git a/packages/frames-client/src/client.ts b/packages/frames-client/src/client.ts deleted file mode 100644 index 25549148..00000000 --- a/packages/frames-client/src/client.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { Client } from "@xmtp/xmtp-js"; -import { - signature as signatureProto, - publicKey as publicKeyProto, - frames, -} from "@xmtp/proto"; -import { sha256 } from "@noble/hashes/sha256"; -import Long from "long"; -import { PROTOCOL_VERSION } from "./constants"; -import type { - FrameActionInputs, - FramePostPayload, - ReactNativeClient, -} from "./types"; -import { v1ToV2Bundle } from "./converters"; -import { - base64Encode, - buildOpaqueIdentifier, - isReactNativeClient, -} from "./utils"; -import OpenFramesProxy from "./proxy"; - -export class FramesClient { - xmtpClient: Client | ReactNativeClient; - - proxy: OpenFramesProxy; - - constructor(xmtpClient: Client | ReactNativeClient, proxy?: OpenFramesProxy) { - this.xmtpClient = xmtpClient; - this.proxy = proxy || new OpenFramesProxy(); - } - - async signFrameAction(inputs: FrameActionInputs): Promise { - const opaqueConversationIdentifier = buildOpaqueIdentifier(inputs); - const { frameUrl, buttonIndex, inputText, state, address, transactionId } = - inputs; - const now = Date.now(); - const timestamp = Long.fromNumber(now); - const toSign: frames.FrameActionBody = { - frameUrl, - buttonIndex, - opaqueConversationIdentifier, - timestamp, - inputText: inputText || "", - unixTimestamp: now, - state: state || "", - address: address || "", - transactionId: transactionId || "", - }; - - const signedAction = await this.buildSignedFrameAction(toSign); - - return { - clientProtocol: `xmtp@${PROTOCOL_VERSION}`, - untrustedData: { - buttonIndex, - opaqueConversationIdentifier, - walletAddress: this.xmtpClient.address, - inputText, - url: frameUrl, - timestamp: now, - unixTimestamp: now, - state, - // The address associated with initiating a transaction - address, - transactionId, - }, - trustedData: { - messageBytes: base64Encode(signedAction), - }, - }; - } - - private async buildSignedFrameAction( - actionBodyInputs: frames.FrameActionBody, - ) { - const actionBody = frames.FrameActionBody.encode(actionBodyInputs).finish(); - - const digest = sha256(actionBody); - const signature = await this.signDigest(digest); - - const publicKeyBundle = await this.getPublicKeyBundle(); - - return frames.FrameAction.encode({ - actionBody, - signature, - signedPublicKeyBundle: v1ToV2Bundle(publicKeyBundle), - }).finish(); - } - - private async signDigest( - digest: Uint8Array, - ): Promise { - if (isReactNativeClient(this.xmtpClient)) { - const signatureBytes = await this.xmtpClient.sign(digest, { - kind: "identity", - }); - return signatureProto.Signature.decode(signatureBytes); - } - - return this.xmtpClient.keystore.signDigest({ - digest, - identityKey: true, - prekeyIndex: undefined, - }); - } - - private async getPublicKeyBundle(): Promise { - if (isReactNativeClient(this.xmtpClient)) { - const bundleBytes = await this.xmtpClient.exportPublicKeyBundle(); - return publicKeyProto.PublicKeyBundle.decode(bundleBytes); - } - - return this.xmtpClient.keystore.getPublicKeyBundle(); - } -} diff --git a/packages/frames-client/src/constants.ts b/packages/frames-client/src/constants.ts deleted file mode 100644 index 24c94df5..00000000 --- a/packages/frames-client/src/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const OPEN_FRAMES_PROXY_URL = "https://frames.xmtp.chat/"; - -export const PROTOCOL_VERSION = "2024-02-09"; diff --git a/packages/frames-client/src/converters.test.ts b/packages/frames-client/src/converters.test.ts deleted file mode 100644 index ce939eb6..00000000 --- a/packages/frames-client/src/converters.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Wallet } from "ethers"; -import { it, expect, describe } from "vitest"; -import { PrivateKeyBundleV1, SignedPublicKeyBundle } from "@xmtp/xmtp-js"; -import { v1ToV2Bundle } from "./converters"; - -describe("converters", () => { - it("can convert a valid public key bundle", async () => { - const v1Bundle = await PrivateKeyBundleV1.generate(Wallet.createRandom()); - const publicKeyBundle = v1Bundle.getPublicKeyBundle(); - - const v2Bundle = v1ToV2Bundle(publicKeyBundle); - const v2BundleInstance = new SignedPublicKeyBundle(v2Bundle); - const downgradedBundle = v2BundleInstance.toLegacyBundle(); - - expect(downgradedBundle.equals(publicKeyBundle)).toBe(true); - }); -}); diff --git a/packages/frames-client/src/converters.ts b/packages/frames-client/src/converters.ts deleted file mode 100644 index 709385ca..00000000 --- a/packages/frames-client/src/converters.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { publicKey } from "@xmtp/proto"; - -function publicKeyBytesToSign(pubKey: publicKey.PublicKey): Uint8Array { - return publicKey.PublicKey.encode({ - timestamp: pubKey.timestamp, - secp256k1Uncompressed: pubKey.secp256k1Uncompressed, - }).finish(); -} - -function toSignedPublicKey( - v1Key: publicKey.PublicKey, - signedByWallet: boolean, -): publicKey.SignedPublicKey { - if (!v1Key.signature) { - throw new Error("Missing signature"); - } - - let v1Signature = v1Key.signature; - if (signedByWallet) { - v1Signature = { - walletEcdsaCompact: - v1Signature.walletEcdsaCompact || v1Signature.ecdsaCompact, - ecdsaCompact: undefined, - }; - } - - return { - keyBytes: publicKeyBytesToSign(v1Key), - signature: v1Signature, - }; -} - -export function v1ToV2Bundle( - v1Bundle: publicKey.PublicKeyBundle, -): publicKey.SignedPublicKeyBundle { - if (!v1Bundle.identityKey || !v1Bundle.preKey) { - throw new Error("Invalid bundle"); - } - - return { - identityKey: toSignedPublicKey(v1Bundle.identityKey, true), - preKey: toSignedPublicKey(v1Bundle.preKey, false), - }; -} diff --git a/packages/frames-client/src/errors.ts b/packages/frames-client/src/errors.ts deleted file mode 100644 index d82986d1..00000000 --- a/packages/frames-client/src/errors.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-disable max-classes-per-file */ - -export class ApiError extends Error { - status: number; - - constructor(message: string, status: number) { - super(message); - this.status = status; - } -} - -export class InvalidArgumentsError extends Error {} diff --git a/packages/frames-client/src/index.test.ts b/packages/frames-client/src/index.test.ts deleted file mode 100644 index 5df76dc8..00000000 --- a/packages/frames-client/src/index.test.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { Client, Signature, SignedPublicKey } from "@xmtp/xmtp-js"; -import { Wallet } from "ethers"; -import { frames, fetcher } from "@xmtp/proto"; -import { it, expect, describe, beforeEach } from "vitest"; -import { sha256 } from "@noble/hashes/sha256"; -import { FramesClient } from "./client"; - -const { b64Decode } = fetcher; - -describe("signFrameAction", () => { - let client: Client; - let framesClient: FramesClient; - beforeEach(async () => { - client = await Client.create(Wallet.createRandom()); - framesClient = new FramesClient(client); - }); - it("should sign a frame action with a valid signature", async () => { - const frameUrl = "https://example.com"; - const buttonIndex = 1; - - const signedPayload = await framesClient.signFrameAction({ - frameUrl, - buttonIndex, - conversationTopic: "foo", - participantAccountAddresses: ["amal", "bola"], - state: "state", - address: "0x...", - transactionId: "123", - }); - - // Below addresses are typically the same but can technically be different - // walletAddress references address of XMTP client - expect(signedPayload.untrustedData.walletAddress).toEqual(client.address); - - // address references the address associated with initiating a transaction - expect(signedPayload.untrustedData.address).toEqual("0x..."); - expect(signedPayload.untrustedData.transactionId).toEqual("123"); - - expect(signedPayload.untrustedData.url).toEqual(frameUrl); - expect(signedPayload.untrustedData.buttonIndex).toEqual(buttonIndex); - expect( - signedPayload.untrustedData.opaqueConversationIdentifier, - ).toBeDefined(); - expect(signedPayload.untrustedData.timestamp).toBeGreaterThan(0); - - const signedPayloadProto = frames.FrameAction.decode( - b64Decode(signedPayload.trustedData.messageBytes), - ); - expect(signedPayloadProto.actionBody).toBeDefined(); - expect(signedPayloadProto.signature).toBeDefined(); - expect(signedPayloadProto.signedPublicKeyBundle).toBeDefined(); - - const signedPayloadBody = frames.FrameActionBody.decode( - signedPayloadProto.actionBody, - ); - - expect(signedPayloadBody.buttonIndex).toEqual(buttonIndex); - expect(signedPayloadBody.frameUrl).toEqual(frameUrl); - expect(signedPayloadBody.opaqueConversationIdentifier).toBeDefined(); - expect(signedPayloadBody.state).toEqual("state"); - - if ( - !signedPayloadProto.signature || - !signedPayloadProto?.signedPublicKeyBundle?.identityKey - ) { - throw new Error("Missing signature"); - } - - const signatureInstance = new Signature(signedPayloadProto.signature); - const digest = sha256(signedPayloadProto.actionBody); - // Ensure the signature is valid - expect( - signatureInstance - .getPublicKey(digest) - ?.equals( - new SignedPublicKey( - signedPayloadProto.signedPublicKeyBundle.identityKey, - ).toLegacyKey(), - ), - ); - }); - - // Will add E2E tests back once we have Frames deployed with the new schema - it( - "works e2e", - async () => { - const frameUrl = - "https://fc-polls-five.vercel.app/polls/01032f47-e976-42ee-9e3d-3aac1324f4b8"; - const metadata = await framesClient.proxy.readMetadata(frameUrl); - expect(metadata).toBeDefined(); - expect(metadata.frameInfo).toMatchObject({ - acceptedClients: { - farcaster: "vNext", - }, - buttons: { - "1": { - label: "Yes", - }, - "2": { - label: "No", - }, - }, - image: { - content: - "https://fc-polls-five.vercel.app/api/image?id=01032f47-e976-42ee-9e3d-3aac1324f4b8", - }, - postUrl: - "https://fc-polls-five.vercel.app/api/vote?id=01032f47-e976-42ee-9e3d-3aac1324f4b8", - }); - const signedPayload = await framesClient.signFrameAction({ - frameUrl, - buttonIndex: 1, - conversationTopic: "foo", - participantAccountAddresses: ["amal", "bola"], - }); - const postUrl = metadata.extractedTags["fc:frame:post_url"]; - const response = await framesClient.proxy.post(postUrl, signedPayload); - expect(response).toBeDefined(); - expect(response.extractedTags["fc:frame"]).toEqual("vNext"); - - const imageUrl = response.extractedTags["fc:frame:image"]; - const mediaUrl = framesClient.proxy.mediaUrl(imageUrl); - - const downloadedMedia = await fetch(mediaUrl); - expect(downloadedMedia.ok).toBeTruthy(); - expect(downloadedMedia.headers.get("content-type")).toEqual("image/png"); - }, - // Add a long timeout because Vercel cold starts can be slow - { timeout: 20000 }, - ); - it( - "sends back the button postUrl for a tx frame in frame info", - async () => { - const frameUrl = - "https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/"; - const metadata = await framesClient.proxy.readMetadata(frameUrl); - expect(metadata).toBeDefined(); - expect(metadata.frameInfo).toMatchObject({ - acceptedClients: { - xmtp: "2024-02-09", - farcaster: "vNext", - }, - buttons: { - "1": { - label: "Make transaction", - action: "tx", - target: - "https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/transaction", - postUrl: - "https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/transaction-success", - }, - }, - image: { - content: - "https://tx-boilerplate-frame-git-main-xmtp-labs.vercel.app/api/og?transaction=null", - }, - }); - }, - { timeout: 20000 }, - ); -}); diff --git a/packages/frames-client/src/index.ts b/packages/frames-client/src/index.ts deleted file mode 100644 index a763bd2b..00000000 --- a/packages/frames-client/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./types"; -export * from "./constants"; -export { FramesClient } from "./client"; -export { default as OpenFramesProxy } from "./proxy"; diff --git a/packages/frames-client/src/proxy.ts b/packages/frames-client/src/proxy.ts deleted file mode 100644 index 30b8ead6..00000000 --- a/packages/frames-client/src/proxy.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { OpenFramesProxy as BaseProxy } from "@open-frames/proxy-client"; -import { OPEN_FRAMES_PROXY_URL } from "./constants"; -import type { - FramePostPayload, - FramesApiRedirectResponse, - FramesApiResponse, - FramesTransactionApiResponse, -} from "./types"; - -export default class OpenFramesProxy { - inner: BaseProxy; - - constructor(baseUrl: string = OPEN_FRAMES_PROXY_URL) { - this.inner = new BaseProxy(baseUrl); - } - - readMetadata(url: string) { - return this.inner.readMetadata(url); - } - - post(url: string, payload: FramePostPayload): Promise { - return this.inner.post(url, payload); - } - - postRedirect( - url: string, - payload: FramePostPayload, - ): Promise { - return this.inner.postRedirect(url, payload); - } - - postTransaction( - url: string, - payload: FramePostPayload, - ): Promise { - return this.inner.postTransaction(url, payload); - } - - mediaUrl(url: string): string { - if (url?.startsWith("data:")) { - return url; - } - return this.inner.mediaUrl(url); - } -} diff --git a/packages/frames-client/src/types.ts b/packages/frames-client/src/types.ts deleted file mode 100644 index 44dfc9f5..00000000 --- a/packages/frames-client/src/types.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { OpenFramesUntrustedData } from "@open-frames/types"; -import type { - GetMetadataResponse, - PostRedirectResponse, - TransactionResponse, -} from "@open-frames/proxy-client"; - -export type FramesApiResponse = GetMetadataResponse; - -export type FramesApiRedirectResponse = PostRedirectResponse; - -export type FramesTransactionApiResponse = TransactionResponse; - -export type FramePostUntrustedData = OpenFramesUntrustedData & { - walletAddress: string; // Untrusted version of the wallet address - opaqueConversationIdentifier: string; // A hash of the conversation topic and the participants - unixTimestamp: number; -}; - -export type FramePostTrustedData = { - messageBytes: string; -}; - -export type FramePostPayload = { - clientProtocol: `xmtp@${string}`; - untrustedData: FramePostUntrustedData; - trustedData: FramePostTrustedData; -}; - -type DmActionInputs = { - conversationTopic: string; - participantAccountAddresses: string[]; -}; - -type GroupActionInputs = { - groupId: Uint8Array; - groupSecret: Uint8Array; -}; - -type ConversationActionInputs = DmActionInputs | GroupActionInputs; - -export type FrameActionInputs = { - frameUrl: string; - buttonIndex: number; - inputText?: string; - state?: string; - address?: string; - transactionId?: string; -} & ConversationActionInputs; - -type KeyType = { - kind: "identity" | "prekey"; - prekeyIndex?: number | undefined; -}; - -export type ReactNativeClient = { - address: string; - exportPublicKeyBundle(): Promise; - sign(digest: Uint8Array, type: KeyType): Promise; -}; diff --git a/packages/frames-client/src/utils.test.ts b/packages/frames-client/src/utils.test.ts deleted file mode 100644 index a4fa7a9b..00000000 --- a/packages/frames-client/src/utils.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { it, expect, describe } from "vitest"; -import { webcrypto } from "crypto"; -import { - base64Encode, - buildOpaqueIdentifier, - concatArrays, - concatStringsToBytes, -} from "./utils"; - -describe("concatArrays", () => { - it("should work with a single array", () => { - const input = new Uint8Array([1, 2, 3]); - const result = concatArrays(input); - expect(result).toEqual(input); - }); - - it("should work with multiple arrays", () => { - const input1 = new Uint8Array([1, 2, 3]); - const input2 = new Uint8Array([4, 5, 6]); - const result = concatArrays(input1, input2); - expect(result).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6])); - }); -}); - -describe("concatStringsToBytes", () => { - it("should work with a single string", () => { - const input = "abc"; - const result = concatStringsToBytes(input); - expect(result).toEqual(new TextEncoder().encode(input)); - }); - - it("should work with multiple strings", () => { - const input1 = "abc"; - const input2 = "def"; - const result = concatStringsToBytes(input1, input2); - expect(result).toEqual(new TextEncoder().encode(input1 + input2)); - }); -}); - -describe("buildOpaqueIdentifier", () => { - it("should return a base64 encoded sha256 hash of the inputs", async () => { - const inputs = { - frameUrl: "https://example.com", - buttonIndex: 2, - conversationTopic: "Foo", - participantAccountAddresses: ["Bola", "Amal"], - }; - const result = buildOpaqueIdentifier(inputs); - expect(result).toEqual( - base64Encode( - new Uint8Array( - await webcrypto.subtle.digest( - "SHA-256", - new TextEncoder().encode("fooamalbola"), - ), - ), - ), - ); - }); -}); diff --git a/packages/frames-client/src/utils.ts b/packages/frames-client/src/utils.ts deleted file mode 100644 index 78bc13ec..00000000 --- a/packages/frames-client/src/utils.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { fetcher } from "@xmtp/proto"; -import { sha256 } from "@noble/hashes/sha256"; -import type { Client } from "@xmtp/xmtp-js"; -import type { FrameActionInputs, ReactNativeClient } from "./types"; -import { InvalidArgumentsError } from "./errors"; - -const { b64Encode } = fetcher; - -export function concatArrays(...arrays: Uint8Array[]): Uint8Array { - return new Uint8Array( - arrays.reduce((acc, arr) => acc.concat(Array.from(arr)), [] as number[]), - ); -} - -export function concatStringsToBytes(...arrays: string[]): Uint8Array { - return new TextEncoder().encode(arrays.join("")); -} - -export function base64Encode(input: Uint8Array): string { - return b64Encode(input, 0, input.length); -} - -export function buildOpaqueIdentifier(inputs: FrameActionInputs): string { - if ("groupId" in inputs && "groupSecret" in inputs) { - return base64Encode( - sha256(concatArrays(inputs.groupId, inputs.groupSecret)), - ); - } - - const { conversationTopic, participantAccountAddresses } = inputs; - if (!conversationTopic || !participantAccountAddresses.length) { - throw new InvalidArgumentsError( - "Missing conversation topic or participants", - ); - } - - return base64Encode( - sha256( - concatStringsToBytes( - conversationTopic.toLowerCase(), - ...participantAccountAddresses.map((p) => p.toLowerCase()).sort(), - ), - ), - ); -} - -export function isReactNativeClient( - client: Client | ReactNativeClient, -): client is ReactNativeClient { - const assertedClient = client as ReactNativeClient; - return ( - typeof assertedClient.sign === "function" && - typeof assertedClient.exportPublicKeyBundle === "function" && - !("keystore" in client) - ); -} diff --git a/packages/frames-client/tsconfig.eslint.json b/packages/frames-client/tsconfig.eslint.json deleted file mode 100644 index bf165d3f..00000000 --- a/packages/frames-client/tsconfig.eslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [".", ".eslintrc.cjs", "rollup.config.js"], - "exclude": ["lib", "node_modules"] -} diff --git a/packages/frames-client/tsconfig.json b/packages/frames-client/tsconfig.json deleted file mode 100644 index 235fbd5e..00000000 --- a/packages/frames-client/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@xmtp/tsconfig/react-sdk.json", - "include": ["src", ".eslintrc.cjs", "vitest.config.ts", "vitest.setup.ts"] -} diff --git a/packages/frames-client/vitest.config.ts b/packages/frames-client/vitest.config.ts deleted file mode 100644 index 21252a9d..00000000 --- a/packages/frames-client/vitest.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig, mergeConfig } from "vite"; -import { defineConfig as defineVitestConfig } from "vitest/config"; -import tsconfigPaths from "vite-tsconfig-paths"; - -// https://vitejs.dev/config/ -const viteConfig = defineConfig({ - plugins: [tsconfigPaths()], -}); - -const vitestConfig = defineVitestConfig({ - test: { - globals: true, - environment: "happy-dom", - }, -}); - -export default mergeConfig(viteConfig, vitestConfig); diff --git a/turbo.json b/turbo.json index 94f8fc50..d46a3565 100644 --- a/turbo.json +++ b/turbo.json @@ -24,7 +24,6 @@ "persistent": true }, "test": { - "dependsOn": ["@xmtp/consent-proof-signature#build"], "outputs": [] }, "typecheck": { diff --git a/yarn.lock b/yarn.lock index 8c080e72..36d4dc15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,13 +26,6 @@ __metadata: languageName: node linkType: hard -"@adraffy/ens-normalize@npm:1.10.1": - version: 1.10.1 - resolution: "@adraffy/ens-normalize@npm:1.10.1" - checksum: 10/4cb938c4abb88a346d50cb0ea44243ab3574330c81d4f5aaaf9dfee584b96189d0faa404de0fcbef5a1b73909ea4ebc3e63d84bd23f9949e5c8d4085207a5091 - languageName: node - linkType: hard - "@ampproject/remapping@npm:^2.2.0": version: 2.2.0 resolution: "@ampproject/remapping@npm:2.2.0" @@ -3029,15 +3022,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.2.0": - version: 1.2.0 - resolution: "@noble/curves@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.3.2" - checksum: 10/94e02e9571a9fd42a3263362451849d2f54405cb3ce9fa7c45bc6b9b36dcd7d1d20e2e1e14cfded24937a13d82f1e60eefc4d7a14982ce0bc219a9fc0f51d1f9 - languageName: node - linkType: hard - "@noble/curves@npm:1.3.0, @noble/curves@npm:~1.3.0": version: 1.3.0 resolution: "@noble/curves@npm:1.3.0" @@ -3065,13 +3049,6 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.2, @noble/hashes@npm:~1.3.2": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 10/685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b - languageName: node - linkType: hard - "@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.1": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" @@ -3079,13 +3056,20 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.4.0": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:~1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 10/e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 languageName: node linkType: hard +"@noble/hashes@npm:~1.3.2": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: 10/685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:^1.7.1": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -3221,31 +3205,6 @@ __metadata: languageName: node linkType: hard -"@open-frames/proxy-client@npm:^0.3.3": - version: 0.3.3 - resolution: "@open-frames/proxy-client@npm:0.3.3" - dependencies: - "@open-frames/proxy-types": "npm:0.2.3" - checksum: 10/c75c2fbd455aae83c85bcb06308d92081b8ddfda2d26771ac9c75c5b7baea06cf2fba65fe314d2ca900a4f5b2300563d8e83e309772cade77049c62c2c23de99 - languageName: node - linkType: hard - -"@open-frames/proxy-types@npm:0.2.3": - version: 0.2.3 - resolution: "@open-frames/proxy-types@npm:0.2.3" - peerDependencies: - typescript: ^5.3.3 - checksum: 10/ab7effbb4a90e26e23b42c36c19cffc83ef50401ecf35570765516c92acc96e6461da846130a52de3e3e30ca77f64d1049a79adc012211d6eabfdf5993bee46d - languageName: node - linkType: hard - -"@open-frames/types@npm:^0.1.1": - version: 0.1.1 - resolution: "@open-frames/types@npm:0.1.1" - checksum: 10/2e23b984123f760e4fd4f205fb50e89725679563f8830a86d9d0c436315b6df02d336a4ab06c583b31c568103bc2a82dbe23d36356909a80fc9a1c0026cc04ee - languageName: node - linkType: hard - "@parcel/watcher-android-arm64@npm:2.3.0": version: 2.3.0 resolution: "@parcel/watcher-android-arm64@npm:2.3.0" @@ -4715,13 +4674,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.15.13": - version: 18.15.13 - resolution: "@types/node@npm:18.15.13" - checksum: 10/b9bbe923573797ef7c5fd2641a6793489e25d9369c32aeadcaa5c7c175c85b42eb12d6fe173f6781ab6f42eaa1ebd9576a419eeaa2a1ec810094adb8adaa9a54 - languageName: node - linkType: hard - "@types/node@npm:^12.7.1": version: 12.20.55 resolution: "@types/node@npm:12.20.55" @@ -5757,29 +5709,15 @@ __metadata: languageName: node linkType: hard -"@xmtp/consent-proof-signature@npm:^0.1.3, @xmtp/consent-proof-signature@workspace:packages/consent-proof-signature": - version: 0.0.0-use.local - resolution: "@xmtp/consent-proof-signature@workspace:packages/consent-proof-signature" +"@xmtp/consent-proof-signature@npm:^0.1.3": + version: 0.1.3 + resolution: "@xmtp/consent-proof-signature@npm:0.1.3" dependencies: - "@rollup/plugin-terser": "npm:^0.4.4" - "@rollup/plugin-typescript": "npm:^11.1.6" - "@xmtp/proto": "npm:3.62.1" - "@xmtp/tsconfig": "workspace:*" - eslint: "npm:^8.57.0" - eslint-config-xmtp-web: "workspace:*" - ethers: "npm:^6.13.1" + "@xmtp/proto": "npm:3.56.0" long: "npm:^5.2.3" - prettier: "npm:^3.3.3" - prettier-plugin-packagejson: "npm:^2.5.0" - rollup: "npm:^4.18.1" - rollup-plugin-dts: "npm:^6.1.1" - rollup-plugin-filesize: "npm:^10.0.0" - typedoc: "npm:^0.26.4" - typescript: "npm:^5.5.3" - vite: "npm:^5.3.3" - vitest: "npm:^2.0.3" - languageName: unknown - linkType: soft + checksum: 10/24f3c5298a951cbf561c7986ffba670400560b94ce51f1ace5b29f98c899c554e13f01b370752e2a9159ccb885d7a0031e75f6d96816c81d799df877bd59715f + languageName: node + linkType: hard "@xmtp/content-type-primitives@npm:^1.0.1": version: 1.0.1 @@ -5830,38 +5768,6 @@ __metadata: languageName: node linkType: hard -"@xmtp/frames-client@workspace:packages/frames-client": - version: 0.0.0-use.local - resolution: "@xmtp/frames-client@workspace:packages/frames-client" - dependencies: - "@noble/hashes": "npm:^1.4.0" - "@open-frames/proxy-client": "npm:^0.3.3" - "@open-frames/types": "npm:^0.1.1" - "@rollup/plugin-terser": "npm:^0.4.4" - "@rollup/plugin-typescript": "npm:^11.1.6" - "@xmtp/proto": "npm:3.62.1" - "@xmtp/tsconfig": "workspace:*" - "@xmtp/xmtp-js": "npm:^12.0.0" - eslint: "npm:^8.57.0" - eslint-config-xmtp-web: "workspace:*" - ethers: "npm:^6.13.1" - long: "npm:^5.2.3" - prettier: "npm:^3.3.3" - prettier-plugin-packagejson: "npm:^2.5.0" - rollup: "npm:^4.18.1" - rollup-plugin-dts: "npm:^6.1.1" - rollup-plugin-filesize: "npm:^10.0.0" - rollup-plugin-tsconfig-paths: "npm:^1.5.2" - typedoc: "npm:^0.26.4" - typescript: "npm:^5.5.3" - vite: "npm:^5.3.3" - vite-tsconfig-paths: "npm:^4.3.2" - vitest: "npm:^2.0.3" - peerDependencies: - "@xmtp/xmtp-js": ">9.3.1" - languageName: unknown - linkType: soft - "@xmtp/nextjs-example@workspace:examples/nextjs": version: 0.0.0-use.local resolution: "@xmtp/nextjs-example@workspace:examples/nextjs" @@ -5900,7 +5806,19 @@ __metadata: languageName: node linkType: hard -"@xmtp/proto@npm:3.62.1, @xmtp/proto@npm:^3.61.1": +"@xmtp/proto@npm:3.56.0": + version: 3.56.0 + resolution: "@xmtp/proto@npm:3.56.0" + dependencies: + long: "npm:^5.2.0" + protobufjs: "npm:^7.0.0" + rxjs: "npm:^7.8.0" + undici: "npm:^5.8.1" + checksum: 10/f752e6858692464319d6f22861fe8f23c46d9bb0eb390fe2220e0b4932a4de84be2e9e1cbafc0200e1bfe2a0ed3a3fb6079941630e57fb80e6325bc2a52bf10d + languageName: node + linkType: hard + +"@xmtp/proto@npm:^3.61.1": version: 3.62.1 resolution: "@xmtp/proto@npm:3.62.1" dependencies: @@ -5912,7 +5830,7 @@ __metadata: languageName: node linkType: hard -"@xmtp/proto@npm:^3.62.1, @xmtp/proto@npm:^3.68.0": +"@xmtp/proto@npm:^3.68.0": version: 3.68.0 resolution: "@xmtp/proto@npm:3.68.0" dependencies: @@ -6106,24 +6024,6 @@ __metadata: languageName: node linkType: hard -"@xmtp/xmtp-js@npm:^12.0.0": - version: 12.1.0 - resolution: "@xmtp/xmtp-js@npm:12.1.0" - dependencies: - "@noble/secp256k1": "npm:1.7.1" - "@xmtp/consent-proof-signature": "npm:^0.1.3" - "@xmtp/content-type-primitives": "npm:^1.0.1" - "@xmtp/content-type-text": "npm:^1.0.0" - "@xmtp/proto": "npm:^3.62.1" - "@xmtp/user-preferences-bindings-wasm": "npm:^0.3.6" - async-mutex: "npm:^0.5.0" - elliptic: "npm:^6.5.5" - long: "npm:^5.2.3" - viem: "npm:2.7.15" - checksum: 10/4368b9e7f9fb6a6b4dd63110e655ef41d9c5aabf8666c0a9f0d166e31d1f3cde1af9bd6c981d620c81b8a0466ac612195007bbb9342142da39ee1b4ff75e1adb - languageName: node - linkType: hard - "@xmtp/xmtp-js@npm:^13.0.0": version: 13.0.0 resolution: "@xmtp/xmtp-js@npm:13.0.0" @@ -6258,13 +6158,6 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: 10/8f745da2e8fb38e91297a8ec13c2febe3219f8383303cd4ed4660ca67190242ccfd5fdc2f0d1642fd1ea934818fb871cd4cc28d3f28e812e3dc6c3d0f1f97c24 - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -8315,7 +8208,7 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:^6.5.5, elliptic@npm:^6.5.7": +"elliptic@npm:^6.5.7": version: 6.5.7 resolution: "elliptic@npm:6.5.7" dependencies: @@ -9747,21 +9640,6 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^6.13.1": - version: 6.13.1 - resolution: "ethers@npm:6.13.1" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.1" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.17.1" - checksum: 10/efc3e8d4d13101cad01823ba524dad797a23f60088ca9f8677bd6dbfad5087e4187ede121e43aa0758d704525976f935860c5d5d27183a4247deaccf7cf19950 - languageName: node - linkType: hard - "eval@npm:0.1.8": version: 0.1.8 resolution: "eval@npm:0.1.8" @@ -17582,13 +17460,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.4.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10/d8379e68b36caf082c1905ec25d17df8261e1d68ddc1abfd6c91158a064f6e4402039ae7c02cf4c81d12e3a2a2c7cd8ea2f57b233eb80136a2e3e7279daf2911 - languageName: node - linkType: hard - "tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": version: 2.5.0 resolution: "tslib@npm:2.5.0"