From b4d15e953de75c5e2f12fd7c693eb8319f93ea49 Mon Sep 17 00:00:00 2001 From: Boris Paing Date: Sat, 14 Mar 2020 22:59:58 +0100 Subject: [PATCH 1/2] Authors --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index f7310af..847f9b2 100644 --- a/readme.md +++ b/readme.md @@ -9,9 +9,9 @@ SSB/Ğ1 like ## Authors -- @cel from the SSB community (`@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519`) -- @Fred from the Ğ1 community (`@9BbJwPDjcyIqrOUPNn0nJZBduWdIrpMk3Cjz5MP361s=.ed25519`) -- @Boris from the Ğ1 community (`@l5nYExWYIgDLV6BYHOJPoI97jIUyTdSm8CTLpQ0XeOg=.ed25519`) +- **cel** from the SSB community (`@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519`) +- **Fred** from the Ğ1 community (`@9BbJwPDjcyIqrOUPNn0nJZBduWdIrpMk3Cjz5MP361s=.ed25519`) +- **Boris** from the Ğ1 community (`@l5nYExWYIgDLV6BYHOJPoI97jIUyTdSm8CTLpQ0XeOg=.ed25519`) ## What is a libre currency? From dffa13b9d4a55f80b71cb9fa56c159a5a5ec7398 Mon Sep 17 00:00:00 2001 From: Boris Paing Date: Sat, 14 Mar 2020 23:22:27 +0100 Subject: [PATCH 2/2] Cargo and DUP-Mnemonic not needed if SSB secret already exists --- install.sh | 74 ++++++++++---------- process-likes-g1-install.sh | 133 ------------------------------------ 2 files changed, 39 insertions(+), 168 deletions(-) delete mode 100644 process-likes-g1-install.sh diff --git a/install.sh b/install.sh index adf83e4..ce3425f 100755 --- a/install.sh +++ b/install.sh @@ -16,14 +16,7 @@ # INSTALL requirements [[ ! $(which base58) ]] && sudo apt install build-essential base58 -y -# INSTALL Cargo -if [[ ! $(which cargo) ]]; then - curl https://sh.rustup.rs -sSf | sh - PATH=$PATH:~/.cargo/env - source $HOME/.cargo/env -fi - -# INSTALL silkaj +# INSTALL Silkaj, CLI for Duniter if [[ ! $(which silkaj) ]]; then echo "INSTALL silkaj" sudo apt update || true @@ -45,6 +38,41 @@ 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 < ~/.ssb/secret.dunikey <> ~/.bashrc && source ~/.bashrc -fi - - -# INSTALL build-essential - -if ! dpkg -s build-essential; then - sudo apt install build-essential -y -fi - -# INSTALL sbotc -if ! fn_exists 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 <