Examples:
# List available assets:
$ mmgen-swaptxcreate -S
# Create a Tether-to-LTC swap transaction for autosigning, connecting to the
# swap quote server via Tor:
$ mmgen-swaptxcreate --autosign --proxy=localhost:9050 ETH.USDT 1000 LTC
# After signing, send the transaction via public Etherscan proxy over Tor:
$ mmgen-txsend --autosign --quiet --tx-proxy=etherscan --proxy=localhost:9050
# After sending, check the transaction status and receipt:
$ mmgen-txsend --autosign --verbose --status
# Create a Tether-to-DAI swap transaction, with explicit destination account:
$ mmgen-swaptxcreate ETH.USDT 1000 ETH.DAI E:01234ABC:3
Testing:
$ test/cmdtest.py -e ethswap
- the HTML transaction broadcast form is used, so no API key is required
- the request can be proxied through Tor
- availability of the service can be checked with the --test option
Example:
# check availability:
$ mmgen-txsend --autosign --coin=eth --tx-proxy=etherscan --proxy=localhost:9050 --test
# send:
$ mmgen-txsend --autosign --coin=eth --tx-proxy=etherscan --proxy=localhost:9050
Testing:
$ test/cmdtest.py --coin=eth -e -X txsend_etherscan ethdev
- decrypt the encrypted private key in a Geth keystore wallet and output
the decrypted key in hexadecimal format
Usage:
$ mmgen-tool extract_key_from_geth_wallet geth-keystore-wallet.json
Testing:
$ test/test.py -e tool_extract_key_from_geth_wallet
Asynchronous HTTP significantly speeds up operations involving multiple
JSON-RPC calls to the server, such as tracking wallet views for wallets
with a large number of outputs.
This patch adds base-level asyncio infrastructure plus aiohttp support to all
applicable MMGen commands.
The aiohttp package is not currently supported by MSYS2, so Windows users will
have to choose one of the other backends ('curl' is the default).
Tested on: Linux, Armbian, Windows; Python 3.6, 3.7, 3.8
New user features:
- configurable RPC backends via the 'rpc_backend' option. Supported
options are 'aiohttp' (Linux-only), 'httplib', 'requests' and 'curl'
- configurable RPC queue size via the 'aiohttp_rpc_queue_len' option
The patch also includes a rewrite/redesign of large parts of the MMGen code
base, most importantly:
- rpc.py - full rewrite of RPC library, new RPCBackends class
- main_addrimport.py - full rewrite
- main_autosign.py - LED code now handled by new LEDControl class
- eth/tw.py, eth/tx.py - reworked logic for resolving token symbols and
addresses
- eth/tx.py - separate classes for signed and unsigned transactions
Testing:
# Set a backend (choose one):
$ export MMGEN_RPC_BACKEND='aiohttp' # Linux-only
$ export MMGEN_RPC_BACKEND='curl' # Windows
$ export MMGEN_RPC_BACKEND='httplib' # compare performance with 'aiohttp'
# Bitcoin:
$ test/unit_tests.py rpc btc
$ test/test.py main regtest autosign
# Ethereum:
$ test/unit_tests.py rpc eth
$ test/tooltest2.py --coin=eth --testnet=1 txview
$ test/test.py --coin=eth ethdev
# Monero wallet:
$ test/unit_tests.py rpc xmr_wallet
$ test/test-release.sh -F xmr
- activated for Ethereum only, but framework exists for all coins
- both session caching and persistent caching in the wallet are supported
- network-destined RPC calls are never repeated in a given invocation
- RPC balance lookups can be suppressed entirely with --cached-balances
- A password is now generated for each privkey in Ethereum key-address list
- As with Monero wallet passwords (df03851), password is first 16 bytes of
SHA256x2(privkey)
- Password can be used with geth's private.importRawKey() method to create a
relatively secure online wallet. Unlock using private.unlockAccount()
- supported commands:
- mmgen-addrgen
- mmgen-keygen (decrypt encrypted key-addr files with `mmgen-tool decrypt`)
- mmgen-tool addrfile_chksum, keyaddrfile_chksum
- ETH and ETC keys are distinct, so users needn't worry about key reuse
- Only Zcash-t addresses supported for now (but z-addresses coming soon)
- Test the new functionality with `scripts/test-release.sh -Pn master alts`