taproot-assets icon indicating copy to clipboard operation
taproot-assets copied to clipboard

bug: `AssetLeaves` RPC endpoint should return an error if the proof type argument is unspecified

Open ffranr opened this issue 1 year ago • 0 comments

Currently, if the proof type argument for the AssetLeaves RPC endpoint is unspecified, no proof leaves are returned. This is because a proof lookup is performed for a universe that does not exist (a universe which corresponds to the unspecified proof type).

The AssetLeaves RPC endpoint should return an error if the proof type argument is left unspecified. The proof type should be a required argument.

This issue was reported by a user on Slack, see: https://lightningcommunity.slack.com/archives/C03B3556HQ8/p1700664670126429

We should also add a proof type sanity check to universe.Archive.MintingLeaves.

This issue replaces issue https://github.com/lightninglabs/taproot-assets/issues/697 which was concerned with returning all proof types if none was specified.

ffranr avatar Nov 27 '23 21:11 ffranr