Skip to content

@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 ​

ts
assetIn: AssetInfo;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:130


assetOut ​

ts
assetOut: AssetInfo;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:131


credit ​

ts
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 ​

ts
expectedOut: TokenAmount;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:142

The venue's expected output, base units of assetOut.


fees ​

ts
fees: SwapFees;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:152


gross ​

ts
gross: Money;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:135

publicOut leaving the pool in assetIn.


kind ​

ts
readonly kind: "swapQuote";

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:129


minOut ​

ts
minOut: TokenAmount;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:144

expectedOut less slippage: the floor the wrapper enforces.


net ​

ts
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 ​

ts
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 ​

ts
quotedAt: number;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:156

Unix seconds the venue was queried.


refundCredit ​

ts
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 ​

ts
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 ​

ts
readonly adapter: EvmAddress;

path ​

ts
readonly path: `0x${string}`;

side ​

ts
side: "gross" | "net";

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:133

Which side the caller named.


slippageBps ​

ts
slippageBps: number;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:140


venue ​

ts
venue: string;

Defined in: @lelantos-org/sdk/dist/wallet/types/quotes.d.ts:154

Venue label for display, e.g. "univ3".