Skip to content

add

add a file to IPFS.

Usage

example.ts
import { mintclub } from 'mint.club-v2-sdk'
 
const imageOrVideo = new Blob(['file'], { type: 'image/png' });
 
const hash = await mintclub.ipfs.add('YOUR API KEY', imageOrVideo); 

Return Value

Promise<string>

Returns a promise that resolves to a hash of the file added to the IPFS.

Parameters

filebaseApiKey

  • Type: string

Filebase API key.

blob

  • Type: Blob

A file to add to the IPFS.