mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-12-08 02:12:34 -05:00
Move constants
This commit is contained in:
@@ -1,23 +1,13 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { getNeynarClient } from '~/lib/neynar';
|
||||
import { mnemonicToAccount } from 'viem/accounts';
|
||||
import {
|
||||
SIGNED_KEY_REQUEST_TYPE,
|
||||
SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN,
|
||||
} from '~/lib/constants';
|
||||
|
||||
const postRequiredFields = ['signerUuid', 'publicKey'];
|
||||
|
||||
const SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN = {
|
||||
name: 'Farcaster SignedKeyRequestValidator',
|
||||
version: '1',
|
||||
chainId: 10,
|
||||
verifyingContract:
|
||||
'0x00000000fc700472606ed4fa22623acf62c60553' as `0x${string}`,
|
||||
};
|
||||
|
||||
const SIGNED_KEY_REQUEST_TYPE = [
|
||||
{ name: 'requestFid', type: 'uint256' },
|
||||
{ name: 'key', type: 'bytes' },
|
||||
{ name: 'deadline', type: 'uint256' },
|
||||
];
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const body = await request.json();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user