Skip to content

Commit

Permalink
Layout: Accept Uint8Array type wherever the API expects a Buffer
Browse files Browse the repository at this point in the history
Loosen Buffer type checks to accept the Uint8Array base class.
Uint8Array is preferred over Buffer due to its presence in both
Node.js and browser environments. When Buffer methods are needed,
create a new Buffer instance which uses the same underyling
memory of the Uint8Array parameter.

Signed-off-by: Justin Starry <justin@solana.com>
  • Loading branch information
jstarry committed Jul 10, 2021
1 parent 466c825 commit 02e4a75
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 21 deletions.
Loading

0 comments on commit 02e4a75

Please sign in to comment.