Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add, as yet unused, modules that implement BCH codes and iterators (used for no-alloc access to the bech32 string parts).
Draft because I cannot work out a nice next step.
I've spent two good chunks of time today and yesterday and I'm stumped how to proceed. Sorry for the Wall Of Text.
lib.rs
because of the use ofAsRef<[u8]>
, which is not compatible with the iterators because we requireExactSizedIterator
.rust-bitcoin
crate i.e., layer one bitcoinIf its (i) then I don't even know what this means, my whole understanding of the crate is based solely on the two bips. If it is (ii) then I don't know how to do a simple-next-step without just re-writing the whole API.
More points on the abstraction
bitcoin::address
module (e.g. who knows about "bc", "tb", "bcrt", valid witness versions, valid witness program length)?rust-bech32-bitcoin
exist and is the abstraction implied by its existence valid (I know you already said forget about that crate @apoelstra but it effects the abstraction discussion IMO)?Moving Forward
lib.rs
) and write an API tailored to bitcoin layer one and let other users just go toprimitives
and use the more clunky but fully functional API?segwit
module that implements the API in (1) and leavelib.rs
as it is?If (1) we need buyin from @clarkmoody because its his crate but also because he understands who else is using the crate.
If (2) I have no idea how we ever stabalize the crate because no one in rust-bitcoin will sign off on it.