All pages
Powered by GitBook
1 of 30

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Introduction

How to get started in Trustless Work API REST

Base URL

Mainnet API

https://api.trustlesswork.com

Testnet API

https://dev.api.trustlesswork.com

Warning!

You'll have 50 as a request rate limit per client in the API every 60 seconds.

GitHub Repository

API Swagger

Single Release Escrow

Single-Release Escrow is a type in which all your funds are released only once, either with the resolution of a dispute or by completing all the milestones defined for it.

The Deploy endpoints allow users to deploy escrows efficiently. These endpoints provide the way to initialize escrows in the Stellar's Blockchain.

Key Components

  • Initial Fund Lockup: Upon contract initiation, the escrow amoun plus the platform fee (“platformFee”) is deposited into an escrow account.

  • Flags: The escrow status is interpreted by means of these flags: (approved, dispute

Release Funds

You release the escrow funds to the service provider through the approver.

Headers

Name
Value

,
released
,
resolved
).
  • Primary Roles:

    • Service Provider: Delivers the deliverable corresponding to each milestone.

    • Approver: Verifies and approves a milestone before authorizing the release of funds.

    • Dispute Resolver: Intervenes in case of disagreement and decides whether to release or refund the locked amount.

    • Receiver: The final recipient of the funds if different from the Service Provider.

  • Brief Workflow

    1. An escrow is initialized by defining all the necessary escrow properties.

    2. The Service Provider completes a milestone and requests approval.

    3. The approver reviews the deliverable; if approved, signs a transaction that releases the amount allocated as escrow reward (minus the platform and Trustless Work fee).

    4. The Stellar network executes the transaction and transfers the payment to the Service Provider or the configured Receiver.

    5. If a dispute arises, the Dispute Resolver evaluates the evidence and, upon signing their decision, marks the escrow as resolved to release or refund the corresponding funds.

    This model protects all parties: the client knows that funds are available but cannot be released without validation, and the service provider receives payment upon completion of all milestones and the milestones themselves being approved by the approver, leveraging Stellar's transparency and immutability.

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    Trustless Work API

    What is the Trustless Work API?

    The Trustless Work REST API is a developer interface for creating and managing decentralized escrow contracts on the Stellar blockchain using Soroban smart contracts. It simplifies the escrow lifecycle and integrates seamlessly into any platform that needs conditional payments or trust-minimized fund release.


    🚀 Core Capabilities

    • Deploy Smart Escrows: Initialize smart contracts with defined roles, milestones, and conditions.

    • Fund Escrows: Lock funds into escrow accounts with Stellar-native assets (e.g., USDC).

    • Update & Approve Milestones: Collaborate on progress tracking and delivery verification.

    • Dispute Handling: Programmatically raise or resolve disputes.


    🧩 Escrow Types

    1. Single-Release Escrow

      • One-time fund release after milestone approval or dispute resolution.

      • Roles: Service Provider, Approver, Receiver, Dispute Resolver.

    2. Multi-Release Escrow


    📘 Key API Endpoints (Grouped)

    🔨 Deployment

    • /deployer/single-release

    • /deployer/multi-release

    💸 Funding

    • /escrow/{type}/fund-escrow

    ✅ Milestone Handling

    • /escrow/{type}/approve-milestone

    • /escrow/{type}/change-milestone-status

    🏁 Finalization

    • /escrow/{type}/release-funds (single)

    • /escrow/{type}/release-milestone-funds (multi)

    ⚠️ Disputes

    • /escrow/{type}/dispute-escrow

    • /escrow/{type}/resolve-dispute

    • /escrow/{type}/dispute-milestone (multi)

    🔄 Escrow Updates

    • /escrow/{type}/update-escrow

    📊 Query / Tracking

    • /escrow/get-multiple-escrow-balance

    • /helper/get-escrows-by-signer

    • /helper/get-escrows-by-role


    🧰 Helper Utilities

    • /helper/set-trustline: Set trustline to receive specific tokens like USDC.

    • /helper/send-transaction: Submit signed XDR transactions to Stellar.

    • /helper/get-multiple-escrow-balance: Batch query of escrow balances.


    🛡️ Security & Constraints

    • Unsigned Transactions: All operations return unsigned XDRs requiring client-side signing.

    • Role-Based Permissions: Specific actions (e.g., approve, dispute) require the correct role.

    • Rate Limits: 50 requests/minute per client.

    • Fee Model: A 0.3% mainnet fee is taken by Trustless Work, with platforms able to add their own fee.


    🎯 Use Cases

    • Freelance platforms

    • High-value e-commerce

    • SaaS billing

    • Cross-border real estate


    📌 Dev Resources

    Dev Map:

    • Swagger:

    • GitHub:

    Fund Escrow

    Allows users to deposit funds into an existing escrow contract, securing them until the agreed conditions are met.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Resolve Dispute

    Resolves escrow disputes by distributing funds to the approver and service provider as determined by the dispute resolver.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Dispute Escrow

    Responsible for initiating a dispute in an escrow. Change the value of the flag “disputed” from “disputed” to true.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Approve Milestone

    Responsible for approving the milestone through the escrow approver.

    Headers

    Name
    Value
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/single-release/release-funds",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }

    Release Funds: Release escrowed amounts only when predefined conditions are fulfilled.

  • Real-Time Status Tracking: Query escrow status, milestones, and balances.

  • Cross-Chain Compatibility: USDC support via Circle’s cross-chain transfer protocol.

  • Multiple milestone-based payouts.

  • Each milestone is independently approved and released.

  • /escrow/{type}/resolve-milestone-dispute (multi)
    Legal & professional services
  • Crowdfunding and grants

  • Security deposits

  • https://www.trustlesswork.com/developers
    https://dev.api.trustlesswork.com/docs
    https://github.com/Trustless-Work

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    <token>

    <token>

    <token>

    Change Milestone Status

    Responsible for changing the milestone status of an escrow through the service provider.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use example:

    Developer Quickstart

    This guide is your all-in-one resource to integrate, deploy, and extend Trustless Work. Whether you’re a developer, a product team, or seeding an AI agent — this page gives you everything.

    Hello! This page is optimized to be exported and loaded to your AI Agent of choice! you can also use ours in the Search Bar!

    🚀 What Is Trustless Work?

    Trustless Work is an Escrow-as-a-Service (EaaS) platform designed for the stablecoin economy. It lets you securely hold funds in non-custodial smart contracts until milestones are completed and approved.

    Helpers

    These endpoints provide a way to receive tokens through Trustline and send any transactions to the Stellar Blockchain.

    Introduction

    Helper endpoints are designed to provide additional functionalities that complement the main features of an API. They often include utility functions that streamline common requests, simplify data manipulation, or enhance overall user experience.

    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/single-release/approve-milestone",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/single-release/fund-escrow",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/single-release/resolve-dispute",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        // Execute the endpoint
        const response = await http.post(
          "/escrow/single-release/dispute-escrow",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    Helper Endpoint Overview

    Helper endpoints offer several benefits that enhance both development efficiency and user satisfaction.

    • Set Trustline: Allows the user to interact with some tokens.

    • Send Transaction: Send the transaction to Stellar Network with the signed hash.

    • Get Multiple Escrow Balance: This endpoint allows users to retrieve the balances of multiple escrow accounts simultaneously.

    These endpoints ensure secure transactions by leveraging Stellar's infrastructure, guaranteeing transparency and reliability.

    Use it to:

    • Lock funds with programmable milestone logic

    • Enable transparent fund releases for services, grants, rentals, etc.

    • Automate fund flows using signer-based roles

    🧪 Quickstart — Deploy Your First Escrow

    ▶ Try the Demo — No code required

    Pre-requisites

    • Freighter wallet

    • Testnet USDC + XLM (Get test tokens)

    Step-by-Step

    1. Open the demo app

    2. Fill in escrow details (roles, milestones)

    3. Click deploy → sign the transaction

    4. Send testmet USDC to the escrow contract address

    5. Mark, approve, and release milestones from the UI


    ✍️ 2. Design Your Escrow Lifecycle

    Before deploying, define:

    • Who can mark milestones as done

    • Who must approve work

    • Who can release funds

    • Who can resolve disputes

    → Escrow Roles & Permissions


    📬 API Overview

    Get your API key in our dApp: Request API Key

    The Trustless Work API is your gateway to deploy and manage decentralized smart escrows on the Stellar blockchain using Soroban smart contracts. All interactions return unsigned XDRs, which must be signed client-side using the wallet associated with the correct role.

    📘 Base URL: https://api.trustlesswork.com


    🔨 Deployment

    Method
    Endpoint
    Description

    POST

    /deployer/single-release

    Deploys a single-release escrow

    POST

    /deployer/multi-release

    Deploys a multi-release escrow


    💸 Funding

    Method
    Endpoint
    Description

    POST

    /escrow/{type}/fund-escrow

    Returns XDR to fund an escrow


    ✅ Milestone Handling

    Method
    Endpoint
    Description

    POST

    /escrow/{type}/approve-milestone

    Approve a milestone

    POST

    /escrow/{type}/change-milestone-status

    Mark a milestone as complete/incomplete


    🏁 Finalization

    Method
    Endpoint
    Description

    POST

    /escrow/{type}/release-funds

    Release all funds (single)

    POST

    /escrow/{type}/release-milestone-funds

    Release one milestone (multi)


    ⚠️ Disputes

    Method
    Endpoint
    Description

    POST

    /escrow/{type}/dispute-escrow

    Raise a dispute on a single escrow

    POST

    /escrow/{type}/resolve-dispute

    Resolve a single-release escrow dispute

    POST

    /escrow/{type}/dispute-milestone

    Raise dispute on a milestone

    POST

    /escrow/{type}/resolve-milestone-dispute

    Resolve milestone dispute (multi)


    🔄 Escrow Updates

    Method
    Endpoint
    Description

    POST

    /escrow/{type}/update-escrow

    Update escrow metadata/config


    📊 Query & Tracking

    Method
    Endpoint
    Description

    GET

    /escrow/get-multiple-escrow-balance

    Batch balances for many escrows

    GET

    /helper/get-escrows-by-signer

    Query escrows associated with a signer

    GET

    /helper/get-escrows-by-role

    Query escrows by role assignment


    🧰 Helper Utilities

    Method
    Endpoint
    Description

    POST

    /helper/set-trustline

    Enable escrow wallet to accept a token

    POST

    /helper/send-transaction

    Submit signed XDR to Stellar


    📌 For full Swagger documentation, visit: https://dev.api.trustlesswork.com/docs

    All write actions must be signed by the wallet that holds the corresponding escrow role (marker, approver, releaser, resolver).

    🧠 React SDK Integration

    NPM: @trustless-work/escrow

    Provider Setup

    Wrap your app:

    Once wrapped, you can use the SDK's escrow hooks and mutation functions across your app.


    🔑 Wallets & Passkeys

    Every role (marker, approver, releaser, etc.) needs a Stellar-Soroban compatible wallet.

    Supported wallets:

    • Freighter

    • Passkey Wallets (biometric, contract-based)


    🔁 Escrow Lifecycle Explained

    1. Initiation – Define roles, asset, and milestones

    2. Funding – Deposit stablecoins (USDC) into the contract

    3. Milestone Marked – Provider marks progress

    4. Approval – Client or approver signs off

    5. Release – Funds are released

    6. Dispute – Optional: Resolver steps in

    Each action requires a signature from the assigned wallet address.


    🧩 Roles & Permissions

    Role
    Description

    Marker

    Marks milestones as completed

    Approver

    Approves milestone completion

    Releaser

    Signs off final release of funds

    Resolver

    Can override flow in case of dispute

    Receiver

    Gets the released funds

    Platform Address

    Receives a fee (optional, % of each release)


    📐 Escrow Schema Reference (for agents & devs)

    Shared Fields

    Key
    Type
    Description

    engagementId

    string

    Unique identifier for the escrow

    title

    string

    Name of the escrow

    description

    string

    Description of the escrow's function

    roles

    object

    Role assignments: marker, approver, etc.

    Milestone Object (for multi-release only)

    Field
    Type
    Description

    description

    string

    What the milestone represents

    status

    string

    Status: approved, in_dispute, etc.

    amount

    number

    Amount released upon approval

    evidence

    string

    (Optional) Supporting proof

    Trustline Object

    Field
    Type
    Description

    address

    string

    Token issuer or address


    🛠 Developer Tools & Links

    • 🔗 API Docs

    • 🧪 Demo dApp

    • Github https://github.com/Trustless-Work

    • 📦 React SDK (NPM)

    • 📖


    🤝 Join the Ecosystem

    • 🧵 Twitter/X: @trustlesswork

    • 🌐 Docs Hub: docs.trustlesswork.com


    Built for the stablecoin economy. Open-source. Developer-first.

    Let us know what you’re building!

    <token>

    Deploy

    Deploy the escrow contract and define the escrow properties.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    <token>

    Milestone

    Name
    Type
    Description

    Roles:

    Name
    Type
    Description

    Trustline:

    Name
    Type
    Description

    Initialize Escrow

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Multi Release Escrow

    A Multi-Release Contract is an escrow agreement on the Stellar blockchain that divides the total payment of a project into multiple deliveries (“milestones”). Each milestone is released only upon verification of its completion, ensuring that funds remain secure until the associated work is validated.

    Key Components

    • Initial Fund Lockup: Upon contract initiation, the total of all milestone amounts plus the platform fee (“platformFee”) is deposited into an escrow account.

    • Milestones: Each stage includes a description, a specific amount, and status flags (approved, dispute

    Fund Escrow

    Allows users to deposit funds into an existing escrow contract, securing them until the agreed conditions are met.

    Headers

    Name
    Value

    Resolve Milestone Dispute

    Resolves escrow milestone disputes by distributing funds to the approver and service provider as determined by the dispute resolver.

    Headers

    Name
    Value

    Indexer

    This endpoint facilitates the recovery and proper storage in Firebase of escrow-related information submitted to the Stellar Blockchain via external applications, bypassing the standard application.

    Key Components

    • External Transaction: This endpoint handles cases where the XDR generated by any endpoint of our REST API is signed and sent directly by external applications.

    Get Escrows By Role

    Returns all the information of an escrow requested through the role.

    Headers

    Name
    Value

    Change Milestone Status

    Responsible for modifying the "status" property of a specific milestone in the escrow.

    Headers

    Name
    Value

    Get Escrows By Contract Ids

    Returns all the information of a security deposit requested through one or more requested contract ids.

    Headers

    Name
    Value

    Get Multiple Escrow Balance

    Get the balance of multiple escrows.

    Headers

    Name
    Value

    npm i @trustless-work/escrow
    
    import {
      TrustlessWorkConfig,
      development, // or mainNet
    } from "@trustless-work/escrow";
    
    export function TrustlessWorkProvider({ children }) {
      const apiKey = process.env.NEXT_PUBLIC_API_KEY || "";
      return (
        <TrustlessWorkConfig baseURL={development} apiKey={apiKey}>
          {children}
        </TrustlessWorkConfig>
      );
    }
    
    export default function RootLayout({ children }) {
      return (
        <html lang="en">
          <body>
            <TrustlessWorkProvider>
              {children}
            </TrustlessWorkProvider>
          </body>
        </html>
      );
    }
    
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/single-release/change-milestone-status",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    ,
    released
    ,
    resolved
    ).
  • Primary Roles:

    • Service Provider: Delivers the deliverable corresponding to each milestone.

    • Approver: Verifies and approves a milestone before authorizing the release of funds.

    • Dispute Resolver: Intervenes in case of disagreement and decides whether to release or refund the locked amount.

    • Receiver: The final recipient of the funds if different from the Service Provider.

  • Brief Workflow

    1. The Service Provider completes a milestone and requests approval.

    2. The Approver reviews the deliverable; if approved, they sign a transaction that releases only the amount allocated to that milestone (minus the platform and Trustless Work fee).

    3. The Stellar network executes the transaction and transfers the payment to the Service Provider or the configured Receiver.

    4. If a dispute arises, the Dispute Resolver evaluates the evidence and, upon signing their decision, marks the milestone as resolved to release or refund the corresponding funds.

    This model protects all parties: the client knows that funds are available but cannot be released without validation, and the Service Provider receives payment for each verified delivery—leveraging Stellar’s transparency and immutability.

    platformFee

    number

    % fee for the platform

    trustline

    object

    Token type (e.g., USDC, XLM) and decimals

    flags

    object

    Includes disputed, resolved, approved

    Wallet Setup Guide

    disputeResolver

    string

    Address in charge of resolving disputes within the escrow.

    receiver

    string

    Address where escrow proceeds will be sent to

    description

    string

    Text describing the function of the milestone

    status

    string (Default value: "peding")

    Milestone status. Ex: Approved, In dispute, etc...

    approved

    boolean (Default value: false)

    Flag indicating whether a milestone has been approved by the approver

    approver

    string

    Address of the entity requiring the service.

    serviceProvider

    string

    Address of the entity providing the service.

    plataformAddress

    string

    Address of the entity that owns the escrow

    releaseSigner

    string

    Address of the user in charge of releasing the escrow funds to the service provider.

    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.

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    Internal Queue: Information initially generated by the application is stored in an internal queue, awaiting association with a specific transaction identified by its hash (txHash).
  • Firebase Storage: Once retrieved from the internal queue, the information is permanently stored in Firebase.

  • Roles Involved

    • External Application: Signs and sends the XDR without using the standard endpoint (helper/send-transaction).

    • Indexer: Responsible for retrieving information from the internal queue and storing it in Firebase upon receiving the transaction hash (txHash).

    Endpoint Workflow

    1. The XDR is obtained from any transaction (not signed) generated with any of the endpoints of our REST API.

    2. The generated XDR is signed and sent externally (without using helper/send-transaction).

    3. The external application provides the corresponding txHash.

    4. The txHash is sent to indexer/update-from-txHash.

    5. The endpoint retrieves information stored in the internal queue and saves it in Firebase.

    Usage Example

    • Request:

    • Response:

    The information associated with the provided txHash is successfully stored in Firebase, ensuring the integrity of the generated escrow.

    Benefits of Usage

    • Enables external integrations while maintaining information consistency.

    • Prevents data loss when bypassing the standard workflow.

    • Ensures secure and accurate storage in Firebase using the transaction hash.

    This endpoint enhances the system's flexibility and robustness, ensuring all transactions, regardless of the method used, are adequately recorded in Firebase.

    Open API

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
    
        const data = await http.get(
          "/escrow/single-release/get-escrows-by-role?role=approver?roleAddress=GPUACN...." 👈🏼 // All required parameters are passed at the query level.
        ); 
      
        return data;
    }

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use example:

    Content-Type

    application/json

    x-api-key

    <token>

    Open API

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    Open API

    Use Example:

    Content-Type

    application/json

    x-api-key

    <token>

    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async (addresses: string[]) => {
      const response = await http.get("/helper/get-multiple-escrow-balance", {
        params: { addresses },
      });
    
      return response;
    };
    

    Update Escrow

    This endpoint allows you to change the properties of an escrow as long as a series of requirements are met, which will be mentioned in this section.

    Requirements to use:

    1. Only the entity with the platform role has permissions to execute this endpoint

    2. If an escrow has funds, the only thing the platform can do is add more milestones. The other properties cannot be modified under any circumstances.

    Headers

    Name
    Value

    Roles:

    Name
    Type
    Description

    Milestone:

    Name
    Type
    Description

    Flags

    Name
    Type
    Description

    Trustline

    Name
    Type
    Description

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Withdraw Remaining Funds

    This function is used to withdraw funds that are stuck in escrow and cannot be withdrawn due to the way multi-release escrow works, since disputes in this case are handled at the milestone level.

    In single-release escrow accounts, this endpoint is not necessary because disputes are handled at the escrow account level, so if there is any remaining balance in the contract, a dispute is opened and the remaining balance is withdrawn.

    Headers

    Name
    Value

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Approve Milestone

    Responsible for modifying the "flag" property of a specific milestone in the escrow to approve that milestone.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Send Transaction

    Most Trustless Work endpoints return an unsigned transaction in XDR format. This endpoint is used to sign such unsigned transactions and send them to the Stellar network.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    Use Example:

    Release Milestone Funds

    You release the milestone escrow funds to the service provider through the approver.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    <token>

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Get Escrows By Signer

    Returns all the information of an escrow requested through the signer.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    Use Example:

    Update From Tx Hash

    This endpoint allows you to change the properties of an escrow as long as a series of requirements are met, which will be mentioned in this section.

    Requirements for Use:

    • You must have the valid txHash generated from a transaction sent directly to the Stellar network.

    • The escrow data associated with this txHash must already exist in the internal queue.

    Headers

    Name
    Value

    Workflow:

    1. The XDR is obtained from any transaction (not signed) generated with any of the endpoints of our REST API.

    2. An unsigned XDR is generated and returned.

    3. The XDR is signed externally and sent directly to Stellar.

    4. The resulting txHash is retrieved.

    Open API

    Use Example:

    Dispute Milestone

    Responsible for setting the milestone in dispute state. Changes the value of the milestone's "flags.disputed" property to true.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Swagger UIapi.trustlesswork.com
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        // Execute the endpoint
        const response = await http.post(
          "/deployer/single-release",
          {
            // body requested for the endpoint
          },
        );
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data; 
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/fund-escrow",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/resolve-milestone-dispute",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    {
      "txHash": "your-txHash-value"
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/change-milestone-status",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
      const contractIds = [
        "CCR6HLU3LQMXOESNA6TOS2RZKGEBWQG3EN5FMZNC43RVXZWTTDCZ...",
        "CCA7WTCVCQ5JPKNIFSHPSJLJ3FJ3GKPNEVAIHP6T..."
      ];
      const validateOnChain = true;
    
      const params = new URLSearchParams();
      contractIds.forEach(id => params.append("contractIds[]", id));
      params.append("signer", signer);
      params.append("validateOnChain", validateOnChain.toString());
    
      const response = await http.get(`/helper/get-escrow-by-contract-ids?${params.toString()}`);
      return response;
    }

    disputeResolver

    string

    Address in charge of resolving disputes within the escrow.

    receiver

    string

    Address where escrow proceeds will be sent to

    Content-Type

    application/json

    x-api-key

    <token>

    approver

    string

    Address of the entity requiring the service.

    serviceProvider

    string

    Address of the entity providing the service.

    platformAddress

    string

    Address of the entity that owns the escrow

    releaseSigner

    string

    Address of the user in charge of releasing the escrow funds to the service provider.

    description

    string

    Text describing the function of the milestone.

    status

    string

    Milestone status. Ex: Approved, In dispute, etc...

    approved

    boolean

    Flag indicating whether a milestone has been approved by the approver.

    disputed

    boolean

    Flag indicating that an escrow is in dispute.

    released

    boolean

    Flag indicating that escrow funds have already been released.

    resolved

    boolean

    Flag indicating that a disputed escrow has already been resolved.

    address

    string

    Public address establishing permission to accept and use a specific token.

    The txHash is sent to /indexer/update-from-txHash.

  • The escrow information is retrieved from the internal queue and stored in Firebase.

  • Content-Type

    application/json

    x-api-key

    <token>

    Content-Type

    application/json

    x-api-key

    <token>

    <token>

    <token>

    <token>

    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
    
        const data = await http.get(
          "/escrow/single-release/get-escrows-by-signer?signer=GPUACN...." 👈🏼 // All required parameters are passed at the query level.
        ); 
      
        return data;
    }

    <token>

    Deploy

    Deploy the escrow contract and define the escrow properties.

    Headers

    Name
    Value

    Content-Type

    application/json

    x-api-key

    <token>

    Milestone

    Name
    Type
    Description

    Roles:

    Name
    Type
    Description

    Trustline:

    Name
    Type
    Description

    Initialize Escrow

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Update Escrow

    This endpoint allows you to change the properties of an escrow as long as a series of requirements are met, which will be mentioned in this section.

    Requirements to use:

    1. Only the entity with the platform role has permissions to execute this endpoint

    2. If an escrow has funds, the only thing the platform can do is add more milestones. The other properties cannot be modified under any circumstances.

    Headers

    Name
    Value

    Roles:

    Name
    Type
    Description

    Milestone:

    Name
    Type
    Description

    Trustline

    Name
    Type
    Description

    Open API

    What this Endpoint returns?

    This endpoint returns the transaction unsigned so that the transaction can be signed by means of a customer wallet.

    Use Example:

    Trustless WorkGitHub
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.put(
          "/escrow/single-release/update-escrow",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const updateEscrowFromTxHash = async (txHash) => {
      const response = await http.post("/indexer/update-from-txHash", { txHash });
      return response.data;
    };
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/withdraw-remaining-funds",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/approve-milestone",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/any-endpoint",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network  <--------------- THIS
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.post(
          "/escrow/multi-release/release-milestone-funds",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        // Execute the endpoint
        const response = await http.post(
          "/escrow/multi-release/dispute-milestone",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }

    receiver

    string

    Address where escrow proceeds will be sent to

    disputeResolver

    string

    Address in charge of resolving disputes within the escrow.

    description

    string

    Text describing the function of the milestone

    status

    string (Default value: "peding")

    Milestone status. Ex: Approved, In dispute, etc...

    approved

    boolean (Default value: false)

    Flag indicating whether a milestone has been approved by the approver

    amount

    string

    Amount of the milestone

    approver

    string

    Address of the entity requiring the service.

    serviceProvider

    string

    Address of the entity providing the service.

    plataformAddress

    string

    Address of the entity that owns the escrow

    releaseSigner

    string

    Address of the user in charge of releasing the escrow funds to the service provider.

    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.

    disputeResolver

    string

    Address in charge of resolving disputes within the escrow.

    receiver

    string

    Address where escrow proceeds will be sent to

    Content-Type

    application/json

    x-api-key

    <token>

    approver

    string

    Address of the entity requiring the service.

    serviceProvider

    string

    Address of the entity providing the service.

    platformAddress

    string

    Address of the entity that owns the escrow

    releaseSigner

    string

    Address of the user in charge of releasing the escrow funds to the service provider.

    description

    string

    Text describing the function of the milestone.

    status

    string

    Milestone status. Ex: Approved, In dispute, etc...

    amount

    boolean

    Amount of the milestone

    address

    string

    Public address establishing permission to accept and use a specific token.

    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        // Execute the endpoint
        const response = await http.post(
          "/deployer/multi-release",
          {
            // body requested for the endpoint
          },
        );
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data; 
    }
    import axios from "axios";
    
    const http = axios.create({
      baseURL: "https://dev.api.trustlesswork.com",
      timeout: 10000,
      headers: {
        "Content-Type": "application/json",
        "x-api-key": your_api_key,
      },
    });
    
    export const useExample = async () => {
        // Get the signer address
        const { address } = await kit.getAddress();
    
        const response = await http.put(
          "/escrow/multi-release/update-escrow",
          {
            // body requested for the endpoint
          },
        ); 
        
        // Get the unsigned transaction hash
        const { unsignedTransaction } = response.data;
    
        // Sign the transaction by wallet
        const { signedTxXdr } = await signTransaction(unsignedTransaction, {
          address,
          networkPassphrase: WalletNetwork.TESTNET,
        });
    
        // Send the transaction to Stellar Network
        const tx = await http.post("/helper/send-transaction", {
          signedXdr: signedTxXdr,
        });
    
        const { data } = tx;
    
        return data;
    }
    Logo
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    releaseSignerstringRequired

    Address of the user in charge of releasing the escrow funds to the receiver

    Example: GREL...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • The escrow funds have been released
    • This escrow is already resolved
    • Only the release signer can release the escrow earnings
    • Escrow initialized without milestone
    • The escrow must be completed to release earnings
    • Escrow has been opened for dispute resolution
    • Escrow not found
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/release-funds
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: ENG12345
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    amountstringRequired

    Amount to transfer to the escrow contract

    Example: 100
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Amount cannot be equal to or less than zero
    • The provided escrow properties do not match the stored escrow
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/fund-escrow
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    disputeResolverstringRequired

    Address of the user defined to resolve disputes in an escrow

    Example: GDISPUTE...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Only the dispute resolver can execute this function
    • None of the amounts to be transferred should be less or equal than 0
    • Escrow not in dispute
    • Insufficient funds for resolution
    • The sum of distributions must equal the current escrow balance when resolving an escrow dispute
    • The total amount to be distributed cannot be equal to zero
    • Escrow not found
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/resolve-dispute
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Escrow already in dispute
    • You are not authorized to change the dispute flag
    • The dispute resolver cannot dispute the escrow
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/dispute-escrow
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    milestoneIndexstringRequired

    Position that identifies the milestone within the group of milestones in the escrow

    Example: 1
    approverstringRequired

    Address of the entity requiring the service

    Example: GCLIENT...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Only the approver can change milestone flag
    • You cannot approve a milestone that has already been approved previously
    • The milestone status cannot be empty
    • Escrow initialized without milestone
    • Invalid milestone index
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/approve-milestone
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    milestoneIndexstringRequired

    milestone within the group of milestones in the escrow

    Example: 1
    newEvidencestringRequired

    New value for the evidence property within the escrow milestone

    Example: Evidence
    newStatusstringRequired

    New value for the status property within the escrow milestone

    Example: Completed
    serviceProviderstringRequired

    Address of the entity providing the service

    Example: Completed
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Only the service provider can change milestone status
    • Invalid milestone index
    • Escrow initialized without milestone
    • An unexpected error occurred
    application/json
    post
    /escrow/single-release/change-milestone-status
    post
    Authorizations
    Body
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GABC...XYZ
    engagementIdstringRequired

    Unique identifier for the escrow

    Example: ENG12345
    titlestringRequired

    Name of the escrow

    Example: Escrow Test
    descriptionstringRequired

    Text describing the function of the escrow

    Example: Escrow Test description
    rolesobject[]Required

    Roles that make up the escrow structure

    amountnumberRequired

    Amount to be transferred upon completion of escrow milestones

    Example: 1000
    platformFeenumberRequired

    Commission that the platform will receive when the escrow is completed

    Example: 5
    milestonesobject[]Required

    Objectives to be completed to define the escrow as completed. (In this case it is not necessary to send the properties “approvedFlag” and “status” inside the objects of these milestones)

    trustlineobject[]Required

    Information on the trustline that will manage the movement of funds in escrow

    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Amount cannot be zero
    • Escrow already initialized
    • The platform fee cannot exceed 99%
    • Escrow initialized without milestone
    • Cannot define more than 50 milestones in an escrow
    • All flags (approved, disputed, released) must be false in order to execute this function
    • An unexpected error occurred
    application/json
    post
    /deployer/single-release
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: ENG12345
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    amountstringRequired

    Amount to transfer to the escrow contract

    Example: 100
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Amount cannot be equal to or less than zero
    • The provided escrow properties do not match the stored escrow
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/fund-escrow
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    disputeResolverstringRequired

    Address of the user defined to resolve disputes in an escrow

    Example: GDISPUTE...XYZ
    milestoneIndexstringRequired

    Position that identifies the milestone within the group of milestones in the escrow

    Example: 1
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Invalid milestone index
    • None of the amounts to be transferred should be less or equal than 0
    • Only the dispute resolver can execute this function
    • This milestone is already released
    • This milestone is already resolved
    • Milestone not in dispute
    • The total funds to resolve the dispute must not exceed the amount defined for this milestone
    • Insufficient funds for resolution
    • The total amount to be transferred cannot be zero
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/resolve-milestone-dispute
    get
    Authorizations
    Query parameters
    signerstringOptional

    Address of the user who signed the transaction to create escrow

    Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    rolestringOptional

    Role in escrow

    Example: approver
    roleAddressstringOptional

    Address of the user in the specified role

    Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    statusstringOptional

    Status of the escrow

    Example: pending
    typestring · enumOptional

    Type of the escrow

    Example: single_release | multi_releasePossible values:
    engagementIdstringOptional

    Engagement ID of the escrow

    Example: ENG-001
    titlestringOptional

    Title of the escrow

    Example: Website redesign
    isActivebooleanOptional

    Is the escrow active

    validateOnChainbooleanOptional

    When set to true, the endpoint will verify each escrow’s data against the blockchain to ensure accuracy and integrity. Enabling this adds an extra security layer but may increase the response time slightly due to the additional validation step

    startDatestringOptional

    Starting date range for filtering

    Example: 2023-06-20 (YYYY-MM-DD)
    minAmountnumberOptional

    Minimum amount for filtering

    Example: 100
    maxAmountnumberOptional

    Maximum amount for filtering

    Example: 1000
    orderBystring · enumOptional

    Field to order the results by

    Default: createdAtExample: createdAt | updatedAt | amountPossible values:
    orderDirectionstring · enumOptional

    Direction to order the results

    Default: descExample: asc | descPossible values:
    pagenumberOptional

    Page number for pagination

    Example: 1
    pageSizenumberOptional

    Number of items per page

    Default: 8Example: 8
    contractIDstringOptional

    Contract Id of the deployed escrow

    Example: CBHEQBV...
    endDatestringOptional

    Ending date range for filtering

    Example: 2023-06-22 (YYYY-MM-DD)
    Responses
    200

    Collection of data containing information from different scans requested by a signatory, role or contract id.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    get
    /helper/get-escrows-by-role
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    milestoneIndexstringRequired

    milestone within the group of milestones in the escrow

    Example: 1
    newEvidencestringRequired

    New value for the evidence property within the escrow milestone

    Example: Evidence
    newStatusstringRequired

    New value for the status property within the escrow milestone

    Example: Completed
    serviceProviderstringRequired

    Address of the entity providing the service

    Example: Completed
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Only the service provider can change milestone status
    • Invalid milestone index
    • Escrow initialized without milestone
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/change-milestone-status
    get
    Authorizations
    Query parameters
    contractIdsstring[]Required

    Array of contract IDs to query

    Example: [CB25FW...,CBHEQBV...]
    isActivebooleanOptional

    Is the escrow active

    validateOnChainbooleanOptional

    When set to true, the endpoint will verify each escrow’s data against the blockchain to ensure accuracy and integrity. Enabling this adds an extra security layer but may increase the response time slightly due to the additional validation step

    Responses
    200

    Collection of data containing information from different scans requested by a signatory, role or contract ids.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    get
    /helper/get-escrow-by-contract-ids
    get
    Authorizations
    Query parameters
    Responses
    200

    Collection of objects containing information on the balance of the requested addresses

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    get
    /helper/get-multiple-escrow-balance
    put
    Authorizations
    Body
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    escrowall ofRequired

    Escrow data to update

    Responses
    200

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • The platform fee cannot exceed 99%
    • Amount cannot be equal to or less than zero
    • Escrow initialized without milestone
    • Cannot define more than 50 milestones in an escrow
    • Only the platform address should be able to execute this function
    • The platform address of the escrow cannot be changed
    • Escrow has been opened for dispute resolution
    • All flags (approved, disputed, released) must be false in order to execute this function
    • The provided escrow properties do not match the stored escrow
    • You can't change the escrow properties after the milestone is approved
    • An unexpected error occurred
    application/json
    put
    /escrow/single-release/update-escrow
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    disputeResolverstringRequired

    Address of the user defined to resolve disputes in an escrow

    Example: GDISPUTE...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • None of the amounts to be transferred should be less or equal than 0
    • Only the dispute resolver can execute this function
    • All milestones must be released or dispute-resolved before withdrawing remaining funds
    • The total amount to be transferred cannot be zero
    • Insufficient funds for resolution
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/withdraw-remaining-funds
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    milestoneIndexstringRequired

    Position that identifies the milestone within the group of milestones in the escrow

    Example: 1
    approverstringRequired

    Address of the entity requiring the service

    Example: GCLIENT...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Only the approver can change milestone flag
    • You cannot approve a milestone that has already been approved previously
    • The milestone status cannot be empty
    • Escrow initialized without milestone
    • Invalid milestone index
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/approve-milestone
    post
    Authorizations
    Body
    signedXdrstringRequired

    The sign's hash. This come from the wallet

    Example: AAAAAgAAAAB...
    Responses
    200

    The transaction has been successfully sent to the Stellar network

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    post
    /helper/send-transaction
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    releaseSignerstringRequired

    Address of the user in charge of releasing the escrow funds to the receiver

    Example: GAPPROVER1234567890...
    milestoneIndexstringRequired

    Position that identifies the milestone within the group of milestones in the escrow

    Example: 1
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • This milestone is already released
    • This escrow is already resolved
    • Only the release signer can release the escrow funds
    • Escrow initialized without milestone
    • The milestone must be completed to release funds
    • Milestone has been opened for dispute resolution
    • Invalid milestone index
    • The escrow balance must be equal to the amount of earnings defined for the escrow
    • Escrow not found
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/release-milestone-funds
    get
    Authorizations
    Query parameters
    signerstringOptional

    Address of the user who signed the transaction to create escrow

    Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    rolestringOptional

    Role in escrow

    Example: approver
    roleAddressstringOptional

    Address of the user in the specified role

    Example: GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    statusstringOptional

    Status of the escrow

    Example: pending
    typestring · enumOptional

    Type of the escrow

    Example: single_release | multi_releasePossible values:
    engagementIdstringOptional

    Engagement ID of the escrow

    Example: ENG-001
    titlestringOptional

    Title of the escrow

    Example: Website redesign
    isActivebooleanOptional

    Is the escrow active

    validateOnChainbooleanOptional

    When set to true, the endpoint will verify each escrow’s data against the blockchain to ensure accuracy and integrity. Enabling this adds an extra security layer but may increase the response time slightly due to the additional validation step

    startDatestringOptional

    Starting date range for filtering

    Example: 2023-06-20 (YYYY-MM-DD)
    minAmountnumberOptional

    Minimum amount for filtering

    Example: 100
    maxAmountnumberOptional

    Maximum amount for filtering

    Example: 1000
    orderBystring · enumOptional

    Field to order the results by

    Default: createdAtExample: createdAt | updatedAt | amountPossible values:
    orderDirectionstring · enumOptional

    Direction to order the results

    Default: descExample: asc | descPossible values:
    pagenumberOptional

    Page number for pagination

    Example: 1
    pageSizenumberOptional

    Number of items per page

    Default: 8Example: 8
    contractIDstringOptional

    Contract Id of the deployed escrow

    Example: CBHEQBV...
    endDatestringOptional

    Ending date range for filtering

    Example: 2023-06-22 (YYYY-MM-DD)
    Responses
    200

    Collection of data containing information from different scans requested by a signatory, role or contract id.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    get
    /helper/get-escrows-by-signer
    put
    Authorizations
    Body
    txHashstringRequired

    Transaction hash

    Example: b0e61d4...f1cb2d29
    Responses
    200

    Returns the escrow object that was just saved/updated in the indexer and the success or failure of the response.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500Error
    application/json
    put
    /indexer/update-from-txhash
    post
    Authorizations
    Body
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    milestoneIndexstringRequired

    Position that identifies the milestone within the group of milestones in the escrow

    Example: 1
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow not found
    • Escrow initialized without milestone
    • Invalid milestone index
    • This milestone is already released
    • This milestone is already resolved
    • Milestone already in dispute
    • You are not authorized to change the dispute flag
    • The dispute resolver cannot be the one to raise a dispute on a milestone
    • An unexpected error occurred
    application/json
    post
    /escrow/multi-release/dispute-milestone
    post
    Authorizations
    Body
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GABC...XYZ
    engagementIdstringRequired

    Unique identifier for the escrow

    Example: ENG12345
    titlestringRequired

    Name of the escrow

    Example: Escrow Test
    descriptionstringRequired

    Text describing the function of the escrow

    Example: Escrow Test description
    rolesobject[]Required

    Roles that make up the escrow structure

    platformFeenumberRequired

    Commission that the platform will receive when the escrow is completed

    Example: 5
    milestonesobject[]Required

    Objectives to be completed to define the escrow as completed. (In this case it is not necessary to send the properties “approvedFlag” and “status” inside the objects of these milestones)

    trustlineobject[]Required

    Information on the trustline that will manage the movement of funds in escrow

    Responses
    201

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • Escrow already initialized
    • The platform fee cannot exceed 99%
    • Escrow initialized without milestone
    • Cannot define more than 50 milestones in an escrow
    • Amount cannot be zero
    • All flags (approved, disputed, released) must be false in order to execute this function
    • An unexpected error occurred
    application/json
    post
    /deployer/multi-release
    put
    Authorizations
    Body
    signerstringRequired

    Entity that signs the transaction that deploys and initializes the escrow

    Example: GSIGN...XYZ
    contractIdstringRequired

    ID (address) that identifies the escrow contract

    Example: CAZ6UQX7...
    escrowall ofRequired

    Escrow data to update

    Responses
    200

    This endpoint returns an unsigned transaction in XDR format. This XDR is then used to sign the transaction using the “/helper/send-transaction” endpoint.

    application/json
    400

    Bad request

    401

    Unauthorized access

    429

    Too Many Requests

    500

    Possible errors:

    • The platform fee cannot exceed 99%
    • Escrow initialized without milestone
    • Cannot define more than 50 milestones in an escrow
    • Amount cannot be zero
    • Escrow not found
    • Only the platform address should be able to execute this function
    • The platform address of the escrow cannot be changed
    • The provided escrow properties do not match the stored escrow
    • All flags (approved, disputed, released) must be false in order to execute this function
    application/json
    put
    /escrow/multi-release/update-escrow
    POST /escrow/single-release/release-funds HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 69
    
    {
      "contractId": "CAZ6UQX7...",
      "releaseSigner": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/single-release/fund-escrow HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 76
    
    {
      "contractId": "CAZ6UQX7...",
      "signer": "GAPPROVER1234567890...",
      "amount": "10"
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/single-release/resolve-dispute HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 188
    
    {
      "contractId": "CAZ6UQX7...",
      "disputeResolver": "GAPPROVER1234567890...",
      "distributions": [
        {
          "address": "GAPPROVER1234567890...",
          "amount": 20
        },
        {
          "address": "GRECIPIENT1234567890...",
          "amount": 30
        }
      ]
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/single-release/dispute-escrow HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 62
    
    {
      "contractId": "CAZ6UQX7...",
      "signer": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/single-release/approve-milestone HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 85
    
    {
      "contractId": "CAZ6UQX7...",
      "milestoneIndex": "1",
      "approver": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/single-release/change-milestone-status HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 177
    
    {
      "contractId": "CAZ6UQX7...",
      "milestoneIndex": "1",
      "newEvidence": "Any evidence that the milestone is completed",
      "newStatus": "Completed",
      "serviceProvider": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /deployer/single-release HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 603
    
    {
      "signer": "GAPPROVER1234567890...",
      "engagementId": "ENG12345",
      "title": "Project Title",
      "description": "This is a detailed description of the project.",
      "roles": {
        "approver": "GAPPROVER1234567890...",
        "serviceProvider": "GAPPROVER1234567890...",
        "platformAddress": "GAPPROVER1234567890...",
        "releaseSigner": "GAPPROVER1234567890...",
        "disputeResolver": "GAPPROVER1234567890...",
        "receiver": "GAPPROVER1234567890..."
      },
      "amount": 1000,
      "platformFee": 50,
      "milestones": [
        {
          "description": "Initial phase of the project"
        },
        {
          "description": "Completion of design work"
        }
      ],
      "trusline": {
        "symbol": "USDC",
        "address": "GBBD47IF6LWK7P7MDEVSC..."
      }
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/multi-release/fund-escrow HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 76
    
    {
      "contractId": "CAZ6UQX7...",
      "signer": "GAPPROVER1234567890...",
      "amount": "10"
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/multi-release/resolve-milestone-dispute HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 210
    
    {
      "contractId": "CAZ6UQX7...",
      "disputeResolver": "GAPPROVER1234567890...",
      "milestoneIndex": "1",
      "distributions": [
        {
          "address": "GAPPROVER1234567890...",
          "amount": 300
        },
        {
          "address": "GRECEIVER1234567890...",
          "amount": 700
        }
      ]
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/multi-release/change-milestone-status HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 177
    
    {
      "contractId": "CAZ6UQX7...",
      "milestoneIndex": "1",
      "newEvidence": "Any evidence that the milestone is completed",
      "newStatus": "Completed",
      "serviceProvider": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    GET /helper/get-escrow-by-contract-ids?contractIds=[CB25FW...%2CCBHEQBV...] HTTP/1.1
    Host: 
    Accept: */*
    
    [
      {
        "contractId": "CB25FW....",
        "signer": "GBPUA....",
        "type": "multi-release",
        "engagementId": "ENG-003",
        "title": "Title of the Escrow",
        "description": "Description of the Escrow",
        "milestones": [
          {
            "description": "Initial payment",
            "amount": 2,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          },
          {
            "description": "Final payment",
            "amount": 5,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          }
        ],
        "platformFee": 5,
        "receiverMemo": 0,
        "roles": {
          "approver": "GBPUACN....",
          "serviceProvider": "GA2RRI....",
          "platformAddress": "GBPA2LO....",
          "releaseSigner": "GCPZUO....",
          "disputeResolver": "GDBMRV...",
          "receiver": "GA2RRI...",
          "issuer": "GBPUAC..."
        },
        "trustline": {
          "address": "CBIELT...",
          "name": "USDC"
        },
        "isActive": true,
        "updatedAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "createdAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "balance": 0
      },
      {
        "contractId": "CF35XW....",
        "signer": "GBPUA....",
        "type": "single-release",
        "engagementId": "ENG-003",
        "title": "Title of the Escrow",
        "description": "Description of the Escrow",
        "milestones": [
          {
            "description": "Initial payment",
            "amount": 5,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          },
          {
            "description": "Final payment",
            "amount": 3,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          }
        ],
        "platformFee": 3,
        "receiverMemo": 0,
        "roles": {
          "approver": "GBPUACN....",
          "serviceProvider": "GA2RRI....",
          "platformAddress": "GBPA2LO....",
          "releaseSigner": "GCPZUO....",
          "disputeResolver": "GDBMRV...",
          "receiver": "GA2RRI...",
          "issuer": "GBPUAC..."
        },
        "trustline": {
          "address": "CBIELT...",
          "name": "USDC"
        },
        "isActive": true,
        "updatedAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "createdAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "balance": 3
      }
    ]
    GET /helper/get-multiple-escrow-balance?addresses=undefined HTTP/1.1
    Host: 
    Accept: */*
    
    [
      {
        "address": "GAWVVSA..",
        "balance": 30
      },
      {
        "address": "GAWVCG3..",
        "balance": 10
      }
    ]
    PUT /escrow/single-release/update-escrow HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 846
    
    {
      "signer": "GAPPROVER1234567890...",
      "contractId": "CAZ6UQX7...",
      "isActive": true,
      "escrow": {
        "signer": "GAPPROVER1234567890...",
        "engagementId": "ENG12345",
        "title": "Project Title",
        "description": "This is a detailed description of the project.",
        "roles": {
          "approver": "GAPPROVER1234567890...",
          "serviceProvider": "GAPPROVER1234567890...",
          "platformAddress": "GAPPROVER1234567890...",
          "releaseSigner": "GAPPROVER1234567890...",
          "disputeResolver": "GAPPROVER1234567890...",
          "receiver": "GAPPROVER1234567890..."
        },
        "amount": 1000,
        "platformFee": 50,
        "milestones": [
          {
            "description": "test1",
            "status": "pending",
            "evidence": "Any evidence that the milestone is completed"
          },
          {
            "description": "test2",
            "status": "pending",
            "evidence": "Any evidence that the milestone is completed"
          }
        ],
        "flags": {
          "disputed": false,
          "released": false,
          "resolved": false
        },
        "trustline": {
          "address": "GAPPROVER1234567890..."
        }
      }
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/multi-release/withdraw-remaining-funds HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 188
    
    {
      "contractId": "CAZ6UQX7...",
      "disputeResolver": "GDISPUTE1234567890...",
      "distributions": [
        {
          "address": "GAPPROVER1234567890...",
          "amount": 150
        },
        {
          "address": "GRECEIVER1234567890...",
          "amount": 850
        }
      ]
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /escrow/multi-release/approve-milestone HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 85
    
    {
      "contractId": "CAZ6UQX7...",
      "milestoneIndex": "1",
      "approver": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /helper/send-transaction HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 30
    
    {
      "signedXdr": "AAAAAgAAAAB..."
    }
    {
      "status": "SUCCESS",
      "message": "The transaction has been successfully sent to the Stellar network.",
      "contractId": "CAATN5D...",
      "escrow": {
        "amount": 50,
        "roles": {
          "approver": "GAWVVSA...",
          "serviceProvider": "GAWVVSA6...",
          "disputeResolver": "GAWVVSA...",
          "receiver": "GAWVVSA...",
          "platformAddress": "GAWVVSA...",
          "releaseSigner": "GAWVVSA..."
        },
        "flags": {
          "disputed": false,
          "released": false,
          "resolved": false
        },
        "description": "This is a sample TW escrow for testing purposes",
        "engagementId": "ENG12345",
        "milestones": [
          {
            "approved": false,
            "description": "Initial milestone",
            "evidence": "",
            "status": "pending"
          },
          {
            "approved": false,
            "description": "Second milestone",
            "evidence": "",
            "status": "pending"
          }
        ],
        "platformFee": 5,
        "title": "Sample TW Escrow",
        "trustline": {
          "address": "CBIELTK...",
          "name": "USDC"
        },
        "receiverMemo": 90909090
      }
    }
    POST /escrow/multi-release/release-milestone-funds HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 91
    
    {
      "contractId": "CAZ6UQX7...",
      "releaseSigner": "GAPPPROVER1234567890...",
      "milestoneIndex": "1"
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    PUT /indexer/update-from-txhash HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 31
    
    {
      "txHash": "b0e61d4...f1cb2d29"
    }
    {
      "status": "SUCCESS",
      "message": "Escrow saved successfully / The escrow has been correctly indexed in our database.",
      "savedEscrow": {
        "contractId": "CB25FW....",
        "signer": "GBPUA....",
        "type": "multi-release",
        "engagementId": "ENG-003",
        "title": "Title of the Escrow",
        "description": "Description of the Escrow",
        "milestones": [
          {
            "description": "Initial payment",
            "amount": 2,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          },
          {
            "description": "Final payment",
            "amount": 5,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          }
        ],
        "platformFee": 5,
        "receiverMemo": 0,
        "roles": {
          "approver": "GBPUACN....",
          "serviceProvider": "GA2RRI....",
          "platformAddress": "GBPA2LO....",
          "releaseSigner": "GCPZUO....",
          "disputeResolver": "GDBMRV...",
          "receiver": "GA2RRI...",
          "issuer": "GBPUAC..."
        },
        "trustline": {
          "address": "CBIELT...",
          "name": "USDC"
        },
        "isActive": true,
        "updatedAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "createdAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "balance": 0
      }
    }
    POST /escrow/multi-release/dispute-milestone HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 83
    
    {
      "contractId": "CAZ6UQX7...",
      "milestoneIndex": "1",
      "signer": "GAPPROVER1234567890..."
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    POST /deployer/multi-release HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 648
    
    {
      "signer": "GAPPROVER1234567890...",
      "engagementId": "ENG12345",
      "title": "Project Title",
      "description": "This is a detailed description of the project.",
      "roles": {
        "approver": "GAPPROVER1234567890...",
        "serviceProvider": "GAPPROVER1234567890...",
        "platformAddress": "GAPPROVER1234567890...",
        "releaseSigner": "GAPPROVER1234567890...",
        "disputeResolver": "GAPPROVER1234567890..."
      },
      "platformFee": 50,
      "milestones": [
        {
          "description": "Initial phase of the project",
          "amount": 5,
          "receiver": "GAPPROVER1234567890..."
        },
        {
          "description": "Completion of design work",
          "amount": 5,
          "receiver": "GAPPROVER1234567890..."
        }
      ],
      "trustline": {
        "symbol": "USDC",
        "address": "GBBD47IF6LWK7P7MDEVSC..."
      }
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    PUT /escrow/multi-release/update-escrow HTTP/1.1
    Host: 
    Content-Type: application/json
    Accept: */*
    Content-Length: 878
    
    {
      "signer": "GAPPROVER1234567890...",
      "contractId": "CAZ6UQX7...",
      "isActive": true,
      "escrow": {
        "engagementId": "ENG12345",
        "title": "Project Title",
        "description": "This is a detailed description of the project.",
        "roles": {
          "approver": "GAPPROVER1234567890...",
          "serviceProvider": "GAPPROVER1234567890...",
          "platformAddress": "GAPPROVER1234567890...",
          "releaseSigner": "GAPPROVER1234567890...",
          "disputeResolver": "GAPPROVER1234567890..."
        },
        "platformFee": 1,
        "milestones": [
          {
            "description": "test1",
            "status": "pending",
            "evidence": "Any evidence that the milestone is completed",
            "amount": 1000,
            "receiver": "GAPPROVER1234567890..."
          },
          {
            "description": "test2",
            "status": "pending",
            "evidence": "Any evidence that the milestone is completed",
            "amount": 1000,
            "receiver": "GAPPROVER1234567890..."
          }
        ],
        "flags": {
          "disputed": false,
          "released": false,
          "resolved": false,
          "approved": false
        },
        "trustline": {
          "address": "GAPPROVER1234567890..."
        }
      }
    }
    {
      "status": "SUCCESS",
      "unsignedTransaction": "AAAAAgAAAAAtWsgedQ...."
    }
    [
      {
        "contractId": "CB25FW....",
        "signer": "GBPUA....",
        "type": "multi-release",
        "engagementId": "ENG-003",
        "title": "Title of the Escrow",
        "description": "Description of the Escrow",
        "milestones": [
          {
            "description": "Initial payment",
            "amount": 2,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          },
          {
            "description": "Final payment",
            "amount": 5,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          }
        ],
        "platformFee": 5,
        "receiverMemo": 0,
        "roles": {
          "approver": "GBPUACN....",
          "serviceProvider": "GA2RRI....",
          "platformAddress": "GBPA2LO....",
          "releaseSigner": "GCPZUO....",
          "disputeResolver": "GDBMRV...",
          "receiver": "GA2RRI...",
          "issuer": "GBPUAC..."
        },
        "trustline": {
          "address": "CBIELT...",
          "name": "USDC"
        },
        "isActive": true,
        "updatedAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "createdAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "balance": 0
      }
    ]
    GET /helper/get-escrows-by-role HTTP/1.1
    Host: 
    Accept: */*
    
    [
      {
        "contractId": "CB25FW....",
        "signer": "GBPUA....",
        "type": "multi-release",
        "engagementId": "ENG-003",
        "title": "Title of the Escrow",
        "description": "Description of the Escrow",
        "milestones": [
          {
            "description": "Initial payment",
            "amount": 2,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          },
          {
            "description": "Final payment",
            "amount": 5,
            "status": "pending",
            "flags": {
              "disputed": false,
              "released": false,
              "resolved": false,
              "approved": false
            }
          }
        ],
        "platformFee": 5,
        "receiverMemo": 0,
        "roles": {
          "approver": "GBPUACN....",
          "serviceProvider": "GA2RRI....",
          "platformAddress": "GBPA2LO....",
          "releaseSigner": "GCPZUO....",
          "disputeResolver": "GDBMRV...",
          "receiver": "GA2RRI...",
          "issuer": "GBPUAC..."
        },
        "trustline": {
          "address": "CBIELT...",
          "name": "USDC"
        },
        "isActive": true,
        "updatedAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "createdAt": {
          "_seconds": 1750698602,
          "_nanoseconds": 356000000
        },
        "balance": 0
      }
    ]
    GET /helper/get-escrows-by-signer HTTP/1.1
    Host: 
    Accept: */*
    
    Logo
    Swagger UIdev.api.trustlesswork.com
    Logo