From a7e412283b8bfe0601648d09bd2463ca3627643c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:28:40 -0800 Subject: [PATCH] =?UTF-8?q?chore:=20version=20packages=20v0.2.0=20?= =?UTF-8?q?=F0=9F=8C=8A=20(#39)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] Co-authored-by: Leonardo Zizzamia --- .changeset/good-cougars-boil.md | 61 -------------------------------- CHANGELOG.md | 62 +++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 63 insertions(+), 62 deletions(-) delete mode 100644 .changeset/good-cougars-boil.md diff --git a/.changeset/good-cougars-boil.md b/.changeset/good-cougars-boil.md deleted file mode 100644 index e9f405dec9..0000000000 --- a/.changeset/good-cougars-boil.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -'@coinbase/onchainkit': minor ---- - -- **docs**: Polished README for `getFrameMessage()`. By @zizzamia #38 -- **fix**: Refactor Farcaster typing to be explicit, and added a Farcaster message verification integration test. By @robpolak @cnasc @zizzamia #37 -- **feat**: Added a concept of integration tests where we can assert the actual values coming back from `neynar`. We decoupled these from unit tests as we should not commingle. By @robpolak #35 -- **feat**: Refactored `neynar` client out of the `./src/core` code-path, for better composability and testability. By @robpolak #35 - -BREAKING CHANGES - -We made the `getFrameValidatedMessage` method more type-safe and renamed it to `getFrameMessage`. - -Before - -```ts -import { getFrameValidatedMessage } from '@coinbase/onchainkit'; - -... - -const validatedMessage = await getFrameValidatedMessage(body); -``` - -**@Returns** - -```ts -type Promise -``` - -After - -```ts -import { getFrameMessage } from '@coinbase/onchainkit'; - -... - -const { isValid, message } = await getFrameMessage(body); -``` - -**@Returns** - -```ts -type Promise; - -type FrameValidationResponse = - | { isValid: true; message: FrameData } - | { isValid: false; message: undefined }; - -interface FrameData { - fid: number; - url: string; - messageHash: string; - timestamp: number; - network: number; - buttonIndex: number; - castId: { - fid: number; - hash: string; - }; -} -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac4f47338..29f72b2ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,67 @@ # Changelog +## 0.2.0 + +### Minor Changes + +- **docs**: Polished README for `getFrameMessage()`. By @zizzamia #38 218b65e +- **fix**: Refactor Farcaster typing to be explicit, and added a Farcaster message verification integration test. By @robpolak @cnasc @zizzamia #37 +- **feat**: Added a concept of integration tests where we can assert the actual values coming back from `neynar`. We decoupled these from unit tests as we should not commingle. By @robpolak #35 +- **feat**: Refactored `neynar` client out of the `./src/core` code-path, for better composability and testability. By @robpolak #35 + +BREAKING CHANGES + +We made the `getFrameValidatedMessage` method more type-safe and renamed it to `getFrameMessage`. + +Before + +```ts +import { getFrameValidatedMessage } from '@coinbase/onchainkit'; + +... + +const validatedMessage = await getFrameValidatedMessage(body); +``` + +**@Returns** + +```ts +type Promise +``` + +After + +```ts +import { getFrameMessage } from '@coinbase/onchainkit'; + +... + +const { isValid, message } = await getFrameMessage(body); +``` + +**@Returns** + +```ts +type Promise; + +type FrameValidationResponse = + | { isValid: true; message: FrameData } + | { isValid: false; message: undefined }; + +interface FrameData { + fid: number; + url: string; + messageHash: string; + timestamp: number; + network: number; + buttonIndex: number; + castId: { + fid: number; + hash: string; + }; +} +``` + ## 0.1.6 ### Patch Changes diff --git a/package.json b/package.json index 98fbdcd622..6fce5ace9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinbase/onchainkit", - "version": "0.1.6", + "version": "0.2.0", "repository": "https://github.com/coinbase/onchainkit.git", "license": "MIT", "dependencies": {