Skip to content

[requires fork] Elements should have a jet to access input asset ID for reissuances #327

Description

@apoelstra

Elements has some annying logic for reissuances in which you are required to spend a confidential output containing a reissuance token, but you must reveal the blinding factor, in order to do a reissuance.

This is crazy but requires a hardfork to fix.

Meanwhile, for contracts to assert on the input type of a reissuance token, they need to reimplement the unblinding logic in Simplicity. (Or hack the crypto by doing ugly/inflexible/poorly-supported-by-wallets things like enforcing that an output asset have exactly the same commitment as an input asset.)

Anyway we ought to have a jet to do this work. Unsure where the best place to post "jet wishlist" issues is.

Activity

  1. roconnor-blockstream commented on Jan 6, 2026

    @roconnor-blockstream
    Collaborator

    I think the issuanceToken jet is supposed to do what you want

  2. roconnor-blockstream commented on Jan 6, 2026

    @roconnor-blockstream
    Collaborator

    Also contract can just hard code the reissuance token ID. So long as you know know the prevout of the input to create the token, and the entropy you will add, the wallet can compute the reissuance token ID, and then hard code it into the covenant.

  3. apoelstra commented on Jan 6, 2026

    @apoelstra
    CollaboratorAuthor

    You don't know this data until after the tokens are issued (and they are supposed to be issued directly into a contract).

    I guess you could do a two-stage issuance: first into an ordinary address and then into a contract where the relevant constants are hardcoded. Overall this would be much more efficient.

  4. roconnor-blockstream commented on Jan 6, 2026

    @roconnor-blockstream
    Collaborator

    I initially though you'd need a two-stage issuance as well, but I'm pretty sure you don't. You just need to know what prevout will be used as the input that does the issuance, and the contract hash that you will be using. This is all available.

  5. apoelstra commented on Jan 6, 2026

    @apoelstra
    CollaboratorAuthor

    Ahh, yes, I think you're correct.

  6. roconnor-blockstream commented on Jan 6, 2026

    @roconnor-blockstream
    Collaborator

    @KyrylR You can (and should) take Token IDs and Asset IDs as parameters in your smart contracts, and have the wallet compute these values. They are a function of the prevout of input that will be used to issue them, and the contractHash you will be providing. Generally speaking, any computation that can be pulled out of Simplicity, should be pulled out of Simplicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions