File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11/// <reference types="node" />
22import { Tapleaf , Taptree } from '../types' ;
33export declare const LEAF_VERSION_TAPSCRIPT = 192 ;
4- export declare function rootHashFromPath ( controlBlock : Buffer , tapleafMsg : Buffer ) : Buffer ;
4+ export declare function rootHashFromPath ( controlBlock : Buffer , leafHash : Buffer ) : Buffer ;
55interface HashLeaf {
66 hash : Buffer ;
77}
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ const bcrypto = require('../crypto');
66const bufferutils_1 = require ( '../bufferutils' ) ;
77const types_1 = require ( '../types' ) ;
88exports . LEAF_VERSION_TAPSCRIPT = 0xc0 ;
9- function rootHashFromPath ( controlBlock , tapleafMsg ) {
9+ function rootHashFromPath ( controlBlock , leafHash ) {
1010 const m = ( controlBlock . length - 33 ) / 32 ;
11- let kj = tapleafMsg ;
11+ let kj = leafHash ;
1212 for ( let j = 0 ; j < m ; j ++ ) {
1313 const ej = controlBlock . slice ( 33 + 32 * j , 65 + 32 * j ) ;
1414 if ( kj . compare ( ej ) < 0 ) {
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ export const LEAF_VERSION_TAPSCRIPT = 0xc0;
88
99export function rootHashFromPath (
1010 controlBlock : Buffer ,
11- tapleafMsg : Buffer ,
11+ leafHash : Buffer ,
1212) : Buffer {
1313 const m = ( controlBlock . length - 33 ) / 32 ;
1414
15- let kj = tapleafMsg ;
15+ let kj = leafHash ;
1616 for ( let j = 0 ; j < m ; j ++ ) {
1717 const ej = controlBlock . slice ( 33 + 32 * j , 65 + 32 * j ) ;
1818 if ( kj . compare ( ej ) < 0 ) {
You can’t perform that action at this time.
0 commit comments