modified: Getting-Started-with-MMGen.md
modified: man-addrimport.md modified: man-txcreate.md
parent
ef8febe6f9
commit
089b90e19f
15 changed files with 192 additions and 94 deletions
|
|
@ -1,13 +1,13 @@
|
|||
## Table of Contents
|
||||
|
||||
#### <a href='#a_i'>Preliminaries</a>
|
||||
* <a href='#a_bb'>Before you begin</a>
|
||||
* <a href='#a_iv'>Invocation</a>
|
||||
* <a href='#a_cf'>Configuration file</a>
|
||||
* <a href='#a_ts'>Test setup and testnet</a>
|
||||
* <a href='#a_bb'>Before you begin</a>
|
||||
* <a href='#a_ts'>Testnet and regtest mode</a>
|
||||
|
||||
#### <a href='#a_bo'>Basic Operations</a>
|
||||
* <a href='#a_gw'>Generate a wallet</a>
|
||||
* <a href='#a_gw'>Generate an MMGen wallet</a>
|
||||
* <a href='#a_ga'>Generate addresses</a>
|
||||
* <a href='#a_ia'>Import addresses</a>
|
||||
* <a href='#a_ct'>Create a transaction</a>
|
||||
|
|
@ -29,6 +29,16 @@
|
|||
|
||||
### <a name='a_i'>Preliminaries</a>
|
||||
|
||||
#### <a name='a_bb'>Before you begin</a>
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
#### <a name='a_iv'>Invocation</a>
|
||||
|
||||
The MMGen wallet system is not a single program but a suite of lightweight
|
||||
|
|
@ -69,42 +79,81 @@ wish to edit at some point to customize MMGen to your needs. 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'>Test setup and testnet</a>
|
||||
#### <a name='a_ts'>Testnet and regtest mode</a>
|
||||
|
||||
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, however,
|
||||
as well as tracking balances, you'll need a fully synced blockchain and some
|
||||
actual coins to play with. To avoid risking real funds, it's *highly
|
||||
recommended* to practice transaction operations on testnet until you feel
|
||||
confident you know what you're doing. Testnet is just like the real Bitcoin
|
||||
network, but testnet coins have no monetary value. Free testnet coins may be
|
||||
obtained at [https://tpfaucet.appspot.com][02].
|
||||
If you want to practice creating, signing and sending transactions, however, as
|
||||
well as tracking balances, you'll need a fully synced blockchain and some actual
|
||||
coins to play with. To avoid risking real funds, it's *highly recommended* to
|
||||
practice transaction operations on [testnet][04] or in [regtest mode][05] until
|
||||
you feel confident you know what you're doing.
|
||||
|
||||
**Testnet** is just like the real Bitcoin network, but testnet coins have no
|
||||
monetary value. Free testnet coins may be obtained at
|
||||
[https://tpfaucet.appspot.com][02].
|
||||
|
||||
To use MMGen with testnet, you must first start bitcoind with the `-testnet`
|
||||
option and sync the testnet blockchain (about 12GB at the time of writing). To
|
||||
force any MMGen command to use testnet just add the `--testnet=1` option after
|
||||
the command name. Or just set the `testnet` option to `true` in 'mmgen.cfg' to
|
||||
make *all* commands use testnet.
|
||||
With testnet you can safely practice all the operations below,
|
||||
including the offline ones, on an online computer.
|
||||
make *all* commands use testnet. With testnet you can safely practice all the
|
||||
operations below, including the offline ones, on an online computer.
|
||||
|
||||
#### <a name='a_bb'>Before you begin</a>
|
||||
**Regtest mode** is a more convenient alternative to testnet that requires no
|
||||
Internet connection. In regtest mode, bitcoind creates a private blockchain on
|
||||
which you can mine, send and receive transactions. MMGen commands support
|
||||
regtest mode with the `--regtest=1` option or the `regtest` option in
|
||||
`mmgen.cfg`. The following is a brief guide to get you started with regtest
|
||||
mode:
|
||||
|
||||
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.
|
||||
Start the bitcoin daemon, generate 432 blocks to activate Segwit on the regtest
|
||||
chain and stop:
|
||||
|
||||
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.
|
||||
$ bitcoind -regtest -daemon
|
||||
$ bitcoin-cli -regtest generate 432
|
||||
$ bitcoin-cli -regtest stop
|
||||
|
||||
Move 'wallet.dat' out of harm's way (**important:** it's the 'wallet.dat' in the
|
||||
'regtest' directory under your bitcoin data directory being referred to here,
|
||||
**not** the one in your bitcoin data directory). Restart the daemon:
|
||||
|
||||
$ bitcoind -regtest -daemon
|
||||
|
||||
A new ‘wallet.dat’ will be created. This is your tracking wallet. Create an
|
||||
MMGen wallet, generate some MMGen addresses and import them into the tracking
|
||||
wallet <a href='#a_bo'>as described below</a>. Stop the daemon again:
|
||||
|
||||
$ bitcoin-cli -regtest stop
|
||||
|
||||
Move your tracking wallet (the new 'wallet.dat') out of harm's way and move the
|
||||
original 'wallet.dat' back. Restart the daemon, send some funds to one of your
|
||||
tracked addresses, mine a block and stop the daemon:
|
||||
|
||||
$ bitcoind -regtest -daemon
|
||||
$ bitcoin-cli -regtest sendtoaddress <a tracked address> 100.00
|
||||
$ bitcoin-cli -regtest generate 1
|
||||
$ bitcoin-cli -regtest stop
|
||||
|
||||
Replace the original 'wallet.dat' with your tracking wallet again, restart
|
||||
bitcoind and list your tracked addresses:
|
||||
|
||||
$ bitcoind -regtest -daemon
|
||||
$ mmgen-tool --regtest=1 listaddresses
|
||||
|
||||
Your address should now have a balance of 100 BTC. You may now practice creating
|
||||
and sending transactions to yourself <a href='#a_ct'>as described below</a>.
|
||||
After sending each transaction, you must mine a new block for the transaction to
|
||||
confirm:
|
||||
|
||||
$ bitcoin-cli -regtest generate 1
|
||||
|
||||
### <a name='a_bo'>Basic Operations</a>
|
||||
|
||||
#### <a name='a_gw'>Generate a wallet (offline computer)</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
|
||||
|
|
@ -119,7 +168,7 @@ as it frees you from having to type your wallet file on the command line.*
|
|||
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 a wallet:
|
||||
On your offline computer, generate an MMGen wallet:
|
||||
|
||||
$ mmgen-walletgen
|
||||
...
|
||||
|
|
@ -172,14 +221,23 @@ Now generate ten addresses with your just-created wallet:
|
|||
10 1H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
|
||||
}
|
||||
|
||||
NOTE: As of version 0.9.2, MMGen supports Segwit. To generate Segwit addresses,
|
||||
add `--type segwit` to the command line. Segwit address files are distinguished
|
||||
from Legacy ones by the ‘-S’ in the filename:
|
||||
|
||||
$ mmgen-addrgen --type segwit 1-10
|
||||
...
|
||||
$ cat '89ABCDEF-S[1-10].addrs'
|
||||
89ABCDEF SEGWIT {
|
||||
1 32GiSWo9zIQgkCmjAaLIrbPwXhKry2jHhj
|
||||
...
|
||||
|
||||
Note that the address range ‘1-10’ specified on the command line is included in
|
||||
the resulting filename. MMGen addresses consist of the Seed ID followed by ‘:’
|
||||
and an index. In this example, ‘89ABCDEF:1’ represents the Bitcoin address
|
||||
‘16bNmy...’, ‘89ABCDEF:2’ represents ‘1AmkUx...’ and so forth.
|
||||
the resulting filename.
|
||||
|
||||
To fund your MMGen wallet, first import the addresses into your tracking wallet
|
||||
and then spend some bitcoin into any of them. If you run out of addresses,
|
||||
generate more. To generate a hundred addresses, for example, specify an address
|
||||
and then spend some BTC into any of them. If you run out of addresses, generate
|
||||
more. To generate a hundred addresses, for example, you’d specify an address
|
||||
range of ‘1-100’.
|
||||
|
||||
Let’s say you’ve decided to spend some BTC into the first four addresses above.
|
||||
|
|
@ -233,12 +291,12 @@ empty balances, and `showbtcaddrs` causes Bitcoin addresses to be displayed
|
|||
also).
|
||||
|
||||
$ mmgen-tool listaddresses showempty=1 showbtcaddrs=1
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
89ABCDEF:1 16bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0
|
||||
89ABCDEF:2 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0
|
||||
89ABCDEF:3 1HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0
|
||||
89ABCDEF:4 14Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0
|
||||
89ABCDEF:5 1PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0
|
||||
MMGenID ADDRESS COMMENT BALANCE
|
||||
89ABCDEF:L:1 16bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0
|
||||
89ABCDEF:L:2 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0
|
||||
89ABCDEF:L:3 1HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0
|
||||
89ABCDEF:L:4 14Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0
|
||||
89ABCDEF:L:5 1PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0
|
||||
...
|
||||
TOTAL: 0 BTC
|
||||
|
||||
|
|
@ -248,17 +306,23 @@ track and spend funds from another wallet using MMGen without having to go
|
|||
through the network. To use it, you must save the keys corresponding to the
|
||||
addresses where the funds are stored in a separate file to use during signing.*
|
||||
|
||||
Note that each address has a unique ID (the ‘MMGen ID’) consisting of its Seed
|
||||
ID, its address type (‘L’ for Legacy, ‘S’ for Segwit), and its number (index).
|
||||
Legacy and Segwit addresses may be imported into the same tracking wallet;
|
||||
they're generated from different sub-seeds, so you needn't worry about key
|
||||
reuse.
|
||||
|
||||
Now that your addresses are being tracked, you may go ahead and send some BTC to
|
||||
them over the Bitcoin network. If you send 0.1, 0.2, 0.3 and 0.4 BTC
|
||||
respectively, for example, your address listing will look something like this
|
||||
after the transactions have been confirmed:
|
||||
respectively, your address listing will look like this after the transactions
|
||||
have confirmed:
|
||||
|
||||
$ mmgen-tool listaddresses
|
||||
MMGenID COMMENT BALANCE
|
||||
89ABCDEF:1 Donations 0.1
|
||||
89ABCDEF:2 Storage 1 0.2
|
||||
89ABCDEF:3 Storage 2 0.3
|
||||
89ABCDEF:4 Storage 3 0.4
|
||||
MMGenID COMMENT BALANCE
|
||||
89ABCDEF:L:1 Donations 0.1
|
||||
89ABCDEF:L:2 Storage 1 0.2
|
||||
89ABCDEF:L:3 Storage 2 0.3
|
||||
89ABCDEF:L:4 Storage 3 0.4
|
||||
TOTAL: 1 BTC
|
||||
|
||||
#### <a name='a_ct'>Create a transaction (online computer)</a>
|
||||
|
|
@ -266,8 +330,9 @@ after the transactions have been 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. If you're using testnet,
|
||||
then you risk nothing even when broadcasting transactions, of course.
|
||||
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 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,
|
||||
for example, and send the change back to yourself at address 89ABCDEF:5, you’d
|
||||
|
|
@ -278,6 +343,14 @@ issue the following command:
|
|||
Note that 'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as
|
||||
arguments.
|
||||
|
||||
IMPORTANT NOTE: For the time being, Legacy addresses are the default, so
|
||||
address ‘89ABCDEF:5’ is equivalent to ‘89ABCDEF:L:5’. In the future, users will
|
||||
have the option to make Segwit addresses the default, so that ‘89ABCDEF:5’ will
|
||||
be equivalent to ‘89ABCDEF:S:5’ and the ‘L’ will be required to specify a legacy
|
||||
address. This may seem confusing, but it was the best possible way to make
|
||||
the MMGen ID backwards-compatible for now while allowing users the option of
|
||||
a non-compatible upgrade in the future.
|
||||
|
||||
To send 0.1 BTC to each of your addresses 89ABCDEF:6 and 89ABCDEF:7 and return the
|
||||
change to 89ABCDEF:8, you’d do this:
|
||||
|
||||
|
|
@ -299,10 +372,10 @@ will look something like this:
|
|||
|
||||
UNSPENT OUTPUTS (sort order: Age) Total BTC: 1
|
||||
Num TX id Vout Address Amt(BTC) Age(d)
|
||||
1) e9742b16... 5 1L3kxmi.. 89ABCDEF:1 Donations 0.1 1
|
||||
2) fa84d709... 6 1N4dSGj.. 89ABCDEF:2 Storage 1 0.2 1
|
||||
3) 8dde8ef5... 6 1M1fVDc.. 89ABCDEF:3 Storage 1 0.3 1
|
||||
4) c76874c7... 0 1E8MFoC.. 89ABCDEF:4 Storage 3 0.4 1
|
||||
1) e9742b16... 5 1L3kxmi.. 89ABCDEF:L:1 Donations 0.1 1
|
||||
2) fa84d709... 6 1N4dSGj.. 89ABCDEF:L:2 Storage 1 0.2 1
|
||||
3) 8dde8ef5... 6 1M1fVDc.. 89ABCDEF:L:3 Storage 1 0.3 1
|
||||
4) c76874c7... 0 1E8MFoC.. 89ABCDEF:L:4 Storage 3 0.4 1
|
||||
|
||||
Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr
|
||||
Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen
|
||||
|
|
@ -313,8 +386,8 @@ After quitting the menu with 'q', you’ll see the following prompt:
|
|||
Enter a range or space-separated list of outputs to spend:
|
||||
|
||||
Here you must choose unspent outputs of sufficient value to cover the send
|
||||
amount of 0.1 BTC, plus the transaction fee (for more on fees, see 'Transaction
|
||||
Fees' under 'Advanced Topics' below). Output #2 is worth 0.2 BTC, which is
|
||||
amount of 0.1 BTC, plus the transaction fee (for more on fees, see ‘Transaction
|
||||
Fees’ under ‘Advanced Topics’ below). Output #2 is worth 0.2 BTC, which is
|
||||
sufficient, so we’ll choose that. After several more prompts and confirmations,
|
||||
your transaction will be saved:
|
||||
|
||||
|
|
@ -357,11 +430,11 @@ Once the transaction is broadcast to the network and confirmed, your address
|
|||
listing should look something like this:
|
||||
|
||||
$ mmgen-tool listaddresses minconf=1
|
||||
MMGenID COMMENT BALANCE
|
||||
89ABCDEF:1 Donations 0.1
|
||||
89ABCDEF:3 Storage 2 0.3
|
||||
89ABCDEF:4 Storage 3 0.4
|
||||
89ABCDEF:5 Storage 1 0.0999
|
||||
MMGenID COMMENT BALANCE
|
||||
89ABCDEF:L:1 Donations 0.1
|
||||
89ABCDEF:L:3 Storage 2 0.3
|
||||
89ABCDEF:L:4 Storage 3 0.4
|
||||
89ABCDEF:L:5 Storage 1 0.0999
|
||||
TOTAL: 0.8999 BTC
|
||||
|
||||
Since you’ve sent 0.1 BTC to a third party, your balance has declined by 0.1 BTC
|
||||
|
|
@ -810,3 +883,5 @@ them in turn until you get a confirmation:
|
|||
[01]: https://github.com/mmgen/mmgen/wiki/Tracking-and-spending-ordinary-Bitcoin-addresses
|
||||
[02]: https://tpfaucet.appspot.com
|
||||
[03]: Recovering-Keys-Without-MMGen
|
||||
[04]: https://bitcoin.org/en/developer-examples#testnet
|
||||
[05]: https://bitcoin.org/en/developer-examples#regtest-mode
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
'f' at offset 'o' (comma-separated)
|
||||
-O, --old-incog-fmt Specify old-format incognito input
|
||||
-K, --key-generator m Use method 'm' for public key generation
|
||||
Options: 1:python-ecdsa 2:keyconv 3:secp256k1 (default: 3)
|
||||
Options: 1:python-ecdsa 2:secp256k1 (default: 2)
|
||||
-l, --seed-len l Specify wallet seed length of 'l' bits. This option
|
||||
is required only for brainwallet and incognito inputs
|
||||
with non-standard (< 256-bit) seed lengths
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
-r, --usr-randchars n Get 'n' characters of additional randomness from user
|
||||
(min=10, max=80, default=30)
|
||||
-S, --stdout Print addresses to stdout
|
||||
-t, --type t Choose address type. Options: see ADDRESS TYPES below
|
||||
(default: 'L' or 'legacy')
|
||||
-v, --verbose Produce more verbose output
|
||||
|
||||
|
||||
|
|
@ -34,6 +36,9 @@
|
|||
|
||||
If available, the secp256k1 library will be used for address generation.
|
||||
|
||||
ADDRESS TYPES:
|
||||
'S', 'segwit'
|
||||
'L', 'legacy'
|
||||
|
||||
NOTES FOR ALL GENERATOR COMMANDS
|
||||
|
||||
|
|
@ -59,4 +64,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-ADDRGEN(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-ADDRGEN(1)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
OPTIONS:
|
||||
-h, --help Print this help message
|
||||
--longhelp Print help message for long options (common options)
|
||||
-a, --address a Import the single Bitcoin address 'a'
|
||||
-b, --batch Import all addresses in one RPC call.
|
||||
-l, --addrlist Address source is a flat list of (non-MMGen) Bitcoin addresses
|
||||
-k, --keyaddr-file Address source is a key-address file
|
||||
|
|
@ -17,4 +18,4 @@
|
|||
|
||||
The --batch and --rescan options cannot be used together.
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-ADDRIMPORT(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-ADDRIMPORT(1)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
'f' at offset 'o' (comma-separated)
|
||||
-O, --old-incog-fmt Specify old-format incognito input
|
||||
-K, --key-generator m Use method 'm' for public key generation
|
||||
Options: 1:python-ecdsa 2:keyconv 3:secp256k1 (default: 3)
|
||||
Options: 1:python-ecdsa 2:secp256k1 (default: 2)
|
||||
-l, --seed-len l Specify wallet seed length of 'l' bits. This option
|
||||
is required only for brainwallet and incognito inputs
|
||||
with non-standard (< 256-bit) seed lengths
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
-r, --usr-randchars n Get 'n' characters of additional randomness from user
|
||||
(min=10, max=80, default=30)
|
||||
-S, --stdout Print keys to stdout
|
||||
-t, --type t Choose address type. Options: see ADDRESS TYPES below
|
||||
(default: 'L' or 'legacy')
|
||||
-v, --verbose Produce more verbose output
|
||||
-x, --b16 Print secret keys in hexadecimal too
|
||||
|
||||
|
|
@ -38,6 +40,9 @@
|
|||
|
||||
If available, the secp256k1 library will be used for address generation.
|
||||
|
||||
ADDRESS TYPES:
|
||||
'S', 'segwit'
|
||||
'L', 'legacy'
|
||||
|
||||
NOTES FOR ALL GENERATOR COMMANDS
|
||||
|
||||
|
|
@ -63,4 +68,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-KEYGEN(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-KEYGEN(1)
|
||||
|
|
|
|||
|
|
@ -43,4 +43,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-PASSCHG(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-PASSCHG(1)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
'f' at offset 'o' (comma-separated)
|
||||
-O, --old-incog-fmt Specify old-format incognito input
|
||||
-L, --passwd-len l Specify length of generated passwords
|
||||
(default: 20 chars [base58], 24 chars [base32])
|
||||
(default: 20 chars [base58], 24 chars [base32]).
|
||||
An argument of 'h' will generate passwords of half
|
||||
the default length.
|
||||
-l, --seed-len l Specify wallet seed length of 'l' bits. This option
|
||||
is required only for brainwallet and incognito inputs
|
||||
with non-standard (< 256-bit) seed lengths
|
||||
|
|
@ -76,4 +78,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-PASSGEN(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-PASSGEN(1)
|
||||
|
|
|
|||
48
man-tool.md
48
man-tool.md
|
|
@ -10,27 +10,33 @@
|
|||
user (min=10, max=80)
|
||||
-v, --verbose Produce more verbose output
|
||||
|
||||
COMMANDS:
|
||||
Bitcoin address/key operations (compressed public keys supported):
|
||||
addr2hexaddr - convert Bitcoin address from base58 to hex format
|
||||
hex2wif - convert a private key from hex to WIF format
|
||||
hexaddr2addr - convert Bitcoin address from hex to base58 format
|
||||
privhex2addr - generate Bitcoin address from private key in hex format
|
||||
pubkey2addr - convert Bitcoin public key to address
|
||||
pubkey2hexaddr - convert Bitcoin public key to address in hex format
|
||||
randpair - generate a random private key/address pair
|
||||
randwif - generate a random private key in WIF format
|
||||
wif2addr - generate a Bitcoin address from a key in WIF format
|
||||
wif2hex - convert a private key from WIF to hex format
|
||||
COMMANDS
|
||||
|
||||
Wallet/TX operations (bitcoind must be running):
|
||||
Bitcoin address/key operations (compressed public keys supported):
|
||||
addr2hexaddr - convert Bitcoin address from base58 to hex format
|
||||
hex2wif - convert a private key from hex to WIF format
|
||||
hexaddr2addr - convert Bitcoin address from hex to base58 format
|
||||
privhex2addr - generate Bitcoin address from private key in hex format
|
||||
privhex2pubhex - generate a hex public key from a hex private key
|
||||
pubhex2addr - convert a hex pubkey to an address
|
||||
pubhex2redeem_script - convert a hex pubkey to a witness redeem script
|
||||
wif2redeem_script - convert a WIF private key to a witness redeem script
|
||||
wif2segwit_pair - generate both a Segwit redeem script and address from WIF
|
||||
pubkey2addr - convert Bitcoin public key to address
|
||||
randpair - generate a random private key/address pair
|
||||
randwif - generate a random private key in WIF format
|
||||
wif2addr - generate a Bitcoin address from a key in WIF format
|
||||
wif2hex - convert a private key from WIF to hex format
|
||||
|
||||
Wallet/TX operations (bitcoind must be running):
|
||||
getbalance - like 'bitcoin-cli getbalance' but shows confirmed/unconfirmed,
|
||||
spendable/unspendable balances for individual MMGen wallets
|
||||
listaddress - list the specified MMGen address and its balance
|
||||
listaddresses - list MMGen addresses and their balances
|
||||
txview - show raw/signed MMGen transaction in human-readable form
|
||||
twview - view tracking wallet
|
||||
|
||||
General utilities:
|
||||
General utilities:
|
||||
hexdump - encode data into formatted hexadecimal form (file or stdin)
|
||||
unhexdump - decode formatted hexadecimal data (file or stdin)
|
||||
bytespec - convert a byte specifier such as '1GB' into an integer
|
||||
|
|
@ -38,7 +44,8 @@
|
|||
hexreverse - reverse bytes of a hexadecimal string
|
||||
rand2file - write 'n' bytes of random data to specified file
|
||||
randhex - print 'n' bytes (default 32) of random data in hex format
|
||||
sha256x2 - compute a double sha256 hash of data
|
||||
hash256 - compute sha256(sha256(data)) (double sha256)
|
||||
hash160 - compute ripemd160(sha256(data)) (converts hexpubkey to hexaddr)
|
||||
b58randenc - generate a random 32-byte number and convert it to base 58
|
||||
b58tostr - convert a base 58 number to a string
|
||||
strtob58 - convert a string to base 58
|
||||
|
|
@ -47,7 +54,7 @@
|
|||
b32tohex - convert a base 32 number to hexadecimal
|
||||
hextob32 - convert a hexadecimal number to base 32
|
||||
|
||||
File encryption:
|
||||
File encryption:
|
||||
encrypt - encrypt a file
|
||||
decrypt - decrypt a file
|
||||
MMGen encryption suite:
|
||||
|
|
@ -55,7 +62,7 @@
|
|||
* Enc: AES256_CTR, 16-byte rand IV, sha256 hash + 32-byte nonce + data
|
||||
* The encrypted file is indistinguishable from random data
|
||||
|
||||
MMGen-specific operations:
|
||||
MMGen-specific operations:
|
||||
add_label - add descriptive label for MMGen address in tracking wallet
|
||||
remove_label - remove descriptive label for MMGen address in tracking wallet
|
||||
addrfile_chksum - compute checksum for MMGen address file
|
||||
|
|
@ -66,7 +73,7 @@
|
|||
id8 - generate 8-character MMGen ID for a file (or stdin)
|
||||
str2id6 - generate 6-character MMGen ID for a string, ignoring spaces
|
||||
|
||||
Mnemonic operations (choose 'electrum' (default), 'tirosh' or 'all'
|
||||
Mnemonic operations (choose 'electrum' (default), 'tirosh' or 'all'
|
||||
wordlists):
|
||||
mn_rand128 - generate random 128-bit mnemonic
|
||||
mn_rand192 - generate random 192-bit mnemonic
|
||||
|
|
@ -79,6 +86,9 @@
|
|||
IMPORTANT NOTE: Though MMGen mnemonics use the Electrum wordlist, they're
|
||||
computed using a different algorithm and are NOT Electrum-compatible!
|
||||
|
||||
To force a command to read from STDIN in place of its first argument (for
|
||||
supported commands), use '-' as the first argument.
|
||||
|
||||
Type 'mmgen-tool help <command> for help on a particular command
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TOOL(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TOOL(1)
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
with non-standard (< 256-bit) seed lengths.
|
||||
-k, --keys-from-file f Provide additional keys for non-MMGen addresses
|
||||
-K, --key-generator m Use method 'm' for public key generation
|
||||
Options: 1:python-ecdsa 2:keyconv 3:secp256k1
|
||||
(default: 3)
|
||||
Options: 1:python-ecdsa 2:secp256k1
|
||||
(default: 2)
|
||||
-M, --mmgen-keys-from-file f Provide keys for MMGen addresses in a key-
|
||||
address file (output of 'mmgen-keygen'). Permits
|
||||
online signing without an MMGen seed source. The
|
||||
|
|
@ -77,4 +77,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TXBUMP(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TXBUMP(1)
|
||||
|
|
|
|||
|
|
@ -44,4 +44,4 @@
|
|||
plain decimal number, or as satoshis per byte, using an integer followed by
|
||||
the letter 's'.
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TXCREATE(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TXCREATE(1)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
with non-standard (< 256-bit) seed lengths.
|
||||
-k, --keys-from-file f Provide additional keys for non-MMGen addresses
|
||||
-K, --key-generator m Use method 'm' for public key generation
|
||||
Options: 1:python-ecdsa 2:keyconv 3:secp256k1
|
||||
(default: 3)
|
||||
Options: 1:python-ecdsa 2:secp256k1
|
||||
(default: 2)
|
||||
-m, --minconf n Minimum number of confirmations required to spend
|
||||
outputs (default: 1)
|
||||
-M, --mmgen-keys-from-file f Provide keys for MMGen addresses in a key-
|
||||
|
|
@ -101,4 +101,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TXDO(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TXDO(1)
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
-q, --quiet Suppress warnings; overwrite files without prompting
|
||||
-y, --yes Answer 'yes' to prompts, suppress non-essential output
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TXSEND(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TXSEND(1)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
-z, --show-hash-presets Show information on available hash presets
|
||||
-k, --keys-from-file f Provide additional keys for non-MMGen addresses
|
||||
-K, --key-generator m Use method 'm' for public key generation
|
||||
Options: 1:python-ecdsa 2:keyconv 3:secp256k1 (default: 3)
|
||||
Options: 1:python-ecdsa 2:secp256k1 (default: 2)
|
||||
-M, --mmgen-keys-from-file f Provide keys for MMGen addresses in a key-
|
||||
address file (output of 'mmgen-keygen'). Permits
|
||||
online signing without an MMGen seed source. The
|
||||
|
|
@ -67,4 +67,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-TXSIGN(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-TXSIGN(1)
|
||||
|
|
|
|||
|
|
@ -42,4 +42,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-WALLETCHK(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-WALLETCHK(1)
|
||||
|
|
|
|||
|
|
@ -52,4 +52,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-WALLETCONV(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-WALLETCONV(1)
|
||||
|
|
|
|||
|
|
@ -45,4 +45,4 @@
|
|||
SeedFile .mmseed mmseed,seed,s
|
||||
Wallet .mmdat wallet,w
|
||||
|
||||
MMGEN v0.9.1 May 2017 MMGEN-WALLETGEN(1)
|
||||
MMGEN v0.9.2 July 2017 MMGEN-WALLETGEN(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue