# README
go-boost
A transaction parser for boost (Bitcoin protocol)
Installation
go-boost requires a supported release of Go.
go get -u github.com/bitcoinschema/go-boost
Documentation
View the generated documentation
Boost Object
It takes a BOB formatted transaction and produces an easy-to-use BOOST struct with all protocol fields populated.
type Boost struct {
Redeem Redeem `json:"redeem" bson:"redeem"`
Spend Spend `json:"spend" bson:"spend"`
}
Coverage
- V1 Bounty Spend
- V1 Bounty Redeem
- V2 Contract Spend
- V2 Contract Redeem
Usage
Get the package
go get github.com/bitcoinschema/go-boost
Import the package
import (
github.com/bitcoinschema/go-boost
)
Use to transform BOB formatted transactions.
var b *boost.Boost
b, err = boostNewFromTape(&bobData.In[0].Tape[0])
V1 Contract Spend Example
// Get BOB data from string
bobData, err := bob.NewFromRawTxString(boostTx)
if err != nil {
t.Fatalf("error occurred: %s", err.Error())
}
var b *Boost
b, err = boost.NewFromTape(&bobData.Out[0].Tape[0])thing": "else"
}
boost.BoostSpend Result:
{
"Content": "7332808b5283f8acedcc6240a42f669cc3d305413201527852061fd5b283d0d8",
"MinerAddress": "16nhPWCkbkR1bNACwPYULBWyvxQ5MCDZBo",
"Category": 1111,
"Difficulty": 0.01,
"Topic": "theory",
"AdditionalData": "this is the Boost whitepaper",
"Nonce": 137,
"Version": 1
}
More examples can be found in tests.
Contributing
View the contributing guidelines and follow the code of conduct.
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 :clap: or by making a bitcoin donation to ensure this journey continues indefinitely! :rocket: