diff --git a/README.md b/README.md index 02d9bbee..69aadd68 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,34 @@ NAVIGATEUR JOUEUR - aptitudes / équipements - arbres informationnels, projection de rêves. +--- +# astrXbian Balise Structure + +Chaque Astronaute quand il se connecte transmet ses G1 clefs au démon ipfs. + +Voici où se situe ses chaines... + +~/.zen/game/players/$PLAYER/moa +~/.zen/game/players/$PLAYER/keystore +~/.zen/game/players/$PLAYER/secret.dunikey +~/.zen/game/players/$PLAYER/ipfs/.$IPFSNODEID/G1SSB/ + +Dans IPFS, chaque MEDIA ajouté est associé à une première clef "créateur". +Chaque "contrat" permettant de libérer le MEDIA est inscrit en tant que index.html de chaque sous-répertoire. +Le contrat final correspond à enchainer la découverte des sous-répertoires, avant le dernier contenant le HASH recherché. + +'G1SSB' contient le contrat "Identité du joueur", Astronaute. +'FRIENDS' les contrats et niveau de confiance déclarés. +'KEY' les contrats envers des oeuvres numériques ou numérisées (NFT). + +Ces données sont diffusées au travers de la balise IPFS du joueur quand il est connecté. + +Le joueur possède les clefs des canaux 'moa_player' et 'qo-op_player', ce sont ses journaux. +Le premier lié à l'administration du jeu et des joueurs +Le second public. L'équivalent d'une chaine multimédia collectivement approvisionnées... + +L'interface de ces journaux est TiddlyWiki, chaque enregistrement se trouve enregistré en blockchain par le capitaine. + --- # TODO diff --git a/templates/instascan.html b/templates/instascan.html index 9853b011..00c328e5 100644 --- a/templates/instascan.html +++ b/templates/instascan.html @@ -1,10 +1,9 @@ - - + - JQuery HTML5 QR Code Scanner using Instascan JS Example - ItSolutionStuff.com + ASTROPORT QR Code Scanner @@ -81,8 +80,8 @@ p=0;Ei(69,e|0,28,i|0,r|0);Be=p;p=0;if(Be&1)break;p=0;Ge(45,u|0,18,f|0,a|0,t|0,n| data: "qrcode="+content, type: 'GET' }); - alert(content); + $(location).attr(‘href’, content); }); diff --git a/tools/CHANNELS.populate.sh b/tools/CHANNELS.populate.sh index 820cfb32..4342cdd6 100755 --- a/tools/CHANNELS.populate.sh +++ b/tools/CHANNELS.populate.sh @@ -25,40 +25,12 @@ source ~/.zen/ipfs.sync; echo "CAPTAIN is $CAPTAIN" [[ $PLAYER != $CAPTAIN ]] && echo "CAPTAIN RUN ONLY. EXIT" && exit 1 -# Remove old _SLICKDIV_ -rm ~/.zen/game/players/$CAPTAIN/moa/slick.div 2>/dev/null - -for player in $(ls ~/.zen/game/players/); do - - - moans=$(cat ~/.zen/game/players/$player/.moans) - # CHECK DIFFERENCES FROM LATEST TIME CHECK - ## GETTING LAST 'player_moa' ONLINE VERSION - ipfs cat /ipns/$moans > ~/.zen/game/players/$player/moa/index.html - IPUSH=$(ipfs add -Hq ~/.zen/game/players/$player/moa/index.html | tail -n 1) - - # Avance la blockchain CAPTAIN pour archiver les '$player.moa.chain' des Etats modifiés - [[ $(cat ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain 2>/dev/null) != "$IPUSH" ]] &&\ - echo $IPUSH > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain && \ - echo $MOATS > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.ts && \ - echo "$player 'moa' UPDATE : $MOATS $IPUSH" && \ - echo "

$player

" >> ~/.zen/game/players/$CAPTAIN/moa/slick.div -# echo "

$player

" >> ~/.zen/game/players/$CAPTAIN/moa/slick.div && \ - -done - MOANS=$(ipfs key list -l | grep -w moa | cut -d ' ' -f 1) ## GET CAPTAIN PLAYER NS PUBKEY CAPTAINNS=$(ipfs key list -l | grep -w $CAPTAIN | cut -d ' ' -f 1) ## GET CAPTAIN PLAYER NS PUBKEY CAPTAINMOANS=$(ipfs key list -l | grep -w moa_$CAPTAIN | cut -d ' ' -f 1) CAPTAINQOOPNS=$(ipfs key list -l | grep -w qo-op_$CAPTAIN | cut -d ' ' -f 1) -# Get one line -[[ ! -f ~/.zen/game/players/$CAPTAIN/moa/slick.div ]] && echo "http://127.0.0.1:8080/ipns/$CAPTAINNS/slick.html" && exit 0 - -SLICKDIV=$(<~/.zen/game/players/$CAPTAIN/moa/slick.div); -echo $SLICKDIV - # Copying homepage.html template cat ${MY_PATH}/../templates/homepage.html > ~/.zen/game/players/$CAPTAIN/moa/slick.html sed -i "s~_IPNSL_~/ipns/$MOANS~g" ~/.zen/game/players/$CAPTAIN/moa/slick.html @@ -77,4 +49,27 @@ echo $SLICKDIV echo "http://127.0.0.1:8080/ipns/$CAPTAINNS/slick.html" + +# UPDATE TW UPDATE CHAIN +for player in $(ls ~/.zen/game/players/); do + + + moans=$(cat ~/.zen/game/players/$player/.moans) + # CHECK DIFFERENCES FROM LATEST TIME CHECK + ## GETTING LAST 'player_moa' ONLINE VERSION + echo "Getting $player/.moans /ipns/$moans" + ipfs --timeout=10s get -o ~/.zen/game/players/$player/moa/ /ipns/$moans || continue + IPUSH=$(ipfs add -Hq ~/.zen/game/players/$player/moa/index.html | tail -n 1) + + # Avance la blockchain CAPTAIN pour archiver les '$player.moa.chain' des Etats modifiés + [[ $(cat ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain 2>/dev/null) != "$IPUSH" ]] &&\ + echo $IPUSH > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain && \ + echo $MOATS > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.ts && \ + echo "$player 'moa' UPDATE : $MOATS $IPUSH" && \ + echo "

$player

" >> ~/.zen/game/players/$CAPTAIN/moa/slick.div +# echo "

$player

" >> ~/.zen/game/players/$CAPTAIN/moa/slick.div && \ + +done + + exit 0 diff --git a/tools/PLAYER.entrance.sh b/tools/PLAYER.entrance.sh index c0d86a57..6754562b 100755 --- a/tools/PLAYER.entrance.sh +++ b/tools/PLAYER.entrance.sh @@ -61,7 +61,21 @@ echo "==== qo-op & moa Captain/Station keystore ===="; sleep 2 # Keep already created keys !!? cp ~/.ipfs/keystore.astrXbian.${PLAYER}.${MOATS}/* ~/.ipfs/keystore/ 2>/dev/null +################################################################################### + # 'tokenring' Key there? TOKENRING IS A SHARED KEY TO KNOW WHO IS NEXT IN MY FRIEND TO WRITE COMMON CHANNEL + # In case of corruption... Swarm goes into DEFCON 3 procedure and eject "bad friend" + # Shared between Astroport to choose Station next write time. + [[ ! -f ~/.ipfs/keystore/key_orxwwzloojuw4zy ]] && qoopns=$(ipfs key gen tokenring) + # tokenring show which PLAYER is the actual 'official' qo-op and moa channels publisher/ + # tokenringnns is used to choose who is next... + ipfs key list -l | grep -w tokenring + tokenringns=$(ipfs key list -l | grep -w tokenring | cut -d ' ' -f 1) + ipfs name publish --key=tokenring /ipfs/$(echo $PLAYER | ipfs add -q) 2>/dev/null + echo "----> 'tokenringnns' WHO IS NEXT : http://127.0.0.1:8080/ipns/$tokenringns"; sleep 1 + echo "$tokenringnns" > ~/.zen/game/players/$PLAYER/ipfs/.$IPFSNODEID/.tokenringnns ## 'tokenring' is "who is next player to play" + +################################################################################### # 'qo-op' Key there? Or Captain already join a flag # Astroport public channel 'state of mind' propagation... [[ ! -f ~/.ipfs/keystore/key_ofxs233q ]] &&\ @@ -75,6 +89,7 @@ echo "==== qo-op & moa Captain/Station keystore ===="; sleep 2 echo "----> Station 'qo-op' channel : http://127.0.0.1:8080/ipns/$qoopns"; sleep 1 echo "$qoopns" > ~/.zen/game/players/$PLAYER/ipfs/.$IPFSNODEID/.qoopns ## 'qo-op' public channel declared in ipfs balise +################################################################################### # 'moa' Key there? It is the 'Administrative' 3 star.level confidence information layer. [[ ! -f ~/.ipfs/keystore/key_nvxwc ]] &&\ moans=$(ipfs key gen moa) && \ @@ -87,22 +102,23 @@ echo "==== qo-op & moa Captain/Station keystore ===="; sleep 2 echo "----> Station 'moa' channel : http://127.0.0.1:8080/ipns/$moans"; sleep 1 echo "$moans" > ~/.zen/game/players/$PLAYER/ipfs/.$IPFSNODEID/.moans ## 'moa' captain controled channel -echo -echo "===== Connect captain IPFS datadir to Station (balise junction) ====="; sleep 2 +################################################################################### + echo + echo "===== Connect captain IPFS datadir to Station (balise junction) ====="; sleep 2 - [[ -d ~/.zen/ipfs.astrXbian ]] && mv ~/.zen/ipfs.astrXbian ~/.zen/ipfs.astrXbian.${MOATS} && echo "BACKUP ~/.zen/ipfs.astrXbian.${MOATS}"; sleep 2 + [[ ! -d ~/.zen/ipfs.astrXbian ]] && mv ~/.zen/ipfs ~/.zen/ipfs.astrXbian && echo "BACKUP ~/.zen/ipfs.astrXbian" || rm ~/.zen/ipfs; sleep 2 mv ~/.zen/ipfs ~/.zen/ipfs.astrXbian && echo "BACKUP current ~/.zen/ipfs"; sleep 2 # Linking ~/.zen/ipfs # ~/.zen/secret.dunikey - [[ ! -f ~/.zen/secret.dunikey.astrXbian ]] && mv ~/.zen/secret.dunikey ~/.zen/secret.dunikey.astrXbian && echo "BACKUP ~/.zen/secret.dunikey.astrXbian"; sleep 2 + [[ ! -f ~/.zen/secret.dunikey.astrXbian ]] && mv ~/.zen/secret.dunikey ~/.zen/secret.dunikey.astrXbian && echo "BACKUP ~/.zen/secret.dunikey.astrXbian" || rm ~/.zen/secret.dunikey; sleep 2 - echo "CAPITAINE VOUS ETES EN POSSESSION DES CANAUX PRINCIPAUX DE LA STATION 'qo-op', 'moa', etc ..." - ln -s ~/.zen/game/players/$PLAYER/ipfs ~/.zen/ipfs && echo "$PLAYER become 'self' and can manage 'moa' & 'qo-op' channels" && sleep 1 - ln -s ~/.zen/game/players/$PLAYER/secret.dunikey ~/.zen/secret.dunikey && echo "Linking your ~/.zen/secret.dunikey with Station" && sleep 1 + echo "CAPITAINE VOUS PRENEZ POSSESSION DE LA STATION ET SES CANAUX 'qo-op', 'moa', etc ..." + ln -s ~/.zen/game/players/$PLAYER/ipfs ~/.zen/ipfs && echo "$PLAYER become IPFS 'self'" && sleep 1 + ln -s ~/.zen/game/players/$PLAYER/secret.dunikey ~/.zen/secret.dunikey && echo "Linking your ~/.zen/secret.dunikey to Station" && sleep 1 echo "##################################################### OK" - echo "Nouvelle Identité 'self' Balise IPFS"; sleep 1 + echo "Identité 'self' Balise IPFS"; sleep 1 ipfs id -f='\n' echo "##################################################### OK" echo "CAPTAIN=$PLAYER" > ~/.zen/ipfs.sync ## PLAYER IS ASTROPORT CAPTAIN NOW @@ -119,17 +135,19 @@ echo "=== Switching ~/.ipfs/config ==="; sleep 2 IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID); echo $IPFSNODEID echo -echo "==== Astronaute keystore activated ===="; sleep 2 +echo "==== Astronaute keystore switch ===="; sleep 2 [[ ! -d ~/.ipfs/keystore.astrXbian ]] && mv ~/.ipfs/keystore ~/.ipfs/keystore.astrXbian || rm ~/.ipfs/keystore ln -s ~/.zen/game/players/$PLAYER/keystore ~/.ipfs/keystore -echo "==== linking G1 Libre ID to Station ===="; sleep 2 +echo "==== linking G1 Libre ID and Station ~/.zen/ipfs ===="; sleep 2 [[ ! -f ~/.zen/secret.dunikey.astrXbian ]] && mv ~/.zen/secret.dunikey ~/.zen/secret.dunikey.astrXbian || rm ~/.zen/secret.dunikey ln -s ~/.zen/game/players/$PLAYER/secret.dunikey ~/.zen/secret.dunikey + [[ ! -d ~/.zen/ipfs.astrXbian ]] && mv ~/.zen/ipfs ~/.zen/ipfs.astrXbian && echo "BACKUP ~/.zen/ipfs.astrXbian" || rm ~/.zen/ipfs + ln -s ~/.zen/game/players/$PLAYER/ipfs ~/.zen/ipfs && echo "$PLAYER ~/.zen/ipfs " echo diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index 7bdfe302..d7995ae3 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -194,9 +194,9 @@ else fi -qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.PLAYERNS.png" "$PLAYERNS" -qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.MOANS.png" "$MOANS" -qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.QOOPNS.png" "$QOOPNS" +qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.PLAYERNS.png" "/ipns/$PLAYERNS" +qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.MOANS.png" "/ipns/$MOANS" +qrencode -s 6 -o "$HOME/.zen/game/players/$PLAYER/QR.QOOPNS.png" "/ipns/$QOOPNS" echo; echo "Création de vos QR codes IPNS, clefs de votre réseau IPFS."; sleep 1 diff --git a/tools/get_tagcloud_data.sh b/tools/get_tagcloud_data.sh index 858861f7..600fa85d 100755 --- a/tools/get_tagcloud_data.sh +++ b/tools/get_tagcloud_data.sh @@ -23,18 +23,6 @@ for player in $(ls ~/.zen/game/players/); do moans=$(cat ~/.zen/game/players/$player/.moans) pseudo=$(cat ~/.zen/game/players/$player/.pseudo) - # CHECK DIFFERENCES FROM LATEST TIME CHECK - ## GETTING LAST 'player_moa' ONLINE VERSION - ipfs cat /ipns/$moans > ~/.zen/game/players/$player/moa/index.html - IPUSH=$(ipfs add -Hq ~/.zen/game/players/$player/moa/index.html | tail -n 1) - - # Avance la blockchain CAPTAIN pour archiver les '$player.moa.chain' des Etats modifiés - [[ $(cat ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain 2>/dev/null) != "$IPUSH" ]] &&\ - echo $IPUSH > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.chain && \ - echo $MOATS > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.ts && \ - MODIF=$(cat ~/.zen/game/players/$CAPTAIN/moa/$player.moa.n) && MODIF=$((MODIF+1)) || MODIF=1 && \ - echo $MODIF > ~/.zen/game/players/$CAPTAIN/moa/$player.moa.n - echo "$player 'moa' UPDATE : $MOATS $IPUSH" && \ DATA="$DATA { name: '"${pseudo}"', link: '"/ipns/${moans}"', weight: "$(cat ~/.zen/game/players/$CAPTAIN/moa/$player.moa.n)", tooltip: '"${player}"' }," done