Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sphereon/ssi-types

Package Overview
Dependencies
Maintainers
4
Versions
1168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sphereon/ssi-types - npm Package Compare versions

Comparing version 0.8.1-unstable.74 to 0.8.1-unstable.85

6

dist/mapper/credential-mapper.js

@@ -56,3 +56,3 @@ "use strict";

decoded,
presentation: Object.assign(Object.assign({}, vp), { verifiableCredential: vcs }),
presentation: Object.assign(Object.assign({}, vp), { verifiableCredential: vcs, type: vp.type ? vp.type : vp['@type'] }),
vcs,

@@ -195,3 +195,5 @@ };

}
credential.issuer = decoded.iss;
else {
credential.issuer = decoded.iss;
}
}

@@ -198,0 +200,0 @@ if (decoded.sub) {

@@ -5,3 +5,3 @@ import { PresentationSubmission } from './pex';

export declare type IIssuerId = string;
export interface ICredential {
export interface ICredentialWithType {
'@context': ICredentialContextType | ICredentialContextType[];

@@ -15,2 +15,3 @@ type: string[];

id?: string;
'@id'?: string;
credentialStatus?: ICredentialStatus;

@@ -21,2 +22,18 @@ description?: string;

}
export interface ICredentialWithAtType {
'@context': ICredentialContextType | ICredentialContextType[];
'@type': string[];
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[];
issuer: IIssuerId | IIssuer;
issuanceDate: string;
credentialSubject: (ICredentialSubject & AdditionalClaims) | (ICredentialSubject & AdditionalClaims)[];
expirationDate?: string;
id?: string;
'@id'?: string;
credentialStatus?: ICredentialStatus;
description?: string;
name?: string;
[x: string]: any;
}
export declare type ICredential = ICredentialWithType | ICredentialWithAtType;
export interface ICredentialSubject {

@@ -70,4 +87,5 @@ id?: string;

export declare type W3CVerifiableCredential = IVerifiableCredential | CompactJWT;
export interface IPresentation {
export interface IPresentationWithType {
id?: string;
'@id'?: string;
'@context': ICredentialContextType | ICredentialContextType[];

@@ -80,2 +98,13 @@ type: string[];

}
export interface IPresentationWithAtType {
id?: string;
'@id'?: string;
'@context': ICredentialContextType | ICredentialContextType[];
'@type': string[];
verifiableCredential: W3CVerifiableCredential[];
presentation_submission?: PresentationSubmission;
holder?: string;
[x: string]: any;
}
export declare type IPresentation = IPresentationWithType | IPresentationWithAtType;
export declare type IVerifiablePresentation = IPresentation & IHasProof;

@@ -82,0 +111,0 @@ /**

{
"name": "@sphereon/ssi-types",
"description": "SSI Common Types",
"version": "0.8.1-unstable.74+12dae72",
"version": "0.8.1-unstable.85+9c5cedd",
"main": "dist/index.js",

@@ -40,3 +40,3 @@ "types": "dist/index.d.ts",

],
"gitHead": "12dae72860fd0dc00e96a8121b136c2195843388"
"gitHead": "9c5ceddd61087efa8def8f748ae1a9450bbeae46"
}

@@ -69,2 +69,3 @@ import {

verifiableCredential: vcs, // We overwrite the credentials with wrapped versions, making it an InternalVerifiablePresentation. Note: we keep the singular key name of the vc data model
type: vp.type? vp.type: vp['@type']
},

@@ -250,4 +251,5 @@ vcs,

}
} else {
credential.issuer = decoded.iss
}
credential.issuer = decoded.iss
}

@@ -254,0 +256,0 @@

@@ -8,3 +8,3 @@ import { PresentationSubmission } from './pex'

export interface ICredential {
export interface ICredentialWithType {
'@context': ICredentialContextType | ICredentialContextType[]

@@ -23,2 +23,3 @@ type: string[]

id?: string
'@id'?: string
credentialStatus?: ICredentialStatus

@@ -31,2 +32,26 @@ description?: string

export interface ICredentialWithAtType {
'@context': ICredentialContextType | ICredentialContextType[]
'@type': string[]
credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[]
// If iss is present, the value MUST be used to set the issuer property of the new credential JSON object or the holder property of the new presentation JSON object.
issuer: IIssuerId | IIssuer
// If nbf is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the issuanceDate property of the new JSON object.
issuanceDate: string
// If sub is present, the value MUST be used to set the value of the id property of credentialSubject of the new credential JSON object.
credentialSubject: (ICredentialSubject & AdditionalClaims) | (ICredentialSubject & AdditionalClaims)[]
// If exp is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the expirationDate property of credentialSubject of the new JSON object.
expirationDate?: string
// If jti is present, the value MUST be used to set the value of the id property of the new JSON object.
id?: string
'@id'?: string
credentialStatus?: ICredentialStatus
description?: string
name?: string
[x: string]: any
}
export type ICredential = ICredentialWithType | ICredentialWithAtType
export interface ICredentialSubject {

@@ -94,4 +119,5 @@ id?: string

export interface IPresentation {
export interface IPresentationWithType {
id?: string
'@id'?: string
'@context': ICredentialContextType | ICredentialContextType[]

@@ -106,2 +132,16 @@ type: string[]

export interface IPresentationWithAtType {
id?: string
'@id'?: string
'@context': ICredentialContextType | ICredentialContextType[]
'@type': string[]
verifiableCredential: W3CVerifiableCredential[] // we relax to ICredential for internal decoded stable representations without proofs
presentation_submission?: PresentationSubmission
holder?: string
[x: string]: any
}
export type IPresentation = IPresentationWithType | IPresentationWithAtType
export type IVerifiablePresentation = IPresentation & IHasProof

@@ -108,0 +148,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc