The Hash envelope allows storing a document hash on the blockchain. It does not store the document.
By storing the document hash, a user can implement file tampering prevention, allowing other users to be able to validate that the document contents are equal to the original.
Creating a new Hash envelope to be stored on chain, can be achieved by adding a specific output object of type hash and add it to the createTransaction outputs argument.
This output type requires the following properties:
Raw file contents. Used to generate the hash. Not stored on chain.
Hashing algorithm. It can be either 'SHA-256' or 'SHA-512'.
Specify true if the envelope is going to be signed. If this is the case, a signing key needs to be specified. See: key property below.
Specify true if the envelope is going to be encrypted. If this is the case, an encryption key needs to be specified. See: key property below.
key (required only if encrypt or signis true)
String | JWK
ES256 Public key of the receiver, either as JWK or as uncompressed hex string
Any extra information to store within mintBlue. Not stored on chain.
The following OP_RETURN arguments are created when a Hash envelope is published on a Blockchain transaction.
Public key of the receiver