Open gabridome opened 1 year ago
I like the labelling idea a lot. But in this case this might be information that would be stored in the BD itself (unless the cli kept a separate persistence of some sort), and so I think this issue is better suited for BDK itself rather than bdk-cli.
I agree this looks like a good spec to add support for but the feature should be added in the bdk repo, once there we can enable it in the bdk-cli
tool. Moving this issue to the bdk
repo for now.
What about "Label Import" ?
Can I help with this?
Hi @praveenperera yes I don't know of anyone else looking into this issue.
@notmandatory sounds good, the implementation looks relatively simple, I just have to familiarize myself with BDK a bit more to figure out the place to add it.
I’ll probably need this in a few weeks, so assuming no one else has picked it up by then, I’ll work on it at that time.
If someone else wants to take it before then, feel free.
Feel free to ask questions in our discord text or weekly voice chats too.
Made a standalone crate, maybe it makes sense to incorporate it into bdk?
Yes, it does make sense. I can close #1526 in favor of your bip329
crate.
We just need to integrate it to the BDK's Wallet
.
I did for the input and output label types.
You can check it at #1526.
I still have no idea how to integrate with the Wallet
for the other label types from BIP 329.
@storopoli oh didn’t know you were working on this today too. What are the odds we both started this on the same day haha.
I’m not sure the best way to integrate it yet either.
Check my implementation, steal the best parts, and make a PR. I'll help review it. What do you think?
What are the odds we both started this on the same day
We're pretty much in-sync now that things are stable (beta) with the storage it would be very opportunistic to implement BIP 329 labels.
@storopoli @praveenperera love to see this coming! Thanks for your time and effort.
@storopoli do you want to continue on the integration work since you’ve already started this PR? Let me know if you need any changes made in the library.
Alright. I might get your tests. One thing that I was thinking yesterday is that the wallet needs to be fully synced for any import labels. This will make much more easier and efficient in the storage side to fetch the Outpoints and Addresses in order to store the label. I'll keep adding stuff to the PR. Please feel free to review the draft and add suggestions.
@storopoli hey are you working on this, if not I think I can take it on next week.
No, I'm not. All yours :)
The spec is new but it seems not invasive. I find particularly interesting the outputs's labels. https://github.com/bitcoin/bips/blob/master/bip-0329.mediawiki