@multiversx/sdk-dapp-swap
Version:
A library to hold the main logic for swapping between tokens on the MultiversX blockchain
68 lines (63 loc) • 1.4 kB
JavaScript
import{a as o}from"./chunk-VRIKZHJA.js";import{a as t}from"./chunk-LWFAQNXZ.js";import{f as n}from"./chunk-5W737WN4.js";n();import{gql as a}from"@apollo/client";var e="TRANSACTIONS_PLACEHOLDER",i=`
transactions {
${o}
}
`,r=`
query swapPackageSwapRoute (
$amountIn: String
$amountOut: String
$tokenInID: String!
$tokenOutID: String!
$tolerance: Float!
) {
swap(
amountIn: $amountIn
amountOut: $amountOut
tokenInID: $tokenInID
tokenOutID: $tokenOutID
tolerance: $tolerance
) {
amountIn
tokenInID
tokenInPriceUSD
tokenInExchangeRateDenom
amountOut
tokenOutID
tokenOutPriceUSD
tokenOutExchangeRateDenom
fees
swapType
tokenRoute
pricesImpact
maxPriceDeviationPercent
tokensPriceDeviationPercent
intermediaryAmounts
pairs {
${t}
}
smartSwap {
feeAmount
feePercentage
amountOut
tokenOutExchangeRateDenom
tokenInExchangeRateDenom
tokensPriceDeviationPercent
routes {
pairs {
${t}
}
tokenRoute
pricesImpact
intermediaryAmounts
fees
}
}
${e}
}
}
`,I=a`
${r.replace(e,i)}
`,k=a`
${r.replace(e,"")}
`;export{I as a,k as b};
//# sourceMappingURL=chunk-DMQHSXUK.js.map