UNPKG
@renec-foundation/metaplex-js
Version:
latest (0.1.1)
0.1.1
0.1.0
Metaplex JavaScript API
metaplex.com
@renec-foundation/metaplex-js
/
src
/
utils
/
crypto.ts
5 lines
(3 loc)
•
167 B
text/typescript
View Raw
1
2
3
4
5
import
{ sha256 }
from
'crypto-hash'
;
import
{
Buffer
}
from
'buffer'
;
export
const
getFileHash
=
async
(
file: Buffer
) =>
Buffer
.
from
(
await
sha256
(file.
toString
()));