zec

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0x6427e924
	TestnetMagic wire.BitcoinNet = 0xbff91afa
	RegtestMagic wire.BitcoinNet = 0x5f3fe8aa
)

Variables

View Source
var (
	MainNetParams chaincfg.Params
	TestNetParams chaincfg.Params
	RegtestParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams contains network parameters for the main ZCash network, the regression test ZCash network, the test ZCash network and the simulation test ZCash network, in this order

func NewZCashRPC

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

Types

type ZCashParser

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

ZCashParser handle

func NewZCashParser

func NewZCashParser(params *chaincfg.Params, c *btc.Configuration) *ZCashParser

NewZCashParser returns new ZCashParser instance

func (*ZCashParser) PackTx added in v0.1.0

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

PackTx packs transaction to byte array using protobuf

func (*ZCashParser) UnpackTx added in v0.1.0

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

UnpackTx unpacks transaction from protobuf byte array

type ZCashRPC

type ZCashRPC struct {
	*btc.BitcoinRPC
}

func (*ZCashRPC) GetBlock

func (z *ZCashRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)

GetBlock returns block with given hash.

func (*ZCashRPC) GetMempoolEntry

func (z *ZCashRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error)

GetMempoolEntry returns mempool data for given transaction

func (*ZCashRPC) GetTransactionForMempool

func (z *ZCashRPC) 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 (*ZCashRPC) Initialize

func (z *ZCashRPC) Initialize() error

Initialize initializes ZCashRPC instance.

Jump to

Keyboard shortcuts

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