watch

package module
v0.0.0-...-75c48f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2020 License: MIT Imports: 19 Imported by: 0

README

watch

Watch for deposits to BTC addresses using neutrino

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MainNetPeers = []string{
		"btcd-mainnet.lightning.computer",
		"faucet.lightning.community",
		"mainnet1-btcd.zaphq.io",
		"mainnet2-btcd.zaphq.io",
		"mainnet3-btcd.zaphq.io",
		"mainnet4-btcd.zaphq.io",
	}

	TestNet3Peers = []string{
		"btcd-testnet.lightning.computer",
		"faucet.lightning.community",
		"testnet1-btcd.zaphq.io",
		"testnet2-btcd.zaphq.io",
		"testnet3-btcd.zaphq.io",
		"testnet4-btcd.zaphq.io",
	}
)

Functions

func EnableNeutrinoLogs

func EnableNeutrinoLogs(prefix string, level btclog.Level)

func PrepareTxOutputs

func PrepareTxOutputs(tx *btcutil.Tx, testnet bool) map[string]btcutil.Amount

Types

type FullWatcher

type FullWatcher struct {
	// contains filtered or unexported fields
}

FullWatcher downloads all blocks instead of using cfilters.

func NewFullWatcher

func NewFullWatcher(torSocks string, testnet bool, dir string, blockCallback func(*btcutil.Block)) (*FullWatcher, error)

func (*FullWatcher) AddAddresses

func (w *FullWatcher) AddAddresses(addrs ...string) error

func (*FullWatcher) Close

func (w *FullWatcher) Close() error

func (*FullWatcher) CurrentHeight

func (w *FullWatcher) CurrentHeight() (int32, error)

func (*FullWatcher) StartWatching

func (w *FullWatcher) StartWatching(startBlock int32, handlers rpcclient.NotificationHandlers)

func (*FullWatcher) WaitForSync

func (w *FullWatcher) WaitForSync() error

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func New

func New(peers []string, torSocks string, testnet bool, dir string) (*Watcher, error)

func (*Watcher) AddAddresses

func (w *Watcher) AddAddresses(addrs ...string) error

func (*Watcher) Close

func (w *Watcher) Close() error

func (*Watcher) CurrentHeight

func (w *Watcher) CurrentHeight() (int32, error)

func (*Watcher) StartWatching

func (w *Watcher) StartWatching(startBlock int32, handlers rpcclient.NotificationHandlers)

func (*Watcher) WaitForSync

func (w *Watcher) WaitForSync() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL