Documentation ¶
Index ¶
- Constants
- func GetChainParams(chain string) *chaincfg.Params
- func NewBCashRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type AddressFormat
- type BCashParser
- type BCashRPC
- func (b *BCashRPC) EstimateSmartFee(blocks int, conservative bool) (float64, error)
- func (b *BCashRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
- func (b *BCashRPC) GetBlockFull(hash string) (*bchain.Block, error)
- func (b *BCashRPC) GetBlockRaw(hash string) ([]byte, error)
- func (b *BCashRPC) Initialize() error
Constants ¶
const ( MainNetPrefix = "bitcoincash:" TestNetPrefix = "bchtest:" RegTestPrefix = "bchreg:" )
Variables ¶
This section is empty.
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Bitcoin Cash network, the regression test Bitcoin Cash network, the test Bitcoin Cash network and the simulation test Bitcoin Cash network, in this order
func NewBCashRPC ¶
func NewBCashRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewBCashRPC returns new BCashRPC instance.
Types ¶
type BCashParser ¶
type BCashParser struct { *btc.BitcoinParser AddressFormat AddressFormat }
BCashParser handle
func NewBCashParser ¶
func NewBCashParser(params *chaincfg.Params, c *btc.Configuration) (*BCashParser, error)
NewBCashParser returns new BCashParser instance
func (*BCashParser) AddressToOutputScript ¶
func (p *BCashParser) AddressToOutputScript(address string) ([]byte, error)
AddressToOutputScript converts bitcoin address to ScriptPubKey
func (*BCashParser) GetAddrIDFromAddress ¶
func (p *BCashParser) GetAddrIDFromAddress(address string) ([]byte, error)
GetAddrIDFromAddress returns internal address representation of given address
type BCashRPC ¶
type BCashRPC struct {
*btc.BitcoinRPC
}
BCashRPC is an interface to JSON-RPC bitcoind service.
func (*BCashRPC) EstimateSmartFee ¶
EstimateSmartFee returns fee estimation.
func (*BCashRPC) GetBlockFull ¶
GetBlockFull returns block with given hash.
func (*BCashRPC) GetBlockRaw ¶
GetBlockRaw returns block with given hash as bytes.
func (*BCashRPC) Initialize ¶
Initialize initializes BCashRPC instance.