Getting Started
Overview
Trustless Work Blocks is a set of React UI blocks, hooks, and providers.
It bundles (or expects) these core libraries:
react-hook-form — Performant, flexible library for managing forms in React.
zod — TypeScript-first schema validation library.
@trustless-work/escrow — SDK for handling escrow logic in decentralized apps.
@tanstack/react-query — Data-fetching and caching library for React.
@tanstack/react-query-devtools — Developer tools for inspecting React Query state.
@hookform/resolvers — Resolvers for integrating validation libraries (like Zod) with React Hook Form.
@creit.tech/stellar-wallets-kit — Wallet connection toolkit for Stellar blockchain.
axios — Promise-based HTTP client for making API requests.
@tanstack/react-table — Headless table library for building flexible data grids.
react-day-picker — Lightweight date picker component for React.
recharts — Charting library built with React and D3.
Links
Setup
Configure Environment
The next step is to configure the Trustless Work provider. You need to configure the following:
baseURL: Trustless Work API URL. UsemainNetordevelopment.apiKey: Authorization provided by our dApp to use the API.
Create a provider that wraps your app with TrustlessWorkConfig.
Read-only flows can work without an API key. Write flows (deploy/fund/release/…) require a valid key.
Wrap your app with providers
You must wrap your app with these providers:
ReactQueryClientProviderTrustlessWorkProviderWalletProvider
If you want to use some blocks, you should wrap your app with their providers. See more in: Dependencies
Now, you are able to interact with Trustless Work blocks.
Last updated