# File Certification

```
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\
\&#xNAN;*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\
\&#xNAN;*{* \
&#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:\
\&#xNAN;*document.signer.\_userData.publicKey*
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sign-web.app/developers/technical-details/file-certification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
