ofek / bit

Bitcoin made easy.
https://ofek.dev/bit/
MIT License
1.25k stars 216 forks source link

Can't get balance and public key calculated wrong? #164

Open eriktlu opened 2 years ago

eriktlu commented 2 years ago

I am quite new to this but the documentation seemed quite straightforward so I don't understand where did I mess up or what's happening here.

from bit import PrivateKey

key = PrivateKey('PrivateKeyFromExodusWallet')

print(key.address)
print(key.get_balance('btc'))
print(key.balance)

The address that is shown is wrong. My actual address for that private key: bc1qx34ptd6jldlge63tk5cvvfksg9dj8x8ehvtys9 What the print shows: 15n9DswZzpYZ6QyNzToUtZinbQB3jUdGTS

Balance is also 0 but shouldn't be. I am using Exodus wallet. I can't see where I messed up here so can someone please help me out?

b0r1ngx commented 2 years ago

I'm faced with problem like this too!

@eriktlu do you solved it, with this library or other?

Please answer admins (@mgaitan , @ofek , @b-kelly , @philsippl ), or @eriktlu