vulpemventures / go-elements

Go support for Liquid/Elements transactions
MIT License
27 stars 12 forks source link

Zero asset issuance #194

Closed sekulicd closed 2 years ago

sekulicd commented 2 years ago

This adds fix for issuing zero value asset issuance. Both blinded and unblinded zero value assets are supported. Changes includes removing asset output if asset amount is zero and logic for calculating minValue for rangeProof which is decided based on scriptPubKey, check in here

This closes #190

@tiero @altafan please review.

altafan commented 2 years ago

@sekulicd watch out! AddIssuanceArgs.validate() still expects the asset address to be mandatory, while now it should be like that only in case the asset amount is > 0 (just like we do for the token the lines below). Then in TestBroadcastUnblindedZeroAssetValueIssuanceTx we can avoid to pass an AssetAddress.

sekulicd commented 2 years ago

@sekulicd watch out! AddIssuanceArgs.validate() still expects the asset address to be mandatory, while now it should be like that only in case the asset amount is > 0 (just like we do for the token the lines below). Then in TestBroadcastUnblindedZeroAssetValueIssuanceTx we can avoid to pass an AssetAddress.

Done