I\'m trying to create an IPFS compatible mutihash but it is not matching. I am asking here because I have not yet found an example that takes this from hashing to the end r
const { randomBytes } = require('crypto') const multihash = require('multihashes') const buffer = Buffer.from(randomBytes(32), 'hex') const encoded = multihash.encode(buffer, 'sha2-256') const hash = multihash.toB58String(encoded) console.log(hash)