<commit_before>dcrwallet
=========

dcrwallet is a daemon handling Decred wallet functionality.  All interaction
with the wallet is performed over RPC.

Public and private keys are derived using the hierarchical
deterministic format described by
[BIP0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).
Unencrypted private keys are not supported and are never written to
disk.  dcrwallet uses the
`m/44'/<coin type>'/<account>'/<branch>/<address index>`
HD path for all derived addresses, as described by
[BIP0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).

dcrwallet provides two modes of operation to connect to the Decred
network.  The first (and default) is to communicate with a single
trusted `dcrd` instance using JSON-RPC.  The second is a
privacy-preserving Simplified Payment Verification (SPV) mode (enabled
with the `--spv` flag) where the wallet connects either to specified
peers (with `--spvconnect`) or peers discovered from seeders and other
peers. Both modes can be switched between with just a restart of the
wallet.  It is advised to avoid SPV mode for heavily-used wallets
which require downloading most blocks regardless.

Not all functionality is available when running in SPV mode.  Some of
these features may become available in future versions, but only if a
consensus vote passes to activate the required changes.  Currently,
the following features are disabled or unavailable to SPV wallets:

  * Voting

  * Revoking tickets before expiry

  * Determining exact number of live and missed tickets (as opposed to
    simply unspent).

Wallet clients interact with the wallet using one of two RPC servers:

  1. A JSON-RPC server inspired by the Bitcoin Core rpc server

     The JSON-RPC server exists to ease the migration of wallet applications
     from Core, but complete compatibility is not guaranteed.  Some portions of
     the API (and especially accounts) have to work differently due to other
     design decisions (mostly due to BIP0044).  However, if you find a
     compatibility issue and feel that it could be reasonably supported, please
     report an issue.  This server is enabled by default as long as a username
     and password are provided.

  2. A gRPC server

     The gRPC server uses a new API built for dcrwallet, but the API is not
     stabilized.  This server is enabled by default and may be disabled with
     the config option `--nogrpc`.  If you don't mind applications breaking
     due to API changes, don't want to deal with issues of the JSON-RPC API, or
     need notifications for changes to the wallet, this is the RPC server to
     use. The gRPC server is documented [here](./rpc/documentation/README.md).

## Installing and updating

### Binaries (Windows/Linux/macOS)

Binary releases are provided for common operating systems and architectures.
Please note that dcrwallet is CLI only. It is included in the
[CLI app suite](https://github.com/decred/decred-release/releases/latest).
If you would prefer a graphical user interface (GUI) instead, consider
downloading the GUI wallet [Decrediton](https://github.com/decred/decrediton).

https://decred.org/downloads/

* How to verify binaries before installing: https://docs.decred.org/advanced/verifying-binaries/
* How to install the CLI Suite: https://docs.decred.org/wallets/cli/cli-installation/
* How to install Decrediton: https://docs.decred.org/wallets/decrediton/decrediton-setup/

### Build from source (all platforms)

- **Install Go 1.14 or 1.15**

  Installation instructions can be found here: https://golang.org/doc/install.
  Ensure Go was installed properly and is a supported version:
  ```sh
  $ go version
  $ go env GOROOT GOPATH
  ```
  NOTE: `GOROOT` and `GOPATH` must not be on the same path. It is recommended
  to add `$GOPATH/bin` to your `PATH` according to the Golang.org instructions.

- **Build or Update dcrwallet**

  Since dcrwallet is a single Go module, it's possible to use a single command to
  download, build, and install without needing to clone the repo. While outside
  of any module (`go env GOMOD` prints an empty newline), run:

  ```sh
  $ GO111MODULE=on go get decred.org/dcrwallet
  ```

  An optional version, branch, or tag may be appended following a `@` character
  after the package name.  The implicit default is to build `@latest`, which is
  the latest semantic version tag.  Building `@master` will build the latest
  development version.  See `go help module-get` for more details.

  The `dcrwallet` executable will be installed to `$GOPATH/bin`.  `GOPATH`
  defaults to `$HOME/go` (or `%USERPROFILE%\go` on Windows).
<commit_msg>Update instructions for new major version and Go 1.16 changes<commit_after>dcrwallet
=========

dcrwallet is a daemon handling Decred wallet functionality.  All interaction
with the wallet is performed over RPC.

Public and private keys are derived using the hierarchical
deterministic format described by
[BIP0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).
Unencrypted private keys are not supported and are never written to
disk.  dcrwallet uses the
`m/44'/<coin type>'/<account>'/<branch>/<address index>`
HD path for all derived addresses, as described by
[BIP0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).

dcrwallet provides two modes of operation to connect to the Decred
network.  The first (and default) is to communicate with a single
trusted `dcrd` instance using JSON-RPC.  The second is a
privacy-preserving Simplified Payment Verification (SPV) mode (enabled
with the `--spv` flag) where the wallet connects either to specified
peers (with `--spvconnect`) or peers discovered from seeders and other
peers. Both modes can be switched between with just a restart of the
wallet.  It is advised to avoid SPV mode for heavily-used wallets
which require downloading most blocks regardless.

Not all functionality is available when running in SPV mode.  Some of
these features may become available in future versions, but only if a
consensus vote passes to activate the required changes.  Currently,
the following features are disabled or unavailable to SPV wallets:

  * Voting

  * Revoking tickets before expiry

  * Determining exact number of live and missed tickets (as opposed to
    simply unspent).

Wallet clients interact with the wallet using one of two RPC servers:

  1. A JSON-RPC server inspired by the Bitcoin Core rpc server

     The JSON-RPC server exists to ease the migration of wallet applications
     from Core, but complete compatibility is not guaranteed.  Some portions of
     the API (and especially accounts) have to work differently due to other
     design decisions (mostly due to BIP0044).  However, if you find a
     compatibility issue and feel that it could be reasonably supported, please
     report an issue.  This server is enabled by default as long as a username
     and password are provided.

  2. A gRPC server

     The gRPC server uses a new API built for dcrwallet, but the API is not
     stabilized.  This server is enabled by default and may be disabled with
     the config option `--nogrpc`.  If you don't mind applications breaking
     due to API changes, don't want to deal with issues of the JSON-RPC API, or
     need notifications for changes to the wallet, this is the RPC server to
     use. The gRPC server is documented [here](./rpc/documentation/README.md).

## Installing and updating

### Binaries (Windows/Linux/macOS)

Binary releases are provided for common operating systems and architectures.
Please note that dcrwallet is CLI only. It is included in the
[CLI app suite](https://github.com/decred/decred-release/releases/latest).
If you would prefer a graphical user interface (GUI) instead, consider
downloading the GUI wallet [Decrediton](https://github.com/decred/decrediton).

https://decred.org/downloads/

* How to verify binaries before installing: https://docs.decred.org/advanced/verifying-binaries/
* How to install the CLI Suite: https://docs.decred.org/wallets/cli/cli-installation/
* How to install Decrediton: https://docs.decred.org/wallets/decrediton/decrediton-setup/

### Build from source (all platforms)

- **Install Go 1.15 or 1.16**

  Installation instructions can be found here: https://golang.org/doc/install.
  Ensure Go was installed properly and is a supported version:
  ```sh
  $ go version
  $ go env GOROOT GOPATH
  ```
  NOTE: `GOROOT` and `GOPATH` must not be on the same path. It is recommended
  to add `$GOPATH/bin` to your `PATH` according to the Golang.org instructions.

- **Build or Update dcrwallet**

  Since dcrwallet is a single Go module, it's possible to use a single command
  to download, build, and install without needing to clone the repo. If using Go
  1.16, run

  ```sh
  $ go install decred.org/dcrwallet/v2@master
  ```

  to build the latest master branch, or:

  ```sh
  $ go install decred.org/dcrwallet@latest
  ```

  for the latest released version.

  Any version, branch, or tag may be appended following a `@` character after
  the package name.  The implicit default is to build `@latest`, which is the
  latest semantic version tag.  Building `@master` will build the latest
  development version.  The module name, including any `/vN` suffix, must match
  the `module` line in the `go.mod` at that version.  See `go help install`
  for more details.

  The `dcrwallet` executable will be installed to `$GOPATH/bin`.  `GOPATH`
  defaults to `$HOME/go` (or `%USERPROFILE%\go` on Windows).

{'fraction_non_alphanumeric': 0.07181046231261139, 'fraction_numerical': 0.007338295418807003, 'mean_word_length': 3.932781799379524, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1706274', 'n_tokens_mistral': 2715, 'n_tokens_neox': 2602, 'n_words': 1265}