iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
963 stars 575 forks source link

adds unspent notes count to wallet balance rpc, cli #4998

Closed hughy closed 4 months ago

hughy commented 4 months ago

Summary

updates the available balance calculation to also count the number of unspent notes

returns the unspent note count as 'availableNoteCount' from getBalance and getBalances

updates rpc responses for wallet/getBalance and wallet/getBalances to return availableNoteCount

updates wallet:balance and wallet:balances to display available note count when --explain and --all flags are used

Testing Plan

image image

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API Reference)? If yes, link a related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes
NullSoldier commented 4 months ago

This PR does require documentation change to add this to the RPC docs on our website or it won't show the new field in the example response.

hughy commented 4 months ago

This PR does require documentation change to add this to the RPC docs on our website or it won't show the new field in the example response.

Documentation changes here: https://github.com/iron-fish/website/pull/705