{"id":21040789,"url":"https://github.com/checksum0/go-electrum","last_synced_at":"2025-07-21T09:32:00.232Z","repository":{"id":35048393,"uuid":"179425280","full_name":"checksum0/go-electrum","owner":"checksum0","description":"A pure Go ElectrumX JSON-RPC library.","archived":false,"fork":false,"pushed_at":"2024-12-06T06:57:03.000Z","size":82,"stargazers_count":28,"open_issues_count":7,"forks_count":30,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-07T06:42:53.716Z","etag":null,"topics":["bitcoin","bitcoin-cash","cryptocurrency","electrum","electrumx","golang","json-rpc"],"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/checksum0.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,"zenodo":null}},"created_at":"2019-04-04T05:05:52.000Z","updated_at":"2024-12-06T16:06:29.000Z","dependencies_parsed_at":"2024-06-19T00:18:50.308Z","dependency_job_id":"82e830da-9706-4c48-91dc-982154e0f295","html_url":"https://github.com/checksum0/go-electrum","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/checksum0/go-electrum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checksum0%2Fgo-electrum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checksum0%2Fgo-electrum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checksum0%2Fgo-electrum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checksum0%2Fgo-electrum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/checksum0","download_url":"https://codeload.github.com/checksum0/go-electrum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checksum0%2Fgo-electrum/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266275896,"owners_count":23903944,"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":["bitcoin","bitcoin-cash","cryptocurrency","electrum","electrumx","golang","json-rpc"],"created_at":"2024-11-19T13:48:05.699Z","updated_at":"2025-07-21T09:32:00.187Z","avatar_url":"https://github.com/checksum0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-electrum [![GoDoc](https://godoc.org/github.com/checksum0/go-electrum?status.svg)](https://godoc.org/github.com/checksum0/go-electrum)\nA pure Go [Electrum](https://electrum.org/) bitcoin library supporting the latest [ElectrumX](https://github.com/kyuupichan/electrumx) protocol versions.  \nThis makes it easy to write cryptocurrencies based services in a trustless fashion using Go without having to run a full node.\n\n![go-electrum](https://raw.githubusercontent.com/checksum0/go-electrum/master/media/logo.png)\n\n## Usage\nSee [example/](https://github.com/checksum0/go-electrum/tree/master/example) for more.\n\n### electrum [![GoDoc](https://godoc.org/github.com/checksum0/go-electrum/electrum?status.svg)](https://godoc.org/github.com/checksum0/go-electrum/electrum)\n```bash\n$ go get github.com/checksum0/go-electrum\n```\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/checksum0/go-electrum/electrum\"\n)\n\nfunc main() {\n\t// Establishing a new SSL connection to an ElectrumX server\n\tclient := electrum.NewClient()\n\tif err := client.ConnectTCP(context.TODO(), \"bch.imaginary.cash:50001\"); err != nil {\n\t\tlog.Fatal(err)\n\t}\n    ctx := context.TODO()\n\t// Making sure connection is not closed with timed \"client.ping\" call\n\tgo func() {\n\t\tfor {\n\t\t\tif err := client.Ping(ctx); err != nil {\n\t\t\t\tlog.Fatal(err)\n\t\t\t}\n\t\t\ttime.Sleep(60 * time.Second)\n\t\t}\n\t}()\n\n\t// Making sure we declare to the server what protocol we want to use\n\tif _, _, err := client.ServerVersion(ctx); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Asking the server for the balance of address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\n\t// 8b01df4e368ea28f8dc0423bcf7a4923e3a12d307c875e47a0cfbf90b5c39161\n\t// We must use scripthash of the address now as explained in ElectrumX docs\n\tscripthash, _ := electrum.AddressToElectrumScriptHash(\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\")\n\tbalance, err := client.GetBalance(ctx, scripthash)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Address confirmed balance:   %+v\", balance.Confirmed)\n\tlog.Printf(\"Address unconfirmed balance: %+v\", balance.Unconfirmed)\n}\n```\n\n# License\ngo-electrum is licensed under the MIT license. See LICENSE file for more details.\n\nCopyright (c) 2022 Roman Maklakov  \nCopyright (c) 2019 Ian Descôteaux  \nCopyright (c) 2015 Tristan Rice\n\nBased on Tristan Rice [go-electrum](https://github.com/d4l3k/go-electrum) unmaintained library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchecksum0%2Fgo-electrum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchecksum0%2Fgo-electrum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchecksum0%2Fgo-electrum/lists"}