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

[feature]: add asset metadata to unsigned minting group virtual PSBT #1298

Open
ffranr opened this issue Jan 14, 2025 · 4 comments
Open

[feature]: add asset metadata to unsigned minting group virtual PSBT #1298

ffranr opened this issue Jan 14, 2025 · 4 comments
Labels
enhancement New feature or request minting psbt

Comments

@ffranr
Copy link
Contributor

ffranr commented Jan 14, 2025

This PR introduces support for asset group key signatures using an external key during asset minting: #1272.

To enhance functionality, the unsigned PSBT generated during the minting process should include additional asset metadata, such as:

  • Asset ID
  • Asset name
  • Units to be minted

This enrichment would allow external signing software to display helpful asset metadata, providing more transparency and usability during the signing process.

We can add arbitrary fields to psbt.Packet.Unknowns.

Shaping TODO

We need additional shaping on the following:

  1. Decide on a global key prefix to ensure uniqueness and avoid conflicts.
  2. Define the exact fields that need to be included.
  3. Determine how to encode the Value for these fields as bytes. Value field encoding needs to be easy for hardware signers to decode.
@ffranr
Copy link
Contributor Author

ffranr commented Jan 14, 2025

We might want to run this by hardware wallet builders, see what they might to have included as metadata.

Do we need a timestamp to aid in record keeping?

@ZZiigguurraatt
Copy link

Is it guaranteed that the metadata will be returned back in the signed PSBT? Seems like the signer has some freedom to remove that kind of information from the PSBT?

@guggero
Copy link
Member

guggero commented Jan 15, 2025

Yes, according to the PSBT BIP some fields should be removed after adding the signature (or better the final signature, so all signers still see the metadata until the final one constructs the final witness).
But that shouldn't matter, since the metadata is for the signing device itself. Once it's signed, we don't need it anymore.

@ZZiigguurraatt
Copy link

Well, I guess I was wondering if the asset ID could be passed along to the final PSBT, then with #1295 the asset ID could be decoded automatically and then the user would not need to pass the assetid when sealing the batch. Since the metadata can be removed from the PSBT once the final signature is added, it seems there is no way to avoid the need for the user to pass the asset ID when sealing the batch?

@Roasbeef Roasbeef changed the title [feature]: add asset metadata to unsigned minting group virstual PSBT [feature]: add asset metadata to unsigned minting group virtual PSBT Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minting psbt
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants