Overview
getIpfsId is an optional helper exported via @lit-protocol/lit-client/ipfs. It produces CIDv0 IPFS identifiers identical to the Lit SDK v7 utility while remaining fully tree-shakeable from the main client bundle.
Usage
Parameters
| Name | Type | Description |
|---|---|---|
| input | string | Uint8Array | ArrayBuffer | ArrayBufferView | Source content to hash. Strings are UTF-8 encoded automatically; buffers and typed views are accepted directly. |
Returns
Notes
- The helper delegates to the same hashing routine used in v7 (
typestub-ipfs-only-hash) and can be imported without pulling the entire Lit Client into your bundle. - Binary payloads do not need to be stringified first—pass any
Uint8Array,ArrayBuffer, or typed view directly and the helper will normalize it before hashing.