Published on: 2012-12-21T18:11:21+00:00
In a recent conversation, Eric Lombrozo proposed the idea of allowing watch-only addresses in wallets, but mentioned that this would require disabling signing and privkey export operations for watch-only addresses. To integrate this feature into bitcoin, it was suggested that multiple wallet capabilities should be added, allowing users to specify whether a wallet is a full signing wallet or a watch-only wallet upon creation.However, it was acknowledged that exposing multiple wallets via RPC (remote procedure call) could be challenging, as the existing RPC is not designed to support multiple wallets. It was proposed that a separate set of calls should be created, requiring a wallet name and passphrase (if the wallet is encrypted). To avoid breaking compatibility with existing RPC calls, the suggestion was made to have an RPC called "usewallet" that generalizes all the RPCs. Instead of deactivating RPCs that don't make sense, they would simply return an error.The developer also addressed the issue of how rpcs that don't make sense should handle errors. They suggested that these rpcs should return an error instead of being deactivated. Additionally, they mentioned that the "sendtoaddress" function on a watching wallet should return an unsigned raw transaction and a wallet-specific message indicating where to find the private key.In terms of implementation, the developer proposed adding multiple wallet capabilities and allowing users to specify the type of wallet upon creation. Disabling signing and privkey export operations for watch-only addresses is necessary, but the developer noted that disabling them only for some keys in a wallet would complicate the logic of CreateTransaction. Therefore, adding support for multiple wallets is seen as a viable solution.To expose multiple wallets via RPC, the developer acknowledged that a main wallet, which is always used as the default wallet, could be implemented. This would ensure compatibility with existing RPC calls. However, it was emphasized that proposals or suggestions on how to implement these changes are welcome, as breaking compatibility should not hinder the implementation of this desirable feature.Overall, the conversation highlighted the need to add multiple wallet capabilities, specify wallet types upon creation, and address the challenges of exposing multiple wallets via RPC. The developer sought input on how to achieve these goals while maintaining compatibility with existing functionality.
Updated on: 2023-08-01T04:23:29.160427+00:00