Python-Cardano / pycardano

A lightweight Cardano library in Python
https://pycardano.readthedocs.io
MIT License
216 stars 71 forks source link

FR: Generalize ChainContext.utxos for TransactionInput and addresses #207

Open nielstron opened 1 year ago

nielstron commented 1 year ago

Is your feature request related to a problem? Please describe. In general most backends are able to map a specific transaction id to a UTxO and an address to a set of UTxOs. Some backends even provide optimized code to fetch specific patterns (like kupo) or to fetch several addresses (like the cli)

Describe the solution you'd like Extending ChainContext.utxos to support all of

And use additional context for optimization.

Describe alternatives you've considered None

Additional context None

nielstron commented 1 year ago

Note for example that BF also supports fetching specific tx_ids https://docs.blockfrost.io/#tag/Cardano-Scripts/paths/~1scripts~1datum~1%7Bdatum_hash%7D~1cbor/get