Skip to content

Farcaster-feed is a Farcaster protocol syndication tool for Node.js

License

Notifications You must be signed in to change notification settings

whatrocks/farcaster-feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

farcaster-feed

NPM NPM

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
git push —-tags origin main
npm publish

About

Farcaster-feed is a Farcaster protocol syndication tool for Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published