@sd-jwt/types
Advanced tools
Comparing version 0.3.2-next.98 to 0.3.2-next.99
@@ -19,3 +19,3 @@ declare const SD_SEPARATOR = "~"; | ||
kbSignAlg?: string; | ||
kbVerifier?: Verifier; | ||
kbVerifier?: KbVerifier; | ||
}; | ||
@@ -35,5 +35,12 @@ type kbHeader = { | ||
}; | ||
interface JwtPayload { | ||
cnf?: { | ||
jwk: JsonWebKey; | ||
}; | ||
[key: string]: unknown; | ||
} | ||
type OrPromise<T> = T | Promise<T>; | ||
type Signer = (data: string) => OrPromise<string>; | ||
type Verifier = (data: string, sig: string) => OrPromise<boolean>; | ||
type KbVerifier = (data: string, sig: string, payload: JwtPayload) => OrPromise<boolean>; | ||
type Hasher = (data: string, alg: string) => OrPromise<Uint8Array>; | ||
@@ -103,2 +110,2 @@ type SaltGenerator = (length: number) => OrPromise<string>; | ||
export { type Base64urlString, type DECOY, type DisclosureData, type DisclosureFrame, type Hasher, type HasherAndAlg, type HasherAndAlgSync, type HasherSync, type KBOptions, KB_JWT_TYP, type OrPromise, type SD, type SDJWTCompact, type SDJWTConfig, SD_DECOY, SD_DIGEST, SD_LIST_KEY, SD_SEPARATOR, type SaltGenerator, type SaltGeneratorSync, type Signer, type SignerSync, type Verifier, type VerifierSync, type kbHeader, type kbPayload }; | ||
export { type Base64urlString, type DECOY, type DisclosureData, type DisclosureFrame, type Hasher, type HasherAndAlg, type HasherAndAlgSync, type HasherSync, type JwtPayload, type KBOptions, KB_JWT_TYP, type KbVerifier, type OrPromise, type SD, type SDJWTCompact, type SDJWTConfig, SD_DECOY, SD_DIGEST, SD_LIST_KEY, SD_SEPARATOR, type SaltGenerator, type SaltGeneratorSync, type Signer, type SignerSync, type Verifier, type VerifierSync, type kbHeader, type kbPayload }; |
{ | ||
"name": "@sd-jwt/types", | ||
"version": "0.3.2-next.98+03e028f", | ||
"version": "0.3.2-next.99+94f33f1", | ||
"description": "sd-jwt draft 7 implementation in typescript", | ||
@@ -56,3 +56,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "03e028fb452bacb445b35dcc2fb0cc9ef6d53874" | ||
"gitHead": "94f33f1931393345ad1d0977adad67d407615607" | ||
} |
@@ -22,3 +22,3 @@ export const SD_SEPARATOR = '~'; | ||
kbSignAlg?: string; | ||
kbVerifier?: Verifier; | ||
kbVerifier?: KbVerifier; | ||
}; | ||
@@ -38,2 +38,9 @@ | ||
export interface JwtPayload { | ||
cnf?: { | ||
jwk: JsonWebKey; | ||
}; | ||
[key: string]: unknown; | ||
} | ||
export type OrPromise<T> = T | Promise<T>; | ||
@@ -43,2 +50,7 @@ | ||
export type Verifier = (data: string, sig: string) => OrPromise<boolean>; | ||
export type KbVerifier = ( | ||
data: string, | ||
sig: string, | ||
payload: JwtPayload, | ||
) => OrPromise<boolean>; | ||
export type Hasher = (data: string, alg: string) => OrPromise<Uint8Array>; | ||
@@ -45,0 +57,0 @@ export type SaltGenerator = (length: number) => OrPromise<string>; |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
25867
311