mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
bring back @noble/curves instead of @noble/secp256k1.
fixes https://github.com/nbd-wtf/nostr-tools/issues/196#issuecomment-1537549606
This commit is contained in:
4
nip13.ts
4
nip13.ts
@@ -1,8 +1,8 @@
|
||||
import * as secp256k1 from '@noble/secp256k1'
|
||||
import {hexToBytes} from '@noble/hashes/utils'
|
||||
|
||||
/** Get POW difficulty from a Nostr hex ID. */
|
||||
export function getPow(id: string): number {
|
||||
return getLeadingZeroBits(secp256k1.utils.hexToBytes(id))
|
||||
return getLeadingZeroBits(hexToBytes(id))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user