@accret/bridge-sdk
Version:
42 lines • 2.38 kB
TypeScript
import { AccretSupportedChain, AccretSupportedProvider } from "../types";
import type { executeMayanTxParams } from "../types/mayan/buildTransaction";
import type { executeJupiterTxParams } from "../types/jupiter/buildTransaction";
import type { ExecuteDeBridgeSwapParams } from "../types/deBridge";
import type { AccretQuoteParams, GetQuoteResult } from "../types";
/**
* @description Fetches quotes from multiple providers and returns the best and the other quotes
* @param params - The parameters for fetching a quote
* @param params.fromChain - The chain from which to swap
* @param params.fromToken - The token to swap from
* @param params.toChain - The chain to which to swap
* @param params.toToken - The token to swap to
* @param params.amount - The amount to swap
* @param params.srcTokenDecimals - The decimals of the source token
* @param params.slippage - The slippage in basis points (default is 50)
* @param params.referrer - The referrer for the swap (optional)
* @param params.referrerBps - The referrer basis points (optional)
* @param params.referrerAddress - The referrer address (optional)
* @returns An object containing the best quote and all quotes
*/
export declare function getQuote(params: AccretQuoteParams): Promise<GetQuoteResult>;
/**
* @description Executes a swap on the specified provider
* @param params - The parameters for executing a swap
* @param params.provider - The provider to use for the swap
* @param params.data - The data required for the swap, which can vary by provider
* @returns A promise that resolves to the swap response
*/
export declare function executeSwap(params: {
provider: AccretSupportedProvider;
data: executeMayanTxParams | executeJupiterTxParams | ExecuteDeBridgeSwapParams;
}): Promise<string | import("../types/deBridge/buildTransaction").CrossChainSwapResult>;
/**
* @description Fetches the token list from the specified provider
* @param params - The parameters for fetching the token list
* @returns A promise that resolves to the token list
*/
export declare function getTokenList(params: {
provider: AccretSupportedProvider;
chainId: AccretSupportedChain;
}): Promise<import("../types/deBridge").GetDeBridgeTokenListResponse | import("../types/jupiter").GetJupiterTokenListResponse | import("../types/mayan").GetMayanTokenListResponse>;
//# sourceMappingURL=index.d.ts.map