Versions in this module Expand all Collapse all v0 v0.2.1 Oct 13, 2023 Changes in this version type LockedUnit + SystemID []byte v0.2.0 Sep 27, 2023 Changes in this version + const UnitStoreDBFileName + type BoltStore struct + func NewBoltStore(dbFile string) (*BoltStore, error) + func (s *BoltStore) Close() error + func (s *BoltStore) DeleteUnit(accountID, unitID []byte) error + func (s *BoltStore) GetUnit(accountID, unitID []byte) (*LockedUnit, error) + func (s *BoltStore) GetUnits(accountID []byte) ([]*LockedUnit, error) + func (s *BoltStore) PutUnit(unit *LockedUnit) error + type InMemoryUnitLocker struct + func NewInMemoryUnitLocker() *InMemoryUnitLocker + func (m *InMemoryUnitLocker) Close() error + func (m *InMemoryUnitLocker) GetUnit(accountID, unitID []byte) (*LockedUnit, error) + func (m *InMemoryUnitLocker) GetUnits(accountID []byte) ([]*LockedUnit, error) + func (m *InMemoryUnitLocker) LockUnit(lockedBill *LockedUnit) error + func (m *InMemoryUnitLocker) UnlockUnit(accountID, unitID []byte) error + type LockReason uint + const LockReasonAddFees + const LockReasonCollectDust + const LockReasonReclaimFees + func (r LockReason) String() string + type LockedUnit struct + AccountID []byte + LockReason LockReason + Transactions []*Transaction + TxHash []byte + UnitID []byte + func NewLockedUnit(accountID, unitID, txHash []byte, lockReason LockReason, ...) *LockedUnit + type Transaction struct + TxHash []byte + TxOrder *types.TransactionOrder + func NewTransaction(txo *types.TransactionOrder) *Transaction + type UnitLocker struct + func NewUnitLocker(dir string) (*UnitLocker, error) + func (l *UnitLocker) Close() error + func (l *UnitLocker) GetUnit(accountID, unitID []byte) (*LockedUnit, error) + func (l *UnitLocker) GetUnits(accountID []byte) ([]*LockedUnit, error) + func (l *UnitLocker) LockUnit(unit *LockedUnit) error + func (l *UnitLocker) UnlockUnit(accountID, unitID []byte) error + type UnitStore interface + Close func() error + DeleteUnit func(accountID, unitID []byte) error + GetUnit func(accountID, unitID []byte) (*LockedUnit, error) + GetUnits func(accountID []byte) ([]*LockedUnit, error) + PutUnit func(unit *LockedUnit) error