Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liquid support #1238

Open
cryptoquick opened this issue Dec 11, 2023 · 3 comments
Open

Liquid support #1238

cryptoquick opened this issue Dec 11, 2023 · 3 comments

Comments

@cryptoquick
Copy link

Describe the enhancement
Ideally BDK could optionally support showing an L-BTC balance and spending L-BTC outputs. I would think support for other assets would be out of scope, but the L-BTC asset could be hardcoded for basic Liquid support.

Use case
This would help users receive and spend L-BTC on the Liquid network using BDK.

Additional context
In the rising fee economy, we're being asked to support scaling solutions. I'm a developer for the BitMask wallet, bitmask.app.

One thing that helps is that Esplora / Mempool already supports the Liquid API.

@cryptoquick cryptoquick added the new feature New feature or request label Dec 11, 2023
@LLFourn
Copy link
Contributor

LLFourn commented Dec 12, 2023

Hey @cryptoquick I think this is far out of scope for the main bdk Wallet api. However, bdk_chain and bdk_coin_select probably already mostly support liquid conceptually. I'd like to know more about what supporting liquid in bdk_chain would look like. I can pick out a few things like we couldn't get the output values. I think what you'd want to do is add a type parameter to TxGraph that indicates the transaction type. We'd then keep the default for this as rust bitcoin's Transaction and have special impls based on what the transaction type parameter was set to. As long as it can all be nicely contained in its own module I think it'd be ok. Others might disagree.

@apoelstra
Copy link

I think this would be a fairly big maintenance burden unfortunately -- it would require a rust-elements dependency, and rust-elements is currently in a weird API no-mans-land which started analogous to rust-bitcoin 0.23 or something and has slowly grown cruft to stay current with rust-bitcoin's changing APIs.

So it's fine, it'll work, but the API is weird and old-feeling and not much of the existing bitcoin code will transfer trivially.

When rust-bitcoin 1.0 comes out we plan to substantially rewrite the rust-elements API so that again rust-bitcoin and rust-elements feel pretty-much the same. But we haven't been doing that work in real time because of how rapidly rust-bitcoin has been changing.

@cryptoquick
Copy link
Author

Okay, well maybe we can keep this around for later, then. Am I correct in getting the sense that, there is an intention to have some measure of Liquid support someday, it just has to be done in a way that makes sense from an architectural perspective?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants