Grant permission
The acting role needsManageAuthorizationLocks { 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
- TypeScript
- Python
- Rust
This function uses an existing server-side Use
SwigClient and public addresses.
The returned transaction is prepared, not submitted.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
- Complete the returned authority signature requests or ParticipantSet approvals.
- Add the required native transaction signatures and submit or sponsor.
- Wait for confirmation, then read holds again. Preparing a transaction alone does not create or remove a hold.
All, AllButManageAuthority, ManageAuthority, or
ManageAuthorizationLocks. Another role cannot release an active hold.
