Files
hub-monorepo/packages/hub-nodejs/docs
Varun Srinivasan 1b5f6b2c1f docs(hub-nodejs): more cleanup based on user testing (#743)
* docs(hub-nodejs): fix incorrect submitMessage signature

* docs: fix broken links in examples

* docs: fix relative links not working on npm

* docs: fix stackblitz link for chron-feed

* chore: add changeset
2023-03-23 14:37:58 -07:00
..

Documentation

@farcaster/hub-nodejs has five major components:

  • A Client, which can send and receive messages from a Farcaster Hub.
  • Messages, which are the atomic units of change on the Farcaster network.
  • Builders, which can be used to construct new messages.
  • Signers, which are required by Builders to sign messages.
  • Utils, which are helpers to deal with Farcaster idiosyncrasies.

Idiosyncrasies

  1. Timestamps are calculated from the Farcaster epoch, not the Unix epoch.
  2. Errors are handled with a monadic pattern, instead of try-catch.
  3. Ethers and noble are required to create new messages.
  4. Only Nodejs is supported, and browser support is a work in progress.
  5. Fixed length data is encoded in byte formats, instead of strings.

There are also a few Farcaster-specific terms that are very commonly used in this package:

Term Description
Cast A public message posted by a user
Fid A Farcaster id, issued by the Id Registry on Ethereum
Fname A Farcaster username, issued by the Name Registry on Ethereum.
Hub A node in the Farcaster network which stores Farcaster Messages
Reaction A public action between a user and a piece of content (e.g. like, recast)