Skip to content
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

Tidy up of wallet locking and password RPC commands #3756

Open
dsiganos opened this issue Mar 21, 2022 · 2 comments
Open

Tidy up of wallet locking and password RPC commands #3756

dsiganos opened this issue Mar 21, 2022 · 2 comments
Assignees
Labels
rpc Changes related to Remote Procedure Calls
Milestone

Comments

@dsiganos
Copy link
Contributor

dsiganos commented Mar 21, 2022

Tidy up of wallet locking and password RPC commands.
The following should be done:

  • password_valid: deprecated in favor of existing wallet_locked (which implies there is a valid password existing already)
  • wallet_key_valid: deprecated in favor of existing wallet_locked (which implies there is a valid password existing already)
  • password_change: deprecated in favor of new alias wallet_password_set
  • password_enter: deprecated in favor of new alias wallet_unlock
@dsiganos dsiganos self-assigned this Mar 21, 2022
@dsiganos dsiganos changed the title RPC command wallet_key_valid is undocumented and redundant Tidy up of wallet locking and password RPC commands Mar 22, 2022
@dsiganos dsiganos added the rpc Changes related to Remote Procedure Calls label Mar 22, 2022
@dsiganos
Copy link
Contributor Author

Example use case:
Set a password for a wallet with wallet_password_set
Lock a wallet (using the password set above) with wallet_lock
Unlock a wallet with wallet_unlock
Check if a wallet is locked with wallet_locked

@zhyatt zhyatt added this to the V24.0 milestone Mar 22, 2022
@zhyatt
Copy link
Collaborator

zhyatt commented Mar 22, 2022

@dsiganos After further review, the password_valid/wallet_key_valid calls will return "valid":"0" if there is no password set on the wallet. That information is not otherwise available so we need to consider whether it should be kept in some form, as wallet_lock currently returns "locked":"1" even when no password is not set (and the wallet thus cannot be locked). So I guess two things:

  • Fix wallet_lock to return something other than "locked":"1" when there is no password
  • Perhaps keep one of the valid calls and rename it to wallet_password_exists to be more explicit about its use

Thoughts?

@zhyatt zhyatt removed this from the V24.0 milestone May 12, 2022
@qwahzi qwahzi added this to the Backlog milestone Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc Changes related to Remote Procedure Calls
Projects
None yet
Development

No branches or pull requests

3 participants