Crate bitcoinwallet_interface
source ·Structs
- | Coin Control Features. |
- | RAII class that provides access to a | WalletDatabase |
- | Information about one wallet address. |
- | Collection of wallet balances. |
- | Access to the wallet database. | | Opens the database and provides read | and write access to it. Each read and | write is its own transaction. | | Multiple operation transactions can | be started using TxnBegin() and committed | using TxnCommit() | | Otherwise the transaction will be committed | when the object goes out of scope. | | Optionally (on by default) it will flush | to disk on close. | | Every 1000 writes will automatically | trigger a flush to disk. |
- | An instance of this class represents | one database. |
- | RAII object to check and reserve a wallet | rescan |
- | A transaction with a bunch of additional | info that only the owner cares about. | | It includes any unrecorded transactions | needed to link it back to the block chain. | | Disable copying of CWalletTx objects to | prevent bugs where instances get copied in | and out of the mapWallet map, and fields | are updated in the wrong copy.
- | Confirmation includes tx status and | a triplet of {block height/block hash/tx | index in block} at which tx has been confirmed. | | All three are set to 0 if tx is unconfirmed | or abandoned. | | Meaning of these fields changes with | CONFLICTED state where they instead | point to block hash and block height | of the deepest conflicting tx. |
- | Wallet transaction information. |
- | Wallet transaction output. |
- | Updated transaction status. |
Enums
- | General change type (added, updated, | removed). |
- | Error statuses for the wallet database |
- | memory only |
- | New transactions start as UNCONFIRMED. | | At BlockConnected, they will transition | to CONFIRMED. | | In case of reorg, at BlockDisconnected, | they roll back to UNCONFIRMED. | | If we detect a conflicting transaction | at block connection, we update conflicted | tx and its dependencies as CONFLICTED. | | If tx isn’t confirmed and outside of | mempool, the user may switch it to ABANDONED | by using the abandontransaction call. | | This last status may be override by a | CONFLICTED or CONFIRMED transition. |
Constants
- | Constant used in hashBlock to indicate | tx has been abandoned, only used at serialization/deserialization | to avoid ambiguity with conflicted. |
Traits
- | Interface for accessing a wallet. |
- | Wallet storage things that ScriptPubKeyMans | need in order to be able to store things to the | wallet database. It provides access to things | that are part of the entire wallet and not | specific to a ScriptPubKeyMan such as wallet | flags, wallet version, encryption keys, | encryption status, and the database | itself. This allows a ScriptPubKeyMan to have | callbacks into CWallet without causing | a circular dependency. WalletStorage should be | the same for all ScriptPubKeyMans of a wallet.
Type Definitions
- | Callback for updating transaction | metadata in mapWallet. | | ———– | @param wtx | | - reference to mapWallet transaction | to update | ––––– | @param new_tx | | - true if wtx is newly inserted, false | if it previously existed | | ———– | @return | | true if wtx is changed and needs to be | saved to disk, otherwise false |