import Uploader from "../common/upload.js"; import type WebBundlr from "./bundlr.js"; import type { Manifest, UploadOptions, UploadResponse } from "../common/types.js"; import type { DataItem, JWKInterface, Tag } from "arbundles"; export type TaggedFile = File & { tags?: Tag[]; }; export declare class WebUploader extends Uploader { protected bundlr: WebBundlr; constructor(bundlr: WebBundlr); /** * Uploads a list of `File` objects & a generated folder manifest as a nested bundle using a temporary signing key. * * @param files list of `File` objects to upload - note: this code determines the paths via the File's `webkitRelativePath` property - if it's undefined, it falls back to file.name * @param {string} [opts.indexFileRelPath] Relative path for the index file, i.e `folder/index.html` * @param {string} [opts.manifestTags] List of tags to add onto the manifest transaction * @returns Standard upload response from the bundler node, plus the throwaway key & address, manifest, manifest TxId and the list of generated transactions */ uploadFolder(files: TaggedFile[], opts?: UploadOptions & { indexFileRelPath?: string; manifestTags?: Tag[]; throwawayKey?: JWKInterface; }): Promise<(UploadResponse & { throwawayKey: JWKInterface; txs: DataItem[]; throwawayKeyAddress: string; manifest: Manifest; manifestId: string; }) | undefined>; }