unobtanium

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0x03d5b503
)

magic numbers

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

chain parameters

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams returns network parameters

func NewUnobtaniumRPC

func NewUnobtaniumRPC(config json.RawMessage, pushHandler func(notificationType bchain.NotificationType)) (bchain.BlockChain, error)

NewUnobtaniumRPC returns new UnobtaniumRPC instance

Types

type UnobtaniumParser

type UnobtaniumParser struct {
	*btc.BitcoinParser
}

UnobtaniumParser handle

func NewUnobtaniumParser

func NewUnobtaniumParser(params *chaincfg.Params, c *btc.Configuration) *UnobtaniumParser

NewUnobtaniumParser returns new UnobtaniumParser instance

func (*UnobtaniumParser) ParseBlock

func (p *UnobtaniumParser) ParseBlock(b []byte) (*bchain.Block, error)

ParseBlock parses raw block to our Block struct it has special handling for Auxpow blocks that cannot be parsed by standard btc wire parse

type UnobtaniumRPC

type UnobtaniumRPC struct {
	*btc.BitcoinRPC
}

UnobtaniumRPC is an interface to JSON-RPC bitcoind service

func (*UnobtaniumRPC) GetBlock

func (b *UnobtaniumRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)

GetBlock returns block with given hash

func (*UnobtaniumRPC) Initialize

func (b *UnobtaniumRPC) Initialize() error

Initialize initializes UnobtaniumRPC instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL