mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
remove @noble/curves. people are not ready for it, causes BigInt issues.
This commit is contained in:
4
nip13.ts
4
nip13.ts
@@ -1,8 +1,8 @@
|
||||
import {hexToBytes} from '@noble/hashes/utils'
|
||||
import * as secp256k1 from '@noble/secp256k1'
|
||||
|
||||
/** Get POW difficulty from a Nostr hex ID. */
|
||||
export function getPow(id: string): number {
|
||||
return getLeadingZeroBits(hexToBytes(id))
|
||||
return getLeadingZeroBits(secp256k1.utils.hexToBytes(id))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user