DEX
Prepare
if(!process.env.MNEMONIC) {
throw new Error('MNEMINIC IS REQUIRED!');
}
// init wallet
const mnemonic = process.env.MNEMONIC.split(" ");
const keys = await mnemonicToPrivateKey(mnemonic);
const wallet = tonClient.open(
WalletContractV4.create({
workchain: 0,
publicKey: keys.publicKey
})
);
// get config
const apiConfig = await getApiConfig();
// get listed assets
const apiAssets = await getApiAssets();
// get pools
const apiPools = await getApiPools();
// init pool
const dexPool = tonClient.open(DexPool.createFromAddress(apiPools[0]!.address));TON swap
JETTON swap
TON deposit liquidity
JETTON deposit liquidity
Withdraw liquidity (burn LP)
Create booster for pool
Getters
Last updated