Skip to content

SwapParams

give: string

Token the user gives: a symbol (USDM, NIGHT) or a raw type.

QuoteParams.give


want: string

Token the user receives.

QuoteParams.want


amount: string | bigint

What the user gives, base units.

QuoteParams.amount


receiver: Receiver

Where the user receives: unshielded (hex) for NIGHT, shielded ("cpk:epk") for USDM.

QuoteParams.receiver


optional minWantAmount?: string | bigint

QuoteParams.minWantAmount


optional source?: string

The funds' unshielded source address (hex), for screening on the sell side.

QuoteParams.source


optional settlements?: ("solver_offer" | "user_offer")[]

What the wallet can do; both by default.

QuoteParams.settlements


optional minWaitMs?: number

QuoteParams.minWaitMs


optional maxWaitMs?: number

QuoteParams.maxWaitMs


optional minDeadlineMs?: number

QuoteParams.minDeadlineMs


optional requestId?: string

Idempotency key: a repeated requestId is refused (409).

QuoteParams.requestId


optional payFees?: boolean

See ExecuteOptions.payFees (default true).


optional onProgress?: (p) => void

Parameter Type
p SwapProgress

void