-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
153 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,160 @@ | ||
# Go-Bitcoin | ||
# go-bitcoin | ||
> A small collection of utility functions for working with Bitcoin (BSV) | ||
A small collection of utility functions for working with Bitcoin (BSV) transactions. | ||
[![Release](https://img.shields.io/github/release-pre/BitcoinSchema/go-bitcoin.svg?logo=github&style=flat&v=2)](https://github.com/BitcoinSchema/go-bitcoin/releases) | ||
[![Build Status](https://travis-ci.com/BitcoinSchema/go-bitcoin.svg?branch=master&v=2)](https://travis-ci.com/BitcoinSchema/go-bitcoin) | ||
[![Report](https://goreportcard.com/badge/github.com/BitcoinSchema/go-bitcoin?style=flat&v=2)](https://goreportcard.com/report/github.com/BitcoinSchema/go-bitcoin) | ||
[![codecov](https://codecov.io/gh/BitcoinSchema/go-bitcoin/branch/master/graph/badge.svg?v=2)](https://codecov.io/gh/BitcoinSchema/go-bitcoin) | ||
[![Go](https://img.shields.io/github/go-mod/go-version/BitcoinSchema/go-bitcoin?v=2)](https://golang.org/) | ||
|
||
## Features | ||
<br/> | ||
|
||
- Sign / Verify Bitcoin Message | ||
- Private key (string) to Address (string) | ||
- Private key (string) to Private key (bsvec.PrivateKey) | ||
## Table of Contents | ||
- [Installation](#installation) | ||
- [Documentation](#documentation) | ||
- [Examples & Tests](#examples--tests) | ||
- [Benchmarks](#benchmarks) | ||
- [Code Standards](#code-standards) | ||
- [Usage](#usage) | ||
- [Maintainers](#maintainers) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
|
||
## Dependencies | ||
<br/> | ||
|
||
- github.com/bitcoinsv/bsvd/ | ||
- github.com/bitcoinsv/bsvutil/ | ||
- github.com/itchyny/base58-go | ||
- github.com/piotrnar/gocoin/lib/secp256k1 | ||
## Installation | ||
|
||
## Notes | ||
**go-bitcoin** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy). | ||
```shell script | ||
go get -u github.com/bitcoinschema/go-bitcoin | ||
``` | ||
|
||
Adding more to this library as needed. PRs and suggestions welcome. | ||
<br/> | ||
|
||
## Documentation | ||
View the generated [documentation](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin) | ||
|
||
[![GoDoc](https://godoc.org/github.com/bitcoinschema/go-bitcoin?status.svg&style=flat)](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin) | ||
|
||
### Features | ||
- [Sign](sign.go) / [Verify](verify.go) Bitcoin Message | ||
- [Private key (string) to Address (string)](address.go) | ||
- [Address from Private key (bsvec.PrivateKey)](address.go) | ||
- [Create Private Key](private_key.go) | ||
|
||
|
||
<details> | ||
<summary><strong><code>Package Dependencies</code></strong></summary> | ||
<br/> | ||
|
||
- [bitcoinsv/bsvd](https://github.com/bitcoinsv/bsvd) | ||
- [bitcoinsv/bsvutil](https://github.com/bitcoinsv/bsvutil) | ||
- [itchyny/base58-go](https://github.com/itchyny/base58-go) | ||
- [piotrnar/gocoin](https://github.com/piotrnar/gocoin) | ||
</details> | ||
|
||
<details> | ||
<summary><strong><code>Library Deployment</code></strong></summary> | ||
<br/> | ||
|
||
[goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to Github and can be installed via: `brew install goreleaser`. | ||
|
||
The [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser). | ||
|
||
Use `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production. | ||
</details> | ||
|
||
<details> | ||
<summary><strong><code>Makefile Commands</code></strong></summary> | ||
<br/> | ||
|
||
View all `makefile` commands | ||
```shell script | ||
make help | ||
``` | ||
|
||
List of all current commands: | ||
```text | ||
all Runs multiple commands | ||
clean Remove previous builds and any test cache data | ||
clean-mods Remove all the Go mod cache | ||
coverage Shows the test coverage | ||
godocs Sync the latest tag with GoDocs | ||
help Show this help message | ||
install Install the application | ||
install-go Install the application (Using Native Go) | ||
lint Run the Go lint application | ||
release Full production release (creates release in Github) | ||
release Runs common.release then runs godocs | ||
release-snap Test the full release (build binaries) | ||
release-test Full production test release (everything except deploy) | ||
replace-version Replaces the version in HTML/JS (pre-deploy) | ||
tag Generate a new tag and push (tag version=0.0.0) | ||
tag-remove Remove a tag if found (tag-remove version=0.0.0) | ||
tag-update Update an existing tag to current commit (tag-update version=0.0.0) | ||
test Runs vet, lint and ALL tests | ||
test-short Runs vet, lint and tests (excludes integration tests) | ||
test-travis Runs all tests via Travis (also exports coverage) | ||
test-travis-short Runs unit tests via Travis (also exports coverage) | ||
uninstall Uninstall the application (and remove files) | ||
vet Run the Go vet application | ||
``` | ||
</details> | ||
|
||
<br/> | ||
|
||
## Examples & Tests | ||
All unit tests and [examples](examples) run via [Travis CI](https://travis-ci.com/bitcoinschema/go-bitcoin) and uses [Go version 1.15.x](https://golang.org/doc/go1.15). View the [deployment configuration file](.travis.yml). | ||
|
||
Run all tests (including integration tests) | ||
```shell script | ||
make test | ||
``` | ||
|
||
Run tests (excluding integration tests) | ||
```shell script | ||
make test-short | ||
``` | ||
|
||
<br/> | ||
|
||
## Benchmarks | ||
Run the Go benchmarks: | ||
```shell script | ||
make bench | ||
``` | ||
|
||
<br/> | ||
|
||
## Code Standards | ||
Read more about this Go project's [code standards](CODE_STANDARDS.md). | ||
|
||
<br/> | ||
|
||
## Usage | ||
Checkout all the [examples](examples)! | ||
|
||
<br/> | ||
|
||
## Maintainers | ||
| [<img src="https://github.com/rohenaz.png" height="50" alt="MrZ" />](https://github.com/rohenaz) | [<img src="https://github.com/mrz1836.png" height="50" alt="MrZ" />](https://github.com/mrz1836) | | ||
|:---:|:---:| | ||
| [Satchmo](https://github.com/rohenaz) | [MrZ](https://github.com/mrz1836) | | ||
|
||
<br/> | ||
|
||
## Contributing | ||
|
||
View the [contributing guidelines](CONTRIBUTING.md) and follow the [code of conduct](CODE_OF_CONDUCT.md). | ||
|
||
### How can I help? | ||
All kinds of contributions are welcome :raised_hands:! | ||
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:. | ||
You can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/BitcoinSchema) :clap: | ||
or by making a [**bitcoin donation**](https://gobitcoinsv.com/?af=go-bitcoin) to ensure this journey continues indefinitely! :rocket: | ||
|
||
<br/> | ||
|
||
## License | ||
|
||
![License](https://img.shields.io/github/license/BitcoinSchema/go-bitcoin.svg?style=flat&v=2) |