Email Certification

This is how you can Certify your sent emails on the SIGN Smart Contract

EMAIL CERTIFICATION

emailCertification(domain, title, uuid, data, signerPubKey)

Call this function with the correct arguments in the correct order where: domain: is a String and represent the domain name of the host used to send the message and it should be 64 bytes (characters) max. This will be used as followed: uuid+domain = the message ID

Example when sent from sign-web.app @certify.sign-web.app

title: is a string and represents the reference of the file, this is limited to 64 bytes (characters) max. uuid: is a String and represents a unique identifiant for your certification, this has to be generated by a uuid library, SIGN webapp is using the uuid library, if the uuid is already used by another record on the dApp's storage you will receive the "This uuid already exist" error, this is to avoid collision. data: is a String and represents the data of your certification grouped in a JSON structure, this is organised as you want to ease the gathering of data to a single call:

Example in sign-web.app { messageid: index+"@certify.sign-web.app", timestamp: timestamp, reference: reference }

signerPubKey: is a String that represents the public key of an account signing the invocation calling this method.

To get the public key using waves signer in your webapp you simply need to get it with: document.signer._userData.publicKey

Last updated