update documentation from wiki
- Install-MMGen-on-Debian-or-Ubuntu-Linux.md - Install-MMGen-on-Microsoft-Windows.md - Altcoin-and-Forkcoin-Support.md - MMGen-Quick-Start-with-Regtest-Mode.md
This commit is contained in:
parent
2660a3591b
commit
4d232342fa
4 changed files with 243 additions and 247 deletions
|
|
@ -1,32 +1,32 @@
|
|||
#### Perform the following steps on both your online and offline computers:
|
||||
*NOTE: the instructions on this page are for a Bitcoin-only setup. For
|
||||
altcoin support, additional installation steps are required. See
|
||||
[**Altcoin and Forkcoin Support**][af] for more information.*
|
||||
|
||||
Install required Debian/Ubuntu packages:
|
||||
### Perform the following steps on both your online and offline computers:
|
||||
|
||||
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libpcre3-dev libtool wipe curl
|
||||
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2 python3-sha3 python3-requests python3-aiohttp python3-socks
|
||||
For computers with no Internet connection, see **Note for offline machines** below.
|
||||
|
||||
Using the [pip3][P] installer, install the scrypt Python package:
|
||||
#### Install required packages:
|
||||
|
||||
$ sudo -H pip3 install scrypt
|
||||
##### Debian/Ubuntu:
|
||||
|
||||
Install the secp256k1 library:
|
||||
$ sudo apt-get install git gcc libtool make autoconf libgmp-dev libssl-dev libpcre3-dev libmpfr-dev libmpc-dev python3-dev python3-pip
|
||||
|
||||
$ git clone https://github.com/bitcoin-core/secp256k1.git
|
||||
$ cd secp256k1
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
$ sudo ldconfig
|
||||
$ cd ..
|
||||
##### Arch Linux:
|
||||
|
||||
Install MMGen:
|
||||
$ sudo pacman -S git gcc libtool make autoconf automake autogen pcre python-pip
|
||||
|
||||
#### Upgrade the build tools:
|
||||
|
||||
$ pip3 install --user --upgrade pip setuptools build wheel
|
||||
|
||||
#### Install MMGen:
|
||||
|
||||
$ git clone https://github.com/mmgen/mmgen.git
|
||||
$ cd mmgen
|
||||
$ git checkout stable_linux # see 'Note' below
|
||||
$ ./setup.py build
|
||||
$ sudo ./setup.py install # see 'Testing Note' below
|
||||
$ python3 -m build --no-isolation
|
||||
$ pip3 install --user --upgrade dist/*.whl # see 'Testing Note' below
|
||||
$ cd ..
|
||||
|
||||
**Note:** if you want to use features that have appeared since the latest
|
||||
|
|
@ -37,35 +37,44 @@ 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.
|
||||
|
||||
**Testing Note:** MMGen may be tested in place prior to installation. Refer to
|
||||
the [Test Suite][ts] wiki page for details.
|
||||
|
||||
Install your coin daemon(s). To install prebuilt binaries, go [here][01]. To
|
||||
install from source, go [here][02].
|
||||
|
||||
#### *Note for offline machines:*
|
||||
**Testing Note:** MMGen may be tested in place prior to installation. Refer to
|
||||
the [Test Suite][ts] wiki page for details.
|
||||
|
||||
> Your offline machine must be connected to the Internet to retrieve and install
|
||||
> the above packages as described above. This is normally not a problem, as you
|
||||
> can simply take the machine offline permanently after the install is done,
|
||||
> preferably removing or disabling its network interfaces.
|
||||
##### Note for offline machines:
|
||||
|
||||
> 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
|
||||
> the following steps:
|
||||
The computer you’ve designated for offline use must be connected to the
|
||||
Internet to retrieve and install the above packages as described above. This
|
||||
is normally not a problem, as you can simply take it offline permanently after
|
||||
the install is done, preferably removing or disabling its network interfaces.
|
||||
|
||||
>> If your offline and offline machines have the same architecture, then you can
|
||||
>> download the Debian/Ubuntu packages and their dependencies on your online
|
||||
>> machine using `apt-get download`. Otherwise, you must retrieve the packages
|
||||
>> manually from `packages.debian.org` or `packages.ubuntu.com`.
|
||||
>>
|
||||
>> Download any required 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.
|
||||
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
|
||||
the following steps:
|
||||
|
||||
> If your offline and offline computers have the same architecture, then
|
||||
> download the Debian/Ubuntu packages and their dependencies on the online
|
||||
> one using `apt-get download`. Otherwise, retrieve the packages manually
|
||||
> from `packages.debian.org` or `packages.ubuntu.com`.
|
||||
>
|
||||
> Download any required Python packages using `pip3 download`, or manually
|
||||
> from [pypi.org][pi] if your online and offline computers have different
|
||||
> architecture.
|
||||
>
|
||||
> 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 --user`.
|
||||
>
|
||||
> Clone the [secp256k1][ec] repository and copy it to `~/.cache` directory on
|
||||
> the offline machine (or copy it from your online machine’s `~/.cache`).
|
||||
> Copy the MMGen repository to the offline machine and install MMGen as
|
||||
> described above. If your online and offline machines have different
|
||||
> architecture, then make sure to clean up any build/dist files in the
|
||||
> repositories before installing (in `secp256k1` this is accomplished by `make
|
||||
> clean`).
|
||||
|
||||
Congratulations, your installation is now complete! You can now proceed to
|
||||
[**Getting Started with MMGen**][gs].
|
||||
|
|
@ -74,5 +83,6 @@ Congratulations, your installation is now complete! You can now proceed to
|
|||
[02]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux
|
||||
[ts]: Test-Suite
|
||||
[gs]: Getting-Started-with-MMGen
|
||||
[03]: https://pypi.python.org/packages/source/p/pexpect/pexpect-3.1.tar.gz
|
||||
[P]: https://pypi.org/project/pip
|
||||
[pi]: https://pypi.org
|
||||
[af]: Altcoin-and-Forkcoin-Support
|
||||
[ec]: https://github.com/bitcoin-core/secp256k1.git
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ against the possibility of private data leakage.
|
|||
|
||||
With some extra steps, it’s possible to perform the installation on a machine
|
||||
that’s *already* offline. These steps will be additionally outlined in
|
||||
sections entitled “Offline users”. When doing an online install you may skip
|
||||
over these sections.
|
||||
sections entitled **Offline install.** When doing an online install you may
|
||||
skip over these sections.
|
||||
|
||||
### 1. Install MSYS2
|
||||
|
||||
|
|
@ -61,22 +61,21 @@ will produce a listing of the same directory.
|
|||
|
||||
#### Online users:
|
||||
|
||||
> Optionally download and edit your mirror lists as described in **Offline
|
||||
> users** below.
|
||||
> Optionally edit your mirror lists as described in **Offline install** below.
|
||||
|
||||
> Update the package database and core system packages:
|
||||
|
||||
$ pacman -Syu
|
||||
|
||||
> Exit and restart the terminal. If you’re using custom mirror lists, they were
|
||||
> overwritten by the update operation, so you must restore them from your
|
||||
> modified versions.
|
||||
> Exit and restart the terminal. If you’re using modified mirror lists, they
|
||||
> may have been overwritten by the update operation, in which case you should
|
||||
> restore them from your modified versions.
|
||||
|
||||
> Now complete updating the packages:
|
||||
> Now complete upgrading the system:
|
||||
|
||||
$ pacman -Su
|
||||
|
||||
#### Offline users:
|
||||
#### Offline install:
|
||||
|
||||
> You must now download the required database and package files from the
|
||||
> Internet on your online computer and copy them to your offline box. A USB
|
||||
|
|
@ -97,53 +96,50 @@ will produce a listing of the same directory.
|
|||
|
||||
$ ls /var/lib/pacman/sync
|
||||
|
||||
> Download up-to-date versions of these files from the MSYS2 project site:
|
||||
> Download up-to-date versions of these files from a fast MSYS2 mirror:
|
||||
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/x86_64/msys.db>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/x86_64/msys.db.sig>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw64.db>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw64.db.sig>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw32.db>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw32.db.sig>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/clang64/clang64.db>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/clang64/clang64.db.sig>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/ucrt64/ucrt64.db>
|
||||
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/ucrt64/ucrt64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db.sig>
|
||||
|
||||
> Copy the files to your offline machine as you did with the mirror files, replacing
|
||||
> the originals at `C:\msys64\var\lib\pacman\sync`.
|
||||
> Copy the files to your offline machine, replacing the originals at
|
||||
> `C:\msys64\var\lib\pacman\sync`.
|
||||
|
||||
> Now issue the following command:
|
||||
|
||||
$ pacman -Sup > urls.txt
|
||||
|
||||
> This command may cause your MSYS terminal window to close. If so, simply
|
||||
> This command may cause your MSYS terminal window to close. If so, just
|
||||
> reopen another one.
|
||||
|
||||
> The command's output is now saved in the file `urls.txt` (this redirection
|
||||
> trick using '>' works for most shell commands, by the way). Copy `urls.txt`
|
||||
> to your online machine and download the URLs listed in it. Transfer the
|
||||
> downloaded files to your offline machine, copying them to the package cache
|
||||
> directory `C:\msys64\var\cache\pacman\pkg`.
|
||||
> to your online machine and download the URLs listed in it.
|
||||
|
||||
> Now issue the following command to perform the initial upgrade:
|
||||
|
||||
$ pacman -Su
|
||||
|
||||
> When the process is finished, close your terminal window as requested and
|
||||
> reopen another one. If any mirror lists have have been added by the upgrade
|
||||
> operation, you may wish to edit them as you did above.
|
||||
|
||||
> Now reissue the `pacman -Sup` command, which will generate a much longer list
|
||||
> of URLs this time. Download the listed files on your online machine. Create
|
||||
> a new folder on your offline machine:
|
||||
> Create a new folder on your offline machine:
|
||||
|
||||
$ mkdir packages1
|
||||
|
||||
> Copy the downloaded package files to this folder and execute the following
|
||||
> command to install them:
|
||||
Transfer the downloaded package files to the offline machine and place them in
|
||||
this folder.
|
||||
|
||||
$ (cd packages1; pacman -U *)
|
||||
> Now issue the following command to install the packages:
|
||||
|
||||
$ pacman -U packages1/*
|
||||
|
||||
> When the process is finished, close your terminal window and reopen another
|
||||
> one.
|
||||
|
||||
> Now reissue the `pacman -Sup` command, which will generate a much longer list
|
||||
> of URLs this time. Repeat the same download/copy/install procedure with the
|
||||
> new URLs, only using a new `packages2` directory instead of `packages1`.
|
||||
|
||||
> Your system upgrade is now complete.
|
||||
|
||||
|
|
@ -152,30 +148,34 @@ will produce a listing of the same directory.
|
|||
Now that your system’s fully up to date, you’re ready to install the packages
|
||||
specifically required by MMGen.
|
||||
|
||||
#### Offline users:
|
||||
#### Offline install:
|
||||
|
||||
> The command `pacman -S <pgknames>` installs the requested MSYS2 packages,
|
||||
> while `pacman -Sp <pgknames>` prints a list of download URLs for the packages
|
||||
> and their dependencies. So before running the command shown below, you’ll
|
||||
> first need to issue it with `-Sp` instead of `-S` to produce a URL list.
|
||||
> Download these URLs on your online machine and copy and install the
|
||||
> downloaded files to the your offline machine just as you did in the previous
|
||||
> step, substituting `packages2` for `packages1` in both commands.
|
||||
> As you’ve probably noticed by now, the command `pacman -S <pgknames>`
|
||||
> installs MSYS2 packages and their dependencies, while `pacman -Sp
|
||||
> <pgknames>` prints a list of download URLs for the same packages and
|
||||
> dependencies. So before running the command shown below, you must first
|
||||
> issue it with `-Sp` instead of `-S` to produce a URL list. Then repeat the
|
||||
> above download/copy/install steps once again with the new URLs, replacing
|
||||
> `packages2` with `packages3`.
|
||||
|
||||
Install the packages and their dependencies:
|
||||
Install the MMGen requirements and their dependencies:
|
||||
|
||||
$ pacman -S tar git vim autoconf automake-wrapper autogen \
|
||||
mingw64/mingw-w64-x86_64-libtool \
|
||||
mingw64/mingw-w64-x86_64-pcre \
|
||||
mingw64/mingw-w64-x86_64-gcc \
|
||||
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-pcre \
|
||||
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-gcc
|
||||
mingw64/mingw-w64-x86_64-python-build \
|
||||
mingw64/mingw-w64-x86_64-python-wheel \
|
||||
mingw64/mingw-w64-x86_64-python-cryptography \
|
||||
mingw64/mingw-w64-x86_64-python-six \
|
||||
mingw64/mingw-w64-x86_64-python-pexpect \
|
||||
mingw64/mingw-w64-x86_64-python-gmpy2 \
|
||||
mingw64/mingw-w64-x86_64-python-pynacl \
|
||||
mingw64/mingw-w64-x86_64-python-pip \
|
||||
mingw64/mingw-w64-x86_64-python-pysocks \
|
||||
mingw64/mingw-w64-x86_64-python-requests
|
||||
|
||||
### 5. Set up your environment
|
||||
|
||||
|
|
@ -198,25 +198,15 @@ path):
|
|||
Save and exit. Close and reopen the terminal window to update your working
|
||||
environment.
|
||||
|
||||
### 6. Install MMGen dependencies not provided by MSYS2
|
||||
### 6. Install the Python ECDSA library (offline install only)
|
||||
|
||||
Four of MMGen’s Python dependencies, `ecdsa`, `py_ecc`, `mypy_extensions` and
|
||||
`socks`, are not provided by MSYS2. If you’re online, you can install them
|
||||
using the pip package installer as follows:
|
||||
On your online machine:
|
||||
|
||||
$ pip3 install --no-deps ecdsa==0.13 py_ecc==1.6.0 mypy_extensions==0.4.1 socks
|
||||
$ pip3 download ecdsa
|
||||
|
||||
For an offline install, first download the packages on your online machine like
|
||||
this:
|
||||
Copy the downloaded file to your offline machine and install:
|
||||
|
||||
$ pip3 download --no-deps ecdsa==0.13 py_ecc==1.6.0 mypy_extensions==0.4.1 socks
|
||||
|
||||
Then transfer the downloaded files to your offline machine, `cd` to the directory
|
||||
containing the files and install them as follows:
|
||||
|
||||
$ pip3 install --no-deps *.whl
|
||||
$ tar zxvf socks-0.tar.gz
|
||||
$ (cd socks-0; python3 setup.py install)
|
||||
$ pip3 install --user ecdsa-*.whl
|
||||
|
||||
### 7. Install the standalone scrypt package (required for strong password hashing)
|
||||
|
||||
|
|
@ -256,21 +246,18 @@ 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
|
||||
### 8. Clone and copy the secp256k1 library (offline install only)
|
||||
|
||||
On your online machine, clone the repository:
|
||||
On your online machine, clone the secp256k1 repository from Github:
|
||||
|
||||
$ 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.
|
||||
On your offline machine, create a magic location and copy the cloned secp256k1
|
||||
directory into it:
|
||||
|
||||
Enter the directory, configure, build and install:
|
||||
|
||||
$ cd secp256k1
|
||||
$ ./autogen.sh
|
||||
$ ./configure --disable-dependency-tracking
|
||||
$ mingw32-make.exe install MAKE=mingw32-make LIBTOOL=$(which libtool)
|
||||
$ mkdir -p ~/.cache/mmgen
|
||||
$ cp -a /path/to/secp256k1/repo/secp256k1 ~/.cache/mmgen
|
||||
$ ls ~/.cache/mmgen/secp256k1/autogen.sh # check that the location is correct
|
||||
|
||||
### 9. Install MMGen
|
||||
|
||||
|
|
@ -280,8 +267,8 @@ repository:
|
|||
$ git clone https://github.com/mmgen/mmgen
|
||||
Cloning into ’mmgen’...
|
||||
|
||||
If you’re doing an offline install, you can then copy the cloned mmgen directory
|
||||
to your offline machine.
|
||||
If you’re doing an offline install, then copy the cloned mmgen directory to
|
||||
your offline machine.
|
||||
|
||||
Enter the directory and install:
|
||||
|
||||
|
|
@ -298,7 +285,23 @@ before being pushed to the public repository, it’s not guaranteed to install o
|
|||
run on MSYS2. Installation or runtime issues may also arise due to missing
|
||||
dependencies or installation steps not yet covered in the documentation.
|
||||
|
||||
### 10. Install and launch your coin daemons
|
||||
### 10. Install Python Ethereum dependencies (Ethereum users only)
|
||||
|
||||
If you’ll be using MMGen with Ethereum, then you must install a few
|
||||
dependencies. From the MMGen repository root, type the following:
|
||||
|
||||
$ pip3 install --no-deps --user -r eth-requirements.txt
|
||||
|
||||
For an offline install, do this instead:
|
||||
|
||||
$ pip3 download --no-deps -r eth-requirements.txt
|
||||
|
||||
Then transfer the downloaded files to your offline machine, `cd` to the
|
||||
directory containing the files and install them as follows:
|
||||
|
||||
$ pip3 install --no-deps --user *.whl
|
||||
|
||||
### 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
|
||||
|
|
@ -326,7 +329,7 @@ Typically you’ll wish to launch OpenEthereum as follows:
|
|||
|
||||
More information on OpenEthereum’s command-line options can be found [here][pl].
|
||||
|
||||
### 11. You’re done!
|
||||
### 12. You’re done!
|
||||
|
||||
Congratulations, your installation is now complete, and you can proceed to
|
||||
[**Getting Started with MMGen**][gs]. Note that all features supported by
|
||||
|
|
|
|||
|
|
@ -1,65 +1,71 @@
|
|||
## Table of Contents
|
||||
|
||||
#### [Full support for Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens](#a_eth)
|
||||
* [Install and run OpenEthereum](#a_oe)
|
||||
* [Install Ethereum dependencies](#a_ed)
|
||||
#### [Introduction](#a_g)
|
||||
|
||||
#### [Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens](#a_eth)
|
||||
* [Install the Ethereum dependencies](#a_ed)
|
||||
* [Install and run Geth or OpenEthereum](#a_oe)
|
||||
* [Transacting and other basic operations](#a_tx)
|
||||
* [Creating and deploying ERC20 tokens](#a_dt)
|
||||
|
||||
#### [Full support for Bitcoin Cash Node (BCH) and Litecoin](#a_bch)
|
||||
#### [Bitcoin Cash Node (BCH) and Litecoin (LTC)](#a_bch)
|
||||
|
||||
#### [Monero (XMR)](#a_xmr)
|
||||
|
||||
#### [Key/address generation for Zcash (ZEC)](#a_zec)
|
||||
|
||||
#### [Key/address generation and wallet creation/syncing for Monero (XMR)](#a_xmr)
|
||||
#### [Key/address generation for 144 Bitcoin-derived altcoins](#a_kg)
|
||||
|
||||
#### [Key/address generation support for 144 Bitcoin-derived altcoins](#a_kg)
|
||||
### <a name='a_g'>Introduction</a>
|
||||
|
||||
### <a name='a_eth'>Full support for Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens</a>
|
||||
Depending on your setup, the instructions on this page may apply to your
|
||||
offline machine, your online machine, or both. If you’re confused as to
|
||||
which, please familiarize yourself with the basics of MMGen by reading the
|
||||
[**Getting Started**][gs] guide.
|
||||
|
||||
Ethereum, Ethereum Classic and ERC20 tokens are fully supported by MMGen, on the
|
||||
same level as Bitcoin. In addition, ERC20 token creation and deployment are
|
||||
supported via the `create-token.py` script.
|
||||
### <a name='a_eth'>Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens</a>
|
||||
|
||||
#### <a name='a_oe'>Install and run OpenEthereum</a>
|
||||
MMGen supports all operations for Ethereum, Ethereum Classic and ERC20 tokens.
|
||||
In addition, ERC20 token creation and deployment are supported via the
|
||||
`create-token.py` script.
|
||||
|
||||
MMGen uses OpenEthereum to communicate with the Ethereum blockchain. For
|
||||
information on installing OpenEthereum on your system, visit the OpenEthereum
|
||||
[wiki][ow] or [Git repository][og]. OpenEthereum is not used for transaction
|
||||
signing, so you needn’t install it on your offline machine.
|
||||
#### <a name='a_ed'>Install the Ethereum dependencies</a>
|
||||
|
||||
OpenEthereum 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:
|
||||
From the MMGen repository root, type:
|
||||
|
||||
--jsonrpc-hosts=all --jsonrpc-interface=<IP of OpenEthereum’s host>
|
||||
$ pip3 install --no-deps --user -r eth-requirements.txt
|
||||
|
||||
To transact Ethereum Classic, use `--chain=classic --jsonrpc-port=8555`
|
||||
#### <a name='a_oe'>Install and run Geth or OpenEthereum</a>
|
||||
|
||||
To run the daemon offline, use `--mode=offline`, otherwise `--mode=active`.
|
||||
MMGen can use either Go-Ethereum (Geth) or OpenEthereum to communicate with
|
||||
the Ethereum network. For information on installing Geth or OE on your
|
||||
system, visit the the Geth [Github repo][ge], or the OpenEthereum [wiki][ow]
|
||||
or [Github repo][og]. The daemons are not used for transaction signing, so
|
||||
you needn’t install them on your offline machine.
|
||||
|
||||
MMGen can also be used with OpenEthereum’s light client mode, which queries
|
||||
other nodes on the Ethereum network for blockchain data. Add the `--light`
|
||||
option to the OpenEthereum command line and read the applicable note in the
|
||||
[Transacting](#a_tx) section below.
|
||||
For Geth, the following command-line options are required:
|
||||
|
||||
You may require other options as well. Consult `openethereum --help` for the
|
||||
full list.
|
||||
--http --http.api=eth,web3,txpool --http.port=8745
|
||||
|
||||
#### <a name='a_ed'>Install Ethereum dependencies</a>
|
||||
Geth and OE have dropped support for Ethereum Classic, but MMGen supports
|
||||
transacting ETC via the legacy [Parity][pd] daemon. Invoke Parity with
|
||||
`--chain=classic --jsonrpc-port=8645`. Other command-line options are the
|
||||
same as for OpenEthereum.
|
||||
|
||||
Ensure that Python version 3.6 or above is installed on your system:
|
||||
If you’re running OE or Parity on a different machine from MMGen, add the
|
||||
following options to the daemon command line:
|
||||
|
||||
$ python3 --version
|
||||
--jsonrpc-hosts=all --jsonrpc-interface=<daemon IP address>
|
||||
|
||||
If the version is below 3.6.0, then you must upgrade the Python interpreter and
|
||||
Python dependencies listed in the [Install wiki][iw] before proceeding. Ubuntu
|
||||
users can do this by adding the Bionic repository to 'sources.list' and
|
||||
reinstalling the relevant packages with '-t bionic'
|
||||
To run OE or Parity offline, use `--mode=offline`, otherwise `--mode=active`.
|
||||
|
||||
Install the Ethereum-specific Python dependencies. The `--no-deps` option
|
||||
will prevent pip from installing a lot of unneeded stuff:
|
||||
MMGen can also be used with Parity’s light client mode, which queries other
|
||||
nodes on the 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.
|
||||
|
||||
$ sudo -H pip3 install --no-deps py_ecc==1.6.0 mypy_extensions==0.4.1
|
||||
You may require other options as well. Invoke your daemon with the `--help`
|
||||
switch for more complete information.
|
||||
|
||||
#### <a name='a_tx'>Transacting and other basic operations</a>
|
||||
|
||||
|
|
@ -82,8 +88,8 @@ Basic operations with ETH, ETC and ERC20 tokens work as described in the
|
|||
|
||||
##### Transacting example:
|
||||
|
||||
*Note: All addresses and filenames in the examples to follow are bogus. You
|
||||
must replace them with real ones.*
|
||||
*Note: All addresses and filenames in the examples to follow are bogus and
|
||||
must be replaced with real ones.*
|
||||
|
||||
Generate some ETH addresses with your default wallet:
|
||||
|
||||
|
|
@ -125,44 +131,23 @@ To transact ETH instead of EOS, omit the `--token` and `--token-addr` arguments.
|
|||
|
||||
##### Install the Solidity compiler
|
||||
|
||||
To deploy Ethereum contracts with MMGen, you need between **v0.5.1** and
|
||||
**v0.5.3** of the the Solidity compiler (`solc`) installed on your system. The
|
||||
best way to ensure you have the correct version is to compile it from source.
|
||||
Alternatively, on Ubuntu 18.04 systems a binary distribution is also available.
|
||||
Instructions for installing it are provided below.
|
||||
|
||||
##### *To compile solc from source:*
|
||||
To deploy Ethereum contracts with MMGen, you need version **0.8.7** of the
|
||||
Solidity compiler (`solc`) installed on your system. Although binary builds
|
||||
may be available for some distributions, the best way to ensure you have the
|
||||
correct version is to compile it from source.
|
||||
|
||||
Clone the repository and build:
|
||||
|
||||
$ git clone --recursive https://github.com/ethereum/solidity.git
|
||||
$ cd solidity
|
||||
$ git checkout v0.5.1 # or v0.5.3, if not Raspbian Stretch
|
||||
$ ./scripts/install_deps.sh # Raspbian Stretch: add `DISTRO='Debian'` after line 55
|
||||
$ git checkout v0.8.7
|
||||
$ ./scripts/install_deps.sh
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake -DUSE_CVC4=OFF -DUSE_Z3=OFF ..
|
||||
$ make solc
|
||||
$ make -j4 solc
|
||||
$ sudo install -v --strip solc/solc /usr/local/bin
|
||||
|
||||
##### *To install solc from binary distribution (Ubuntu 18.04):*
|
||||
|
||||
First add the following line to your /etc/apt/sources.list:
|
||||
|
||||
deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main
|
||||
|
||||
Now obtain the Ethereum PPA key `2A518C819BE37D2C2031944D1C52189C923F6CA9`
|
||||
from a PGP keyserver using your method of choice. Save the key to file, and
|
||||
then add it to your APT keyring as follows:
|
||||
|
||||
$ sudo apt-key add <key file>
|
||||
|
||||
Now you can proceed with the install:
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install solc
|
||||
$ solc --version # make sure the version is correct!
|
||||
|
||||
##### Create and deploy a token
|
||||
|
||||
*Note: All addresses and filenames in the examples to follow are bogus. You
|
||||
|
|
@ -193,10 +178,10 @@ View your MFT tracking wallet:
|
|||
|
||||
$ mmgen-tool --coin=eth --token=mft twview
|
||||
|
||||
Other token parameters can also be customized. Type `scripts/create-token.py --help`
|
||||
Other token parameters can be customized too. Type `scripts/create-token.py --help`
|
||||
for details.
|
||||
|
||||
### <a name='a_bch'>Full support for Bitcoin Cash Node (BCH) and Litecoin</a>
|
||||
### <a name='a_bch'>Bitcoin Cash Node (BCH) and Litecoin (LTC)</a>
|
||||
|
||||
Bitcoin Cash Node (BCH) and Litecoin are fully supported by MMGen, on the same
|
||||
level as Bitcoin.
|
||||
|
|
@ -212,6 +197,50 @@ MMGen requires that the bitcoin-bchn daemon be listening on non-standard
|
|||
Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
|
||||
commands. It’s that simple!
|
||||
|
||||
### <a name='a_xmr'>Monero (XMR)</a>
|
||||
|
||||
MMGen’s Monero support includes automated wallet creation/syncing and
|
||||
transaction creation/relaying via the `mmgen-xmrwallet` command. Make sure
|
||||
that [Monerod][M] is installed and running and that `monero-wallet-rpc` is
|
||||
located in your executable path.
|
||||
|
||||
*NOTE: by storing the Monero blockchain on a removable drive and installing
|
||||
Monerod on both your online and offline machines, it’s possible to perform
|
||||
wallet and transaction creation operations offline and thus avoid exposing
|
||||
private data on your online machine.*
|
||||
|
||||
To generate five Monero key/address pairs from your default wallet, invoke the
|
||||
following, making sure to answer ‘y’ at the Encrypt prompt:
|
||||
|
||||
$ mmgen-keygen --coin=xmr 1-5
|
||||
|
||||
In addition to spend and view keys, the resulting key/address file also
|
||||
includes a wallet password for each address (the double SHA256 hash of the
|
||||
spend key, truncated to 16 bytes).
|
||||
|
||||
Now create a Monero wallet for each address in the file by invoking the
|
||||
following command:
|
||||
|
||||
$ mmgen-xmrwallet create *XMR*.akeys.mmenc
|
||||
|
||||
Each wallet will be uniquely named using the address index and encrypted with
|
||||
the address’ unique wallet password. No user interaction is required during
|
||||
the creation process. By default, wallets are synced to the current block
|
||||
height, as they’re assumed to be empty, but this behavior can be overridden:
|
||||
|
||||
$ mmgen-xmrwallet --restore-height=123456 create *XMR*.akeys.mmenc
|
||||
|
||||
To keep your wallets in sync as the Monero blockchain grows, use the `sync`
|
||||
subcommand:
|
||||
|
||||
$ mmgen-xmrwallet sync *XMR*.akeys.mmenc
|
||||
|
||||
No user interaction is required here either, which is very helpful when you
|
||||
have multiple wallets requiring long sync times.
|
||||
|
||||
`mmgen-xmrwallet` supports transacting via the `sweep` and `transfer`
|
||||
subcommands. Type `mmgen-xmrwallet --help` for details.
|
||||
|
||||
### <a name='a_zec'>Key/address generation for Zcash (ZEC)</a>
|
||||
|
||||
MMGen’s enhanced support for Zcash includes generation of **z-addresses.**
|
||||
|
|
@ -231,56 +260,7 @@ To generate Zcash t-addresses, just omit the `--type` argument:
|
|||
|
||||
$ mmgen-keygen --coin=zec 1-10
|
||||
|
||||
### <a name='a_xmr'>Key/address generation and wallet creation/syncing for Monero (XMR)</a>
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
key in the key/address file by running the following command:
|
||||
|
||||
$ monero-wallet-cli --generate-from-spend-key MyMoneroWallet
|
||||
|
||||
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. 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:
|
||||
|
||||
$ mmgen-tool keyaddrlist2monerowallets *XMR*.akeys.mmenc
|
||||
|
||||
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:
|
||||
|
||||
$ mmgen-tool keyaddrlist2monerowallets *XMR*.akeys.mmenc blockheight=123456
|
||||
|
||||
To keep your wallets in sync as the Monero blockchain grows, `mmgen-tool`
|
||||
includes another utility:
|
||||
|
||||
$ mmgen-tool syncmonerowallets *XMR*.akeys.mmenc
|
||||
|
||||
This command also requires no user interaction, a very handy feature when you
|
||||
have a large batch of wallets requiring long sync times.
|
||||
|
||||
### <a name='a_kg'>Key/address generation support for 144 Bitcoin-derived altcoins</a>
|
||||
### <a name='a_kg'>Key/address generation for 144 Bitcoin-derived altcoins</a>
|
||||
|
||||
To generate key/address pairs for these coins, just specify the coin’s symbol
|
||||
with the `--coin` argument:
|
||||
|
|
@ -319,13 +299,15 @@ the MMGen Project.
|
|||
|
||||
[ow]: https://openethereum.github.io/wiki
|
||||
[og]: https://github.com/openethereum/openethereum/releases
|
||||
[pd]: https://github.com/openethereum/parity-ethereum/releases/tag/v2.7.2
|
||||
[y]: https://github.com/ethereum/pyethereum
|
||||
[P]: https://pypi.org/project/pip
|
||||
[M]: https://getmonero.org/downloads/#linux
|
||||
[U]: https://github.com/mmgen/MMGenLive/blob/master/home.mmgen/bin/mmlive-daemon-upgrade
|
||||
[X]: autosign-[MMGen-command-help]
|
||||
[gs]: Getting-Started-with-MMGen
|
||||
[bo]: Getting-Started-with-MMGen#a_bo
|
||||
[si]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux
|
||||
[bi]: Install-Bitcoind#a_d
|
||||
[p8]: Install-Bitcoind#a_r
|
||||
[iw]: Install-MMGen-on-Debian-or-Ubuntu-Linux
|
||||
[ge]: https://github.com/ethereum/go-ethereum
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ This tutorial provides a quick, hands-on introduction.
|
|||
1. Initialize MMGen regtest mode and start the regtest daemon:
|
||||
|
||||
$ mmgen-regtest setup
|
||||
$ mmgen-regtest start
|
||||
|
||||
2. Generate Bob’s MMGen wallet:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue