const binFileUtils = require("./binfileutils"); const utils = require("./powersoftau_utils"); async function preparePhase2(oldPtauFilename, newPTauFilename, verbose) { const {fd: fdOld, sections} = await binFileUtils.readBinFile(oldPtauFilename, "ptau", 1); const {curve, power} = await utils.readPTauHeader(fdOld, sections); const fdNew = await binFileUtils.createBinFile(newPTauFilename, "ptau", 1, 11); await utils.writePTauHeader(fdNew, curve, power); await binFileUtils.copySection(fdOld, sections, fdNew, 2); await binFileUtils.copySection(fdOld, sections, fdNew, 3); await binFileUtils.copySection(fdOld, sections, fdNew, 4); await binFileUtils.copySection(fdOld, sections, fdNew, 5); await binFileUtils.copySection(fdOld, sections, fdNew, 6); await binFileUtils.copySection(fdOld, sections, fdNew, 7); await processSection(2, 12, "G1", (1<