# multiSignBlock

This block provides a way to specify multiple signators for a single VC document, and then create a VP based on it.

### 1. Properties

| Block Property   | Definition                                                                                                                                                     | Example Input                                                                  | Status |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------ |
| tag              | Unique name for the logic block.                                                                                                                               | **multiSignBlock**                                                             |        |
| permissions      | Which entity has rights to interact at this part of the workflow.                                                                                              | NoRole                                                                         |        |
| defaultActive    | Shows whether this block is active at this time and whether it needs to be shown.                                                                              | Checked or unchecked.                                                          |        |
| On errors        | Called if the system error has occurs in the Block                                                                                                             | <ul><li>No action</li><li>Retry</li><li>Go to step</li><li>Go to tag</li></ul> |        |
| Stop Propagation | End processing here, don't pass control to the next block.                                                                                                     | Checked or unchecked.                                                          |        |
| Threshold (%)    | Proportion Of signators which are required to sign the document to achieve quorum for it to transition to ‘signed’ status. Must be a number between 0 and 100. | 0-100                                                                          |        |

{% hint style="info" %}
**Note:** The system assigns ‘not signed’ status to the document when 100 – threshold percentage of users indicated rejection status.
{% endhint %}

### 2. Events

| Event                         | Description                                                                          | Content                                                                     |
| ----------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
| SignatureQuorumReachedEvent   | This event occurs when the threshold number (quorum) of signatures has been reached. | now-signed target VC document which can then be used for further processing |
| SignatureSetInsufficientEvent | This event occurs when the threshold number (quorum) of rejections has been achieved | rejected (target) VC document which can be used for further processing      |

### 3. Data Format

#### 3.1 POST request

```
{
	"document":{
		"id":"…" – ID of the VC document
	},
	"status":"SIGNED" – new status, can be SIGNED or DECLINED
}

```

#### 3.2 GET request

```
{
	blockType: "multiSignBlock"
	id:"61ed0335-8b7e-44d9-aedd-0c86c5806442"
	status: {
		confirmationStatus: - final status, it is ‘null’ if the quorum is not reached
		data: [
				{
						username,
						did – did and username of the user which took the decision
						status – the decision of the user, the value space is: SIGNED/DECLINED
		                 }
		       ] 
	         }
}

```

#### Array of the decisions for each user can be as follows:

| Type of Decision  | Description                                                                                                |
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
| declinedCount     | number of users who declined signing the document                                                          |
| declinedPercent   | percentage of users who declined need signing the document                                                 |
| declinedThreshold | threshold number of users who need to decline signing the document to reach the final decision             |
| documentStatus    | status of the document for the current users, null if the user has not made a selection to sign or decline |
| signedCount       | number of users who have signed the document                                                               |
| signedPercent     | percentage of users who have signed the document                                                           |
| signedThreshold   | threshold number of users who need to sign the document to reach the final decision                        |
| threshold         | threshold in terms of percentage                                                                           |
| total             | total number of users in the signing group                                                                 |

### 4. Example

#### 4.1 Important Points

4.1.1 multiSignBlock must be used with Groups.

<figure><img src="/files/kV71cR0bGltZlZpy4CM2" alt=""><figcaption></figcaption></figure>

4.1.2 multiSignBlock must be child block of grid block to receive all data it requires to operate.

<figure><img src="/files/BiMYrnWy23rY6dFSB93X" alt=""><figcaption></figcaption></figure>

### 5. UI

#### 5.1 Signing the document

We have an option of Signing/ Declining the document by clicking on "Sign" or "Decline" button for the document as shown below:

<figure><img src="/files/mtEqpXPOLMhVuLO0xcDK" alt=""><figcaption></figcaption></figure>

#### 5.2 Threshold Display

Number of users, who have signed or declined the document can be displayed with threshold as shown below:

<figure><img src="/files/W0Y5JyzDENXsDJMLKVi0" alt=""><figcaption></figcaption></figure>

#### 5.3 Detailed Signature Information

To get detailed information on Signature status, we have an info icon near the threshold as shown below:

<figure><img src="/files/2PcpIvtGTOsqTlsqCtet" alt=""><figcaption></figcaption></figure>

#### 5.4 Final Signature Result

To get the final Signature Result with detailed information such as which users have Signed / Declined, we need to hover on the Status as shown below:

<figure><img src="/files/uwL1I99TVvVGBbCygh3w" alt=""><figcaption></figcaption></figure>

### API Parameters

<mark style="color:blue;">`GET`</mark> `/policies/{policyId}/blocks/{uuid}`

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| policyId<mark style="color:red;">\*</mark> | String | Policy ID   |
| uuid<mark style="color:red;">\*</mark>     | String | Block UUID  |

{% tabs %}
{% tab title="200: OK Successful Operation" %}

```javascript
{
  "id": "1c922d1a-7f9d-492f-b0f9-f319eb2b66be",
  "blockType": "multiSignBlock"
}

```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `/policies/{policyId}/blocks/{uuid}`

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| policyId<mark style="color:red;">\*</mark> | String | Policy ID   |
| uuid<mark style="color:red;">\*</mark>     | String | Block UUID  |

#### Request Body

| Name                                       | Type   | Description     |
| ------------------------------------------ | ------ | --------------- |
| status<mark style="color:red;">\*</mark>   | String | Signed/Declined |
| document<mark style="color:red;">\*</mark> | Object | VC Document     |


---

# 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://guardian.hedera.com/guardian-dev/guardian/standard-registry/policies/policy-creation/introduction/multisignblock.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.
