rekor.d.ts 997 B

12345678910111213141516171819202122232425262728
  1. import type { LogEntry, ProposedDSSEEntry, ProposedEntry, ProposedHashedRekordEntry, ProposedIntotoEntry } from '@sigstore/rekor-types';
  2. import type { FetchOptions } from '../types/fetch';
  3. export type { ProposedDSSEEntry, ProposedEntry, ProposedHashedRekordEntry, ProposedIntotoEntry, };
  4. export type Entry = {
  5. uuid: string;
  6. } & LogEntry[string];
  7. export type RekorOptions = {
  8. baseURL: string;
  9. } & FetchOptions;
  10. /**
  11. * Rekor API client.
  12. */
  13. export declare class Rekor {
  14. private options;
  15. constructor(options: RekorOptions);
  16. /**
  17. * Create a new entry in the Rekor log.
  18. * @param propsedEntry {ProposedEntry} Data to create a new entry
  19. * @returns {Promise<Entry>} The created entry
  20. */
  21. createEntry(propsedEntry: ProposedEntry): Promise<Entry>;
  22. /**
  23. * Get an entry from the Rekor log.
  24. * @param uuid {string} The UUID of the entry to retrieve
  25. * @returns {Promise<Entry>} The retrieved entry
  26. */
  27. getEntry(uuid: string): Promise<Entry>;
  28. }