{"id":22017317,"url":"https://github.com/prophet-solutions/geyser-sdk","last_synced_at":"2025-10-11T05:31:11.750Z","repository":{"id":265380716,"uuid":"894396716","full_name":"Prophet-Solutions/geyser-sdk","owner":"Prophet-Solutions","description":"⛩️ Geyser SDK supporting gRPC and Enhanced Websocket","archived":false,"fork":false,"pushed_at":"2025-01-24T08:20:12.000Z","size":65,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-04T09:36:12.204Z","etag":null,"topics":["docker","geyser-plugin","golang","grpc","solana"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Prophet-Solutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T09:34:46.000Z","updated_at":"2025-03-02T06:49:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8b0d5a1-dfd1-4e14-9530-206dc58c1247","html_url":"https://github.com/Prophet-Solutions/geyser-sdk","commit_stats":null,"previous_names":["prophet-solutions/geyser-sdk"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Prophet-Solutions/geyser-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prophet-Solutions%2Fgeyser-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prophet-Solutions%2Fgeyser-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prophet-Solutions%2Fgeyser-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prophet-Solutions%2Fgeyser-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prophet-Solutions","download_url":"https://codeload.github.com/Prophet-Solutions/geyser-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prophet-Solutions%2Fgeyser-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006320,"owners_count":26084085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","geyser-plugin","golang","grpc","solana"],"created_at":"2024-11-30T05:05:54.813Z","updated_at":"2025-10-11T05:31:11.377Z","avatar_url":"https://github.com/Prophet-Solutions.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geyser SDK\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\nGeyser SDK is a Go client library for interacting with the Geyser API. It provides both gRPC and WebSocket clients to connect to Geyser nodes and subscribe to Solana blockchain events such as transactions, accounts, slots, blocks, and more.\n\n## Features\n\n- **gRPC Client**: Connect to Geyser nodes using gRPC and subscribe to various Solana blockchain events.\n- **Enhanced WebSocket Client**: Use Geyser Enhanced WebSocket connections to subscribe to events in real-time.\n- **Event Subscriptions**: Subscribe to transactions, accounts, slots, blocks, block metadata, and entries.\n- **Data Conversion**: Convert Geyser transaction and block data into Solana Go SDK types.\n- **Automated Protobuf Generation**: Use Docker to automate the generation of Go code from protobuf definitions.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [gRPC Client](#grpc-client)\n  - [Enhanced WebSocket Client](#enhanced-websocket-client)\n- [Protobuf Generation](#protobuf-generation)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nTo use the Geyser SDK in your Go project, add it to your module dependencies:\n\n```bash\ngo get github.com/Prophet-Solutions/geyser-sdk\n```\n\nEnsure you have Go version **1.20** or higher installed.\n\n## Usage\n\n### gRPC Client\n\n#### Connecting to a Geyser Node\n\nCreate a new gRPC client by specifying the context, gRPC server URL, and optional compression and metadata. The client allows you to interact with the Geyser node using gRPC calls.\n\n#### Subscribing to Events\n\nUse the client to create a stream and subscribe to various events like accounts, transactions, slots, blocks, and more. You can manage subscriptions by adding, modifying, or removing them as needed.\n\n#### Handling Updates\n\nSet up channels to receive updates and errors from the stream. Implement your logic to process incoming data and handle any errors that occur during the streaming process.\n\n#### Closing the Client\n\nAlways close the client when it's no longer needed to gracefully terminate the connection and free up resources.\n\n### Enhanced WebSocket Client\n\n#### Connecting to a Geyser Enhanced WebSocket\n\nInstantiate the Enhanced WebSocket client with the Geyser node's WebSocket endpoint (tested with Helius). Establish the connection to start interacting with the node in real-time.\n\n#### Subscribing to Transactions and Accounts\n\nSubscribe to transactions and account updates by specifying filters and options. The client supports various subscription methods to cater to your application's needs.\n\n#### Handling Updates\n\nListen to the channels provided by the subscriptions to receive real-time updates. Process the data according to your application's requirements.\n\n#### Closing the Enhanced WebSocket Client\n\nClose the Enhanced WebSocket client to terminate the connection and ensure that all resources are properly released.\n\n## Protobuf Generation\n\nThe Geyser SDK uses protobuf definitions from the [yellowstone-grpc](https://github.com/rpcpool/yellowstone-grpc) project. A Docker setup is provided to automate the generation of Go code from the protobuf files.\n\n### Using Docker to Generate Protobuf Code\n\n1. **Build the Docker Image**\n\n   Build the Docker image using the provided `Dockerfile`.\n\n   ```bash\n   docker build -t geyser-sdk-protoc .\n   ```\n\n2. **Run the Protobuf Generation**\n\n   Run the Docker container to generate the protobuf code.\n\n   ```bash\n   docker run --rm -v $(pwd)/pb:/app/pb geyser-sdk-protoc\n   ```\n\n   This command mounts the local `pb` directory to the container and outputs the generated Go files there.\n\n### Files\n\n- **Dockerfile**\n\n  Sets up the Docker environment with Go and the necessary tools to generate protobuf files.\n\n- **generate.sh**\n\n  A script that pulls the latest protobuf definitions and generates the Go code.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub to contribute to the project.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprophet-solutions%2Fgeyser-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprophet-solutions%2Fgeyser-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprophet-solutions%2Fgeyser-sdk/lists"}