|
@@ -27,6 +27,8 @@
|
|
|
* <a href='#a_rbf_onl'>With an online (hot) wallet</a>
|
|
|
* <a href='#a_rbf_onf'>With an offline (cold storage) wallet</a>
|
|
|
|
|
|
+#### <a href='#a_alt'>Forkcoin and Altcoin support (BCH,LTC)</a>
|
|
|
+
|
|
|
### <a name='a_i'>Preliminaries</a>
|
|
|
|
|
|
#### <a name='a_bb'>Before you begin</a>
|
|
@@ -50,12 +52,12 @@ followed by `--help`. Note that most command options have long and short
|
|
|
versions. For example, the `--help` option may be abbreviated to `-h`.
|
|
|
Exceptions are the options listed by `--longhelp`, which have no short versions.
|
|
|
|
|
|
-MMGen commands are generally interactive, informing you at every step and
|
|
|
+MMGen commands are generally interactive, providing you with information and
|
|
|
prompting you for input. The `--verbose` or `-v` option requests commands to be
|
|
|
more wordy, while the `--quiet` or `-q` option suppresses all but the most
|
|
|
essential information. These options are available for all MMGen commands. The
|
|
|
`--yes` option (available only for certain commands) suppresses even more
|
|
|
-information and can be used to make some commands non-interactive or scriptable.
|
|
|
+information and can be used to make some commands non-interactive and scriptable.
|
|
|
|
|
|
Certain options require parameters, such as the `--seed-len` option, for
|
|
|
instance, which takes a parameter of '128', '192' or '256'. Commands may also
|
|
@@ -75,7 +77,7 @@ Sample MMGen command invocations:
|
|
|
Just like Bitcoin Core, MMGen has its own data directory and configuration file.
|
|
|
The data directory is '.mmgen' in the user's home directory and the config
|
|
|
file is 'mmgen.cfg'. The config file contains global settings which you may
|
|
|
-wish to edit at some point to customize MMGen to your needs. These settings
|
|
|
+wish to edit at some point to customize your installation. These settings
|
|
|
include the maximum transaction fee; the user name, password and hostname
|
|
|
used for communicating with bitcoind; and a number of others.
|
|
|
|
|
@@ -87,15 +89,15 @@ import operations on an offline computer with no blockchain and no bitcoin
|
|
|
balance.
|
|
|
|
|
|
If you want to practice creating, signing and sending transactions with real
|
|
|
-bitcoins, however, you'll need a fully synced blockchain and some actual coins
|
|
|
-to play with.
|
|
|
+bitcoins, however, you'll need a fully synced blockchain and some coins to play
|
|
|
+with. This involves an expenditure of both time and money.
|
|
|
|
|
|
-Fortunately, there's an alternative: MMGen's **regtest mode** feature creates a
|
|
|
-virtual network of two users, Bob and Alice, who transact with each other on a
|
|
|
-private blockchain. All of MMGen's functionality is available in regtest mode,
|
|
|
-making it an ideal way to learn to use the MMGen wallet without risking real
|
|
|
-coins. You may wish to pause here and perform the steps in the tutorial [MMGen
|
|
|
-Quick Start with Regtest Mode][06] before continuing on.
|
|
|
+Fortunately, there's an alternative: MMGen's **regtest mode** creates a virtual
|
|
|
+network of two users, Bob and Alice, who transact with each other on a private
|
|
|
+blockchain. All of MMGen's functionality is available in regtest mode, making
|
|
|
+it an ideal way to learn to use the MMGen wallet without risking real coins.
|
|
|
+You may wish to pause here and perform the steps in the tutorial [MMGen Quick
|
|
|
+Start with Regtest Mode][06] before continuing on.
|
|
|
|
|
|
### <a name='a_bo'>Basic Operations</a>
|
|
|
|
|
@@ -124,8 +126,9 @@ On your offline computer, generate an MMGen wallet:
|
|
|
generated, so your IDs will of course be different than these.
|
|
|
|
|
|
The Seed ID never changes and is used to identify all keys/addresses generated
|
|
|
-by this wallet. You should make a note of it. The Key ID changes whenever the
|
|
|
-wallet’s password or hash preset are changed and is less important.
|
|
|
+by this wallet. Since it's your wallet's primary identifier, you should
|
|
|
+memorize it visually. The Key ID changes whenever the wallet’s password or hash
|
|
|
+preset are changed and doesn't need to be memorized.
|
|
|
|
|
|
‘256’ is the seed length; ‘3’ is the scrypt hash preset. These values are
|
|
|
configurable: type `mmgen-walletgen --help` for details.
|
|
@@ -176,9 +179,9 @@ backwards compatibility, legacy addresses are generated by default. To generate
|
|
|
compressed addresses, specify `--type=compressed` on the command line.
|
|
|
|
|
|
Legacy addresses are of interest only for existing pre-Segwit MMGen
|
|
|
-installations, so it's unlikely you'll wish to generate them. Compressed
|
|
|
-addresses are the preferable choice for Bitcoin Cash (BCH) wallets, since
|
|
|
-Bitcoin Cash doesn't support Segwit.
|
|
|
+installations, and it's unlikely you'll wish to generate them. Compressed
|
|
|
+addresses are the preferred choice for Bitcoin Cash (BCH) wallets, since Bitcoin
|
|
|
+Cash doesn't support Segwit.
|
|
|
|
|
|
# legacy uncompressed
|
|
|
$ mmgen-addrgen 1-10
|
|
@@ -196,13 +199,13 @@ Bitcoin Cash doesn't support Segwit.
|
|
|
1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M
|
|
|
...
|
|
|
|
|
|
-Note that for non-legacy address types the code letter is present in the
|
|
|
+Note that for non-legacy address types the code letter is included in the
|
|
|
filename.
|
|
|
|
|
|
To fund your MMGen wallet, first import the addresses into your tracking wallet
|
|
|
and then spend some BTC into any of them. If you run out of addresses, generate
|
|
|
-more. To generate a hundred addresses, for example, you’d specify an address
|
|
|
-range of ‘1-100’.
|
|
|
+more. To generate a hundred addresses you’d specify an address range of
|
|
|
+‘1-100’.
|
|
|
|
|
|
Let’s say you’ve decided to spend some BTC into the first four addresses above.
|
|
|
Begin by importing these addresses into the tracking wallet on your online
|
|
@@ -243,8 +246,8 @@ Save the file, copy it onto a USB stick and transfer it to your online computer.
|
|
|
|
|
|
On your online computer, go to your bitcoind data directory and move any
|
|
|
existing 'wallet.dat' file out of harm’s way. Start bitcoind and let it
|
|
|
-generate a new 'wallet.dat', which you’ll use as your tracking wallet.
|
|
|
-Import your ten addresses into the new tracking wallet with the command:
|
|
|
+generate a new 'wallet.dat'; this you’ll use as your tracking wallet. Import
|
|
|
+your ten addresses into the new tracking wallet with the command:
|
|
|
|
|
|
$ mmgen-addrimport --batch my.addrs
|
|
|
|
|
@@ -269,10 +272,10 @@ track and spend funds from another wallet using MMGen without having to go
|
|
|
through the network. To use it, you must save the keys corresponding to the
|
|
|
addresses where the funds are stored in a separate file to use during signing.*
|
|
|
|
|
|
-Note that each address has a unique ID (the ‘MMGen ID’) consisting of its Seed
|
|
|
-ID, its address type code letter and its index. Addresses of different types
|
|
|
-may be imported into the same tracking wallet; since they're generated from
|
|
|
-different sub-seeds you needn't worry about key reuse.
|
|
|
+Note that each address has a unique ID (the ‘MMGen ID’) consisting of a Seed ID,
|
|
|
+address type code letter, and index. Addresses of different types may be
|
|
|
+imported into the same tracking wallet; since they're generated from different
|
|
|
+sub-seeds you needn't worry about key reuse.
|
|
|
|
|
|
Now that your addresses are being tracked, you may go ahead and send some BTC to
|
|
|
them over the Bitcoin network. If you send 0.1, 0.2, 0.3 and 0.4 BTC
|
|
@@ -304,10 +307,9 @@ issue the following command:
|
|
|
|
|
|
'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as arguments.
|
|
|
|
|
|
-NOTE: For backwards compatibility, the code letter may be omitted from the MMGen
|
|
|
-ID for legacy addresses. Thus address ‘89ABCDEF:L:5’, for example, may be
|
|
|
-expressed as ‘89ABCDEF:5’. For other address types the code letter is
|
|
|
-mandatory.
|
|
|
+NOTE: For backwards compatibility, legacy addresses may omit the code letter
|
|
|
+from the MMGen ID. Thus address ‘89ABCDEF:L:5’ may be expressed as
|
|
|
+‘89ABCDEF:5’. For other address types the code letter is mandatory.
|
|
|
|
|
|
To send 0.1 BTC to each of addresses 89ABCDEF:S:6 and 89ABCDEF:S:7 and return
|
|
|
the change to 89ABCDEF:S:8, you’d do this:
|
|
@@ -317,7 +319,7 @@ the change to 89ABCDEF:S:8, you’d do this:
|
|
|
As you can see, each send address is followed by a comma and the amount. The
|
|
|
address with no amount is the change address. All addresses belonging to your
|
|
|
seed in the above examples are already imported and tracked, so you’re OK. If
|
|
|
-you wanted to send to 89ABCDEF:S:11 instead, you'd have to import it first.
|
|
|
+you wanted to send to 89ABCDEF:S:11, you'd have to import it first.
|
|
|
|
|
|
|
|
|
Let’s go with the first of our two examples above.
|
|
@@ -406,7 +408,7 @@ of MMGen’s more advanced features, continue reading.
|
|
|
|
|
|
#### <a name='a_ms'>Using the mnemonic, seed and hexseed formats</a>
|
|
|
|
|
|
-Continuing our example above, generate a mnemonic from the default wallet:
|
|
|
+Using your default wallet from the exercises above, generate a mnemonic:
|
|
|
|
|
|
$ mmgen-walletconv -o words
|
|
|
...
|
|
@@ -501,8 +503,9 @@ standard command-line tools:
|
|
|
$ echo 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e | tr -d ' ' | xxd -r -p | sha256sum -b | xxd -r -p | sha256sum -b | cut -c 1-8
|
|
|
fe3c6545
|
|
|
|
|
|
-A hexseed can be used to generate keys even without the MMGen software,
|
|
|
-using basic command-line utilities, as explained in [this tutorial][03].
|
|
|
+Mnemonics and hexseeds can be used to generate keys even without the MMGen
|
|
|
+software, using basic command-line utilities, as explained in [this
|
|
|
+tutorial][03].
|
|
|
|
|
|
#### <a name='a_ai'>Mnemonics, seeds and hexseeds: additional information</a>
|
|
|
|
|
@@ -512,21 +515,28 @@ format:
|
|
|
|
|
|
$ mmgen-addrgen -i words 1-10
|
|
|
...
|
|
|
- Enter mnemonic data: <type or paste your mnemonic here>
|
|
|
+ Choose a mnemonic length: 1) 12 words, 2) 18 words, 3) 24 words: 1
|
|
|
+ Mnemonic length of 12 words chosen. OK? (Y/n): y
|
|
|
+ Enter your 12-word mnemonic, hitting RETURN or SPACE after each word:
|
|
|
+ Enter word #1:
|
|
|
+
|
|
|
+MMGen prompts you for each of the mnemonic's words individually, checking it for
|
|
|
+validity and reprompting if necessary. What you type is not displayed on the
|
|
|
+screen of course, being secret data.
|
|
|
|
|
|
-This means that you may keep your seed entirely in your head, as either a
|
|
|
-mnemonic, seed or hexseed, and never record it anywhere on any medium.
|
|
|
+The mnemonic prompt feature allows you to store and use your seed entirely in
|
|
|
+your head if you wish, never recording it on a persistent physical medium.
|
|
|
|
|
|
With the `-S` option, MMGen commands may be requested to print wallet data to
|
|
|
-screen instead of a file. To safeguard against over-the-shoulder, Van Eck
|
|
|
-phreaking and other side-channel attacks, you’ll be prompted before this
|
|
|
-sensitive data is actually displayed. MMGen never prints unencrypted private
|
|
|
-data to screen by default.
|
|
|
+screen instead of a file. To safeguard against over-the-shoulder, Tempest and
|
|
|
+other side-channel attacks, you’ll be prompted before this sensitive data is
|
|
|
+actually displayed. MMGen never prints decrypted private data to screen unless
|
|
|
+you ask it to.
|
|
|
|
|
|
The output of any MMGen command may be written to a directory of your choice
|
|
|
using the `-d` option. For example, on a Linux system you can use
|
|
|
`-d /dev/shm` to write keys and seeds to volatile memory instead of disk,
|
|
|
-ensuring that no trace of this sensitive data remains once your computer’s been
|
|
|
+ensuring that no trace of secret data remains once your computer’s been
|
|
|
powered down.
|
|
|
|
|
|
#### <a name='a_ic'>Incognito wallets</a>
|
|
@@ -838,9 +848,24 @@ them in turn until you get a confirmation:
|
|
|
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then
|
|
|
$ mmgen-txsend 73DABB[0.1,200].sigtx
|
|
|
|
|
|
+### <a name='a_alt'>Forkcoin and Altcoin support (BCH,LTC)</a>
|
|
|
+
|
|
|
+To use MMGen with Bitcoin Cash (BCH) or Litecoin (LTC), first make sure the
|
|
|
+Bitcoin ABC or Litecoin daemon is properly installed
|
|
|
+([source][si])([binaries][bi]) and [running][p8].
|
|
|
+
|
|
|
+MMGen requires that the bitcoin-abc daemon be listening on non-standard
|
|
|
+[port 8442][p8].
|
|
|
+
|
|
|
+Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
|
|
|
+commands. It's that simple!
|
|
|
+
|
|
|
[01]: https://github.com/mmgen/mmgen/wiki/Tracking-and-spending-ordinary-Bitcoin-addresses
|
|
|
[02]: https://tpfaucet.appspot.com
|
|
|
[03]: Recovering-Your-Keys-Without-the-MMGen-Software
|
|
|
[04]: https://bitcoin.org/en/developer-examples#testnet
|
|
|
[05]: https://bitcoin.org/en/developer-examples#regtest-mode
|
|
|
[06]: https://github.com/mmgen/mmgen/wiki/MMGen-Quick-Start-with-Regtest-Mode
|
|
|
+[si]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux
|
|
|
+[bi]: Install-Bitcoind#a_d
|
|
|
+[p8]: Install-Bitcoind#a_r
|