Skip to main content
Prepare SOL or token holds through the Developer API, inspect them, and prepare release or pruning. The backend builds unsigned transactions; your application owns authority signing, ParticipantSet approvals, fee-payer signing, and submission. Keep the API key on the server. These APIs are under review in TypeScript/Python PR #66 and Rust PR #79. They need the matching portal routes and on-chain authorization-lock program. Rust hosted support does not depend on publication of the Rust Protocol SDK. Use the Protocol SDK recipe for direct on-chain builders.

Grant permission

The acting role needs ManageAuthorizationLocks { max_duration_slots }, even when it has All. Grant it through the Protocol SDK; the hosted add-role API does not yet accept this permission. A limited role also needs the relevant asset’s spending permission. Grants and updates come from an eligible managing role; a delegated role cannot raise its own duration bound. See the protocol rules. Amounts are lamports or token base units. Choose exactly one expiry: a duration in slots or an absolute expiry slot. The role’s maximum duration still applies. Omit the mint for SOL; supply a token mint to use the wallet’s associated token account. Reads include currentSlot/current_slot, nextLockId/next_lock_id, and the remaining amount and active status of each hold.

Prepare and inspect locks

This function uses an existing server-side SwigClient and public addresses. The returned transaction is prepared, not submitted.
Use wallet.removeAuthorizationLock({ feePayer, lockId }) to prepare release of an existing hold. Use decimal strings or bigint for amounts beyond JavaScript’s safe integer range. Prepared lock kinds are add-authorization-lock and remove-authorization-lock (wire values 10 and 11).

Sign, submit, and observe

  1. Complete the returned authority signature requests or ParticipantSet approvals.
  2. Add the required native transaction signatures and submit or sponsor.
  3. Wait for confirmation, then read holds again. Preparing a transaction alone does not create or remove a hold.
The holder captures a hold by spending from its asset account through the normal transfer or execution flow. The remaining amount falls; zero is a valid fully captured record. Expired and fully captured records can be pruned by the holder or a role with All, AllButManageAuthority, ManageAuthority, or ManageAuthorizationLocks. Another role cannot release an active hold.