Extend TTL
Extend the escrow contract storage TTL before it expires, signed by the escrow admin.
Soroban storage has a finite time-to-live: without periodic extension the escrow state expires and becomes unreadable until restored. This endpoint builds the unsigned transaction that extends it, signed by the escrow admin (roles.admin).
Endpoint
Soroban storage TTL is finite; without periodic extension the escrow state expires. Only the admin (per-escrow) can call this in V2.
Deployed v2 escrow contract (C...).
CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QBAdmin wallet authorising the TTL extension — must equal the on-chain roles.admin. Signs the transaction.
GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVNLedgers to extend the contract's storage TTL. Maps to a u32 on-chain.
100000Unsigned XDR built successfully.
Base64-encoded unsigned XDR. Sign it with the appropriate wallet and submit to Soroban / Horizon to execute the operation on-chain.
AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=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.
b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3aDeploys 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.
CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526Request body or query params fail schema validation (wrong type, missing required field, unknown property).
Missing, malformed, expired, revoked or invalid API key.
API key is valid but does not have the role required for this operation.
Payload is well-formed but a business rule rejects it (e.g. amount out of range, role not allowed for this user).
Unexpected server-side failure. Use the traceId to look up the incident in server logs or contact support.
POST /escrow/single-release/v2/extend-ttl HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 165
{
"contractId": "CDHAZ2RTE2MDHYQQ7NATF5IVKIFVGLX6FHJ66OPK6MUXBSTRRXFXJ6QB",
"admin": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"ledgersToExtend": 100000
}{
"unsignedXdr": "AAAAAgAAAAAtWsgedQ...AAAAAQAAAAA=",
"txHash": "b1946ac92492d2347c6235b4d2611184a8d53f7a8e6e9b4f0c79a2b30e5c4f3a",
"contractId": "CAAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQCAIBAEAQC526"
}Field notes
ledgersToExtendis au32(max4294967295); one ledger ≈ 5 seconds on testnet/mainnet.Already expired? The build returns
409with codeSTELLAR_STATE_ARCHIVEDand a ready-to-signrestoreXdrin the error'sextensions. Sign and submit that restore transaction first (it must go alone — one Soroban operation per transaction), then retry the extend.
What this endpoint returns
unsignedXdr + txHash — sign the XDR exactly as returned and submit it via Send Transaction.