Open Roasbeef opened 3 months ago
This could be used in an integration for mempool.space etc
Existing product with similar queries: https://megalithic.me/taproot_assets_explorer?search=b8ef8e9030445fac119944190bf2f7a3026c9a12090fe8e422227577707d9ae1%3A0
Is your feature request related to a problem? Please describe.
Today users have two ways to query for a Universe leaf:
QueryProof
: allows to query based on a combination of: universe ID, script key, and also outpointAssetLeaves
: queries for the entire set of leaves for for a given IDWith just the behavior of the existing calls, there isn't an easy way to look up any asset related proofs given a txid/outpoint. Lack of such an API makes it harder to build a simpler overlay explorer (eg: click/hover an outpoint for extra info) for taproot assets.
Describe the solution you'd like
Resolve this TODO: https://github.com/lightninglabs/taproot-assets/blob/b154a998c8b1215310cdfb3e4f897a56cb4ee587/rpcserver.go#L5037-L5041
Additional context
The existing query partially supports this behavior: https://github.com/lightninglabs/taproot-assets/blob/b154a998c8b1215310cdfb3e4f897a56cb4ee587/tapdb/sqlc/queries/universe.sql#L56C10-L71
It needs to be made less strict, also allowing the namespace value to be unspecified.