mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-02-01 14:55:51 +00:00
migrate to jsr dependencies for @noble and @scure.
This commit is contained in:
2
nip49.ts
2
nip49.ts
@@ -22,7 +22,7 @@ export function encrypt(
|
||||
}
|
||||
|
||||
export function decrypt(ncryptsec: string, password: string): Uint8Array {
|
||||
let { prefix, words } = bech32.decode(ncryptsec, Bech32MaxSize)
|
||||
let { prefix, words } = bech32.decode(ncryptsec as `${string}1${string}`, Bech32MaxSize)
|
||||
if (prefix !== 'ncryptsec') {
|
||||
throw new Error(`invalid prefix ${prefix}, expected 'ncryptsec'`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user