Take a look at how to create frames on the fly using our SDK
@neynar/nodejs-sdk
, so let’s install that as well:
script.js
file and add the following:
publishNeynarFrame
function accepts an object with a bunch of parameters. Let’s take a look at what they are:
name
: This will be the name of your frame, and it will be visible only to you on your dashboardpages
: This will be an array of the pages to display on the frame; the parameters here are just what you would typically pass in a frame, like image, title, buttons, input, version, etc.next_page
: This is where you define what happens when you click the button. Since we are creating an NFT minting frame, it contains the mint_url
. But you can pass in redirect_url
to redirect to a new page or uuid
of a new page, to change the current frame page.chainId
of your chain on ChainList. For example, chainId
for the base mainnet chain is 8453.