UNPKG

@chris.troutner/ipfs-message-port-server

Version:
108 lines 4.61 kB
export type CIDVersion = import('cids').CIDVersion; export type IPFS = import('@chris.troutner/ipfs-core-types').IPFS; export type AddOptions = import('@chris.troutner/ipfs-core-types/src/root').AddOptions; export type AddAllOptions = import('@chris.troutner/ipfs-core-types/src/root').AddAllOptions; export type IPFSEntry = import('@chris.troutner/ipfs-core-types/src/root').IPFSEntry; export type EncodedCID = import('@chris.troutner/ipfs-message-port-protocol/src/cid').EncodedCID; export type ImportCandidateStream = import('@chris.troutner/ipfs-core-types/src/utils').ImportCandidateStream; export type ImportCandidate = import('@chris.troutner/ipfs-core-types/src/utils').ImportCandidate; export type AddResult = import('@chris.troutner/ipfs-core-types/src/root').AddResult; export type EncodedAddInput = import('@chris.troutner/ipfs-message-port-protocol/src/root').EncodedAddInput; export type EncodedAddAllInput = import('@chris.troutner/ipfs-message-port-protocol/src/root').EncodedAddAllInput; export type EncodedFileContent = import('@chris.troutner/ipfs-message-port-protocol/src/root').EncodedFileContent; export type EncodedIPFSEntry = import('@chris.troutner/ipfs-message-port-protocol/src/root').EncodedIPFSEntry; export type RemoteCallback = import('@chris.troutner/ipfs-message-port-protocol/src/core').RemoteCallback; export type RemoteIterable<T> = import('@chris.troutner/ipfs-message-port-protocol/src/core').RemoteIterable<T>; export type AddAllInput = { input: EncodedAddAllInput; progressCallback?: import("@chris.troutner/ipfs-message-port-protocol/src/core").RemoteCallback | undefined; }; export type AddInput = { input: EncodedAddInput; progressCallback?: import("@chris.troutner/ipfs-message-port-protocol/src/core").RemoteCallback | undefined; }; export type AddQuery = AddInput & AddOptions; export type AddAllQuery = AddAllInput & AddAllOptions; export class CoreService { /** * @param {IPFS} ipfs */ constructor(ipfs: IPFS); ipfs: import("@chris.troutner/ipfs-core-types").IPFS; /** * @param {AddAllQuery} query */ addAll(query: AddAllQuery): { data: import("@chris.troutner/ipfs-message-port-protocol/src/core").RemoteIterable<{ cid: import("@chris.troutner/ipfs-message-port-protocol/src/cid").EncodedCID; size: number; path: string; mode?: number | undefined; mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; }>; transfer: Transferable[]; }; /** * @param {AddQuery} query */ add(query: AddQuery): Promise<{ data: { cid: import("@chris.troutner/ipfs-message-port-protocol/src/cid").EncodedCID; size: number; path: string; mode?: number | undefined; mtime?: import("ipfs-unixfs/dist/src/types").Mtime | undefined; }; transfer: Transferable[]; }>; /** * @typedef {Object} CatQuery * @property {string|EncodedCID} path * @property {number} [offset] * @property {number} [length] * @property {number} [timeout] * @property {AbortSignal} [signal] * * @param {CatQuery} query */ cat(query: { path: string | EncodedCID; offset?: number | undefined; length?: number | undefined; timeout?: number | undefined; signal?: AbortSignal | undefined; }): { data: import("@chris.troutner/ipfs-message-port-protocol/src/core").RemoteIterable<Uint8Array>; transfer: Transferable[]; }; /** * @typedef {Object} LsQuery * @property {string|EncodedCID} path * @property {boolean} [preload] * @property {boolean} [recursive] * @property {number} [timeout] * @property {AbortSignal} [signal] * * @param {LsQuery} query */ ls(query: { path: string | EncodedCID; preload?: boolean | undefined; recursive?: boolean | undefined; timeout?: number | undefined; signal?: AbortSignal | undefined; }): { data: import("@chris.troutner/ipfs-message-port-protocol/src/core").RemoteIterable<{ cid: import("@chris.troutner/ipfs-message-port-protocol/src/cid").EncodedCID; type: "file" | "dir"; name: string; path: string; mode: number | undefined; mtime: import("ipfs-unixfs/dist/src/types").Mtime | undefined; size: number; depth: number; }>; transfer: Transferable[]; }; } //# sourceMappingURL=core.d.ts.map