The code below returns the external descriptor.
I understand that external descriptor will be used as (internal) change descriptor if it does not exist, but I think it would be better and less ambiguous if the function returned None or Error when explicitly calling the internal descriptor.
This would also make a better distinction between external and internal descriptors and be more in line with the wallet structure.
let wallet = Wallet::new_offline(
"<desc>",
None,
network,
MemoryDatabase::default(),
)
.unwrap();
let desc = wallet.get_descriptor_for_keychain(KeychainKind::Internal);
println!("desc: {}", desc.to_string());
The code below returns the external descriptor.
I understand that external descriptor will be used as (internal) change descriptor if it does not exist, but I think it would be better and less ambiguous if the function returned
NoneorErrorwhen explicitly calling the internal descriptor.This would also make a better distinction between external and internal descriptors and be more in line with the wallet structure.