# Introduction

This documentation is under progress, if you have any questions or requests please contact us

This documentation aims to provide technical information regarding all Signature Chain's functionalities.

The Signature Chain Web Application is available at <https://www.sign-web.app> and allows anyone to certify any file and/or document in any size and type. It also offers features such as Email Certification and Multi-Party Agreement signature requests.

Signature Chain received two grants and received an official page on the official Waves Blockchain website under the certification use case.\
To learn more about Signature Chain, please visit our website: <https://www.signature-chain.com>

## GLOBAL

{% content-ref url="/pages/-M3ikBEsbZFcbAvuxzPS" %}
[Getting started](/getting-started)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ik0NC4Q9E6B9UGlXj" %}
[Login / Account](/login-account)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ijZTMu-unBg3Sx5Td" %}
[Overview](/overview)
{% endcontent-ref %}

## WALLET

{% content-ref url="/pages/-M3ijcHWgnV3-Z7EZXgQ" %}
[Receive](/wallet/receive)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ijigEYNZ9ZVmntRag" %}
[Send](/wallet/send)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ijqDeHdvRWh852WIE" %}
[Mass Send](/wallet/mass-send)
{% endcontent-ref %}

## CERTIFICATION

{% content-ref url="/pages/-M3ikQTEN8aQcPh41uKU" %}
[File Certification](/certification/file-certification)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ikSjSyia6SNPioQ0Z" %}
[Email Certification](/certification/email-certification)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ikWnlqhuhHygu\_EYn" %}
[Multi-party Agreement](/certification/multi-party-agreement)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ikaIwqWpVwNBIHXqp" %}
[Verification Explorer](/certification/verification-explorer)
{% endcontent-ref %}

## BUYING OPTIONS

{% content-ref url="/pages/-M3ikpiRK3U-vdr9-41V" %}
[With Waves](/buying-options/with-waves)
{% endcontent-ref %}

{% content-ref url="/pages/-M3iktBZfAeQ5dxj5UdP" %}
[With FIAT](/buying-options/with-fiat)
{% endcontent-ref %}

{% content-ref url="/pages/-M3ikx\_522tA\_sstZ2pW" %}
[With USDN](/buying-options/with-usdn)
{% endcontent-ref %}

## DEVELOPERS

{% content-ref url="/pages/-M42xoU0It7Z4oiJsfRf" %}
[Technical details](/developers/technical-details)
{% endcontent-ref %}

{% content-ref url="/pages/-M3il0V7ZRi4QR4VLce\_" %}
[SIGN API](/developers/sign-api)
{% endcontent-ref %}

{% content-ref url="/pages/-M3il6EK7hVqKQvqPSzc" %}
[3rd Party Integration](/developers/3rd-party-integration)
{% endcontent-ref %}

## OTHERS

{% content-ref url="/pages/-M3il3J-VTsAeVHOoJRM" %}
[Contact-us](/contact-us)
{% endcontent-ref %}


# Getting started

Signature Chain requires you have a decentralized Waves Blockchain account, you can create one directly from our Web Application or by using waves.exchange

Using a **decentralized Web Application** means that no one except you has access to your account's private information, such as your Private Key and Secret Seed. It is very important to store this information right away when creating a new account and to never share it with anyone. No one should ever ask you for this information, not even anyone from our team.

**Losing your private data will result in the loss of your account** and all tokens or credits associated with it, the Signature Chain team won't have any power to retrieve it.

A Waves account is simply a secret seed, which is a string of 15 words, from there an asymetric Key Pair is calculated, giving you a Private Key and a Public Key. The Public Key generates your Waves Account address.\
\
**Secret Seed**\
\
`office they guide rate magic morning income few attend supreme verb fruit goose above radio`

**Key Pair**\
\
`{`\
&#x20;  `PrivateKey: "6RvkbJPj39ETXyLbBt4hXAC52QgN6LmZZy2nspRwSSD5",`\
&#x20;  `PublicKey: "4VZXHgEOAiNy262jpwqG1cjG4fd7a1q86WoS14Uywd3u"`\
`}`

**Address**\
\
`3PBJgpWfLbcZGVHKmP7bB7tQ7AVtUsYLRQp`\
\
A Waves address on Mainnet can easily be recognized as it starts with 3P (at the moment) and 3N/3M on Testnet.\
\
To use SIGN's [Web Application](https://www.sign-web.app), you will first need a Waves Account, create one if you haven't yet.

## CREATE A NEW WAVES ACCOUNT

To create a new Waves Account go to [waves.exchange/sign-up](https://waves.exchange/sign-up) or [www.sign-web.app](https://www.sign-web.app) and click **sign in.**\
If it is your first time accessing it, the following form will appear, fill in the blanks with your chosen password and accept the policy and terms.

![If you don't have an account, you will see this form on your first sign in](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FC5NjryFsSIfdpiVveHW1%2Ffile.png?alt=media)

If you are on waves.exchange, you will then see the following screen allowing you to either create a new account or import an existing one through your private key or secret seed.

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F36i0GTtL2ThLqmm2wrBR%2Ffile.png?alt=media)

If you created an account on sign-web.app, a new Waves account was automatically created, it is very important to login to waves.exchange right after to save your secret seed and secure it.&#x20;

## SAVE YOUR SEED

To retrieve your account's private details, go to [waves.exchange](https://waves.exchange), login with your newly created password, go to the upper right and click on your account name, from there, click on settings and security and **copy or write down your Backup Phrase and Private Key**, make sure to **store them in a safe place** and **never share them with anyone.**

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F8atBjzcaXhgGOTsQr4sH%2Ffile.png?alt=media)

## IMPORT AN EXISTING WAVES ACCOUNT

To use an existing account on [sign-web.app](https://www.sign-web.app) it first needs to be imported into [waves.exchange](https://waves.exchange/import), all accounts accessible in [waves.exchange](https://waves.exchange) will automatically be available in [sign-web.app](https://www.sign-web.app)\
\
Use the following link to import an existing Waves Account [waves.exchange/import](https://waves.exchange/import)

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FhuLeXPP8w5T1anLDnm0k%2Ffile.png?alt=media)


# Login / Account

You can access the SIGN Web App at [sign-web.app](<https://www.sign-web.app >) with any web browser on desktop, tablet and mobile

<div align="center"><img src="https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M3j5TNf1ds4Fb5aUJ07%2F-M3jY6xhGNYa7-QIAyTN%2Fbrowserbar.png?alt=media&amp;token=65fd8303-2755-4b1b-afd3-019765badaf8" alt=""></div>

## WAVES SIGNER

The Web App uses the Waves Signer library from Waves Platform to Login, Sign and Broadcast transactions on the Waves Blockchain.&#x20;

The library is connecting and communicating with the waves.exchange Provider where all your Waves accounts are stored. Our Web App doesn't have access to any of your private information such as your Private Key and Secret Seed.

More details about Waves Signer on the [official documentation](https://docs.wavesplatform.com/en/building-apps/waves-api-and-sdk/client-libraries/signer) or [github](https://github.com/wavesplatform/signer)

![Communication example SIGN < --- > Provider](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M3j5TNf1ds4Fb5aUJ07%2F-M3j_uQ14FiEQVmEVUHU%2Fimage.png?alt=media\&token=3eead680-08e4-4fb1-a4c5-098850031b31)

## LOGIN TO THE WEB APP

When you open the Web App, you only have two tabs available, the **Account** tab where you can login into, the application and the public **Verifier** tab that allows anyone to search or verify the validity of a certification.

To login, simply click on SIGN IN and create a password if you don't have an account yet or type your password to access your account list, select an account and you will be automatically connected to the Web App.

![The login page when not connected](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F7y2eUtzA7XKB7kw92o5d%2Ffile.png?alt=media)

Once you are logged in, you will see an option to switch account or to manage your account on waves.exchange. Don't forget to go save your Secret Seed on Waves Exchange if you just created a new account.

You'll now have more options available, more tabs on the left menu and a top bar with your wallet balance /address

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FlquqpOYSWpD393dCdEvX%2Ffile.png?alt=media)


# Overview

## TOP BAR

Once connected, several elements will appear, starting with the top bar displaying your Certification Credits, your SIGN token balance, your WAVES balance, your Waves Address for the connected account and the actualisation icon.

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FpfM4idijBlW56MqzjCq7%2Ffile.png?alt=media)

## PRICE WIDGETS

The top part of the overview tab display 3 blocks with your SIGN, Waves and Total Sign balance in USD

![Price blocks displaying current SIGN & Waves price as well as your total SIGN balance in USD](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F8zFfHrmC7iL9h6TFamIW%2Ffile.png?alt=media)

## SIDEBAR

The sidebar on the left includes all the different tabs for SIGN token management under MANAGE TOKEN. The CERTIFICATION TOOLS tab includes all the certification features. Underneath all the tabs are the options to buy or swap for SIGN tokens and Certification Credits with Credit Card/ Paypal, WAVES or USDN

<div align="center"><img src="https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F0l6bBVClvelVpRegU1IR%2Ffile.png?alt=media" alt=""></div>

## TRANSACTION HISTORY

Second part of the overview is the transaction history list of all your past transactions using SIGN tokens or SIGN dApp Certification credits for the connected addres&#x73;**.**

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2Fa68jkBDeYA0U6T7lHuTe%2Ffile.png?alt=media)

## SUPPORTED TRANSACTION TYPES

The following transaction types *(displayed in expanded mode here)* will appear in the overview history:

### Inward Transfer *(type 4 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FTvUM6wUAjPyYaOCFAvFc%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Sender address, Transaction ID, Amount received, Optional attachment*
{% endhint %}

### Outward Transfer *(type 4 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FwjiEGV2SOCs60g34LOPr%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Recipient address, Transaction ID, Amount sent, Optional attachment*
{% endhint %}

### Inward Mass Transfer *(type 11 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FQ4RE0IaXWUYWqKW8h1KK%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Recipient count, Transaction ID, Total Amount sent, Optional attachment (message is unique and same to all recepient)*
{% endhint %}

### Outward Mass Transfer *(type 11 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FUHgWIPsCXS30oC4avULn%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Recipient count, Transaction ID, Total Amount sent, Optional attachment (message is unique and same to all recepient)*
{% endhint %}

### File Certification *(type 16 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FcTG5Vepql2DhHsskMJFR%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Certification Reference, Transaction ID, Amount paid (in SIGN tokens or Credit(s)), Hash of the certified file*
{% endhint %}

### Email Certification *(type 16 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FphkhDskDdk7BZwDif9HV%2Ffile.png?alt=media)

{% hint style="info" %}
*Date, Certification Reference, Transaction ID, Amount paid (in SIGN tokens or Credit(s)), Message ID of the email sent*
{% endhint %}

### Multi-Party Agreement creation *(type 16 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FHxwqZdAGvItM1JdMWWAX%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Agreement Reference, Transaction ID, Amount paid (in SIGN tokens or Credit(s)), Hash of the agreement file*
{% endhint %}

### Signature Request *(type 16 transaction)*

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2Fa7rCl30coUFzkv1Q1jmN%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Agreement Reference, Transaction ID, Hash of the agreement file*
{% endhint %}


# Receive

The **Receive** tab displays your SIGN balance, your address and the associated QR Code as well as a quick option to copy your address or download the QR Code to share it and request tokens.

It also includes the list of your last inward transactions.

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FtBdP6u0ViXB6w7ZhpmYc%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Sender address, Transaction ID, Amount sent, Optional attachment*
{% endhint %}


# Send

The Send tab by default only displays the list of your past outgoing transactions and a button that opens the sending form when clicked.

## SENDING FORM

By clicking on the **TRANSFER NOW** button you will acces the transfer form allowing you to transfer SIGN tokens to any Waves address.&#x20;

### **The form includes:**

***Recipient field***: Enter the Waves Address or Alias of the recipient\
***Amount***: Enter the amount to send\
***Comments***: Enter an optional comment limited to 100 characters, this will be public\
***Transaction Fee***: Choose to pay the transaction fee in SIGN or WAVES\
***Confirmation button***: To sign and broadcast the transaction

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FGlhkLuld0Oy7LrvS2vEE%2Ffile.png?alt=media)

## SIGN AND CONFIRM

Every action with your account requires you to sign it with your private key.\
Sign-web.app utilizes the Waves Signer library that makes this process very easy for you and 100% secure as everything will be signed locally and no one will have access to your account's private info.\
\
Once you've filled the form, click on **CONFIRM TRANSFER** to start the signature process and open the Waves Signer popin:

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FcNFsRYww7sTtovAoKAQa%2Ffile.png?alt=media)

You will then receive a **confirmation message** if everything worked properly:

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2Fq2xZTMtkrpLKGtRBtyEN%2Ffile.png?alt=media)

The transaction will then appear within a couple of seconds in your transaction history on the next actualisation (every 15 seconds) or if you click on the actualize icon on the top bar before it actualizes.

## TRANSACTION HISTORY

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FnED8tUaa9DUUpFabv86M%2Ffile.png?alt=media)

{% hint style="info" %}
**Fields displayed:** \
*Date, Recipient address, Transaction ID, Amount sent, Optional attachment*
{% endhint %}


# Mass Send

Mass Transactions are very similar to regular Transfer Transactions found in the Send tab but here you can send up to 100 transfers at once.

## MASS SENDING FORM

By clicking on the **MASS TRANSFER NOW** button you will access the mass transfer form allowing you to transfer SIGN tokens to any Waves address.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7kW7VHvirP7wmFawl7%2F-M7k_kW4EEIai8nTvKZT%2Fimage.png?alt=media\&token=aef30dcb-58ca-42e1-82bc-47c2b1faac2a)

### **The form includes:**

***Recipient field***: Enter the Waves Address or Alias of the recipient\
***Amount***: Enter the amount to send\
***+ button***: Click to add recipient\
***Comments***: Enter an optional comment limited to 100 characters, this will be public\
***Transaction Fee***: Choose to pay the transaction fee in SIGN or WAVES\
***Confirmation button***: To sign and broadcast the transaction

## SIGN AND CONFIRM

Every action with your account requires you to sign it with your private key.\
Sign-web.app utilize the Waves Signer library that makes this process very easy for you and 100% secure as everything will be signed locally and no one will have access to your account's private info.

{% hint style="info" %}
**Transaction fee:** \
*A regular Transfer transaction fee is 0.001 waves, in a Mass Transfer, the fee is as followed:*\
*0.001 + 0.0005 x N*\
*N is the number of recipients. The value is rounded up to the thousandths*
{% endhint %}

Once you've filled the form, click on **CONFIRM MASS TRANSFER** to open the Waves Signer popin and start the signature process:

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2F5DtaJCwI9n2PIEOeb19G%2Ffile.png?alt=media)

You will receive a **confirmation message** if everything worked properly:

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3ieoE1M071OsoFItvH%2Fuploads%2FNWnddGJ7brwnDcS8OOFA%2Ffile.png?alt=media)

The transaction will then appear withing a couple of seconds in your transaction history on the next actualisation (every 15 seconds) or if you click on the actualize icon on the top bar before it actualizes.

## TRANSACTION HISTORY

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7kW7VHvirP7wmFawl7%2F-M7k_T3Eh3cPSsO9CtUH%2Fimage.png?alt=media\&token=a44a5b0a-50e6-4aeb-91b6-2466d793d044)

The Mass Transfer blocks are separated into 3 parts, the first one contains the date and the first 3 recipients, the 3 dots that are clickable allows the display of the entire recipient list. \
\
You also have a small arrow at the bottom right corner of this block to display the transaction ID that links to the transaction in the waves explorer.\
\
The second block is the total amount transfered and the 3rd block, optional, is the attached message, if there is one.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7kW7VHvirP7wmFawl7%2F-M7kZjeWGBvOBpzKheTN%2Fimage.png?alt=media\&token=624233ca-0b51-43b0-b905-35b762c48e7b)

{% hint style="info" %}
**Fields displayed:** \
*Date, Sender addresses, Transaction ID, Amount sent, Optional attachment*
{% endhint %}


# File Certification

The File Certification page allows you to certify any file or document in any format and size on Waves Blockchain.

### **OVERVIEW**

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7ucHrOLLmnv2qffqsZ%2F-M7uhxuRVfcji2Z0LCzw%2Fimage.png?alt=media\&token=78e393fb-a560-4e24-8499-6703026dfb53)

This page displays the list of your previous certifications by date, each block in this list displays the following:

{% hint style="info" %}
**Fields displayed**\
*Date, Reference, File Hash, Transaction ID (linking to waves explorer), Copy the link icon to share the proof of certification in the verification explorer, link to the Proof of Certification PDF*
{% endhint %}

On the top right you will find a button "**CERTIFY NOW**", this opens the certification form.

## CERTIFICATION FORM

By clicking on the **CERTIFY NOW** button you will access the certification form allowing you to certify any file or document using your Waves account keypair.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7ucHrOLLmnv2qffqsZ%2F-M7uhmwJTXoKHzgPMsVO%2Fimage.png?alt=media\&token=90cc8dc7-91a8-4c09-828c-05a78585cc36)

### **The form includes:**

***File select***: Select or drag and drop the file you want to certify\
***Reference***: By default the name of the file, you may change it, limited to 45 characters. Keep in mind this will be public on the Blockchain.\
***File hash***: The sha256 file hash from the selected file\
***+ Button***: Add more files to certify several at the same time\
***Store file on IPFS***: Check this if you wish to upload the file on IPFS (Interplanetary File System), the file will then be public and available for anyone to download\
***Transaction Fee***: Choose to pay the transaction fee in SIGN or WAVES\
***Certification Fee***: The cost in SIGN token per certification or the amount of your certification credit available (cost is 1 credit per certification)\
***Confirmation button***: Sign and broadcast the transaction

## HOW TO CERTIFY

Click on the "Select or Drop a file" area to choose your file, this can be any type of file in any size.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uo1s2Vk0hwaZAFhj3%2Fimage.png?alt=media\&token=0311bab8-a648-4e6d-a0de-9ac3790e9fd8)

Once selected, the name of the file will automatically be used as a reference as well. You can change the reference, up to 45 characters, keep in mind this will be publicly recorded on the blockchain and shouldn't contain any sensitive information.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uo7oH2rP4PVrTWhUr%2Fimage.png?alt=media\&token=a4632c7d-0a0d-486d-a68d-b9c65dd17822)

The file signature (hash) will be calculated and automatically inserted in the File hash field, this hash is unique and any changes made to the file will totally modify this hash.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uoE7Sd-uPTAFfT51p%2Fimage.png?alt=media\&token=bc2c8ea0-7f7b-4913-874b-e224bdcbf583)

If you wish to store the file online, you have the option to use the IPFS option by checking the checkbox.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7ulx2fO5i5zS5iJnen%2Fimage.png?alt=media\&token=16d5448f-45ae-409e-b36e-370810975b2a)

{% hint style="info" %}
**IMPORTANT**\
*Files stored with IPFS are public, this is not a private storage, anyone knowing the IPFS file hash can access the file online, don't store private and sensitive information on IPFS.*
{% endhint %}

The "Certification fee" zone will display either the cost per certification in SIGN token or the cost in Certification Credit and the Credit balance associated to your account.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7unXfnM3PP3imUO2aV%2Fimage.png?alt=media\&token=90addbce-2bf2-4b53-a200-868a54821a94)

Once everything is ok, click "**CERTIFY FILE**" to open Waves Signer and sign the transaction with your account.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uoNM62yHvVNw-XKp2%2Fimage.png?alt=media\&token=4812dcdb-208d-437b-a600-c97d49b8375a)

Verify that all the data is correct, then click confirm.

If everything goes well, you will see the following confirmation popin displaying the transaction id, you can use it to retrieve the certification in the [SIGN Explorer](https://www.sign-web.app/explorer) or directly in the [Waves Explorer](https://wavesexplorer.com/) (raw data)

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uop5YgxBli4jRDdZO%2Fimage.png?alt=media\&token=f177d9a1-b15e-48f9-a08f-4340daf0b8be)

After a few seconds, the transaction will appear in the transaction history list.

## REVOKE A CERTIFICATION

If you needs to revoke a certification, simply click on the cross on the right and confirm the revoke action. This will cost you 1 sign credit or equivalent in sign tokens:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-MBmmO0eL4NqAS5EKoco%2F-MBmoOqJwmpU4olczVES%2Fimage.png?alt=media\&token=f3a8e883-f370-4e7f-adb9-8eab73ebfde3)


# Email Certification

The Email Certification page allows you to send emails to multiple recipients with attachments using your credentials or an open SMTP. This will certify the email message-ID on the Waves Blockchain.

### **OVERVIEW**

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7usHQCaKtZfmb9RiKN%2Fimage.png?alt=media\&token=2be373d0-720a-42be-a8cd-99615e39d001)

This page displays the list of your previous email certifications ordered by date, each block in this list displays the following:

{% hint style="info" %}
**Fields displayed**\
*Date, Reference, Transaction ID (linking to waves explorer), Copy link icon to share the proof of certification in verification explorer, Message ID, link to the Proof of Certification PDF*
{% endhint %}

On the top right you will find a button "**SEND EMAIL NOW**", this opens the Email Certification form.

## EMAIL CERTIFICATION FORM

By clicking on the **SEND EMAIL NOW** button you will access the certification form allowing you to send Certified emails using your Waves account keypair.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7usYTcl0_H06Ho7TEg%2Fimage.png?alt=media\&token=99ce3952-b3ed-486f-b50e-512c30bed969)

### **The form includes:**

**Select SMTP:** Select the SMTP option you want to use, either our Open SMTP (Mailgun) or your own custom SMTP credentials, if you use the second option, no sensitive data will be stored.\
***Reference***: This will be the reference of the email, 45 characters maximum, stored publicly on the Waves Blockchain\
***First name***: The first name of the sender\
***Last name***: The last name of the sender\
***Email sender***: The email of the sender\
***Email recipient***: The email(s) of the recipient(s), separated by "," if multiple recipients\
***Attachment***: You can select an attachment here, recommended 2MB per file and 10MB total\
***Message***: The message to include in the email\
***Transaction fee***: Either SIGN token or Waves can be used to pay the transaction fee\
***Certification Fee***: The cost in SIGN token per certification or the amount of your certification credit available (cost is 1 credit per certification)\
***Certify Email***: Sign and broadcast the transaction

## HOW TO CERTIFY AN EMAIL

Fill in the blanks, there are 6 fields for the open SMTP option:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uvuHtuWRjz29Bzkex%2Fimage.png?alt=media\&token=4ff484a0-fe8d-42c6-9318-1e7469e13590)

and 9 if you use your own custom SMTP:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uwIX9uJaXPdJbnwi2%2Fimage.png?alt=media\&token=6c587428-6b04-4b3f-a7ea-2a277a90bf83)

{% hint style="info" %}
**FIELDS**\
*If you choose the custom SMTP option, you will need to fill the following extra fields related to your email account: Server (ex: ionos.smtp.com), Port (ex: 587), Login, Password*
{% endhint %}

Select or Drag and Drop the attachments here:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7ux338BMPFDLcxA4hp%2Fimage.png?alt=media\&token=88223b60-095d-4a7b-96ef-e8b4c9488993)

Write your message in the next field:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uxKJQZquB7Zp97r3j%2Fimage.png?alt=media\&token=a4abd1d2-93c5-4b60-a865-34673c8f8ffb)

The transaction fee zone will allow you to choose how you want to pay the transaction fee, with either SIGN tokens or Waves.\
The "Certification fee" zone will display either the cost per certification in SIGN token or the cost in Certification Credit and the Credit balance associated to your account.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uxnsLrM3hlESZ6sby%2Fimage.png?alt=media\&token=17702266-a5dd-48f1-b4a0-428daed40992)

Once everything is ok, click "**CERTIFY FILE**" to open Waves Signer and sign the transaction with your account.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uyECsLUvGA7NeaPWM%2Fimage.png?alt=media\&token=7ba754a9-34c7-47af-8ad8-5eeb1700c4a3)

Verify that all the data is correct then click confirm.

If everything goes well, you will see the following confirmation popin displaying the different recipients, the message ID and the transaction ID. You can use the message ID or Transaction ID to retrieve the certification in the [SIGN Explorer](https://www.sign-web.app/explorer) or directly in the [Waves Explorer](https://wavesexplorer.com/) (raw data with Transaction ID)

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uyMisKPkPKBv6N2D7%2Fimage.png?alt=media\&token=63f71b9d-8707-46c3-b2e8-a0770ffb5dd6)

After a few seconds, the transaction will appear in the transaction history list.

{% hint style="info" %}
**IMPORTANT**\
*No email address, attachment or message will be stored on Blockchain.*\
*If you use the open SMTP, the 3rd party provider used to send the email will keep a copy of the message for 48h privately on their side in their logs.*
{% endhint %}

The sender and all recipients will then receive a copy of the message:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uz0tEULyLm3szOYR3%2F-M7v-aB8fux77ClxTPii%2Fimage.png?alt=media\&token=ff28d841-e3dc-4c8a-8506-800a66cb52da)

To search a message by its message ID in gmail, use "**rfc822msgid:**" followed by the message ID, in the search bar, for example:\
\
`rfc822msgid:6e96ac00-70d3-11ea-bb7d-35e2830946f4@certify.sign-web.app`

*To confirm that the message was sent from sign-web.app you need to verify the signature of the message as followed:*

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uz0tEULyLm3szOYR3%2F-M7v1gy6DLcpk9kGINSF%2Fsigned-email.png?alt=media\&token=92cb0220-ab23-4e13-b07a-5f1b8fbda0be)


# Multi-party Agreement

The File Certification page allows you to certify any file or document in any format and size on the Waves Blockchain.

### **OVERVIEW**

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w0BEyAFhSSYpJI5rA%2Fimage.png?alt=media\&token=50bcb54f-f7f1-4198-b6a7-782e4fc81a6e)

This page displays the list of **Mutual Agreements** you created or have been requested to sign, sorted by date, each block in this list displays the following:

{% hint style="info" %}
**Fields displayed**\
*Date, Agreement Reference, File Hash, Transaction ID (linking to waves explorer),* Download icon if the file is public on IPFS, *Copy link icon to share the proof of certification in verification explorer, link to the Proof of Certification PDF, the counterpart list*
{% endhint %}

In the Counterparts area once opened by clicking on the "+" you will have the following:

{% hint style="info" %}
Agreement creator address, Agreement ID (transaction ID of the contract creation), Address of the counterparts with the signature status or the option to sign if you are requested to.
{% endhint %}

The "+" icon will appear when you create the agreement and therefor, you've automatically signed it, if you've received a signature request, this icon becomes a pencil, for example:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w1aP0W0cRH1fiIQdg%2Fimage.png?alt=media\&token=b26bad15-e78b-4375-ada7-3ec7b8d9a323)

Clicking on it also deploys the counterpart area where you can see your address in the counterpart list with a "Click to sign" button, allowing you to sign with your Waves Account and agree with the contract / Agreement.&#x20;

On the top right you will find a button "**CREATE AGREEMENT NOW**", this opens the Agreement creation form.

## AGREEMENT CREATION FORM

By clicking on the **CREATE AGREEMENT NOW** button you will access the agreement creation form allowing you to select any file or document to hash in a similar way to the File Certification feature.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w3_m2h0uzrLlNSF8l%2Fimage.png?alt=media\&token=25e7efeb-cfe6-4630-91da-694f55385b4d)

### **The form includes:**

***File select***: Select or drag and drop the file you want to certify\
***Reference***: By default the name of the document/file, you may change it, limited to 45 characters. Keep in mind this will be public on the Blockchain.\
***File hash***: The sha256 file hash from the selected file\
***Store file on IPFS***: Check this if you wish to upload the file on IPFS (Interplanetary File System), the file will then be public and available to anyone for download\
***Counterparts***: Enter the Waves address of each counterpart requested to sign, up to 5\
***Transaction Fee***: Choose to pay the transaction fee in SIGN or WAVES\
***Certification Fee***: The cost in SIGN token per certification or the amount of your certification credit available (cost is 1 credit per certification)\
***Confirmation button***: Sign and broadcast the transaction

## HOW TO CREATE AN AGREEMENT

Click on the "Select or Drop a file" area to choose your file, this can be any type of file in any size, this document should contain the description of the agreement and the Waves Addresses of the counterparts.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uo1s2Vk0hwaZAFhj3%2Fimage.png?alt=media\&token=0311bab8-a648-4e6d-a0de-9ac3790e9fd8)

Once selected, the name of the file will automatically be used as reference as well. You can change the reference, up to 45 characters, keep in mind this will be publicly recorded on the blockchain and should not contain any sensitive information.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uo7oH2rP4PVrTWhUr%2Fimage.png?alt=media\&token=a4632c7d-0a0d-486d-a68d-b9c65dd17822)

The file signature (hash) will be calculated and automatically inserted in the File hash field, this hash is unique and any changes made to the file will totally modify this hash.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7uoE7Sd-uPTAFfT51p%2Fimage.png?alt=media\&token=bc2c8ea0-7f7b-4913-874b-e224bdcbf583)

If you wish to store the file online, you have the option to use the IPFS option by checking the checkbox.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7ulx2fO5i5zS5iJnen%2Fimage.png?alt=media\&token=16d5448f-45ae-409e-b36e-370810975b2a)

{% hint style="info" %}
**IMPORTANT**\
*Remember the file will then be accessible to anyone that knows the IPFS file hash, so only choose this option for public documents or protect the file with a password and share this password privately.*
{% endhint %}

The last field allows you to enter up to 5 counterparts (1 per line) using their Waves addresses:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w4pwpy56BzOjJLnVm%2Fimage.png?alt=media\&token=23cbeb2d-0468-4ae6-ba6f-14a8e2ef152c)

Your address, the one used while connected to the webapp, will automatically sign the agreement at the time of creation, each counterpart's address will then receive a signature request with the option to sign it as well.

The "Certification fee" zone will display either the cost per certification in SIGN token or the cost in Certification Credit and the Credit balance associated to your account.&#x20;

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7uiFAwP5RanUmBqQ-e%2F-M7unXfnM3PP3imUO2aV%2Fimage.png?alt=media\&token=90addbce-2bf2-4b53-a200-868a54821a94)

**Understand the Certification fee:**

{% hint style="info" %}
***IMPORTANT***\
*The creation of an agreement costs 1 Certification Credit or the Certification price in SIGN at the time of creation (0.5$). When you create an Agreement, you pay 1 Certification + 1 certification per counterpart, this is to cover the counterpart signature and that way, allowing them to sign without any fee or the need to have any tokens on their account.*
{% endhint %}

Once everything is ok, click "**CREATE AGREEMENT**" to open Waves Signer and sign the transaction with your account.

If you choose to store the file on IPFS, wait for the upload to complete:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w6-AdcJkIX1CaCths%2Fimage.png?alt=media\&token=fbe8ba3a-baef-4bb9-8a25-8d102b20a734)

Then the Waves Signer window will appear with all the transaction details:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w5Y8Ouh_UJwHiinQL%2Fimage.png?alt=media\&token=ca289d80-751a-4428-a3e5-00f2914c3d2c)

Verify that all the data is correct then click confirm.

If everything goes well, you will see the following confirmation popin displaying the transaction id, you can use it to retrieve the certification in the [SIGN Explorer](https://www.sign-web.app/explorer) or directly in the [Waves Explorer](https://wavesexplorer.com/) (raw data)

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7w6CyPB1vPMpTXah3u%2Fimage.png?alt=media\&token=9a82f5de-988b-45ef-8cf8-f72487ec5a01)

After a few seconds, the transaction will appear in the transaction history list.

## HOW TO SIGN AN AGREEMENT

When you are requested to sign an agreement, you will see it in the Agreement history list of the web app. Click the pencil icon on the agreement block to sign the agreement:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wBSyPZySzgVL3KzJS%2Fimage.png?alt=media\&token=67221787-687e-4d25-be56-ece11bd804da)

The pencil icon will open the detail of the agreement including the sender's address, the agreement ID which is the agreement creation transaction id and the counterpart list with the signature status:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wBiK7-CW75M529uSS%2Fimage.png?alt=media\&token=caf76eb8-ade4-42cc-8a62-0b67362f7eb0)

Download the agreement using the download icon if the agreement was stored publicly online or, if not, you should have received it by email. Make sure the hash of the agreement you received match the hash of the one included in the Agreement Request.\
The hash can be found by clicking on the small arrow under the copy icon:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wDAjZ4Ew82ptC6mI8%2Fimage.png?alt=media\&token=bef8ee60-6cf6-4cae-a571-1d9df68f2c7e)

To verify the hash of your file, simply click on "**CREATE AGREEMENT NOW**" to open the form and select the file you received with the "Upload or Drop a file" field to generate the hash of the file, then compare it with the hash in the agreement:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wDvndneZE8RuD-qJG%2Fimage.png?alt=media\&token=2d63ca56-da1c-4709-b852-d032ebb5b6b6)

By clicking on the "click to sign" button you will open Waves Signer which will allow you to sign the agreement by which you agree with the contract or agreement:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wCLHGB08Jja5LbSSt%2Fimage.png?alt=media\&token=17252496-6174-45fb-a14b-ea381b6714e3)

Verify that all the information is correct and click "Confirm" to sign the transaction with your Waves account.\
If everything went as expected, you will receive a confirmation and the transaction will appear in your transactions history within a few seconds.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M7v1sShBztYkHBbEsku%2F-M7wCf52FN6WgXPClBW-%2Fimage.png?alt=media\&token=831b195b-af94-4fd7-a370-34c7a256ded8)

##


# Verification Explorer

The verification explorer allows anyone, without needing to be connected, to search and verify the validity of a File Certification, Email Certification or Multiparty Agreement.

### **OVERVIEW**

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-lSQNEmJCkw3YpZEO%2Fimage.png?alt=media\&token=4d6afb2f-5368-4a64-bb41-db0a3b99a95f)

Accessible at <https://www.sign-web.app/explorer> the explorer is a straight forward way to search if a file has already been certified or if a certification sent to you is valid.

**VERIFY BY PROOF OF CERTIFICATION**

You can verify a certification simply by selecting it's Proof Of Certification after clicking on the "Select or Drop a Proof Of Certification" button:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-m4udH8Xh5edx97Nx%2Fimage.png?alt=media\&token=8d72478c-ac6a-4fac-9c20-bb71b396e2ac)

The Proof Of Certification is a PDF that looks like the following:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-mTy_5-_CeuoJC67d%2Fimage.png?alt=media\&token=b790b0ae-b021-471a-96fc-efe6d41cccbc)

This PDF includes the details of the Certification as well as some metadata allowing the SIGN explorer to automatically read this information and retrieve the associated transaction from the Waves Blockchain.

{% hint style="info" %}
**FIELDS**\
*Reference, Date, File Hash or Email ID, Link to the transaction on the Waves Explorer, QR Code to the transaction on the Waves Explorer. Multi Party Agreement will include a second page with the counterparts addresses and their signature status*
{% endhint %}

If the transaction exists, the certificate will be displayed in the SIGN explorer as follow:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-nV5g5Bhavc5kRbHs%2Fimage.png?alt=media\&token=1f342673-d753-4dd6-aa35-f214cf4cea6d)

**VERIFY BY HASHING A FILE**

You also have the option to hash any file, using the **"Select or Drop a File to hash"** and it will retrieve all the certifications, if any, that are included with this exact file hash:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-o3RhFXjSONXU4qHf%2Fimage.png?alt=media\&token=d5e8ec54-1a10-49bd-9edd-73fde2a3e103)

Once the file is selected, its hash will be added in the Hash field and by clicking the "SEARCH" button you will start retrieving the data.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-o_meRyBEQ0oC8cuU%2Fimage.png?alt=media\&token=5eb8b34f-bd2f-4669-8afe-2755937a615f)

**VERIFY BY DATA**

Similarly you can choose to search directly by Transaction ID, File Hash, Message ID or reference as well as combining some of them for more accurate results.

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-pBdt8-7GP6cFz55y%2Fimage.png?alt=media\&token=02b9e9bf-e054-4a99-a43c-59390007ec07)

Direct link to a Certification in the explorer looks like the following:

`https://www.sign-web.app/explorer/{the_transaction_ID}`

**Example:**\
<https://www.sign-web.app/explorer/Hv5UC2dwFZSadhNFtqtxuSTrRSg8drGx4mWw2igL9KaQ>

If the certificate have been revoked by its creator, you will see the "revoked" mention on the top right corner:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-MBmmO0eL4NqAS5EKoco%2F-MBmpFlTuTZMjEclwlG9%2Fimage.png?alt=media\&token=f58ed9d9-1282-4426-9d43-6550046e82d3)


# With Waves

You can buy SIGN Utility tokens on the [Waves Exchange](https://waves.exchange/dex?assetId2=9sQutD5HnRvjM1uui5cVC4w9xkMPAfYEV8ymug3Mon2Y\&assetId1=WAVES) by trading it using Waves.

A feature allowing you to trade Waves for SIGN directly in the sign-web.app was available in previous versions of the web application but is on hold at the moment since the project switched from Waves Keeper to Waves Signer, the latter one doesn't support "orders" yet.

This feature will be back as soon as Waves Signer supports it again.


# With FIAT

You have the option to buy Certification Credits with fiat using Paypal/Credit Card.

Certification Credits will allow you to use all the Certification features without the need to hold any token/crypto in your account, instead, a number of credit will be associated to your account and deducted after each Certification.

The credits associated to your account are displayed at the top of the webapp:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-tMfMHj_zBn3PBifU%2Fimage.png?alt=media\&token=fd9d5cb8-5dcc-4994-9fab-20178b988e1f)

To buy credit, you need to click on the **"BUY SIGN"** button on the left sidebar:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-taiYdsZMekG5JZ3O%2Fimage.png?alt=media\&token=96e34a35-a781-447b-bd55-fc32cfd1d261)

It will open the following popin with 3 options to buy either 10, 25 or 50 certification credits:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-tid2AqTEWpHSVqnm%2Fimage.png?alt=media\&token=f3019e4a-25f1-466b-8d20-16bdc49e0724)

Costs are as followed:

`10 Credits = 7$`\
`25 Credits = 16.88$`\
`50 Credits = 35.50$`

Finally, click on "Pay with Paypal" and follow the process through Paypal, you can click on the price, in the top right to verify the details of the order and the address that will be credited with it:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-uXZ--JPDXzPC2LEF%2Fimage.png?alt=media\&token=22933ba2-d541-460c-a969-97ec065c5d32)

Once the order is validated you will be redirected to the web application and receive the following confirmation message:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-uwHwvtrGnpdmlNrM%2Fimage.png?alt=media\&token=8c9d4796-c7a4-4869-80c3-1f780ec8d971)

After a few seconds, your account will be credited and will display the correct amount.


# With USDN

You have the option to buy Certification Credits with fiat using USDN.

Certification Credits will allow you to use all the Certification features without the need to hold any token/crypto in your account, instead, a number of credit will be associated to your account and deducted after each Certification.

The credits associated to your account are displayed at the top of the webapp:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-tMfMHj_zBn3PBifU%2Fimage.png?alt=media\&token=fd9d5cb8-5dcc-4994-9fab-20178b988e1f)

To buy credit with USDN, you need to click on the **"USDN > SIGN"** button on the left sidebar:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-vJmZYvQgqutvM_ZW%2Fimage.png?alt=media\&token=e2732de7-5943-42a1-9207-e2b9f8968a84)

This will open a popin with the USND > SIGN convert form.

USDN is a stablecoin and is therefore always valued at the price of 1$, SIGN Certifications are priced at 0.5$, so the conversion is really easy. You can convert any USDN to SIGN Credit by entering the amount of USDN to convert, this amount needs to be a multiple of 0.5:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-vlAwLr7tUXLaiG6T%2Fimage.png?alt=media\&token=afe5c37f-fd6a-4458-8119-fc503927efdd)

Click confirm and the Waves Signer popin will open with the transaction details, verify that everything is correct and click **"Confirm":**

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-w8GEKpSq4RtrLzYn%2Fimage.png?alt=media\&token=370dbd9d-9ad5-49f3-9fd4-29841dbd22d9)

Once the transaction is confirmed, you will receive a confirmation message and your account credits will be credited:

![](https://2230177080-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3ieoE1M071OsoFItvH%2F-M8-hQIrGhQPml0A0kK4%2F-M8-x0_7WhSNLvovYGCh%2Fimage.png?alt=media\&token=bf277f98-6218-444f-82d9-b2fbd7869413)


# Technical details

## SIGN Webapp

The SIGN Web Application has been developed in Node JS and uses the Waves Signer and Waves-transaction Libraries.\
Anyone can access the webapp by simply connecting their waves account to it, without the need to create a centralized account and thereby giving personal information.

All data is stored on the user's localstorage or on the Waves Blockchain.

Signature Chain's webapp also uses IPFS as an option, at the moment, files are stored and pinned on infura and we limit the file size to 10MB, even though the current limitation on infura is around 100MB. The main reason is that we know their limit will drop lower in future so we rather anticipate it.\
In the future we plan to also implement IPFS in the browser, which will allow every user to have its own IPFS node right in their browser.

## SIGN dApp & Smart Contract

The SIGN Web Application is just the interface display, a way of gathering data to write it into the Waves Blockchain. The main Blockchain functionalities are decentralized on a dApp (Smart Contract) on the Waves Blockchain.\
\
You can call the dApp functions directly to store your data without using the SIGN webapp.

{% content-ref url="/pages/-M89vPM-sDiyyaQVy0Bs" %}
[File Certification](/developers/technical-details/file-certification)
{% endcontent-ref %}

{% content-ref url="/pages/-M89vaHePQXdUar6c-d5" %}
[Email Certification](/developers/technical-details/email-certification)
{% endcontent-ref %}

{% content-ref url="/pages/-M89w4evuY8AlqvsRyzp" %}
[Multiparty Agreement](/developers/technical-details/multiparty-agreement)
{% endcontent-ref %}

{% content-ref url="/pages/-M89wQj6jhlOZ5lS73Z-" %}
[USDN & Certification Credits](/developers/technical-details/usdn-and-certification-credits)
{% endcontent-ref %}


# File Certification

This is how you Certify your files or data on the SIGN Smart Contract

```
fileCertification(hash, title, uuid, data, signerPubKey)
```

Call this function with the correct arguments in the correct order where:\
\
**hash:** \
is a String and represents the hash of your file, this is expecting a sha256 hash and it should be 64 bytes (characters) max.\
\
**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 any uuid library, SIGN webapp is using the [uuid library](https://github.com/uuidjs/uuid#readme), if the uuid is already used by another record on the dApp storage you will receive the "This uuid already exist" error, this is to avoid collision.

{% hint style="info" %}
Example of uuid v1 used in sign-web.app\
*1bb05c20-9e4b-11ea-9bc2-61ecf68f28a5*
{% endhint %}

**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:

{% hint style="info" %}
Example in sign-web.app\
*{* \
&#x20;  *hash: fileHash,* \
&#x20;  *timestamp: timestamp,* \
&#x20;  *title: fileRef,* \
&#x20;  *ipfs: ipfsHash* \
*};*
{% endhint %}

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

{% hint style="info" %}
To get the public key using waves signer in your webapp you simply need to get it with:\
*document.signer.\_userData.publicKey*
{% endhint %}


# Revoke certification

In some cases, it make sens to have to possibility to revoke a certification.

```
revokeCertification(certificationId: String, signerPubKey: String)
```

Call this function with the same account that previously created the certification passing the two following arguments:

**certificationId:** \
Simply the txid of the certification to revoke.

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

{% hint style="info" %}
To get the public key using waves signer in your webapp you simply need to get it with:\
*document.signer.\_userData.publicKey*
{% endhint %}


# 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

{% hint style="info" %}
Example when sent from sign-web.app\
*@certify.sign-web.app*
{% endhint %}

**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](https://github.com/uuidjs/uuid#readme), 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:

{% hint style="info" %}
Example in sign-web.app\
*{*\
&#x20;  *messageid: index+"@certify.sign-web.app",* \
&#x20;  *timestamp: timestamp,* \
&#x20;  *reference: reference* \
*}*
{% endhint %}

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

{% hint style="info" %}
To get the public key using waves signer in your webapp you simply need to get it with:\
*document.signer.\_userData.publicKey*
{% endhint %}


# Multiparty Agreement

This is how you can Create and Certify your Multiparty Agreement on the SIGN Smart Contract

## MULTIPARTY AGREEMENT

```
createAgreement(hash: String, title: String, stringifiedJSON: String, counterParts: String, signerPubKey: String, uuid: String)
```

Call this function with the correct arguments in the correct order where:\
\
**hash:** \
is a String and represents the hash of a document where a Multiparty Agreement creator wrote the details of an agreement. It should be 64 bytes (characters) max.&#x20;

**title:** \
is a string and represents the reference of an Agreement, this is limited to 64 bytes (characters) max.&#x20;

**stringifiedJSON:** \
is a string containing a json object that includes the creator property (empty) and up to 6 addressX properties, it also include other data like the title, hash or timestamp:

{% hint style="info" %}
{ \
&#x20;  title: fileRef, \
&#x20;  timestamp: timestamp, \
&#x20;  hash: fileHash, \
&#x20;  creator: "", \
&#x20;  address1: "", \
&#x20;  address2: "", \
&#x20;  address3: "", \
&#x20;  address4: "", \
&#x20;  address5: "", \
&#x20;  address6: "" \
}\
\
**The creator property has to be empty, the value will be written by the smart contract with the invocation caller address.**&#x20;
{% endhint %}

**counterParts:** \
is a string with all counterparts waves addresses separated by a comma ",", maximum 6 counterparts.

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

{% hint style="info" %}
To get the public key using waves signer in your webapp you simply need to get it with:\
*document.signer.\_userData.publicKey*
{% endhint %}

**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](https://github.com/uuidjs/uuid#readme), 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.

## SIGN AGREEMENT

```
signAgreement(hash, agreementId, signerPubKey)
```

This is how you can Sign a Multiparty Agreement on the SIGN Smart Contract after receiving a Signature reques. You simply have to call this function with the correct arguments in the correct order where:\
\
**hash:** \
is a String and represents the hash of a document where a Multiparty Agreement creator wrote the details of an agreement. It should be 64 bytes (characters) max. \
\
**agreementId:** \
is a String and represents the transaction ID of the transaction that created the agreement.&#x20;

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

{% hint style="info" %}
To get the public key using waves signer in your webapp you simply need to get it with:\
*document.signer.\_userData.publicKey*
{% endhint %}


# USDN & Certification Credits

This is the main method to convert USDN tokens into SIGN Certification Credits on the basis of 0.5 USDN = 1 Certification Credit.

## SWAP USDN TO SIGN CERTIFICATION CREDITS

```
usdnSignCredits()
```

There is no argument to pass when you call this function, simply attach your USDN payment, make sure it is multiple of 0.5 and you will automatically receive the Certification Credits on the address that sent the USDN.

## CERTIFICATION CREDITS

You can use any of SIGN's features with the SIGN utility token based on the daily updated Certification price, this price is calculated to keep the 0.5$ Certification cost stable despite the possible up and down movement of the SIGN token price. \
\
**The price is updated every 24 hours.**\
\
You will have to attach the correct payment in SIGN tokens to every Certification aside of the correct transaction fee, in Waves or in SIGN tokens.

Alternatively you can acquire Certification Credits using fiat (paypal or credit card) or USDN.\
This option allows you to use the SIGN webapp without the need to hold any tokens in your Waves Account, neither SIGN or Waves are required and the transaction fees are paid by the smart contract.

This second feature was implemented to ease mass adoption and ease the process to any user not familiar with cryptocurrency.


# SIGN API

You can access the NODE API from the SIGN Mainnet Node at:\
\
`https://node.sign-web.app` \
\
and the SIGN Testnet Node at:\
\
`https://testnode.sign-web.app`

for the complete list of available endpoints, here is the direct Waves Node API, more details on how to query and retrieve your SIGN data will be added later.


# 3rd Party Integration

You can easily integrate the File Certification feature into any web application or web site with our Javascript library.

The Javascript Library includes the following libraries:

* [@waves/signer](https://github.com/wavesplatform/signer) for logging in and signing transactions with your Waves account
* [@waves.exchange/provider-web](https://github.com/waves-exchange/provider-web) the official Waves Exchange that hosts your accounts
* [uuid](https://github.com/uuidjs/uuid) to generate uuid v1
* [js-sha256](https://github.com/emn178/js-sha256) to generate file hash

You can get the library by following this links:\
\
[TESTNET](http://signature-chain.com/downloads/testnet-signchain-signer.min.zip)\
[MAINNET](http://signature-chain.com/downloads/signchain-signer.min.zip)

This library aims to simplify the integration in any Web application or Web site, more libraries will be released in the future based on user needs.

## HOW TO IMPLEMENT IT

You can download the complete template [here](https://www.signature-chain.com/downloads/signchain-sign-demo.zip).

{% hint style="info" %}
&#x20;This template require http protocol to work properly or you may get a CORS Policy error.\
To test locally, a server (wamp, node server etc) is required to access the index.html through http(s):// and not file:///C:/...
{% endhint %}


# Certify

Implementation of the certification process into your admin workf

The library can be downloaded here: {{ link }}

Full working example can be downloaded here: {{ link }}

{% hint style="info" %}
This template require http protocol to work properly or you may get a CORS Policy error.\
To test locally, a server (wamp, node server etc) is required to access the index.html through http(s):// and not file:///C:/...
{% endhint %}

**First, you need to create an html page and include the library call:**&#x20;

```
<script src="assets/js/signchain-signer.min.js"></script>
```

**EXAMPLE OF THE HTML PART**

Create your own simple html to allow you to connect with your Waves Account, select the file you want to certify and then register the hash of this file on the Blockchain using Waves Signer.

```
<!DOCTYPE html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Sign signer</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="assets/css/bs.css">
    <link rel="stylesheet" href="assets/css/style.css">
  </head>
  <body>
    <div class="container">
      <div class="row">

        <div class="col-lg-12 mt-4">
          
          <div class="mb-4">
            <button id="login" class="btn btn-primary">SIGN IN</button> <button id="logout" class="hide btn btn-primary">LOGOUT</button>
          </div>

          <div id="logged_wrap">

            <div id="account_details" class="wrapper mt-4">
              <h2>Account details</h2>
              <div id="userInfos" class="mt-2"></div>
              <div id="userCredit" class="mt-2"></div>
              <div id="userBalance" class="mt-2"></div>
              <div id="certificationCost" class="mt-2"></div>
            </div>
            
            <div id="certify_details" class="wrapper mt-4 mb-4">
              <h2>Certify</h2>
              <div class="mb-4">
                <input type="file" id="selectFile" />
                <div id="fileInfos" class="mt-2"></div>
              </div>
              <button id="certify" class="btn btn-primary">CERTIFY</button>
              <div id="result" class="mt-2"></div>
            </div>


          </div>

        </div>
      </div>
  </div>
  <script src="assets/js/signchain-signer.min.js"></script>
  <script src="assets/js/site.js"></script>
  </body>
</html>
```

This library includes three methods that allows you to retrieve a connected user's SIGN balance, his SIGN Certification credit if any as well as the current Certification Cost in SIGN Utility Tokens, this information is  displayed in our template as #userCredit, #userBalance and #certificationCost

Then we have the #login button to allow users to log in with Waves Signer, followed by the #userInfos block that will receive Waves Signer data once connected (address and publicKey)

The #selectFile input field will allow file selection on the user's computer, once the file is selected, the hash will be calculated locally client side (files never go online during the hashing process) and then the #fileInfos block will receive the file details (file name and file hash in our example)

Finally, the #certify button once clicked will call the invoke() method of Waves Signer with the appropriate data and ask the user to confirm the transaction. Once confirmed, the block #result will receive the transaction ID.

At the bottom you need to include the two javascript files, the library first then your custom javascript.

**EXAMPLE OF THE JAVASCRIPT PART**

All you need to do is to create your different listener and call the appropriate methods of the library; here an examples of each listener associated to our example HTML before we go into detail:

```
let network = "T" // W for mainnet, T for testnet
let explorerHost = network == "T" ? "https://testnet.wavesexplorer.com" : "https://wavesexplorer.com"
let verifyAddress = "3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm"
let Signchain = new window.signchain(network)
let storeData = null;
let storeDataVerify = null
let userData = null;

// LOGIN WITH SIGNER
document.getElementById("login").addEventListener("click", async function (e) {

  try{
    userData = await Signchain.login();
    if(login.toString().includes("User rejection!")){return}
    document.getElementById("logged_wrap").classList.add("show")
    document.getElementById("userInfos").innerHTML = "Address: " + userData.address + "<br>Public Key: " + userData.publicKey
    document.getElementById("login").classList.add("hide")
    document.getElementById("logout").classList.remove("hide")
    getCredit();
    getBalance();
    getPrice()
  }catch(err){
    console.log(err)
  }
});

// LOGIN WITH SIGNER
document.getElementById("logout").addEventListener("click", async function (e) {
  try{
    await Signchain.logout();
    document.getElementById("logged_wrap").classList.remove("show")
    document.getElementById("userInfos").innerHTML = ""
    document.getElementById("userBalance").innerHTML = ""
    document.getElementById("userCredit").innerHTML = "";
    document.getElementById("login").classList.remove("hide")
    document.getElementById("logout").classList.add("hide")
    storeData = null;
    userData = null;
  }catch(err){
    console.log(err)
  }
});

// ADD THE LISTENER TO YOUR CERTIFY INPUT FIELD
document.getElementById("selectFile").addEventListener("change", async function (event) {
  if(event.target.files[0]){
    let file = event.target.files[0]
    await Signchain.hash(file, function (res) {
      storeData = res;
      document.getElementById("fileInfos").innerHTML = "Title: " + storeData.title + "<br>Sha256 file hash: " + storeData.hash
    });
  }else{
    document.getElementById("fileInfos").innerHTML = ""
    storeData = null;
  }
});

// ADD THE LISTENER TO YOUR VERIFY INPUT FIELD
document.getElementById("selectFileVerify").addEventListener("change", async function (event) {
  if(event.target.files[0]){
    let file = event.target.files[0]
    await Signchain.hash(file, function (res) {
      storeDataVerify = res;
      document.getElementById("fileInfosVerify").innerHTML = "Hash sha256: " + storeDataVerify.hash
    });
  }else{
    document.getElementById("fileInfosVerify").innerHTML = ""
    storeDataVerify = null;
  }
});

document.getElementById("verify").addEventListener("click", async function (e) {
  document.getElementById("resultVerify").innerHTML = ""
  let checkData = await Signchain.verify(storeDataVerify.hash, verifyAddress)
  // is file certified by correct address
  if(checkData.valid){
    let certificationDate = JSON.parse(checkData.data[0].value).timestamp
    console.log(certificationDate)
    document.getElementById("resultVerify").innerHTML = '<strong class="valid">Certification valid</strong> and certified on '+new Date(certificationDate);
  }else{
    document.getElementById("resultVerify").innerHTML = '<strong class="invalid">Certification not found</strong>'
  }
})

// ON CLICK, RETRIEVE STORED DATA AND CALL THE FILE CERTIFICATION DAPP WITH SIGNER
document.getElementById("certify").addEventListener("click", async function (e) { 
  let useCredit = false
  document.getElementById("result").innerHTML = "Transaction processing... ";
  try{
    let credit = await Signchain.checkUserCredit(userData.address);
    if(credit > 0){
      useCredit = true
    }
    if(storeData == null) {
      document.getElementById("result").innerHTML = "File cannot be empty... "; 
      return
    }
  }catch(err){
    document.getElementById("result").innerHTML = err;
    console.log(err)
  }

  try{
    let certify = await Signchain.certify(storeData, userData.publicKey, useCredit);

    if(certify.id){ 
      document.getElementById("result").innerHTML = "Transaction ID: <a href=\""+explorerHost+"/tx/" + certify.id + "\" target=\"_blank\">"+certify.id+"</a>";
    }else{
      document.getElementById("result").innerHTML = "Something went wront: " + certify;
    }
    setTimeout(getCredit(userData.address), 3000);
  }catch(err){
    document.getElementById("result").innerHTML = err;
    console.log(err)
  }
});

// GET CERTIFICATION COST ON LOAD
let getPrice = async function(){
  try{
    let cost = await Signchain.getCertificationFee();
    document.getElementById("certificationCost").innerHTML = "Cost per certification: " + cost + " SIGN"
  }catch(err){
    console.log(err)
  }
}


// GET USER SIGN BALANCE
let getBalance = async function(){
  try{
    let balance = await Signchain.getUserBalance(userData.address);
    let balanceDecimal = balance / Math.pow(10, 8);
    document.getElementById("userBalance").innerHTML = "This account have: " + balanceDecimal + " SIGN Token(s)"
  }catch(err){
    console.log(err)
  }
}

// CHECK IF USER HAVE CREDIT
let getCredit = async function(){
  try{
    let credit = await Signchain.checkUserCredit(userData.address);
    credit = credit == undefined ? 0 : credit
    document.getElementById("userCredit").innerHTML = "This account have: " + credit + " Credit(s)"
  }catch(err){
    console.log(err)
  }
}


```

**`INIT THE LIB`**

```
let network = "T" // W for mainnet, T for testnet
let explorerHost = network == "T" ? "https://testnet.wavesexplorer.com" : "https://wavesexplorer.com"
let verifyAddress = "3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm"
let Signchain = new window.signchain(network)
```

The important initialisation part is:&#x20;

```
let Signchain = new window.signchain(network)
```

You can pass the network parameter (W for mainnet or T for testnet) or leave it empty for mainnet by default.

**LOGIN**\
\
*Signchain.login()*

```
document.getElementById("login").addEventListener("click", async function (e) {
  try{
    userData = await Signchain.login();
    if(login.toString().includes("User rejection!")){return}
    document.getElementById("logged_wrap").classList.add("show")
    document.getElementById("userInfos").innerHTML = "Address: " + userData.address + "<br>Public Key: " + userData.publicKey
    document.getElementById("login").classList.add("hide")
    document.getElementById("logout").classList.remove("hide")
    getCredit();
    getBalance();
    getPrice()
  }catch(err){
    console.log(err)
  }
});
```

This calls Waves Signer login() method, once logged in, the data (address and publicKey are stored in a userData variable, this information is displayed in the page and we call it the getCredit(), getBalance() and getPrice() methods we will define later

**LOGOUT**\
\
*Signchain.logout()*

```
document.getElementById("logout").addEventListener("click", async function (e) {
  try{
    await Signchain.logout();
    document.getElementById("logged_wrap").classList.remove("show")
    document.getElementById("userInfos").innerHTML = ""
    document.getElementById("userBalance").innerHTML = ""
    document.getElementById("userCredit").innerHTML = "";
    document.getElementById("login").classList.remove("hide")
    document.getElementById("logout").classList.add("hide")
    storeData = null;
    userData = null;
  }catch(err){
    console.log(err)
  }
});
```

**HASH FILE**\
\
*Signchain.hash()*

```
document.getElementById("selectFile").addEventListener("change", async function (event) {
  if(event.target.files[0]){
    let file = event.target.files[0]
    await Signchain.hash(file, function (res) {
      storeData = res;
      document.getElementById("fileInfos").innerHTML = "Title: " + storeData.title + "<br>Sha256 file hash: " + storeData.hash
    });
  }else{
    document.getElementById("fileInfos").innerHTML = ""
    storeData = null;
  }
});
```

This listener listens to any changes on our input file field and calls the hash method from the signchain library, the response object will include the title, the hash and the file in byteArray if the file is under 10Mb or null for bigger file (at the moment we limitate IPFS upload at 10Mb), this data is stored in a storeData object and the title and hash are displayed on the page

**CERTIFY THE FILE**\
\
*Signchain.certify(data: object, pubKey: string, credit: boolean)*

```
document.getElementById("certify").addEventListener("click", async function (e) { 
  let useCredit = false
  document.getElementById("result").innerHTML = "Transaction processing... ";
  try{
    let credit = await Signchain.checkUserCredit(userData.address);
    if(credit > 0){
      useCredit = true
    }
    if(storeData == null) {
      document.getElementById("result").innerHTML = "File cannot be empty... "; 
      return
    }
  }catch(err){
    document.getElementById("result").innerHTML = err;
    console.log(err)
  }

  try{
    let certify = await Signchain.certify(storeData, userData.publicKey, useCredit);

    if(certify.id){ 
      document.getElementById("result").innerHTML = "Transaction ID: <a href=\""+explorerHost+"/tx/" + certify.id + "\" target=\"_blank\">"+certify.id+"</a>";
    }else{
      document.getElementById("result").innerHTML = "Something went wront: " + certify;
    }
    setTimeout(getCredit(userData.address), 3000);
  }catch(err){
    document.getElementById("result").innerHTML = err;
    console.log(err)
  }
});
```

After clicking on the #certify button, the certify() method is called with the storeData object (which includes the result from the hashing function), the public key of the connected account and a boolean to use credits or tokens as parameters.\
\
In this example we'll first check if the Certification Credit balance of the user is superior to 0, if so, we use credit, if not, we use SIGN's Utility token as payment.

\
\
**storeData structure**\
\
`{`\
&#x20;  `buffer: ArrayBuffer(98093) {},`\
&#x20;  `hash: "788ce1b308d265efad63373183ce563e6b90b2364a978cbfdb948314a72ac8f8",`\
&#x20;  `index: "a6049a50-a259-11ea-b11c-6d336bf17b27",`\
&#x20;  `title: "Send_Curl_Commands_Online.png"`\
`}`

**userData structure**\
\
`{`\
&#x20;  `address: "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp",`\
&#x20;  `publicKey: "CqbpJxfYeagkaT7sXQpxsfJXS1ZPxjM1Giw94n3y4Tp5"`\
`}`<br>

**GET THE CERTIFICATION PRICE**\
\
*Signchain.getCertificationFee()*

```
let getPrice = async function(){
  try{
    let cost = await Signchain.getCertificationFee();
    document.getElementById("certificationCost").innerHTML = "Cost per certification: " + cost + " SIGN"
  }catch(err){
    console.log(err)
  }
}
```

**GET THE USER SIGN TOKEN BALANCE**\
\
*Signchain.getUserBalance(address: string)*

```
let getBalance = async function(){
  try{
    let balance = await Signchain.getUserBalance(userData.address);
    let balanceDecimal = balance / Math.pow(10, 8);
    document.getElementById("userBalance").innerHTML = "This account have: " + balanceDecimal + " SIGN Token(s)"
  }catch(err){
    console.log(err)
  }
}
```

**GET THE USER CERTIFICATION CREDIT BALANCE**\
\
*Signchain.checkUserCredit(address: string)*

```
let getCredit = async function(){
  try{
    let credit = await Signchain.checkUserCredit(userData.address);
    credit = credit == undefined ? 0 : credit
    document.getElementById("userCredit").innerHTML = "This account have: " + credit + " Credit(s)"
  }catch(err){
    console.log(err)
  }
}
```


# Verify

Implementation of a verification page on your website

The library can be downloaded here: {{ link }}

Full working example can be downloaded here: {{ link }}

{% hint style="info" %}
This template require http protocol to work properly or you may get a CORS Policy error.\
To test locally, a server (wamp, node server etc) is required to access the index.html through http(s):// and not file:///C:/...
{% endhint %}

**First, you need to create an html page and include the library call:**&#x20;

```
<script src="assets/js/signchain-signer.min.js"></script>
```

**To init the library you need to do the following at the start of your javascript code:**

```
let network = "T" // W for mainnet, T for testnet
let Signchain = new window.signchain(network)
```

**HTML EXAMPLE**

```
<!DOCTYPE html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Verification</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="assets/css/bs.css">
    <link rel="stylesheet" href="assets/css/style.css">
  </head>
  <body>
    <div class="container">
      <div class="row">

        <div class="col-lg-12 mt-4">
          <div class="mb-4">
            School address:<br/><strong class="address">3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm</strong>
          </div>
          <div class="wrapper mt-4">
            <h2>Verify</h2>
            <div class="mb-4">
              <input type="file" id="selectFileVerify" />
              <div id="fileInfosVerify" class="mt-2"></div>
            </div>
            <button id="verify" class="btn btn-primary">VERIFY</button>
            <!-- Result go in #resultVerify -->
            <div id="resultVerify" class="mt-2"></div>
          </div>
        </div>

      </div>
  </div>
  <script src="assets/js/signchain-signer.min.js"></script>
  <script src="assets/js/widget.js"></script>
  </body>
</html>
```

**JAVASCRIPT EXAMPLE**

```
let network = "T" // W for mainnet, T for testnet
let explorerHost = network == "T" ? "https://testnet.wavesexplorer.com" : "https://wavesexplorer.com"
let verifyAddress = "3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm"
let Signchain = new window.signchain(network)
let storeDataVerify = null

// ADD THE LISTENER TO YOUR VERIFY INPUT FIELD
document.getElementById("selectFileVerify").addEventListener("change", async function (event) {

  if(event.target.files[0]){

    let file = event.target.files[0]
    await Signchain.hash(file, function (res) {
      storeDataVerify = res;
      document.getElementById("fileInfosVerify").innerHTML = "Sha256 file hash: " + storeDataVerify.hash
    });

  }else{

    document.getElementById("fileInfosVerify").innerHTML = ""
    storeDataVerify = null;
    
  }

});

// ADD VERIFICATION CLICK EVENT ON VERIFY BUTTON
document.getElementById("verify").addEventListener("click", async function (e) {

  let template
  document.getElementById("resultVerify").innerHTML = ""
  let checkData = await Signchain.verify(storeDataVerify.hash, verifyAddress)
  
  if(checkData.valid){
    let certificationDate = JSON.parse(checkData.data[0].value).timestamp

    template = `
    <div class="p-4">
      <strong class="valid">Certification valid</strong>
      and certified on ${new Date(certificationDate)} 
      <a href="${explorerHost+'/tx/'+checkData.data[0].txid}" target="_blank">See on the Blockchain</a>
    </div>
    `

  }else{
    template = `<strong class="invalid">Certification not found</strong>`
  }

  document.getElementById("resultVerify").innerHTML = template;

})


```

**There is 4 important elements in the HTML example:**

```
<input type="file" id="selectFileVerify" />
<div id="fileInfosVerify" class="mt-2"></div>
<button id="verify" class="btn btn-primary">VERIFY</button>
<div id="resultVerify" class="mt-2"></div>
```

If you change the identifiants (css ids) of these elements, you will have to also change it in the javascript example.

**EDIT THE RESULT**

To edit the result, simply change the html of the variable "template" in the javascript example:

```
template = `
    <div class="p-4">
      <strong class="valid">Certification valid</strong>
      and certified on ${new Date(certificationDate)} 
      <a href="${explorerHost+'/tx/'+checkData.data[0].txid}" target="_blank">See on the Blockchain</a>
    </div>
    `
```


# Contact-us

If you have any questions don't hesitate to contact us for technical or commercial support.

Website: [www.signature-chain.com](http://www.signature-chain.com/)\
Web application: [www.sign-web.app](http://www.sign-web.app/)\
Free trial: [trial.sign-web.app](https://trial.sign-web.app/)\
Waves Protocol: [www.wavesprotocol.org](http://www.wavesprotocol.org/)\
White Paper: [www.signature-chain.com/wp.pdf](http://www.signature-chain.com/WP_SIGN.pdf)\
\
Global: <contact@signature-chain.com>\
Philippines: <kristine@signature-chain.com>\
Europe: <joep@signature-chain.com>\
Vietnam: <john@signature-chain.com> \
Technical: <sicadev@signature-chain.com>


