Update README, update documentation from wiki
This commit is contained in:
parent
f4d2829a54
commit
1f98c42ab8
13 changed files with 654 additions and 427 deletions
40
README.md
40
README.md
|
|
@ -32,9 +32,10 @@ back it up only once.
|
|||
At the heart of the MMGen system is the seed, the “master key” providing access
|
||||
to all your crypto assets. The seed can be stored in many different formats:
|
||||
as a password-encrypted wallet (the default), as a one-line base58 or
|
||||
hexidecimal seed file, as an Electrum-based mnemonic seed phrase, as a
|
||||
brainwallet passphrase, or as “incognito data” hideable within random data in a
|
||||
file or block device. Conversion between all formats is supported.
|
||||
hexadecimal seed file, as formatted “dieroll base6” data, as an Electrum-based
|
||||
or BIP39 mnemonic seed phrase, as a brainwallet passphrase, or as “incognito
|
||||
data” hideable within random data in a file or block device. Conversion between
|
||||
all formats is supported.
|
||||
|
||||
***mmgen-txcreate running in a terminal window***
|
||||
![mmgen-txcreate running in a terminal window][9]
|
||||
|
|
@ -59,6 +60,10 @@ found in contemporary English poetry. The high emotional impact of these words
|
|||
makes seed phrases easy to memorize. Curiously, only 861 of them are shared by
|
||||
the more prosaic 2048-word [BIP39 wordlist][bw] used in most wallets today.
|
||||
|
||||
Beginning with version 0.12.0, BIP39 mnemonic format is also supported, allowing
|
||||
you to use MMGen as a master wallet for other wallets supporting that widespread
|
||||
standard.
|
||||
|
||||
#### A brief overview of MMGen’s unique feature set:
|
||||
|
||||
- **[Full transaction and address tracking support][T]** for Bitcoin, [Bcash][bx],
|
||||
|
|
@ -78,15 +83,20 @@ the more prosaic 2048-word [BIP39 wordlist][bw] used in most wallets today.
|
|||
sat/byte amounts and can be adjusted interactively, letting you round fees to
|
||||
improve anonymity. Network fee estimation, [RBF][R] and [fee bumping][B] are
|
||||
supported.
|
||||
- **Support for six wallet formats:** three encrypted (native wallet,
|
||||
brainwallet, incognito wallet) and three unencrypted (mnemonic, mmseed,
|
||||
hexseed).
|
||||
- **Support for nine wallet formats:** three encrypted (native wallet,
|
||||
brainwallet, incognito wallet) and six unencrypted (native mnemonic,
|
||||
**BIP39,** mmseed, hexseed, plain hex, dieroll).
|
||||
- Interactive **dieroll wallet** generation via `mmgen-walletconv -i dieroll`.
|
||||
- Support for new-style **Monero mnemonics** in `mmgen-tool` and `mmgen-passgen`.
|
||||
- **[Subwallets][U]:** Subwallets have many applications, the most notable being
|
||||
online hot wallets, decoy wallets and travel wallets. MMGen subwallets are
|
||||
functionally and externally identical to ordinary wallets, which provides a
|
||||
key security benefit: only the user who generated the subwallet knows that it
|
||||
is indeed a subwallet. Subwallets don’t need to be backed up, as they can
|
||||
always be regenerated from their parent.
|
||||
- **[XOR (N-of-N) seed splitting][O]** with shares exportable to all MMGen
|
||||
wallet formats. The [master share][ms] feature allows you to create multiple
|
||||
splits with a single master share.
|
||||
- **[Transaction autosigning][X]:** This feature puts your offline signing
|
||||
machine into “hands-off” mode, allowing you to transact directly from cold
|
||||
storage securely and conveniently. Additional LED blinking support is
|
||||
|
|
@ -94,7 +104,7 @@ the more prosaic 2048-word [BIP39 wordlist][bw] used in most wallets today.
|
|||
- **[Password generation][G]:** MMGen can be used to generate and manage your
|
||||
online passwords. Password lists are identified by arbitrarily chosen strings
|
||||
like “alice@github” or “bob@reddit”. Passwords of different lengths and
|
||||
formats are supported.
|
||||
formats, including BIP39, are supported.
|
||||
- **Selectable seed lengths** of 128, 192 or 256 bits. Subwallets may have
|
||||
shorter seeds than their parent.
|
||||
- **User-enhanced entropy:** All operations requiring random data will prompt
|
||||
|
|
@ -116,6 +126,12 @@ the more prosaic 2048-word [BIP39 wordlist][bw] used in most wallets today.
|
|||
- **Scriptability:** Most MMGen commands can be made non-interactive, allowing
|
||||
you to automate repetitive tasks using shell scripts. Most of the
|
||||
`mmgen-tool` utility’s commands can be piped.
|
||||
- A convenient [**tool API interface**][ta] that allows you to use MMGen as a
|
||||
crypto library for your Python project.
|
||||
|
||||
#### Supported platforms:
|
||||
|
||||
Linux, Armbian, Raspbian, Windows/MSYS2
|
||||
|
||||
#### Supported platforms:
|
||||
|
||||
|
|
@ -144,6 +160,12 @@ Linux, Armbian, Raspbian, Windows/MSYS2
|
|||
|
||||
> #### [Subwallets][U]
|
||||
|
||||
> #### [XOR Seed Splitting][O]
|
||||
|
||||
> #### [Test Suite][ts]
|
||||
|
||||
> #### [Tool API][ta]
|
||||
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
[**Forum**][4] |
|
||||
|
|
@ -183,3 +205,7 @@ Donate (BTC,BCH): 15TLdmi5NYLdqmtCqczUs5pBPkJDXRs83w
|
|||
[R]: https://github.com/mmgen/mmgen/wiki/Getting-Started-with-MMGen#a_rbf
|
||||
[B]: https://github.com/mmgen/mmgen/wiki/txbump-[MMGen-command-help]
|
||||
[69]: https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki
|
||||
[O]: https://github.com/mmgen/mmgen/wiki/XOR-Seed-Splitting:-Theory-and-Practice
|
||||
[ms]: https://github.com/mmgen/mmgen/wiki/seedsplit-[MMGen-command-help]
|
||||
[ta]: https://github.com/mmgen/mmgen/wiki/Tool-API
|
||||
[ts]: https://github.com/mmgen/mmgen/wiki/Test-Suite
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ and with the following coin daemon versions:
|
|||
|
||||
* Parity crashes on startup on some systems when in developer mode,
|
||||
causing the 'eth' test to fail. This is a problem with Parity, not
|
||||
MMGen. On cleanly installed systems, Parity and the 'eth' test ran
|
||||
MMGen. On cleanly installed systems, Parity and the 'eth' test run
|
||||
without issue on all tested platforms.
|
||||
|
||||
Altcoin address generation has been additionally tested using the following
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
|
|||
|
||||
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
|
||||
|
||||
> You'll also need the following standard dependencies, if they're not already on
|
||||
> You’ll also need the following standard dependencies, if they’re not already on
|
||||
> your system:
|
||||
|
||||
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libdb-dev libdb++-dev libevent-dev
|
||||
|
|
@ -31,7 +31,7 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
|
|||
|
||||
> The '-j4' option will speed the build process up by using 4 cores of a 4-core
|
||||
> processor, if you have them. If overheating issues are a problem for your CPU
|
||||
> or you're short on memory, you may want to omit the option or reduce the
|
||||
> or you’re short on memory, you may want to omit the option or reduce the
|
||||
> number of cores used.
|
||||
|
||||
> For more detailed build information, consult the file [doc/build-unix.md][bu]
|
||||
|
|
@ -64,7 +64,7 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
|
|||
$ cd src
|
||||
$ sudo install -sv bitcoind /usr/local/bin/bitcoind-abc
|
||||
|
||||
> From now on, you'll invoke the daemon as 'bitcoind-abc' instead of 'bitcoind'.
|
||||
> From now on, you’ll invoke the daemon as 'bitcoind-abc' instead of 'bitcoind'.
|
||||
|
||||
### Compile and install Litecoin Core (optional):
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ machine.
|
|||
|
||||
The bitcoin daemon on the **online computer** requires a complete and
|
||||
up-to-date blockchain for tracking addresses. Since its work is more CPU and
|
||||
disk intensive, a more powerful computer is required here. You'll also need
|
||||
plenty of free disk space for the growing blockchain (~220GB at the time of
|
||||
disk intensive, a more powerful computer is required here. You’ll also need
|
||||
plenty of free disk space for the growing blockchain (~265GB at the time of
|
||||
writing).
|
||||
|
||||
Two blockchain operations are especially resource-intensive: **synchronizing
|
||||
the blockchain** and **importing existing addresses with balances**. If you
|
||||
synchronize often (once a week, for example) and take care to import your
|
||||
addresses **before** spending into them, then it's possible to get by with a
|
||||
addresses **before** spending into them, then it’s possible to get by with a
|
||||
more low-powered computer as your online machine.
|
||||
|
||||
### <a name='a_d'>Download:</a>
|
||||
|
|
@ -74,7 +74,7 @@ more low-powered computer as your online machine.
|
|||
|
||||
> **Windows:**
|
||||
|
||||
>> In the Windows command-line environment processes don't fork to run in the
|
||||
>> In the Windows command-line environment processes don’t fork to run in the
|
||||
>> background, so to run multiple daemons simultaneously you must start each
|
||||
>> one in a separate terminal window. Start your daemons like this:
|
||||
|
||||
|
|
@ -115,11 +115,11 @@ more low-powered computer as your online machine.
|
|||
# Litecoin:
|
||||
$ litecoin-cli help
|
||||
|
||||
> Warning: If you're using an existing Bitcoin or Litecoin installation, **move
|
||||
> your wallet.dat out of harm's way** before starting the daemon. The new
|
||||
> Warning: If you’re using an existing Bitcoin or Litecoin installation, **move
|
||||
> your wallet.dat out of harm’s way** before starting the daemon. The new
|
||||
> wallet now created will be used as your **tracking wallet**.
|
||||
|
||||
> If you're connected to the Internet, the daemon(s) will begin downloading and
|
||||
> If you’re connected to the Internet, the daemon(s) will begin downloading and
|
||||
> verifying the blockchain. This can take from several hours to several days
|
||||
> depending on the speed of your computer, the size of the blockchain(s) in
|
||||
> question and your Internet connection. You can speed up your initial block
|
||||
|
|
@ -137,4 +137,4 @@ more low-powered computer as your online machine.
|
|||
[bd]: https://bitcoin.org/bin/blockchain/
|
||||
[05]: Editing-the-user-path-in-Windows
|
||||
[abc]: https://download.bitcoinabc.org/
|
||||
[lc]: https://download.litecoin.org/litecoin-0.15.0.1rc1/
|
||||
[lc]: https://download.litecoin.org/litecoin-0.17.1/
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#### Perform the following steps on both your online and offline computers:
|
||||
|
||||
> Install required Debian/Ubuntu packages:
|
||||
Install required Debian/Ubuntu packages:
|
||||
|
||||
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libtool wipe
|
||||
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2
|
||||
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libpcre3-dev libtool wipe
|
||||
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2 python3-sha3
|
||||
|
||||
> Using the [pip3][P] installer, install the Python scrypt library (optional for Python >= v3.6):
|
||||
Using the [pip3][P] installer, install the Python scrypt library:
|
||||
|
||||
$ sudo -H pip3 install scrypt
|
||||
|
||||
> Install the secp256k1 library:
|
||||
Install the secp256k1 library:
|
||||
|
||||
$ git clone https://github.com/bitcoin-core/secp256k1.git
|
||||
$ cd secp256k1
|
||||
|
|
@ -20,18 +20,24 @@
|
|||
$ sudo ldconfig
|
||||
$ cd ..
|
||||
|
||||
> Install MMGen:
|
||||
Install MMGen:
|
||||
|
||||
$ git clone https://github.com/mmgen/mmgen.git
|
||||
$ cd mmgen
|
||||
$ git checkout stable_linux
|
||||
$ git checkout stable_linux # see 'Note' below
|
||||
$ sudo ./setup.py install
|
||||
$ cd ..
|
||||
|
||||
> Install the bitcoind daemon(s):
|
||||
**Note:** if you want to use features that have appeared since the latest
|
||||
`stable_linux` release, then you can omit the `git checkout` step and remain on
|
||||
the `master` branch. But though the tip of `master` is always tested on Linux
|
||||
before being pushed to the public repository, please be aware that security
|
||||
vulnerabilities are more likely to be present in new code than in a stable
|
||||
release. In addition, new code may require dependencies or installation steps
|
||||
not yet covered in the documentation.
|
||||
|
||||
> To install prebuilt binaries, go [here][01]. To install from source, go
|
||||
> [here][02].
|
||||
Install your coin daemon(s). To install prebuilt binaries, go [here][01]. To
|
||||
install from source, go [here][02].
|
||||
|
||||
#### *Note for offline machines:*
|
||||
|
||||
|
|
@ -41,17 +47,21 @@
|
|||
> install is done, preferably removing or disabling its network interfaces.
|
||||
|
||||
> However, if your machine is already offline and you wish to leave it that way,
|
||||
> or if it lacks a network interface entirely, then you'll need to take roughly
|
||||
> or if it lacks a network interface entirely, then you’ll need to take roughly
|
||||
> the following steps:
|
||||
|
||||
>> From your online machine, download the Debian/Ubuntu packages and their
|
||||
>> dependencies manually from packages.debian.org or packages.ubuntu.com, and
|
||||
>> the Python packages from pypi.python.org/pypi/<packagename>. Transfer
|
||||
>> these files and the cloned Git repositories to your offline computer using a
|
||||
>> USB stick or other storage medium. Install the Debian/Ubuntu packages with
|
||||
>> 'sudo dpkg -i', unpack each Python module and install it using 'sudo
|
||||
>> ./setup.py install', and install MMGen and the secp256k1 library from the
|
||||
>> copied Git repositories as described above.
|
||||
>> If your offline and offline machines have the same architecture, then just
|
||||
>> download the Debian/Ubuntu packages and their dependencies on your online
|
||||
>> machine using `apt-get download`. Otherwise, you must download the packages
|
||||
>> manually from `packages.debian.org` or `packages.ubuntu.com`.
|
||||
>>
|
||||
>> Download the Python packages using `pip3 download`.
|
||||
>>
|
||||
>> Transfer the downloaded files and cloned Git repositories to your offline
|
||||
>> computer using a USB stick or other removable medium. Install the
|
||||
>> Debian/Ubuntu packages with `sudo dpkg -i` and the Python packages with `pip3
|
||||
>> install`. Install MMGen and the secp256k1 library from the copied Git
|
||||
>> repositories as described above.
|
||||
|
||||
Congratulations, your installation is now complete! Now proceed to [**Getting
|
||||
Started with MMGen**][gs].
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ machine.
|
|||
|
||||
The bitcoin daemon on the **online computer** requires a complete and
|
||||
up-to-date blockchain for tracking addresses. Since its work is more CPU and
|
||||
disk intensive, a more powerful computer is required here. You'll also need
|
||||
plenty of free disk space for the growing blockchain (~220GB at the time of
|
||||
disk intensive, a more powerful computer is required here. You’ll also need
|
||||
plenty of free disk space for the growing blockchain (~265GB at the time of
|
||||
writing).
|
||||
|
||||
Two blockchain operations are especially resource-intensive: **synchronizing
|
||||
the blockchain** and **importing existing addresses with balances**. If you
|
||||
synchronize often (once a week, for example) and take care to import your
|
||||
addresses **before** spending into them, then it's possible to get by with a
|
||||
addresses **before** spending into them, then it’s possible to get by with a
|
||||
more low-powered computer as your online machine.
|
||||
|
||||
### <a name='a_d'>Download:</a>
|
||||
|
|
@ -74,7 +74,7 @@ more low-powered computer as your online machine.
|
|||
|
||||
> **Windows:**
|
||||
|
||||
>> In the Windows command-line environment processes don't fork to run in the
|
||||
>> In the Windows command-line environment processes don’t fork to run in the
|
||||
>> background, so to run multiple daemons simultaneously you must start each
|
||||
>> one in a separate terminal window. Start your daemons like this:
|
||||
|
||||
|
|
@ -115,11 +115,11 @@ more low-powered computer as your online machine.
|
|||
# Litecoin:
|
||||
$ litecoin-cli help
|
||||
|
||||
> Warning: If you're using an existing Bitcoin or Litecoin installation, **move
|
||||
> your wallet.dat out of harm's way** before starting the daemon. The new
|
||||
> Warning: If you’re using an existing Bitcoin or Litecoin installation, **move
|
||||
> your wallet.dat out of harm’s way** before starting the daemon. The new
|
||||
> wallet now created will be used as your **tracking wallet**.
|
||||
|
||||
> If you're connected to the Internet, the daemon(s) will begin downloading and
|
||||
> If you’re connected to the Internet, the daemon(s) will begin downloading and
|
||||
> verifying the blockchain. This can take from several hours to several days
|
||||
> depending on the speed of your computer, the size of the blockchain(s) in
|
||||
> question and your Internet connection. You can speed up your initial block
|
||||
|
|
@ -137,4 +137,4 @@ more low-powered computer as your online machine.
|
|||
[bd]: https://bitcoin.org/bin/blockchain/
|
||||
[05]: Editing-the-user-path-in-Windows
|
||||
[abc]: https://download.bitcoinabc.org/
|
||||
[lc]: https://download.litecoin.org/litecoin-0.15.0.1rc1/
|
||||
[lc]: https://download.litecoin.org/litecoin-0.17.1/
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ its use is deprecated. Installation instructions for MMGen under MinGW-64 and
|
|||
MSYS are archived [here][di] for historical interest only.*
|
||||
|
||||
Before you get started, just a reminder that MMGen must be installed on two
|
||||
computers, one online and one offline, to be used securely. All operations
|
||||
involving private data—wallet generation, address generation and transaction
|
||||
signing—are handled offline, while the online installation takes care of
|
||||
tracking balances and creating and sending transactions.
|
||||
computers, one online and one offline, if you want to use it securely. All
|
||||
operations involving private data—wallet generation, address generation and
|
||||
transaction signing—are handled offline, while the online installation takes
|
||||
care of tracking balances and creating and sending transactions.
|
||||
|
||||
This means that once you’ve finished the install process, the computer you’ve
|
||||
designated for offline use must be taken offline **permanently.** Furthermore,
|
||||
|
|
@ -49,6 +49,14 @@ text window, append a space followed by the text `C:\\msys64\usr\bin\bash.exe
|
|||
Save your changes and double click the icon to launch your MSYS2-enabled
|
||||
PowerShell. From now on, all your work will be done in this terminal.
|
||||
|
||||
Note that the root of your MSYS2 installation is located in `C:\\msys64`, so the
|
||||
following commands, for example:
|
||||
|
||||
$ ls /etc # the path as seen within MSYS2
|
||||
$ ls 'C:\\msys64\etc' # the path as seen by Windows
|
||||
|
||||
will produce a listing of the same directory.
|
||||
|
||||
### 3. Upgrade MSYS2
|
||||
|
||||
#### Online users:
|
||||
|
|
@ -131,8 +139,9 @@ PowerShell. From now on, all your work will be done in this terminal.
|
|||
$ pacman -Su
|
||||
|
||||
> When the process is finished, close your terminal window as requested and
|
||||
> reopen another one. Your mirror lists were overwritten by the upgrade
|
||||
> operation, so you must restore them from your modified versions.
|
||||
> reopen another one. Your mirror lists may have been overwritten by the
|
||||
> upgrade operation, in which case you should restore them from your modified
|
||||
> versions.
|
||||
|
||||
> Now reissue the `pacman -Sup` command, which will generate a much longer list
|
||||
> of URLs this time. Download and copy the listed files to the package cache
|
||||
|
|
@ -156,28 +165,38 @@ specifically required by MMGen.
|
|||
|
||||
Install the packages and their dependencies:
|
||||
|
||||
$ pacman -S tar git nano vim \
|
||||
$ pacman -S tar git nano vim autoconf automake-wrapper autogen \
|
||||
mingw64/mingw-w64-x86_64-libtool \
|
||||
mingw64/mingw-w64-x86_64-pcre \
|
||||
mingw64/mingw-w64-x86_64-make \
|
||||
mingw64/mingw-w64-x86_64-python3-cryptography \
|
||||
mingw64/mingw-w64-x86_64-python3-six \
|
||||
mingw64/mingw-w64-x86_64-python3-pexpect \
|
||||
mingw64/mingw-w64-x86_64-python3-gmpy2 \
|
||||
mingw64/mingw-w64-x86_64-libsodium \
|
||||
mingw64/mingw-w64-x86_64-python3-pynacl \
|
||||
mingw64/mingw-w64-x86_64-python3-pip
|
||||
mingw64/mingw-w64-x86_64-python3-pip \
|
||||
mingw64/mingw-w64-x86_64-gcc
|
||||
|
||||
### 5. Set your PATH environmental variable
|
||||
### 5. Set up your environment
|
||||
|
||||
Create the `/usr/local/bin` directory. This is where you’ll place various
|
||||
binaries required by MMGen:
|
||||
|
||||
$ mkdir -p /usr/local/bin # seen by Windows as C:\\msys64\usr\local\bin
|
||||
|
||||
Open your shell’s runtime configuration file in a text editor:
|
||||
|
||||
$ nano ~/.bashrc
|
||||
|
||||
Add the following line to the end of the file, save and exit:
|
||||
Add the following two lines to the end of the file, save and exit:
|
||||
|
||||
export PATH="/mingw64/bin:$PATH:/c/Program Files/Bitcoin/daemon:/c/Program Files/Litecoin/daemon:/c/Program Files/Bitcoin-abc/daemon"
|
||||
export PYTHONUTF8=1
|
||||
|
||||
Close and reopen the terminal window to update your working environment.
|
||||
|
||||
### 6. Install the remaining MMGen dependencies
|
||||
### 6. Install MMGen dependencies not provided by MSYS2
|
||||
|
||||
Three of MMGen’s Python dependencies, `ecdsa`, `py_ecc` and `mypy_extensions`,
|
||||
are not provided by MSYS2. If you’re online, you can install them using the pip
|
||||
|
|
@ -195,7 +214,69 @@ containing the files and install them as follows:
|
|||
|
||||
$ pip3 install --no-deps *.whl
|
||||
|
||||
### 7. Install MMGen
|
||||
### 7. Install the standalone scrypt package (required for strong password hashing)
|
||||
|
||||
Thanks to a faulty implementation of the `scrypt` function included in Python’s
|
||||
`hashlib`, the standalone `scrypt` module is required for stronger-than-default
|
||||
password hashing, i.e. hash presets greater than `3`. Installing the package is
|
||||
therefore highly recommended.
|
||||
|
||||
On your online machine, download the tar archive:
|
||||
|
||||
$ pip3 download --no-deps scrypt==0.8.13
|
||||
|
||||
On your offline machine, unpack and enter the archive:
|
||||
|
||||
$ tar fax scrypt-0.8.13.tar.gz
|
||||
$ cd scrypt-0.8.13
|
||||
|
||||
Open the file `setup.py` in your text editor. Right before the line beginning
|
||||
with:
|
||||
|
||||
scrypt_module = Extension(
|
||||
|
||||
add the following line (with no indentation):
|
||||
|
||||
includes = ['/mingw64/include']
|
||||
|
||||
Also change the line:
|
||||
|
||||
libraries = ['libcrypto_static']
|
||||
|
||||
to read:
|
||||
|
||||
libraries = ['libcrypto']
|
||||
|
||||
Save the file and exit the editor. Now build and install:
|
||||
|
||||
$ python3 setup.py build --compiler=mingw32
|
||||
$ python3 setup.py install
|
||||
|
||||
### 8. Install the secp256k1 library
|
||||
|
||||
On your online machine, clone the repository:
|
||||
|
||||
$ git clone https://github.com/bitcoin-core/secp256k1.git
|
||||
|
||||
If you’re doing an offline install, copy the cloned secp256k1 directory
|
||||
to your offline machine.
|
||||
|
||||
Enter the directory, configure, build and install:
|
||||
|
||||
$ cd secp256k1
|
||||
$ libtoolize
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
$ mingw32-make.exe install MAKE=mingw32-make LIBTOOL=$(which libtool)
|
||||
|
||||
### 9. Install the sdelete utility (required for secure wallet deletion)
|
||||
|
||||
Grab the latest SDelete [zip archive][sd], and unzip and copy `sdelete.exe` to
|
||||
`/usr/local/bin`. You must run the program once manually to accept the license
|
||||
agreement. Failing to do this will cause some scripts to hang, so you should do
|
||||
it now.
|
||||
|
||||
### 10. Install MMGen
|
||||
|
||||
Now you’re ready to install MMGen itself. On your online machine, clone the
|
||||
repository:
|
||||
|
|
@ -209,10 +290,19 @@ to your offline machine.
|
|||
Enter the directory and install:
|
||||
|
||||
$ cd mmgen
|
||||
$ git checkout stable_msys2
|
||||
$ git checkout stable_msys2 # See 'Note' below
|
||||
$ ./setup.py install
|
||||
|
||||
### 8. Install and launch your coin daemons
|
||||
**Note:** if you want to use features that have appeared since the latest
|
||||
`stable_msys2` release, then you can omit the `git checkout` step and remain on
|
||||
the `master` branch. But please be aware that security vulnerabilities are more
|
||||
likely to be present in new code than in a stable release. In addition, while
|
||||
the tip of `master` is always tested on Linux before being pushed to the public
|
||||
repository, it’s not guaranteed to install or run on MSYS2. Installation or
|
||||
runtime issues may also arise due to missing dependencies or installation steps
|
||||
not yet covered in the documentation.
|
||||
|
||||
### 11. Install and launch your coin daemons
|
||||
|
||||
At this point your MMGen installation will be able to generate wallets, along
|
||||
with keys and addresses for all supported coins. However, if you intend to do
|
||||
|
|
@ -229,10 +319,7 @@ offline machines.
|
|||
To transact ETH, ETC or ERC20 tokens you’ll need the latest Windows `parity.exe`
|
||||
binary from the [Parity Github repository][pg]. Parity, unlike the other coin
|
||||
daemons, needs to be installed on the online machine only. Copy the binary to
|
||||
your executable path, preferably `C:\\msys64\usr\local\bin`. If the target
|
||||
directory doesn’t exist yet, create it in your terminal like this:
|
||||
|
||||
$ mkdir -p /usr/local/bin
|
||||
your executable path, preferably `/usr/local/bin`.
|
||||
|
||||
Typically you’ll wish to launch Parity as follows:
|
||||
|
||||
|
|
@ -240,42 +327,25 @@ Typically you’ll wish to launch Parity as follows:
|
|||
|
||||
More information on Parity’s command-line options can be found [here][pl].
|
||||
|
||||
### 9. You’re done!
|
||||
### 12. You’re done!
|
||||
|
||||
Congratulations, your installation is now complete, and you can proceed to
|
||||
[**Getting Started with MMGen**][gs]. Before doing so, however, you might want
|
||||
to acquaint yourself with some caveats regarding running MMGen on
|
||||
Microsoft Windows:
|
||||
|
||||
+ [Autosigning][X] is not supported on Windows and is not likely to be in the
|
||||
future.
|
||||
+ [Monero wallet creation/syncing][M] support is also lacking due to password
|
||||
file descriptor issues with `monero-wallet-cli`.
|
||||
+ Due to unpredictable behavior of MSYS2's Python `getpass()` implementation,
|
||||
passwords containing non-ASCII characters should be entered using the
|
||||
`--echo-passphrase` option or via a password file. Otherwise, these
|
||||
symbols might end up being silently ignored.
|
||||
If you have an all-ASCII wallet password and wish to silence the annoying
|
||||
warning you’re getting before every password prompt, set `mswin_pw_warning`
|
||||
to `false` in `mmgen.cfg`.
|
||||
If you *really* don't want to have your passwords echoed, you may test whether
|
||||
`getpass()` is reading your non-ASCII input correctly by running the script
|
||||
`test/misc/password_entry.py`. If the script reads back the characters
|
||||
exactly as you entered them, then you’re probably safe and can go ahead and
|
||||
disable the warning.
|
||||
+ Though MSYS2 support is well tested and considered stable, it’s a new feature
|
||||
and other glitches might remain. If you think you've found a bug, don't
|
||||
hesistate to file an issue at <https://github.com/mmgen/mmgen/issues>.
|
||||
[**Getting Started with MMGen**][gs]. Note that all features supported by
|
||||
MMGen on Linux, except for [autosigning][ax], are now supported on MSYS2 too.
|
||||
Please be aware of the following, however:
|
||||
|
||||
+ Non-ASCII filenames cannot be used with the Monero wallet syncing tool. This
|
||||
appears to be an issue with the Monero wallet RPC daemon rather than MMGen.
|
||||
|
||||
[mh]: https://www.msys2.org
|
||||
[mp]: https://sourceforge.net/projects/msys2
|
||||
[mw]: https://github.com/msys2/msys2/wiki
|
||||
[ov]: https://github.com/mmgen/mmgen/releases/tag/v0.9.8
|
||||
[sd]: https://download.sysinternals.com/files/SDelete.zip
|
||||
[pg]: https://github.com/paritytech/parity-ethereum/releases
|
||||
[di]: Deprecated-MSWin-Installation
|
||||
[ib]: Install-Bitcoind
|
||||
[gs]: Getting-Started-with-MMGen
|
||||
[pg]: https://github.com/paritytech/parity-ethereum/releases
|
||||
[pl]: Altcoin-and-Forkcoin-Support#a_par
|
||||
[X]: autosign-[MMGen-command-help]
|
||||
[M]: Altcoin-and-Forkcoin-Support#a_xmr
|
||||
[ax]: autosign-[MMGen-command-help]
|
||||
[mc]: Altcoin-and-Forkcoin-Support#a_xmr
|
||||
|
|
|
|||
|
|
@ -26,18 +26,23 @@ MMGen uses Parity to communicate with the Ethereum blockchain. For information
|
|||
on installing Parity on your system, visit the Parity Ethereum [homepage][h] or
|
||||
[Git repository][g]. [MMGenLive][l] users can install Parity automatically from
|
||||
signed binaries using the [`mmlive-daemon-upgrade`][U] script. Parity is not
|
||||
used for transaction signing, so you needn't install it on your offline machine.
|
||||
used for transaction signing, so you needn’t install it on your offline machine.
|
||||
|
||||
Parity must be invoked with the `--jsonrpc-apis=all` option so that MMGen can
|
||||
communicate with it. If you're running the daemon and MMGen on different
|
||||
machines you'll also need the following:
|
||||
communicate with it. If you’re running the daemon and MMGen on different
|
||||
machines you’ll also need the following:
|
||||
|
||||
--jsonrpc-hosts=all --jsonrpc-interface=<IP of Parity's host>
|
||||
--jsonrpc-hosts=all --jsonrpc-interface=<IP of Parity’s host>
|
||||
|
||||
To transact Ethereum Classic, use `--chain=classic --jsonrpc-port=8555`
|
||||
|
||||
To run the daemon offline, use `--mode=offline`, otherwise `--mode=active`.
|
||||
|
||||
MMGen can also be used with Parity’s light client mode, which queries other
|
||||
nodes on the Ethereum network for blockchain data. Add the `--light` option to
|
||||
the Parity command line and read the applicable note in the [Transacting](#a_tx)
|
||||
section below.
|
||||
|
||||
You may require other options as well. Consult `parity --help` for the full
|
||||
list.
|
||||
|
||||
|
|
@ -62,13 +67,19 @@ will prevent pip from installing a lot of unneeded stuff:
|
|||
Basic operations with ETH, ETC and ERC20 tokens work as described in the
|
||||
[Getting Started][bo] guide, with some differences. Please note the following:
|
||||
|
||||
* Don't forget to invoke all commands with either `--coin=eth` or `--coin=etc`.
|
||||
* Don’t forget to invoke all commands with `--coin=eth` or `--coin=etc`.
|
||||
* Use the `--token` switch with all token operations. When importing addresses
|
||||
into your token tracking wallet you must use the token's address as the
|
||||
into your token tracking wallet you must use the token’s address as the
|
||||
argument. After this, the token symbol, e.g. `--token=eos`, is sufficient.
|
||||
* Addresses and other hexadecimal values are given without the leading `0x`.
|
||||
* Fees are expressed in Gas price, e.g. `12G` for 12 Gwei or `1000M` for 1000
|
||||
Mwei. This works both at the command line and interactive prompt.
|
||||
Mwei. This works at both the command line and interactive prompt.
|
||||
* When using Parity in light client mode, the `--cached-balances` option
|
||||
will greatly speed up operations of the `mmgen-txcreate`, `mmgen-txdo` and
|
||||
`mmgen-tool twview` commands by reducing network queries to a minimum. If
|
||||
your account balances have changed, they may be refreshed interactively within
|
||||
the TRACKED ACCOUNTS menu. Cached balances are stored persistently in your
|
||||
tracking wallet.
|
||||
|
||||
##### Transacting example:
|
||||
|
||||
|
|
@ -85,7 +96,7 @@ Create an EOS token tracking wallet and import the addresses into it:
|
|||
|
||||
*Unlike the case with BTC and derivatives, ETH and ETC tracking wallets are
|
||||
created and managed by MMGen itself and located under the MMGen data directory.
|
||||
Token tracking wallets are located inside their underlying coin's
|
||||
Token tracking wallets are located inside their underlying coin’s
|
||||
`tracking-wallet.json` file. Address (account) balances are retrieved directly
|
||||
from the blockchain. Tracking wallet views are separate for each token.*
|
||||
|
||||
|
|
@ -200,17 +211,17 @@ MMGen requires that the bitcoin-abc daemon be listening on non-standard
|
|||
`--usecashaddr=0` option.
|
||||
|
||||
Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
|
||||
commands. It's that simple!
|
||||
commands. It’s that simple!
|
||||
|
||||
### <a name='a_zec'>Key/address generation for Zcash (ZEC)</a>
|
||||
|
||||
MMGen's enhanced support for Zcash includes generation of **z-addresses.**
|
||||
MMGen’s enhanced support for Zcash includes generation of **z-addresses.**
|
||||
|
||||
Generate ten Zcash z-address key/address pairs from your default wallet:
|
||||
|
||||
$ mmgen-keygen --coin=zec --type=zcash_z 1-10
|
||||
|
||||
The addresses' view keys are included in the output file as well.
|
||||
The addresses’ view keys are included in the output file as well.
|
||||
|
||||
NOTE: Since your key/address file will probably be used on an online computer,
|
||||
you should encrypt it with a good password when prompted to do so. The file can
|
||||
|
|
@ -223,18 +234,22 @@ To generate Zcash t-addresses, just omit the `--type` argument:
|
|||
|
||||
### <a name='a_xmr'>Key/address generation and wallet creation/syncing for Monero (XMR)</a>
|
||||
|
||||
MMGen's enhanced support for Monero includes automated Monero wallet creation
|
||||
and syncing.
|
||||
Generate ten Monero key/address pairs from your default wallet:
|
||||
|
||||
$ mmgen-keygen --coin=xmr 1-10
|
||||
|
||||
MMGen’s enhanced support for Monero includes automated Monero wallet creation
|
||||
and syncing tools.
|
||||
|
||||
*Note that the use of these tools requires private data to be exposed on a
|
||||
network-connected machine in order to unlock the Monero wallets, which is a
|
||||
violation of MMGen’s security policy.*
|
||||
|
||||
Install the following dependencies:
|
||||
|
||||
$ sudo -H pip3 install pysha3
|
||||
$ sudo -H pip3 install ed25519ll # optional, but greatly speeds up address generation
|
||||
|
||||
Generate ten Monero address pairs from your default wallet:
|
||||
|
||||
$ mmgen-keygen --coin=xmr 1-10
|
||||
|
||||
In addition to spend and view keys, Monero key/address files also include a
|
||||
wallet password for each address (the password is the double SHA256 of the spend
|
||||
key, truncated to 16 bytes). This allows you to generate a wallet from each
|
||||
|
|
@ -244,7 +259,7 @@ key in the key/address file by running the following command:
|
|||
|
||||
and pasting in the key and password data when prompted. [Monerod][M] must be
|
||||
installed and running and `monero-wallet-cli` be located in your executable
|
||||
path.
|
||||
path. Launch monerod with the `--bg-mining-enable` switch.
|
||||
|
||||
To save your time and labor, the `mmgen-tool` utility includes a command that
|
||||
completely automates this process:
|
||||
|
|
@ -254,7 +269,7 @@ completely automates this process:
|
|||
This will generate a uniquely-named Monero wallet for each key/address pair in
|
||||
the key/address file and encrypt it with its respective password. No user
|
||||
interaction is required. By default, wallets are synced to the current block
|
||||
height, as they're assumed to be empty, but this behavior can be overridden:
|
||||
height, as they’re assumed to be empty, but this behavior can be overridden:
|
||||
|
||||
$ mmgen-tool keyaddrlist2monerowallets *XMR*.akeys.mmenc blockheight=123456
|
||||
|
||||
|
|
@ -268,7 +283,7 @@ have a large batch of wallets requiring long sync times.
|
|||
|
||||
### <a name='a_kg'>Key/address generation support for 144 Bitcoin-derived altcoins</a>
|
||||
|
||||
To generate key/address pairs for these coins, just specify the coin's symbol
|
||||
To generate key/address pairs for these coins, just specify the coin’s symbol
|
||||
with the `--coin` argument:
|
||||
|
||||
# For DASH:
|
||||
|
|
@ -280,13 +295,13 @@ For compressed public keys, add the `--type=compressed` option:
|
|||
|
||||
$ mmgen-keygen --coin=dash --type=compressed 1-10
|
||||
|
||||
If it's just the addresses you want, then use `mmgen-addrgen` instead:
|
||||
If it’s just the addresses you want, then use `mmgen-addrgen` instead:
|
||||
|
||||
$ mmgen-addrgen --coin=dash 1-10
|
||||
$ mmgen-addrgen --coin=dash --type=compressed 1-10
|
||||
|
||||
Regarding encryption of key/address files, see the note for Zcash above.
|
||||
|
||||
Here's a complete list of supported altcoins as of this writing:
|
||||
Here’s a complete list of supported altcoins as of this writing:
|
||||
|
||||
2give,42,611,ac,acoin,alf,anc,apex,arco,arg,aur,bcf,blk,bmc,bqc,bsty,btcd,
|
||||
btq,bucks,cann,cash,cat,cbx,ccn,cdn,chc,clam,con,cpc,crps,csh,dash,dcr,dfc,
|
||||
|
|
@ -298,10 +313,10 @@ Here's a complete list of supported altcoins as of this writing:
|
|||
sys,taj,tit,tpc,trc,ttc,tx,uno,via,vpn,vtc,wash,wdc,wisc,wkc,wsx,xcn,xgb,
|
||||
xmg,xpm,xpoke,xred,xst,xvc,zet,zlq,zoom,zrc,bch,etc,eth,ltc,xmr,zec
|
||||
|
||||
Note that support for these coins is EXPERIMENTAL. Many of them have received
|
||||
only minimal testing, or no testing at all. At startup you'll be informed of
|
||||
the level of your selected coin's support reliability as deemed by the MMGen
|
||||
Project.
|
||||
Note that support for most of these coins is EXPERIMENTAL. Many of them have
|
||||
received only minimal testing, or no testing at all. At startup you’ll be
|
||||
informed of the level of your selected coin’s support reliability as deemed by
|
||||
the MMGen Project.
|
||||
|
||||
[h]: https://www.parity.io/ethereum
|
||||
[g]: https://github.com/paritytech/parity-ethereum/releases
|
||||
|
|
|
|||
|
|
@ -17,15 +17,19 @@
|
|||
#### [Additional Features](#a_af)
|
||||
* [Using the mnemonic, seed and hexseed formats](#a_ms)
|
||||
* [Mnemonics, seeds and hexseeds: additional information](#a_ai)
|
||||
* [Die roll wallet generation](#a_dr)
|
||||
* [BIP39 mnemonic support](#a_39)
|
||||
* [Monero mnemonic support](#a_mm)
|
||||
* [Incognito wallets](#a_ic)
|
||||
* [Hidden incognito wallets](#a_hi)
|
||||
|
||||
#### [Advanced Topics](#a_at)
|
||||
* [Hot wallets and key-address files](#a_hw)
|
||||
* [Hot wallets](#a_hw)
|
||||
* [Transaction Fees](#a_fee)
|
||||
* [BIP 125 replace-by-fee (RBF) transactions](#a_rbf)
|
||||
* [With an online (hot) wallet](#a_rbf_onl)
|
||||
* [With an offline (cold storage) wallet](#a_rbf_onf)
|
||||
* [Keeping your installation up to date](#a_utd)
|
||||
|
||||
### <a name='a_i'>Preliminaries</a>
|
||||
|
||||
|
|
@ -33,8 +37,8 @@
|
|||
|
||||
Before you begin, note that the filenames, seed IDs and Bitcoin addresses used
|
||||
in this primer are intentionally invalid and are for purposes of illustration
|
||||
only. As you perform the exercises, you'll naturally substitute real ones in
|
||||
their place.
|
||||
only. As you perform the exercises, you will substitute real ones in their
|
||||
place.
|
||||
|
||||
The up arrow (for repeating commands) and tab key (or Ctrl-I) (for completing
|
||||
commands and filenames) will speed up your work at the command line greatly.
|
||||
|
|
@ -42,8 +46,8 @@ commands and filenames) will speed up your work at the command line greatly.
|
|||
#### <a name='a_iv'>Invocation</a>
|
||||
|
||||
The MMGen wallet system is not a single program but a suite of lightweight
|
||||
commands run from the command line. MMGen's commands all begin, not
|
||||
surprisingly, with 'mmgen'. To see a list of available commands, type 'mmgen'
|
||||
commands run from the command line. MMGen’s commands all begin, not
|
||||
surprisingly, with `mmgen`. To see a list of available commands, type `mmgen`
|
||||
followed by the TAB key. Every mmgen command has a help screen displaying
|
||||
detailed usage and options information. To view it, type the command name
|
||||
followed by `--help`. Note that most command options have long and short
|
||||
|
|
@ -58,7 +62,7 @@ essential information. These options are available for all MMGen commands. The
|
|||
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
|
||||
instance, which takes a parameter of `128`, `192` or `256`. Commands may also
|
||||
take optional or required arguments. For example, `mmgen-addrgen` requires an
|
||||
address or range of addresses as an argument. Arguments must always follow
|
||||
options on the command line.
|
||||
|
|
@ -73,36 +77,36 @@ Sample MMGen command invocations:
|
|||
#### <a name='a_cf'>Configuration file</a>
|
||||
|
||||
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
|
||||
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 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.
|
||||
|
||||
#### <a name='a_ts'>Bob and Alice regtest mode</a>
|
||||
|
||||
If you just want to quickly try out MMGen, it's possible to perform all wallet
|
||||
If you just want to quickly try out MMGen, it’s possible to perform all wallet
|
||||
generation, wallet format conversion, address and key generation, and address
|
||||
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 coins to play
|
||||
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** creates a virtual
|
||||
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
|
||||
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.
|
||||
Start with Regtest Mode][04] before continuing on.
|
||||
|
||||
### <a name='a_bo'>Basic Operations</a>
|
||||
|
||||
#### <a name='a_gw'>Generate an MMGen wallet (offline computer)</a>
|
||||
|
||||
*NOTE: MMGen supports a “default wallet” feature. After generating your wallet,
|
||||
you'll be prompted to make it your default. If you answer 'y', the wallet will
|
||||
you’ll be prompted to make it your default. If you answer ‘y’, the wallet will
|
||||
be stored in your MMGen data directory and used for all future commands that
|
||||
require a wallet or other seed source.*
|
||||
|
||||
|
|
@ -111,7 +115,7 @@ location other than your MMGen data directory. Otherwise, it’s recommended,
|
|||
as it frees you from having to type your wallet filename on the command line.*
|
||||
|
||||
*The following examples suppose that you’ve chosen to use a default wallet.
|
||||
If you haven't, then you must include the path to a wallet file or other seed
|
||||
If you haven’t, then you must include the path to a wallet file or other seed
|
||||
source in all commands where a seed source is required.*
|
||||
|
||||
On your offline computer, generate an MMGen wallet:
|
||||
|
|
@ -120,15 +124,15 @@ On your offline computer, generate an MMGen wallet:
|
|||
...
|
||||
MMGen wallet written to file '/home/username/.mmgen/89ABCDEF-76543210[256,3].mmdat'
|
||||
|
||||
‘89ABCDEF’ is the Seed ID; ‘76543210’ is the Key ID. These are randomly
|
||||
`89ABCDEF` is the Seed ID; `76543210` is the Key ID. These are randomly
|
||||
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. Since it's your wallet's primary identifier, you should
|
||||
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.
|
||||
preset are changed and doesn’t need to be memorized.
|
||||
|
||||
‘256’ is the seed length; ‘3’ is the scrypt hash preset. These values are
|
||||
`256` is the seed length; `3` is the scrypt hash preset. These values are
|
||||
configurable: type `mmgen-walletgen --help` for details.
|
||||
|
||||
Before moving any funds into your MMGen wallet, you should back it up in several
|
||||
|
|
@ -143,9 +147,9 @@ printed out on paper.
|
|||
|
||||
Another highly recommended way to back up your wallet is to generate a mnemonic
|
||||
or seed file [as described below](#a_ms) and memorize it. If you have an
|
||||
average or better memory, you'll find memorizing your mnemonic to be
|
||||
average or better memory, you’ll find memorizing your mnemonic to be
|
||||
surprisingly easy. And the peace of mind that comes with knowing that your coins
|
||||
are recoverable **even if you lose all your physical backups** can't be
|
||||
are recoverable **even if you lose all your physical backups** can’t be
|
||||
overestimated.
|
||||
|
||||
#### <a name='a_ga'>Generate addresses (offline computer)</a>
|
||||
|
|
@ -170,12 +174,12 @@ Now generate ten Segwit-P2SH addresses with your just-created wallet:
|
|||
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
|
||||
}
|
||||
|
||||
Note that the address range ‘1-10’ specified on the command line is included in
|
||||
Note that the address range `1-10` specified on the command line is included in
|
||||
the resulting filename.
|
||||
|
||||
MMGen currently supports four Bitcoin address types: ‘legacy’ (uncompressed
|
||||
P2PKH), ‘compressed’ (compressed P2PKH), ‘segwit’ (P2SH-P2WPKH) and ‘bech32’
|
||||
(native Segwit), denoted by the code letters ‘L’, ‘C’, ‘S’ and ‘B’ respectively.
|
||||
MMGen currently supports four Bitcoin address types: `legacy` (uncompressed
|
||||
P2PKH), `compressed` (compressed P2PKH), `segwit` (P2SH-P2WPKH) and `bech32`
|
||||
(native Segwit), denoted by the code letters `L`, `C`, `S` and `B` respectively.
|
||||
Address types can be referred to either in full or by code letter. To generate
|
||||
Bech32 addresses, for example, you can specify either `--type=bech32` or
|
||||
`--type=B` on the command line.
|
||||
|
|
@ -183,8 +187,8 @@ Bech32 addresses, for example, you can specify either `--type=bech32` or
|
|||
For backwards compatibility, legacy addresses are generated by default, but this
|
||||
is probably not what you want unless you have a very old MMGen installation
|
||||
created before compressed address support was added. Most new users will wish
|
||||
to generate either Segwit-P2SH (‘S’) or Bech32 (‘B’) addresses instead. For
|
||||
BCH, which lacks Segwit support, compressed (‘C’) addresses are the best choice.
|
||||
to generate either Segwit-P2SH (`S`) or Bech32 (`B`) addresses instead. For
|
||||
BCH, which lacks Segwit support, compressed (`C`) addresses are the best choice.
|
||||
|
||||
Generation examples for various address types:
|
||||
|
||||
|
|
@ -218,7 +222,7 @@ 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 you’d specify an address range of
|
||||
‘1-100’.
|
||||
`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
|
||||
|
|
@ -250,7 +254,7 @@ adding labels to the addresses you’ve chosen to spend to:
|
|||
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
|
||||
}
|
||||
|
||||
Any line beginning with ‘#’ is a comment. Comments may be placed at the ends
|
||||
Any line beginning with `#` is a comment. Comments may be placed at the ends
|
||||
of lines as well.
|
||||
|
||||
Save the file, copy it onto a USB stick and transfer it to your online computer.
|
||||
|
|
@ -258,8 +262,8 @@ Save the file, copy it onto a USB stick and transfer it to your online computer.
|
|||
#### <a name='a_ia'>Import addresses (online computer)</a>
|
||||
|
||||
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'; this you’ll use as your tracking wallet. Import
|
||||
existing `wallet.dat` file out of harm’s way. Start bitcoind and let it
|
||||
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
|
||||
|
|
@ -287,10 +291,10 @@ 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 a Seed ID,
|
||||
address type code letter, and index. Addresses of different types may be
|
||||
imported into the same tracking wallet, and since they're generated from different
|
||||
sub-seeds you needn't worry about key reuse. For example, the addresses
|
||||
imported into the same tracking wallet, and since they’re generated from different
|
||||
sub-seeds you needn’t worry about key reuse. For example, the addresses
|
||||
`89ABCDEF:S:1` and `89ABCDEF:B:1` are cryptographically distinct: no one but the
|
||||
wallet's owner can see that they were generated from the same seed.
|
||||
wallet’s owner can see that they were generated from the same seed.
|
||||
|
||||
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
|
||||
|
|
@ -310,36 +314,36 @@ have confirmed:
|
|||
Now that you have some BTC under MMGen’s control, you’re ready to create a
|
||||
transaction. Note that transactions are harmless until they’re signed and
|
||||
broadcast to the network, so feel free to experiment and create transactions
|
||||
with different combinations of inputs and outputs. Of course, if you're using
|
||||
with different combinations of inputs and outputs. Of course, if you’re using
|
||||
testnet or regtest mode, then you risk nothing even when broadcasting
|
||||
transactions.
|
||||
|
||||
To send 0.1 BTC to the a third-party address 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,
|
||||
for example, and send the change back to yourself at address 89ABCDEF:S:5, you’d
|
||||
issue the following command:
|
||||
To send 0.1 BTC to the a third-party address
|
||||
`3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc`, for example, and send the change back to
|
||||
yourself at address `89ABCDEF:S:5`, you’d issue the following command:
|
||||
|
||||
$ mmgen-txcreate 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5
|
||||
|
||||
'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as arguments.
|
||||
`mmgen-txcreate` accepts either MMGen IDs or Bitcoin addresses as arguments.
|
||||
|
||||
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.
|
||||
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:
|
||||
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:
|
||||
|
||||
$ mmgen-txcreate 89ABCDEF:S:6,0.1 89ABCDEF:S:7,0.1 89ABCDEF:S:8
|
||||
|
||||
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, 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.
|
||||
|
||||
Upon invocation, the 'mmgen-txcreate' command shows you a list of your
|
||||
Upon invocation, the `mmgen-txcreate` command shows you a list of your
|
||||
unspent outputs along with a menu allowing you to sort the outputs by four
|
||||
criteria: transaction ID, address, amount and transaction age. Your overall
|
||||
balance in BTC appears at the top of the screen. In our example, the display
|
||||
|
|
@ -356,7 +360,7 @@ will look something like this:
|
|||
Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen
|
||||
'q'=quit view, 'p'=print to file, 'v'=pager view, 'w'=wide view, 'l'=add label:
|
||||
|
||||
After quitting the menu with 'q', you’ll see the following prompt:
|
||||
After quitting the menu with ‘q’, you’ll see the following prompt:
|
||||
|
||||
Enter a range or space-separated list of outputs to spend:
|
||||
|
||||
|
|
@ -383,12 +387,12 @@ using your default wallet:
|
|||
...
|
||||
Signed transaction written to file 'FEDCBA[0.1].sigtx'
|
||||
|
||||
Note that the signed transaction file has a new extension, '.sigtx'.
|
||||
Note that the signed transaction file has a new extension, `.sigtx`.
|
||||
|
||||
#### <a name='a_st'>Send a transaction (online computer)</a>
|
||||
|
||||
Now you’re ready for the final step: broadcasting the transaction to the
|
||||
network. Start bitcoind if it's not already running, and make sure your
|
||||
network. Start bitcoind if it’s not already running, and make sure your
|
||||
blockchain is fully synced. Then copy the signed transaction file to your
|
||||
online computer and issue the command:
|
||||
|
||||
|
|
@ -396,9 +400,9 @@ online computer and issue the command:
|
|||
...
|
||||
Transaction sent: abcd1234....
|
||||
|
||||
Like all MMGen commands, 'mmgen-txsend' is interactive, so you’ll be prompted
|
||||
Like all MMGen commands, `mmgen-txsend` is interactive, so you’ll be prompted
|
||||
before the transaction is actually broadcast. If the send was successful, a
|
||||
64-character hexadecimal Bitcoin Transaction ID will be displayed ('abcd1234...'
|
||||
64-character hexadecimal Bitcoin Transaction ID will be displayed (`abcd1234...`
|
||||
in our case).
|
||||
|
||||
Once the transaction is broadcast to the network and confirmed, your address
|
||||
|
|
@ -437,11 +441,11 @@ Using your default wallet from the exercises above, generate a mnemonic:
|
|||
Since our seed is 256 bits long, the mnemonic contains 24 words. 128-bit and
|
||||
192-bit seeds generate shorter mnemonics of 12 and 18 words, respectively.
|
||||
Wallets with these seed lengths can be generated using the `--seed-len` option
|
||||
to 'mmgen-walletgen'.
|
||||
to `mmgen-walletgen`.
|
||||
|
||||
Though some consider 128 bits of entropy to provide adequate security for the
|
||||
foreseeable future, it’s advisable to stick to the default 256-bit seed length.
|
||||
You'll find that even a 24-word mnemonic is not difficult to memorize.
|
||||
You’ll find that even a 24-word mnemonic is not difficult to memorize.
|
||||
|
||||
NOTE: MMGen mnemonics are generated from the Electrum wordlist, but using
|
||||
ordinary base conversion instead of Electrum’s more complicated algorithm.
|
||||
|
|
@ -470,7 +474,7 @@ Note that the regenerated wallet has a different Key ID but of course the same
|
|||
Seed ID.
|
||||
|
||||
An alternative to mnemonics, seed files provide yet another way of representing
|
||||
your seed. They bear the extension '.mmseed' and are generated exactly the same
|
||||
your seed. They bear the extension `.mmseed` and are generated exactly the same
|
||||
way as mnemonic files:
|
||||
|
||||
$ mmgen-walletconv -o seed
|
||||
|
|
@ -500,14 +504,14 @@ a simple Unix shell command:
|
|||
$ echo -n XnyC NfPH piuW dQ2d nM47 VU | tr -d ' '| sha256sum | cut -c 1-6
|
||||
0fe02f
|
||||
|
||||
Or you can do the same thing with 'mmgen-tool':
|
||||
Or you can do the same thing with `mmgen-tool`:
|
||||
|
||||
$ mmgen-tool str2id6 'XnyC NfPH piuW dQ2d nM47 VU'
|
||||
0fe02f
|
||||
|
||||
Beginning with version 0.9.0, MMGen also supports seed files in hexadecimal
|
||||
(hexseed) format. Hexseed files are identical to seed files but encoded in
|
||||
hexadecimal rather than base 58. They bear the extension '.mmhex':
|
||||
hexadecimal rather than base 58. They bear the extension `.mmhex`:
|
||||
|
||||
$ cat FE3C6545.mmhex
|
||||
afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e
|
||||
|
|
@ -525,8 +529,10 @@ tutorial][03].
|
|||
#### <a name='a_ai'>Mnemonics, seeds and hexseeds: additional information</a>
|
||||
|
||||
All MMGen commands that take mnemonic, seed or hexseed data may receive the data
|
||||
from a prompt instead of a file. Just omit the file name and specify the input
|
||||
format:
|
||||
interactively from the user instead of from a file. This feature allows you to
|
||||
store your seed entirely in your head if you wish and never record it on a
|
||||
physical medium. To input your seed data at the prompt, just specify an input
|
||||
format instead of a file name:
|
||||
|
||||
$ mmgen-addrgen -i words 1-10
|
||||
...
|
||||
|
|
@ -535,25 +541,71 @@ format:
|
|||
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.
|
||||
Here MMGen prompts you interactively for each word of the seed phrase, checking
|
||||
it for validity and reprompting if necessary. The words are not displayed on
|
||||
the screen.
|
||||
|
||||
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, 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.
|
||||
As a safeguard against over-the-shoulder, Tempest and other side-channel
|
||||
attacks, MMGen never outputs secret data to the screen, unless you ask it to
|
||||
with the `--stdout` or `-S` option. When using this option, you’ll still be
|
||||
prompted before the secret data is actually displayed. This safety prompt is
|
||||
overridden by the `--quiet` option, however, so you must always think twice
|
||||
before using `--stdout`.
|
||||
|
||||
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 secret data remains once your computer’s been
|
||||
using the `--outdir` or `-d` option. For example, on a Linux system you can use
|
||||
`--outdir=/dev/shm` to write keys and seeds to volatile memory instead of disk,
|
||||
ensuring that no trace of your secret data remains once your computer’s been
|
||||
powered down.
|
||||
|
||||
#### <a name='a_dr'>Die roll wallet generation</a>
|
||||
|
||||
Interactive dieroll wallet generation works just like the interactive mnemonic
|
||||
input described in the preceding section. To generate a new dieroll wallet,
|
||||
type:
|
||||
|
||||
$ mmgen-walletconv -i dieroll
|
||||
|
||||
To save the wallet in a format of your choice, use the `-o` option:
|
||||
|
||||
$ mmgen-walletconv -i dieroll -o bip39
|
||||
|
||||
50, 75 and 100 rolls of the die are required to create 128, 192 and 256-bit
|
||||
seeds, respectively.
|
||||
|
||||
#### <a name='a_39'>BIP39 support</a>
|
||||
|
||||
BIP39 mnemonic support and usage is identical to that for native MMGen mnemonics
|
||||
described above. Just use the `bip39` format specifier and extension instead of
|
||||
`words`.
|
||||
|
||||
Convert an MMGen native mnemonic wallet to BIP39:
|
||||
|
||||
$ mmgen-walletconv -o bip39 mywallet.words
|
||||
|
||||
Restore an MMGen wallet from a BIP39 seed phrase in a file:
|
||||
|
||||
$ mmgen-walletconv seed.bip39
|
||||
|
||||
#### <a name='a_mm'>Monero mnemonic support</a>
|
||||
|
||||
MMGen has limited support for Monero new-style mnemonics. While they can’t be
|
||||
used as wallets, they’re supported as a password format by the `mmgen-passgen`
|
||||
command and can be converted to and from hex data by the `mmgen-tool` mnemonic
|
||||
commands. The format specifier and extension is `xmrseed`. Only 25-word
|
||||
mnemonics (256-bit keys) are supported. Key data is reduced in accordance with
|
||||
the Monero protocol before conversion, so the resulting mnemonics are guaranteed
|
||||
to be canonical.
|
||||
|
||||
Generate a random Monero seed phrase:
|
||||
|
||||
$ mmgen-tool mn_rand256 fmt=xmrseed
|
||||
|
||||
Generate a list of passwords in Monero mnemonic format with ID 'foo' from your
|
||||
default wallet:
|
||||
|
||||
$ mmgen-passgen -f xmrseed 'foo' 1-10
|
||||
|
||||
#### <a name='a_ic'>Incognito wallets</a>
|
||||
|
||||
An incognito format wallet is indistinguishable from random data, allowing you
|
||||
|
|
@ -570,7 +622,7 @@ wallet hidden there.
|
|||
|
||||
If you plan to store your incognito wallet in an insecure location such as cloud
|
||||
storage, you’re advised to use a strong scrypt (hash) preset and a strong
|
||||
password. These can be changed using the 'mmgen-passchg' utility:
|
||||
password. These can be changed using the `mmgen-passchg` utility:
|
||||
|
||||
$ mmgen-passchg -p 5 89ABCDEF-01234567[256,3].mmdat
|
||||
...
|
||||
|
|
@ -583,7 +635,7 @@ password. These can be changed using the 'mmgen-passchg' utility:
|
|||
MMGen wallet written to file '89ABCDEF-87654321[256,5].mmdat'
|
||||
|
||||
The scrypt preset is the numeral in the wallet filename following the seed
|
||||
length. As you can see, it’s now changed to '5'. Now export your new toughened
|
||||
length. As you can see, it’s now changed to `5`. Now export your new toughened
|
||||
wallet to incognito format, using the `-k` option to leave the passphrase
|
||||
unchanged:
|
||||
|
||||
|
|
@ -637,7 +689,7 @@ MMGen wallet, mnemonic or seed file to generate addresses and sign transactions:
|
|||
With the `-o hincog` option, incognito wallet data can be created and hidden at
|
||||
a specified offset in a file or partition in a single convenient operation, with
|
||||
the random file being created automatically if necessary. Here’s how you’d
|
||||
create a 1GB file 'random.dat' and hide a wallet in it at offset 123456789:
|
||||
create a 1GB file `random.dat` and hide a wallet in it at offset `123456789`:
|
||||
|
||||
$ mmgen-walletconv -k -o hincog -J random.dat,123456789 89ABCDEF-87654321[256,5].mmdat
|
||||
...
|
||||
|
|
@ -649,8 +701,8 @@ create a 1GB file 'random.dat' and hide a wallet in it at offset 123456789:
|
|||
Data written to file 'random.dat' at offset 123456789
|
||||
|
||||
Your ‘random’ file can now be uploaded to a cloud storage service, for example,
|
||||
or some other location on the Net, preferably non-public one (in a real-life
|
||||
situation you will choose a less obvious offset than '123456789' though, won’t
|
||||
or some other, preferably non-public, location on the Internet (in a real-life
|
||||
situation you will choose a less obvious offset than `123456789` though, won’t
|
||||
you?).
|
||||
|
||||
Now let’s say at some point in the future you download this file to recover
|
||||
|
|
@ -679,75 +731,83 @@ Transaction signing uses the same syntax:
|
|||
|
||||
### <a name='a_at'>Advanced Topics</a>
|
||||
|
||||
#### <a name='a_hw'>Hot wallets and key-address files</a>
|
||||
#### <a name='a_hw'>Hot wallets</a>
|
||||
|
||||
Chances are you'll want to use MMGen not only for cold storage but for
|
||||
day-to-day transactions too. For this you'll need to place a portion of your
|
||||
funds in a “hot wallet” on your online computer. With hot wallet funds you
|
||||
can use the command `mmgen-txdo` to quickly create, sign and send transactions
|
||||
in one operation.
|
||||
Chances are you’ll want to use MMGen not only for cold storage but for
|
||||
day-to-day transactions too. For this you’ll need to place a portion of your
|
||||
funds in a “hot wallet” on your online computer. With a hot wallet you can use
|
||||
the command `mmgen-txdo` to quickly create, sign and send transactions in one
|
||||
operation.
|
||||
|
||||
There are two hot wallet strategies you can use. The first is to generate a
|
||||
separate MMGen wallet on your online computer for use as the hot wallet. The
|
||||
advantage of this is convenience: you won't have to specify a wallet or seed
|
||||
source on the command line. In addition, your hot wallet and cold wallet funds
|
||||
will be easily distinguishable in your tracking wallet by their different Seed
|
||||
IDs. The drawback of this strategy is that you now have two seeds that need
|
||||
backing up or memorizing.
|
||||
*Note: prior to Version 0.11.0, MMGen implemented hot wallets using [key-address
|
||||
files][05], but these have now been obsoleted by [subwallets][06]. Information
|
||||
on key-address files is archived [here][05] for the benefit of legacy
|
||||
installations only.*
|
||||
|
||||
The other strategy, which avoids this drawback, is to partition your cold wallet
|
||||
by mentally setting aside “hot” and “cold” address ranges. For example, you
|
||||
might choose to reserve all addresses in the range 1-1000 for cold storage and
|
||||
everything above that for your hot wallet.
|
||||
*Additional note: instead of using a hot wallet, you might consider setting up
|
||||
[transaction autosigning][07] on your offline machine. Autosigning makes it
|
||||
possible to transact directly from cold storage in a secure and convenient way.
|
||||
Autosigning is available for Linux-based systems only and works best with
|
||||
Raspberry Pi and similar devices, for which LED support is provided.*
|
||||
|
||||
The next step is to create a key-address file for a sufficient number of “hot”
|
||||
addresses to cover your day-to-day transaction needs for the foreseeable future.
|
||||
A key-address file is just like an address file except that it contains keys as
|
||||
well as addresses, thus functioning as a hot wallet for a range of addresses.
|
||||
Assuming your hot address range begins at 1001, you could start by creating a
|
||||
key-address file for a hundred hot addresses like this:
|
||||
Setting up a hot wallet is easy. Using the [Subwallets][06] wiki page as your
|
||||
guide, generate a subwallet on your offline machine for use as a hot wallet.
|
||||
Since this wallet is going to be used in an online environment, make sure it’s
|
||||
protected with a strong password and hash preset.
|
||||
|
||||
$ mmgen-keygen --type=segwit 1001-1100
|
||||
$ mmgen-subwalletgen -p5 1L
|
||||
...
|
||||
Secret keys written to file '89ABCDEF-S[1001-1100].akeys.mmenc'
|
||||
MMGen wallet written to file 'FC9A8735-ABCDEF00[256,5].mmdat'
|
||||
|
||||
`mmgen-keygen` prompts you for a password to encrypt the key-address file with.
|
||||
This is a wise precaution, as it provides at least some security for keys that
|
||||
will be stored on an online machine.
|
||||
Copy the subwallet to a USB stick or other removable device.
|
||||
|
||||
Now copy the key-address file to your online machine and import the addresses
|
||||
into your tracking wallet:
|
||||
Now on your online computer, check your MMGen data directory for the presence of
|
||||
wallet files:
|
||||
|
||||
$ mmgen-addrimport --batch --keyaddr-file '89ABCDEF-S[1001-1100].akeys.mmenc'
|
||||
$ ls $HOME/.mmgen/*.mmdat
|
||||
|
||||
After funding your hot wallet by spending into some addresses in this range you
|
||||
can do quickie transactions with these funds using the `mmgen-txdo` command:
|
||||
If any are present (there shouldn’t be if you’ve been following this guide!),
|
||||
move them out of harm’s way, or copy them to a backup location and securely
|
||||
delete the originals with `wipe` or `sdelete` if they’re securing any funds.
|
||||
|
||||
$ mmgen-txdo -M '89ABCDEF-S[1001-1100].akeys.mmenc' 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:1010
|
||||
Copy the subwallet file to your MMGen data directory, making it your default
|
||||
wallet for the online machine:
|
||||
|
||||
$ cp 'FC9A8735-ABCDEF00[256,5].mmdat' $HOME/.mmgen
|
||||
|
||||
Securely delete the original file.
|
||||
|
||||
Generate a range of addresses with your online default wallet/subwallet and
|
||||
import them into your tracking wallet:
|
||||
|
||||
$ mmgen-addrgen --type=bech32 1-10
|
||||
$ mmgen-addrimport FC9A8735-B*.addrs
|
||||
|
||||
Send some coins to an address or addresses in this range using your method of
|
||||
choice.
|
||||
|
||||
Now you can spend from these addresses using `mmgen-txdo`, creating, signing
|
||||
and sending transactions in one operation:
|
||||
|
||||
$ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 FC9A8735:S:2
|
||||
(choose an input from wallet FC9A8735)
|
||||
...
|
||||
Transaction sent: dcea1357....
|
||||
|
||||
The `--mmgen-keys-from-file` or `-M` option is required when using a key-address
|
||||
file in place of a default wallet. Note that your change address
|
||||
89ABCDEF:S:1010 is within the range covered by the key-address file, so your
|
||||
change funds will remain “hot spendable”.
|
||||
|
||||
Using `mmgen-txdo` with a default online hot wallet is even simpler. For a hot
|
||||
wallet with Seed ID 0FDE89AB, for instance, creating and sending a transaction
|
||||
would look like this:
|
||||
|
||||
$ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:10
|
||||
Transaction sent: abcd1234....
|
||||
|
||||
Bear in mind that your subwallet/online default wallet doesn’t require a backup,
|
||||
as it can always be regenerated from its offline parent. If you ever wish to
|
||||
delete it, however, you should do so securely if there are still funds under its
|
||||
control.
|
||||
|
||||
#### <a name='a_fee'>Transaction Fees</a>
|
||||
|
||||
MMGen gives you several options for dealing with transaction fees.
|
||||
|
||||
Firstly, and most simply, you may do nothing, in which case MMGen will calculate
|
||||
the fee automatically using bitcoind’s 'estimatefee' RPC call. You can adjust
|
||||
the fee automatically using bitcoind’s `estimatefee` RPC call. You can adjust
|
||||
the estimated fee by any factor using the `--tx-fee-adj` option, a handy feature
|
||||
when you need transactions to confirm a bit more quickly. MMGen has no default
|
||||
fee, so if network fee estimation fails for any reason, you'll be prompted to
|
||||
fee, so if network fee estimation fails for any reason, you’ll be prompted to
|
||||
enter the fee manually.
|
||||
|
||||
Secondly, you may specify the fee as an absolute BTC amount (a decimal number).
|
||||
|
|
@ -757,8 +817,8 @@ creating transactions with `mmgen-txcreate`, `mmgen-txdo` or `mmgen-txbump`.
|
|||
Thirdly, instead of using an absolute BTC amount, you may specify the fee in
|
||||
satoshis per byte and let MMGen calculate the fee based on the transaction size.
|
||||
This also works both on the command line and at the interactive prompt. The
|
||||
satoshis-per-byte specification is an integer followed by the letter 's'. A fee
|
||||
of 90 satoshis per byte is thus represented as '90s'.
|
||||
satoshis-per-byte specification is an integer followed by the letter `s`. A fee
|
||||
of 90 satoshis per byte is thus represented as `90s`.
|
||||
|
||||
MMGen has a hard maximum fee (currently 0.003 BTC) which is alterable only in the
|
||||
config file. Thus MMGen will never create or broadcast any transaction with a
|
||||
|
|
@ -777,7 +837,7 @@ creating replacement transactions from existing replaceable ones.
|
|||
`mmgen-txbump` can create, sign and send transactions in a single operation if
|
||||
desired.
|
||||
|
||||
Continuing the examples from our primer above, we'll examine two RBF scenarios,
|
||||
Continuing the examples from our primer above, we’ll examine two RBF scenarios,
|
||||
one for a hot wallet and one for a cold storage wallet. In the first scenario,
|
||||
initial and replacement transactions will be created, signed and sent in one
|
||||
operation. In the second, a batch of replacement transactions with
|
||||
|
|
@ -794,8 +854,8 @@ satoshis per byte:
|
|||
...
|
||||
Transaction sent: dcba4321....
|
||||
|
||||
Here you've sent 0.1 BTC to a third-party address and the change back to
|
||||
yourself at address #5 of your default hot wallet with Seed ID 0FDE89AB.
|
||||
Here you’ve sent 0.1 BTC to a third-party address and the change back to
|
||||
yourself at address #5 of your default hot wallet with Seed ID `0FDE89AB`.
|
||||
|
||||
Note that the fee is shown in the filename after the send amount. The presence
|
||||
of the fee in the filename identifies the transaction as replaceable.
|
||||
|
|
@ -810,11 +870,11 @@ and send a replacement transaction with a higher fee, say 100 satoshis per byte:
|
|||
Transaction sent: eef01357....
|
||||
|
||||
The `--send` switch instructs `mmgen-txbump` to sign and send the transaction
|
||||
after creating it. The `--output-to-reduce` switch with an argument of 'c'
|
||||
requests that the increased fee be deducted from the change ('c') output, which
|
||||
after creating it. The `--output-to-reduce` switch with an argument of `c`
|
||||
requests that the increased fee be deducted from the change (`c`) output, which
|
||||
is usually what is desired. If you want it taken from some other output,
|
||||
identify the output by number. Note that the resulting replacement transaction
|
||||
has a different identifier, since it's a new transaction.
|
||||
has a different identifier, since it’s a new transaction.
|
||||
|
||||
If this transaction also fails to confirm, then repeat the above step as many
|
||||
times as necessary to get a confirmation, increasing the fee each time. The
|
||||
|
|
@ -822,9 +882,6 @@ only thing you have to modify with each iteration is the argument to `--tx-fee`.
|
|||
To reduce your typing even further, use the `--yes` switch to skip all
|
||||
non-essential prompts.
|
||||
|
||||
Note that if you're using a key-address file instead of a default hot wallet,
|
||||
you'll need to supply it on the command line as a parameter to the `-M` option.
|
||||
|
||||
#### <a name='a_rbf_onf'>With an offline (cold storage) wallet</a>
|
||||
|
||||
To achieve the same result as in the above example using a cold wallet, just
|
||||
|
|
@ -858,12 +915,53 @@ Copy the files to an empty folder, transfer the folder to your offline machine a
|
|||
Then copy the signed transaction files back to your online machine and broadcast
|
||||
them in turn until you get a confirmation:
|
||||
|
||||
$ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn't confirm, then
|
||||
$ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn't confirm, then
|
||||
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then
|
||||
$ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn’t confirm, then
|
||||
$ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn’t confirm, then
|
||||
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn’t confirm, then
|
||||
$ mmgen-txsend 73DABB[0.1,200].sigtx
|
||||
|
||||
#### <a name='a_utd'>Keeping your installation up to date</a>
|
||||
|
||||
To make sure you have all the latest features and bugfixes, it’s a good idea to
|
||||
keep your MMGen installation upgraded to the latest version. MMGen does no
|
||||
checking for updates itself, so the following steps should be performed by you
|
||||
on a periodic basis.
|
||||
|
||||
If you’ve deleted or lost your local copy of the MMGen repository, clone it
|
||||
again from Github or Gitlab:
|
||||
|
||||
$ git clone https://github.com/mmgen/mmgen.git # Github
|
||||
$ git clone https://gitlab.com/mmgen/mmgen.git # Gitlab
|
||||
|
||||
Enter the repository and check out the master branch. Pull the latest changes
|
||||
from the remote repository:
|
||||
|
||||
$ cd mmgen
|
||||
$ git checkout master
|
||||
$ git pull
|
||||
|
||||
Check out the current stable version for your operating system:
|
||||
|
||||
$ git checkout stable_linux # for Linux-based systems
|
||||
$ git checkout stable_msys2 # for Microsoft Windows / MSYS2 systems
|
||||
|
||||
Note that if you want to try out the latest “bleeding edge” (and possibly
|
||||
unstable) features, you can just remain on the master branch and omit the
|
||||
preceding step. Information on recently added features can be found by typing
|
||||
`git log` or visiting the commits page on [Github][hc] or [Gitlab][lc].
|
||||
|
||||
Check the latest release notes in `doc/release-notes` and make note of any new
|
||||
features or requirements. Now perform the install:
|
||||
|
||||
$ sudo ./setup.py install # Linux
|
||||
$ ./setup.py install # Windows / MSYS2
|
||||
|
||||
[01]: Tracking-and-spending-ordinary-Bitcoin-addresses
|
||||
[02]: https://tpfaucet.appspot.com
|
||||
[03]: Recovering-Your-Keys-Without-the-MMGen-Software
|
||||
[06]: MMGen-Quick-Start-with-Regtest-Mode
|
||||
[04]: MMGen-Quick-Start-with-Regtest-Mode
|
||||
[05]: Key-address-files
|
||||
[06]: Subwallets
|
||||
[07]: autosign-[MMGen-command-help]
|
||||
[hc]: https://github.com/mmgen/mmgen/commits/master
|
||||
[lc]: https://gitlab.com/mmgen/mmgen/commits/master
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
MMGen's regtest mode, also known as Bob and Alice mode, uses the Bitcoin
|
||||
daemon's regression test feature to create a virtual network of two users who
|
||||
MMGen’s regtest mode, also known as Bob and Alice mode, uses the Bitcoin
|
||||
daemon’s regression test feature to create a virtual network of two users who
|
||||
transact on a private blockchain.
|
||||
|
||||
All of MMGen's functionality is available in regtest mode, making it an ideal
|
||||
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.
|
||||
|
||||
To send a transaction or perform any other operation as Bob or Alice, just add
|
||||
the '--bob' or '--alice' option to the relevant MMGen command. MMGen will start
|
||||
the `--bob` or `--alice` option to the relevant MMGen command. MMGen will start
|
||||
and stop the Bitcoin daemon automatically as needed.
|
||||
|
||||
This tutorial provides a quick, hands-on introduction.
|
||||
|
|
@ -16,20 +16,20 @@ This tutorial provides a quick, hands-on introduction.
|
|||
$ mmgen-regtest setup
|
||||
$ mmgen-regtest bob
|
||||
|
||||
2. Generate Bob's MMGen wallet:
|
||||
2. Generate Bob’s MMGen wallet:
|
||||
|
||||
$ mmgen-walletgen --bob
|
||||
...
|
||||
Make this wallet your default and move it to the data directory? (Y/n): y
|
||||
|
||||
3. Generate three type 'C' (compressed) addresses with Bob's MMGen wallet:
|
||||
3. Generate three type `C` (compressed) addresses with Bob’s MMGen wallet:
|
||||
|
||||
$ mmgen-addrgen --bob --type=compressed 1-3
|
||||
...
|
||||
Addresses written to file '1163DDF1-C[1-3].addrs'
|
||||
# 1163DDF1 is Bob's Seed ID; since it's generated randomly, yours will be different
|
||||
# 1163DDF1 is Bob’s Seed ID; since it’s generated randomly, yours will be different
|
||||
|
||||
4. Import the addresses into Bob's tracking wallet:
|
||||
4. Import the addresses into Bob’s tracking wallet:
|
||||
|
||||
$ mmgen-addrimport --bob 1163DDF1-C[1-3].addrs
|
||||
...
|
||||
|
|
@ -38,7 +38,7 @@ This tutorial provides a quick, hands-on introduction.
|
|||
Since your Bob has a different Seed ID, your address filename will of course
|
||||
be different than this one.
|
||||
|
||||
5. List the addresses in Bob's tracking wallet. You'll see the addresses you
|
||||
5. List the addresses in Bob’s tracking wallet. You’ll see the addresses you
|
||||
just imported:
|
||||
|
||||
$ mmgen-tool --bob listaddresses showempty=1
|
||||
|
|
@ -48,13 +48,13 @@ just imported:
|
|||
1163DDF1:C:3 mhYYHM7renPpNi8SUj5yeEZ54eAUJ5HyQ1 - 0
|
||||
|
||||
Note that regtest mode uses testnet-format addresses, which differ from the
|
||||
familiar mainnet addresses beginning with '1'.
|
||||
familiar mainnet addresses beginning with ’1’.
|
||||
|
||||
6. Fund one of the addresses (let's choose the first one) with some BTC:
|
||||
6. Fund one of the addresses (let’s choose the first one) with some BTC:
|
||||
|
||||
$ mmgen-regtest send mw42oJ94yRA6ZUNSzmMpjZDR74JNyvqzzZ 500
|
||||
|
||||
Don't forget to substitute your C:1 address for the one above!
|
||||
Don’t forget to substitute your `C:1` address for the one above!
|
||||
|
||||
7. Make sure the funds reached their destination:
|
||||
|
||||
|
|
@ -65,23 +65,23 @@ just imported:
|
|||
1163DDF1:C:3 mhYYHM7renPpNi8SUj5yeEZ54eAUJ5HyQ1 - 0
|
||||
TOTAL: 500 BTC
|
||||
|
||||
8. You can view Bob's total balance this way too:
|
||||
8. You can view Bob’s total balance this way too:
|
||||
|
||||
$ mmgen-tool --bob getbalance
|
||||
|
||||
9. Generate Alice's MMGen wallet:
|
||||
9. Generate Alice’s MMGen wallet:
|
||||
|
||||
$ mmgen-walletgen --alice
|
||||
...
|
||||
Make this wallet your default and move it to the data directory? (Y/n): y
|
||||
|
||||
10. Generate three type 'S' (segwit) addresses with Alice's MMGen wallet:
|
||||
10. Generate three type `S` (segwit) addresses with Alice’s MMGen wallet:
|
||||
|
||||
$ mmgen-addrgen --alice --type=segwit 1-3
|
||||
...
|
||||
Addresses written to file '9304C211-S[1-3].addrs'
|
||||
|
||||
11. Repeat steps 4-7 for Alice by substituting '--bob' for '--alice'. Don't
|
||||
11. Repeat steps 4-7 for Alice by substituting `--bob` for `--alice`. Don’t
|
||||
forget to change the address filename and send address to suit. The result of
|
||||
step 7 will look something like this:
|
||||
|
||||
|
|
@ -91,21 +91,21 @@ step 7 will look something like this:
|
|||
9304C211:S:3 2NF4y3y4CEjQCcssjX2BDLHT88XHn8z53JS - 0
|
||||
TOTAL: 500 BTC
|
||||
|
||||
12. Split Alice's funds, sending 200 BTC to address S:2 and the change to S:3.
|
||||
Specify a fee of 20 satoshis/byte and make output quieter:
|
||||
12. Split Alice’s funds, sending 200 BTC to address `S:2` and the change to
|
||||
`S:3`. Specify a fee of 20 satoshis/byte and make the output quieter:
|
||||
|
||||
$ mmgen-txdo --alice --tx-fee=20s --quiet 9304C211:S:2,300 9304C211:S:3
|
||||
...
|
||||
Type uppercase 'YES' to confirm: YES
|
||||
Transaction sent: 78ca853816b55527b42ca8784c887a5f482c752522f914d2f17d6afcd8a3b076
|
||||
|
||||
Don't forget to use your Alice's Seed ID here, instead of '9304C211'.
|
||||
Don’t forget to use your Alice’s Seed ID here, instead of `9304C211`.
|
||||
|
||||
Note that for simplicity's sake this tutorial uses the `mmgen-txdo` command
|
||||
Note that for simplicity’s sake this tutorial uses the `mmgen-txdo` command
|
||||
to create, sign and send transactions in one operation. In normal, cold
|
||||
wallet mode, your seed will be held on a separate offline computer which
|
||||
you'll use to sign transactions using the `mmgen-txsign` command. This is
|
||||
explained in detail in the Getting Started guide.
|
||||
wallet mode, you’d create the transaction with `mmgen-txcreate`, sign it
|
||||
offline with `mmgen-txsign` and send it with `mmgen-txsend`. Use of these
|
||||
commands is explained in detail in the [**Getting Started**][G] guide.
|
||||
|
||||
13. View the transaction in the mempool:
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ Specify a fee of 20 satoshis/byte and make output quieter:
|
|||
$ mmgen-regtest show_mempool
|
||||
[]
|
||||
|
||||
16. List Alice's addresses. Note that Alice has lost a bit to transaction fees:
|
||||
16. List Alice’s addresses. Note that Alice has lost a bit to transaction fees:
|
||||
|
||||
$ mmgen-tool --alice listaddresses showempty=1
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
|
|
@ -130,24 +130,24 @@ Specify a fee of 20 satoshis/byte and make output quieter:
|
|||
9304C211:S:3 2NF4y3y4CEjQCcssjX2BDLHT88XHn8z53JS - 199.999967
|
||||
TOTAL: 499.999967 BTC
|
||||
|
||||
17. Have Alice send 10 BTC to Bob's C:2 address and the change back to her S:1
|
||||
address. This time Alice specifies an absolute fee in BTC.
|
||||
17. Have Alice send 10 BTC to Bob’s `C:2` address and the change back to her
|
||||
`S:1` address. This time Alice specifies an absolute fee in BTC.
|
||||
|
||||
$ mmgen-txdo --alice --tx-fee=0.0001 --quiet 9304C211:S:1 n1oszhfAyRrHi7qJupyzaWXTcpMQGsGJEf,10
|
||||
...
|
||||
Enter a range or space-separated list of outputs to spend: 1
|
||||
...
|
||||
|
||||
Note that Alice is reusing address S:1 here, and address reuse is generally a
|
||||
bad idea. You'd be better off generating and importing some new addresses for
|
||||
Alice by repeating steps 3 and 4 with a different address range. I'll leave
|
||||
that to you as an exercise.
|
||||
Note that Alice is reusing address `S:1` here, and address reuse is
|
||||
generally a bad idea. You’d be better off generating and importing some
|
||||
new addresses for Alice by repeating steps 3 and 4 with a different address
|
||||
range. I’ll leave that to you as an exercise.
|
||||
|
||||
18. Mine a block:
|
||||
|
||||
$ mmgen-regtest generate
|
||||
|
||||
19. List Alice's addresses, omitting the empty ones:
|
||||
19. List Alice’s addresses, omitting the empty ones:
|
||||
|
||||
$ mmgen-tool --alice listaddresses
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
|
|
@ -155,7 +155,7 @@ address. This time Alice specifies an absolute fee in BTC.
|
|||
9304C211:S:2 2N8w8qTupvd9L9wLFbrn6UhdfF1gadDAmFD - 300
|
||||
TOTAL: 489.999867 BTC
|
||||
|
||||
19. List Bob's addresses:
|
||||
19. List Bob’s addresses:
|
||||
|
||||
$ mmgen-tool --bob listaddresses
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
|
|
@ -163,11 +163,11 @@ address. This time Alice specifies an absolute fee in BTC.
|
|||
1163DDF1:C:2 n1oszhfAyRrHi7qJupyzaWXTcpMQGsGJEf - 10
|
||||
TOTAL: 510 BTC
|
||||
|
||||
20. Add a label to Bob's tracking wallet:
|
||||
20. Add a label to Bob’s tracking wallet:
|
||||
|
||||
$ mmgen-tool --bob add_label 1163DDF1:C:2 'From Alice'
|
||||
|
||||
21. List Bob's addresses:
|
||||
21. List Bob’s addresses:
|
||||
|
||||
$ mmgen-tool --bob listaddresses
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
|
|
@ -175,4 +175,4 @@ address. This time Alice specifies an absolute fee in BTC.
|
|||
1163DDF1:C:2 n1oszhfAyRrHi7qJupyzaWXTcpMQGsGJEf From Alice 10
|
||||
TOTAL: 510 BTC
|
||||
|
||||
[q]: MMGen-Quick-Start-with-Regtest-Mode
|
||||
[G]: Getting-Started-with-MMGen#a_ct
|
||||
|
|
|
|||
|
|
@ -12,31 +12,31 @@
|
|||
|
||||
#### <a name='a_i'>Introduction</a>
|
||||
|
||||
If you're considering using MMGen and are a Bitcoiner with a normal, healthy
|
||||
If you’re considering using MMGen and are a Bitcoiner with a normal, healthy
|
||||
degree of paranoia, then the following question will probably come to mind:
|
||||
“What if I have funds in an MMGen wallet and I lose the software? How do I
|
||||
recover my coins?”
|
||||
|
||||
Let's take this scenario to its logical extreme and assume you've lost all
|
||||
backup copies of the software, MMGen's project page has disappeared from Github
|
||||
(or been hacked) and no other repositories or copies are available on the
|
||||
Internet. The following tutorial will show you how to recover the private keys
|
||||
for your coin addresses in the event this unlikely combination of circumstances
|
||||
ever occurs.
|
||||
Let’s take this scenario to its logical extreme and assume you’ve lost all
|
||||
backup copies of the software, MMGen’s project page has disappeared from both
|
||||
[Github][04] and [Gitlab][05] (or been hacked) and no other repositories or
|
||||
copies are available on the Internet. The following tutorial will show you how
|
||||
to recover the private keys for your coin addresses in the event this unlikely
|
||||
combination of circumstances ever occurs.
|
||||
|
||||
In addition to private keys, this tutorial can also be used to recover passwords
|
||||
generated with the `mmgen-passgen` command.
|
||||
|
||||
#### <a name='a_rs'>Obtaining the binary seed</a>
|
||||
|
||||
To keep things simple, we'll assume you have a copy of your seed in hexadecimal
|
||||
(mmhex) format. If your backup's in mnemonic format, skip to the section
|
||||
'Converting an MMGen mnemonic to hexadecimal format' below and return here when you've
|
||||
finished. If your backup is an MMGen wallet, it will need to be decrypted.
|
||||
That case will be covered in a future tutorial.
|
||||
To keep things simple, we’ll assume you have a copy of your seed in hexadecimal
|
||||
(mmhex) format. If your backup’s in mnemonic format, skip to the section
|
||||
[Converting an MMGen mnemonic to hexadecimal format](#a_mh) below and return
|
||||
here when you’ve finished. If your backup is an MMGen wallet, it will need to
|
||||
be decrypted. That case will be covered in a future tutorial.
|
||||
|
||||
Okay, so let's say you have a 128-bit seed with Seed ID FE3C6545 and funds in
|
||||
the first three legacy uncompressed ('L') addresses of this seed. Here are the
|
||||
Okay, so let’s say you have a 128-bit seed with Seed ID `FE3C6545` and funds in
|
||||
the first three legacy uncompressed (`L`) addresses of this seed. Here are the
|
||||
addresses:
|
||||
|
||||
FE3C6545 {
|
||||
|
|
@ -45,7 +45,7 @@ addresses:
|
|||
3 1CUDd6nPHdP5pT7nN8k2AA5WdKRaKPjmea
|
||||
}
|
||||
|
||||
Since you might have your funds in Segwit ('S') addresses, we'll consider that
|
||||
Since you might have your funds in Segwit (`S`) addresses, we’ll consider that
|
||||
case too:
|
||||
|
||||
FE3C6545 SEGWIT {
|
||||
|
|
@ -54,12 +54,12 @@ case too:
|
|||
3 37wM8hwt69qwH7hZHAMn6RVdc8vMuM1CwJ
|
||||
}
|
||||
|
||||
Keys for compressed ('C'), Bech32 (‘B’) and altcoin addresses, as well as
|
||||
Keys for compressed (`C`), Bech32 (`B`) and altcoin addresses, as well as
|
||||
passwords, are generated in a way analogous to Segwit keys, so for them you’ll
|
||||
proceed as with the Segwit case.
|
||||
|
||||
Here's the seed itself in mmhex format, which you've stored in some safe place (on
|
||||
paper in a safe-deposit box, for example):
|
||||
Here’s the seed itself in `mmhex` format, which you’ve stored in some safe place
|
||||
(on paper in a safe-deposit box, for example):
|
||||
|
||||
afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e
|
||||
|
||||
|
|
@ -70,71 +70,71 @@ This task is divided into two parts:
|
|||
2. converting the hex keys to wallet interchange (WIF) format for importation
|
||||
into Bitcoin Core or some other wallet.
|
||||
|
||||
We'll solve this task using standard command-line utilities available on any
|
||||
We’ll solve this task using standard command-line utilities available on any
|
||||
Linux or other Unix-like system.
|
||||
|
||||
> #### <a name='a_ss'>Convert the seed to binary (legacy uncompressed addresses)</a>
|
||||
#### <a name='a_ss'>Convert the seed to binary (legacy uncompressed addresses)</a>
|
||||
|
||||
> For the legacy addresses, we begin by converting the seed to binary form and
|
||||
> storing it in a file. For that we use 'xxd', a handy tool for converting binary
|
||||
> to hex and vice versa. Don't forget to omit the checksum from the seed and
|
||||
> remove the spaces:
|
||||
For the legacy addresses, we begin by converting the seed to binary form and
|
||||
storing it in a file. For that we use `xxd`, a handy tool for converting binary
|
||||
to hex and vice versa. Don’t forget to omit the checksum from the seed and
|
||||
remove the spaces:
|
||||
|
||||
$ echo 456d7f5f1c4bfe3bc916b87560ae6a3e | xxd -r -p > myseed.bin
|
||||
|
||||
> #### <a name='a_cs'>Scramble the seed and save to binary (non-legacy and altcoin addresses and passwords)</a>
|
||||
#### <a name='a_cs'>Scramble the seed and save to binary (non-legacy and altcoin addresses and passwords)</a>
|
||||
|
||||
> Other address types and passwords are generated by first “scrambling” the
|
||||
> seed with a unique identifier, or “scramble string”, using the HMAC-SHA256
|
||||
> algorithm. The scrambled seed is then given ten rounds of SHA256 to create the
|
||||
> base seed used to generate our keys.
|
||||
Other address types and passwords are generated by first “scrambling” the
|
||||
seed with a unique identifier, or “scramble string”, using the HMAC-SHA256
|
||||
algorithm. The scrambled seed is then given ten rounds of SHA256 to create the
|
||||
base seed used to generate our keys.
|
||||
|
||||
> Our first task then is to find out the correct scramble string for our coin
|
||||
> and address type (or password). For BTC and BTC fork coins, the string will
|
||||
> be simply the address type, e.g. `compressed` or `segwit`. For Bitcoin-based
|
||||
> altcoins, the string is the coin symbol and address type separated by a colon,
|
||||
> e.g. `ltc:legacy`. The strings for non-Bitcoin-derived altcoins are irregular
|
||||
> and are listed in the table below. For passwords, the string is the password
|
||||
> format, e.g. `b58`; the password length, e.g. `20`; and the password ID
|
||||
> string, e.g. `alice@fubar.io`, all separated by colons:
|
||||
Our first task then is to find out the correct scramble string for our coin
|
||||
and address type (or password). For BTC and BTC fork coins, the string will
|
||||
be simply the address type, e.g. `compressed` or `segwit`. For Bitcoin-based
|
||||
altcoins, the string is the coin symbol and address type separated by a colon,
|
||||
e.g. `ltc:legacy`. The strings for non-Bitcoin-derived altcoins are irregular
|
||||
and are listed in the table below. For passwords, the string is the password
|
||||
format, e.g. `b58`; the password length, e.g. `20`; and the password ID
|
||||
string, e.g. `alice@fubar.io`, all separated by colons:
|
||||
|
||||
> | Coin + Address type | Scramble String |
|
||||
> |:-----------------------------------------|:-------------------------|
|
||||
> | BTC/BCH compressed | `compressed` |
|
||||
> | BTC Segwit-P2SH | `segwit` |
|
||||
> | BTC native Segwit (Bech32) | `bech32` |
|
||||
> | LTC legacy | `ltc:legacy` |
|
||||
> | LTC compressed | `ltc:compressed` |
|
||||
> | LTC Segwit | `ltc:segwit` |
|
||||
> | LTC Bech32 | `ltc:bech32` |
|
||||
> | DASH legacy | `dash:legacy` |
|
||||
> | DASH compressed | `dash:compressed` |
|
||||
> | ETH | `eth` |
|
||||
> | ETC | `etc` |
|
||||
> | XMR | `xmr:monero` |
|
||||
> | ZEC-T | `zec:legacy` |
|
||||
> | ZEC-Z | `zec:zcash_z` |
|
||||
| Coin + Address type | Scramble String |
|
||||
|:-----------------------------------------|:-------------------------|
|
||||
| BTC/BCH compressed | `compressed` |
|
||||
| BTC Segwit-P2SH | `segwit` |
|
||||
| BTC native Segwit (Bech32) | `bech32` |
|
||||
| LTC legacy | `ltc:legacy` |
|
||||
| LTC compressed | `ltc:compressed` |
|
||||
| LTC Segwit | `ltc:segwit` |
|
||||
| LTC Bech32 | `ltc:bech32` |
|
||||
| DASH legacy | `dash:legacy` |
|
||||
| DASH compressed | `dash:compressed` |
|
||||
| ETH | `eth` |
|
||||
| ETC | `etc` |
|
||||
| XMR | `xmr:monero` |
|
||||
| ZEC-T | `zec:legacy` |
|
||||
| ZEC-Z | `zec:zcash_z` |
|
||||
|
||||
> | Password type | Scramble String |
|
||||
> |:-----------------------------------------|:-------------------------|
|
||||
> | Base58 passwords for Alice's email acct. | `b58:20:alice@fubar.io` |
|
||||
> | Same as above, half-length passwords | `b58:10:alice@fubar.io` |
|
||||
> | Same as above, default Base32 passwords | `b32:24:alice@fubar.io` |
|
||||
> | 32-byte hex seed for Alice's PGP key | `hex:64:alice@gnupg` |
|
||||
| Password type | Scramble String |
|
||||
|:-----------------------------------------|:-------------------------|
|
||||
| Base58 passwords for Alice’s email acct. | `b58:20:alice@fubar.io` |
|
||||
| Same as above, half-length passwords | `b58:10:alice@fubar.io` |
|
||||
| Same as above, default Base32 passwords | `b32:24:alice@fubar.io` |
|
||||
| 32-byte hex seed for Alice’s PGP key | `hex:64:alice@gnupg` |
|
||||
|
||||
> Once we've determined the correct string, we scramble our seed with it as
|
||||
> follows using the `openssl` utility available by default on any Unix-based
|
||||
> system:
|
||||
Once we’ve determined the correct string, we scramble our seed with it as
|
||||
follows using the `openssl` utility available by default on any Unix-based
|
||||
system:
|
||||
|
||||
# E.g. for LTC Segwit addresses:
|
||||
$ scramble_str='ltc:segwit'
|
||||
|
||||
# E.g. for default-format passwords for Alice's email account at fubar.io:
|
||||
# E.g. for default-format passwords for Alice’s email account at fubar.io:
|
||||
$ scramble_str='b58:20:alice@fubar.io'
|
||||
|
||||
$ echo -n "$scramble_str" | openssl dgst -r -sha256 -mac hmac -macopt hexkey:456d7f5f1c4bfe3bc916b87560ae6a3e | xxd -r -p > scrambled-round0.bin
|
||||
|
||||
> Now add the ten rounds of sha256:
|
||||
Now add the ten rounds of sha256:
|
||||
|
||||
$ for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
openssl dgst -sha256 -binary scrambled-round${i}.bin > scrambled-round$((i+1)).bin
|
||||
|
|
@ -145,7 +145,7 @@ Linux or other Unix-like system.
|
|||
|
||||
The MMGen key-generating algorithm uses a chain of SHA-512 hashes with double
|
||||
SHA-256 branches to generate the keys from which each address is derived. To
|
||||
obtain the chain's first link, we make a single SHA-512 hash of the seed and
|
||||
obtain the chain’s first link, we make a single SHA-512 hash of the seed and
|
||||
save it in binary form:
|
||||
|
||||
$ sha512sum myseed.bin | xxd -r -p > link1.bin
|
||||
|
|
@ -161,10 +161,10 @@ A double SHA-256 hash of the first link gives us the key of our first address:
|
|||
# or, for the password example:
|
||||
bd60b8ba034bbb40498667ee600bc0cc0b99eb19164e8d412a48f16da4e00d6b
|
||||
|
||||
> #### <a name='a_cr'>Checking the result (optional, address example)</a>
|
||||
#### <a name='a_cr'>Checking the result (optional, address example)</a>
|
||||
|
||||
> With 'mmgen-tool', we can easily generate the WIF key and address from this
|
||||
> hexadecimal key and see that it's correct:
|
||||
With `mmgen-tool`, we can easily generate the WIF key and address from this
|
||||
hexadecimal key and see that it’s correct:
|
||||
|
||||
$ mmgen-tool hex2wif 05d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e36
|
||||
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi
|
||||
|
|
@ -172,22 +172,22 @@ A double SHA-256 hash of the first link gives us the key of our first address:
|
|||
$ mmgen-tool wif2addr 5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi
|
||||
1JVi3qcNcjMM7cTR7y9ihKUG1yDLpKRJfL # matches FE3C6545:L:1 above
|
||||
|
||||
> Or, for the Segwit example:
|
||||
Or, for the Segwit example:
|
||||
|
||||
$ mmgen-tool hex2wif b8e58ded53e9ba5a9f4e279a956c061a7da5487bde6a95f1ede0722d287881a0 compressed=1
|
||||
L3R8Fn21PsY3PWgT8BMggFwXswA2EZntwEGFS5mfDJpSiLq29a9F
|
||||
|
||||
# for a compressed ('C') address, leave out the 'segwit=1' argument
|
||||
# for a compressed (`C`) address, leave out the `segwit=1` argument
|
||||
$ mmgen-tool wif2addr L3R8Fn21PsY3PWgT8BMggFwXswA2EZntwEGFS5mfDJpSiLq29a9F segwit=1
|
||||
3LpkKqtGkcCukRrgEFWyCajSApioiEWeTw # matches FE3C6545:S:1 above
|
||||
|
||||
> But since we're trying to do this without the MMGen software, we need to find
|
||||
> some other way to do the hex-to-WIF conversion. We could use one of many
|
||||
> key-manipulation tools available on the Internet, such as [this one][01], or
|
||||
> [this one][02]. Or we can do it ourselves: that will be covered in the next
|
||||
> section.
|
||||
But since we’re trying to do this without the MMGen software, we need to find
|
||||
some other way to do the hex-to-WIF conversion. We could use one of many
|
||||
key-manipulation tools available on the Internet, such as [this one][01], or
|
||||
[this one][02]. Or we can do it ourselves: that will be covered in the next
|
||||
section.
|
||||
|
||||
Meanwhile, let's finish generating hex keys for the rest of our addresses (or
|
||||
Meanwhile, let’s finish generating hex keys for the rest of our addresses (or
|
||||
passwords). To get the next key, we generate the next link in the chain from
|
||||
the first link and take its double SHA-256 hash, just as we did for the first
|
||||
one:
|
||||
|
|
@ -198,14 +198,14 @@ one:
|
|||
42f1b998f0f9b7b27b5d0b92ffa8c1c6b96d7202789c41b6e6a6a402e318a04d # Segwit example
|
||||
9b59cec2e5d4f2a74f0d4eb2400efcf854f5a893bef0e9bf1ee83f72ca1118c3 # password example
|
||||
|
||||
And so on and so forth, until we've generated all the keys we need: three, in our case.
|
||||
And so on and so forth, until we’ve generated all the keys we need: three, in our case.
|
||||
|
||||
If we're generating keys for Ethereum and Monero, our work is done: the raw
|
||||
If we’re generating keys for Ethereum and Monero, our work is done: the raw
|
||||
hexadecimal keys are all we need. Otherwise, read on.
|
||||
|
||||
#### <a name='a_hpw'>Converting the hex value to a password (password example)</a>
|
||||
|
||||
If it's passwords we're generating, we must now convert our hex key to the
|
||||
If it’s passwords we’re generating, we must now convert our hex key to the
|
||||
desired password format, base58 in our case. For this we can use the homemade
|
||||
`hex2b58.py` [Base-conversion utility](#a_bcu) described below:
|
||||
|
||||
|
|
@ -219,15 +219,15 @@ The password is just the last 20 characters of the output:
|
|||
|
||||
#### <a name='a_hw'>Hex to WIF by hand (address example)</a>
|
||||
|
||||
Since we've chosen to convert our hex keys to WIF format manually, we have a bit
|
||||
of work ahead of us. Let's begin with our just-generated key #1 from seed
|
||||
FE3C6545:
|
||||
Since we’ve chosen to convert our hex keys to WIF format manually, we have a bit
|
||||
of work ahead of us. Let’s begin with our just-generated key #1 from seed
|
||||
`FE3C6545`:
|
||||
|
||||
05d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e36 (uncompressed example)
|
||||
b8e58ded53e9ba5a9f4e279a956c061a7da5487bde6a95f1ede0722d287881a0 (Segwit example)
|
||||
|
||||
WIF format prepends hex '80' to the beginning of the key. If the key is
|
||||
associated with a compressed public key, it also appends '01':
|
||||
WIF format prepends hex `80` to the beginning of the key. If the key is
|
||||
associated with a compressed public key, it also appends `01`:
|
||||
|
||||
# uncompressed example:
|
||||
8005d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e36
|
||||
|
|
@ -237,7 +237,7 @@ associated with a compressed public key, it also appends '01':
|
|||
|
||||
The Base58Check format invented by Satoshi for Bitcoin addresses and keys
|
||||
contains a checksum, which we now generate by taking the first four bytes (eight
|
||||
characters) of the double SHA-256 of the above result:
|
||||
characters) of the double SHA256 of the above result:
|
||||
|
||||
|
||||
# uncompressed example:
|
||||
|
|
@ -260,24 +260,24 @@ digits plus the upper and lower case Latin letters (10 + 26 + 26 = 62):
|
|||
|
||||
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz
|
||||
|
||||
Since '0' (zero) is easily confused with capital 'O' visually, and capital 'I'
|
||||
with lowercase 'l', he dropped those characters, leaving the following 58:
|
||||
Since ‘0’ (zero) is easily confused with capital ‘O’ visually, and capital ‘I’
|
||||
with lowercase ‘l’, he dropped those characters, leaving the following 58:
|
||||
|
||||
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
|
||||
|
||||
With '0' gone, '1' now represents decimal zero, '2' represents decimal one, and
|
||||
so forth all the way up to 'z', representing decimal fifty-seven.
|
||||
With ‘0’ gone, ‘1’ now represents decimal zero, ‘2’ represents decimal one, and
|
||||
so forth all the way up to ‘z’, representing decimal fifty-seven.
|
||||
|
||||
Now all that remains is to convert our hexadecimal key to decimal and then Base
|
||||
58 using this alphabet. This can be done in just four lines of code you can try
|
||||
out at the Python prompt:
|
||||
|
||||
# uncompressed example:
|
||||
$ python
|
||||
$ python3
|
||||
>>> b58a = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
||||
>>> num = int('8005d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e367b818629',16)
|
||||
>>> result = [b58a[num / 58**e % 58] for e in range(60)]
|
||||
>>> print ''.join(reversed(result)).lstrip('1')
|
||||
>>> result = [b58a[num // 58**e % 58] for e in range(60)]
|
||||
>>> print(''.join(reversed(result)).lstrip('1'))
|
||||
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi # matches key for FE3C6545:L:1 above
|
||||
|
||||
# Segwit example has the following differences:
|
||||
|
|
@ -286,11 +286,11 @@ out at the Python prompt:
|
|||
...
|
||||
L3R8Fn21PsY3PWgT8BMggFwXswA2EZntwEGFS5mfDJpSiLq29a9F # matches key for FE3C6545:S:1 above
|
||||
|
||||
Explanation: the variable 'b58a' holds the Base 58 alphabet; 'num' holds the key
|
||||
in decimal, converted from hexidecimal by Python's `int()` function; the third
|
||||
Explanation: the variable `b58a` holds the Base 58 alphabet; `num` holds the key
|
||||
in decimal, converted from hexidecimal by Python’s `int()` function; the third
|
||||
line does the base-58 conversion; and the last line formats the result by
|
||||
reversing the order of the digits, converting it to a string and stripping off
|
||||
the leading zeroes ('1's).
|
||||
the leading zeroes (‘1’s).
|
||||
|
||||
Programmers unfamiliar with Python might find the following base conversion code
|
||||
clearer:
|
||||
|
|
@ -298,24 +298,24 @@ clearer:
|
|||
def numtob58(n):
|
||||
result = []
|
||||
while n:
|
||||
result = result + [b58a[n % 58]] # divide 'n' by 58 and take the remainder
|
||||
n = n / 58
|
||||
result = result + [b58a[n % 58]] # divide n by 58 and take the remainder
|
||||
n = n // 58
|
||||
return result
|
||||
|
||||
result = numtob58(num)
|
||||
|
||||
> #### <a name='a_bcu'>Base-conversion utility</a>
|
||||
#### <a name='a_bcu'>Base-conversion utility</a>
|
||||
|
||||
> Adapting our code a bit and putting it in a file gives us have a handy
|
||||
> conversion utility we can use for any key:
|
||||
Adapting our code a bit and putting it in a file gives us have a handy
|
||||
conversion utility we can use for any key:
|
||||
|
||||
$ cat hex2b58.py
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
b58a = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
|
||||
num = int(sys.argv[1],16)
|
||||
result = [b58a[num / 58**e % 58] for e in range(60)]
|
||||
print ''.join(reversed(result)).lstrip('1')
|
||||
result = [b58a[num // 58**e % 58] for e in range(60)]
|
||||
print(''.join(reversed(result)).lstrip('1'))
|
||||
|
||||
$ ./hex2b58.py 8005d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e367b818629
|
||||
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi
|
||||
|
|
@ -348,7 +348,7 @@ Or in exponential notation:
|
|||
2 x 10² +
|
||||
1 x 10³
|
||||
|
||||
An MMGen seed mnemonic is a number too, only the “digits” it's comprised of come
|
||||
An MMGen seed mnemonic is a number too, only the “digits” it’s comprised of come
|
||||
from an alphabetically sorted series of 1626 words, the [Electrum wordlist][03],
|
||||
which begins like this:
|
||||
|
||||
|
|
@ -358,12 +358,12 @@ and ends like this:
|
|||
|
||||
yet (1621), young (1622), yours (1623), yourself (1624), youth (1625)
|
||||
|
||||
(Type `mmgen-tool mn_printlist` to see the full list)
|
||||
(Type `mmgen-tool mn_printlist enum=true` to see the full enumerated list)
|
||||
|
||||
The words of the Electrum wordlist thus make up a base-1626 numbering system,
|
||||
just like the ten digits of our familiar base-10 system.
|
||||
|
||||
Here's the mnemonic of our seed (FE3C6545):
|
||||
Here’s the mnemonic of our seed `FE3C6545`:
|
||||
|
||||
dude foot desperate tie stood themselves trip descend cease suicide apple busy
|
||||
|
||||
|
|
@ -383,8 +383,8 @@ along with the value of each word corresponding to its position in the wordlist:
|
|||
foot - 562
|
||||
dude - 439
|
||||
|
||||
All that remains is to multiply the values by increasing powers of 1626 and sum
|
||||
the results:
|
||||
All that remains is to multiply the values by increasing powers of the base and
|
||||
sum the results, just as we did in our ‘1234’ example above:
|
||||
|
||||
200 x 1626⁰ +
|
||||
59 x 1626¹ +
|
||||
|
|
@ -399,24 +399,22 @@ the results:
|
|||
562 x 1626¹⁰ +
|
||||
439 x 1626¹¹
|
||||
|
||||
While we could theoretically do the math with pencil and paper, a few lines of
|
||||
While we could theoretically do the math with a calculator, a few lines of
|
||||
Python will make our work much easier:
|
||||
|
||||
$ python
|
||||
$ python3
|
||||
>>> sum = exp = 0
|
||||
>>> for word in 200,59,1384,221,379,1493,1433,1348,1459,386,562,439:
|
||||
>>> for word in (200,59,1384,221,379,1493,1433,1348,1459,386,562,439):
|
||||
>>> sum += word * 1626 ** exp
|
||||
>>> exp += 1
|
||||
>>> print sum
|
||||
92285275468192044354531703963345906238 # the result in decimal
|
||||
>>> print '{:x}'.format(sum)
|
||||
456d7f5f1c4bfe3bc916b87560ae6a3e # the result in hexadecimal: matches our original hex seed above
|
||||
>>> print(hex(sum))
|
||||
0x456d7f5f1c4bfe3bc916b87560ae6a3e # the result in hexadecimal: matches our original hex seed above
|
||||
|
||||
In case you're wondering why 1626 was chosen as the base: 1626 is just large
|
||||
In case you’re wondering why 1626 was chosen as the base: 1626 is just large
|
||||
enough to allow a 128-bit seed to be represented by twelve words. This can also
|
||||
be demonstrated at the Python prompt:
|
||||
|
||||
$ python
|
||||
$ python3
|
||||
>>> 1626**12 >= 2**128
|
||||
True
|
||||
>>> 1625**12 >= 2**128
|
||||
|
|
@ -425,3 +423,5 @@ be demonstrated at the Python prompt:
|
|||
[01]: https://github.com/casascius/Bitcoin-Address-Utility
|
||||
[02]: https://github.com/matja/bitcoin-tool
|
||||
[03]: https://github.com/spesmilo/electrum/blob/1.9.5/lib/mnemonic.py
|
||||
[04]: https://github.com/mmgen/mmgen
|
||||
[05]: https://gitlab.com/mmgen/mmgen
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ from which it was derived.
|
|||
Subwallets are specified by a “Subseed Index” consisting of:
|
||||
|
||||
a) an integer in the range 1-1000000, plus
|
||||
b) an optional single letter, ‘L’ or ‘S’
|
||||
b) an optional single letter, `L` or `S`
|
||||
|
||||
The letter designates the length of the subwallet’s seed. If omitted, ‘L’ is
|
||||
The letter designates the length of the subwallet’s seed. If omitted, `L` is
|
||||
assumed.
|
||||
|
||||
Long (‘L’) subwallets have the same seed length as their parent wallet
|
||||
(typically 256 bits), while short (‘S’) subwallets always have 128-bit seeds.
|
||||
Long (`L`) subwallets have the same seed length as their parent wallet
|
||||
(typically 256 bits), while short (`S`) subwallets always have 128-bit seeds.
|
||||
Long and short subwallets for a given index are derived independently, so both
|
||||
may be used.
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ to a single master wallet and derive all subwallets from this single parent.
|
|||
### Address generation and transaction signing using the parent wallet
|
||||
|
||||
A parent wallet may be used to generate keys and addresses for its associated
|
||||
subwallets. Given our above example (a default wallet having subwallet 4S with
|
||||
Seed ID 3E885EC4), the following two commands are equivalent:
|
||||
subwallets. Given our above example (a default wallet having subwallet `4S` with
|
||||
Seed ID `3E885EC4`), the following two commands are equivalent:
|
||||
|
||||
# Generate ten bech32 addresses from the subwallet:
|
||||
$ mmgen-addrgen --type=bech32 3E885EC4-ABCDEF00[128,3].mmdat 1-10
|
||||
|
|
@ -121,5 +121,13 @@ wallet’s search like this:
|
|||
$ mmgen-txsign --subseeds=144 *.rawtx
|
||||
|
||||
This is basically all you need to know about subwallets. For live versions of
|
||||
the above examples that can be run as-is, see commits 7538a94, d1b8aef and
|
||||
82086c9.
|
||||
the above examples that can be run as-is, see commits [`7538a94`][c1],
|
||||
[`d1b8aef`][c2 ]and [`82086c9`][c3].
|
||||
|
||||
For more detailed usage information, see the [`mmgen-subwalletgen` help
|
||||
screen][sh].
|
||||
|
||||
[c1]: https://github.com/mmgen/mmgen/commit/7538a9460e897b9b23d8ac58853c33713334043f
|
||||
[c2]: https://github.com/mmgen/mmgen/commit/d1b8aefde6d3a13337cbe3147d9913eb09b6765b
|
||||
[c3]: https://github.com/mmgen/mmgen/commit/82086c9936843dc43c1892b672cdf1680763ee84
|
||||
[sh]: https://github.com/mmgen/mmgen/wiki/subwalletgen-[MMGen-command-help]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
## Tracking and spending ordinary Bitcoin (non-MMGen) addresses
|
||||
|
||||
While not recommended, it is possible to use MMGen to track and spend ordinary
|
||||
Bitcoin addresses too, i.e. addresses whose keys you control but which haven't
|
||||
Bitcoin addresses too, i.e. addresses whose keys you control but which haven’t
|
||||
been spent to your MMGen wallet.
|
||||
|
||||
#### Import the Bitcoin addresses for tracking (online computer):
|
||||
|
|
@ -13,13 +13,13 @@ into the tracking wallet:
|
|||
|
||||
NOTE: The '--rescan' option forces a rescan of the entire block chain, which is
|
||||
required for all addresses with existing balances. The rescanning process is
|
||||
very slow, and Bitcoin Core unfortunately doesn't support rescanning in batch
|
||||
very slow, and Bitcoin Core unfortunately doesn’t support rescanning in batch
|
||||
mode. This is why you should always import new addresses into the tracking
|
||||
wallet *before* spending into them, whenever possible.
|
||||
|
||||
#### Create a keylist file for signing transactions (online computer):
|
||||
|
||||
To sign transactions that spend from the Bitcoin addresses you've imported, you
|
||||
To sign transactions that spend from the Bitcoin addresses you’ve imported, you
|
||||
need their corresponding private keys.
|
||||
|
||||
If the key or keys in question are in a bitcoind wallet ('wallet.dat'), you can
|
||||
|
|
@ -38,7 +38,7 @@ on your online computer using a utility such as 'wipe'.
|
|||
|
||||
You may also create your own 'my_secret.keys' (or whatever you choose to call
|
||||
it) file in a plain text editor. In it, just list the WIF-format keys
|
||||
corresponding to the addresses you've imported, one key per line.
|
||||
corresponding to the addresses you’ve imported, one key per line.
|
||||
|
||||
#### Sign a transaction using the keylist (offline computer):
|
||||
|
||||
|
|
@ -50,9 +50,9 @@ it with the keylist file:
|
|||
...
|
||||
Signed transaction written to file 'F9DCBA[6.6].sigtx'
|
||||
|
||||
If your transaction also contains MMGen inputs, you'll need to provide a wallet
|
||||
If your transaction also contains MMGen inputs, you’ll need to provide a wallet
|
||||
for them too, listing it at the end of the command line, like this:
|
||||
|
||||
$ mmgen-txsign -k my_secret.keys F9DCBA[6.6].rawtx 89ABCDEF-76543210[256,3].mmdat
|
||||
|
||||
That's it! Your signed transaction is ready to broadcast.
|
||||
That’s it! Your signed transaction is ready to broadcast.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue