ask for credentials, or run diceware to make a Cesium secret.dunikey, SSB secret and IPFS node ID
This commit is contained in:
parent
a8859ce293
commit
21dbdaf9cf
|
@ -60,12 +60,19 @@ ZENID=\"$salt\"
|
|||
ZENPWD=\"$pepper\" IS :
|
||||
"
|
||||
g1pub=$(cat ~/.zen/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
||||
echo "G1PUB=\"$g1pub\"" >> ~/.zen/secret.astroport.key
|
||||
|
||||
g1priv=$(cat ~/.zen/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
||||
|
||||
# make ScutlleButt secret key
|
||||
ssbpub=$(echo $g1pub | base58 -d | base64)
|
||||
ssbpriv=$(echo $g1priv | base58 -d | base64 | tr -d "\n" )
|
||||
cat > ~/.zen/secret <<EOF
|
||||
{
|
||||
"curve": "ed25519",
|
||||
"public": "${ssbpub}.ed25519",
|
||||
"private": "${ssbpriv}.ed25519",
|
||||
"id": "@${ssbpub}.ed25519"
|
||||
}
|
||||
EOF
|
||||
|
||||
# MODIFY ~/.ipfs/config
|
||||
[[ ! -f ~/.zen/astroport/zen/tools/crypto_pb2.py ]] \
|
||||
|
@ -77,8 +84,10 @@ ssbpriv=$(echo $g1priv | base58 -d | base64 | tr -d "\n" )
|
|||
&& curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py -o ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py \
|
||||
&& chmod +x ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
|
||||
|
||||
echo "execute python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py"
|
||||
# jq '.Identity.PeerID="$PeerID"' ~/.ipfs/config
|
||||
# jq '.Identity.PrivKey="$PrivKey"' ~/.ipfs/config
|
||||
# rm -f /tmp/secret.dunikey
|
||||
python3 ~/.zen/astroport/zen/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py
|
||||
echo "copy the lines and apply that jq commands new ID to your IPFS node"
|
||||
echo "jq '.Identity.PeerID=\"$PeerID\"' ~/.ipfs/config"
|
||||
ech "jq '.Identity.PrivKey=\"$PrivKey\"' ~/.ipfs/config"
|
||||
|
||||
rm -f /tmp/secret.dunikey
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue