Documentation ¶
Index ¶
Constants ¶
const ( MainnetMagic wire.BitcoinNet = 0xdbb6c0fb TestnetMagic wire.BitcoinNet = 0xf1c8d2fd RegtestMagic wire.BitcoinNet = 0xdab5bffa )
magic numbers
Variables ¶
var ( MainNetParams chaincfg.Params TestNetParams chaincfg.Params )
chain parameters
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Litecoin network, and the test Litecoin network
func NewLitecoinRPC ¶
func NewLitecoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewLitecoinRPC returns new LitecoinRPC instance.
Types ¶
type LitecoinParser ¶
type LitecoinParser struct { *btc.BitcoinLikeParser // contains filtered or unexported fields }
LitecoinParser handle
func NewLitecoinParser ¶
func NewLitecoinParser(params *chaincfg.Params, c *btc.Configuration) *LitecoinParser
NewLitecoinParser returns new LitecoinParser instance
func (*LitecoinParser) ParseTxFromJson ¶
func (p *LitecoinParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
type LitecoinRPC ¶
type LitecoinRPC struct {
*btc.BitcoinRPC
}
LitecoinRPC is an interface to JSON-RPC bitcoind service.
func (*LitecoinRPC) GetBlock ¶
GetBlock returns block with given hash. Litecoin cannot use optimized BitcoinRPC.GetBlock since v 0.21.2, which introduced MWEB fields to the transaction data and made the serialized block incompatible with Bitcoin wire protocol
func (*LitecoinRPC) GetTransactionForMempool ¶
func (b *LitecoinRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)
GetTransactionForMempool returns a transaction by the transaction ID Litecoin cannot use optimized BitcoinRPC.GetTransactionForMempool since v 0.21.2, which introduced MWEB fields to the transaction data and made the serialized transaction incompatible with Bitcoin wire protocol
func (*LitecoinRPC) Initialize ¶
func (b *LitecoinRPC) Initialize() error
Initialize initializes LitecoinRPC instance.