import { NeynarAPIClient, Configuration } from "@neynar/nodejs-sdk";
const main = async () => {
const config = new Configuration({
apiKey: process.env.NEYNAR_API_KEY,
});
const neynarClient = new NeynarAPIClient(config);
const creationRequest = {
name: "gm",
pages: [
{
image: {
url: "https://remote-image.decentralized-content.com/image?url=https%3A%2F%2Fipfs.decentralized-content.com%2Fipfs%2Fbafybeifjdrcl2p4kmfv2uy3i2wx2hlxxn4hft3apr37lctiqsfdixjy3qi&w=1920&q=75",
aspect_ratio: "1.91:1",
},
title: "Neynar NFT minting frame",
buttons: [
{
action_type: "mint",
title: "Mint",
index: 1,
next_page: {
mint_url:
"eip155:8453:0x23687d295fd48db3e85248b734ea9e8fb3fced27:1",
},
},
],
input: {
text: {
enabled: false,
},
},
uuid: "gm",
version: "vNext",
},
],
};
const frame = await neynarClient.publishNeynarFrame(creationRequest);
console.log(frame);
};
main();