go
go copied to clipboard
services/soroban-rpc: getAccount method v2 (balances)
Building on the jsonrpc getAccount method in #4556. The getAccount method should include the account's balances. The complication with balances is smart/classic.
We need to decide what to do about smart vs classic asset balances so that assets don't "disappear" when bridging between smart/classic. There are a few "host functions" in the soroban runtime, which move assets between their "classic" representations (which can be used by stellar as-is), and their "smart" representations (which can be used by smart contracts). This basically means that users now have 2 balances for each asset. We should figure out how to handle this in Horizon.
Some options:
- Ignore it. Not very compelling and will drive user support as their assets "disappear" on horizon when they move it to a smart contract.
- Get their assets from the smart contract ledger entries, and: a. Add it into the classic balance. This would keep the API the same. b. Show two separate balances. This is the most explicit, but changes the API.