NostrLink.encode(prefix: NostrPrefix)
This commit is contained in:
@ -110,16 +110,6 @@ export function eventLink(hex: u256, relays?: Array<string> | string) {
|
||||
return `/${encoded}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert hex pubkey to bech32 link url
|
||||
*/
|
||||
export function profileLink(hex: HexKey, relays?: Array<string> | string) {
|
||||
const encoded = relays
|
||||
? encodeTLV(NostrPrefix.Profile, hex, Array.isArray(relays) ? relays : [relays])
|
||||
: hexToBech32(NostrPrefix.PublicKey, hex);
|
||||
return `/${encoded}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert hex to bech32
|
||||
*/
|
||||
|
Reference in New Issue
Block a user