summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/sigstore/dist/types/sigstore/index.d.ts
blob: e80e6b15e60aa70827ef2d16e33b6d706023384e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// <reference types="node" />
import { ArtifactVerificationOptions, Bundle, Envelope, TransparencyLogEntry, VerificationMaterial } from '@sigstore/protobuf-specs';
import { Entry } from '../../tlog';
import { x509Certificate } from '../../x509/cert';
import { SignatureMaterial } from '../signature';
import { WithRequired } from '../utility';
import { ValidBundle } from './validate';
export * from '@sigstore/protobuf-specs';
export * from './serialized';
export * from './validate';
export declare const bundleFromJSON: (obj: any) => ValidBundle;
export type BundleWithVerificationMaterial = WithRequired<Bundle, 'verificationMaterial'>;
export declare function isBundleWithVerificationMaterial(bundle: Bundle): bundle is BundleWithVerificationMaterial;
export type BundleWithCertificateChain = Bundle & {
    verificationMaterial: VerificationMaterial & {
        content: Extract<VerificationMaterial['content'], {
            $case: 'x509CertificateChain';
        }>;
    };
};
export declare function isBundleWithCertificateChain(bundle: Bundle): bundle is BundleWithCertificateChain;
export type RequiredArtifactVerificationOptions = WithRequired<ArtifactVerificationOptions, 'ctlogOptions' | 'tlogOptions'>;
export type CAArtifactVerificationOptions = WithRequired<ArtifactVerificationOptions, 'ctlogOptions'> & {
    signers?: Extract<ArtifactVerificationOptions['signers'], {
        $case: 'certificateIdentities';
    }>;
};
export declare function isCAVerificationOptions(options: ArtifactVerificationOptions): options is CAArtifactVerificationOptions;
export type VerifiableTransparencyLogEntry = WithRequired<TransparencyLogEntry, 'logId' | 'inclusionPromise' | 'kindVersion'>;
export declare function isVerifiableTransparencyLogEntry(entry: TransparencyLogEntry): entry is VerifiableTransparencyLogEntry;
export declare const bundle: {
    toDSSEBundle: (envelope: Envelope, signature: SignatureMaterial, rekorEntry: Entry) => Bundle;
    toMessageSignatureBundle: (digest: Buffer, signature: SignatureMaterial, rekorEntry: Entry) => Bundle;
};
export declare function signingCertificate(bundle: Bundle): x509Certificate | undefined;