@vechain/vebetterdao-contracts
Version:
Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.
18 lines (17 loc) • 900 B
TypeScript
declare function uploadDirectoryToIPFS(pathToUpload: string, path: string): Promise<[string, File[], string]>;
/**
* Uploads a blob to IPFS.
* @param blob The Blob object to upload.
* @param filename A name for the file in the FormData payload.
* @returns The IPFS hash of the uploaded blob.
*/
export declare function uploadBlobToIPFS(blob: Blob, filename: string): Promise<string>;
/**
* Constructs an IPFS URL using a CID, and optionally a folder name and a file name.
* @param cid - The CID to convert into an IPFS URL.
* @param fileName - The name of the file to append to the URL. Optional.
* @param folderName - The name of the folder to append to the URL. Optional.
* @returns The IPFS URL in the format 'ipfs://{cid}/{folderName}/{fileName}'.
*/
declare function toIPFSURL(cid: string, fileName?: string, folderName?: string): string;
export { uploadDirectoryToIPFS, toIPFSURL };