Skip to content

v0.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Jan 02:29
· 1258 commits to main since this release
a7e4122

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

import { getFrameValidatedMessage } from '@coinbase/onchainkit';

...

const validatedMessage = await getFrameValidatedMessage(body);

@returns

type Promise<Message | undefined>

After

import { getFrameMessage } from '@coinbase/onchainkit';

...

const { isValid, message } = await getFrameMessage(body);

@returns

type Promise<FrameValidationResponse>;

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;
 };
}