import { grpc } from '@improbable-eng/grpc-web';
export type GrpcCaller<R, E> = (handler: GrpcHandler<R, E>) => void | Promise<void>;
type GrpcHandler<R, E> = (err: E | null, res: R | null) => void | Promise<void>;
export type JwtProvider = () => Promise<string | undefined> | string | undefined;
export declare function requestUnary<R, E = unknown>(caller: GrpcCaller<R, E>): Promise<R>;
export declare function requestPaged<R, E = unknown>(fetch: (cursor: string | undefined) => GrpcCaller<R, E>, next: (res: R) => string | undefined): AsyncGenerator<R, void, void>;
export declare function createMetadata(jwtProvider: JwtProvider, deviceId?: string): Promise<grpc.Metadata>;
export {};
