lockPosition on the FlashnetClient with a pool ID, a lockUntilTimestamp string, and, for V3 positions, the tick range.
Signature
"4102444800" (2100-01-01 UTC). Pass "0" for an indefinite lock.
Create a bounded lock
V2
tickLower and tickUpper for V2 positions. The server scopes the lock to the entire LP share owned by the caller’s public key in that pool.
V3
tickLower and tickUpper are required together for V3. The tick pair must match an existing position owned by the caller. Supplying only one of the two is rejected.
Create an indefinite lock
"0" only when the hold has no planned release.
Extend an existing lock
CalllockPosition again with a later timestamp (or "0"). The server updates the record in place.
Rules on modification
- A new bounded timestamp must be greater than or equal to the existing one.
- A bounded lock can be converted to indefinite by passing
"0". - An indefinite lock (
"0") cannot be converted back to bounded. - Any request that would shorten the lock is rejected without state changes.
Error handling
The SDK throws when the server rejects a request. Common rejections:- Position not found. The
(poolId, owner, tickLower, tickUpper)tuple does not match a live position owned by the caller. - Shortening attempted. The requested timestamp is earlier than the existing lock.
- Invalid timestamp. The string does not parse as a non-negative integer at or below
4102444800.