For the complete documentation index, see llms.txt. This page is also available as Markdown.

Settlement and Claims

Track the submitted request before claiming. Follow the settlement conditions to distinguish indexing, pending settlement, automatic delivery, and delayed redemption.

Query settlement status

The following read-only Node.js 18+ example locates the original request and prints its settlement indicators. Set USER_ADDRESS, FUND_ID, REQUEST_TX_HASH, and KIND (deposit or redeem), save as settlement.mjs, and run node settlement.mjs.

const { USER_ADDRESS, FUND_ID, REQUEST_TX_HASH, KIND } = process.env;
if (!USER_ADDRESS || !FUND_ID || !REQUEST_TX_HASH ||
    !["deposit", "redeem"].includes(KIND)) {
  throw new Error("Set USER_ADDRESS, FUND_ID, REQUEST_TX_HASH, and KIND");
}
const url = new URL(
  "https://mainnet-gw.sodex.dev/api/v1/wealth/users/" +
  encodeURIComponent(USER_ADDRESS) + "/fund-details"
);
url.searchParams.set("fundId", FUND_ID);
const response = await fetch(url, { signal: AbortSignal.timeout(15000) });
const body = await response.json();
if (!response.ok || body.code !== 0) throw new Error("Fund history query failed");
const entries = body.data.entries.filter(entry =>
  entry.fundId === FUND_ID && entry.kind === KIND &&
  entry.txHash?.toLowerCase() === REQUEST_TX_HASH.toLowerCase()
);
if (entries.length === 0) console.log("Request not indexed; query again later");
for (const entry of entries) {
  console.log({
    entryId: entry.entryId ?? "unknown",
    status: entry.status,
    claimable: entry.claimable ?? "unknown",
    delayedPending: entry.delayedPending ?? "unknown",
    shares: entry.shares,
    proceeds: entry.proceeds,
  });
}

Use the verified on-chain request ID with the claim functions below. Do not assume an upstream entryId is interchangeable with the contract request ID. Re-query after confirmation and verify the received shares or assets; simulation is a preflight check, not a guarantee against state changes before execution.

Claim settled assets or shares

Skip this step when settlement already auto-claimed for the owner. Otherwise, use the owner wallet, the actual request ID, and the appropriate method after settlement:

Operation
Method

Deposit shares

claimDeposit(receiver, requestId)

Immediate redemption assets

claimRedeem(receiver, requestId)

Settled delayed redemption assets

claimDelayedRedeem(receiver, requestId)

The following functions use the same account, publicClient, walletClient, VAULT, and vaultAbi setup as Direct Deposits and Direct Redemptions. Use the matching page's setup and ABI. The owner wallet pays gas in SOSO.

Call only the function for the settled, unclaimed portion, with its verified on-chain request ID. Do not invoke all three functions in sequence. Submit the request with Direct Deposits or Direct Redemptions; claim only from this page after settlement.

After claiming, query the owner's share or asset balance and reconcile the fund timeline. Do not resend the original deposit or redemption request to retry a failed claim.

Last updated