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-next.6 to 0.8.1-next.12

dist/mapper/credential-mapper.d.ts

2

dist/index.d.ts
export * from './types';
export * from './utils';
export * from './mapper';
//# sourceMappingURL=index.d.ts.map

@@ -18,2 +18,4 @@ "use strict";

__exportStar(require("./types"), exports);
__exportStar(require("./utils"), exports);
__exportStar(require("./mapper"), exports);
//# sourceMappingURL=index.js.map

13

dist/types/pex.d.ts
/**
* It express how the inputs presented as proofs to a Verifier.
* It expresses how the inputs are presented as proofs to a Verifier.
*/

@@ -19,13 +19,2 @@ export interface PresentationSubmission {

/**
* Presentation Echange API
* Presentation Exchange API
*
* The version of the OpenAPI document: 1.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* descriptor map laying out the structure of the presentation submission.

@@ -32,0 +21,0 @@ */

import { PresentationSubmission } from './pex';
import { IProofPurpose, IProofType } from './did';
export declare type AdditionalClaims = Record<string, any>;
export interface ICredential {

@@ -7,3 +8,3 @@ expirationDate?: string;

issuanceDate: string;
credentialSubject: ICredentialSubject;
credentialSubject: ICredentialSubject & AdditionalClaims;
id?: string;

@@ -16,13 +17,11 @@ '@context': ICredentialContextType[] | ICredentialContextType;

type: string[];
[x: string]: unknown;
[x: string]: any;
}
export interface ICredentialSubject {
id?: string;
[x: string]: unknown;
}
export declare type ICredentialContextType = ICredentialContext | string;
export declare type ICredentialContextType = (ICredentialContext & AdditionalClaims) | string;
export interface ICredentialContext {
name?: string;
did?: string;
[x: string]: unknown;
}

@@ -45,3 +44,2 @@ export declare type ICredentialSchemaType = ICredentialSchema | string;

requiredRevealStatements?: string[];
[x: string]: string | string[] | undefined;
}

@@ -54,3 +52,3 @@ export interface ICredentialStatus {

id: string;
[x: string]: unknown;
[x: string]: any;
}

@@ -68,2 +66,3 @@ export interface IHasProof {

holder?: string;
[x: string]: any;
}

@@ -75,29 +74,52 @@ export declare type IVerifiablePresentation = IPresentation & IHasProof;

*/
original: string | JwtWrappedVerifiableCredential | IVerifiableCredential;
original: OriginalVerifiableCredential;
/**
* In case of JWT credential it will be the decoded version. In other cases it will be the same as original one
*/
decoded: JwtWrappedVerifiableCredential | IVerifiableCredential;
decoded: JwtDecodedVerifiableCredential | IVerifiableCredential;
/**
* Type of this credential. Supported types are json-ld and jwt
* Type of this credential. Supported types are json-ld and jwt (decoded/encoded)
*/
type: VerifiableDataExchangeType;
type: OriginalType;
/**
* created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
* The claim format, typically used during exchange transport protocols
*/
internalCredential: ICredential;
format: ClaimFormat;
/**
* Internal stable representation of a Credential without Proofs, created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
*/
credential: ICredential;
}
export interface WrappedVerifiablePresentation {
original: string | JwtWrappedVerifiablePresentation | IVerifiablePresentation;
decoded: JwtWrappedVerifiablePresentation | IVerifiablePresentation;
type: VerifiableDataExchangeType;
internalPresentation: InternalPresentation;
/**
* Original VP that we've received
*/
original: OriginalVerifiablePresentation;
/**
* In case of JWT VP it will be the decoded version. In other cases it will be the same as original one
*/
decoded: JwtDecodedVerifiablePresentation | IVerifiablePresentation;
/**
* Type of this Presentation. Supported types are json-ld and jwt (decoded/encoded)
*/
type: OriginalType;
/**
* The claim format, typically used during exchange transport protocols
*/
format: ClaimFormat;
/**
* Internal stable representation of a Presentation without proofs, created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
*/
presentation: UniformVerifiablePresentation;
/**
* Wrapped Verifiable Credentials belonging to the Presentation
*/
vcs: WrappedVerifiableCredential[];
}
export declare enum VerifiableDataExchangeType {
JSONLD = 0,
JWT_ENCODED = 1,
JWT_DECODED = 2
export declare enum OriginalType {
JSONLD = "json-ld",
JWT_ENCODED = "jwt-encoded",
JWT_DECODED = "jwt-decoded"
}
export interface InternalPresentation {
export interface UniformVerifiablePresentation {
'@context': ICredentialContextType | ICredentialContextType[];

@@ -109,3 +131,3 @@ type: string[];

}
export interface JwtWrappedVerifiableCredential {
export interface JwtDecodedVerifiableCredential {
vc: ICredential;

@@ -117,4 +139,5 @@ exp: string;

jti: string;
[x: string]: any;
}
export interface JwtWrappedVerifiablePresentation {
export interface JwtDecodedVerifiablePresentation {
vp: IVerifiablePresentation;

@@ -126,3 +149,8 @@ exp: string;

jti: string;
[x: string]: any;
}
export declare type ClaimFormat = 'jwt' | 'jwt_vc' | 'jwt_vp' | 'ldp' | 'ldp_vc' | 'ldp_vp' | string;
export declare type OriginalVerifiableCredential = IVerifiableCredential | JwtDecodedVerifiableCredential | string;
export declare type OriginalVerifiablePresentation = IPresentation | JwtDecodedVerifiablePresentation | string;
export declare type Original = OriginalVerifiablePresentation | OriginalVerifiableCredential;
//# sourceMappingURL=vc.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VerifiableDataExchangeType = void 0;
var VerifiableDataExchangeType;
(function (VerifiableDataExchangeType) {
VerifiableDataExchangeType[VerifiableDataExchangeType["JSONLD"] = 0] = "JSONLD";
VerifiableDataExchangeType[VerifiableDataExchangeType["JWT_ENCODED"] = 1] = "JWT_ENCODED";
VerifiableDataExchangeType[VerifiableDataExchangeType["JWT_DECODED"] = 2] = "JWT_DECODED";
})(VerifiableDataExchangeType = exports.VerifiableDataExchangeType || (exports.VerifiableDataExchangeType = {}));
exports.OriginalType = void 0;
var OriginalType;
(function (OriginalType) {
OriginalType["JSONLD"] = "json-ld";
OriginalType["JWT_ENCODED"] = "jwt-encoded";
OriginalType["JWT_DECODED"] = "jwt-decoded";
})(OriginalType = exports.OriginalType || (exports.OriginalType = {}));
//# sourceMappingURL=vc.js.map
{
"name": "@sphereon/ssi-types",
"description": "SSI Common Types",
"version": "0.8.1-next.6+27069f8",
"version": "0.8.1-next.12+84fb570",
"main": "dist/index.js",

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

},
"dependencies": {
"jwt-decode": "^3.1.2"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"jest": "^27.3.1",
"prettier": "^2.4.1",
"ts-jest": "^27.0.7",
"typescript": "4.6.4"

@@ -27,4 +34,10 @@ },

"license": "Apache-2.0",
"keywords": [],
"gitHead": "27069f85062685aa678ccb7846cefb84b253990f"
"keywords": [
"SSI",
"Common Credential Types",
"Credential Mapping",
"Verifiable Credentials",
"DIDs"
],
"gitHead": "84fb570f29ecd7a4fbd6477fd22284f47e814ab8"
}
export * from './types'
export * from './utils'
export * from './mapper'
/**
* It express how the inputs presented as proofs to a Verifier.
* It expresses how the inputs are presented as proofs to a Verifier.
*/

@@ -20,14 +20,2 @@ export interface PresentationSubmission {

/**
* Presentation Echange API
* Presentation Exchange API
*
* The version of the OpenAPI document: 1.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* descriptor map laying out the structure of the presentation submission.

@@ -34,0 +22,0 @@ */

import { PresentationSubmission } from './pex'
import { IProofPurpose, IProofType } from './did'
export type AdditionalClaims = Record<string, any>
export interface ICredential {

@@ -12,3 +14,3 @@ // 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.

// 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
credentialSubject: ICredentialSubject & AdditionalClaims
// If jti is present, the value MUST be used to set the value of the id property of the new JSON object.

@@ -23,3 +25,3 @@ id?: string

[x: string]: unknown
[x: string]: any
}

@@ -29,7 +31,5 @@

id?: string
[x: string]: unknown
}
export type ICredentialContextType = ICredentialContext | string
export type ICredentialContextType = (ICredentialContext & AdditionalClaims) | string

@@ -39,3 +39,2 @@ export interface ICredentialContext {

did?: string
[x: string]: unknown
}

@@ -61,4 +60,2 @@

requiredRevealStatements?: string[] // The parts of the proof that must be revealed in a derived proof
[x: string]: string | string[] | undefined
}

@@ -74,3 +71,3 @@

[x: string]: unknown
[x: string]: any
}

@@ -88,5 +85,7 @@

type: string[]
verifiableCredential: IVerifiableCredential[]
verifiableCredential: IVerifiableCredential[] // we relax to ICredential for internal decoded stable representations without proofs
presentation_submission?: PresentationSubmission
holder?: string
[x: string]: any
}

@@ -100,32 +99,55 @@

*/
original: string | JwtWrappedVerifiableCredential | IVerifiableCredential
original: OriginalVerifiableCredential
/**
* In case of JWT credential it will be the decoded version. In other cases it will be the same as original one
*/
decoded: JwtWrappedVerifiableCredential | IVerifiableCredential
decoded: JwtDecodedVerifiableCredential | IVerifiableCredential
/**
* Type of this credential. Supported types are json-ld and jwt
* Type of this credential. Supported types are json-ld and jwt (decoded/encoded)
*/
type: VerifiableDataExchangeType
type: OriginalType
/**
* created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
* The claim format, typically used during exchange transport protocols
*/
internalCredential: ICredential
format: ClaimFormat
/**
* Internal stable representation of a Credential without Proofs, created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
*/
credential: ICredential
}
export interface WrappedVerifiablePresentation {
original: string | JwtWrappedVerifiablePresentation | IVerifiablePresentation
decoded: JwtWrappedVerifiablePresentation | IVerifiablePresentation
type: VerifiableDataExchangeType
internalPresentation: InternalPresentation
/**
* Original VP that we've received
*/
original: OriginalVerifiablePresentation
/**
* In case of JWT VP it will be the decoded version. In other cases it will be the same as original one
*/
decoded: JwtDecodedVerifiablePresentation | IVerifiablePresentation
/**
* Type of this Presentation. Supported types are json-ld and jwt (decoded/encoded)
*/
type: OriginalType
/**
* The claim format, typically used during exchange transport protocols
*/
format: ClaimFormat
/**
* Internal stable representation of a Presentation without proofs, created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding
*/
presentation: UniformVerifiablePresentation
/**
* Wrapped Verifiable Credentials belonging to the Presentation
*/
vcs: WrappedVerifiableCredential[]
}
export enum VerifiableDataExchangeType {
JSONLD,
JWT_ENCODED,
JWT_DECODED,
export enum OriginalType {
JSONLD = 'json-ld',
JWT_ENCODED = 'jwt-encoded',
JWT_DECODED = 'jwt-decoded',
}
export interface InternalPresentation {
export interface UniformVerifiablePresentation {
'@context': ICredentialContextType | ICredentialContextType[]

@@ -138,3 +160,3 @@ type: string[]

export interface JwtWrappedVerifiableCredential {
export interface JwtDecodedVerifiableCredential {
vc: ICredential

@@ -146,5 +168,7 @@ exp: string

jti: string
[x: string]: any
}
export interface JwtWrappedVerifiablePresentation {
export interface JwtDecodedVerifiablePresentation {
vp: IVerifiablePresentation

@@ -156,2 +180,10 @@ exp: string

jti: string
[x: string]: any
}
export type ClaimFormat = 'jwt' | 'jwt_vc' | 'jwt_vp' | 'ldp' | 'ldp_vc' | 'ldp_vp' | string
export type OriginalVerifiableCredential = IVerifiableCredential | JwtDecodedVerifiableCredential | string
export type OriginalVerifiablePresentation = IPresentation | JwtDecodedVerifiablePresentation | string
export type Original = OriginalVerifiablePresentation | OriginalVerifiableCredential

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

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