forked from axiom-team/ssb-g1-tip
16 lines
594 B
Bash
16 lines
594 B
Bash
|
#!/bin/bash
|
||
|
# This script creates ~/.ssb/secret.dunikey from your scuttlebutt secret
|
||
|
# You can use it https://cesium.app / https://silkaj.duniter.org/
|
||
|
# Python API https://pypi.org/project/duniterpy/
|
||
|
rm -f ~/.ssb/secret.dunikey
|
||
|
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 <<EOF
|
||
|
Type: PubSec
|
||
|
Version: 1
|
||
|
pub: $g1pub
|
||
|
sec: $g1priv
|
||
|
EOF
|