Versions in this module Expand all Collapse all v0 v0.0.3 Sep 11, 2024 Changes in this version + const BreachHintSize + const SessionIDSize + var ErrUninitializedDB = errors.New("db not initialized") + func MigrateChannelMaxHeights(tx kvdb.RwTx) error + func ReadElement(r io.Reader, element interface{}) error + func ReadElements(r io.Reader, elements ...interface{}) error + func UseLogger(logger btclog.Logger) + func WriteElement(w io.Writer, element interface{}) error + func WriteElements(w io.Writer, elements ...interface{}) error + type BackupID struct + ChanID ChannelID + CommitHeight uint64 + func (b *BackupID) Decode(r io.Reader) error + func (b *BackupID) Encode(w io.Writer) error + func (b BackupID) String() string + type BreachHint [BreachHintSize]byte + type ChannelID [32]byte + type CommittedUpdate struct + SeqNum uint16 + type CommittedUpdateBody struct + BackupID BackupID + EncryptedBlob []byte + Hint BreachHint + func (u *CommittedUpdateBody) Decode(r io.Reader) error + func (u *CommittedUpdateBody) Encode(w io.Writer) error + type KVStore interface + Delete func(key []byte) error + Put func(key, value []byte) error + type RangeIndex struct + func NewRangeIndex(ranges map[uint64]uint64, opts ...RangeIndexOption) (*RangeIndex, error) + func (a *RangeIndex) Add(newHeight uint64, kv KVStore) error + func (a *RangeIndex) GetAllRanges() map[uint64]uint64 + func (a *RangeIndex) IsInIndex(n uint64) bool + func (a *RangeIndex) MaxHeight() uint64 + func (a *RangeIndex) NumInSet() uint64 + type RangeIndexOption func(*RangeIndex) + func WithSerializeUint64Fn(fn func(uint64) ([]byte, error)) RangeIndexOption + type SessionID [SessionIDSize]byte + func (s SessionID) String() string