@sd-jwt/types
Version:
sd-jwt draft 7 implementation in typescript
66 lines (63 loc) • 1.74 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
IANA_HASH_ALGORITHMS: () => IANA_HASH_ALGORITHMS,
KB_JWT_TYP: () => KB_JWT_TYP,
SD_DECOY: () => SD_DECOY,
SD_DIGEST: () => SD_DIGEST,
SD_LIST_KEY: () => SD_LIST_KEY,
SD_SEPARATOR: () => SD_SEPARATOR
});
module.exports = __toCommonJS(index_exports);
// src/type.ts
var SD_SEPARATOR = "~";
var SD_LIST_KEY = "...";
var SD_DIGEST = "_sd";
var SD_DECOY = "_sd_decoy";
var KB_JWT_TYP = "kb+jwt";
var IANA_HASH_ALGORITHMS = [
"sha-256",
"sha-256-128",
"sha-256-120",
"sha-256-96",
"sha-256-64",
"sha-256-32",
"sha-384",
"sha-512",
"sha3-224",
"sha3-256",
"sha3-384",
"sha3-512",
"blake2s-256",
"blake2b-256",
"blake2b-512",
"k12-256",
"k12-512"
];
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
IANA_HASH_ALGORITHMS,
KB_JWT_TYP,
SD_DECOY,
SD_DIGEST,
SD_LIST_KEY,
SD_SEPARATOR
});