For the complete documentation index, see llms.txt. This page is also available as Markdown.

Architecture

Architecture

Package entry points

Import
Contains

@trustless-work/escrow

Config, client, REST + GraphQL hooks, types, errors

@trustless-work/escrow/rest

EscrowRestService + REST hooks only

@trustless-work/escrow/graphql

GraphQL service, documents, GraphQL hooks

@trustless-work/escrow/hooks

All hooks (REST + GraphQL)

@trustless-work/escrow/hooks/rest

REST hooks only

@trustless-work/escrow/hooks/graphql

GraphQL hooks only

@trustless-work/escrow/types

Payloads, responses, read-model, entities

import { useEscrowRest, useEscrowGraphql } from "@trustless-work/escrow";
import { useGraphqlGetEscrow } from "@trustless-work/escrow/hooks/graphql";

const rest = useEscrowRest();
const graphql = useEscrowGraphql();
const { getEscrow } = useGraphqlGetEscrow();

Client layers

  • Operate URLs: /escrow/{single-release|multi-release}/v2/...

  • Submit: POST /stellar/send-transaction

  • REST reads: GET /escrows*

  • GraphQL: POST /graphql

Build → sign → send

Every mutate hook returns an unsigned transaction. You sign with the wallet, then submit.

Response shapes

Step
Type
Shape

Deploy build

DeployEscrowResponse

{ unsignedXdr, txHash, contractId }

Other builds

BuildTransactionResponse

{ unsignedXdr, txHash }

Submit

SendTransactionResponse

{ txHash, ledger, contractId?, escrow?, code?, message? }

code may be STELLAR_TX_SUBMITTED or STELLAR_TX_SUBMITTED_INDEXER_LAGGING.

Deploy trustline shape: { contractId, symbol } (Soroban SAC C… + asset code).

Environment

development and mainNet currently point at:

https://trustless-core-production.up.railway.app

Pass any Core API baseURL string when you need another host.