Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewConcreteCoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- func Uint16(r io.Reader, byteOrder binary.ByteOrder) (uint16, error)
- func Uint32(r io.Reader, byteOrder binary.ByteOrder) (uint32, error)
- func Uint64(r io.Reader, byteOrder binary.ByteOrder) (uint64, error)
- func Uint8(r io.Reader) (uint8, error)
- type ConcreteCoinParser
- func (p *ConcreteCoinParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
- func (p *ConcreteCoinParser) GetValueSatForUnknownInput(tx *bchain.Tx, input int) *big.Int
- func (p *ConcreteCoinParser) GetValueSatFromZerocoinSpend(signatureScript []byte) (*big.Int, error)
- func (p *ConcreteCoinParser) IsAddrDescIndexable(addrDesc bchain.AddressDescriptor) bool
- func (p *ConcreteCoinParser) P2CSScriptToAddress(script []byte) ([]string, bool, error)
- func (p *ConcreteCoinParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *ConcreteCoinParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *ConcreteCoinParser) ParseTx(b []byte) (*bchain.Tx, error)
- func (p *ConcreteCoinParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
- func (p *ConcreteCoinParser) TxFromMsgTx(t *wire.MsgTx, parseAddresses bool) bchain.Tx
- func (p *ConcreteCoinParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type ConcreteCoinRPC
Constants ¶
View Source
const ( MainnetMagic wire.BitcoinNet = 0xf0fcc58f OP_ZEROCOINMINT = 0xc1 OP_ZEROCOINSPEND = 0xc2 OP_CHECKCOLDSTAKEVERIFY = 0xd1 ZCMINT_LABEL = "Zerocoin Mint" ZCSPEND_LABEL = "Zerocoin Spend" CBASE_LABEL = "CoinBase TX" CSTAKE_LABEL = "CoinStake TX" CBASE_ADDR_INT = 0xf7 CSTAKE_ADDR_INT = 0xf8 STAKING_ADDR_MAIN = 63 )
Variables ¶
View Source
var (
MainNetParams chaincfg.Params
)
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main PivX network
func NewConcreteCoinRPC ¶
func NewConcreteCoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
func Uint16 ¶
Uint16 reads two bytes from the provided reader, converts it to a number using the provided byte order, and returns the resulting uint16.
func Uint32 ¶
Uint32 reads four bytes from the provided reader, converts it to a number using the provided byte order, and returns the resulting uint32.
Types ¶
type ConcreteCoinParser ¶
type ConcreteCoinParser struct { *btc.BitcoinParser BitcoinOutputScriptToAddressesFunc btc.OutputScriptToAddressesFunc // contains filtered or unexported fields }
func NewConcreteCoinParser ¶
func NewConcreteCoinParser(params *chaincfg.Params, c *btc.Configuration) *ConcreteCoinParser
func (*ConcreteCoinParser) GetAddrDescForUnknownInput ¶
func (p *ConcreteCoinParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
func (*ConcreteCoinParser) GetValueSatForUnknownInput ¶
func (*ConcreteCoinParser) GetValueSatFromZerocoinSpend ¶
func (p *ConcreteCoinParser) GetValueSatFromZerocoinSpend(signatureScript []byte) (*big.Int, error)
func (*ConcreteCoinParser) IsAddrDescIndexable ¶
func (p *ConcreteCoinParser) IsAddrDescIndexable(addrDesc bchain.AddressDescriptor) bool
IsAddrDescIndexable returns true if AddressDescriptor should be added to index empty or OP_RETURN scripts are not indexed. also are not indexed: zerocoin mints/spends coinbase txes and coinstake markers
func (*ConcreteCoinParser) P2CSScriptToAddress ¶
func (p *ConcreteCoinParser) P2CSScriptToAddress(script []byte) ([]string, bool, error)
func (*ConcreteCoinParser) ParseBlock ¶
func (p *ConcreteCoinParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*ConcreteCoinParser) ParseTx ¶
func (p *ConcreteCoinParser) ParseTx(b []byte) (*bchain.Tx, error)
func (*ConcreteCoinParser) ParseTxFromJson ¶
func (p *ConcreteCoinParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
func (*ConcreteCoinParser) TxFromMsgTx ¶
type ConcreteCoinRPC ¶
type ConcreteCoinRPC struct {
*btc.BitcoinRPC
}
func (*ConcreteCoinRPC) Initialize ¶
func (b *ConcreteCoinRPC) Initialize() error
Click to show internal directories.
Click to hide internal directories.