New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sphereon/ssi-types

Package Overview
Dependencies
Maintainers
4
Versions
1285
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.9.1-unstable.30 to 0.9.1-unstable.34

5

dist/mapper/credential-mapper.d.ts

@@ -1,2 +0,2 @@

import { DocumentFormat, ICredential, IPresentation, IVerifiableCredential, IVerifiablePresentation, JwtDecodedVerifiableCredential, JwtDecodedVerifiablePresentation, OriginalVerifiableCredential, OriginalVerifiablePresentation, W3CVerifiableCredential, W3CVerifiablePresentation, WrappedVerifiableCredential, WrappedVerifiablePresentation } from '../types';
import { DocumentFormat, IPresentation, IVerifiableCredential, IVerifiablePresentation, JwtDecodedVerifiableCredential, JwtDecodedVerifiablePresentation, OriginalVerifiableCredential, OriginalVerifiablePresentation, W3CVerifiableCredential, W3CVerifiablePresentation, WrappedVerifiableCredential, WrappedVerifiablePresentation } from '../types';
export declare class CredentialMapper {

@@ -29,6 +29,7 @@ static decodeVerifiablePresentation(presentation: OriginalVerifiablePresentation): JwtDecodedVerifiablePresentation | IVerifiablePresentation;

maxTimeSkewInMS?: number;
repairMissingVpContext?: boolean;
}): IVerifiablePresentation;
static jwtEncodedCredentialToUniformCredential(jwt: string, opts?: {
maxTimeSkewInMS?: number;
}): ICredential;
}): IVerifiableCredential;
static jwtDecodedCredentialToUniformCredential(decoded: JwtDecodedVerifiableCredential, opts?: {

@@ -35,0 +36,0 @@ maxTimeSkewInMS?: number;

2

dist/mapper/credential-mapper.js

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

// At time of writing Velocity Networks does not conform to specification. Adding bare minimum @context section to stop parsers from crashing and whatnot
if (!uniformPresentation['@context']) {
if ((opts === null || opts === void 0 ? void 0 : opts.repairMissingVpContext) && !uniformPresentation['@context']) {
uniformPresentation['@context'] = ['https://www.w3.org/2018/credentials/v1'];

@@ -183,0 +183,0 @@ }

{
"name": "@sphereon/ssi-types",
"description": "SSI Common Types",
"version": "0.9.1-unstable.30+f9e10f1",
"version": "0.9.1-unstable.34+0a44ee7",
"main": "dist/index.js",

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

],
"gitHead": "f9e10f18b07a49ec535f88e87c93cd69f216d121"
"gitHead": "0a44ee76d7df4f0a1bd0a7aa092ab1f417269f97"
}

@@ -0,0 +0,0 @@ <!--suppress HtmlDeprecatedAttribute -->

export * from './types'
export * from './utils'
export * from './mapper'
import {
DocumentFormat,
ICredential,
IPresentation,

@@ -221,3 +220,6 @@ IProof,

static toUniformPresentation(presentation: OriginalVerifiablePresentation, opts?: { maxTimeSkewInMS?: number }): IVerifiablePresentation {
static toUniformPresentation(
presentation: OriginalVerifiablePresentation,
opts?: { maxTimeSkewInMS?: number; repairMissingVpContext?: boolean }
): IVerifiablePresentation {
const original = presentation

@@ -233,3 +235,3 @@ const decoded = CredentialMapper.decodeVerifiablePresentation(original)

// At time of writing Velocity Networks does not conform to specification. Adding bare minimum @context section to stop parsers from crashing and whatnot
if (!uniformPresentation['@context']) {
if (opts?.repairMissingVpContext && !uniformPresentation['@context']) {
uniformPresentation['@context'] = ['https://www.w3.org/2018/credentials/v1']

@@ -244,3 +246,3 @@ }

static jwtEncodedCredentialToUniformCredential(jwt: string, opts?: { maxTimeSkewInMS?: number }): ICredential {
static jwtEncodedCredentialToUniformCredential(jwt: string, opts?: { maxTimeSkewInMS?: number }): IVerifiableCredential {
return CredentialMapper.jwtDecodedCredentialToUniformCredential(jwt_decode(jwt), opts)

@@ -247,0 +249,0 @@ }

export * from './credential-mapper'
export * from './did'
export * from './pex'
export * from './vc'

@@ -0,0 +0,0 @@ /**

export * from './object'

@@ -0,0 +0,0 @@ export class ObjectUtils {

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