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

     1  treasurykey
     2  ===========
     3  
     4  THIS TOOL IS FOR NETWORK OPERATORS ONLY.
     5  
     6  **DO NOT USE**
     7  
     8  The `treasurykey` utility is used to generate treasury keys that enable
     9  spending from the treasury account.
    10  
    11  The tool takes a single flag to designate which network it is generating a key
    12  for.
    13  
    14  It prints out three values:
    15  1. A serialized private key
    16  2. The serialized public key
    17  3. The WIF (Wallet Interchange Format) version of the private key.
    18  
    19  This information must be stored in a secure location.
    20  
    21  The public key will be hardcoded inside `dcrd` and `dcrwallet`. Both daemons
    22  will use it to identify valid treasury spend transactions.
    23  
    24  The WIF must be imported into the dcrwallet that will generate TSPEND
    25  transactions.
    26  
    27  For example:
    28  
    29  Generate key.
    30  ```
    31  $ treasurykey -mainnet  
    32  Private key: 9bcf82e4b267585b3f0c54632d7e8eef2fc13407dfdbf7a80398085f5851baa0
    33  Public  key: 03f31aa7013b3c3e8568eb6415a895d8662b5ddceff12a62bf77c01e3e451a332f
    34  WIF        : PmQeT3VmoxDRjgsfwVJLV13ioNyxmd9XuQmQu86UPiQQAn5XkRfLN
    35  ```
    36  
    37  Import key into treasury wallet.
    38  ```
    39  dcrctl --wallet importprivkey PmQeT3VmoxDRjgsfwVJLV13ioNyxmd9XuQmQu86UPiQQAn5XkRfLN imported false
    40  ```
    41  
    42  It is suggested to repeat this process so that there are at least two valid
    43  keys.
    44  
    45  Why?
    46  ====
    47  
    48  This approach was chosen in order to generate *independent* random keys. If the
    49  treasury wallet machine were to be compromised the seed would be compromised as
    50  well.