#!/bin/bash ################################################################################ # Author: Fred (support@qo-op.com) # Version: 1.0 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ########################################################################################### # This script convert secret.dunikey into ~/.ssb/secret.ssb DUNKEYFILE="$1" [[ ! ${DUNIKEYFILE} ]] && DUNKEYFILE="./secret.dunikey" [[ ! ${DUNIKEYFILE} ]] && DUNKEYFILE="~/.ssb/secret.dunikey" [[ ! -f ${DUNIKEYFILE} ]] && exit pub=$(cat ${DUNIKEYFILE} | grep "pub" | cut -d ' ' -f 2) priv=$(cat ${DUNIKEYFILE} | grep "sec" | cut -d ' ' -f 2) ssbpub=$(echo $pub | base58 -d | base64) ssbpriv=$(echo $priv | base58 -d | base64) cat > ~/.ssb/secret.ssb <