export U8Array4, U8Array12, U8Array32 and U8Array64 #40
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.
Since some functions or classes of the exported API require an
U8Array4
,U8Array12
,U8Array32
orU8Array64
type as a parameter, it is needed to export them too. Otherwise it is not possible to pass a value to those parameters, the type will be wrong.For example, to retrieve a payment, a
PaymentHash PaymentHash({required U8Array32 data})
has to be passed. The parameter nameddata
only accepts anU8Array32
. Without theU8Array32
class being exported, it is impossible to create and pass a correct value of that type.Instead of exporting the types, we could do the conversions to and from List, Uint8List or a hex String in the package, so no special type has to be exported. What do you think about that and which type would be best?