QuoteParams
Defined in: protocol-swap2-core/src/types.ts:15
What the engine asks a provider to quote. Amounts are base-unit strings; exact input only.
Properties
Section titled “Properties”amountIn
Section titled “amountIn”amountIn:
string
Defined in: protocol-swap2-core/src/types.ts:30
destAddress
Section titled “destAddress”destAddress:
string
Defined in: protocol-swap2-core/src/types.ts:35
destChain
Section titled “destChain”destChain:
string
Defined in: protocol-swap2-core/src/types.ts:28
destToken
Section titled “destToken”destToken:
string
Defined in: protocol-swap2-core/src/types.ts:29
optionaldry?:boolean
Defined in: protocol-swap2-core/src/types.ts:39
Pricing preview only — no deposit address is created upstream.
optionalflex?:boolean
Defined in: protocol-swap2-core/src/types.ts:45
Amount-flexible deposit (exchange flow): amountIn is only a pricing
notional — the user may send any amount to the deposit address (1Click
FLEX_INPUT). Providers that can’t do this return no quote.
minAmountOut?
Section titled “minAmountOut?”
optionalminAmountOut?:string
Defined in: protocol-swap2-core/src/types.ts:32
Caller-supplied output floor in destination base units.
onRefusal?
Section titled “onRefusal?”
optionalonRefusal?: (reason) =>void
Defined in: protocol-swap2-core/src/types.ts:19
Local-only (never serialized): called with the reason when the provider refuses to quote — a shared-instance “last refusal” field raced under concurrent quotes, so the reason rides per-call.
Parameters
Section titled “Parameters”reason
Section titled “reason”string
Returns
Section titled “Returns”void
refundAddress?
Section titled “refundAddress?”
optionalrefundAddress?:string
Defined in: protocol-swap2-core/src/types.ts:37
Where a failed swap refunds on the source chain (the sender’s address).
slippageBps?
Section titled “slippageBps?”
optionalslippageBps?:number
Defined in: protocol-swap2-core/src/types.ts:34
Maximum slippage accepted by the caller, expressed in basis points.
sourceChain
Section titled “sourceChain”sourceChain:
string
Defined in: protocol-swap2-core/src/types.ts:20
sourceDecimals?
Section titled “sourceDecimals?”
optionalsourceDecimals?:number
Defined in: protocol-swap2-core/src/types.ts:27
Set only for a source token the catalog does not list: sourceToken is then its contract
(EVM) or mint (Solana) and this its decimals. Providers that can trade any token resolve it with
resolveAsset(chain, sourceToken, {allowUnlisted: true, decimals}); the others refuse it.
sourceToken
Section titled “sourceToken”sourceToken:
string
Defined in: protocol-swap2-core/src/types.ts:21