///
import { Observable } from 'rxjs';
import { Stream } from 'stream';
import { IpfsConnection } from '../../connection/ipfs-connection';
import { FileRepository } from '../repository/file-repository';
/**
* The client class that directly interface with IPFS using their SDK
*
*
* This class delegates to IPFS the following:
*
* - adding of file(represented as byte arrays) and returning the hash for it
* - retrieving of file given a hash
*
*/
export declare class IpfsClient implements FileRepository {
private readonly ipfsConnection;
/**
* Construct the class with IPFSConnection
*
* @param ipfsConnection the Ipfs connection
*/
constructor(ipfsConnection: IpfsConnection);
/**
* Add/Upload a file (represented as byte stream) to IPFS
*
*
* This method is equivalent to `ipfs add` CLI command
*
* @return the hash (base58) for the data uploaded
*/
addStream(stream: Stream): Observable;
/**
* Retrieves the file stream from IPFS given a hash
*
*
* This method is equivalent to `ipfs cat` CLI command
*
* @param dataHash the hash (base58) of an IPFS file
* @return the file (represented as byte stream)
*/
getStream(dataHash: string): Observable;
}