Welcome to
Trustless Work

Escrow-as-a-service platform designed to secure transactions with transparency, efficiency, and scalability.

|

API Key for Authentication

Generate organization-scoped API keys in the dApp and authenticate your backend with Trustless Work using the x-api-key header.

How to create an API key in the dApp
Walk through wallet sign-in, organization selection, and key generation
API Key for Authentication
Self-serve keys for your organization. Store them in your backend — never in the browser.
How to Create Your API Key
Follow these steps to generate a key for your integration
1

Connect your wallet

Sign in to the dApp with your Stellar wallet (SEP-10). New wallets register with name and email.

2

Select an organization

Choose or create an organization in the team switcher. API keys are scoped to the active organization.

3

Open API Keys

Go to Integrations → API Keys in the sidebar and create a key for your backend.

4

Copy and store securely

The secret is shown once. Use it server-side as the x-api-key header against mainnet or testnet API URLs.

Roles in Trustless Work

Each role has a distinct function within the escrow process, defining who can perform specific actions and how parties interact with the smart contract.

Admin
Owns escrow configuration after deploy: update terms, manage milestones, and extend contract TTL. Does not approve, release, or dispute.
Examples
Marketplace operator adjusting escrow metadata before funding
Project lead adding a new milestone mid-engagement
Ops wallet renewing Soroban storage TTL
Approvers
Review deliverables and approve milestones. Can open a dispute, and can approve-and-release when the wallet is also a release signer.
Examples
Buyer approving freelance deliverables
Host approving checkout in a security deposit flow
Campaign sponsor signing off crowdfunding milestones
Service Providers
Deliver the work tracked by milestones, update status and evidence on-chain, and can open a dispute when needed.
Examples
Freelancer marking a milestone completed with evidence
Contractor updating progress on a funded build
Inspector recording inspection status for a property escrow
Release Signers
Authorize payout once approvals are in place—whole escrow for single-release, per milestone for multi-release. Can also open a dispute.
Examples
Platform releasing a deposit after approval
DAO treasurer releasing payment to a contributor
Marketplace settling an approved order
Dispute Resolvers
Resolve open disputes by redistributing funds and withdraw remaining balances after a terminal state. Cannot open disputes, and must not overlap with other operational roles.
Examples
Independent arbiter settling a delivery dispute
Platform compliance wallet redistributing escrow balance
Sweeping leftover funds after resolution
Platform
Receives the configured platform fee on every release or dispute resolution, and can open a dispute. Cannot change itself after initialization.
Examples
Marketplace collecting a transaction fee on release
Crowdfunding platform taking its configured cut
Hosting platform fee wallet on a deposit escrow
Receiver
Final beneficiary of released funds. Can open a dispute (escrow-level in single-release; only their milestones in multi-release).
Examples
Freelancer receiving payment after release
Seller receiving marketplace settlement
Contributor receiving a milestone payout
Observers
Optional read-only wallets attached for visibility. They have no on-chain signing authority.
Examples
Auditor watching escrow state without acting
Compliance team following role assignments
Stakeholder monitoring progress without signing

Learn More About Roles

Discover how each role interacts within the escrow lifecycle and understand the complete workflow.

Open in-app Help

Quick Integration Setup

Get started with Trustless Work API in minutes. Learn how to authenticate and make your first API call.

Authentication
All API requests require authentication using your API key in the x-api-key header. Keep the key on your server — never in the browser.

Base URL

Mainnethttps://api.trustlesswork.com
Testnethttps://api.dev.trustlesswork.com

Header

"x-api-key": your_api_key,

React Library

npm i @trustless-work/escrow
ExampleEndpoint
Here's an example of how to fund an escrow using our API.
POST/escrow/single-release/fund-escrow

Params

contractId:string (required)
signer:string (required)
amount:string (required)
Code Examples
Choose between REST API or React Library to see implementation examples.
// Initialize API client (Core v2)
const API_BASE_URL = 'https://beta.api.trustlesswork.com';
const API_KEY = process.env.NEXT_PUBLIC_API_KEY || "";

const headers = {
  'Content-Type': 'application/json',
  "x-api-key": your_api_key,
};

// Example: Fund Escrow (build unsigned XDR)
const fundEscrow = async (contractId, signer, amount) => {
  try {
    const response = await fetch(
      `${API_BASE_URL}/escrow/single-release/v2/fund`,
      {
        method: 'POST',
        headers,
        body: JSON.stringify({
          contractId,
          signer,
          amount
        })
      }
    );

    const data = await response.json();
    // { unsignedXdr, txHash }
    return data;
  } catch (error) {
    console.error('Error funding escrow:', error);
  }
};

API Reference

Complete REST API documentation

View Docs

React Library

React hooks and components

View Docs

Escrow Transaction Flow

Understand the complete process from payload preparation to transaction execution

Flow Diagram
Visual representation of the 5-step escrow transaction process
1

Prepare Payload

dApp

Create the transaction payload with required parameters

2

Execute Endpoint

dApp

Send the payload to the Trustless Work API endpoint

3

Get Unsigned TX

dApp

Receive the unsigned transaction from the API

4

Sign Transaction

wallet

Sign the transaction using wallet or passkey

5

Send Transaction

dApp

Submit the signed transaction to the blockchain

Transaction Flow Summary

This 5-step process ensures secure and transparent escrow transactions