blockfrost / blockfrost-backend-ryo

Blockfrost API backend. You can now Run-Your-Own.
Apache License 2.0
66 stars 17 forks source link

Accounts' utxos #192

Open mmahut opened 1 month ago

mmahut commented 1 month ago

Let's add /accounts/:stake_address/utxos call if not too heavy.

slowbackspace commented 1 month ago

what's the use case? Could such an endpoint even work reliably? If a developer would use it to build a transaction then all I need to do to is sent ADA to my address (payment cred) with attached 3rd party (the developer's) stake cred and I'll break it.

The dev would need to verify that the utxos listed in this endpoint really belong to one of their addresses

Quantumplation commented 3 weeks ago

We maintain a tool called Sorbet that lets us emulate a wallet for the purposes of debugging.

The user enters an address and we use blockfrost to look up relevant UTXOs and then implement the CIP-30 interface.

Because of multi-address wallets, this means querying blockfrost for each address that has been associated with the stake address, and then querying the UTXOs for each one of those addresses. In very active wallets this results in hundreds of even thousands of API calls that are just going to return 0 UTXOs.

Being able to query UTXOs by stake address would dramatically simplify this. It's not perfect, and has corner cases like you outline, but since we have no hope of signing transactions from public information, and it's just for helping debug user issues etc., the concern is unlikely to be an issue.

Some alternatives that would work for us: