idx

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 = 0x4df7d3e5
)

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

func NewIdxRPC

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

Types

type IdxParser

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

func NewIdxParser

func NewIdxParser(params *chaincfg.Params, c *btc.Configuration) *IdxParser

func (*IdxParser) PackTx

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

func (*IdxParser) UnpackTx

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

type IdxRPC

type IdxRPC struct {
	*btc.BitcoinRPC
}

func (*IdxRPC) GetBlock

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

func (*IdxRPC) GetTransactionForMempool

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

func (*IdxRPC) Initialize

func (b *IdxRPC) Initialize() error

Jump to

Keyboard shortcuts

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