Skip to content

Commit

Permalink
create farcaster folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Sneh1999 committed Feb 9, 2024
1 parent ee69a87 commit 637cd67
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
20 changes: 0 additions & 20 deletions src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,3 @@ export type FrameMetadataType = {
* Note: exported as public Type
*/
export type FrameMetadataResponse = Record<string, string>;

/**
* Frame address type to determine if the client is request a verified address or a custody address
* Note: exported as public Type
*/

export enum FarcasterAddressType {
VerifiedAddresses,
CustodyAddress,
}

/**
* Get User Address Request
*
* Note: exported as public Type
*/
export interface GetFarcasterUserAddressesRequest {
fid: number;
farcasterAddressType: FarcasterAddressType;
}
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions src/farcaster/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Frame address type to determine if the client is requesingt verified addresses or a custody address
* Note: exported as public Type
*/

export enum FarcasterAddressType {
VerifiedAddresses,
CustodyAddress,
}

/**
* GetFarcasterUserAddressesRequest
*
* Note: exported as public Type
*/
export interface GetFarcasterUserAddressesRequest {
fid: number;
farcasterAddressType: FarcasterAddressType;
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 🌲☀️🌲
export { version } from './version';
export { getFrameHtmlResponse } from './core/getFrameHtmlResponse';
export { getFarcasterUserAddresses } from './core/getFarcasterUserAddresses';
export { getFarcasterUserAddresses } from './farcaster/getFarcasterUserAddresses';
export { getFrameMetadata } from './core/getFrameMetadata';
export { getFrameMessage } from './core/getFrameMessage';
export { FrameMetadata } from './components/FrameMetadata';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/neynar/frame/neynarGetCustodyAddressForFid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function neynarGetCustodyAddressesForFid(
const responseBody = await resp.json();

if (!responseBody || !responseBody.result || !responseBody.result.custodyAddress) {
throw new Error('No verified addresses found for FID ' + fid);
throw new Error('No custody address found for FID ' + fid);
}

return responseBody.result.custodyAddress;
Expand Down

0 comments on commit 637cd67

Please sign in to comment.