All files / src/wallet-sdk utils.ts

100% Statements 5/5
25% Branches 1/4
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 102x   2x 6x     2x 14x    
import { HARDENED_OFFSET } from '@scure/bip32';
 
export function isCompressed(bytes: Uint8Array) {
  return bytes.length === 32 || (bytes.length === 33 && (bytes[0] === 0x02 || bytes[0] === 0x03));
}
 
export function isHardened(index: number): number {
  return index + HARDENED_OFFSET;
}