Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPC] Add listaddresses #842

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

CaveSpectre11
Copy link
Collaborator

Problem

There is no real handy way to see your stealth addresses

Solution

Add listaddresses, which will return your basecoin and stealth addresses, and your stealth change address if it has a balance.

Testing

$ veil-cli help listaddresses
listaddresses (type)

Lists addresses in the wallet Address Book.

Arguments:
1. "type"       (string, optional) receive - all receive addresses (default).
                                   balances - all receive addresses with balances.

Result:
[
  {
    "address",  (string)  The veil address
    amount,     (numeric) The amount in VEIL
    "label"     (string)  The label
  }
  ,...
]

Examples:
> veil-cli listaddresses
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:58812/
.$ veil-cli listaddresses
[
  {
    "address": "bv...",
    "amount": 0.00000000,
    "label": "Label 1"
  },
  {
    "address": "bv...",
    "amount": 1.00000000,
    "label": "Label 2"
  },
  {
    "address": "bv...",
    "amount": 0.00000000,
    "label": "Label 3"
  },
  {
    "address": "sv1qqpxazw8vnxv5wrswqs0g0xntwcaezqutse8gsy8ycuwykpw9pjhkdspq29jt3megknpu38zl5r58pfl96vr56596es3gpx4ey4xaad2shjpcqqqgh8ut0",
    "amount": 0.00000000,
    "label": "Donations"
  },
  {
    "address": "sv1...",
    "amount": 0.00000000,
    "label": "stealth"
  },
  {
    "address": "sv1qqpj9l2f883k7ucs88xdzrcuus8wr6jzrnk85quv3p2u90zwyy6d5tqpq0fl2ksmvlsf5hfddf8ezqnph5q6zf05cmac28g6ytafdzp8aufsuqqqwk9ep3",
    "amount": 0.00000000,
    "label": "Dev Bounty"
  },
  {
    "address": "sv...",
    "amount": 0.00000000,
    "label": "Stealth 2"
  },
  {
    "address": "sv...",
    "amount": 2.00513045,
    "label": "<stealth change address>"
  }
]
$ veil-cli listaddresses balances
[
  {
    "address": "bv...",
    "amount": 1.00000000,
    "label": "Label 2"
  },
  {
    "address": "sv...",
    "amount": 2.00513045,
    "label": "<stealth change address>"
  }
]

@CaveSpectre11 CaveSpectre11 added Component: RPC Related to the console commands themselves. Tag: Waiting For Code Review Waiting for code review from a core developer labels Aug 30, 2020
@CaveSpectre11 CaveSpectre11 self-assigned this Aug 30, 2020
@CaveSpectre11
Copy link
Collaborator Author

This partially addresses #772

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 91e5bdc

@codeofalltrades codeofalltrades added Code Review: Passed and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Aug 31, 2020
@codeofalltrades codeofalltrades merged commit 3810f89 into Veil-Project:master Aug 31, 2020
CaveSpectre11 added a commit that referenced this pull request Sep 5, 2020
424689e [RPC] Add listaddresses (Cave Spectre)

Pull request description:

  Merge #842 to 1.1

Tree-SHA512: c88f72f5502f38c0c0b6c96b3ec1daad9f1ce4783867e9f14956d1b10bfcf741f0b4cd6b1ab95acfb62e17d5468290cc2219c6718fd47c65afdfbfd66548d220
@CaveSpectre11 CaveSpectre11 deleted the listaddresses branch October 4, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Review: Passed Component: RPC Related to the console commands themselves.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants