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

Manage Milestones

Add new milestones and/or edit existing milestone descriptions in one transaction, signed by the escrow admin.

Builds the unsigned transaction where the escrow admin (roles.admin) adds new milestones and/or edits existing milestone descriptions — both in a single atomic transaction. This is also how you add milestones to an escrow deployed without any.

Endpoint

Add new milestones and/or edit existing milestone descriptions

post

Single endpoint that ADDS new milestones (newMilestones) and EDITS descriptions of existing ones (milestoneUpdates) in one atomic transaction. At least one of the two arrays must be non-empty. Description-only updates are forbidden while the escrow holds funds. Admin signs.

Authorizations
x-api-keystringRequired
Body
contractIdstringRequired

Deployed v2 escrow contract (C...).

Example: CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB
adminstringRequired

Admin wallet — signs the transaction.

Example: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
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
contractIdstring · 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/manage-milestones
POST /escrow/single-release/v2/manage-milestones HTTP/1.1
Host: beta.api.trustlesswork.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 339

{
  "contractId": "CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB",
  "admin": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
  "newMilestones": [
    {
      "description": "Phase 1 — UI design delivery",
      "status": "pending",
      "approvalsTarget": 1
    }
  ],
  "milestoneUpdates": [
    {
      "index": 0,
      "newDescription": "Phase 1 — UI design delivery (revised)"
    }
  ]
}
{
  "unsignedXdr": "AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=",
  "txHash": "b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a",
  "contractId": "CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526"
}

Field notes

  • New milestones follow the same shape as at deploy: description required, approvalsTarget ≤ the number of roles.approvers.

  • Approval state is untouched: editing a milestone's description does not reset the approvals it already collected.

What this endpoint returns

unsignedXdr + txHash — sign the XDR exactly as returned and submit it via Send Transaction. Full flow example on the Deploy page.

Next steps

Last updated