diff --git a/.install/scuttlebutt.sh b/.install/scuttlebutt.sh index 243d868..eef40ee 100755 --- a/.install/scuttlebutt.sh +++ b/.install/scuttlebutt.sh @@ -19,13 +19,16 @@ scuttlebutt() { cd ~/.ssb_astroport ### Install module in ~/.ssb_astroport/node_modules - npm install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query + npm install sodium-native ssb-backlinks ssb-ws ssb-links ssb-query ssb-secret-blob ssb-private npm install -g ssb-server # Move node_modules with ssb-server (why do I have to do that?) ssbSERVER=$(which ssb-server) - node_modules_path=$(echo $ssbSERVER | sed s/bin\\/ssb-server/lib/) - mv ~/.ssb_astroport/node_modules/* $node_modules_path/node_modules/ + node_bin_path=$(dirname $ssbSERVER) + node_lib_path=$(dirname $ssbSERVER | sed s/bin/lib/) + mv ~/.ssb_astroport/node_modules/* $node_lib_path/node_modules/ + # Create sblob symlink + ln -s $node_lib_path/node_modules/ssb-secret-blob/index.js $node_bin_path/sblob fi # TEST ssb-server Install diff --git a/doc/images/astrban.jpg b/doc/images/astrban.jpg new file mode 100644 index 0000000..7b4e243 Binary files /dev/null and b/doc/images/astrban.jpg differ diff --git a/doc/images/astroport1.jpg b/doc/images/astroport1.jpg new file mode 100644 index 0000000..6def8ad Binary files /dev/null and b/doc/images/astroport1.jpg differ diff --git a/doc/images/astroport2.jpg b/doc/images/astroport2.jpg new file mode 100644 index 0000000..130a25f Binary files /dev/null and b/doc/images/astroport2.jpg differ diff --git a/doc/images/astroportlogo4color.png b/doc/images/astroportlogo4color.png new file mode 100644 index 0000000..a892f6b Binary files /dev/null and b/doc/images/astroportlogo4color.png differ diff --git a/doc/images/money_wizard.jpg b/doc/images/money_wizard.jpg new file mode 100644 index 0000000..643237f Binary files /dev/null and b/doc/images/money_wizard.jpg differ diff --git a/doc/images/sucram.jpg b/doc/images/sucram.jpg new file mode 100644 index 0000000..01e54e9 Binary files /dev/null and b/doc/images/sucram.jpg differ diff --git a/ssb-g1like b/ssb-g1like deleted file mode 160000 index b170b48..0000000 --- a/ssb-g1like +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b170b48111484765925b6bb195ef0644ae2fd128 diff --git a/zen/ssb_SURVEY_contact.sh b/zen/ssb_SURVEY_contact.sh index 21289b8..1ec97f7 100755 --- a/zen/ssb_SURVEY_contact.sh +++ b/zen/ssb_SURVEY_contact.sh @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## # Author: Fred (support@qo-op.com) -# Version: 2020.03.21 +# Version: 2020.03.24 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ######################################################################## MY_PATH="`dirname \"$0\"`" # relative diff --git a/zen/ssb_SURVEY_swarmkey.sh b/zen/ssb_SURVEY_swarmkey.sh new file mode 100755 index 0000000..e391fd2 --- /dev/null +++ b/zen/ssb_SURVEY_swarmkey.sh @@ -0,0 +1,96 @@ +#!/bin/bash +######################################################################## +# Author: Fred (support@qo-op.com) +# Version: 2020.03.24 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +######################################################################## +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" +echo ' +######################################################################## +# \\/// +# qo-op +############# '$MY_PATH/$ME' +######################################################################## +# ex: ./'$ME' +# SURVEY received #astroport-swarmkey and inject it to IPFS +######################################################################## _ _ _ _ _ +___ _ _ __ + | |_)|_(_ _ _.._._ _ | _ +_|_| | __) _>\/\/(_|| | | ||<(/_\/ + / + +' + +self=$(sbotc whoami | jq -r .id) || exit 1 +g1self=$(echo $self | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58) +self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"'", "content":{"type":"about", "about": "'"$self"'"}}}}]}' | jq -r .value?.content?.name | grep -v null | tail -n 1) + +ipfsnodeid=$(ipfs id -f='\n') +[[ ! $ipfsnodeid ]] && echo "ERROR ipfs id" && exit 1 + +messages=$(sbotc backlinks.read '{"query":[{"$filter":{"dest":"#test","value":{"content":{"type":"post"}}}}]}') +while read -r msg +do + + autofollow=$(printf %s "$msg" | jq .value.content.autofollow) + [[ ! $autofollow ]] && echo "I am NOT the Pub..." && echo "$msg" | jq && continue + +echo " +___ _______ _ _ ___ ____ + | |\ |\ /| ||_ / / \|\ || /\ / | +_|_| \| \/_|_ ||_ \_\_/| \||/--\\_ | RECEIVED + + +" + author=$(printf %s "$msg" | jq -r .value.author) + g1author=$(printf %s "$msg" | jq -r .value.author | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58) + + # Crypt, ipfs store, send + if [[ -f ~/.ipfs/swarm.key ]]; then + + + mkdir -p ~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author} + + file=~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/ipfs_swarm.key.crypt + $MY_PATH/tools/natools.py encrypt -p ${g1author} -i ~/.ipfs/swarm.key -o ${file} + cp ${file} ~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/ +echo " +$author + +\|/ \|/ \|/ +/|\ /|\ /|\ cyphering swarmkey + +IPFS +~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/ipfs_swarm.key.crypt + +" + + name=${file##*/} + id="$(sbotc blobs.add < "$file")" + type="$(file -b --mime-type "$file")" + size="$(wc -c < "$file")" + +echo " + ______ _ _ _ ____ __ _ _ _ _ _____ + /\ (_ ||_)/ \|_)/ \|_)|__(_\ //\ |_)|\/||/|_\_/ |_)/ \(_ | +/--\__) || \\_/| \_/| \| __)\/\//--\| \| ||\|_ | | \_/__) | + +SSB +#astroport-swarmkey +[$name]($id) +TO.SSB_${author} +TO.G1_${g1author} ++++ +FROM.SSB_${self_name} +FROM.G1_${g1self} +FROM.IPFS_${ipfsnodeid} + +" + + sbotc publish '{"type":"post","text":"#astroport-swarmkey = ['"$name"']('"$id"') TO.SSB_${author} TO.G1_${g1author} +++ FROM.SSB_${self_name} FROM.G1_${g1self} FROM.IPFS_${ipfsnodeid}","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}' + + fi + +done < <(printf '%s\n' "$messages") diff --git a/zen/zen_MAKE.sh b/zen/zen_MAKE.sh index b28c2b7..9ce9054 100755 --- a/zen/zen_MAKE.sh +++ b/zen/zen_MAKE.sh @@ -157,7 +157,7 @@ BBH : $BBH " ####################################################################### # PASSENGER FILE is added to IPFS then link is cyphered -# +# https://beechat.network/how-beechats-encryption-works/ if [[ -f $PASSENGER ]]; then echo " _ _ _ _ _ _ _ _ _