> For the complete documentation index, see [llms.txt](https://docs.sign-web.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sign-web.app/developers/technical-details/multiparty-agreement.md).

# Multiparty Agreement

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