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

useUpdateEscrow

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.

useUpdateEscrow

Update escrow on-chain properties. Payload shape: { contractId, admin, escrow }.

Import

import { useUpdateEscrow } from "@trustless-work/escrow";
// or
import { useUpdateEscrow } from "@trustless-work/escrow/hooks/rest";

Signature

function useUpdateEscrow(): {
  updateEscrow: (
    payload: UpdateSingleReleaseEscrowPayload | UpdateMultiReleaseEscrowPayload,
    type: EscrowType,
  ) => Promise<BuildTransactionResponse>;
};

Returns BuildTransactionResponse: { unsignedXdr, txHash }.

Single vs multi

Type
Payload
Notes

single-release

UpdateSingleReleaseEscrowPayload

escrow includes amount, roles: Roles, single-release milestones

multi-release

UpdateMultiReleaseEscrowPayload

No top-level amount; roles: MultiReleaseRoles; multi milestones

Example