proto zen contracts in zenMake
This commit is contained in:
parent
f9fc6148aa
commit
7c9e0182d3
|
@ -249,26 +249,16 @@ ipfs get -o /tmp \"/ipfs/$IPASSENGER/$PASSENGERNAME\" && vlc \"/tmp/$PASSENGERNA
|
||||||
|
|
||||||
cat > ~/.zen/tag/${AAH}/_passenger.contract.sh <<EOF
|
cat > ~/.zen/tag/${AAH}/_passenger.contract.sh <<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# THIS CODE EXECUTE CONTRACT AND DECODE IPFS LINK.
|
# THIS CODE INITIATE A CONTRACT
|
||||||
BB="$1"
|
# ASK to "_ipfs.node.creator" to create a "_passenger.ipfs.NodeN.crypt"
|
||||||
[[ "$BB" == "" ]] && echo "ERRROR You need a BB Key to decode your ipfs link to $PASSENGERNAME" && exit 1
|
# ADD NodeN as a consumer (first are partners)
|
||||||
# TODO ADD ZEN PAYMENT and Init P2P contract...
|
# By one
|
||||||
openssl aes-256-cbc -pbkdf2 -k \"$BB\" -d -salt -in ~/.zen/tag/\"${AAH}\"/_passenger.ipfs.BB.aes -out /tmp/_passenger.ipfs
|
#
|
||||||
ipfs get -o /tmp \"/ipfs/$IPASSENGER/$PASSENGERNAME\" && vlc \"/tmp/$PASSENGERNAME\" 2>/dev/null
|
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# if [[ -d $PASSENGER ]]; then # NO FILE BY FILE IS BETTER...?!
|
|
||||||
########################################################################
|
|
||||||
# TODO # tar.gz and encrypt a whole directory #
|
|
||||||
# tar -zcf - directory | openssl aes-128-cbc -pbkdf2 -k "$BB" -salt -out directory.tar.gz.aes # Encrypt
|
|
||||||
# openssl aes-128-cbc -pbkdf2 -k "$BB" -d -salt -in directory.tar.gz.aes | tar -xz -f - # Decrypt
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
# Copy TAG into IPFS + ipfs name publish -k ${AA}.key
|
# Copy TAG into IPFS + ipfs name publish -k ${AA}.key
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
Loading…
Reference in New Issue