UNPKG

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

Version:
38 lines 1.33 kB
export = IPFSClient; declare class IPFSClient extends CoreClient { /** * Attaches IPFS client to the given message port. Throws * exception if client is already attached. * * @param {IPFSClient} self * @param {MessagePort} port */ static attach(self: IPFSClient, port: MessagePort): void; /** * Creates IPFS client that is detached from the `ipfs-message-port-service`. * This can be useful when in a scenario where obtaining message port happens * later on in the application logic. Datached IPFS client will queue all the * API calls and flush them once client is attached. * * @returns {IPFSClient} */ static detached(): IPFSClient; /** * Creates IPFS client from the message port (assumes that * `ipfs-message-port-service` is instantiated on the other end) * * @param {MessagePort} port * @returns {IPFSClient} */ static from(port: MessagePort): IPFSClient; transport: MessageTransport; dag: DAGClient; files: FilesClient; block: BlockClient; } import CoreClient = require("./core"); import MessageTransport = require("./client/transport"); import DAGClient = require("./dag"); import FilesClient = require("./files"); import BlockClient = require("./block"); //# sourceMappingURL=index.d.ts.map