Wallet::get_descriptor_for_keychain should return an Option
https://github.com/bitcoindevkit/bdk/blob/2c324d3759aed4548269084327c94ce91e7b386a/crates/bdk/src/wallet/mod.rs#L1993-L1997
In Wallet::get_descriptor_for_keychain(keychain), if a user passes in a non-existent keychain, we instead return the descriptor associated with KeychainKind::External. What's the reason behind this behavior? IMHO we should just return an Option, and None if the keychain doesn't exist. If this isn't the case, we should at least document this behavior.
Yeah this is an old design issue with Wallet which tries to pretend the External keychain is also Internal Keychain when an Internal keychain doesn't exist. Do we still want Wallet to work with a single descriptor? We could force the user to add the same descriptor as the change descriptor if they really wanted the current behavior. We'd have to think carefully about that of course but I think after #1203 this might work ok at the KeychainTxOutIndex level.
A small change but I think we should push to 2.0 milestone.
We are going to make it mandatory to have descriptors for both keychains