nostr-websocket-utils

nostr-websocket-utils v0.3.16


nostr-websocket-utils / countLeadingZeroBits

Function: countLeadingZeroBits()

countLeadingZeroBits(hex): number

Defined in: nips/nip-13.ts:16

Calculates the number of leading zero bits in a hex string

Parameters

hex

string

Hex string to check

Returns

number

Number of leading zero bits