lnd.xprv/chainntfs/chainntfs.go

26 lines
641 B
Go
Raw Normal View History

package chainntnfs
import "github.com/btcsuite/btcd/wire"
// TODO(roasbeef): finish
// * multiple backends for interface
// * btcd - websockets
// * core - rpc polling or ZeroMQ
// * direct p2p
// * random bitcoin API?
// * electrum?
2015-12-17 07:55:22 +03:00
// * SPV bloomfilter
// * other stuff maybe...
type ChainNotifier interface {
RegisterConfirmationsNotification(txid *wire.ShaHash, numConfs uint32, trigger *NotificationTrigger) error
RegisterSpendNotification(outpoint *wire.OutPoint, trigger *NotificationTrigger) error
Start() error
Stop() error
}
type NotificationTrigger struct {
TriggerChan chan struct{}
Callback func()
}