Related API: List signers
Prerequisites
Node.js Installed
Ensure you have Nodejs installed on your system. You can download it from Node.js’ official website.
API Key and Mnemonic
Obtain an API key from the dev portal Ensure you have a valid Ethereum mnemonic phrase of the account with a signer associated with the above API key.
Code Breakdown and Steps
Convert Mnemonic to Account
The
mnemonicToAccount function converts your mnemonic into an account object:Configure Neynar API Client
Replace
"YOUR_API_KEY_HERE" with your API key and set the correct base path for the Neynar API:Create the SIWE Message
The
createSiweMessage function generates a SIWE message with details such as domain, address, and nonce:Sign and Verify the Message
The
fetchSigners function handles the signing process and fetches signers:Note: The address should be the custody_address of the farcaster account (Check custody_address in User API)
