qtum

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0xf1cfa6d3
	TestnetMagic wire.BitcoinNet = 0x0d221506
)

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 for the main Qtum network, the regression test Qtum network, the test Qtum network and the simulation test Qtum network, in this order

func NewQtumRPC

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

NewQtumRPC returns new QtumRPC instance.

Types

type QtumParser

type QtumParser struct {
	*btc.BitcoinParser
}

QtumParser handle

func NewQtumParser

func NewQtumParser(params *chaincfg.Params, c *btc.Configuration) *QtumParser

NewQtumParser returns new DashParser instance

func (*QtumParser) ParseBlock

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

func (*QtumParser) ParseTxFromJson

func (p *QtumParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)

ParseTxFromJson parses JSON message containing transaction and returns Tx struct

type QtumRPC

type QtumRPC struct {
	*btc.BitcoinRPC
	// contains filtered or unexported fields
}

QtumRPC is an interface to JSON-RPC bitcoind service.

func (*QtumRPC) EstimateSmartFee

func (b *QtumRPC) EstimateSmartFee(blocks int, conservative bool) (big.Int, error)

EstimateSmartFee returns fee estimation

func (*QtumRPC) GetTransactionForMempool

func (b *QtumRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)

GetTransactionForMempool returns a transaction by the transaction ID It could be optimized for mempool, i.e. without block time and confirmations

func (*QtumRPC) Initialize

func (b *QtumRPC) Initialize() error

Initialize initializes QtumRPC instance.

Jump to

Keyboard shortcuts

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