Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.86 KB

README.md

File metadata and controls

29 lines (22 loc) · 1.86 KB

Documentation

@farcaster/hub-nodejs has five major components:

  • A grpc 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.

Note: The HTTP API is an alternate way to read/write to the Hub. Please see the HTTP API docs

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)