new 'set' command for the CLI
This commit is contained in:
parent
bb74a6c393
commit
d0a6e244b1
12
electrum
12
electrum
|
@ -82,6 +82,8 @@ options:\n --fee, -f: set transaction fee\n --fromaddr, -s: send from address
|
||||||
'Verifies a signature\nSyntax: verifymessage <address> <signature> <message>\nIf you want to lead or end a message with spaces, or want double spaces inside the message make sure you quote the string. I.e. " Hello This is a weird String "',
|
'Verifies a signature\nSyntax: verifymessage <address> <signature> <message>\nIf you want to lead or end a message with spaces, or want double spaces inside the message make sure you quote the string. I.e. " Hello This is a weird String "',
|
||||||
'eval':
|
'eval':
|
||||||
"Run python eval() on an object\nSyntax: eval <expression>\nExample: eval \"wallet.aliases\"",
|
"Run python eval() on an object\nSyntax: eval <expression>\nExample: eval \"wallet.aliases\"",
|
||||||
|
'set':
|
||||||
|
"Set wallet parameter. (gui)",
|
||||||
'deseed':
|
'deseed':
|
||||||
"Remove seed from the wallet. The seed is stored in a file that has the name of the wallet plus '.seed'",
|
"Remove seed from the wallet. The seed is stored in a file that has the name of the wallet plus '.seed'",
|
||||||
'reseed':
|
'reseed':
|
||||||
|
@ -98,7 +100,7 @@ offline_commands = [ 'password', 'mktx',
|
||||||
'label', 'contacts',
|
'label', 'contacts',
|
||||||
'help', 'validateaddress',
|
'help', 'validateaddress',
|
||||||
'signmessage', 'verifymessage',
|
'signmessage', 'verifymessage',
|
||||||
'eval', 'create', 'addresses',
|
'eval', 'set', 'create', 'addresses',
|
||||||
'import', 'seed',
|
'import', 'seed',
|
||||||
'deseed','reseed',
|
'deseed','reseed',
|
||||||
'freeze','unfreeze',
|
'freeze','unfreeze',
|
||||||
|
@ -418,6 +420,14 @@ if __name__ == '__main__':
|
||||||
print eval(args[1])
|
print eval(args[1])
|
||||||
wallet.save()
|
wallet.save()
|
||||||
|
|
||||||
|
elif cmd == 'set':
|
||||||
|
key, value = args[1:3]
|
||||||
|
if key in ['gui', 'server', 'proxy', 'fee', 'gap_limit', 'use_change']:
|
||||||
|
wallet.config.set_key(key, value, True)
|
||||||
|
print True
|
||||||
|
else:
|
||||||
|
print False
|
||||||
|
|
||||||
elif cmd in [ 'addresses']:
|
elif cmd in [ 'addresses']:
|
||||||
for addr in wallet.all_addresses():
|
for addr in wallet.all_addresses():
|
||||||
if options.show_all or not wallet.is_change(addr):
|
if options.show_all or not wallet.is_change(addr):
|
||||||
|
|
Loading…
Reference in New Issue