stargates are 5 shared ipns keys exchanged by friends related to stars.level

This commit is contained in:
fred 2021-09-18 16:13:19 +02:00
parent 086011ae29
commit e441068471
2 changed files with 95 additions and 94 deletions

View File

@ -50,7 +50,7 @@ for FRIEND in $(ls ~/.zen/ipfs/.$IPFSNODEID/FRIENDS); do
echo "~/.zen/ipfs/.$IPFSNODEID/KEY/$MEDIAKEY/$G1PUB/$FRIEND/"
## No swarm or local MEDIAKEY, we are the first $MEDIAKEY creator in the swarm
[[ ! $ISKEY ]] && echo "Creating $MEDIAKEY.4FRIENDS IPNS key" && IPNSKEY=$(ipfs key gen "$MEDIAKEY.4FRIENDS") && IPNSKEYFILE=$(ls -t ~/.ipfs/keystore/ | head -n 1)
[[ ! $ISKEY ]] && echo "Creating $MEDIAKEY.4FRIENDS IPNS key" && IPNSKEY=$(ipfs key gen "$MEDIAKEY.4FRIENDS") && IPNSKEYFILE=$(~/.zen/astrXbian/zen/tools/give_me_keystore_filename.py "$MEDIAKEY.4FRIENDS")
## Sending encrypted MEDIAKEY to my swarm (sign if you want more security, but code ipfs signature verification is enough and better)
if [[ ! -d ~/.zen/ipfs/.$IPFSNODEID/KEY/$MEDIAKEY/$G1PUB/$FRIEND/ ]]; then

View File

@ -26,6 +26,7 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
########################################################################
if [[ ! $(ipfs key list -l | grep "star_") ]]; then
[[ ! -d ~/.zen/key/ ]] && mkdir -p ~/.zen/key/1 ~/.zen/key/2 ~/.zen/key/3 ~/.zen/key/4 ~/.zen/key/5
# TODO key name are always the same... =$(~/.zen/astrXbian/zen/tools/give_me_keystore_filename.py "star_1")
stargate_1=$(ipfs key gen star_1) && key_1=$(ls -t ~/.ipfs/keystore/ | head -n 1) && cp ~/.ipfs/keystore/$key_1 ~/.zen/key/1/ && echo "$stargate_1" > ~/.zen/key/1/stargate
stargate_2=$(ipfs key gen star_2) && key_2=$(ls -t ~/.ipfs/keystore/ | head -n 1) && cp ~/.ipfs/keystore/$key_2 ~/.zen/key/2/ && echo "$stargate_2" > ~/.zen/key/2/stargate
stargate_3=$(ipfs key gen star_3) && key_3=$(ls -t ~/.ipfs/keystore/ | head -n 1) && cp ~/.ipfs/keystore/$key_3 ~/.zen/key/3/ && echo "$stargate_3" > ~/.zen/key/3/stargate