s/o 🥩🧆 @meatballs who is, um, hilarious. They asked for guidance on casting from an existing fc account using a local snapchain node.
This repo shows POC of bringing your own signer and writing to the network. It is a stripped-down version of code that was running around April~June 2025 as my daily driver, before and after the Snapchain rollout, when I painted the chain with x402 transactions.
If you want to try x402 with Neynar, provide your EOA private key in src/constants.ts.
- Node.js 22.x
- Bun 1.x (will also work with npm, yarn, pnpm, etc.)
bun installupdate the src/constants.ts file with your own fid and signer_pk
to point to your own node, update its details in src/utils.ts around lines 29:37 and point to it in line 60
add your own code for handling embeds (including quote casts), mentions, channels, etc.
in src/cast.ts, change the text to your own, and flip false to true
bun castThe code herein is cobbled from:
Farcasterdocshealthbotbyborodutchx402api documentation
src/cast.ts- A script that publishes a cast to the networksrc/constants.ts- Constants for the user and the EOA key (optional)src/utils.ts- Utility functionssrc/use-x402-axios.ts- read/write to the network (incl. x402 payments)package.json- Project configurationtsconfig.json- TypeScript configuration
Snapchain will confirm that the signer key belongs to the fid from which you wish to cast.
Easiest way to get a signer private key is to run Cast Keys locally
When using your signer, your casts + activity will show up in Farcaster app as
Sent from [your username]
You may also consider creating a separate Farcaster account for your Snapchain node, and using that new account to create a signer which belongs to your primary account.
Here is an example account that was used to create fun little messages: