-
Notifications
You must be signed in to change notification settings - Fork 6
Support async key implementations #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Release/1.0.6
Release/1.0.7
Release/1.0.8
Release/1.0.9
Release/1.1.0
Will look at this today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I'm happy with this, but just fix the type hints because we support Python 3.9 on this (pipe types were added in 3.10), and update the branch.
Co-authored-by: BD Himes <37844818+thewhaleking@users.noreply.github.com>
Co-authored-by: BD Himes <37844818+thewhaleking@users.noreply.github.com>
Co-authored-by: BD Himes <37844818+thewhaleking@users.noreply.github.com>
Thanks for your review and suggested changes, I've merged them into the branch. Also, I updated the protocol with a Union annotation for the sign() return value, so the async key implementations do no produce type hint errors. |
I'm happy with this, but it keeps failing a test. I need to dig in more. |
This pull request abstracts the Keypair used to sign transactions. This allows the integration of cryptographic backends that require async calls (such as HSMs in cloud environments).
The bittensor_wallet.Keypair type is replaced by a protocol that defines its properties and methods. In
create_signed_extrinsic
it is checked if the result ofsign()
is awaitable, and if so the result isproperly awaited.