polis

package
v0.0.0-...-fa8983d Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0xbd6b0cbf
)

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

func NewPolisRPC

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

Types

type PolisParser

type PolisParser struct {
	*btc.BitcoinParser
	// contains filtered or unexported fields
}

func NewPolisParser

func NewPolisParser(params *chaincfg.Params, c *btc.Configuration) *PolisParser

func (*PolisParser) PackTx

func (p *PolisParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)

func (*PolisParser) UnpackTx

func (p *PolisParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)

type PolisRPC

type PolisRPC struct {
	*btc.BitcoinRPC
}

func (*PolisRPC) GetBlock

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

func (*PolisRPC) GetTransactionForMempool

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

func (*PolisRPC) Initialize

func (b *PolisRPC) Initialize() error

Jump to

Keyboard shortcuts

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