namecoin

package
v0.0.0-...-c91c12c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MainnetMagic is mainnet network constant
	MainnetMagic wire.BitcoinNet = 0xfeb4bef9
)

Variables

View Source
var (
	// MainNetParams are parser parameters for mainnet
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams contains network parameters for the main Namecoin network, and the test Namecoin network

func NewNamecoinRPC

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

NewNamecoinRPC returns new NamecoinRPC instance.

Types

type NamecoinParser

type NamecoinParser struct {
	*btc.BitcoinParser
}

NamecoinParser handle

func NewNamecoinParser

func NewNamecoinParser(params *chaincfg.Params, c *btc.Configuration) *NamecoinParser

NewNamecoinParser returns new NamecoinParser instance

func (*NamecoinParser) ParseBlock

func (p *NamecoinParser) 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 NamecoinRPC

type NamecoinRPC struct {
	*btc.BitcoinRPC
}

NamecoinRPC is an interface to JSON-RPC namecoin service.

func (*NamecoinRPC) GetBlock

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

GetBlock returns block with given hash.

func (*NamecoinRPC) Initialize

func (b *NamecoinRPC) Initialize() error

Initialize initializes NamecoinRPC instance.

Jump to

Keyboard shortcuts

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