@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
- Timestamps are calculated from the Farcaster epoch, not the Unix epoch.
- Errors are handled with a monadic pattern, instead of try-catch.
- Ethers and noble are required to create new messages.
- Only Nodejs is supported, and browser support is a work in progress.
- 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) |