11'use strict' ;
22Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
3- exports . tapTweakHash = exports . tapLeafHash = exports . findScriptPath = exports . toHashTree = exports . rootHashFromPath = exports . LEAF_VERSION_TAPSCRIPT = void 0 ;
3+ exports . tapTweakHash = exports . tapleafHash = exports . findScriptPath = exports . toHashTree = exports . rootHashFromPath = exports . LEAF_VERSION_TAPSCRIPT = void 0 ;
44const buffer_1 = require ( 'buffer' ) ;
55const bcrypto = require ( '../crypto' ) ;
66const bufferutils_1 = require ( '../bufferutils' ) ;
@@ -9,8 +9,8 @@ const TAP_LEAF_TAG = 'TapLeaf';
99const TAP_BRANCH_TAG = 'TapBranch' ;
1010const TAP_TWEAK_TAG = 'TapTweak' ;
1111exports . LEAF_VERSION_TAPSCRIPT = 0xc0 ;
12- function rootHashFromPath ( controlBlock , tapLeafMsg ) {
13- const k = [ tapLeafMsg ] ;
12+ function rootHashFromPath ( controlBlock , tapleafMsg ) {
13+ const k = [ tapleafMsg ] ;
1414 const e = [ ] ;
1515 const m = ( controlBlock . length - 33 ) / 32 ;
1616 for ( let j = 0 ; j < m ; j ++ ) {
@@ -34,7 +34,7 @@ exports.rootHashFromPath = rootHashFromPath;
3434 */
3535function toHashTree ( scriptTree ) {
3636 if ( ( 0 , types_1 . isTapleaf ) ( scriptTree ) )
37- return { hash : tapLeafHash ( scriptTree ) } ;
37+ return { hash : tapleafHash ( scriptTree ) } ;
3838 const hashes = [ toHashTree ( scriptTree [ 0 ] ) , toHashTree ( scriptTree [ 1 ] ) ] ;
3939 hashes . sort ( ( a , b ) => a . hash . compare ( b . hash ) ) ;
4040 const [ left , right ] = hashes ;
@@ -67,7 +67,7 @@ function findScriptPath(node, hash) {
6767 return [ ] ;
6868}
6969exports . findScriptPath = findScriptPath ;
70- function tapLeafHash ( leaf ) {
70+ function tapleafHash ( leaf ) {
7171 const version = leaf . version || exports . LEAF_VERSION_TAPSCRIPT ;
7272 return bcrypto . taggedHash (
7373 TAP_LEAF_TAG ,
@@ -77,7 +77,7 @@ function tapLeafHash(leaf) {
7777 ] ) ,
7878 ) ;
7979}
80- exports . tapLeafHash = tapLeafHash ;
80+ exports . tapleafHash = tapleafHash ;
8181function tapTweakHash ( pubKey , h ) {
8282 return bcrypto . taggedHash (
8383 TAP_TWEAK_TAG ,
0 commit comments