Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types tsdocs refactor core #275

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions packages/core/src/certificate/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,45 @@
*
* Certificates are primarily used for purposes like attestation, validation, and verification of data authenticity.
* They are used as proofs of authenticity and origin for data exchanged within the vechain ecosystem.
*
* @field purpose - The purpose field indicates the intended use or context of the certificate.
* For example, it could be used for identification, verification, or attestation.
* @field payload - The payload field holds the actual content of the certificate.
* This content can be of various types, such as text, images, or other data.
* @field domain - The domain field represents the specific context or domain for which the certificate is valid.
* It helps ensure that the certificate is only applicable within the intended context.
* @field timestamp - The timestamp field records the time at which the certificate was created or issued.
* This provides a temporal reference for the certificate's validity.
* @field signer - The signer field indicates the address of the entity that signs the certificate.
* It is the public key address of the entity that issues the certificate.
* @field signature - The signature field contains the cryptographic signature generated by the issuer's private key.
* This signature ensures the integrity and authenticity of the certificate's content.
*/
interface Certificate {
/**
* The purpose field indicates the intended use or context of the certificate.
* For example, it could be used for identification, verification, or attestation.
*/
purpose: string;

/**
* The payload field holds the actual content of the certificate.
* This content can be of various types, such as text, images, or other data.
*/
payload: {
type: string;
content: string;
};

/**
* The domain field represents the specific context or domain for which the certificate is valid.
* It helps ensure that the certificate is only applicable within the intended context.
*/
domain: string;

/**
* The timestamp field records the time at which the certificate was created or issued.
* This provides a temporal reference for the certificate's validity.
*/
timestamp: number;

/**
* The signer field indicates the address of the entity that signs the certificate.
* It is the public key address of the entity that issues the certificate.
*/
signer: string;

/**
* The signature field contains the cryptographic signature generated by the issuer's private key.
* This signature ensures the integrity and authenticity of the certificate's content.
*/
signature?: string;
}

Expand Down