1- import iroha
1+ import iroha2
22
3- key_pair1 = iroha .KeyPair .from_json ("""
3+ key_pair1 = iroha2 .KeyPair .from_json ("""
44{
55 "public_key": "ed01205113952DCE80063E467AFEE17D95363A558982A5AE250D221E29933CE73B79FE",
66 "private_key": "80262082E3965D74D8244C8D3CD4EE9C8C4D6C1959B051ECB48B07DE425329F94AD295"
77}
88""" )
99
10- key_pair2 = iroha .KeyPair .random ()
10+ key_pair2 = iroha2 .KeyPair .random ()
1111
1212print ("kp1 =" , key_pair1 )
1313print ("kp2 =" , key_pair2 )
1414
15- key_pair3 = iroha .KeyPair .from_hex_seed ("001122" )
15+ key_pair3 = iroha2 .KeyPair .from_hex_seed ("001122" )
1616
17- key_pair4 = iroha .KeyPair .from_private_key (key_pair2 .private_key )
17+ key_pair4 = iroha2 .KeyPair .from_private_key (key_pair2 .private_key )
1818
1919# kp2 and kp4 should have the same value
2020
2424
2525# Different algorithms are supported
2626
27- print ("kp using Ed25519 =" , iroha .KeyPair .random_with_algorithm ("Ed25519" ))
28- print ("kp using Secp256k1 =" , iroha .KeyPair .random_with_algorithm ("Secp256k1" ))
29- print ("kp using BlsNormal =" , iroha .KeyPair .random_with_algorithm ("BlsNormal" ))
30- print ("kp using BlsSmall =" , iroha .KeyPair .random_with_algorithm ("BlsSmall" ))
27+ print ("kp using Ed25519 =" , iroha2 .KeyPair .random_with_algorithm ("Ed25519" ))
28+ print ("kp using Secp256k1 =" , iroha2 .KeyPair .random_with_algorithm ("Secp256k1" ))
29+ print ("kp using BlsNormal =" , iroha2 .KeyPair .random_with_algorithm ("BlsNormal" ))
30+ print ("kp using BlsSmall =" , iroha2 .KeyPair .random_with_algorithm ("BlsSmall" ))
0 commit comments