diff --git a/nip19.ts b/nip19.ts index f90e22c..ef92eb6 100644 --- a/nip19.ts +++ b/nip19.ts @@ -17,7 +17,7 @@ export function decode(nip19: string): { type: string data: ProfilePointer | EventPointer | string } { - let {prefix, words} = bech32.decode(nip19, 1000) + let {prefix, words} = bech32.decode(nip19, 1500) let data = new Uint8Array(bech32.fromWords(words)) if (prefix === 'nprofile') { @@ -87,7 +87,7 @@ export function noteEncode(hex: string): string { function encodeBytes(prefix: string, hex: string): string { let data = secp256k1.utils.hexToBytes(hex) let words = bech32.toWords(data) - return bech32.encode(prefix, words, 1000) + return bech32.encode(prefix, words, 1500) } export function nprofileEncode(profile: ProfilePointer): string { @@ -96,7 +96,7 @@ export function nprofileEncode(profile: ProfilePointer): string { 1: (profile.relays || []).map(url => utf8Encoder.encode(url)) }) let words = bech32.toWords(data) - return bech32.encode('nprofile', words, 1000) + return bech32.encode('nprofile', words, 1500) } export function neventEncode(event: EventPointer): string { @@ -105,7 +105,7 @@ export function neventEncode(event: EventPointer): string { 1: (event.relays || []).map(url => utf8Encoder.encode(url)) }) let words = bech32.toWords(data) - return bech32.encode('nevent', words, 1000) + return bech32.encode('nevent', words, 1500) } function encodeTLV(tlv: TLV): Uint8Array {