Versions in this module Expand all Collapse all v1 v1.4.10 Mar 19, 2021 Changes in this version + const TxLabelLimit + var ErrEmptyLabel = errors.New("empty transaction label not allowed") + var ErrLabelTooLong = errors.New("transaction label exceeds limit") + var ErrNoLabelBucket = errors.New("labels bucket does not exist") + var ErrOutputAlreadyLocked = errors.New("output already locked") + var ErrOutputUnlockNotAllowed = errors.New("output unlock not alowed") + var ErrTxLabelNotFound = errors.New("label for transaction not found") + var ErrUnknownOutput = errors.New("unknown output") + func Create(ns walletdb.ReadWriteBucket) error + func DependencySort(txs map[chainhash.Hash]*wire.MsgTx) []*wire.MsgTx + func DeserializeLabel(v []byte) (string, error) + func DisableLog() + func FetchTxLabel(ns walletdb.ReadBucket, txid chainhash.Hash) (string, error) + func IsNoExists(err error) bool + func PutTxLabel(labelBucket walletdb.ReadWriteBucket, txid chainhash.Hash, label string) error + func UseLogger(logger btclog.Logger) + type Block struct + Hash chainhash.Hash + Height int32 + type BlockMeta struct + Time time.Time + type Credit struct + Amount vclutil.Amount + FromCoinBase bool + PkScript []byte + Received time.Time + type CreditRecord struct + Amount vclutil.Amount + Change bool + Index uint32 + Spent bool + type DebitRecord struct + Amount vclutil.Amount + Index uint32 + type Error struct + Code ErrorCode + Desc string + Err error + func (e Error) Error() string + type ErrorCode uint8 + const ErrAlreadyExists + const ErrData + const ErrDatabase + const ErrInput + const ErrNeedsUpgrade + const ErrNoExists + const ErrUnknownVersion + func (e ErrorCode) String() string + type LockID [32]byte + type LockedOutput struct + Expiration time.Time + LockID LockID + Outpoint wire.OutPoint + type MigrationManager struct + func NewMigrationManager(ns walletdb.ReadWriteBucket) *MigrationManager + func (m *MigrationManager) CurrentVersion(ns walletdb.ReadBucket) (uint32, error) + func (m *MigrationManager) Name() string + func (m *MigrationManager) Namespace() walletdb.ReadWriteBucket + func (m *MigrationManager) SetVersion(ns walletdb.ReadWriteBucket, version uint32) error + func (m *MigrationManager) Versions() []migration.Version + type Store struct + NotifyUnspent func(hash *chainhash.Hash, index uint32) + func Open(ns walletdb.ReadBucket, chainParams *chaincfg.Params) (*Store, error) + func (s *Store) AddCredit(ns walletdb.ReadWriteBucket, rec *TxRecord, block *BlockMeta, index uint32, ...) error + func (s *Store) Balance(ns walletdb.ReadBucket, minConf int32, syncHeight int32) (vclutil.Amount, error) + func (s *Store) DeleteExpiredLockedOutputs(ns walletdb.ReadWriteBucket) error + func (s *Store) InsertTx(ns walletdb.ReadWriteBucket, rec *TxRecord, block *BlockMeta) error + func (s *Store) ListLockedOutputs(ns walletdb.ReadBucket) ([]*LockedOutput, error) + func (s *Store) LockOutput(ns walletdb.ReadWriteBucket, id LockID, op wire.OutPoint, ...) (time.Time, error) + func (s *Store) PreviousPkScripts(ns walletdb.ReadBucket, rec *TxRecord, block *Block) ([][]byte, error) + func (s *Store) PutTxLabel(ns walletdb.ReadWriteBucket, txid chainhash.Hash, label string) error + func (s *Store) RangeTransactions(ns walletdb.ReadBucket, begin, end int32, f func([]TxDetails) (bool, error)) error + func (s *Store) RemoveUnminedTx(ns walletdb.ReadWriteBucket, rec *TxRecord) error + func (s *Store) Rollback(ns walletdb.ReadWriteBucket, height int32) error + func (s *Store) TxDetails(ns walletdb.ReadBucket, txHash *chainhash.Hash) (*TxDetails, error) + func (s *Store) TxLabel(ns walletdb.ReadBucket, txHash chainhash.Hash) (string, error) + func (s *Store) UniqueTxDetails(ns walletdb.ReadBucket, txHash *chainhash.Hash, block *Block) (*TxDetails, error) + func (s *Store) UnlockOutput(ns walletdb.ReadWriteBucket, id LockID, op wire.OutPoint) error + func (s *Store) UnminedTxHashes(ns walletdb.ReadBucket) ([]*chainhash.Hash, error) + func (s *Store) UnminedTxs(ns walletdb.ReadBucket) ([]*wire.MsgTx, error) + func (s *Store) UnspentOutputs(ns walletdb.ReadBucket) ([]Credit, error) + type TxDetails struct + Block BlockMeta + Credits []CreditRecord + Debits []DebitRecord + Label string + type TxRecord struct + Hash chainhash.Hash + MsgTx wire.MsgTx + Received time.Time + SerializedTx []byte + func NewTxRecord(serializedTx []byte, received time.Time) (*TxRecord, error) + func NewTxRecordFromMsgTx(msgTx *wire.MsgTx, received time.Time) (*TxRecord, error)