Join the Secure Future of Private Transactions
SilentSwap is a next-generation, noncustodial privacy service for cross-chain swaps.
SilentSwap is a next-generation, noncustodial privacy service for cross-chain swaps.




More Than 40+
Chains Supported
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tempus lorem ac eros suscipit, ac facilisis velit hendrerit.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const { formatEther } = require("ethers/lib/utils");
async function quote(params) {
const response = await fetch('https://dln.debridge.finance/v1.0/dln/quote?' + new URLSearchParams(params));
const data = await response.json();
if (data.errorCode) throw new Error(data.errorId)
return data
}
async function main() {
console.log("Trading 1 ETH from Ethereum to BNB...")
const { estimation } = await quote({
srcChainId: 1,
srcChainTokenIn: '0x0000000000000000000000000000000000000000',
srcChainTokenInAmount: '1000000000000000000',
dstChainTokenOutAmount: 'auto',
dstChainId: 56,
dstChainTokenOut: '0x0000000000000000000000000000000000000000',
prependOperatingExpenses: true
});
const minOutcome = estimation.dstChainTokenOut.recommendedAmount;
const minOutcomeWithoutDecimals = formatEther(minOutcome)
console.log(`Expected outcome: ${minOutcomeWithoutDecimals} BNB`)
}
main().catch(err => console.error(err))
1
2
3
admin@debridge: ~ node dln.js
Trading 1 ETH from Ethereum to BNB...
Expected outcome:3.4303359965124134BNB










