{"id":20170674,"url":"https://github.com/bitcoinschema/go-bitcoin","last_synced_at":"2025-08-21T20:33:03.517Z","repository":{"id":37966247,"uuid":"296189806","full_name":"BitcoinSchema/go-bitcoin","owner":"BitcoinSchema","description":"A library for working with Bitcoin (BSV) transactions, addresses, keys, encryption, and more.","archived":false,"fork":false,"pushed_at":"2024-11-26T21:40:27.000Z","size":594,"stargazers_count":28,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-07T16:24:45.910Z","etag":null,"topics":["bitcoin","bitcoinsv","bsv","go","golang"],"latest_commit_sha":null,"homepage":"","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/BitcoinSchema.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"BitcoinSchema","custom":"https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=go-bitcoin\u0026utm_term=go-bitcoin\u0026utm_content=go-bitcoin"}},"created_at":"2020-09-17T01:44:59.000Z","updated_at":"2024-11-25T22:14:53.000Z","dependencies_parsed_at":"2024-04-01T23:27:31.967Z","dependency_job_id":"f82c7916-d84e-4b78-98d9-f1dec4f5ee7f","html_url":"https://github.com/BitcoinSchema/go-bitcoin","commit_stats":null,"previous_names":["rohenaz/go-bitcoin"],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgo-bitcoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgo-bitcoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgo-bitcoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitcoinSchema%2Fgo-bitcoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitcoinSchema","download_url":"https://codeload.github.com/BitcoinSchema/go-bitcoin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532448,"owners_count":18240792,"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","bitcoinsv","bsv","go","golang"],"created_at":"2024-11-14T01:20:14.536Z","updated_at":"2024-12-20T04:07:56.820Z","avatar_url":"https://github.com/BitcoinSchema.png","language":"Go","funding_links":["https://github.com/sponsors/BitcoinSchema","https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=go-bitcoin\u0026utm_term=go-bitcoin\u0026utm_content=go-bitcoin"],"categories":[],"sub_categories":[],"readme":"# go-bitcoin\n\u003e A library for working with Bitcoin (BSV) transactions, addresses, keys, encryption, and more.\n\n[![Release](https://img.shields.io/github/release-pre/BitcoinSchema/go-bitcoin.svg?logo=github\u0026style=flat\u0026v=2)](https://github.com/BitcoinSchema/go-bitcoin/releases)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/BitcoinSchema/go-bitcoin/run-tests.yml?branch=master\u0026logo=github\u0026v=2)](https://github.com/BitcoinSchema/go-bitcoin/actions)\n[![Report](https://goreportcard.com/badge/github.com/BitcoinSchema/go-bitcoin?style=flat\u0026v=2)](https://goreportcard.com/report/github.com/BitcoinSchema/go-bitcoin)\n[![codecov](https://codecov.io/gh/BitcoinSchema/go-bitcoin/branch/master/graph/badge.svg?v=2)](https://codecov.io/gh/BitcoinSchema/go-bitcoin)\n[![Go](https://img.shields.io/github/go-mod/go-version/BitcoinSchema/go-bitcoin?v=2)](https://golang.org/)\n\u003cbr\u003e\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod\u0026v=2)](https://gitpod.io/#https://github.com/BitcoinSchema/go-bitcoin)\n[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/BitcoinSchema/go-bitcoin\u0026style=flat\u0026v=2)](https://mergify.io)\n[![Sponsor](https://img.shields.io/badge/sponsor-BitcoinSchema-181717.svg?logo=github\u0026style=flat\u0026v=2)](https://github.com/sponsors/BitcoinSchema)\n[![Donate](https://img.shields.io/badge/donate-bitcoin-ff9900.svg?logo=bitcoin\u0026style=flat\u0026v=2)](https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=go-bitcoin\u0026utm_term=go-bitcoin\u0026utm_content=go-bitcoin)\n\n\u003cbr/\u003e\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Examples \u0026 Tests](#examples--tests)\n- [Benchmarks](#benchmarks)\n- [Code Standards](#code-standards)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n\u003cbr/\u003e\n\n## Installation\n\n**go-bitcoin** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).\n\n```shell script\ngo get -u github.com/bitcoinschema/go-bitcoin/v2\n```\n\n\u003e If you want to install the **deprecated V1**:\n```shell script\ngo get -u github.com/bitcoinschema/go-bitcoin@v1\n```\n\n\u003cbr/\u003e\n\n## Documentation\n\nView the generated [documentation](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin)\n\n[![GoDoc](https://godoc.org/github.com/bitcoinschema/go-bitcoin/?status.svg\u0026style=flat)](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin)\n\n### Features\n\n- **Addresses**\n  - [Address from PrivateKey (bec.PrivateKey)](address.go)\n  - [Address from Script](address.go)\n- **Encryption**\n  - [Encrypt With Private Key](encryption.go)\n  - [Decrypt With Private Key](encryption.go)\n  - [Encrypt Shared](encryption.go)\n- **HD Keys** _(Master / xPub)_\n  - [Generate HD Keys](hd_key.go)\n  - [Generate HD Key from string](hd_key.go)\n  - [Get HD Key by Path](hd_key.go)\n  - [Get PrivateKey by Path](hd_key.go)\n  - [Get HD Child Key](hd_key.go)\n  - [Get Addresses from HD Key](hd_key.go)\n  - [Get XPub from HD Key](hd_key.go)\n  - [Get HD Key from XPub](hd_key.go)\n  - [Get PublicKeys for Path](hd_key.go)\n  - [Get Addresses for Path](hd_key.go)\n- **PubKeys**\n  - [Create PubKey from PrivateKey](pubkey.go)\n  - [PubKey from String](pubkey.go)\n- **Private Keys**\n  - [Create PrivateKey](private_key.go)\n  - [Create WIF](private_key.go)\n  - [PrivateKey (string) to Address (string)](address.go)\n  - [PrivateKey from string](private_key.go)\n  - [Generate Shared Keypair](private_key.go)\n  - [Get Private and Public keys](private_key.go)\n  - [WIF to PrivateKey](private_key.go)\n  - [PrivateKey to WIF](private_key.go)\n- **Scripts**\n  - [Script from Address](script.go)\n- **Signatures**\n  - [Sign](sign.go) \u0026 [Verify a Bitcoin Message](verify.go)\n  - [Verify a DER Signature](verify.go)\n- **Transactions**\n  - [Calculate Fee](transaction.go)\n  - [Create Tx](transaction.go)\n  - [Create Tx using WIF](transaction.go)\n  - [Create Tx with Change](transaction.go)\n  - [Tx from Hex](transaction.go)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003ePackage Dependencies\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n- [bitcoinsv/bsvd](https://github.com/bitcoinsv/bsvd)\n- [libsv/go-bk](https://github.com/libsv/go-bk)\n- [libsv/go-bt](https://github.com/libsv/go-bt)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eLibrary Deployment\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\n[goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to GitHub and can be installed via: `brew install goreleaser`.\n\nThe [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser).\n\nUse `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e\u003ccode\u003eMakefile Commands\u003c/code\u003e\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\nView all `makefile` commands\n\n```shell script\nmake help\n```\n\nList of all current commands:\n\n```text\nall                   Runs multiple commands\nclean                 Remove previous builds and any test cache data\nclean-mods            Remove all the Go mod cache\ncoverage              Shows the test coverage\ndiff                  Show the git diff\ngenerate              Runs the go generate command in the base of the repo\ngodocs                Sync the latest tag with GoDocs\nhelp                  Show this help message\ninstall               Install the application\ninstall-go            Install the application (Using Native Go)\ninstall-releaser      Install the GoReleaser application\nlint                  Run the golangci-lint application (install if not found)\nrelease               Full production release (creates release in GitHub)\nrelease               Runs common.release then runs godocs\nrelease-snap          Test the full release (build binaries)\nrelease-test          Full production test release (everything except deploy)\nreplace-version       Replaces the version in HTML/JS (pre-deploy)\ntag                   Generate a new tag and push (tag version=0.0.0)\ntag-remove            Remove a tag if found (tag-remove version=0.0.0)\ntag-update            Update an existing tag to current commit (tag-update version=0.0.0)\ntest                  Runs lint and ALL tests\ntest-ci               Runs all tests via CI (exports coverage)\ntest-ci-no-race       Runs all tests via CI (no race) (exports coverage)\ntest-ci-short         Runs unit tests via CI (exports coverage)\ntest-no-lint          Runs just tests\ntest-short            Runs vet, lint and tests (excludes integration tests)\ntest-unit             Runs tests and outputs coverage\nuninstall             Uninstall the application (and remove files)\nupdate-linter         Update the golangci-lint package (macOS only)\nvet                   Run the Go vet application\n```\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n## Examples \u0026 Tests\nAll unit tests and [examples](examples) run via [GitHub Actions](https://github.com/BitcoinSchema/go-bitcoin/actions) and\nuses [Go version 1.18.x](https://golang.org/doc/go1.18). View the [configuration file](.github/workflows/run-tests.yml).\n\nRun all tests (including integration tests)\n\n```shell script\nmake test\n```\n\nRun tests (excluding integration tests)\n\n```shell script\nmake test-short\n```\n\n\u003cbr/\u003e\n\n## Benchmarks\n\nRun the Go benchmarks:\n\n```shell script\nmake bench\n```\n\n\u003cbr/\u003e\n\n## Code Standards\n\nRead more about this Go project's [code standards](.github/CODE_STANDARDS.md).\n\n\u003cbr/\u003e\n\n## Usage\n\nCheckout all the [examples](examples)!\n\n\u003cbr/\u003e\n\n## Maintainers\n\n| [\u003cimg src=\"https://github.com/mrz1836.png\" height=\"50\" alt=\"MrZ\" /\u003e](https://github.com/mrz1836) | [\u003cimg src=\"https://github.com/rohenaz.png\" height=\"50\" alt=\"MrZ\" /\u003e](https://github.com/rohenaz) |\n|:------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:|\n|                                [MrZ](https://github.com/mrz1836)                                 |                              [Satchmo](https://github.com/rohenaz)                               |\n\n\u003cbr/\u003e\n\n## Contributing\n\nView the [contributing guidelines](.github/CONTRIBUTING.md) and follow the [code of conduct](.github/CODE_OF_CONDUCT.md).\n\n### How can I help?\n\nAll kinds of contributions are welcome :raised_hands:!\nThe most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.\nYou can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/BitcoinSchema) :clap:\nor by making a [**bitcoin donation**](https://gobitcoinsv.com/#sponsor?utm_source=github\u0026utm_medium=sponsor-link\u0026utm_campaign=go-bitcoin\u0026utm_term=go-bitcoin\u0026utm_content=go-bitcoin) to ensure this journey continues indefinitely! :rocket:\n\n[![Stars](https://img.shields.io/github/stars/BitcoinSchema/go-bitcoin?label=Please%20like%20us\u0026style=social)](https://github.com/BitcoinSchema/go-bitcoin/stargazers)\n\n\u003cbr/\u003e\n\n## License\n\n[![License](https://img.shields.io/github/license/BitcoinSchema/go-bitcoin.svg?style=flat\u0026v=2)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinschema%2Fgo-bitcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinschema%2Fgo-bitcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinschema%2Fgo-bitcoin/lists"}