XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 510 forks source link

Method to retrieve account reserves #2187

Open tequdev opened 1 year ago

tequdev commented 1 year ago

Currently the method to retrieve the XRP balance for an account retrieves the XRP balance including reserves.

I suggest to add a method to retrieve the available XRP balance excluding reserves or a method to retrieve the account's reserves.

reserve = reserve_base_xrp + reserve_inc_xrp * OwnerCount

Related

ckniffen commented 1 year ago

Do you see this as a utility that is passed server_info values and the account_info response and it calculates it or something more robust?

tequdev commented 1 year ago

I assumed that it would be calculated from the server_info and account_info results, but if there is a more robust one, that is fine too.