diff --git a/API/PLAYER.sh b/API/PLAYER.sh index b0c4d45a..d847782b 100755 --- a/API/PLAYER.sh +++ b/API/PLAYER.sh @@ -30,44 +30,6 @@ PORT=$1 PLAYER=$2 APPNAME=$3 WHAT=$4 OBJ=$5 VAL=$6 ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1) [[ ! $ASTRONAUTENS ]] && (echo "$HTTPCORS UNKNOWN PLAYER $PLAYER - EXIT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1 -############################################## -# PAY : /?player=PLAYER&pay=1&dest=G1PUB -############################################## - if [[ $APPNAME == "pay" ]]; then - echo "$HTTPCORS" > ~/.zen/tmp/$PLAYER.pay.$WHAT.http - - if [[ $WHAT =~ ^[0-9]+$ ]]; then - - echo "${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m" - ~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \ - ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m 2>&1 >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http - - fi - - if [[ "$WHAT" == "history" ]]; then - sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http - ~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \ - ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey history -j >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http - fi - - if [[ "$WHAT" == "get" ]]; then - sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http - ~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \ - ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey get >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http - fi - - if [[ "$WHAT" == "balance" ]]; then - ~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \ - ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey balance >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http - fi - - cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http - cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & - end=`date +%s` - echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds. - exit 0 - fi - ############################################## # MOATUBE : /?player=PLAYER&moa=json&tag=FILTER ############################################## diff --git a/API/SALT.sh b/API/SALT.sh index b9a7840b..592aeba6 100755 --- a/API/SALT.sh +++ b/API/SALT.sh @@ -116,7 +116,7 @@ PEPPER=$THIS cat ~/.zen/tmp/coucou/${MOATS}.messaging.json >> ~/.zen/tmp/coucou/${MOATS}.index.redirect ## SEND REPONSE PROCESS IN BACKGROUD - cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & + (cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && rm ~/.zen/tmp/coucou/${MOATS}.index.redirect ) & #~ ( ## USING IPNS SESSION KEY #~ REPONSE=$(cat ~/.zen/tmp/coucou/${MOATS}.messaging.json | ipfs add -q) #~ ipfs name publish --allow-offline --key=${PORT} /ipfs/$REPONSE @@ -385,7 +385,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh fi cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http - cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & + (cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && rm ~/.zen/tmp/$PLAYER.pay.$WHAT.http ) & end=`date +%s` echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds. exit 0 diff --git a/README.md b/README.md index 8cd8006c..bc8013c8 100644 --- a/README.md +++ b/README.md @@ -230,18 +230,6 @@ GET /?salt=${SALT}&pepper=${PEPPER}&pay=1&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtH ## ➤ PLAYER ZONE (API Station qui héberge ${PLAYER}) ### ```/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...``` -### Déclencher un Payement de 99 Ğ1 à Fred -```http -GET /?player=${PLAYER}&pay=99&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech -``` - -| Parameter | Type | Description | -| :-------- | :------- | :-------------------------------- | -| `player` | `string` | **Required**. Your EMAIL token | -| `pay` | `integer` | **Required** G1 AMOUNT | -| `g1pub` | `G1PUB` | **Required** destination "wallet key" | - - ### Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube) ```http GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube diff --git a/command.sh b/command.sh index ac9d1f01..5b4645a8 100755 --- a/command.sh +++ b/command.sh @@ -34,7 +34,7 @@ echo 'PRESS ENTER... '; read ## CREATE AND OR CONNECT USER PS3='Astronaute connectez votre PLAYER ___ ' - players=("NOUVEAU VISA" "IMPORT PLAYER" $(ls ~/.zen/game/players | grep -Ev "localhost" 2>/dev/null)) + players=("NOUVEAU VISA" "IMPORT PLAYER" $(ls ~/.zen/game/players | grep "@" 2>/dev/null)) ## MULTIPLAYER select fav in "${players[@]}"; do @@ -134,11 +134,11 @@ select fav in "${choices[@]}"; do ## REMOVE PLAYER DOCKER [[ $USER == "zen" ]] && make player MAIL=$PLAYER DELETE=true - echo "REMOVING GCHANGE+ PROFILE" - $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myDATA" erase + #~ echo "REMOVING GCHANGE+ PROFILE" + #~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myDATA" erase - #~ echo "REMOVE CESIUM+" - $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myCESIUM" erase + echo "REMOVE CESIUM+" + #~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myCESIUM" erase echo "rm -Rf ~/.zen/game/players/$PLAYER" rm -Rf ~/.zen/game/players/$PLAYER diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh index 15894667..ae6e6810 100755 --- a/tools/make_image_ipfs_index_carousel.sh +++ b/tools/make_image_ipfs_index_carousel.sh @@ -43,6 +43,7 @@ if [[ ! -d $img_dir ]]; then convert -font 'Liberation-Sans' \ -pointsize 80 -fill purple -draw 'text 50,120 "'"$COINS Ğ1"'"' \ -pointsize 30 -fill purple -draw 'text 40, 180 "'"$PLAYER"'"' \ + -pointsize 14 -fill white -draw 'text 40, 200 "'"$(date)"'"' \ "${HOME}/.zen/tmp/one.png" "${HOME}/.zen/tmp/carousel/${pub}.png" \ && rm ${HOME}/.zen/tmp/carousel/${pub}.one.png @@ -85,7 +86,7 @@ echo " -

$myHOST : $(date)

+

$myHOST :: ${#PLAYERONE[@]}