viacoin

package
v0.0.0-...-fae8f5a Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0xcbc6680f
	RegtestMagic wire.BitcoinNet = 0x377b972d
)

magic numbers

Variables

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

chain parameters

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams returns network parameters

func NewViacoinRPC

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

NewViacoinRPC returns new ViacoinRPC instance

Types

type ViacoinParser

type ViacoinParser struct {
	*btc.BitcoinLikeParser
}

ViacoinParser handle

func NewViacoinParser

func NewViacoinParser(params *chaincfg.Params, c *btc.Configuration) *ViacoinParser

NewViacoinParser returns new VertcoinParser instance

func (*ViacoinParser) ParseBlock

func (p *ViacoinParser) 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 ViacoinRPC

type ViacoinRPC struct {
	*btc.BitcoinRPC
}

ViacoinRPC is an interface to JSON-RPC bitcoind service

func (*ViacoinRPC) GetBlock

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

GetBlock returns block with given hash

func (*ViacoinRPC) Initialize

func (b *ViacoinRPC) Initialize() error

Initialize initializes ViacoinRPC instance.

Jump to

Keyboard shortcuts

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