Farcaster Developer Documentation

website·Indexed 40 days ago

https://docs.farcaster.xyz/

Developer guides and technical reference for the Farcaster protocol. Includes documentation on account management, submitting data to hubs, querying casts and profiles, and building Snaps. Provides detailed specifications for smart contracts including the Id Registry, Key Registry, Storage Registry, and Tier Registry, as well as guides for interacting with Snapchain nodes.

Tokens
50.3K
Snippets
224
Records
351
Agent score
70%

What's inside Farcaster

  1. Overview of the Farcaster Key Registry

    The Key Registry stores the public keys associated with each Farcaster account. It is used to read information about an account's keys or to remove existing keys. Note that adding new keys must be done via the Key Gateway contract, not the Key Registry directly.
  2. Overview of Signed Key Request Validation

    The Signed Key Request Validator is used by the Key Registry to verify signed metadata before adding a key to an account. A Signed Key Request proves that a specific entity (the requesting fid, typically an app) asked a user (the primary fid) to authorize a key pair. This allows for on-chain attribution of which application requested a specific key.
  3. Overview of FName Registry Server

    The FName registry server is hosted at https://fnames.farcaster.xyz. It is an HTTP service that tracks fnames via 'transfers'.

    • Registration: A transfer from FID 0 to a user's FID.
    • Transfer: A transfer from one user's FID to another.
    • Unregistration: A transfer from a user's FID to FID 0.
  4. Overview of the Farcaster Protocol

    Farcaster is a sufficiently decentralized social network built on Ethereum, similar to X and Reddit. It allows users to create profiles, post "casts", and follow others. A key feature is that users own their accounts and relationships, enabling them to move between different applications seamlessly.
  5. Overview of Farcaster Onchain Registry Contracts

    Farcaster accounts are managed and secured onchain via three primary contracts deployed on OP Mainnet. These registries handle account creation, storage rental, and application key management.
  6. Overview of @farcaster/auth-client

    The @farcaster/auth-client library is a framework-agnostic client for Farcaster Auth. It is intended for developers who are not using React, require high customizability, or need to interact with the Farcaster Auth relay directly to build a custom 'Sign in With Farcaster' flow. For React-based projects, the Auth Kit is recommended instead.
  7. Overview of the Id Registry contract

    The Id Registry records which fid is associated with which Ethereum address and manages fid transfers and recoveries. Use this contract to read fid information, transfer or recover an fid, or manage an fid's recovery address. Note that registering a new fid must be done via the ID Gateway, not the Id Registry directly.
  8. Overview of Sign In with Farcaster (SIWF)

    Sign In with Farcaster (SIWF) allows users to authenticate into applications using their Farcaster identity. By implementing SIWF, developers can access public social data, such as the user's social graph and profile information, to create social-powered features and a streamlined onboarding process.
  9. Understand Farcaster Snaps architecture

    Snaps are lightweight applications embedded within Farcaster casts. They function by having a snap server return a JSON response, which the Farcaster client then renders in the feed. Snaps can respond to user inputs (such as buttons, sliders, and text) without executing any code on the client side.