lbcwallet/walletdb
Olaoluwa Osuntokun 0bcbb4cc4a
walletdb: add sequence methods to main interface, update bdb to implement
In this commit, we add the trio of sequence based methods that bbolt
ships with to the main bucket interface. We do this in order to easily
allow walletdb as is to be slotted into place where bbolt is currently
used, without sacrificing any functionality.
2020-01-15 04:51:15 -08:00
..
bdb walletdb: add sequence methods to main interface, update bdb to implement 2020-01-15 04:51:15 -08:00
migration walletdb/migration: add new migration package with Manager interface 2018-11-05 17:58:16 -08:00
walletdbtest walletdb: add sequence methods to main interface, update bdb to implement 2020-01-15 04:51:15 -08:00
cov_report.sh Add full test coverage suite for walletdb package. 2014-11-10 16:01:46 -06:00
db_test.go walletdb: update examples to acccount for new 2nd param for bdb Open/Create 2020-01-15 04:50:22 -08:00
doc.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
error.go Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
example_test.go walletdb: update examples to acccount for new 2nd param for bdb Open/Create 2020-01-15 04:50:22 -08:00
go.mod build+walletdb: create new module for walletdb 2019-09-05 16:23:31 -07:00
go.sum build+walletdb: create new module for walletdb 2019-09-05 16:23:31 -07:00
interface.go walletdb: add sequence methods to main interface, update bdb to implement 2020-01-15 04:51:15 -08:00
README.md multi: switch import paths back to upstream 2018-05-23 19:38:56 -07:00
test_coverage.txt Add full test coverage suite for walletdb package. 2014-11-10 16:01:46 -06:00

walletdb

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

Package walletdb provides a namespaced database interface for btcwallet.

A wallet essentially consists of a multitude of stored data such as private and public keys, key derivation bits, pay-to-script-hash scripts, and various metadata. One of the issues with many wallets is they are tightly integrated. Designing a wallet with loosely coupled components that provide specific functionality is ideal, however it presents a challenge in regards to data storage since each component needs to store its own data without knowing the internals of other components or breaking atomicity.

This package solves this issue by providing a namespaced database interface that is intended to be used by the main wallet daemon. This allows the potential for any backend database type with a suitable driver. Each component, which will typically be a package, can then implement various functionality such as address management, voting pools, and colored coin metadata in their own namespace without having to worry about conflicts with other packages even though they are sharing the same database that is managed by the wallet.

A suite of tests is provided to ensure proper functionality. See test_coverage.txt for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the cov_report.sh script for a real-time report. Package walletdb is licensed under the copyfree ISC license.

This interfaces provided by this package were heavily inspired by the excellent boltdb project at https://github.com/boltdb/bolt by Ben B. Johnson.

Feature Overview

  • Key/value store
  • Namespace support
    • Allows multiple packages to have their own area in the database without worrying about conflicts
  • Read-only and read-write transactions with both manual and managed modes
  • Nested buckets
  • Supports registration of backend databases
  • Comprehensive test coverage

Documentation

[GoDoc] (http://godoc.org/github.com/btcsuite/btcwallet/walletdb)

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/btcsuite/btcwallet/walletdb

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/btcsuite/btcwallet/walletdb

Installation

$ go get github.com/btcsuite/btcwallet/walletdb

Examples

License

Package walletdb is licensed under the copyfree ISC License.