Bind an Elements asset issuance to its intended transaction input
An issuance is attached to an input of an Elements transaction. A test issuer should record the issuance input and contract hash alongside the new asset ID before another system refers to it.
Construct an unsigned issuance fixture
Use an Elements regtest transaction template containing the intended input. Supply two test destination addresses and a 32-byte contract hash in hex. This constructs an issuance of 100 asset units and one reissuance token without submitting the transaction.
spec=$(jq -cn --arg a "$ASSET_ADDR" --arg t "$TOKEN_ADDR" --arg h "$CONTRACT_HASH" '[{asset_amount:100,asset_address:$a,token_amount:1,token_address:$t,contract_hash:$h}]')
elements-cli rawissueasset "$TEMPLATE_HEX" "$spec" | jq '.[] | {vin,asset,token,entropy}'
Keep the identities distinct
The result identifies the input position, asset, reissuance token and entropy. A different contract hash changes the issuance definition and can change the asset ID. An ID computed from an unsigned template is a candidate identity. Verify the actual confirmed issuance before listing the asset as live.