decred.org/dcrwallet/v3@v3.1.0/README.md (about)

     1  dcrwallet
     2  =========
     3  
     4  dcrwallet is a daemon handling Decred wallet functionality.  All interaction
     5  with the wallet is performed over RPC.
     6  
     7  Public and private keys are derived using the hierarchical
     8  deterministic format described by
     9  [BIP0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).
    10  Unencrypted private keys are not supported and are never written to
    11  disk.  dcrwallet uses the
    12  `m/44'/<coin type>'/<account>'/<branch>/<address index>`
    13  HD path for all derived addresses, as described by
    14  [BIP0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).
    15  
    16  dcrwallet provides two modes of operation to connect to the Decred
    17  network.  The first (and default) is to communicate with a single
    18  trusted `dcrd` instance using JSON-RPC.  The second is a
    19  privacy-preserving Simplified Payment Verification (SPV) mode (enabled
    20  with the `--spv` flag) where the wallet connects either to specified
    21  peers (with `--spvconnect`) or peers discovered from seeders and other
    22  peers. Both modes can be switched between with just a restart of the
    23  wallet.  It is advised to avoid SPV mode for heavily-used wallets
    24  which require downloading most blocks regardless.
    25  
    26  Not all functionality is available when running in SPV mode.  Some of
    27  these features may become available in future versions, but only if a
    28  consensus vote passes to activate the required changes.  Currently,
    29  the following features are disabled or unavailable to SPV wallets:
    30  
    31    * Voting
    32  
    33    * Revoking tickets before expiry
    34  
    35    * Determining exact number of live and missed tickets (as opposed to
    36      simply unspent).
    37  
    38  Wallet clients interact with the wallet using one of two RPC servers:
    39  
    40    1. A JSON-RPC server inspired by the Bitcoin Core rpc server
    41  
    42       The JSON-RPC server exists to ease the migration of wallet applications
    43       from Core, but complete compatibility is not guaranteed.  Some portions of
    44       the API (and especially accounts) have to work differently due to other
    45       design decisions (mostly due to BIP0044).  However, if you find a
    46       compatibility issue and feel that it could be reasonably supported, please
    47       report an issue.  This server is enabled by default as long as a username
    48       and password are provided.
    49  
    50    2. A gRPC server
    51  
    52       The gRPC server uses a new API built for dcrwallet, but the API is not
    53       stabilized.  This server is enabled by default and may be disabled with
    54       the config option `--nogrpc`.  If you don't mind applications breaking
    55       due to API changes, don't want to deal with issues of the JSON-RPC API, or
    56       need notifications for changes to the wallet, this is the RPC server to
    57       use. The gRPC server is documented [here](./rpc/documentation/README.md).
    58  
    59  ## Installing and updating
    60  
    61  ### Binaries (Windows/Linux/macOS)
    62  
    63  Binary releases are provided for common operating systems and architectures.
    64  Please note that dcrwallet is CLI only. It is included in the
    65  [CLI app suite](https://github.com/decred/decred-release/releases/latest).
    66  If you would prefer a graphical user interface (GUI) instead, consider
    67  downloading the GUI wallet [Decrediton](https://github.com/decred/decrediton).
    68  
    69  https://decred.org/downloads/
    70  
    71  * How to verify binaries before installing: https://docs.decred.org/advanced/verifying-binaries/
    72  * How to install the CLI Suite: https://docs.decred.org/wallets/cli/cli-installation/
    73  * How to install Decrediton: https://docs.decred.org/wallets/decrediton/decrediton-setup/
    74  
    75  ### Build from source (all platforms)
    76  
    77  - **Install Go 1.17 or 1.18**
    78  
    79    Installation instructions can be found here: https://golang.org/doc/install.
    80    Ensure Go was installed properly and is a supported version:
    81    ```sh
    82    $ go version
    83    $ go env GOROOT GOPATH
    84    ```
    85    NOTE: `GOROOT` and `GOPATH` must not be on the same path. It is recommended
    86    to add `$GOPATH/bin` to your `PATH` according to the Golang.org instructions.
    87  
    88  - **Build or Update dcrwallet**
    89  
    90    Since dcrwallet is a single Go module, it's possible to use a single command
    91    to download, build, and install without needing to clone the repo. Run:
    92  
    93    ```sh
    94    $ go install decred.org/dcrwallet/v3@master
    95    ```
    96  
    97    to build the latest master branch, or:
    98  
    99    ```sh
   100    $ go install decred.org/dcrwallet@latest
   101    ```
   102  
   103    for the latest released version.
   104  
   105    Any version, branch, or tag may be appended following a `@` character after
   106    the package name.  The implicit default is to build `@latest`, which is the
   107    latest semantic version tag.  Building `@master` will build the latest
   108    development version.  The module name, including any `/vN` suffix, must match
   109    the `module` line in the `go.mod` at that version.  See `go help install`
   110    for more details.
   111  
   112    The `dcrwallet` executable will be installed to `$GOPATH/bin`.  `GOPATH`
   113    defaults to `$HOME/go` (or `%USERPROFILE%\go` on Windows).
   114  
   115  ## Getting Started
   116  
   117  dcrwallet can connect to the Decred blockchain using either [dcrd](https://github.com/decred/dcrd)
   118  or by running in [Simple Payment Verification (SPV)](https://docs.decred.org/wallets/spv/)
   119  mode. Commands should be run in `cmd.exe` or PowerShell on Windows, or any
   120  terminal emulator on *nix.
   121  
   122  - Run the following command to create a wallet:
   123  
   124  ```sh
   125  dcrwallet --create
   126  ```
   127  
   128  - To use dcrwallet in SPV mode:
   129  
   130  ```sh
   131  dcrwallet --spv
   132  ```
   133  
   134  dcrwallet will find external full node peers. It will take a few minutes to
   135  download the blockchain headers and filters, but it will not download full blocks.
   136  
   137  - To use dcrwallet using a localhost dcrd:
   138  
   139  You will need to install both [dcrd](https://github.com/decred/dcrd) and
   140  [dcrctl](https://github.com/decred/dcrctl). `dcrctl` is the client that controls
   141  `dcrd` and `dcrwallet` via remote procedure call (RPC).
   142  
   143  Please follow the instructions in the documentation, beginning with
   144  [Startup Basics](https://docs.decred.org/wallets/cli/startup-basics/)
   145  
   146  ## Running Tests
   147  
   148  All tests may be run using the script `run_tests.sh`. Generally, Decred only
   149  supports the current and previous major versions of Go.
   150  
   151  ```sh
   152  ./run_tests.sh
   153  ```
   154  
   155  ## Contact
   156  
   157  If you have any further questions you can find us at:
   158  
   159  https://decred.org/community/
   160  
   161  ## Issue Tracker
   162  
   163  The [integrated github issue tracker](https://github.com/decred/dcrwallet/issues)
   164  is used for this project.
   165  
   166  ## Documentation
   167  
   168  The documentation for dcrwallet is a work-in-progress.  It is located in the
   169  [docs](https://github.com/decred/dcrwallet/tree/master/docs) folder.
   170  
   171  Additional documentation can be found on
   172  [docs.decred.org](https://docs.decred.org/wallets/cli/dcrwallet-setup/).
   173  
   174  ## License
   175  
   176  dcrwallet is licensed under the liberal ISC License.