#!/bin/bash ################################################################################ # Authors: # [@cel](@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519) # [@Fred](@9BbJwPDjcyIqrOUPNn0nJZBduWdIrpMk3Cjz5MP361s=.ed25519) # [@Boris](@l5nYExWYIgDLV6BYHOJPoI97jIUyTdSm8CTLpQ0XeOg=.ed25519) # [@poka]() # Version: 1.0.1 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ########################################################################################### # ADD G1 Layer 10 LOVE to message writer you like ! # INSTALL silkaj sbotc # PREVENT DOUBLE PAYEMENT ############################################################################################ # INSTALL requirements [[ ! $(which base58) ]] && sudo apt install build-essential base58 -y # INSTALL Silkaj, CLI for Duniter if [[ ! $(which silkaj) ]]; then echo "INSTALL silkaj" sudo apt update || true sudo apt install python3-pip python3-setuptools python3-wheel -y && pip3 install silkaj --user echo 'PATH=$PATH:.local/bin' >> ~/.bashrc && source ~/.bashrc fi # INSTALL sbotc if [[ ! $(which sbotc) ]]; then sudo apt install libsodium-dev jq -y git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc cd sbotc make sudo make install fi ########################################################################################### ####################### G1 SSB ACCOUNT MANAGER ############################################ ########################################################################################### # If user already has an SSB account, we generate Duniter secret key from SSB secret key if [[ -f ~/.ssb/secret ]]; then ssbpub=$(cat ~/.ssb/secret | grep public\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) ssbpriv=$(cat ~/.ssb/secret | grep private\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) g1pub=$(echo $ssbpub | base64 -d | base58) g1priv=$(echo $ssbpriv | base64 -d | base58) cat > ~/.ssb/secret.dunikey < ~/.ssb/secret <