From 32fc816624543cb7987231ce932e5b77103d1f25 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 1 Jan 2023 19:55:15 +0100 Subject: [PATCH] set right GW & API --- templates/data/local.api.json | 2 +- templates/data/local.gw.json | 2 +- templates/tw/$ _ipfs_saver_api.json | 2 +- templates/tw/$ _ipfs_saver_gateway.json | 2 +- tools/VISA.new.sh | 17 +++++++---------- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/templates/data/local.api.json b/templates/data/local.api.json index 3f1ce9cc..915598b0 100644 --- a/templates/data/local.api.json +++ b/templates/data/local.api.json @@ -1 +1 @@ -[{"title":"$:/ipfs/saver/api/http/local/5001","tags":"$:/ipfs/core $:/ipfs/saver/api","text":"_NID_"}] +[{"title":"$:/ipfs/saver/astroport/api","tags":"$:/ipfs/core $:/ipfs/saver/api","text":"_NID_"}] diff --git a/templates/data/local.gw.json b/templates/data/local.gw.json index c04358b9..3c4e7e92 100644 --- a/templates/data/local.gw.json +++ b/templates/data/local.gw.json @@ -1 +1 @@ -[{"title":"$:/ipfs/saver/gateway/local/myip","tags":"$:/ipfs/core $:/ipfs/saver/gateway","text":"_NID_"}] +[{"title":"$:/ipfs/saver/astroport/gw","tags":"$:/ipfs/core $:/ipfs/saver/gateway","text":"_NID_"}] diff --git a/templates/tw/$ _ipfs_saver_api.json b/templates/tw/$ _ipfs_saver_api.json index 840e9d2f..1af1c563 100644 --- a/templates/tw/$ _ipfs_saver_api.json +++ b/templates/tw/$ _ipfs_saver_api.json @@ -1 +1 @@ -[{"title":"$:/ipfs/saver/api","tags":"$:/ipfs/core","text":"$:/ipfs/saver/api/http/local/5001"}] +[{"title":"$:/ipfs/saver/api","tags":"$:/ipfs/core","text":"$:/ipfs/saver/astroport/api"}] diff --git a/templates/tw/$ _ipfs_saver_gateway.json b/templates/tw/$ _ipfs_saver_gateway.json index 2e76b666..19fce3ef 100644 --- a/templates/tw/$ _ipfs_saver_gateway.json +++ b/templates/tw/$ _ipfs_saver_gateway.json @@ -1 +1 @@ -[{"title":"$:/ipfs/saver/gateway","tags":"$:/ipfs/core","text":"$:/ipfs/saver/gateway/local/myip"}] +[{"title":"$:/ipfs/saver/gateway","tags":"$:/ipfs/core","text":"$:/ipfs/saver/astroport/gw"}] diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index da39bd4f..1de6a45c 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -175,10 +175,6 @@ WID="https://ipfs.$CLYUSER$YOMAIN.$(myHostName)/api" #### - ### CREATE $NID ADDRESS FOR API & ROUND ROBIN FOR GW - cat ~/.zen/Astroport.ONE/templates/data/local.api.json | sed "s~_NID_~${WID}~g" > ~/.zen/tmp/${MOATS}/local.api.json - cat ~/.zen/Astroport.ONE/templates/data/local.gw.json | sed "s~_NID_~${NID}~g" > ~/.zen/tmp/${MOATS}/local.gw.json - mv ~/.zen/tmp/${MOATS}/secret.dunikey ~/.zen/game/players/$PLAYER/ # Create Player "IPNS Key" (key import) @@ -266,6 +262,10 @@ WID="https://ipfs.$CLYUSER$YOMAIN.$(myHostName)/api" rm -f ~/.zen/tmp/${MOATS}/crypto.2 ########### + ### CREATE $NID ADDRESS FOR API & ROUND ROBIN FOR GW + cat ~/.zen/Astroport.ONE/templates/data/local.api.json | sed "s~_NID_~${WID}~g" > ~/.zen/tmp/${MOATS}/local.api.json + cat ~/.zen/Astroport.ONE/templates/data/local.gw.json | sed "s~_NID_~${NID}~g" > ~/.zen/tmp/${MOATS}/local.gw.json + # Create"$PLAYER_feed" Key FEEDNS=$(ipfs key gen "${PLAYER}_feed") @@ -280,9 +280,6 @@ WID="https://ipfs.$CLYUSER$YOMAIN.$(myHostName)/api" # cat ~/.zen/tmp/${MOATS}/local.api.json | jq -r ## CHANGE SELECTED GW & API - ## ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_api.json - ## ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_gateway.json - ## ADD SYSTEM TW tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \ @@ -290,8 +287,8 @@ WID="https://ipfs.$CLYUSER$YOMAIN.$(myHostName)/api" --import ~/.zen/tmp/${MOATS}/lightbeam-key.json "application/json" \ --import ~/.zen/tmp/${MOATS}/local.api.json "application/json" \ --import ~/.zen/tmp/${MOATS}/local.gw.json "application/json" \ - --import ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_api.json "application/json" \ - --import ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_gateway.json "application/json" \ + --import ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_api.json "application/json" \ + --import ~/.zen/Astroport.ONE/templates/tw/$ _ipfs_saver_gateway.json "application/json" \ --output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "newindex.html" "text/plain" [[ -s ~/.zen/tmp/${MOATS}/newindex.html ]] && cp -f ~/.zen/tmp/${MOATS}/newindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html @@ -314,7 +311,7 @@ WID="https://ipfs.$CLYUSER$YOMAIN.$(myHostName)/api" convert -gravity northeast -pointsize 25 -fill black -draw "text 20,180 \"$PASS\"" ~/.zen/tmp/${MOATS}/pseudo.png ~/.zen/tmp/${MOATS}/pass.png convert -gravity northwest -pointsize 25 -fill black -draw "text 300,100 \"$SALT\"" ~/.zen/tmp/${MOATS}/pass.png ~/.zen/tmp/${MOATS}/salt.png - convert -gravity northwest -pointsize 25 -fill black -draw "text 300,140 \"$PEPPER\"" ~/.zen/tmp/${MOATS}/salt.png ~/.zen/game/players/$PLAYER/ID.png + convert -gravity northwest -pointsize 25 -fill black -draw "text 300,140 \"$PEPPER\"" ~/.zen/tmp/${MOATS}/salt.png ~/.zen/game/players/$PLAYER/ID.png # INSERTED IMAGE IPFS # IASTRO=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ID.png | tail -n 1) ## G1VISA PUBLIC / PRIVATE