From d071a76083ca4b261832aaafd2d38b43c429aca8 Mon Sep 17 00:00:00 2001 From: hh Date: Thu, 9 Jan 2025 20:57:28 +0800 Subject: [PATCH] Format code --- test/integration/taproot.spec.ts | 4 +++- ts_src/index.ts | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/integration/taproot.spec.ts b/test/integration/taproot.spec.ts index de76e9dc0..969e52f6b 100644 --- a/test/integration/taproot.spec.ts +++ b/test/integration/taproot.spec.ts @@ -782,7 +782,9 @@ function buildLeafIndexFinalizer( const witness = scriptSolution .concat(tapLeafScript.script) .concat(tapLeafScript.controlBlock); - return { finalScriptWitness: psbtutils.witnessStackToScriptWitness(witness) }; + return { + finalScriptWitness: psbtutils.witnessStackToScriptWitness(witness), + }; } catch (err) { throw new Error(`Can not finalize taproot input #${inputIndex}: ${err}`); } diff --git a/ts_src/index.ts b/ts_src/index.ts index ea26ae2cb..f94853aae 100644 --- a/ts_src/index.ts +++ b/ts_src/index.ts @@ -50,10 +50,24 @@ export { vectorSize, } from './transaction.js'; export { initEccLib } from './ecc_lib.js'; -export { BufferWriter, BufferReader } from './bufferutils.js'; +export { + BufferWriter, + BufferReader, + reverseBuffer, + cloneBuffer, +} from './bufferutils.js'; export { Interpreter } from './interpreter.js'; export { bn2Buf, buf2BN } from './bn.js'; export { tapTreeFromList, tapTreeToList } from './psbt/bip371.js'; +export { + LEAF_VERSION_TAPSCRIPT, + HashTree, + rootHashFromPath, + toHashTree, + findScriptPath, + tapleafHash, + tapTweakHash, +} from './payments/bip341.js'; export type { Taptree } from './types.js'; // scrypt exports