Giter VIP home page Giter VIP logo

go-boost's Introduction

go-boost

A transaction parser for boost (Bitcoin protocol)

Release Build Status Go
Mergify Status Sponsor Donate

Installation

go-boost requires a supported release of Go.

go get -u github.com/bitcoinschema/go-boost

Documentation

View the generated documentation

GoDoc


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 ๐Ÿ™Œ! The most basic way to show your support is to star ๐ŸŒŸ the project, or to raise issues ๐Ÿ’ฌ. You can also support this project by becoming a sponsor on GitHub ๐Ÿ‘ or by making a bitcoin donation to ensure this journey continues indefinitely! ๐Ÿš€

Stars


License

License

go-boost's People

Contributors

dependabot[bot] avatar mergify[bot] avatar mrz1836 avatar rohenaz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.