-
Notifications
You must be signed in to change notification settings - Fork 170
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
Adding multisig capabilities to wallet #279
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
biryukovmaxim
force-pushed
the
feat-multisig-wallet
branch
3 times, most recently
from
September 13, 2023 16:01
5d7c30c
to
3c67a9d
Compare
biryukovmaxim
force-pushed
the
feat-multisig-wallet
branch
4 times, most recently
from
September 20, 2023 09:47
7e15a73
to
a376602
Compare
biryukovmaxim
changed the title
Feat multisig wallet
Adding multisig capabilities to wallet
Sep 20, 2023
biryukovmaxim
force-pushed
the
feat-multisig-wallet
branch
2 times, most recently
from
October 6, 2023 08:37
f72cc96
to
c75844a
Compare
biryukovmaxim
force-pushed
the
feat-multisig-wallet
branch
from
October 9, 2023 20:36
c75844a
to
915d6cb
Compare
Introduced logic for creating MultiSig accounts including multisig account arguments and logic to execute and create a multisig account, and the update of existing variables for multisig accounts. Removed initial warning which stated MultiSig accounts are not supported. Also added a new file for 'as_slice' functionality. This update provides a valuable addition to wallet functionality by allowing multiple signatures for account access, greatly enhancing security.
Updated wallet core and CLI to support the creation of multisig accounts. New error types were added to cater to potential failures during this operation. Added a new 'multisig' account type to the CLI. The functionality to filter accounts based on their private key data was reworked to accommodate multisig accounts. Moreover, logic to create a multisig address was incorporated into the derivation module. The use of multisig addresses also required storage updates and changes in the runtime configuration. Also, the creation wizard in the CLI was updated to include promotional messages regarding multisig addresses.
Errors while getting the manager keys in the wallet derivation module are now properly handled. Instead of a potential panic when a `None` value was encountered, a more error-resilient approach is used. This improves error management and the overall robustness of the key derivation process.
This commit extends the import feature of the wallet by adding support for multi-signature accounts. The updated functionality allows users to import multi-signature wallets using mnemonics and an optional payment password, and adjust the number of required signatures to finalize transactions.
The 'payment_secret' field has been removed from the MultisigCreateArgs structure and all associated logic in wallet.rs and account.rs. This change is made to simplify the account creation process as the 'payment_secret' was optional and it was causing confusion. Now the account creation relies solely on prv_key_data_ids, making the flow more straightforward and user-friendly.
This commit adds the ability to export MultiSig accounts in the Kaspa CLI. Previously, only SingleKey accounts were supported for export. This update adds conditions to check the kind of account (via the account_kind() method) before proceeding with the export process. For MultiSig accounts, the export_multisig_account function is invoked which retrieves the private key data IDs, asks for the wallet password and prints the required number of signatures and all associated mnemonics. If additional xpub_keys are found, they will also be printed. This change allows users to backup their MultiSig account data as conveniently as for SingleKey accounts, improving the CLI's functionality. The MultiSig struct has been updated to expose the necessary fields for this feature.
To improve readability and maintainability, MultiSig struct instances creation scattered in different places are now replaced with a new factory method `MultiSig::new()`. Other changes include reduction of redundant struct declaration and removed the Debug trait from the Secret struct.
biryukovmaxim
force-pushed
the
feat-multisig-wallet
branch
from
October 13, 2023 01:37
915d6cb
to
ca74b14
Compare
aspect
approved these changes
Oct 26, 2023
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.
As I have been following this development, everything looks good. Merging so that we can continue the integration of this codebase against other ongoing work in the wallet.
smartgoo
pushed a commit
to smartgoo/rusty-kaspa
that referenced
this pull request
Jun 18, 2024
* Create MultiSig account functionality Introduced logic for creating MultiSig accounts including multisig account arguments and logic to execute and create a multisig account, and the update of existing variables for multisig accounts. Removed initial warning which stated MultiSig accounts are not supported. Also added a new file for 'as_slice' functionality. This update provides a valuable addition to wallet functionality by allowing multiple signatures for account access, greatly enhancing security. * "Add multisig account creation support to wallet core and CLI" Updated wallet core and CLI to support the creation of multisig accounts. New error types were added to cater to potential failures during this operation. Added a new 'multisig' account type to the CLI. The functionality to filter accounts based on their private key data was reworked to accommodate multisig accounts. Moreover, logic to create a multisig address was incorporated into the derivation module. The use of multisig addresses also required storage updates and changes in the runtime configuration. Also, the creation wizard in the CLI was updated to include promotional messages regarding multisig addresses. * Improve error handling in key derivation Errors while getting the manager keys in the wallet derivation module are now properly handled. Instead of a potential panic when a `None` value was encountered, a more error-resilient approach is used. This improves error management and the overall robustness of the key derivation process. * "Add multi-signature account import functionality to wallet" This commit extends the import feature of the wallet by adding support for multi-signature accounts. The updated functionality allows users to import multi-signature wallets using mnemonics and an optional payment password, and adjust the number of required signatures to finalize transactions. * Remove payment secret from multi-signature accounts The 'payment_secret' field has been removed from the MultisigCreateArgs structure and all associated logic in wallet.rs and account.rs. This change is made to simplify the account creation process as the 'payment_secret' was optional and it was causing confusion. Now the account creation relies solely on prv_key_data_ids, making the flow more straightforward and user-friendly. * "Add support for exporting MultiSig account" This commit adds the ability to export MultiSig accounts in the Kaspa CLI. Previously, only SingleKey accounts were supported for export. This update adds conditions to check the kind of account (via the account_kind() method) before proceeding with the export process. For MultiSig accounts, the export_multisig_account function is invoked which retrieves the private key data IDs, asks for the wallet password and prints the required number of signatures and all associated mnemonics. If additional xpub_keys are found, they will also be printed. This change allows users to backup their MultiSig account data as conveniently as for SingleKey accounts, improving the CLI's functionality. The MultiSig struct has been updated to expose the necessary fields for this feature. * Refactor MultiSig creation to factory method To improve readability and maintainability, MultiSig struct instances creation scattered in different places are now replaced with a new factory method `MultiSig::new()`. Other changes include reduction of redundant struct declaration and removed the Debug trait from the Secret struct. --------- Co-authored-by: aspect <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add functionality of creating, importing, exporting multisig wallet