import { SkillSignatureBlock } from "./types.js"; //#region src/supply-chain/frontmatter.d.ts /** Result of {@link splitFrontmatter}. */ interface SplitFrontmatter { readonly frontmatter: string; readonly body: string; } /** * Split `skillMd` into the YAML frontmatter and the markdown body. * Throws {@link SkillManifestParseError} when no frontmatter block is * present. * * @stable */ declare function splitFrontmatter(skillMd: string): SplitFrontmatter; /** * Parse the YAML frontmatter into a plain object. Returns `{}` for an * empty block. * * @stable */ declare function parseFrontmatter(frontmatter: string): Record; /** * Extract a `graphorin-signature:` block from the parsed frontmatter. * Returns `null` when no signature block is present. * * @stable */ declare function extractSignatureBlock(frontmatter: Record): SkillSignatureBlock | null; /** * Compute the canonical bytes used for ed25519 signing / verification. * The algorithm: * * 1. Strip the `graphorin-signature` key from the frontmatter. * 2. Recursively sort every object's keys. * 3. Stringify back to YAML using `yaml`'s deterministic emitter. * 4. Concatenate `frontmatter\n---\n` and return the UTF-8 bytes. * * @stable */ declare function canonicalizeForSignature(skillMd: string): { readonly bytes: Uint8Array; readonly canonicalText: string; }; //#endregion export { SplitFrontmatter, canonicalizeForSignature, extractSignatureBlock, parseFrontmatter, splitFrontmatter }; //# sourceMappingURL=frontmatter.d.ts.map