iceland2k14 / secp256k1

Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation
MIT License
112 stars 56 forks source link

please check how privatekey_to_h160 works #2

Closed Noname400 closed 2 years ago

Noname400 commented 3 years ago

Hello please check how privatekey_to_h160 works

m/0'/1'/9 world evolve cry outer garden common differ jump few diet cliff lumber bd85556143de177ed9781ac3b24ba33d0bc4f8d6f34d9eaa1d9b8ab0ee3a7e84d42638b520043234bcedb4e869464b9f964e7e8dbf1588395f7a7782588ae664 dbb4ccf92b0a0742016c915585864a8261994ec2 | 1DMtkFF6J1abNqgVmpL5WtZZkcJtaCeW7d | 42a38914e258e63e4baaff51a62d61df0236f6d1 | 1DFWG8gL7jqRdwCogdKhXC9FRXuRb5Ed7X |

iceland2k14 commented 3 years ago

Example....... ice.privatekey_to_address(0, False, 0x5562f) : '1HKN3PCv1QM5jAewhSoRDu3ecwA8KYeSpH'
ice.privatekey_to_address(0, True, 0x5562f) : '15tNpJpcZ5hbMNkQQfEpyNqKCe9uvGZY1Y'
ice.privatekey_to_h160(0, False, 0x5562f).hex() : 'b2fb10668c3e58c49c8292436503819abf35ee69'
ice.privatekey_to_h160(0, True, 0x5562f).hex() : '3597ed8f4787fdab2750324dc3e10d5bab0c37f3'

Noname400 commented 3 years ago

Thanks for the great library. she is excellent. 0x5562f - what is it?

iceland2k14 commented 3 years ago

0x5562f is Just a example Privatekey Key

Noname400 commented 3 years ago

bb = 29020650575839879017850673027181372401996640854786846585452941887353628706644 bip44_h160_c = privatekey_to_h160(0, True, bb) print(bip44_h160_c) addr = privatekey_to_address(0, True, bb) #1159hoiH2iUyQQy4tSbyFNWkUZ4YVeE1dS / True print(addr) addr2 = hash_to_address(0, True, bip44_h160_c) print(addr2)

ADDR2 - displays different addresses. and they do not match the normal ADDR - work OK!

iceland2k14 commented 3 years ago

Thanks for the feedback.