Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewZcoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type MTPBlockHeader
- type MTPHashData
- type ZcoinParser
- func (p *ZcoinParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error)
- func (p *ZcoinParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *ZcoinParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *ZcoinParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
- func (p *ZcoinParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type ZcoinRPC
- func (zc *ZcoinRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
- func (zc *ZcoinRPC) GetBlockInfo(hash string) (*bchain.BlockInfo, error)
- func (zc *ZcoinRPC) GetBlockRaw(hash string) ([]byte, error)
- func (zc *ZcoinRPC) GetBlockWithoutHeader(hash string, height uint32) (*bchain.Block, error)
- func (zc *ZcoinRPC) GetTransaction(txid string) (*bchain.Tx, error)
- func (zc *ZcoinRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)
- func (zc *ZcoinRPC) GetTransactionSpecific(tx *bchain.Tx) (json.RawMessage, error)
- func (zc *ZcoinRPC) Initialize() error
Constants ¶
View Source
const ( OpZeroCoinMint = 0xc1 OpZeroCoinSpend = 0xc2 OpSigmaMint = 0xc3 OpSigmaSpend = 0xc4 MainnetMagic wire.BitcoinNet = 0xe3d9fef1 TestnetMagic wire.BitcoinNet = 0xcffcbeea RegtestMagic wire.BitcoinNet = 0xfabfb5da GenesisBlockTime = 1414776286 SwitchToMTPBlockHeader = 1544443200 MTPL = 64 SpendTxID = "0000000000000000000000000000000000000000000000000000000000000000" )
Variables ¶
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Zcoin network, the regression test Zcoin network, the test Zcoin network and the simulation test Zcoin network, in this order
func NewZcoinRPC ¶
func NewZcoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
Types ¶
type MTPBlockHeader ¶
type MTPHashData ¶
type ZcoinParser ¶
type ZcoinParser struct {
*btc.BitcoinParser
}
ZcoinParser handle
func NewZcoinParser ¶
func NewZcoinParser(params *chaincfg.Params, c *btc.Configuration) *ZcoinParser
NewZcoinParser returns new ZcoinParser instance
func (*ZcoinParser) GetAddressesFromAddrDesc ¶
func (p *ZcoinParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error)
GetAddressesFromAddrDesc returns addresses for given address descriptor with flag if the addresses are searchable
func (*ZcoinParser) ParseBlock ¶
func (p *ZcoinParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*ZcoinParser) ParseTxFromJson ¶
func (p *ZcoinParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
type ZcoinRPC ¶
type ZcoinRPC struct {
*btc.BitcoinRPC
}
func (*ZcoinRPC) GetBlockInfo ¶
func (*ZcoinRPC) GetBlockWithoutHeader ¶
func (*ZcoinRPC) GetTransaction ¶
func (*ZcoinRPC) GetTransactionForMempool ¶
func (*ZcoinRPC) GetTransactionSpecific ¶
func (*ZcoinRPC) Initialize ¶
Click to show internal directories.
Click to hide internal directories.