Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewZCashRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type ResGetBlockChainInfo
- type ZCashParser
- type ZCashRPC
- func (z *ZCashRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
- func (z *ZCashRPC) GetChainInfo() (*bchain.ChainInfo, error)
- func (z *ZCashRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error)
- func (z *ZCashRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)
- func (z *ZCashRPC) Initialize() error
Constants ¶
View Source
const ( // MainnetMagic is mainnet network constant MainnetMagic wire.BitcoinNet = 0x6427e924 // TestnetMagic is testnet network constant TestnetMagic wire.BitcoinNet = 0xbff91afa // RegtestMagic is regtest network constant RegtestMagic wire.BitcoinNet = 0x5f3fe8aa )
Variables ¶
Functions ¶
func GetChainParams ¶
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)
NewZCashRPC returns new ZCashRPC instance
Types ¶
type ResGetBlockChainInfo ¶ added in v0.3.5
type ResGetBlockChainInfo struct { Error *bchain.RPCError `json:"error"` Result struct { Chain string `json:"chain"` Blocks int `json:"blocks"` Headers int `json:"headers"` Bestblockhash string `json:"bestblockhash"` Difficulty common.JSONNumber `json:"difficulty"` Pruned bool `json:"pruned"` SizeOnDisk int64 `json:"size_on_disk"` Consensus struct { Chaintip string `json:"chaintip"` Nextblock string `json:"nextblock"` } `json:"consensus"` } `json:"result"` }
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
type ZCashRPC ¶
type ZCashRPC struct {
*btc.BitcoinRPC
}
ZCashRPC is an interface to JSON-RPC bitcoind service
func (*ZCashRPC) GetChainInfo ¶ added in v0.3.5
func (*ZCashRPC) GetMempoolEntry ¶
func (z *ZCashRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error)
GetMempoolEntry returns mempool data for given transaction
func (*ZCashRPC) GetTransactionForMempool ¶
GetTransactionForMempool returns a transaction by the transaction ID. It could be optimized for mempool, i.e. without block time and confirmations
func (*ZCashRPC) Initialize ¶
Initialize initializes ZCashRPC instance
Click to show internal directories.
Click to hide internal directories.