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

getaddressbalance JSON-RPC method #3157

Closed
4 tasks
Tracked by #3134
teor2345 opened this issue Dec 6, 2021 · 2 comments · Fixed by #4138
Closed
4 tasks
Tracked by #3134

getaddressbalance JSON-RPC method #3157

teor2345 opened this issue Dec 6, 2021 · 2 comments · Fixed by #4138
Assignees
Labels
A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes lightwalletd any work associated with lightwalletd

Comments

@teor2345
Copy link
Contributor

teor2345 commented Dec 6, 2021

Motivation

lightwalletd uses the getaddressbalance JSON-RPC method.

Required Fields

The method is documented here: https://zcash.github.io/rpc/getaddressbalance.html

lightwalletd always uses the multi-address argument format: https://github.com/zcash/lightwalletd/blob/master/frontend/service.go#L341

Request:

{
  "addresses:"
    [
      "address"  (string) The base58check encoded address
      ,...
    ]
}

And only these fields are used by lightwalletd: https://github.com/zcash/lightwalletd/blob/master/common/common.go#L124

Response:

{
  "balance"  (string) The current balance in zatoshis
}

Tasks

Implementation:

Testing:

  • Add RPC unit tests
  • Test that the RPC method works with lightwalletd
@ftm1000 ftm1000 added the S-needs-triage Status: A bug report needs triage label Feb 10, 2022
@ftm1000
Copy link

ftm1000 commented Feb 10, 2022

@ftm1000 ftm1000 removed the S-needs-triage Status: A bug report needs triage label Feb 21, 2022
@ftm1000 ftm1000 added lightwalletd any work associated with lightwalletd S-blocked Status: Blocked on other tasks and removed lightwalletd any work associated with lightwalletd labels Mar 16, 2022
@teor2345 teor2345 added A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes and removed S-blocked Status: Blocked on other tasks labels Mar 24, 2022
@jvff jvff self-assigned this Apr 1, 2022
@teor2345
Copy link
Contributor Author

teor2345 commented Apr 5, 2022

The state parts of this ticket aren't merged yet (#3963, #4022), but you could add a state request/response that returns a zero balance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces A-state Area: State / database changes lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants