Handling multi-asset values.
Phantom type for 28-bytes policy id. This is a Blacke2b-224 hash.
Phantom type for asset names. This is a free-form bytes array of length <= 32 bytes.
Check if the [MultiAsset] contains no token.
Retrieve the amount of a given token.
Create an empty [MultiAsset].
Create a singleton [MultiAsset].
Remove assets with 0 amounts.
Add together two mint values.
Compute a mint balance.
Apply a function for each token pair of two [MultiAsset]. Absent tokens in one [MultiAsset] are replaced by the default value.
Split a [MultiAsset] into a list of each individual asset (policyId, assetName, amount)
.
CBOR encoder for [MultiAsset] coins.
CBOR encoder for [MultiAsset] mints.
CBOR decoder for [MultiAsset] coins.
CBOR decoder for [MultiAsset] mints.
Helper function to display MultiAsset
.
Type alias for handling multi-asset values.
This type should maintain some invariants by construction. In particular, it should never contain a zero quantity of a particular token.
TODO: make sure the previous statement stays true by construction. This would require an opaque type for MultiAsset.