farcaster-feed
v0.3.0
Published
Farcaster-Feed is a Farcaster protocol syndication library for Node.js
Downloads
3
Readme
farcaster-feed
Farcaster-feed is a Farcaster protocol syndication tool for Node.js.
The library will cast "new" items for a given Farcaster user. The intended use case is with static site generators - similar to RSS feed generation, this library will auto-cast new posts.
Install
npm install --save farcaster-feed
Usage
You will need a Farcaster username (and its corresponding private key).
import { FarcasterFeed } from "farcaster-feed";
const username = "whatrocks";
const mnemonic = "words words wordzzz";
const farcaster = new FarcasterFeed(username, mnemonic);
const blogPosts = [
{
title: "Example.com",
url: "https://example.com",
otherContent: "ignored for now!",
},
{
title: "Charlie Harrington's Website",
url: "https://charlieharrington.com",
otherContent: "interesting stuff, ignored for now!",
}
];
const casts = blogPosts.map(({title, url, ...rest}) => ({ title, url }));
farcaster.castPosts(casts);
Update NPM
npm version
npm publish