multi: add migrate-wallet-to-watch-only flag

To enable converting an existing wallet with private key material into a
watch-only wallet on first startup with remote signing enabled, we add a
new flag. Since the conversion is a destructive process, this shouldn't
happen automatically just because remote signing is enabled.
This commit is contained in:
Oliver Gugger committed 2022-01-06 14:35:26 +01:00
1 parent afc53d1c52
commit bab807a57d
6 files changed
+93 -25

No files matched your search

+7
View File
@@ -76,6 +76,13 @@ type Config struct {
// WatchOnly indicates that the wallet was initialized with public key
// material only and does not contain any private keys.
WatchOnly bool
// MigrateWatchOnly indicates that if a wallet with private key material
// already exists, it should be attempted to be converted into a
// watch-only wallet on first startup. This flag has no effect if no
// wallet exists and a watch-only one is created directly, or, if the
// wallet was previously converted to a watch-only already.
MigrateWatchOnly bool
}
// NetworkDir returns the directory name of a network directory to hold wallet