Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juiceworks/hubble-grpc
Go gRPC bindings for interacting with Farcaster hubs.
https://github.com/juiceworks/hubble-grpc
farcaster golang grpc hubble
Last synced: 28 days ago
JSON representation
Go gRPC bindings for interacting with Farcaster hubs.
- Host: GitHub
- URL: https://github.com/juiceworks/hubble-grpc
- Owner: juiceworks
- License: mit
- Created: 2024-08-14T19:20:36.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-14T19:24:23.000Z (3 months ago)
- Last Synced: 2024-10-06T10:22:51.195Z (about 1 month ago)
- Topics: farcaster, golang, grpc, hubble
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hubble gRPC Bindings for Golang
Basic gRPC bindings for interacting with [Farcaster Hubs](https://github.com/farcasterxyz/hub-monorepo).
To install in a Go project:
```bash
go get github.com/juiceworks/hubble-grpc
```To generate updated bindings:
```bash
git clone https://github.com/juiceworks/hubble-grpc
cd hubble-grpc
chmod +x main.sh
./main.sh
```## Resources
1. To find public hubs you can use `hubble-grpc` with, see [this list of public hubs](https://foss.farchiver.xyz/hubs/list).
2. To learn about the Farcaster Hub gRPC API, see the [Farcaster Hub API Docs](https://docs.farcaster.xyz/reference/hubble/architecture).
3. For a basic example which prints out new casts, see [example/example.go](example/example.go).## About
The `.proto` schemas are sourced from the [Hub Monorepo](https://github.com/farcasterxyz/hub-monorepo/tree/main/protobufs/schemas). `main.sh` adds a `go_package` option to each schema file beneath its syntax declaration:
```proto
option go_package = "github.com/juiceworks/hubble-grpc";
```Bindings are then generated with `protoc`:
```bash
protoc --proto_path=schemas --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative schemas/*.proto
```