-
Notifications
You must be signed in to change notification settings - Fork 647
Expand file tree
/
Copy pathminikey.py
More file actions
executable file
·35 lines (31 loc) · 1.1 KB
/
minikey.py
File metadata and controls
executable file
·35 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
#
# Copyright (C) 2013-2015 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or distributed except according to the terms contained in the
# LICENSE file.
from __future__ import absolute_import, division, print_function, unicode_literals
from bitcoin.minikey import decode_minikey
def parser():
import argparse
parser = argparse.ArgumentParser(
description='Decode a minikey to base58 format.',
epilog='Security warning: arguments may be visible to other users on the same host.')
parser.add_argument(
'minikey',
help='the minikey')
return parser
if __name__ == '__main__':
args = parser().parse_args()
try:
secret_key = str(decode_minikey(args.minikey))
print(secret_key)
except Exception as error:
print('%s: %s' % (error.__class__.__name__, str(error)))
exit(1)