@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / RedeemParams

Interface: RedeemParams

Defined in: packages/sdk/src/trade.ts:1380

Inputs to Trader.redeem — burn winning outcome tokens for collateral on a resolved/voided market (module-routed redemption).

Properties

marketId

marketId: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1386

bytes32 marketId the module keys the redemption on (settlement-extraction v2: redemption is module-routed — the module pulls the caller's winning tokens, finalizes-if-needed, and redeems through the BinarySettlement singleton).


amount

amount: bigint

Defined in: packages/sdk/src/trade.ts:1388

Outcome-token amount to burn for collateral.


outcomeIdx?

optional outcomeIdx?: 0 | 1

Defined in: packages/sdk/src/trade.ts:1393

Winning outcome (0 = YES, 1 = NO). Looked up via market.winningOutcome() when omitted (needs market set, else pass outcomeIdx explicitly).


market?

optional market?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1398

BinaryMarket address — only needed to auto-look-up outcomeIdx / outcomeToken when those are omitted.


operatorId?

optional operatorId?: number

Defined in: packages/sdk/src/trade.ts:1400

Routing operator id (uint32) for attribution; 0 = none (default).


venueId?

optional venueId?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1402

Routing venue id (bytes32 hex); 32-byte zero = none (default).


outcomeToken?

optional outcomeToken?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1407

Outcome-token singleton the winning position lives on (for the operator grant). Looked up via market.outcomeToken() when omitted.


module?

optional module?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1412

BinaryMarketsModule address; resolved from config.addresses.binaryModule when omitted. Throws if neither is set.


autoApprove?

optional autoApprove?: boolean

Defined in: packages/sdk/src/trade.ts:1414

Ensure the module is an operator on the outcome-token singleton (default true).


gas?

optional gas?: bigint

Defined in: packages/sdk/src/trade.ts:1420

Gas ceiling for this tx.

Default

TraderConfig.gas (10,000,000)