@sd-jwt/types
Advanced tools
Comparing version 0.2.0 to 0.2.1-alpha.0
@@ -0,2 +1,11 @@ | ||
import { HasherAlgorithm } from './hasherAlgorithm'; | ||
export type Hasher = (data: string, algorithm: string) => Uint8Array; | ||
export type AsyncHasher = (data: string, algorithm: string) => Promise<Uint8Array>; | ||
/** | ||
* hasher: A simple hash function that takes the base64url encoded variant of the disclosure and returns the digest as a byte array | ||
* algorithm: IANA defined string for the hashing algorithm used | ||
*/ | ||
export type HasherAndAlgorithm<HasherImplementation extends Hasher | AsyncHasher = Hasher | AsyncHasher> = { | ||
hasher: HasherImplementation; | ||
algorithm: HasherAlgorithm | string; | ||
}; |
export * from './disclosure'; | ||
export * from './hasher'; | ||
export * from './frame'; | ||
export * from './hasherAlgorithm'; |
@@ -20,2 +20,3 @@ "use strict"; | ||
__exportStar(require("./frame"), exports); | ||
__exportStar(require("./hasherAlgorithm"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sd-jwt/types", | ||
"version": "0.2.0", | ||
"version": "0.2.1-alpha.0", | ||
"description": "Common types of sd-jwt Draft 06 and sd-jwt-vc Draft 01", | ||
@@ -43,3 +43,3 @@ "license": "(MIT OR Apache-2.0)", | ||
}, | ||
"gitHead": "8fb68d5a23b2bf157949346a6603dc40b1594195" | ||
"gitHead": "97e9d3699113bb04fb99d6421797cbd404e4a626" | ||
} |
Sorry, the diff of this file is not supported yet
9056
16
200