{"id":26095302,"url":"https://github.com/osoianmarcel/claymore-go","last_synced_at":"2025-04-12T10:07:27.115Z","repository":{"id":57563054,"uuid":"118500835","full_name":"OsoianMarcel/claymore-go","owner":"OsoianMarcel","description":"Claymore Client written in Go","archived":false,"fork":false,"pushed_at":"2019-04-01T09:01:54.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T10:07:16.725Z","etag":null,"topics":["claymore","client","golang","mining","stats"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OsoianMarcel.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}},"created_at":"2018-01-22T18:57:43.000Z","updated_at":"2022-01-25T15:47:24.000Z","dependencies_parsed_at":"2022-08-31T05:10:28.550Z","dependency_job_id":null,"html_url":"https://github.com/OsoianMarcel/claymore-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OsoianMarcel%2Fclaymore-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OsoianMarcel%2Fclaymore-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OsoianMarcel%2Fclaymore-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OsoianMarcel%2Fclaymore-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OsoianMarcel","download_url":"https://codeload.github.com/OsoianMarcel/claymore-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550635,"owners_count":21122933,"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":["claymore","client","golang","mining","stats"],"created_at":"2025-03-09T13:15:34.215Z","updated_at":"2025-04-12T10:07:27.079Z","avatar_url":"https://github.com/OsoianMarcel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claymore-go\nGo library used to get claymore stats in human readable model\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/OsoianMarcel/claymore-go/blob/master/LICENSE)\n\n## Example of simple web server using this library\n\n```go\npackage main\n\nimport (\n\t\"github.com/OsoianMarcel/claymore-go\"\n\t\"net/http\"\n\t\"encoding/json\"\n)\n\ntype ErrorResponse struct {\n\tError string `json:\"error\"`\n}\n\ntype DataResponse struct {\n\tData interface{} `json:\"data\"`\n}\n\ntype ExtraResponse struct {\n\tHighestTemp claymore.TempAndFanReport `json:\"highest_temp\"`\n}\n\ntype StatsResponse struct {\n\tStats claymore.StatsModel `json:\"stats\"`\n\tExtra ExtraResponse       `json:\"extra\"`\n}\n\nfunc main() {\n\tcc := claymore.NewClient(\"localhost:3333\")\n\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tw.Header().Add(\"Content-Type\", \"application/json\")\n\n\t\tstats, err := cc.GetStats()\n\n\t\tif err != nil {\n\t\t\tw.WriteHeader(http.StatusServiceUnavailable)\n\t\t\tjson.NewEncoder(w).Encode(ErrorResponse{err.Error()})\n\t\t\treturn\n\t\t}\n\n\t\textraResp := ExtraResponse{}\n\n\t\tif ht, err := stats.GetHighestTemp(); err == nil {\n\t\t\textraResp.HighestTemp = ht\n\t\t}\n\n\t\tstatsResp := StatsResponse{stats, extraResp}\n\n\t\tjson.NewEncoder(w).Encode(DataResponse{statsResp})\n\t})\n\n\thttp.ListenAndServe(\":8080\", nil)\n}\n```\n\n## Server output\n```json\n{\n\t\"data\": {\n\t\t\"stats\": {\n\t\t\t\"miner_version\": \"10.5 - ETH\",\n\t\t\t\"running_minutes\": 1409,\n\t\t\t\"eth_report\": {\n\t\t\t\t\"total_mhs\": 80941,\n\t\t\t\t\"shares\": 1640,\n\t\t\t\t\"rejected_shares\": 1,\n\t\t\t\t\"invalid_shares\": 37,\n\t\t\t\t\"pool_switches\": 1,\n\t\t\t\t\"mhs_per_gpu\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 13344,\n\t\t\t\t\t\t\"gpu\": 0\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 13352,\n\t\t\t\t\t\t\"gpu\": 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 13398,\n\t\t\t\t\t\t\"gpu\": 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 14151,\n\t\t\t\t\t\t\"gpu\": 3\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 13352,\n\t\t\t\t\t\t\"gpu\": 4\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 13342,\n\t\t\t\t\t\t\"gpu\": 5\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"alt_report\": {\n\t\t\t\t\"total_mhs\": 0,\n\t\t\t\t\"shares\": 0,\n\t\t\t\t\"rejected_shares\": 0,\n\t\t\t\t\"invalid_shares\": 0,\n\t\t\t\t\"pool_switches\": 0,\n\t\t\t\t\"mhs_per_gpu\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 0\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 1\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 2\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 3\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 4\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"mhs\": 0,\n\t\t\t\t\t\t\"gpu\": 5\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"temp_and_fan_reports\": [\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 66,\n\t\t\t\t\t\"fan\": 40,\n\t\t\t\t\t\"gpu\": 0\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 66,\n\t\t\t\t\t\"fan\": 40,\n\t\t\t\t\t\"gpu\": 1\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 67,\n\t\t\t\t\t\"fan\": 41,\n\t\t\t\t\t\"gpu\": 2\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 67,\n\t\t\t\t\t\"fan\": 40,\n\t\t\t\t\t\"gpu\": 3\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 67,\n\t\t\t\t\t\"fan\": 40,\n\t\t\t\t\t\"gpu\": 4\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"temp\": 63,\n\t\t\t\t\t\"fan\": 80,\n\t\t\t\t\t\"gpu\": 5\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"pools\": [\n\t\t\t\t\"eu1.ethermine.org:4444\"\n\t\t\t]\n\t\t},\n\t\t\"extra\": {\n\t\t\t\"highest_temp\": {\n\t\t\t\t\"temp\": 67,\n\t\t\t\t\"fan\": 41,\n\t\t\t\t\"gpu\": 2\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n## Contribute\n\nContributions to the package are always welcome!\n\n* Report any bugs or issues you find on the [issue tracker].\n* You can grab the source code at the package's [Git repository].\n\n## Donation\nGive me a Star if you like it!\n\n## License\n\nAll contents of this package are licensed under the [MIT license].\n\n[issue tracker]: https://github.com/OsoianMarcel/claymore-go/issues\n[Git repository]: https://github.com/OsoianMarcel/claymore-go\n[MIT license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosoianmarcel%2Fclaymore-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosoianmarcel%2Fclaymore-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosoianmarcel%2Fclaymore-go/lists"}