/** * Wire 0.2 Extension Key Grammar Validator * * Validates that extension keys conform to the Wire 0.2 reverse-DNS * extension key grammar: `/`. * * Extracted from the monolithic wire-02-extensions.ts for maintainability. */ /** * Validate that an extension key conforms to the Wire 0.2 extension key * grammar: `/`. * * Domain rules: * - At least one dot (distinguishes from single-label paths) * - Each label matches [a-z0-9]([a-z0-9-]*[a-z0-9])? (lowercase only) * - No uppercase letters anywhere in the domain * * Segment rules: * - Matches [a-z0-9][a-z0-9_-]* (lowercase only) * - Underscores are permitted (for extension names like credential_event) * * @param key - Extension key to validate * @returns true if valid extension key grammar; false otherwise */ export declare function isValidExtensionKey(key: string): boolean; /** * Escape a single path segment per RFC 6901. * '~' -> '~0', '/' -> '~1' */ export declare function escapePointerSegment(s: string): string; /** * Build a leaf-precise RFC 6901 JSON Pointer from a group key and Zod * issue path. * * @param groupKey - Extension group key (e.g., 'org.peacprotocol/commerce') * @param zodPath - Path array from the first Zod issue * @returns RFC 6901 pointer string */ export declare function zodPathToPointer(groupKey: string, zodPath: readonly PropertyKey[]): string; //# sourceMappingURL=grammar.d.ts.map