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

Approve and Release Milestones

Approve milestones and release the escrow in a single atomic transaction.

Builds the unsigned transaction that approves the listed milestones and releases the escrow in one atomic step. A shortcut for wallets that hold both the approver and release-signer roles.

The reference below is generated from the live API spec β€” if anything on this page disagrees with it, the reference wins.

Endpoint

Approve milestones AND release the escrow in a single atomic tx

post

Shortcut for wallets that hold both the approver and release-signer roles. Approves the listed milestones on behalf of signer and then releases the escrow balance β€” both in one transaction. The contract validates that EVERY milestone is approved after the batch before paying out, so the call traps with ESCROW_NOT_COMPLETED if some milestone is left unapproved. If signer is not in BOTH roles.approvers and roles.release_signers, the contract returns ESCROW_SIGNER_MUST_BE_APPROVER_AND_RELEASE_SIGNER (HTTP 403).

Authorizations
x-api-keystringRequired
Body
contractIdstringRequired

Deployed v2 escrow contract (C...).

Example: CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB
signerstringRequired

Wallet that signs the transaction. MUST be in BOTH roles.approvers and roles.release_signers (enforced on-chain).

Example: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
milestoneIndexesnumber[]Required

Zero-based indexes of the milestones to approve in this batch. After approving them, the contract validates that EVERY milestone of the escrow is approved and then releases the full balance.

Example: [0,1,2]
Responses
200

Unsigned XDR built successfully.

application/json
unsignedXdrstringRequired

Base64-encoded unsigned XDR. Sign it with the appropriate wallet and submit to Soroban / Horizon to execute the operation on-chain.

Example: AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=
txHashstringRequired

SHA-256 hash of the prepared transaction. NOTE: it only matches the executed transaction if you sign the XDR exactly as returned β€” re-preparing (re-simulating) it changes the hash. Prefer contractId for correlation when present.

Example: b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a
contractIdobject Β· nullableOptional

Deploys only: the address (C…) the new escrow contract WILL have once this transaction executes β€” known upfront because the service generates the deploy salt. Track your escrow with it (e.g. GET /escrows/:contractId) as soon as the transaction lands; it is stable even if your wallet/SDK re-prepares the transaction.

Example: CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526
post/escrow/single-release/v2/approve-and-release-milestones
POST /escrow/single-release/v2/approve-and-release-milestones HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 168

{
  "contractId": "CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB",
  "signer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
  "milestoneIndexes": [
    0,
    1,
    2
  ]
}
{
  "unsignedXdr": "AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=",
  "txHash": "b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a",
  "contractId": "CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526"
}

Field notes

  • signer must be in both roles.approvers and roles.releaseSigners β€” otherwise the contract returns ESCROW_SIGNER_MUST_BE_APPROVER_AND_RELEASE_SIGNER (HTTP 403).

  • In single-release the release pays out the whole escrow, so after your batch every milestone must be approved β€” the contract traps with ESCROW_NOT_COMPLETED if any is left unapproved.

What this endpoint returns

unsignedXdr + txHash β€” sign the XDR exactly as returned and submit it via Send Transaction.