UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

26 lines 1.24 kB
import type { Video, VideoPreview } from "../.."; import type { EthernaGatewayClient, Reference, RequestOptions } from "../../clients"; import type { SwarmResourceStatus } from "./types"; interface EthernaResourcesHandlerOptions { gatewayClient: EthernaGatewayClient; } interface EthernaResourcesFetchOptions { withByWhom?: boolean; } type AnyVideo = Video | VideoPreview; export declare class EthernaResourcesHandler { resourcesStatus?: SwarmResourceStatus[]; references: Reference[]; private gatewayClient; constructor(videos: AnyVideo[], opts: EthernaResourcesHandlerOptions); constructor(references: Reference[], opts: EthernaResourcesHandlerOptions); fetchOffers(opts?: EthernaResourcesFetchOptions): Promise<void>; offerResources(opts?: RequestOptions): Promise<void>; unofferResources(opts?: RequestOptions): Promise<void>; getReferenceStatus(reference: string): SwarmResourceStatus | null; getVideoReferencesStatus(video: Video): SwarmResourceStatus[]; static videoReferenceType(video: Video, reference: string): "all" | "metadata" | "video" | "thumb" | null; static videoReferenceLabel(video: Video, reference: string): string; } export {}; //# sourceMappingURL=index.d.ts.map