opentensor / btwallet

MIT License
4 stars 1 forks source link

return encrypted password, remove debug #55

Open roman-opentensor opened 2 hours ago

roman-opentensor commented 2 hours ago

You can store your password with the following code:

from bittensor_wallet import Wallet

my_wallet = Wallet()

# the same approach you can use `for hotkey_file` if this is encrypted.
boolean_result = my_wallet.coldkey_file.save_password_to_env("mypassword")

In bittensor-wallet version 2.0.2 method save_password_to_env returns True in successful case and False if something wrong. I gonna replace the return result to encrypted password. Then you can get it like this:

from bittensor_wallet import Wallet

my_wallet = Wallet()

my_encrypted_password = my_wallet.coldkey_file.save_password_to_env("mypassword")