{s}omniamarkets

@somnia-chain/markets-sdk


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

Interface: RedeemParams

Defined in: trade.ts:518

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: trade.ts:524

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: trade.ts:526

Outcome-token amount to burn for collateral.


outcomeIdx?

optional outcomeIdx?: 0 | 1

Defined in: trade.ts:531

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: trade.ts:536

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


operatorId?

optional operatorId?: number

Defined in: trade.ts:538

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


venueId?

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

Defined in: trade.ts:540

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


outcomeToken?

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

Defined in: trade.ts:545

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: trade.ts:550

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


autoApprove?

optional autoApprove?: boolean

Defined in: trade.ts:552

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


gas?

optional gas?: bigint

Defined in: trade.ts:554

Gas ceiling for this tx.

Default Value

TraderConfig.gas (10,000,000)