@vechain/sdk-core
Version:
This module is crafted for dApp development and various blockchain operations that seamlessly unfold offline
71 lines (64 loc) • 2.4 kB
TypeScript
/**
* In the VeChainThor blockchain, a certificate is a data structure used
* for client-side self-signed certificates.
* It plays a crucial role in providing a mechanism for secure identification
* and validation of data.
*
* 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.
*/
interface CertificateData {
/**
* 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.
*
* The value is expressed as of milliseconds elapsed since the
* [epoch](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date),
* which is defined as the midnight at the beginning of January 1, 1970, UTC.
*
* @remarks
* The value is a natural number in the safe integer range of JS `number` type.
*/
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.
*
* @remarks
* The signature is a lowercase hexadecimal expression prefixed with `0x`.
*/
signature?: string;
}
export type { CertificateData };