package
1.9.25
Repository: https://github.com/p9c/pod.git
Documentation: pkg.go.dev

# README

wtxmgr

[Build Status] (https://travis-ci.org/btcsuite/btcwallet)

Package wtxmgr provides storage and spend tracking of wallet transactions and their relevant input and outputs.

Feature overview

  • Storage for relevant wallet transactions
  • Ability to mark outputs as controlled by wallet
  • Unspent transaction output index
  • Balance tracking
  • Automatic spend tracking for transaction inserts and removals
  • Double spend detection and correction after blockchain reorgs
  • Scalable design:
    • Utilizes similar prefixes to allow cursor iteration over relevant transaction inputs and outputs
    • Programmatically detectable errors, including encapsulation of errors from packages it relies on
    • Operates under its own walletdb namespace

Documentation

[GoDoc] (http://godoc.org/github.com/p9c/pod/walletmain/wtxmgr)

Full go doc style documentation for the project can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/p9c/pod/walletmain/wtxmgr

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/p9c/pod/walletmain/wtxmgr

Installation

$ go get github.com/p9c/pod/walletmain/wtxmgr

Package wtxmgr is licensed under the copyfree ISC License.

# Functions

Create creates a new persistent transaction store in the walletdb namespace.
DoUpgrades performs any necessary upgrades to the transaction history contained in the wallet database, namespaced by the top level bucket key namespaceKey.
IsNoExists returns whether an error is a TxMgrError with the ErrNoExists error code.
NewTxRecord creates a new transaction record that may be inserted into the store.
NewTxRecordFromMsgTx creates a new transaction record that may be inserted into the store.
Open opens the wallet transaction store from a walletdb namespace.
RemoveConflict removes an unmined transaction record and all spend chains deriving from it from the store.

# Constants

ErrAlreadyExists describes an error where creating the store cannot continue because a store already exists in the namespace.
ErrData describes an error where data stored in the transaction database is incorrect.
ErrDatabase indicates an error with the underlying database.
ErrInput describes an error where the variables passed into this function by the caller are obviously incorrect.
ErrNeedsUpgrade describes an error during store opening where the database contains an older version of the store.
ErrNoExists describes an error where the store cannot be opened due to it not already existing in the namespace.
ErrUnknownVersion describes an error where the store already exists but the database version is newer than latest version known to this software.
LatestVersion is the most recent store version.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
CreditRecord contains metadata regarding a transaction credit for a known transaction.
DebitRecord contains metadata regarding a transaction debit for a known transaction.
No description provided by the author
TxDetails is intended to provide callers with access to rich details regarding a relevant transaction and which inputs and outputs are credit or debits.
TxMgrError provides a single type for errors that can happen during Store operation.
No description provided by the author

# Type aliases

ErrorCode identifies a category of error.