You are viewing a single comment's thread from:

RE: WalletLocked exceptions in beempy?

in HiveDevs2 years ago

I believe the getAccountFromPrivateKey method is for interacting with the built-in Beempy wallet . I dont believe this method will work on the public nodes. The blockchain stores the public key that matches your private posting key. You may need to write up your own function that will convert your private posting key to a public key and query the public node to obtain the user account. I haven't tested that theory so i am just spit-balling at the moment.
To overcome the exception your receiving, you will need to unlock the wallet using wallet.unlock("supersecret-passphrase") . I was recently experimenting with the unlock function. Here's the code I was using .

from beem import Hive
hive = Hive()
hive.wallet.wipe(True)
hive.wallet.unlock("test")