Repository navigation
Splitting out zpay32 & lnwire functionality into a Go library #8971
torkelrogstad
started this conversation in
Ideas
Replies: 2 comments 1 reply
|
I made a PoC for this here: https://github.com/barebitcoin/zpay32 |
0 replies
|
I don't think we need to extract these libraries into their own repository. If we turn them into a Gomodule (by adding a Should we turn this into a feature request issue? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a Go code base where I utilize "libraries" from LND. I.e. I import LND code, and use that in my code. Specifically, I use
zpay32for constructing and decoding LN invoices, andlnwireto represent monetary amounts and interact with certain aspects of said LN invoices. This is great, and I'm thankful that I'm able to re-use code from LND.There's one major drawback to this: I end up with an absolutely enormous module graph, because I pull in the entire LND module graph... This has numerous times given me great head ache, as I've had issues with LND dependencies breaking my build. See for example #6930.
There's also (potentially?) security implications by pulling in a large module graph. I received an alert from Dependabot, about GHSA-v23v-6jw2-98fq. This was in my module graph because of the LND dependency.
Intuitively,
zpay32andlnwireseem like packages that should be great candidates for being exposed as clean, dependency-minimised modules available for outside consumption! I'm sure there's plenty of other Go builders that would also be able to use this. Is this something that has been considered?My code base is unfortunately closed source, so not possible to share here
All reactions