forked from qwerwon/SGBL_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (24 loc) · 1011 Bytes
/
main.py
File metadata and controls
30 lines (24 loc) · 1011 Bytes
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
from interface import Interface
from key import Key
from block import Block
from transaction import Transaction
from utxo import UTXOset
def main():
# init Block UTXO set Transction
####################################################################################################################
Block.initialize()
UTXOset.initialize()
Transaction.initialize()
# Key generation
####################################################################################################################
privateKey = Key().keyPairGenerate()
print('My public key :')
print(bytes(bytearray(privateKey.pubkey.serialize(compressed=False))).hex())
print('My private key :')
print(bytes(bytearray(privateKey.private_key)).hex())
# Command line interface
####################################################################################################################
interface = Interface()
interface.cmdloop()
if __name__ == '__main__':
main()