mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
new flags for listaddresses
This commit is contained in:
parent
2b769b10da
commit
a103f59686
1 changed files with 6 additions and 3 deletions
|
@ -473,13 +473,15 @@ class Commands:
|
||||||
return results
|
return results
|
||||||
|
|
||||||
@command('w')
|
@command('w')
|
||||||
def listaddresses(self, show_all=False, show_labels=False, frozen=False, unused=False, funded=False, show_balance=False):
|
def listaddresses(self, receiving=False, change=False, show_labels=False, frozen=False, unused=False, funded=False, show_balance=False):
|
||||||
"""List wallet addresses. Returns your list of addresses."""
|
"""List wallet addresses. Returns your list of addresses."""
|
||||||
out = []
|
out = []
|
||||||
for addr in self.wallet.addresses(True):
|
for addr in self.wallet.addresses(True):
|
||||||
if frozen and not self.wallet.is_frozen(addr):
|
if frozen and not self.wallet.is_frozen(addr):
|
||||||
continue
|
continue
|
||||||
if not show_all and self.wallet.is_change(addr):
|
if receiving and self.wallet.is_change(addr):
|
||||||
|
continue
|
||||||
|
if change and not self.wallet.is_change(addr):
|
||||||
continue
|
continue
|
||||||
if unused and self.wallet.is_used(addr):
|
if unused and self.wallet.is_used(addr):
|
||||||
continue
|
continue
|
||||||
|
@ -582,7 +584,8 @@ command_options = {
|
||||||
'broadcast': (None, "--broadcast", "Broadcast the transaction to the Bitcoin network"),
|
'broadcast': (None, "--broadcast", "Broadcast the transaction to the Bitcoin network"),
|
||||||
'password': ("-W", "--password", "Password"),
|
'password': ("-W", "--password", "Password"),
|
||||||
'concealed': ("-C", "--concealed", "Don't echo seed to console when restoring"),
|
'concealed': ("-C", "--concealed", "Don't echo seed to console when restoring"),
|
||||||
'show_all': ("-a", "--all", "Include change addresses"),
|
'receiving': (None, "--receiving", "Show only receiving addresses"),
|
||||||
|
'change': (None, "--change", "Show only change addresses"),
|
||||||
'frozen': (None, "--frozen", "Show only frozen addresses"),
|
'frozen': (None, "--frozen", "Show only frozen addresses"),
|
||||||
'unused': (None, "--unused", "Show only unused addresses"),
|
'unused': (None, "--unused", "Show only unused addresses"),
|
||||||
'funded': (None, "--funded", "Show only funded addresses"),
|
'funded': (None, "--funded", "Show only funded addresses"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue