Zondax / ledger-stacks

Apache License 2.0
19 stars 7 forks source link

Replace buffer usage with Uint8Array #127

Closed aulneau closed 2 years ago

aulneau commented 2 years ago

The JS library is assuming the existence of Buffer, it would be better to replace instances of Buffer with Uint8Array so folks would not need to polyfill it in certain contexts.

:link: zboto Link

carlosala commented 2 years ago

In this case, Ledger libraries for transport are expecting to receive instances of Buffer and not Uint8Array. You can check the signature of the method send that we are using to communicate with the Ledger device here. I agree that we should use ES standards!

Thanks for your contribution!