ritocoin

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 = 0x2a7bc0a1
	TestnetMagic wire.BitcoinNet = 0x514E5352
)

magic numbers

Variables

View Source
var (
	MainNetParams chaincfg.Params
	TestNetParams chaincfg.Params
)

chain parameters

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams contains network parameters

func NewRitocoinRPC

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

NewRitocoinRPC returns new RitocoinRPC instance.

Types

type RitocoinParser

type RitocoinParser struct {
	*btc.BitcoinParser
}

RitocoinParser handle

func NewRitocoinParser

func NewRitocoinParser(params *chaincfg.Params, c *btc.Configuration) *RitocoinParser

NewRitocoinParser returns new RitocoinParser instance

func (*RitocoinParser) ParseBlock

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

ParseBlock parses raw block to our Block struct

type RitocoinRPC

type RitocoinRPC struct {
	*btc.BitcoinRPC
}

RitocoinRPC is an interface to JSON-RPC bitcoind service.

func (*RitocoinRPC) Initialize

func (b *RitocoinRPC) Initialize() error

Initialize initializes RitocoinRPC instance.

Jump to

Keyboard shortcuts

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