frame-contract.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930
  1. export const OFFICIAL_CUA_FRAME_INTEGRITY_META_KEY: string;
  2. export const OFFICIAL_CUA_FRAME_MODEL_CONTENT_PROTECTION: string;
  3. export const OFFICIAL_CUA_IMAGE_INLINE_BASE64_BYTES: number;
  4. export declare function isOfficialCuaImageRefText(text: string): boolean;
  5. export declare function containsOfficialCuaImageRefCredentialText(text: string): boolean;
  6. export declare function containsImageRefAuthority(text: string): boolean;
  7. export declare function parseOfficialCuaImageRef(text: string): { authority: string } | undefined;
  8. export declare function readRasterEnvelopeIdentity(
  9. input: unknown,
  10. ): { algorithm: string } | undefined;
  11. export declare function preserveOfficialCuaFrameResult<
  12. T extends { content?: unknown; isError?: boolean },
  13. >(result: T, options?: unknown): Promise<T>;
  14. export interface OfficialCuaFrameAttestation {
  15. kind: string;
  16. }
  17. export declare function attestOfficialCuaFrameContent(
  18. content: unknown,
  19. expectedKind?: string,
  20. ): OfficialCuaFrameAttestation | undefined;
  21. export interface OfficialCuaFrameContentPair {
  22. image: any;
  23. imageRef: any;
  24. imageRefIndex: number;
  25. imageIndex: number;
  26. }
  27. export declare function findOfficialCuaFrameContentPair(
  28. content: unknown,
  29. ): OfficialCuaFrameContentPair | undefined;