Skip to content

Make it possible to spend LDK UTXO's in BDK  #710

Closed

Description

@ConorOkus
No description provided.

Activity

  1. afilini commented on Aug 12, 2022

    @afilini
    Contributor

    That's a bit generic, what do you mean exactly? Which utxos should be spent (normal deposits or channel utxos) and where are those keys stored?

  2. notmandatory commented on Aug 26, 2022

    @notmandatory
    Contributor

    I believe the idea here is that the BDK wallet would be able to sync and spend UTXOs created when a LDK channel is closed. I'd also expect that UTXOs in a BDK wallet could be used to open an LDK channel. This should be enabled with #485 and bitcoindevkit/bdk_wallet#188. We also need to be able to use LDK as a custom signer for spending UTXOs from LN script template "Descriptors". And LDK would have to be able to use BDK as a input signer.

  3. benthecarman commented on Dec 13, 2022

    @benthecarman
    Contributor

    This should be doable by just creating a custom KeysInterface where you make get_shutdown_scriptpubkey and get_destination_script get addresses from LDK.

  4. tnull commented on Dec 15, 2022

    @tnull
    Contributor

    This should be doable by just creating a custom KeysInterface where you make get_shutdown_scriptpubkey and get_destination_script get addresses from LDK.

    I can now confirm that by implementing a custom KeysInterface we can override the shutdown/destination scripts coming from a BDK wallet, so that the funds show up in the BDK wallet after closing/claiming on-chain. Will be included in LDKLite (see lightningdevkit/ldk-node#33).

    However, it likely still would be nice to allow users the flexibility to go the other way, i.e., allow them to add arbitrary UTXOs to BDK's coin selection.

  5. moved this to In Progress in BDK-LDK Integrationon Jan 3, 2023
  6. ConorOkus commented on Feb 23, 2023

    @ConorOkus
    Author

    Added an issue to improve this at the bindings layer here

  7. moneyball commented on Oct 9, 2023

    @moneyball

    What's the status/priority/plan for this?

  8. notmandatory commented on Oct 10, 2023

    @notmandatory
    Contributor

    @tnull do we only need to expose the existing rust add_foreign_utxo function in the language bindings? That should allow you to create a transaction in BDK that spends a UTXO owned by LDK, though you'd still need LDK to sign for that input.

    Otherwise your KeysInterface approach sounds like it already allows BDK to be used to manage the onchain transactions for LDK.

  9. ConorOkus commented on Oct 11, 2023

    @ConorOkus
    Author

    I don't think that's needed, we already have the ability to forward any other descriptors to KeysManager::spend_spendable_outputs and provide guidance here in the docs https://lightningdevkit.org/key_management/#spending-on-chain-funds

  10. tnull commented on Oct 12, 2023

    @tnull
    Contributor

    @tnull do we only need to expose the existing rust add_foreign_utxo function in the language bindings? That should allow you to create a transaction in BDK that spends a UTXO owned by LDK, though you'd still need LDK to sign for that input.

    Otherwise your KeysInterface approach sounds like it already allows BDK to be used to manage the onchain transactions for LDK.

    Yup, I agree that the KeysInterface approach (by now renamed though) seems to work as expected. I'd say it's fine to close this issue for now until we find a good reason why we'd need to 'go the other way'.

  11. notmandatory commented on Oct 12, 2023

    @notmandatory
    Contributor

    Thanks guys, closing for now. Happy to re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions