Example #1
0
(options, args) = parser.parse_args()

noseed_methods = ['generate', 'recover']
methods = ['display', 'displayall', 'summary'] + noseed_methods

if len(args) < 1:
	parser.error('Needs a wallet file or method')
	sys.exit(0)
load_program_config()

if args[0] in noseed_methods:
	method = args[0]
else:
	seed = args[0]
	method = ('display' if len(args) == 1 else args[1].lower())
	wallet = Wallet(seed, options.maxmixdepth, options.gaplimit)
	if method != 'showseed':
		common.bc_interface.sync_wallet(wallet)

if method == 'display' or method == 'displayall':
	total_balance = 0
	for m in range(wallet.max_mix_depth):
		print 'mixing depth %d m/0/%d/' % (m, m)
		balance_depth = 0
		for forchange in [0, 1]:
			print(' ' + ('receive' if forchange==0 else 'change') +
				' addresses m/0/%d/%d/' % (m, forchange))
			for k in range(wallet.index[m][forchange] + options.gaplimit):
				addr = wallet.get_addr(m, forchange, k)
				balance = 0.0
				for addrvalue in wallet.unspent.values():
Example #2
0
(options, args) = parser.parse_args()

noseed_methods = ['generate', 'recover']
methods = ['display', 'displayall', 'summary'] + noseed_methods

if len(args) < 1:
    parser.error('Needs a wallet file or method')
    sys.exit(0)
load_program_config()

if args[0] in noseed_methods:
    method = args[0]
else:
    seed = args[0]
    method = ('display' if len(args) == 1 else args[1].lower())
    wallet = Wallet(seed, options.maxmixdepth)
    if method != 'showseed':
        common.bc_interface.sync_wallet(wallet, options.gaplimit)

if method == 'display' or method == 'displayall':
    total_balance = 0
    for m in range(wallet.max_mix_depth):
        print 'mixing depth %d m/0/%d/' % (m, m)
        balance_depth = 0
        for forchange in [0, 1]:
            print(' ' + ('receive' if forchange == 0 else 'change') +
                  ' addresses m/0/%d/%d/' % (m, forchange))
            for k in range(wallet.index[m][forchange] + options.gaplimit):
                addr = wallet.get_addr(m, forchange, k)
                balance = 0.0
                for addrvalue in wallet.unspent.values():
Example #3
0
           ] + noseed_methods
noscan_methods = ['showseed', 'importprivkey']

if len(args) < 1:
    parser.error('Needs a wallet file or method')
    sys.exit(0)
load_program_config()

if args[0] in noseed_methods:
    method = args[0]
else:
    seed = args[0]
    method = ('display' if len(args) == 1 else args[1].lower())
    wallet = Wallet(seed,
                    options.maxmixdepth,
                    options.gaplimit,
                    extend_mixdepth=not maxmixdepth_configured,
                    storepassword=(method == 'importprivkey'))
    if method not in noscan_methods:
        common.bc_interface.sync_wallet(wallet)

if method == 'display' or method == 'displayall' or method == 'summary':

    def printd(s):
        if method != 'summary':
            print s

    total_balance = 0
    for m in range(wallet.max_mix_depth):
        printd('mixing depth %d m/0/%d/' % (m, m))
        balance_depth = 0
Example #4
0
noseed_methods = ['generate', 'recover']
methods = ['display', 'displayall', 'summary', 'showseed', 'importprivkey'] + noseed_methods
noscan_methods = ['showseed', 'importprivkey']

if len(args) < 1:
	parser.error('Needs a wallet file or method')
	sys.exit(0)
load_program_config()

if args[0] in noseed_methods:
	method = args[0]
else:
	seed = args[0]
	method = ('display' if len(args) == 1 else args[1].lower())
	wallet = Wallet(seed, options.maxmixdepth, options.gaplimit,
		extend_mixdepth=not maxmixdepth_configured, storepassword=(method=='importprivkey'))
	if method not in noscan_methods:
		common.bc_interface.sync_wallet(wallet)

if method == 'display' or method == 'displayall' or method == 'summary':
	def printd(s):
		if method != 'summary':
			print s
	total_balance = 0
	for m in range(wallet.max_mix_depth):
		printd('mixing depth %d m/0/%d/' % (m, m))
		balance_depth = 0
		for forchange in [0, 1]:
			printd(' ' + ('receive' if forchange==0 else 'change') +
				' addresses m/0/%d/%d/' % (m, forchange))
			for k in range(wallet.index[m][forchange] + options.gaplimit):
Example #5
0
noseed_methods = ['generate', 'recover']
methods = ['display', 'displayall', 'summary'] + noseed_methods

if len(args) < 1:
    parser.error('Needs a wallet file or method')
    sys.exit(0)
load_program_config()

if args[0] in noseed_methods:
    method = args[0]
else:
    seed = args[0]
    method = ('display' if len(args) == 1 else args[1].lower())
    wallet = Wallet(seed,
                    options.maxmixdepth,
                    options.gaplimit,
                    extend_mixdepth=not maxmixdepth_configured)
    if method != 'showseed':
        common.bc_interface.sync_wallet(wallet)

if method == 'display' or method == 'displayall':
    total_balance = 0
    for m in range(wallet.max_mix_depth):
        print 'mixing depth %d m/0/%d/' % (m, m)
        balance_depth = 0
        for forchange in [0, 1]:
            print(' ' + ('receive' if forchange == 0 else 'change') +
                  ' addresses m/0/%d/%d/' % (m, forchange))
            for k in range(wallet.index[m][forchange] + options.gaplimit):
                addr = wallet.get_addr(m, forchange, k)
                balance = 0.0