@lelantos-org/sdk / index / SwapQuote
Interface: SwapQuote
Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:128
A priced swap, produced by quoteSwap and passed back to swap.
Treat as opaque data: swap re-resolves both assets, re-derives the amounts and binds route, minOut and credit into the proof. A quote it could not have produced is INVALID_ARGUMENT; one whose figures moved since (a yield index, the relayer's flush fee) is QUOTE_STALE, retryable by re-quoting. Otherwise staleness is the caller's policy (quotedAt); the chain enforces minOut.
Properties
assetIn
assetIn: AssetInfo;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:130
assetOut
assetOut: AssetInfo;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:131
credit
credit: Money;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:149
Exactly what the output note will hold if the swap fills (not a floor: a better fill goes to the treasury). Net of fees.flush and fees.outProtocol.
expectedOut
expectedOut: TokenAmount;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:142
The venue's expected output, base units of assetOut.
fees
fees: SwapFees;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:152
gross
gross: Money;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:135
publicOut leaving the pool in assetIn.
kind
readonly kind: "swapQuote";Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:129
minOut
minOut: TokenAmount;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:144
expectedOut less slippage: the floor the wrapper enforces.
net
net: Money;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:137
Sent to the venue: gross − fees.protocol. net.baseUnits is the venue's amountIn.
onLadder
onLadder: boolean;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:139
Whether gross is a denomination of assetIn (it is published on-chain).
quotedAt
quotedAt: number;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:156
Unix seconds the venue was queried.
refundCredit
refundCredit: Money;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:151
What the refund note would hold, in assetIn, if the swap fails or passes its deadline.
route
readonly route: object;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:162
The venue route swap binds into the proof: the allowlisted ISwapAdapter and its encoded path. Readable for display and diagnostics; do not construct or edit (the wrapper refuses a non-allowlisted adapter on chain, and swap checks the shape).
adapter
readonly adapter: EvmAddress;path
readonly path: `0x${string}`;side
side: "gross" | "net";Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:133
Which side the caller named.
slippageBps
slippageBps: number;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:140
venue
venue: string;Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:154
Venue label for display, e.g. "univ3".