{"id":23274429,"url":"https://github.com/weeaa/goyser","last_synced_at":"2025-07-13T05:38:27.976Z","repository":{"id":245282643,"uuid":"817019028","full_name":"weeaa/goyser","owner":"weeaa","description":"🐳 Solana Geyser Go SDK","archived":false,"fork":false,"pushed_at":"2024-12-01T19:44:13.000Z","size":171,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-01T20:28:56.424Z","etag":null,"topics":["bot","cryptocurrency","geyser","mev","solana"],"latest_commit_sha":null,"homepage":"https://docs.solanalabs.com/validator/geyser","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/weeaa.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-06-18T21:18:44.000Z","updated_at":"2024-12-01T19:46:55.000Z","dependencies_parsed_at":"2024-08-25T13:28:49.311Z","dependency_job_id":"93d47248-9f51-40dc-94a9-1f6b7c740eea","html_url":"https://github.com/weeaa/goyser","commit_stats":null,"previous_names":["weeaa/goyser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weeaa%2Fgoyser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weeaa%2Fgoyser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weeaa%2Fgoyser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weeaa%2Fgoyser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weeaa","download_url":"https://codeload.github.com/weeaa/goyser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494921,"owners_count":18235047,"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","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":["bot","cryptocurrency","geyser","mev","solana"],"created_at":"2024-12-19T20:13:12.093Z","updated_at":"2025-07-13T05:38:27.963Z","avatar_url":"https://github.com/weeaa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solana Geyser SDK\n[![GoDoc](https://pkg.go.dev/badge/github.com/weeaa/goyser?status.svg)](https://pkg.go.dev/github.com/weeaa/goyser?tab=doc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/weeaa/goyser)](https://goreportcard.com/report/github.com/weeaa/goyser)\n[![License](https://img.shields.io/badge/license-Apache_2.0-crimson)](https://opensource.org/license/apache-2-0)\n\n\nThis library contains tooling to interact with **[Yellowstone](https://github.com/rpcpool/yellowstone-grpc)** \u0026 **[Jito](https://github.com/jito-foundation/geyser-grpc-plugin)** Geyser plugins.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/weeaa/goyser/assets/108926252/601185b7-3f50-4542-ae94-16488a651467\" alt=\"yellowstone\" width=\"500\" style=\"border-radius: 15px;\"/\u003e\n\u003c/div\u003e\n\n## ❇️ Contents\n- [Support](#-support)\n- [Methods](#-methods)\n- [Installing](#-installing)\n- [Examples](#-examples)\n  - [Subscribe to Account](#subscribe-to-account)\n- [License](#-license)\n\n## 🛟 Support\nIf my work has been useful in building your for-profit services/infra/bots/etc, consider donating at\n`EcrHvqa5Vh4NhR3bitRZVrdcUGr1Z3o6bXHz7xgBU2FB` (SOL).\n\n## 📡 Methods\n- **Yellowstone** ✅\n  - `SubscribeAccounts`\n    - `AppendAccounts`\n    - `UnsubscribeAccounts`\n    - `UnsubscribeAccountsByFilterName`\n    - `UnsubscribeAllAccounts`\n  - `SubscribeSlots`\n    - `UnsubscribeSlots`\n  - `SubscribeTransaction`\n    - `UnsubscribeTransaction`\n  - `SubscribeTransactionStatus`\n    - `UnsubscribeTransactionStatus`\n  - `SubscribeBlocks`\n    - `UnsubscribeBlocks`\n  - `SubscribeBlocksMeta`\n    - `UnsubscribeBlocksMeta`\n  - `SubscribeEntry`\n    - `UnsubscribeEntry`\n  - `SubscribeAccountDataSlice`\n    - `UnsubscribeAccountDataSlice`\n- **Jito** (TBD)\n\n💡 It also contains a `ConvertTransaction` function which converts from Goyser to [github.com/gagliardetto/solana-go](https://github.com/gagliardetto/solana-go) types :)\n\n## 💾 Installing\n\nGo 1.22.0 or higher.\n```shell\ngo get github.com/weeaa/goyser@latest\n```\n\n## 💻 Examples\n\n### `Subscribe to Account – Yellowstone`\nSimple example on how to monitor an account for transactions with explanations.\n```go\npackage main\n\nimport (\n  \"context\"\n  \"github.com/weeaa/goyser/yellowstone_geyser\"\n  geyser_pb \"github.com/weeaa/goyser/yellowstone_geyser/pb\"\n  \"log\"\n  \"os\"\n  \"time\"\n)\n\nconst subAccount = \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n\nfunc main() {\n  ctx := context.Background()\n\n  // get the geyser rpc address\n  geyserRPC := os.Getenv(\"GEYSER_RPC\")\n\n  // create geyser client\n  client, err := yellowstone_geyser.New(ctx, geyserRPC, nil)\n  if err != nil {\n    log.Fatal(err)\n  }\n\n  // create a new subscribe client which is tied, for our example we will name it main\n  // the created client is stored in client.Streams\n  if err = client.AddStreamClient(ctx, \"main\", geyser_pb.CommitmentLevel_CONFIRMED); err != nil {\n    log.Fatal(err)\n  }\n\n  // get the stream client\n  streamClient := client.GetStreamClient(\"main\")\n  if streamClient == nil {\n    log.Fatal(\"client does not have a stream named main\")\n  }\n\n  // subscribe to the account you want to see txns from and set a custom filter name to filter them out later\n  if err = streamClient.SubscribeAccounts(\"accounts\", \u0026geyser_pb.SubscribeRequestFilterAccounts{\n    Account: []string{subAccount},\n  }); err != nil {\n    log.Fatal(err)\n  }\n\n  // loop through the stream and print the output\n  for out := range streamClient.Ch {\n    // u can filter the output by checking the filters\n    go func() {\n      filters := out.GetFilters()\n      for _, filter := range filters {\n        switch filter {\n        case \"accounts\":\n          log.Printf(\"account filter: %+v\", out.GetAccount())\n        default:\n          log.Printf(\"unknown filter: %s\", filter)\n        }\n      }\n    }()\n    break\n  }\n\n  time.Sleep(5 * time.Second)\n\n  // unsubscribe from the account\n  if err = streamClient.UnsubscribeAccounts(\"accounts\", subAccount); err != nil {\n    log.Fatal(err)\n  }\n}\n```\n\n## 📃 License\n\n[Apache-2.0 License](https://github.com/weeaa/jito-go/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweeaa%2Fgoyser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweeaa%2Fgoyser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweeaa%2Fgoyser/lists"}