LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
63 stars 28 forks source link

Descriptor, descriptorSecretKey / secretKey name and type mismatch #47

Closed danielnordh closed 1 year ago

danielnordh commented 1 year ago

Name and type mismatch when creating a descriptor. The secretKey parameter of Descriptor.newBip84 expects String, not DescriptorSecretKey:

final descriptorSecretKey = await DescriptorSecretKey.create(
      network: Network.Testnet,
      mnemonic: mnemonic);
final descriptor = await Descriptor.newBip84(
      secretKey: descriptorSecretKey,
      network: Network.Testnet,
      keyChainKind: KeychainKind.External);

Some of the descriptor templates also has the parameter named secretKey, while others use descriptorSecretKey. Bip44 works as expected, the others do not.

Expected Parameter called descriptorSecretKey always, accepting DescriptorSecretKey type always

BitcoinZavior commented 1 year ago

Will have a patch shortly, thanks for looking into it.