File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ import os
2
+ from cryptofuzz import Convertor , Generator
3
+
4
+ conv = Convertor ()
5
+ gen = Generator ()
6
+
7
+ # generate byte
8
+ byte = os .urandom (32 )
9
+ # convert Byte To wif
10
+ wif = conv .bytes_to_wif (byte )
11
+ # wif to mnemonic
12
+ mnemonic = conv .wif_to_mne (wif )
13
+ # Convert Wif To Hex
14
+ privatekey = conv .wif_to_hex (wif )
15
+ # Convert bytes To WIF Uncompress
16
+ wif_uncompress = conv .bytes_to_wif (byte , False )
17
+ # Convert Wif To Decimal Number
18
+ dec = conv .wif_to_int (wif )
19
+ # Convert Wif To Binary
20
+ binary_str = conv .wif_to_binary (wif )
21
+ # Convert Wif To xprv
22
+ xprv = conv .wif_to_xprv (wif )
23
+ # Convert Wif To xpub
24
+ xpub = conv .wif_to_xpub (wif )
25
+ # Convert Wif To compress address
26
+ compress_address = conv .wif_to_addr (wif , True )
27
+ # Convert Wif To uncompress address
28
+ uncompress_address = conv .wif_to_addr (wif , False )
29
+ # Output
30
+ print ('Private key' , privatekey )
31
+ print ('Mnemonic' , mnemonic )
32
+ print ('Compress address' , compress_address )
33
+ print ('Uncompress address' , uncompress_address )
34
+ print ('Wif' , wif )
35
+ print ('WIF uncompress' , wif_uncompress )
36
+ print ('Dec' , dec )
37
+ print ('Binary' , binary_str )
38
+ print ('XPRV' , xprv )
39
+ print ('XPUB' , xpub )
You can’t perform that action at this time.
0 commit comments