pub fn issuance_hash(a: u32) -> Option<u256>Expand description
Return the SHA256 hash of the following:
- The asset issuance:
- If the input has no issuance then two bytes
0x00 0x00. - If the input is has a new issuance then the byte
0x01followed by a serialization of the calculated issued asset id (32 bytes) followed by the serialization of the (possibly confidential) issued asset amount (9 bytes or 33 bytes). - If the input is has a reissuance then the byte
0x01followed by a serialization of the issued asset id (32 bytes), followed by the serialization of the (possibly confidential) issued asset amount (9 bytes or 33 bytes).
- If the input has no issuance then two bytes
- The token issuance:
- If the input has no issuance then two bytes
0x00 0x00. - If the input is has a new issuance then the byte
0x01followed by a serialization of the calculated issued token id (32 bytes) followed by the serialization of the (possibly confidential) issued token amount (9 bytes or 33 bytes). - If the input is has a reissuance then the byte
0x01followed by a serialization of the issued token id (32 bytes), followed by the serialization of the explicit 0 amount (i.e0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00) (9 bytes).
- If the input has no issuance then two bytes
- The range proofs:
- The SHA256 hash of the range proof of the input’s issuance asset amount (32 bytes).
- The SHA256 hash of the range proof of the input’s issuance token amount (32 bytes).
- The blinding entropy:
- If the input has no issuance then the byte
0x00. - If the input is has a new issuance then the byte
0x01followed by 320x00bytes and the new issuance’s contract hash field (32 bytes). - If the input is has reissuance then the byte
0x01followed by a serializaiton of the reissuance’s blinding nonce field (32 bytes) and the reissuance’s entropy field (32 bytes).
- If the input has no issuance then the byte
Return None if the input does not exist.
§Cost
3738 mWU (milli weight units)