/** * Uploads a file to the service and returns the root data CID for the * generated DAG. * * Required delegated capability proofs: `blob/add`, `index/add`, * `filecoin/offer`, `upload/add` * * @param {import('./types.js').InvocationConfig|import('./types.js').InvocationConfigurator} conf Configuration * for the UCAN invocation. An object with `issuer`, `with` and `proofs`, or a * function that generates this object. * * The `issuer` is the signing authority that is issuing the UCAN * invocation(s). It is typically the user _agent_. * * The `with` is the resource the invocation applies to. It is typically the * DID of a space. * * The `proofs` are a set of capability delegations that prove the issuer * has the capability to perform the action. * * The issuer needs the `blob/add`, `index/add`, `filecoin/offer` and * `upload/add` delegated capability. * @param {import('./types.js').BlobLike} file File data. * @param {import('./types.js').UploadFileOptions} [options] */ export function uploadFile(conf: import("./types.js").InvocationConfig | import("./types.js").InvocationConfigurator, file: import("./types.js").BlobLike, options?: import("./types.js").UploadFileOptions): Promise; /** * Uploads a directory of files to the service and returns the root data CID * for the generated DAG. All files are added to a container directory, with * paths in file names preserved. * * Required delegated capability proofs: `blob/add`, `index/add`, * `filecoin/offer`, `upload/add` * * @param {import('./types.js').InvocationConfig|import('./types.js').InvocationConfigurator} conf Configuration * for the UCAN invocation. An object with `issuer`, `with` and `proofs`, or a * function that generates this object * * The `issuer` is the signing authority that is issuing the UCAN * invocation(s). It is typically the user _agent_. * * The `with` is the resource the invocation applies to. It is typically the * DID of a space. * * The `proofs` are a set of capability delegations that prove the issuer * has the capability to perform the action. * * The issuer needs the `blob/add`, `index/add`, `filecoin/offer` and * `upload/add` delegated capability. * @param {import('./types.js').FileLike[]} files Files that should be in the directory. * To ensure determinism in the IPLD encoding, files are automatically sorted by `file.name`. * To retain the order of the files as passed in the array, set `customOrder` option to `true`. * @param {import('./types.js').UploadDirectoryOptions} [options] */ export function uploadDirectory(conf: import("./types.js").InvocationConfig | import("./types.js").InvocationConfigurator, files: import("./types.js").FileLike[], options?: import("./types.js").UploadDirectoryOptions): Promise; /** * Uploads a CAR file to the service. * * The difference between this function and `Store.add` is that the CAR file is * automatically sharded and an "upload" is registered, linking the individual * shards (see `Upload.add`). * * Use the `onShardStored` callback to obtain the CIDs of the CAR file shards. * * Required delegated capability proofs: `blob/add`, `index/add`, * `filecoin/offer`, `upload/add` * * @param {import('./types.js').InvocationConfig|import('./types.js').InvocationConfigurator} conf Configuration * for the UCAN invocation. An object with `issuer`, `with` and `proofs`, or a * function that generates this object * * The `issuer` is the signing authority that is issuing the UCAN * invocation(s). It is typically the user _agent_. * * The `with` is the resource the invocation applies to. It is typically the * DID of a space. * * The `proofs` are a set of capability delegations that prove the issuer * has the capability to perform the action. * * The issuer needs the `blob/add`, `index/add`, `filecoin/offer` and `upload/add` delegated capability. * @param {import('./types.js').BlobLike} car CAR file. * @param {import('./types.js').UploadOptions} [options] */ export function uploadCAR(conf: import("./types.js").InvocationConfig | import("./types.js").InvocationConfigurator, car: import("./types.js").BlobLike, options?: import("./types.js").UploadOptions): Promise; /** * @param {import('./types.js').InvocationConfig|import('./types.js').InvocationConfigurator} conf * @param {ReadableStream} blocks * @param {import('./types.js').UploadOptions} [options] * @returns {Promise} */ export function uploadBlockStream(conf: import("./types.js").InvocationConfig | import("./types.js").InvocationConfigurator, blocks: ReadableStream, { pieceHasher, ...options }?: import("./types.js").UploadOptions): Promise; /** * @param {import('./types.js').InvocationConfig|import('./types.js').InvocationConfigurator} conf * @param {Iterable} blocks * @param {import('./types.js').UploadOptions} [options] * @returns {Promise} */ export function uploadBlocks(conf: import("./types.js").InvocationConfig | import("./types.js").InvocationConfigurator, blocks: Iterable, { pieceHasher, ...options }?: import("./types.js").UploadOptions): Promise; export * from "./sharding.js"; export { receiptsEndpoint } from "./service.js"; export * as Receipt from "./receipts.js"; import * as Blob from './blob/index.js'; import * as Index from './index/index.js'; import * as Upload from './upload/index.js'; import * as UploadShard from './upload/shard/index.js'; import * as UnixFS from './unixfs.js'; import * as CAR from './car.js'; export { Blob, Index, Upload, UploadShard, UnixFS, CAR }; //# sourceMappingURL=index.d.ts.map