Moving listwallets out of the wallet category on rpc help #11589

issue ruimarinho opened this issue on November 1, 2017
  1. ruimarinho commented at 1:19 AM on November 1, 2017: none

    Expected behaviour

    listwallets is currently the only command under the wallet category which is not wallet-specific. In other words, it operates at the global level.

    Actual behaviour

    Adding support for this feature on the bitcoin-core js client is more complicated as there is no way to automatically detect which commands require a wallet to be set. Moving this out of the wallet category would be a plus (e.g. over to control). Another option could be listing a command's support for multiwallet on the help output or providing an rpc with command definitions.

    What version of bitcoin-core are you using?

    0.15.0.1

  2. jonasschnelli added the label Wallet on Nov 1, 2017
  3. jonasschnelli commented at 6:53 AM on November 1, 2017: contributor

    listwallets definitively belongs to the wallet(module) and therefore is in the right place. If you want to do reliable auto-detection of commands requiring to specify a wallet to operate on, then you could parse the RPC source code and look for GetWalletForJSONRPCRequest(). Or just add a static exception list.

  4. ruimarinho commented at 11:56 AM on November 1, 2017: none

    That's not possible in a remote server context. Adding a static exception a list is what is being done right now (based on GetWalletForJSONRPCRequest()), but it's not ideal.

  5. fanquake deleted a comment on Nov 1, 2017
  6. jnewbery commented at 10:56 PM on November 1, 2017: member

    I don't have a strong preference about whether this should be under the control or wallet category.

  7. promag commented at 3:19 PM on December 7, 2017: member

    signrawtransaction belongs to the wallet module too but it's in the rawtransaction category. That said I don't think there should be a 1 to 1 relation between wallet category and wallet module.

    IMO listwallets fits better in the control category.

  8. promag commented at 3:22 PM on December 7, 2017: member

    Even in #10579 the category is rawtransaction for both variants of signing.

  9. jnewbery commented at 6:22 PM on December 7, 2017: member

    Even in #10579 the category is rawtransaction for both variants of signing.

    No, in #10579, signrawtransactionwithwallet is wallet category:

    +    { "wallet",             "signrawtransactionwithwallet",     &signrawtransactionwithwallet,  {"hexstring","prevtxs","sighashtype"} },
    
  10. promag commented at 6:29 PM on December 7, 2017: member

    Ah sorry my bad!

  11. ruimarinho commented at 2:09 AM on February 13, 2018: none

    Since the category suggestion does not appear to a consensual choice, what about listing support for multiwallet on a specific endpoint (could be a rest endpoint with command schemas) or even under help for now?

  12. MarcoFalke added the label RPC/REST/ZMQ on Mar 22, 2018
  13. MarcoFalke commented at 8:05 PM on May 8, 2020: member

    The feature request didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open issues.

    Closing due to lack of interest. Pull requests with improvements are always welcome.

  14. MarcoFalke closed this on May 8, 2020

  15. MarcoFalke locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me