~/.zen/tag/${AAH}/CONTRACT.sh
This commit is contained in:
parent
959852e046
commit
51e31038e5
|
@ -216,9 +216,12 @@ echo "
|
|||
&& echo "$ZENSOURCE ALREADY COPIED IN IPFS SWARM. CANCEL" && exit 1
|
||||
# NO DUPLICATE
|
||||
|
||||
# ADD PASSENGER TO IPFS
|
||||
IPASSENGER=$(ipfs add -q "$PASSENGER" -w | tail -n 1)
|
||||
|
||||
echo "ADDING TO IPFS................."
|
||||
# ADD PASSENGER TO IPFS # COULD BE SUPER LONG !!!
|
||||
IPASSENGER=$(ipfs add -q "$PASSENGER" -w | tail -n 1)*
|
||||
# TODO COMPARE DISK WRITING SPEED AND AVAILABLE SPACE TO CHOOSE BEST IN SWARM
|
||||
echo "......................... YES /ipfs/$IPASSENGER"
|
||||
|
||||
echo "$IPASSENGER" > ~/.zen/tag/${AAH}/_passenger.ipfs
|
||||
# GET FILE NAME
|
||||
PASSENGERNAME=$(basename -- "$PASSENGER")
|
||||
|
@ -256,25 +259,29 @@ ipfs get -o /tmp \"/ipfs/$IPASSENGER/$PASSENGERNAME\" && vlc \"/tmp/$PASSENGERNA
|
|||
|
||||
"
|
||||
|
||||
cat > ~/.zen/tag/${AAH}/_passenger.contract.sh <<EOF
|
||||
cat > ~/.zen/tag/${AAH}/CONTRACT.sh <<EOF
|
||||
#!/bin/bash
|
||||
# THIS CODE INITIATE A CONTRACT
|
||||
# ASK to "_ipfs.node.creator" (send ZenTag or G1TX)
|
||||
echo "New Contract (hit ENTER)"
|
||||
read
|
||||
# Version 0.0
|
||||
{
|
||||
echo
|
||||
'# THIS CODE INITIATE A CONTRACT
|
||||
# Established by/with _ipfs.node.creator
|
||||
# Gives Access SSB friend + IPFS Swarm allowance to read ipfs link
|
||||
|
||||
echo "To get access to file : $PASSENGERNAME
|
||||
- Send $READ Zen to $ipfsnodeid with $PASSENGERNAME in comment
|
||||
Once payment received. You will get a SSB message containing your key"
|
||||
#In order io get access file : $PASSENGERNAME
|
||||
#You must execute that code.
|
||||
# ..... TODO ......
|
||||
# It is bash or javascript or python
|
||||
# or any language code with connection with g1, ipfs or ssb
|
||||
|
||||
# so it create a "_passenger.ipfs.NodeN.crypt"
|
||||
# ADD NodeN as a consumer (each new listener is a relative partners)
|
||||
# Each day File will pay each BB key owners
|
||||
# By one
|
||||
#
|
||||
# or Send $READ Zen to $g1pub with $PASSENGERNAME in comment
|
||||
# .... TODO ....
|
||||
|
||||
# Once contract is validated
|
||||
# NodeN will be able to decrypt _passenger.ipfs.NodeN.crypt'
|
||||
|
||||
exit 0
|
||||
}
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue