Versions in this module Expand all Collapse all v0 v0.2.2 Apr 15, 2019 Changes in this version + const MainnetMagic + const RegtestMagic + const TestnetMagic + var MainNetParams chaincfg.Params + var RegtestParams chaincfg.Params + var TestNetParams chaincfg.Params + func GetChainParams(chain string) *chaincfg.Params + func NewNulsRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error) + type CmdGetBestBlockHash struct + Data struct{ ... } + Success bool + type CmdGetBestBlockHeight struct + Data struct{ ... } + Success bool + type CmdGetBlock struct + Data struct{ ... } + Success bool + type CmdGetBlockHeader struct + Data struct{ ... } + Success bool + type CmdGetNetworkInfo struct + Data struct{ ... } + Success bool + type CmdGetTx struct + Success bool + Tx Tx + type CmdGetTxBytes struct + Data struct{ ... } + Success bool + type CmdGetVersionInfo struct + Data struct{ ... } + Success bool + type CmdTxBroadcast struct + Data struct{ ... } + Success bool + type NulsParser struct + func NewNulsParser(params *chaincfg.Params, c *btc.Configuration) *NulsParser + func (p *NulsParser) GetAddrDescFromAddress(address string) (bchain.AddressDescriptor, error) + func (p *NulsParser) GetAddrDescFromVout(output *bchain.Vout) (bchain.AddressDescriptor, error) + func (p *NulsParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error) + func (p *NulsParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error) + func (p *NulsParser) PackedTxidLen() int + func (p *NulsParser) ParseTx(b []byte) (*bchain.Tx, error) + func (p *NulsParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error) + type NulsRPC struct + func (b *NulsRPC) Call(uri string, res interface{}) error + func (b *NulsRPC) Post(uri string, req interface{}, res interface{}) error + func (n *NulsRPC) EstimateFee(blocks int) (big.Int, error) + func (n *NulsRPC) EstimateSmartFee(blocks int, conservative bool) (big.Int, error) + func (n *NulsRPC) GetBestBlockHash() (string, error) + func (n *NulsRPC) GetBestBlockHeight() (uint32, error) + func (n *NulsRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) + func (n *NulsRPC) GetBlockHash(height uint32) (string, error) + func (n *NulsRPC) GetBlockHeader(hash string) (*bchain.BlockHeader, error) + func (n *NulsRPC) GetBlockHeaderByHeight(height uint32) (*bchain.BlockHeader, error) + func (n *NulsRPC) GetBlockInfo(hash string) (*bchain.BlockInfo, error) + func (n *NulsRPC) GetChainInfo() (*bchain.ChainInfo, error) + func (n *NulsRPC) GetMempool() ([]string, error) + func (n *NulsRPC) GetMempoolTransactionsForAddrDesc(addrDesc bchain.AddressDescriptor) ([]bchain.Outpoint, error) + func (n *NulsRPC) GetTransaction(txid string) (*bchain.Tx, error) + func (n *NulsRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error) + func (n *NulsRPC) GetTransactionSpecific(tx *bchain.Tx) (json.RawMessage, error) + func (n *NulsRPC) Initialize() error + func (n *NulsRPC) ResyncMempool(onNewTxAddr bchain.OnNewTxAddrFunc) (int, error) + func (n *NulsRPC) SendRawTransaction(tx string) (string, error) + type Tx struct + BlockHeight int64 + ConfirmCount int + Fee float64 + Hash string + Inputs []struct{ ... } + Outputs []struct{ ... } + Remark string + ScriptSig string + Size int + Status int + Time int64 + Type int + Value float64