Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: MintAsset returns the entire MintingBatch, not just the currently minted PendingAsset #1201

Open
ZZiigguurraatt opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request needs triage

Comments

@ZZiigguurraatt
Copy link

ZZiigguurraatt commented Nov 18, 2024

The response of MintAsset (https://lightning.engineering/api-docs/api/taproot-assets/mint/mint-asset/index.html) is a MintAssetResponse object that contains one field, pending_batch which contains the entire MintingBatch and not just the currently minted PendingAsset. Therefor, we have no idea what asset we just minted if there are more than one PendingAsset and the pending assets have the same name. Also, we get in the response all pending assets from the batch this newly minted asset is a part of, which is a bit confusing and does not seem like it is data we should expect when minting an asset (I'm not sure why other assets in the batch are relevant to be included in the response when we never asked for them).

I think MintAsset should only return a PendingAsset object for the currently minted asset. Also, I think the PendingAsset object should include a batch_key so that we can then find the MintingBatch this asset is part of using the ListBatches RPC (https://lightning.engineering/api-docs/api/taproot-assets/mint/list-batches/index.html), if we want to. Using ListBatches is a more intentional way to request information on pending batches than just automatically sending as part of a response to MintAsset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request needs triage
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants