Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewDiviRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type DivicoinParser
- func (p *DivicoinParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
- func (p *DivicoinParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *DivicoinParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *DivicoinParser) ParseTx(b []byte) (*bchain.Tx, error)
- func (p *DivicoinParser) ParseTxFromJSON(msg json.RawMessage) (*bchain.Tx, error)
- func (p *DivicoinParser) TxFromMsgTx(t *wire.MsgTx, parseAddresses bool) bchain.Tx
- func (p *DivicoinParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type DivicoinRPC
Constants ¶
View Source
const ( // MainnetMagic = "network messages so the messages can be identified to belong to a specific coin" // Source https://github.com/DiviProject/Divi/blob/master0/divi/src/chainparams.cpp#L128-L136 MainnetMagic wire.BitcoinNet = 0x8f8da0df )
Variables ¶
View Source
var ( // MainNetParams = ??? MainNetParams chaincfg.Params )
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Divi network
func NewDiviRPC ¶
func NewDiviRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewDiviRPC returns new DivicoinRPC instance.
Types ¶
type DivicoinParser ¶
type DivicoinParser struct { *btc.BitcoinParser BitcoinOutputScriptToAddressesFunc btc.OutputScriptToAddressesFunc // contains filtered or unexported fields }
DivicoinParser handle
func NewDiviParser ¶
func NewDiviParser(params *chaincfg.Params, c *btc.Configuration) *DivicoinParser
NewDiviParser returns new DivicoinParser instance
func (*DivicoinParser) GetAddrDescForUnknownInput ¶
func (p *DivicoinParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
GetAddrDescForUnknownInput = ???
func (*DivicoinParser) ParseBlock ¶
func (p *DivicoinParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*DivicoinParser) ParseTx ¶
func (p *DivicoinParser) ParseTx(b []byte) (*bchain.Tx, error)
ParseTx parses byte array containing transaction and returns Tx struct
func (*DivicoinParser) ParseTxFromJSON ¶
func (p *DivicoinParser) ParseTxFromJSON(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJSON parses JSON message containing transaction and returns Tx struct
func (*DivicoinParser) TxFromMsgTx ¶
TxFromMsgTx parses tx and adds handling for OP_ZEROCOINSPEND inputs
type DivicoinRPC ¶
type DivicoinRPC struct {
*btc.BitcoinRPC
}
DivicoinRPC is an interface to JSON-RPC bitcoind service.
func (*DivicoinRPC) Initialize ¶
func (b *DivicoinRPC) Initialize() error
Initialize initializes DivicoinRPC instance.
Click to show internal directories.
Click to hide internal directories.