vipstarcoin

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

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0x012ce7b5
	TestnetMagic wire.BitcoinNet = 0x1a2b3c4d
)

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 VIPSTARCOIN network, and the test VIPSTARCOIN network

func NewVIPSTARCOINRPC

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

NewVIPSTARCOINRPC returns new VIPSTARCOINRPC instance.

Types

type VIPSTARCOINParser

type VIPSTARCOINParser struct {
	*btc.BitcoinParser
}

VIPSTARCOINParser handle

func NewVIPSTARCOINParser

func NewVIPSTARCOINParser(params *chaincfg.Params, c *btc.Configuration) *VIPSTARCOINParser

NewVIPSTARCOINParser returns new VIPSTARCOINParser instance

func (*VIPSTARCOINParser) ParseBlock

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

ParseBlock parses block from byte array

func (*VIPSTARCOINParser) ParseTxFromJson

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

ParseTxFromJson parses JSON message containing transaction and returns Tx struct

type VIPSTARCOINRPC

type VIPSTARCOINRPC struct {
	*btc.BitcoinRPC
}

VIPSTARCOINRPC is an interface to JSON-RPC bitcoind service.

func (*VIPSTARCOINRPC) GetTransactionForMempool

func (b *VIPSTARCOINRPC) 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 (*VIPSTARCOINRPC) Initialize

func (b *VIPSTARCOINRPC) Initialize() error

Initialize initializes VIPSTARCOINRPC instance.

Jump to

Keyboard shortcuts

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