Skip to content

Commit

Permalink
Update script
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Feb 20, 2024
1 parent 40b0468 commit c597988
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/add_name
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NPUB="$2"
RELAYS="${@:3}"

RELAYS_JSON_ARRAY=$(printf "%s\n" $RELAYS | jq -R . | jq -s .)
BASE64_DELETE_AUTH_EVENT=$(nak event --content='' --kind 27235 -t method='DELETE' -t u="http://nos.social/api/names/$NAME" --sec $NIP05_SEC | base64)
BASE64_DELETE_AUTH_EVENT=$(nak event --content='' --kind 27235 -t method='DELETE' -t u="https://nos.social/api/names/$NAME" --sec $NIP05_SEC | base64)

HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE "https://nos.social/api/names/$NAME" \
-H "Content-Type: application/json" \
Expand All @@ -41,7 +41,7 @@ JSON_PAYLOAD=$(jq -n \
--argjson relays "$RELAYS_JSON_ARRAY" \
'{name: $name, data: {pubkey: $pubkey, relays: $relays}}')

BASE64_AUTH_EVENT=$(nak event --content='' --kind 27235 -t method='POST' -t u='http://nos.social/api/names' --sec $NIP05_SEC | base64)
BASE64_AUTH_EVENT=$(nak event --content='' --kind 27235 -t method='POST' -t u='https://nos.social/api/names' --sec $NIP05_SEC | base64)
curl -s https://nos.social/api/names \
-H "Content-Type: application/json" \
-H "Authorization: Nostr $BASE64_AUTH_EVENT" \
Expand Down

0 comments on commit c597988

Please sign in to comment.