@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
15 lines (14 loc) • 693 B
JavaScript
//#region src/modules/x509/utils/convertLegacyTrustedCertificates.ts
function convertLegacyTrustedCertificates(trustedCertificates) {
return trustedCertificates.every((tc) => typeof tc === "string") ? trustedCertificates.map((tc) => ({ issuance: [tc] })) : trustedCertificates;
}
function legacyTrustedCertificatesToTrustedIssuers(trustedCertificates) {
return convertLegacyTrustedCertificates(trustedCertificates).map((certificate) => ({
method: "x509",
issuance: certificate.issuance,
status: certificate.status
}));
}
//#endregion
export { convertLegacyTrustedCertificates, legacyTrustedCertificatesToTrustedIssuers };
//# sourceMappingURL=convertLegacyTrustedCertificates.mjs.map