0.0.4 • Published 7 months ago

rinza v0.0.4

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

Rinza: a Farcaster bot SDK.

Installation: npm install rinza

TLDR

import { neynar, makeBot, makeHubFetcher } from "rinza";

const client = neynar(signerUUID, apiKey);
const bot = makeBot({
  hubFetcher: makeHubFetcher(hubHTTP),
  castFn: client.cast,
});

// listen to notifications, bot reples "echo!" to each notifications
bot.listen(botFID, (ctx) => {
  console.log(ctx.casts)
  ctx.reply("echo!");
});

// listen to all cast in the network, then log to console
bot.listen(-1, (ctx) => {
  console.log(ctx.casts)
});

// casts the current ETH block height every ten seconds
new Cron("*/10 * * * * *", () => {
  const ethBlockHeight = fetchBlockHeight('eth');
  poster(`Current block height: ${ethBlockHeight}`);
});

bot.start();

To get Neynar API key: https://neynar.com

If you have bots that's running on Warpcast's API, I'll help you migrate to Neynar or Hubble, DM me on Telegram: t.me/pixelhackxyz

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago