@accret/bridge-sdk
Version:
87 lines • 2.14 kB
TypeScript
import { deBridgeChainId } from "./index";
interface CrossChainEstimation {
srcChainTokenIn: SrcChainTokenIn;
dstChainTokenOut: DstChainTokenOut;
costsDetails: CostsDetail[];
recommendedSlippage: number;
}
interface CostsDetail {
chain: string;
tokenIn: string;
tokenOut: string;
amountIn: string;
amountOut: string;
type: string;
payload: Payload;
}
interface Payload {
feeAmount: string;
feeBps?: string;
feeApproximateUsdValue?: string;
}
interface DstChainTokenOut {
address: string;
chainId: number;
decimals: number;
name: string;
symbol: string;
amount: string;
recommendedAmount: string;
maxTheoreticalAmount: string;
approximateUsdValue: number;
recommendedApproximateUsdValue: number;
maxTheoreticalApproximateUsdValue: number;
}
interface SrcChainTokenIn {
name: string;
symbol: string;
chainId: number;
address: string;
decimals: number;
amount: string;
approximateOperatingExpense: string;
mutatedWithOperatingExpense: boolean;
approximateUsdValue: number;
originApproximateUsdValue: number;
}
interface Order {
approximateFulfillmentDelay: number;
}
interface SingleChainEstimation {
tokenIn: Token;
tokenOut: Token;
slippage: number;
recommendedSlippage: number;
}
interface Token {
address: string;
name: string;
symbol: string;
decimals: number;
amount: string;
minAmount?: string;
}
export interface getQuoteParamsBase {
srcChain: deBridgeChainId;
srcChainTokenIn: string;
srcChainTokenInAmount: string;
srcTokenDecimals: number;
dstChain: deBridgeChainId;
dstChainTokenOut: string;
slippage?: number;
affiliateFeeRecipient?: string;
affiliateFeePercent?: number;
}
export interface SingleChainQuoteResponse {
estimation: SingleChainEstimation;
}
export interface CrossChainQuoteResponse {
estimation: CrossChainEstimation;
order: Order;
fixFee: string;
userPoints: number;
integratorPoints: number;
usdPriceImpact: number;
}
export {};
//# sourceMappingURL=getQuote.d.ts.map