yoursunny / NDNts

NDN libraries for the Modern Web
https://ndnts-docs.ndn.today
ISC License
31 stars 9 forks source link

Misleading setting in CaProfile fields #21

Closed zjkmxy closed 12 months ago

zjkmxy commented 1 year ago

https://github.com/yoursunny/NDNts/blob/5324bc5caa93eb8ad9deef678574e0e308ecea01/packages/ndncert/src/packet/ca-profile.ts#L80

The comment is written as internal comments rather than TSDoc, which is invisible in the published package:

// lib/packet/ca-profile.d.ts
export declare namespace CaProfile {
    // <SNIP>
    interface Fields {
        prefix: Name;
        info: string;
        probeKeys: string[];
        maxValidityPeriod: number;
        cert: Certificate;
    }
    // <SNIP>
}

This is misleading since the NDN Cert Spec says maxValidityPeriod is in seconds. Please write a TSDoc comment (visible in IDE) explaining this to avoid confusion.

zjkmxy commented 12 months ago

Solved and worked in VSCode. Thanks.