nip19: fix ncryptsec type guard.

see https://github.com/nbd-wtf/nostr-tools/pull/409#issuecomment-2338661000
This commit is contained in:
fiatjaf 2024-09-09 14:21:26 -03:00
parent 45b25c5bf5
commit 13ac04b8f8
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export const NostrTypeGuard = {
isNSec: (value?: string | null): value is NSec => /^nsec1[a-z\d]{58}$/.test(value || ''), isNSec: (value?: string | null): value is NSec => /^nsec1[a-z\d]{58}$/.test(value || ''),
isNPub: (value?: string | null): value is NPub => /^npub1[a-z\d]{58}$/.test(value || ''), isNPub: (value?: string | null): value is NPub => /^npub1[a-z\d]{58}$/.test(value || ''),
isNote: (value?: string | null): value is Note => /^note1[a-z\d]+$/.test(value || ''), isNote: (value?: string | null): value is Note => /^note1[a-z\d]+$/.test(value || ''),
isNcryptsec: (value?: string | null): value is Note => /^ncryptsec1[a-z\d]+$/.test(value || ''), isNcryptsec: (value?: string | null): value is Ncryptsec => /^ncryptsec1[a-z\d]+$/.test(value || ''),
} }
export const Bech32MaxSize = 5000 export const Bech32MaxSize = 5000