> For the complete documentation index, see [llms.txt](https://docs.trustlesswork.com/trustless-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlesswork.com/trustless-work/v2-en/introduction/developer-resources/schema.md).

# Schema

In this section you will be able to see the outline of the types of escrow's that Trustless Work offers. With these diagrams you will be able to know the structure and properties of an escrow both in its Single-Release and Multi-Release versions.

## Single Release Escrow Schema

#### Escrow body:

| Key          | Type              | Description                                                                   |
| ------------ | ----------------- | ----------------------------------------------------------------------------- |
| engagementId | string            | Unique identifier for the escrow                                              |
| title        | string            | Name of the escrow                                                            |
| roles        | Roles Object      | Roles that make up the escrow structure                                       |
| description  | string            | Text describing the function of the escrow                                    |
| amount       | number            | Amount to be transferred upon completion of escrow milestones                 |
| plataformFee | number            | Commission that the platform will receive when the escrow is completed        |
| milestones   | Milestone\<Array> | Objectives to be completed to define the escrow as completed                  |
| dispute      | Dispute Object    | Dispute state of the escrow                                                   |
| released     | boolean           | Flag indicating that escrow funds have already been released                  |
| trustline    | Trustline Object  | Information on the trustline that will manage the movement of funds in escrow |

#### Roles:

| Name             | Type             | Description                                                                            |
| ---------------- | ---------------- | -------------------------------------------------------------------------------------- |
| approvers        | array of strings | Addresses of the entity requiring the service.                                         |
| serviceProviders | array of strings | Addresses of the entity providing the service.                                         |
| plataform        | string           | Address of the entity that owns the escrow                                             |
| releaseSigners   | array of strings | Addresses of the user in charge of releasing the escrow funds to the service provider. |
| disputeResolvers | array of strings | Addresses in charge of resolving disputes within the escrow.                           |
| receiver         | string           | Address where escrow proceeds will be sent to                                          |
| admin            | string           | Address of the escrow administrator                                                    |
| observers        | array of strings | Addresses of entities observing the escrow without participating                       |

#### Milestone:

| Name        | Type                      | Description                                         |
| ----------- | ------------------------- | --------------------------------------------------- |
| description | string                    | Text describing the function of the milestone.      |
| status      | string                    | Milestone status. Ex: Approved, In dispute, etc...  |
| evidence    | string (optional)         | Evidence of work performed by the service provider. |
| approvals   | MilestoneApprovals Object | Tracks approval progress for this milestone         |

#### MilestoneApprovals:

| Name          | Type             | Description                                            |
| ------------- | ---------------- | ------------------------------------------------------ |
| target        | number           | Number of approvals required to complete the milestone |
| approvalCount | number           | Current number of approvals received                   |
| approvers     | array of strings | Addresses that have already approved the milestone     |

#### Dispute:

| Name       | Type    | Description                                                       |
| ---------- | ------- | ----------------------------------------------------------------- |
| isDisputed | boolean | Flag indicating that an escrow is in dispute.                     |
| reason     | boolean | Text explaining the reason for the dispute                        |
| resolved   | boolean | Flag indicating that a disputed escrow has already been resolved. |

#### Trustline:

| Name    | Type   | Description                                                                            |
| ------- | ------ | -------------------------------------------------------------------------------------- |
| address | string | Public address establishing permission to accept and use a specific token.             |
| symbol  | string | Official abbreviation representing the token in wallets, exchanges, and documentation. |

### Single Release Escrow Flow:

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

## Multi Release Escrow Schema

| Key          | Type              | Description                                                                   |
| ------------ | ----------------- | ----------------------------------------------------------------------------- |
| engagementId | string            | Unique identifier for the escrow                                              |
| title        | string            | Name of the escrow                                                            |
| description  | string            | Text describing the function of the escrow                                    |
| roles        | Roles Object      | Roles that make up the escrow structure                                       |
| plataformFee | number            | Commission that the platform will receive when the escrow is completed        |
| milestones   | Milestone\<Array> | Objectives to be completed to define the escrow as completed                  |
| trustline    | Trustline Object  | Information on the trustline that will manage the movement of funds in escrow |

#### Roles:

| Name             | Type             | Description                                                                            |
| ---------------- | ---------------- | -------------------------------------------------------------------------------------- |
| approvers        | array of strings | Addresses of the entity requiring the service.                                         |
| serviceProviders | array of strings | Addresses of the entity providing the service.                                         |
| plataform        | string           | Address of the entity that owns the escrow                                             |
| releaseSigners   | array of strings | Address esof the user in charge of releasing the escrow funds to the service provider. |
| disputeResolvers | array of strings | Addresses in charge of resolving disputes within the escrow.                           |
| admin            | string           | Address of the escrow administrator                                                    |
| observers        | array of strings | Addresses of entities observing the escrow without participating                       |

#### Milestone:

| Name        | Type                      | Description                                                     |
| ----------- | ------------------------- | --------------------------------------------------------------- |
| description | string                    | Text describing the function of the milestone.                  |
| status      | string                    | Milestone status. Ex: Approved, In dispute, etc...              |
| evidence    | string (optional)         | Evidence of work performed by the service provider.             |
| approvals   | MilestoneApprovals Object | Tracks approval progress for this milestone                     |
| amount      | number                    | Amount to be transferred upon completion of escrow milestones.  |
| dispute     | Dispute Object            | Dispute state of the milestone                                  |
| released    | boolean                   | Flag indicating that milestone funds have already been released |
| receiver    | string                    | Address where escrow proceeds will be sent to                   |

#### MilestoneApprovals:

| Name          | Type             | Description                                            |
| ------------- | ---------------- | ------------------------------------------------------ |
| target        | number           | Number of approvals required to complete the milestone |
| approvalCount | number           | Current number of approvals received                   |
| approvers     | array of strings | Addresses that have already approved the milestone     |

#### Dispute:

| Name       | Type    | Description                                                       |
| ---------- | ------- | ----------------------------------------------------------------- |
| isDisputed | boolean | Flag indicating that an escrow is in dispute.                     |
| reason     | string  | Text explaining the reason for the dispute                        |
| resolved   | boolean | Flag indicating that a disputed escrow has already been resolved. |

#### Trustline:

| Name    | Type   | Description                                                                            |
| ------- | ------ | -------------------------------------------------------------------------------------- |
| address | string | Public address establishing permission to accept and use a specific token.             |
| symbol  | string | Official abbreviation representing the token in wallets, exchanges, and documentation. |

### Multi Release Escrow Flow:

<figure><img src="/files/3jT5PCg8hfwaT3qCB9Q3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/introduction/developer-resources/schema.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
