Skip to content

Commit

Permalink
feat: created frame module (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Feb 22, 2024
1 parent c78fb08 commit 605ce64
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-rockets-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@coinbase/onchainkit': patch
---

- **feat**: created `frame` module. By @zizzamia #172
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### Minor Changes

- 311b027: - **feat**: prep the identity `identity` module. By @zizzamia #171
- **feat**: added initial version of `getEASAttestations`, which helps getting the user attestations from the Ethereum Attetation Service (EAS). By @alvaroraminelli #126
- **feat**: prep the identity `identity` module. By @zizzamia #171 311b027
- **feat**: added initial version of `getEASAttestations`, which helps getting the user attestations from the Ethereum Attetation Service (EAS). By @alvaroraminelli #126

## 0.8.2

Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@
},
"default": "./lib/farcaster/index.js"
},
"./frame": {
"types": "./lib/frame/index.d.ts",
"browser": {
"types": "./esm/frame/index.d.ts",
"module": "./esm/frame/index.js",
"import": "./esm/frame/index.js",
"default": "./lib/frame/index.js"
},
"default": "./lib/frame/index.js"
},
"./identity": {
"types": "./lib/identity/index.d.ts",
"browser": {
Expand Down
10 changes: 5 additions & 5 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// 🌲☀️🌲
// This file is the entry point for the core utilities
// that have no dependencies on external libraries.
export { getFrameHtmlResponse } from './getFrameHtmlResponse';
export { getFrameMetadata } from './getFrameMetadata';
export { getFrameMessage } from './getFrameMessage';
export { getMockFrameRequest } from './getMockFrameRequest';
export { getFrameHtmlResponse } from '../frame/getFrameHtmlResponse';
export { getFrameMetadata } from '../frame/getFrameMetadata';
export { getFrameMessage } from '../frame/getFrameMessage';
export { getMockFrameRequest } from '../frame/getMockFrameRequest';
export type {
FrameButtonMetadata,
FrameImageMetadata,
Expand All @@ -15,4 +15,4 @@ export type {
FrameValidationData,
MockFrameRequest,
MockFrameRequestOptions,
} from './types';
} from '../frame/types';
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Fragment } from 'react';
import type { FrameMetadataReact } from '../core/types';
import type { FrameMetadataReact } from '../types';

/**
* FrameMetadata component
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// 🌲☀️🌲
export { version } from './version';
export { getFrameHtmlResponse } from './core/getFrameHtmlResponse';
export { getFrameMetadata } from './core/getFrameMetadata';
export { getFrameMessage } from './core/getFrameMessage';
export { getMockFrameRequest } from './core/getMockFrameRequest';
export { FrameMetadata } from './frame/FrameMetadata';
export { getFrameHtmlResponse } from './frame/getFrameHtmlResponse';
export { getFrameMetadata } from './frame/getFrameMetadata';
export { getFrameMessage } from './frame/getFrameMessage';
export { getMockFrameRequest } from './frame/getMockFrameRequest';
export { FrameMetadata } from './frame/components/FrameMetadata';
export { Avatar } from './identity/components/Avatar';
export { Name } from './identity/components/Name';
export { useAvatar } from './identity/hooks/useAvatar';
Expand All @@ -19,4 +19,4 @@ export type {
FrameValidationData,
MockFrameRequest,
MockFrameRequestOptions,
} from './core/types';
} from './frame/types';
4 changes: 1 addition & 3 deletions src/utils/neynar/frame/neynarFrameFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { version } from '../../../version';
import { FrameValidationData } from '../../../core/types';
import { FetchError } from '../exceptions/FetchError';
import { FrameValidationData } from '../../../frame/types';
import { convertToNeynarResponseModel } from './neynarFrameModels';
import { postDataToNeynar } from '../postDataToNeynar';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/neynar/frame/neynarFrameModels.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FrameValidationData } from '../../../core/types';
import { FrameValidationData } from '../../../frame/types';
import { NeynarFrameValidationInternalModel } from './types';

export function convertToNeynarResponseModel(data: any): FrameValidationData | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '0.9.0';
export const version = '0.9.1';

0 comments on commit 605ce64

Please sign in to comment.