package chain import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/waddrmgr" ) // Interface allows more than one backing blockchain source, such as a // btcd RPC chain server, or an SPV library, as long as we write a driver for // it. type Interface interface { Start() error Stop() WaitForShutdown() GetBestBlock() (*chainhash.Hash, int32, error) GetBlock(*chainhash.Hash) (*wire.MsgBlock, error) BlockStamp() (*waddrmgr.BlockStamp, error) SendRawTransaction(*wire.MsgTx, bool) (*chainhash.Hash, error) Rescan(*chainhash.Hash, []btcutil.Address, []*wire.OutPoint) error NotifyReceived([]btcutil.Address) error NotifyBlocks() error Notifications() <-chan interface{} }