mmgen-wallet/mmgen-tool
philemon 242ff6acfa Version 0.7.4
Additions/improvements:

  mmgen-txsign     - sign multiple transactions in one operation

  mmgen-addrimport - skip rescanning block chain for new addresses

  mmgen-tool - new functions:

    Bitcoind operations:
    listaccounts - like 'bitcoind listaccounts' but shows MMGen wallet balances
                   too
    getbalance   - like 'bitcoind getbalance' but shows confirmed/unconfirmed,
                   spendable/unspendable

    MMGen-specific operations:
    id8          - generate 8-character MMGen ID checksum for file (or stdin)
    id6          - generate 6-character MMGen ID checksum for file (or stdin)
2014-07-21 10:20:15 +04:00

69 lines
2.1 KiB
Python
Executable file

#!/usr/bin/env python
#
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
# Copyright (C) 2013 by philemon <mmgen-py@yandex.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
mmgen-tool: Perform various Bitcoin-related operations - part of the MMGen suite
"""
import sys, os
from hashlib import sha256
from mmgen.Opts import *
import mmgen.config as g
from mmgen.util import pretty_hexdump
from mmgen.tool import *
prog_name = sys.argv[0].split("/")[-1]
help_data = {
'prog_name': prog_name,
'desc': "Perform various BTC-related operations",
'usage': "[opts] <command> <args>",
'options': """
-h, --help Print this help message
-q, --quiet Produce quieter output
-v, --verbose Produce more verbose output
COMMANDS:{}
Type '{} <command> --help for usage information on a particular
command
""".format(command_help,prog_name)
}
short_opts = "hqv"
long_opts = "help","quiet","verbose"
opts,cmd_args = process_opts(sys.argv,help_data,short_opts,long_opts)
if 'quiet' in opts: g.quiet = True
if 'verbose' in opts: g.verbose = True
if len(cmd_args) < 1:
usage(help_data)
sys.exit(1)
else: command = cmd_args.pop(0)
if command not in commands.keys():
msg("'%s': No such command" % command)
sys.exit(1)
if cmd_args and cmd_args[0] == '--help':
tool_usage(prog_name, command)
sys.exit(0)
args = process_args(prog_name, command, cmd_args)
#print command + "(" + ", ".join(args) + ")"
eval(command + "(" + ", ".join(args) + ")")