go-farcaster

module
v1.0.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2023 License: MIT

README

Farcaster Go Client

This is the Golang implementation for Farcaster client based on the official documentation.

Inspired by Rust and Python client implementations. Coauthored by GitHub Copilot and ChatGPT. 🙏

Prerequisites

In order to test the examples you need to set the following environment variables in .env file.

FARCASTER_API_URL    = "https://api.farcaster.xyz"
FARCASTER_MNEMONIC   = "your mnemonic"
ETHEREUM_PROVIDER_WS = "your Goerli endpoint"

Registry is built based on the event logs to get fid <> fname <> address mappings. If ETHEREUM_PROVIDER_WS variable isn't set, you can still use the API. Mnemonic is required for authorization to access most of the API endpoints. However, it's not required by the client as some endpoints are open to public.

Examples

Some examples to test the client are:

go run examples/casts/casts_example.go
go run examples/reactions/reactions_example.go
go run examples/users/users_example.go

You can find other example runs under examples/ directory.

Future Work

  • Tests! There are currently no unit tests for the client, just examples. 😅
  • Missing comments on exported functions and structs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL