import { FileRegistry, MessageShape, Registry } from '@bufbuild/protobuf'; import { MessageSchema } from './compile.ts'; import { ProtoFile } from './file.ts'; /** * Builds a registry out of a list of binary proto descriptor sets. * @param protoDescriptorSets list of proto descriptor sets. */ export declare function loadRegistry(protoDescriptorSets?: ProtoFile[]): Promise; /** * Decodes a protobuf message based on the provided payload and * schema. Optionally, use the registry created out of the * `protoDescriptorSets` for decoding Any messages. * * @param payload protobuf message payload it can be: * - a JSON payload * - a binary payload * - a binary payload encoded as base64 * - a URL pointing to any of the three above * @param schema schema for decoding the message. * @param registry optional registry containing info useful for * decoding unknown Any messages. */ export declare function loadMessage(payload: ProtoFile, schema: S, registry?: Registry): Promise>; export declare function buildRegistry(descriptor: ProtoFile): Promise; export declare function protoFileToBin(payload: ProtoFile, schema: S, registry?: Registry): Promise; export declare function protoFileToJson(payload: ProtoFile, schema: S, registry?: Registry): Promise;