@tatumio/tatum-v1
Version:
Tatum API client allows browsers and Node.js clients to interact with Tatum API.
24 lines (23 loc) • 1.07 kB
TypeScript
/// <reference types="node" />
/**
* Stores file on the IPFS. This operation is available only for paid plans.
* For more details, see <a href="https://apidoc.tatum.io/#operation/StoreIPFS" target="_blank">Tatum API documentation</a>
*/
/**
* Upload file to the IPFS storage.
* @param file Data buffer of the file
* @param fileName Name of the file to upload.
*/
export declare const ipfsUpload: (file: Buffer, fileName: string) => Promise<{
ipfsHash: string;
}>;
/**
* Gets data from the IPFS. Every 100 kB of data costs 1 additional credit.
* For more details, see <a href="https://apidoc.tatum.io/#operation/StoreIPFS" target="_blank">Tatum API documentation</a>
*/
export declare const ipfsGet: (id: string) => Promise<any>;
/**
* Unpin the data from the IPFS. After this operation, credits won't be charged for a storage, but file will keep exists on the IPFS.
* For more details, see <a href="https://apidoc.tatum.io/#operation/StoreIPFS" target="_blank">Tatum API documentation</a>
*/
export declare const ipfsDelete: (id: string) => Promise<void>;