Skip to content

[Suggestion] Show how to programatically pass a password to an encrypted wallet using the Bittensor SDK #163

@chideraao

Description

@chideraao

From @basfroman:

recently, I've been asked several times how to programmatically pass a password for encrypted wallet keypair (cold or hotkey), eliminating the need to enter it manually.
I searched the documentation and realized we don't have any articles on how to use the Keyfile.save_password_to_env method.
It would be nice to have some of doc about it, if we don't have one.
Related methods and functions:
keyfile.Keyfile.save_password_to_env - storing provided password as encrypted text to local env variable related with specific keyfile. env var name cab be retrived by keyfile.Keyfile.env_var_name method.
keyfile.Keyfile.remove_password_from_env - removing assosiate local env variable with stored password
keyfile.Keyfile.env_var_name - returns the name of associated local env variable
keyfile.get_password_from_environment - returns decrypted password from provided local env variable if it were stored

I'm not pressuring you, but if we have such an doc, it would help users understand how to interact with encrypted keypair.
Let me know if you decide to create this document and need some help navigating the related logic. I would be very happy to help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions