attempt for currently popular algo

This commit is contained in:
Believethehype
2024-03-05 16:09:28 +01:00
parent c489b76145
commit b53dd0d8ee
4 changed files with 218 additions and 6 deletions

View File

@@ -163,11 +163,11 @@ export async function parseandreplacenpubs(note){
let finalnote = ""
for (let word in myArray){
if(myArray[word].startsWith("nostr:npub")){
console.log(myArray[word])
//console.log(myArray[word])
let pk = PublicKey.parse(myArray[word].replace("nostr:", ""))
console.log(pk.toBech32())
//console.log(pk.toBech32())
let profiles = await get_user_infos([pk])
console.log(profiles[0].profile.nip05)
//console.log(profiles[0].profile.nip05)
myArray[word] = profiles[0].profile.nip05 // replace with nip05 for now
// <href>='https://njump.com/'>test[0].profile.nip05</href>test[0].profile.nip05