ipfs-grpc-client
Version:
A client library for the IPFS gRPC API
19 lines • 992 B
TypeScript
/**
* @typedef {import('http').Agent} HttpAgent
* @typedef {import('https').Agent} HttpsAgent
*/
/**
* Client streaming methods are a many-to-one operation so this
* function takes a source that can emit multiple messages and
* returns a promise that resolves to the server response.
*
* @param {import('@improbable-eng/grpc-web').grpc} grpc - an @improbable-eng/grpc-web instance
* @param {*} service - an @improbable-eng/grpc-web service
* @param {AsyncIterable<any>} source - a source of objects to send
* @param {import('../types').RPCOptions<any>} options
* @returns {Promise<any>} - A promise that resolves to a response object
*/
export function clientStreamToPromise(grpc: typeof import("@improbable-eng/grpc-web").grpc, service: any, source: AsyncIterable<any>, options: import('../types').RPCOptions<any>): Promise<any>;
export type HttpAgent = import('http').Agent;
export type HttpsAgent = import('https').Agent;
//# sourceMappingURL=client-stream-to-promise.d.ts.map