waddrmgr: Update documentation for walletdb.

This commit updates the documentation which discusses creating and opening
the manager to properly mention the wallet database namespace as well as
another typo.
This commit is contained in:
Dave Collins 2015-02-09 20:12:02 -06:00
parent b2ebd20d75
commit 99e4a8f4b3

View file

@ -73,18 +73,17 @@ for this purpose.
Creating a New Address Manager Creating a New Address Manager
A new address manager is created via the Create function. This function accepts A new address manager is created via the Create function. This function accepts
the path to a database file to create, passphrases, network, and perhaps most a wallet database namespace, passphrases, network, and perhaps most importantly,
importantly, a cryptographically random seed which is used to generate the a cryptographically random seed which is used to generate the master node of the
master node of the hierarchical deterministic keychain which allows all hierarchical deterministic keychain which allows all addresses and private keys
addresses and private keys to be recovered with only the seed. The GenerateSeed to be recovered with only the seed. The GenerateSeed function in the hdkeychain
function in the hdkeychain package can be used as a convenient way to create a package can be used as a convenient way to create a random seed for use with
random seed for use with this function. The address manager is locked this function. The address manager is locked immediately upon being created.
immediately upon being created.
Opening an Existing Address Manager Opening an Existing Address Manager
An existing address manager is opened via the Open function. This function An existing address manager is opened via the Open function. This function
accepts the path to the existing database file, the public passphrase, and accepts an existing wallet database namespace, the public passphrase, and
network. The address manager is opened locked as expected since the open network. The address manager is opened locked as expected since the open
function does not take the private passphrase to unlock it. function does not take the private passphrase to unlock it.
@ -150,11 +149,11 @@ apply to the associated network.
Errors Errors
All errors returned from this package are of type waddrmgr.ManagerError. This All errors returned from this package are of type ManagerError. This allows the
allows the caller to programmatically ascertain the specific reasons for failure caller to programmatically ascertain the specific reasons for failure by
by examining the ErrorCode field of the type asserted ManagerError. For certain examining the ErrorCode field of the type asserted ManagerError. For certain
error codes, as documented the specific error codes, the underlying error will error codes, as documented by the specific error codes, the underlying error
be contained in the Err field. will be contained in the Err field.
Bitcoin Improvement Proposals Bitcoin Improvement Proposals