Versions in this module Expand all Collapse all v0 v0.12.2 Mar 18, 2021 Changes in this version + func NewMockConn(localPk, remotePk *btcec.PublicKey, localAddr, remoteAddr net.Addr, ...) (*MockPeer, *MockPeer) + type ClientDB struct + func NewClientDB() *ClientDB + func (m *ClientDB) AckUpdate(id *wtdb.SessionID, seqNum, lastApplied uint16) error + func (m *ClientDB) CommitUpdate(id *wtdb.SessionID, update *wtdb.CommittedUpdate) (uint16, error) + func (m *ClientDB) CreateClientSession(session *wtdb.ClientSession) error + func (m *ClientDB) CreateTower(lnAddr *lnwire.NetAddress) (*wtdb.Tower, error) + func (m *ClientDB) FetchChanSummaries() (wtdb.ChannelSummaries, error) + func (m *ClientDB) ListClientSessions(tower *wtdb.TowerID) (map[wtdb.SessionID]*wtdb.ClientSession, error) + func (m *ClientDB) ListTowers() ([]*wtdb.Tower, error) + func (m *ClientDB) LoadTower(pubKey *btcec.PublicKey) (*wtdb.Tower, error) + func (m *ClientDB) LoadTowerByID(towerID wtdb.TowerID) (*wtdb.Tower, error) + func (m *ClientDB) MarkBackupIneligible(chanID lnwire.ChannelID, commitHeight uint64) error + func (m *ClientDB) NextSessionKeyIndex(towerID wtdb.TowerID, blobType blob.Type) (uint32, error) + func (m *ClientDB) RegisterChannel(chanID lnwire.ChannelID, sweepPkScript []byte) error + func (m *ClientDB) RemoveTower(pubKey *btcec.PublicKey, addr net.Addr) error + type MockPeer struct + IncomingMsgs chan []byte + OutgoingMsgs chan []byte + Quit chan struct{} + RemoteQuit chan struct{} + func NewMockPeer(lpk, rpk *btcec.PublicKey, addr net.Addr, bufferSize int) *MockPeer + func (p *MockPeer) Close() error + func (p *MockPeer) LocalAddr() net.Addr + func (p *MockPeer) Read(dst []byte) (int, error) + func (p *MockPeer) ReadNextMessage() ([]byte, error) + func (p *MockPeer) RemoteAddr() net.Addr + func (p *MockPeer) RemotePub() *btcec.PublicKey + func (p *MockPeer) SetDeadline(t time.Time) error + func (p *MockPeer) SetReadDeadline(t time.Time) error + func (p *MockPeer) SetWriteDeadline(t time.Time) error + func (p *MockPeer) Write(b []byte) (n int, err error) + type MockSigner struct + func NewMockSigner() *MockSigner + func (s *MockSigner) AddPrivKey(privKey *btcec.PrivateKey) keychain.KeyLocator + func (s *MockSigner) ComputeInputScript(tx *wire.MsgTx, signDesc *input.SignDescriptor) (*input.Script, error) + func (s *MockSigner) SignOutputRaw(tx *wire.MsgTx, signDesc *input.SignDescriptor) (input.Signature, error) + type SecretKeyRing struct + func NewSecretKeyRing() *SecretKeyRing + func (m *SecretKeyRing) DeriveKey(keyLoc keychain.KeyLocator) (keychain.KeyDescriptor, error) + func (m *SecretKeyRing) ECDH(keyDesc keychain.KeyDescriptor, pub *btcec.PublicKey) ([32]byte, error) + type TowerDB struct + func NewTowerDB() *TowerDB + func (db *TowerDB) DeleteSession(target wtdb.SessionID) error + func (db *TowerDB) GetLookoutTip() (*chainntnfs.BlockEpoch, error) + func (db *TowerDB) GetSessionInfo(id *wtdb.SessionID) (*wtdb.SessionInfo, error) + func (db *TowerDB) InsertSessionInfo(info *wtdb.SessionInfo) error + func (db *TowerDB) InsertStateUpdate(update *wtdb.SessionStateUpdate) (uint16, error) + func (db *TowerDB) QueryMatches(breachHints []blob.BreachHint) ([]wtdb.Match, error) + func (db *TowerDB) SetLookoutTip(epoch *chainntnfs.BlockEpoch) error