-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: nostr
action: blob
revision:
path_from: nip-05-relays
revision_from: refs/heads/master:
path_to:
revision_to:

git.thebackupbox.net

nostr

git://git.thebackupbox.net/nostr

blob of:

nostr

/ nip-05-relays

refs/heads/master:/nip-05-relays
 #!/usr/bin/env bash

 if [ ! "$1" ];then
   printf 'usage: nip-05 <user@host>\n' >&2
   printf '  outputs the user'\''s pubkey in hex format\n' >&2
   exit 1
 fi

 acct="$1"
 user="$(cut -d@ -f1 <<< "$acct")"
 domain="$(cut -d@ -f2 <<< "$acct")"

 resp="$(curl --no-location -sg "https://${domain}/.well-known/nostr.json?name=${user}")"
 pubkey="$(jq -r ".names.${user}" <<< "$resp")"
 jq -r ".relays.${pubkey}[]" <<< "$resp"

-- Response ended

-- Page fetched on Sun Jun 2 14:46:22 2024