I sometimes treat plain Buffers and ArrayBuffers as Uint8Arrays and pass them directly to functions.
The ensureBytes function helps a lot here and in Nodejs it works for all cases because Buffer is an instance of Uint8Array.
ArrayBuffer in the browser is not - so I suggest to add another line:
Not really — they are different. We're using ui8a everywhere for consistency. I'd drop nodejs buffers if it was for me, because they're insecure and shitty.
https://github.com/paulmillr/noble-ed25519/blob/edeb48a685c386b8b2d5b4be6b7dc5c432839e05/index.ts#L842
I sometimes treat plain Buffers and ArrayBuffers as Uint8Arrays and pass them directly to functions.
The ensureBytes function helps a lot here and in Nodejs it works for all cases because Buffer is an instance of Uint8Array. ArrayBuffer in the browser is not - so I suggest to add another line:
If it makes sense I could creae a pull request for it.
Fast fix is to take care to only pass Uint8Arrays to the functions when using the browser.
Cheers for now!