Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...

    Type Alias CertificateBuilderParams

    type CertificateBuilderParams = {
        hashLib?: {
            hash: (...args: Parameters<typeof Hash>) => ReturnType<typeof Hash>;
            name: string;
        };
        hashParams: {
            defaults?: { aki?: HashNames; signature?: HashNames; ski?: HashNames };
            functions?: {
                [name in HashNames]?: (
                    ...args: Parameters<typeof Hash>,
                ) => ReturnType<typeof Hash>
            };
        };
        includeCommonExts?: boolean;
        isCA?: boolean;
        issuer: Account;
        issuerDN?: { name: string; value: string }[];
        serial: bigint | number;
        subjectDN?: { name: string; value: string }[];
        subjectPublicKey: Account;
        validFrom: Date;
        validTo: Date;
    }
    Index

    Properties

    hashLib?: {
        hash: (...args: Parameters<typeof Hash>) => ReturnType<typeof Hash>;
        name: string;
    }

    Hashing library to use

    Because several different things are hashed this is

    Use hashParams instead

    hashParams: {
        defaults?: { aki?: HashNames; signature?: HashNames; ski?: HashNames };
        functions?: {
            [name in HashNames]?: (
                ...args: Parameters<typeof Hash>,
            ) => ReturnType<typeof Hash>
        };
    }

    This option lets you control the hashing method used for the certificate signature as well as provide alternative implementations

    includeCommonExts?: boolean

    Include common/default certificate extensions ?

    Default is true

    isCA?: boolean

    Is a certificate authority ?

    Default is true if the Subject === Issuer and false otherwise

    issuer: Account

    Issuer for the certificate, to sign the certificate with

    issuerDN?: { name: string; value: string }[]

    Issuer Distinguished Name (DN) for the certificate

    serial: bigint | number

    Serial number for the certificate

    subjectDN?: { name: string; value: string }[]

    Subject Distinguished Name (DN) for the certificate

    subjectPublicKey: Account

    Subject for the certificate, to store as the public key within the certificate

    validFrom: Date

    Validity period of the certificate to begin on

    validTo: Date

    Validity period of the certificate to end (expire) on