Skip to content

@lelantos-org/sdk / index / SwapOptions

Interface: SwapOptions โ€‹

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:100

Atomic shielded swap via SwapWrapper.

Properties โ€‹

amount โ€‹

ts
amount: AmountLike;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:107

Gross publicOut in assetIn. MASP transfers amount * scaleIn minus the protocol fee to the wrapper.


assetIn โ€‹

ts
assetIn: AssetRef;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:101


assetOut โ€‹

ts
assetOut: AssetRef;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:102


autoConsolidate? โ€‹

ts
optional autoConsolidate?: boolean;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:127


bRecipient? โ€‹

ts
optional bRecipient?: ShieldedAddress;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:113

Shielded recipient for B note. Defaults to own.


feeAsset? โ€‹

ts
optional feeAsset?: AssetRef;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:125

Asset to pay the relayer's shielded fee in. Defaults to the asset being moved.

A different asset costs two extra slots โ€” an input note of that asset and an output for its change โ€” so it needs a circuit shape wide enough to hold them: nOut >= 4, which the default 4ร—4 satisfies and a narrower pool on TRANSACT_3X3 does not. The relayer must also accept it: /chains publishes the list, and one it does not quote is rejected before any proving starts.


onPhase? โ€‹

ts
optional onPhase?: OnPhase<SpendPhase>;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:128


quote โ€‹

ts
quote: SwapQuote;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:109

Pre-fetched MetaQuoter quote pinning route + minOut.


selectOpts? โ€‹

ts
optional selectOpts?: SelectOpts;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:126


wrapperAddress โ€‹

ts
wrapperAddress: EvmAddressLike;

Defined in: @lelantos-org/sdk/dist/wallet/options.d.ts:111

SwapWrapper address; bound as leg-1 recipient+relayer and leg-2 payer.

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub