How to get relevant mints of Farcaster user
This guide demonstrates how to use the Neynar SDK to fetch all mint actions relevant to a contract address (and optionally tokenId for ERC1155s) given a user’s Ethereum address.
Check out this Getting started guide to learn how to set up your environment and get an API key.
First, initialize the client:
First we fetch the custody address for a user:
Then we fetch the relevant mints for the user:
Example output:
It’s that easy to get relevant mints for a Farcaster user!