Skip to content

Commit 9f51a1a

Browse files
committed
refactor: move non-exported function to the bottom
1 parent d987d8d commit 9f51a1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ts_src/payments/taprootutils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ export function tapLeafHash(script: Buffer, version?: number): Buffer {
9393
);
9494
}
9595

96-
function tapBranchHash(a: Buffer, b: Buffer): Buffer {
97-
return bcrypto.taggedHash(TAP_BRANCH_TAG, NBuffer.concat([a, b]));
98-
}
99-
10096
export function tapTweakHash(pubKey: Buffer, h: Buffer | undefined): Buffer {
10197
return bcrypto.taggedHash(
10298
TAP_TWEAK_TAG,
10399
NBuffer.concat(h ? [pubKey, h] : [pubKey]),
104100
);
105101
}
106102

103+
function tapBranchHash(a: Buffer, b: Buffer): Buffer {
104+
return bcrypto.taggedHash(TAP_BRANCH_TAG, NBuffer.concat([a, b]));
105+
}
106+
107107
function serializeScript(s: Buffer): Buffer {
108108
const varintLen = varuint.encodingLength(s.length);
109109
const buffer = NBuffer.allocUnsafe(varintLen); // better

0 commit comments

Comments
 (0)