Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewMonetaryUnitRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type MonetaryUnitParser
- func (p *MonetaryUnitParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
- func (p *MonetaryUnitParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *MonetaryUnitParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *MonetaryUnitParser) ParseTx(b []byte) (*bchain.Tx, error)
- func (p *MonetaryUnitParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
- func (p *MonetaryUnitParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type MonetaryUnitRPC
Constants ¶
View Source
const ( // Net Magics MainnetMagic wire.BitcoinNet = 0x91c4fdea TestnetMagic wire.BitcoinNet = 0x477665bd )
Variables ¶
View Source
var ( MainNetParams chaincfg.Params TestNetParams chaincfg.Params )
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main MonetaryUnit network
func NewMonetaryUnitRPC ¶
func NewMonetaryUnitRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewMonetaryUnitRPC returns new MonetaryUnitRPC instance.
Types ¶
type MonetaryUnitParser ¶
type MonetaryUnitParser struct { *btc.BitcoinParser BitcoinOutputScriptToAddressesFunc btc.OutputScriptToAddressesFunc // contains filtered or unexported fields }
MonetaryUnitParser handle
func NewMonetaryUnitParser ¶
func NewMonetaryUnitParser(params *chaincfg.Params, c *btc.Configuration) *MonetaryUnitParser
NewMonetaryUnitParser returns new MonetaryUnitParser instance
func (*MonetaryUnitParser) GetAddrDescForUnknownInput ¶
func (p *MonetaryUnitParser) GetAddrDescForUnknownInput(tx *bchain.Tx, input int) bchain.AddressDescriptor
func (*MonetaryUnitParser) ParseBlock ¶
func (p *MonetaryUnitParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*MonetaryUnitParser) ParseTx ¶
func (p *MonetaryUnitParser) ParseTx(b []byte) (*bchain.Tx, error)
ParseTx parses byte array containing transaction and returns Tx struct
func (*MonetaryUnitParser) ParseTxFromJson ¶
func (p *MonetaryUnitParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
type MonetaryUnitRPC ¶
type MonetaryUnitRPC struct {
*btc.BitcoinRPC
}
MonetaryUnitRPC is an interface to JSON-RPC bitcoind service.
func (*MonetaryUnitRPC) Initialize ¶
func (b *MonetaryUnitRPC) Initialize() error
Initialize initializes MonetaryUnitRPC instance.
Click to show internal directories.
Click to hide internal directories.