UNPKG

@renec-foundation/metaplex-js

Version:

Metaplex JavaScript API

5 lines (3 loc) 167 B
import { sha256 } from 'crypto-hash'; import { Buffer } from 'buffer'; export const getFileHash = async (file: Buffer) => Buffer.from(await sha256(file.toString()));