import Uploader from "../common/upload"; import type WebIrys from "./irys"; import type { CreateAndUploadOptions, Manifest, UploadOptions, UploadResponse } from "../common/types"; import type { DataItem, JWKInterface, Tag } from "arbundles"; export type TaggedFile = File & { tags?: Tag[]; }; export declare class WebUploader extends Uploader { protected irys: WebIrys; constructor(irys: WebIrys); /** * Uploads a tagged file object, automatically adding the content-type tag if it's not present * @param file - File object to upload * @param opts - optional options for the upload / data item creation * @returns */ uploadFile(file: File, opts?: CreateAndUploadOptions): Promise; /** * 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 `name` property - if it's undefined, it falls back to `webkitRelativePath` * @param {string} [opts.indexFileRelPath] Relative path for the index file, i.e `folder/index.html` * @param {Tag[]} [opts.manifestTags] List of tags to add onto the manifest transaction * @param {JWKInterface} [opts.throwawayKey] Provide your own throwaway JWK to use for signing the items in the bundle * @param {boolean} [opts.separateManifestTx=false] Whether upload the manifest as a separate tx (not in the nested bundle) - note: transactions in a nested bundle are not indexed by bundlr GQL - if you have tags you want to use to find the manifest, set this option to true * * @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; separateManifestTx?: boolean; }): Promise; }