circle-check
Our docs are AI-ready. Use them as context for any AI, or ask questions via the search bar.

flag-checkeredGetting Started

Overview

Trustless Work Blocks is a set of React UI blocks, hooks, and providers.

It bundles (or expects) these core libraries:


Setup

1

Installation

Start by installing Trustless Work Blocks

2

Initialize Configuration

Initialize your project with the CLI.

3

Configure Environment

The next step is to configure the Trustless Work provider. You need to configure the following:

  • baseURL: Trustless Work API URL. Use mainNet or development.

  • apiKey: Authorization provided by our dApp to use the API.

Create a provider that wraps your app with TrustlessWorkConfig.

circle-info

Read-only flows can work without an API key. Write flows (deploy/fund/release/…) require a valid key.

4

Wrap your app with providers

You must wrap your app with these providers:

  • ReactQueryClientProvider

  • TrustlessWorkProvider

  • WalletProvider

If you want to use some blocks, you should wrap your app with their providers. See more in: Dependenciesarrow-up-right

5

Add your First Component

Add wallet connectivity to your app:

Example usage in a page:

Now, you are able to interact with Trustless Work blocks.

Last updated

Was this helpful?