@sd-jwt/present
Advanced tools
Comparing version 0.6.1 to 0.6.2-next.1
import { Hasher, PresentationFrame } from '@sd-jwt/types'; | ||
import { Disclosure } from '@sd-jwt/utils'; | ||
import { HasherSync } from '@sd-jwt/types/src/type'; | ||
import { HasherSync, Extensible } from '@sd-jwt/types/src/type'; | ||
@@ -15,3 +15,3 @@ declare const presentableKeys: (rawPayload: Record<string, unknown>, disclosures: Array<Disclosure>, hasher: Hasher) => Promise<string[]>; | ||
*/ | ||
declare const transformPresentationFrame: <T extends object>(obj: PresentationFrame<T>, prefix?: string) => string[]; | ||
declare const transformPresentationFrame: (obj: PresentationFrame<Extensible>, prefix?: string) => string[]; | ||
type SerializedDisclosure = { | ||
@@ -18,0 +18,0 @@ digest: string; |
@@ -108,6 +108,9 @@ "use strict"; | ||
} | ||
} else { | ||
} else if (typeof value === "object" && value !== null) { | ||
acc.push( | ||
newPrefix, | ||
...transformPresentationFrame(value, newPrefix) | ||
...transformPresentationFrame( | ||
value, | ||
newPrefix | ||
) | ||
); | ||
@@ -114,0 +117,0 @@ } |
{ | ||
"name": "@sd-jwt/present", | ||
"version": "0.6.1", | ||
"version": "0.6.2-next.1+9356aee", | ||
"description": "sd-jwt draft 7 implementation in typescript", | ||
@@ -41,8 +41,8 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@sd-jwt/crypto-nodejs": "0.6.1" | ||
"@sd-jwt/crypto-nodejs": "0.6.2-next.1+9356aee" | ||
}, | ||
"dependencies": { | ||
"@sd-jwt/decode": "0.6.1", | ||
"@sd-jwt/types": "0.6.1", | ||
"@sd-jwt/utils": "0.6.1" | ||
"@sd-jwt/decode": "0.6.2-next.1+9356aee", | ||
"@sd-jwt/types": "0.6.2-next.1+9356aee", | ||
"@sd-jwt/utils": "0.6.2-next.1+9356aee" | ||
}, | ||
@@ -65,3 +65,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "f19b76c7c3a66c539a5eac06ff20ad2ac17dcf47" | ||
"gitHead": "9356aee736425adf4b3f0af2123d2bcfb82a28ea" | ||
} |
@@ -18,3 +18,3 @@ import { | ||
} from '@sd-jwt/decode'; | ||
import type { HasherSync } from '@sd-jwt/types/src/type'; | ||
import type { Extensible, HasherSync } from '@sd-jwt/types/src/type'; | ||
@@ -123,4 +123,4 @@ // Presentable keys | ||
*/ | ||
export const transformPresentationFrame = <T extends object>( | ||
obj: PresentationFrame<T>, | ||
export const transformPresentationFrame = ( | ||
obj: PresentationFrame<Extensible>, | ||
prefix = '', | ||
@@ -135,6 +135,9 @@ ): string[] => { | ||
} | ||
} else { | ||
} else if (typeof value === 'object' && value !== null) { | ||
acc.push( | ||
newPrefix, | ||
...transformPresentationFrame(value as PresentationFrame<T>, newPrefix), | ||
...transformPresentationFrame( | ||
value as PresentationFrame<Extensible>, | ||
newPrefix, | ||
), | ||
); | ||
@@ -141,0 +144,0 @@ } |
Sorry, the diff of this file is not supported yet
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
49067
844
1
- Removed@sd-jwt/decode@0.6.1(transitive)
- Removed@sd-jwt/types@0.6.1(transitive)
- Removed@sd-jwt/utils@0.6.1(transitive)
- Removedjs-base64@3.7.7(transitive)