Skip to content

Commit

Permalink
fix: update type of credential
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed Mar 8, 2024
1 parent 2134e91 commit 63d5ebb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/types/src/type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const SD_SEPARATOR = '~';
export const SD_LIST_KEY = '...';
export const SD_DIGEST = '_sd';
export const SD_JWT_TYP = 'sd-jwt';
export const SD_JWT_TYP = 'sd-jwt-vc';
export const SD_DECOY = '_sd_decoy';
export const KB_JWT_TYP = 'kb+jwt';

Expand Down Expand Up @@ -104,14 +104,14 @@ type Frame<Payload> = Payload extends Array<infer U>
? Record<number, Frame<U>> & SD<Payload> & DECOY
: SD<Payload> & DECOY
: Payload extends Record<string, unknown>
? NonNever<
{
[K in keyof Payload]?: Payload[K] extends object
? Frame<Payload[K]>
: never;
} & SD<Payload> &
DECOY
>
: SD<Payload> & DECOY;
? NonNever<
{
[K in keyof Payload]?: Payload[K] extends object
? Frame<Payload[K]>
: never;
} & SD<Payload> &
DECOY
>
: SD<Payload> & DECOY;

export type DisclosureFrame<T extends object> = Frame<T>;

0 comments on commit 63d5ebb

Please sign in to comment.