Skip to content

lotusCid

function lotusCid(data: Uint8Array<ArrayBufferLike>): Uint8Array<ArrayBuffer>;

Defined in: packages/iso-filecoin/src/utils.js:310

Create a Lotus CID from a BufferSource

Parameters

ParameterType
dataUint8Array<ArrayBufferLike>

Returns

Uint8Array<ArrayBuffer>

Example

import { lotusCid } from 'iso-filecoin/utils'
const data = new Uint8Array([1, 2, 3])
const cid = lotusCid(data)