func (w *Watcher) Start() error {
	var err error
	w.started.Do(func() {
		err = w.start()
	})
	return err
}
Start allows the Watcher to begin accepting watch requests.
package watcher
import (
	"context"
	"errors"
	"sync"
	"github.com/btcsuite/btcd/btcec"
	"github.com/btcsuite/btcd/chaincfg/chainhash"
	"github.com/btcsuite/btcd/wire"
	"github.com/lightninglabs/lndclient"
	"github.com/lightningnetwork/lnd/chainntnfs"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)
type expiryReq struct {
	traderKey *btcec.PublicKey
	expiry uint32
}
type Config struct {
	ChainNotifier lndclient.ChainNotifierClient
	HandleAccountConf func(*btcec.PublicKey, *chainntnfs.TxConfirmation) error
	HandleAccountSpend func(*btcec.PublicKey, *chainntnfs.SpendDetail) error
	HandleAccountExpiry func(*btcec.PublicKey, uint32) error
}
type Watcher struct {
	started sync.Once
	stopped sync.Once
	cfg Config
	expiryReqs chan *expiryReq
	wg         sync.WaitGroup
	quit       chan struct{}
	ctxCancels []func()
	cancelMtx    sync.Mutex
	spendCancels map[[33]byte]func()
	confCancels  map[[33]byte]func()
}
func New(cfg *Config) *Watcher {
	return &Watcher{
		cfg:          *cfg,
		expiryReqs:   make(chan *expiryReq),
		quit:         make(chan struct{}),
		spendCancels: make(map[[33]byte]func()),
		confCancels:  make(map[[33]byte]func()),
	}
}