UNPKG

@rsksmart/rif-storage

Version:

Library integrating distributed storage projects

35 lines (34 loc) 900 B
import { DownloadProgress } from 'ky'; export interface ListEntry { hash: string; path: string; contentType: string; size: number; mod_time: string; } export interface ListResult { common_prefixes?: Array<string>; entries?: Array<ListEntry>; } export interface KyOptions { timeout?: number | false; headers?: Record<string, any>; onDownloadProgress?: (progress: DownloadProgress, chunk: Uint8Array) => void; } export declare type BzzMode = 'default' | 'immutable' | 'raw'; export interface FileOptions extends KyOptions { contentType?: string; path?: string; mode?: BzzMode; } export declare type DownloadOptions = FileOptions; export interface UploadOptions extends FileOptions { fileName?: string; defaultPath?: string; manifestHash?: string; size?: number; } export interface BzzConfig { timeout?: number; url: string; }