Documentation ¶
Index ¶
- Constants
- Variables
- func GetChainParams(chain string) *chaincfg.Params
- func NewECashRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
- type AddressFormat
- type ECashParser
- type ECashRPC
- func (b *ECashRPC) EstimateFee(blocks int) (big.Int, error)
- func (b *ECashRPC) EstimateSmartFee(blocks int, conservative bool) (big.Int, error)
- func (b *ECashRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)
- func (b *ECashRPC) GetBlockBytes(hash string) ([]byte, error)
- func (b *ECashRPC) GetBlockFull(hash string) (*bchain.Block, error)
- func (b *ECashRPC) GetBlockInfo(hash string) (*bchain.BlockInfo, error)
- func (b *ECashRPC) GetBlockRaw(hash string) (string, error)
- func (b *ECashRPC) Initialize() error
Constants ¶
const ( // MainNetPrefix is CashAddr prefix for mainnet MainNetPrefix = "ecash:" // TestNetPrefix is CashAddr prefix for testnet TestNetPrefix = "ectest:" // RegTestPrefix is CashAddr prefix for regtest RegTestPrefix = "ecreg:" )
Variables ¶
Functions ¶
func GetChainParams ¶
GetChainParams contains network parameters for the main eCash network, the regression test eCash network, the test eCash network and the simulation test eCash network, in this order
func NewECashRPC ¶
func NewECashRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)
NewECashRPC returns new ECashRPC instance.
Types ¶
type AddressFormat ¶
type AddressFormat = uint8
AddressFormat type is used to specify different formats of address
const ( // Legacy AddressFormat is the same as Bitcoin Legacy AddressFormat = iota // CashAddr AddressFormat is new eCash standard CashAddr )
type ECashParser ¶
type ECashParser struct { *btc.BitcoinLikeParser AddressFormat AddressFormat }
ECashParser handle
func NewECashParser ¶
func NewECashParser(params *chaincfg.Params, c *btc.Configuration) (*ECashParser, error)
NewECashParser returns new ECashParser instance
func (*ECashParser) GetAddrDescFromAddress ¶
func (p *ECashParser) GetAddrDescFromAddress(address string) (bchain.AddressDescriptor, error)
GetAddrDescFromAddress returns internal address representation of given address
type ECashRPC ¶
type ECashRPC struct {
*btc.BitcoinRPC
}
ECashRPC is an interface to JSON-RPC bitcoind service.
func (*ECashRPC) EstimateFee ¶
EstimateFee returns fee estimation
func (*ECashRPC) EstimateSmartFee ¶
EstimateSmartFee returns fee estimation
func (*ECashRPC) GetBlockBytes ¶
GetBlockBytes returns block with given hash as bytes
func (*ECashRPC) GetBlockFull ¶
GetBlockFull returns block with given hash.
func (*ECashRPC) GetBlockInfo ¶
GetBlockInfo returns extended header (more info than in bchain.BlockHeader) with a list of txids
func (*ECashRPC) GetBlockRaw ¶
GetBlockRaw returns block with given hash as bytes.
func (*ECashRPC) Initialize ¶
Initialize initializes ECashRPC instance.