UNPKG

@lighthouse-web3/sdk

Version:

NPM package and CLI tool to interact with lighthouse protocol

29 lines (28 loc) 989 B
interface FetchOptions extends RequestInit { timeout?: number; onProgress?: (progress: number) => void; } interface DirectStreamOptions { method?: string; headers?: Record<string, string>; timeout?: number; onProgress?: (data: { progress: number; }) => void; } declare const isCID: (cid: string) => boolean; declare const isPrivateKey: (key: string) => boolean; declare const addressValidator: (value: string) => string; declare function checkDuplicateFileNames(files: any[]): void; declare function fetchWithTimeout(endpointURL: string, options: FetchOptions): Promise<Response>; declare function fetchWithDirectStream(endpointURL: string, options: DirectStreamOptions, streamData: { boundary: string; files: Array<{ stream: any; filename: string; size: number; }>; }): Promise<{ data: any; }>; export { isCID, isPrivateKey, addressValidator, checkDuplicateFileNames, fetchWithTimeout, fetchWithDirectStream, };