> 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/v1-pt/sdk-blocks-de-escrow/blocos-dependentes.md).

# Blocos dependentes

Alguns blocos dependem de módulos compartilhados (providers, helpers, query, etc).

Instale as dependências primeiro.

{% hint style="warning" %}
Se você pular dependências, encontrará erros de contexto ausente em tempo de execução.
{% endhint %}

### Diagrama de dependências

Use o diagrama de dependências interativo para confirmar do que um bloco precisa.

{% embed url="<https://blocks.trustlesswork.com/get-started/dependencies>" %}

***

### Dependências por grupo de blocos

#### Listagens (Escrows por Signatário / Escrows por Função)

Aplica-se a:

* Escrows por Signatário: [Tabela](https://blocks.trustlesswork.com/blocks/escrows-escrows-by-signer-table), [Cartões](https://blocks.trustlesswork.com/blocks/escrows-escrows-by-signer-cards)
* Escrows por Função: [Tabela](https://blocks.trustlesswork.com/blocks/escrows-escrows-by-role-table), [Cartões](https://blocks.trustlesswork.com/blocks/escrows-escrows-by-role-cards)

Módulos necessários:

* `wallet-kit`
* `providers`
* `handle-errors`
* `helpers`
* `tanstack`
* `escrows/single-release` ou `escrows/multi-release` ou `escrows/single-multi-release` (depende de quais ações você quer habilitar)

{% hint style="info" %}
Incluir **todos** providers para listagens.

As listagens abrem diálogos de detalhes e precisam dos contextos dialog + amount.
{% endhint %}

{% code title="CLI (exemplos)" %}

```sh
# Core
npx trustless-work add wallet-kit
npx trustless-work add tanstack
npx trustless-work add providers

# Actions (escolha o que você precisa)
npx trustless-work add escrows/single-release
# npx trustless-work add escrows/multi-release
# npx trustless-work add escrows/single-multi-release

# Módulos utilitários opcionais
npx trustless-work add handle-errors
npx trustless-work add helpers
```

{% endcode %}

#### Ações (single-release / multi-release)

Todas as ações single-release e multi-release ([Inicializar Escrow](https://blocks.trustlesswork.com/blocks/escrows-initialize-escrow), [Financiar Escrow](https://blocks.trustlesswork.com/blocks/escrows-fund-escrow), [Alterar Status do Marco](https://blocks.trustlesswork.com/blocks/escrows-change-milestone-status), [Aprovar Marco](https://blocks.trustlesswork.com/blocks/escrows-approve-milestone), [Liberar](https://blocks.trustlesswork.com/blocks/escrows-release-escrow), [Disputar](https://blocks.trustlesswork.com/blocks/escrows-dispute-escrow), [Resolver](https://blocks.trustlesswork.com/blocks/escrows-resolve-dispute), [Atualizar Escrow](https://blocks.trustlesswork.com/blocks/escrows-update-escrow)) requerem:

* `wallet-kit`
* `providers`
* `handle-errors`
* `tanstack`
* `helpers`

{% code title="CLI (mínimo para ações)" %}

```sh
npx trustless-work add wallet-kit
npx trustless-work add tanstack
npx trustless-work add providers

npx trustless-work add handle-errors
npx trustless-work add helpers
```

{% endcode %}

***

### Encapsulamento de providers (a ordem importa)

Encapsule seu app com esses providers, nesta ordem exata.

Incluir `EscrowDialogsProvider` e `EscrowAmountProvider` quando você usa diálogos ou o contexto de amount.

{% hint style="danger" %}
Não reordene os providers.

A maioria dos problemas de “hooks não funcionando” vem da ordem dos providers.
{% endhint %}

{% code title="app/layout.tsx" overflow="wrap" %}

```tsx
import { ReactQueryClientProvider } from "@/components/tw-blocks/providers/ReactQueryClientProvider";
import { TrustlessWorkProvider } from "@/components/tw-blocks/providers/TrustlessWork";
import { WalletProvider } from "@/components/tw-blocks/wallet-kit/WalletProvider";
import { EscrowProvider } from "@/components/tw-blocks/providers/EscrowProvider";
import { EscrowDialogsProvider } from "@/components/tw-blocks/providers/EscrowDialogsProvider";
import { EscrowAmountProvider } from "@/components/tw-blocks/providers/EscrowAmountProvider";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ReactQueryClientProvider>
          <TrustlessWorkProvider>
            <WalletProvider>
              <EscrowProvider>
                <EscrowDialogsProvider>
                  <EscrowAmountProvider>
                    {children}
                  </EscrowAmountProvider>
                </EscrowDialogsProvider>
              </EscrowProvider>
            </WalletProvider>
          </TrustlessWorkProvider>
        </ReactQueryClientProvider>
      </body>
    </html>
  );
}
```

{% endcode %}


---

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

```
GET https://docs.trustlesswork.com/trustless-work/v1-pt/sdk-blocks-de-escrow/blocos-dependentes.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.
