You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tests/common/utils.rs contains a bunch of very useful utility functions. Maybe it's a good idea to expose these under a feature called 'utilities' or something?
Initially I was thinking that the library should be very limited in which parts should be done by the library and which things should be calculated by the user beforehand (like calculating the ecdh shared secret for example, since this requires dealing with private keys).
But the issue with this approach is that this forces the user to do some cryptography themselves, which is very error-prone.
Even though all the crypto stuff can be found in tests/common/utils.rs file, I'm thinking it's a bad idea to just refer to these as an example.
For most of these functions, the user would probably simply copy our example code into their own codebase. I don't think that is a practice that we should encourage, since that could very easily lead to bugs.
So I think it is preferable to expose these functions as an optional feature instead.
Another advantage of that is that we can also create utility functions that depend on rust-bitcoin. That way, by default, our lib doesn't depend on this lib, but it is possible as an optional dependency.
The text was updated successfully, but these errors were encountered:
The
tests/common/utils.rs
contains a bunch of very useful utility functions. Maybe it's a good idea to expose these under a feature called 'utilities' or something?Initially I was thinking that the library should be very limited in which parts should be done by the library and which things should be calculated by the user beforehand (like calculating the ecdh shared secret for example, since this requires dealing with private keys).
But the issue with this approach is that this forces the user to do some cryptography themselves, which is very error-prone.
Even though all the crypto stuff can be found in
tests/common/utils.rs
file, I'm thinking it's a bad idea to just refer to these as an example.For most of these functions, the user would probably simply copy our example code into their own codebase. I don't think that is a practice that we should encourage, since that could very easily lead to bugs.
So I think it is preferable to expose these functions as an optional feature instead.
Another advantage of that is that we can also create utility functions that depend on rust-bitcoin. That way, by default, our lib doesn't depend on this lib, but it is possible as an optional dependency.
The text was updated successfully, but these errors were encountered: