Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewFiroRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type FiroMsgTx
- type FiroParser
- func (p *FiroParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error)
- func (p *FiroParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)
- func (p *FiroParser) ParseBlock(b []byte) (*bchain.Block, error)
- func (p *FiroParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
- func (p *FiroParser) TxFromFiroMsgTx(t *FiroMsgTx, parseAddresses bool) bchain.Tx
- func (p *FiroParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)
- type FiroRPC
- func (zc *FiroRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
- func (zc *FiroRPC) GetBlockInfo(hash string) (*bchain.BlockInfo, error)
- func (zc *FiroRPC) GetBlockRaw(hash string) ([]byte, error)
- func (zc *FiroRPC) GetBlockWithoutHeader(hash string, height uint32) (*bchain.Block, error)
- func (zc *FiroRPC) GetTransaction(txid string) (*bchain.Tx, error)
- func (zc *FiroRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)
- func (zc *FiroRPC) GetTransactionSpecific(tx *bchain.Tx) (json.RawMessage, error)
- func (zc *FiroRPC) Initialize() error
- type MTPBlockHeader
- type MTPHashData
Constants ¶
View Source
const ( OpZeroCoinMint = 0xc1 OpZeroCoinSpend = 0xc2 OpSigmaMint = 0xc3 OpSigmaSpend = 0xc4 OpLelantusMint = 0xc5 OpLelantusJMint = 0xc6 OpLelantusJoinSplit = 0xc7 MainnetMagic wire.BitcoinNet = 0xe3d9fef1 TestnetMagic wire.BitcoinNet = 0xcffcbeea RegtestMagic wire.BitcoinNet = 0xfabfb5da GenesisBlockTime = 1414776286 SwitchToMTPBlockHeader = 1544443200 MTPL = 64 SpendTxID = "0000000000000000000000000000000000000000000000000000000000000000" TransactionQuorumCommitmentType = 6 )
Variables ¶
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main Firo network, the regression test Firo network, the test Firo network and the simulation test Firo network, in this order
func NewFiroRPC ¶
func NewFiroRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
Types ¶
type FiroMsgTx ¶
FiroMsgTx encapsulate firo tx and extra
func (*FiroMsgTx) FiroDecode ¶
FiroDecode to decode bitcoin tx and extra
type FiroParser ¶
type FiroParser struct {
*btc.BitcoinParser
}
FiroParser handle
func NewFiroParser ¶
func NewFiroParser(params *chaincfg.Params, c *btc.Configuration) *FiroParser
NewFiroParser returns new FiroParser instance
func (*FiroParser) GetAddressesFromAddrDesc ¶
func (p *FiroParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error)
GetAddressesFromAddrDesc returns addresses for given address descriptor with flag if the addresses are searchable
func (*FiroParser) ParseBlock ¶
func (p *FiroParser) ParseBlock(b []byte) (*bchain.Block, error)
ParseBlock parses raw block to our Block struct
func (*FiroParser) ParseTxFromJson ¶
func (p *FiroParser) ParseTxFromJson(msg json.RawMessage) (*bchain.Tx, error)
ParseTxFromJson parses JSON message containing transaction and returns Tx struct
func (*FiroParser) TxFromFiroMsgTx ¶
func (p *FiroParser) TxFromFiroMsgTx(t *FiroMsgTx, parseAddresses bool) bchain.Tx
TxFromFiroMsgTx converts bitcoin wire Tx to bchain.Tx
type FiroRPC ¶
type FiroRPC struct {
*btc.BitcoinRPC
}
func (*FiroRPC) GetBlockInfo ¶
func (*FiroRPC) GetBlockWithoutHeader ¶
func (*FiroRPC) GetTransactionForMempool ¶
func (*FiroRPC) GetTransactionSpecific ¶
func (*FiroRPC) Initialize ¶
type MTPBlockHeader ¶
type MTPHashData ¶
Click to show internal directories.
Click to hide internal directories.