@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
22 lines (21 loc) • 1.28 kB
TypeScript
import { type QuoteBuilder } from './types';
/**
* @TODO: Wire it up to UI components, currently it is not used.
* More about the purpose of this quote mode: https://www.notion.so/the-fun-group/Refactoring-Quote-Mode-Selection-Max-Button-Behavior-327fc3b2a00281eea8f0eb0a28a08045#8d7655b63b9c416a91021718702ffe8f
*
* ONE_TO_ONE is EXACT_IN with subsidized fees — the user sends X tokens and
* receives exactly X tokens on the destination chain. All bridge/relay fees
* are absorbed by the protocol, so send === receive and feesUsd === '0'.
*
* Mechanically it inherits all EXACT_IN behavior (max sendable calculation,
* quote request building, retry logic, quick options) and only overrides
* `getDisplayAmounts` to reflect the 1:1 guarantee.
*
* @TODO: Revisit whether ONE_TO_ONE should remain a separate builder or be
* collapsed into EXACT_IN with overrides. Jeremy suspects it may just be
* EXACT_IN with some config flags. Discuss with Connor before removing since
* it's in the approved design doc.
* See: https://fun-xyz.slack.com/archives/C0AN3BXPBNK/p1775167066455859
* Tracked: https://linear.app/funxyz/issue/ENG-3282/revisit-one-to-one-quote-mode-consider-collapsing-into-exact-in
*/
export declare function createOneToOneBuilder(): QuoteBuilder;