import {
GasPriceManager,
DecibelWriteDex,
TESTNET_CONFIG,
} from "@decibeltrade/sdk";
import { Ed25519Account, Ed25519PrivateKey } from "@aptos-labs/ts-sdk";
const gas = new GasPriceManager(TESTNET_CONFIG, {
multiplier: 2, // default multiplier applied to estimates
refreshIntervalMs: 60_000, // refresh cadence
});
await gas.initialize();
const account = new Ed25519Account({
privateKey: new Ed25519PrivateKey(process.env.PRIVATE_KEY!),
});
const write = new DecibelWriteDex(TESTNET_CONFIG, account, {
nodeApiKey: process.env.APTOS_NODE_API_KEY!, // Required
gasPriceManager: gas,
});