export type ProtoField = { name: string; json: string; number: number; type: string; kind: 'scalar' | 'message' | 'enum'; repeated?: true; map?: { key: string; value: string; valueKind: 'scalar' | 'message' | 'enum'; }; }; export type ProtoSchema = { messages: Record; enums: Record>; rpcs: Record; }; /** A message's JSON form (proto3 JSON) as its binary encoding. */ export declare function encodeMessage(schema: ProtoSchema, type: string, value: unknown): Uint8Array; /** A message's binary encoding as its JSON form (proto3 JSON; a field at its default is left out). */ export declare function decodeMessage(schema: ProtoSchema, type: string, bytes: Uint8Array): unknown; /** Rewrite selected length-delimited fields without decoding/re-encoding the rest of a message. * Undefined keeps the original field bytes; null removes that occurrence. Nested rewrites use this same visitor. * This is for transparent vendor fronts: unknown fields, ordering and untouched encodings survive unchanged. */ export declare function rewriteProtobufFields(bytes: Uint8Array, fields: Readonly Uint8Array | null | undefined>>): Uint8Array;