Skip to main content
POST
Recover swaps by deriving user_id keys from an Xpub

Body

application/json
xpub
string
required

Extended public key derived from the user's wallet.

Used to derive user_ids for that user.

start_index
integer<int32> | null

Derivation index to start scanning from.

If omitted, recovery starts from index 0. The server owns all scan limits.

Required range: x >= 0

Response

Swaps recovered successfully

complete
boolean
required

True when scanning stopped due to the recovery gap limit.

False means the server-side max scan cap was reached and callers may continue from scanned_until + 1 if they are performing an explicit deep recovery.

highest_index
integer<int32>
required

The highest index used in any recovered swap.

Legacy compatibility field. Set to 0 when no swaps are found, which makes it ambiguous with a real swap at index 0. New clients should use next_index instead.

Required range: x >= 0
next_index
integer<int32>
required

Derivation index clients should use for the next new swap.

Equivalent to highest_index + 1 when swaps were found. When no swaps were found, this is the requested start index.

Required range: x >= 0
scanned_until
integer<int32>
required

Last derivation index scanned by the server.

Required range: x >= 0
swaps
object[]
required

List of recovered swaps with their derivation indices

The swap data