make seed phrase optional

This commit is contained in:
lucas-neynar
2025-03-13 14:58:32 -07:00
parent 3186cb7fc8
commit b88e72524a
7 changed files with 183 additions and 50 deletions

18
src/lib/neynar.ts Normal file
View File

@@ -0,0 +1,18 @@
import { NeynarAPIClient } from '@neynar/nodejs-sdk';
let neynarClient: NeynarAPIClient | null = null;
export function getNeynarClient() {
if (!neynarClient) {
const apiKey = process.env.NEYNAR_API_KEY;
if (!apiKey) {
throw new Error('NEYNAR_API_KEY not configured');
}
neynarClient = new NeynarAPIClient(apiKey);
}
return neynarClient;
}
// Example usage:
// const client = getNeynarClient();
// const user = await client.lookupUserByFid(fid);