myriad

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams contains network parameters for the main Myriad network

func NewMyriadRPC

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

NewMyriadRPC returns new MyriadRPC instance.

Types

type MyriadParser

type MyriadParser struct {
	*btc.BitcoinParser
}

MyriadParser handle

func NewMyriadParser

func NewMyriadParser(params *chaincfg.Params, c *btc.Configuration) *MyriadParser

NewMyriadParser returns new MyriadParser instance

func (*MyriadParser) ParseBlock

func (p *MyriadParser) 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 parser

type MyriadRPC

type MyriadRPC struct {
	*btc.BitcoinRPC
}

MyriadRPC is an interface to JSON-RPC bitcoind service.

func (*MyriadRPC) GetBlock

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

GetBlock returns block with given hash.

func (*MyriadRPC) Initialize

func (b *MyriadRPC) Initialize() error

Initialize initializes MyriadRPC instance.

Jump to

Keyboard shortcuts

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