From 5c65c8fb55a92928db09d9887acb296bc65d2b49 Mon Sep 17 00:00:00 2001 From: poka Date: Tue, 8 Dec 2020 18:01:42 +0100 Subject: [PATCH] Add tool to convert ipfs ID to pubkey --- zen/tools/ipfs_to_g1.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 zen/tools/ipfs_to_g1.py diff --git a/zen/tools/ipfs_to_g1.py b/zen/tools/ipfs_to_g1.py new file mode 100755 index 0000000..f34b750 --- /dev/null +++ b/zen/tools/ipfs_to_g1.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import sys, base58 + +ID = sys.argv[1] +hexFmt = base58.b58decode(ID) +noTag = hexFmt[6:] +b58Key = base58.b58encode(noTag).decode() + +print(b58Key)