Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewColossusRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type ColossusParser
- func (p *ColossusParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
- func (p *ColossusParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *ColossusParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *ColossusParser) ParseTx(b []byte) (*bchain.Tx, error)
- func (p *ColossusParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
- func (p *ColossusParser) TxFromMsgTx(t *wire.MsgTx, parseAddresses bool) bchain.Tx
- func (p *ColossusParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type ColossusRPC
Constants ¶
View Source
const ( MainnetMagic wire.BitcoinNet = 0xeafec591 OP_ZEROCOINMINT = 0xc1 OP_ZEROCOINSPEND = 0xc2 )
magic numbers
Variables ¶
View Source
var (
MainNetParams chaincfg.Params
)
chain parameters
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Colx network
func NewColossusRPC ¶
func NewColossusRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewColossusRPC returns new ColossusRPC instance.
Types ¶
type ColossusParser ¶
type ColossusParser struct { *btc.BitcoinParser BitcoinOutputScriptToAddressesFunc btc.OutputScriptToAddressesFunc // contains filtered or unexported fields }
ColossusParser handle
func NewColossusParser ¶
func NewColossusParser(params *chaincfg.Params, c *btc.Configuration) *ColossusParser
NewColossusParser returns new ColossusParser instance
func (*ColossusParser) GetAddrDescForUnknownInput ¶
func (p *ColossusParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
func (*ColossusParser) ParseBlock ¶
func (p *ColossusParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*ColossusParser) ParseTx ¶
func (p *ColossusParser) ParseTx(b []byte) (*bchain.Tx, error)
ParseTx parses byte array containing transaction and returns Tx struct
func (*ColossusParser) ParseTxFromJson ¶
func (p *ColossusParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
func (*ColossusParser) TxFromMsgTx ¶
TxFromMsgTx parses tx and adds handling for OP_ZEROCOINSPEND inputs
type ColossusRPC ¶
type ColossusRPC struct {
*btc.BitcoinRPC
}
ColossusRPC is an interface to JSON-RPC bitcoind service.
func (*ColossusRPC) Initialize ¶
func (b *ColossusRPC) Initialize() error
Initialize initializes ColxRPC instance.
Click to show internal directories.
Click to hide internal directories.