Closed thunderbiscuit closed 1 year ago
There is a lot going on here, and I don't pretend to know exactly the perfect API, but here are some thoughts:
BdkFlutter.createWallet()
could take descriptors only. That way you ensure by the time they create the wallet, they're all good to go, decoupling the issue of building correct descriptors from the action of initializing the wallet.createDeriveKey()
method, where one could pass a network like mainnet but no path, and the API would use the default path (which is a testnet path). Better to force devs to provide a path, or in the case of templates to create the path based on the network and BIP provided.Thanks @thunderbiscuit I think the best will be to align the wallet creation interface to what bdk-ffi currently provides.
If I understand correctly the API, if the developer only passes a mnemonic to the
createWallet()
method the descriptor created will use thepk()
function (type: Descriptor.P2PK
) with a default descriptor path for a testnet BIP84 wallet ("m/84'/1'/0'/0"
).2 things to note:
pk()
function (should bewpkh()
)0
).