What is Nostr?
errhead /
npub1mka…zl8u
2023-10-24 09:48:13
in reply to nevent1q…36c5

errhead on Nostr: Mostly like this. I also search account.note and account.description for anything ...

Mostly like this. I also search account.note and account.description for anything using the ⚡️user@host format for completeness.

apiCall = "https://"; + hostAddress + "/api/v1/accounts/" + userName;
accountData = await axios.get(apiCall);
if (!accountData) {
apiCall = "https://"; + hostAddress + "/api/v1/accounts/lookup?acct=" + userName
accountData = await axios.get(apiCall);
}
if (accountData) {
let account = accountData.data
if (account.fields) {
for (var field of account.fields) {
if (field.name.toLowerCase() === "lightning address" || field.name.toLowerCase() === "lud16") {
foundLightningAddress = field.value;
}
}
}
Author Public Key
npub1mkamtzdjk9cwutzx4rm7j6lwjgcsza4yszuztpe0k99jn9gkynqq0tzl8u