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

did-jwt-vc

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

did-jwt-vc - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

lib/index.d.ts
import { Resolvable } from 'did-resolver';
import { CreateCredentialOptions, CreatePresentationOptions, CredentialPayload, Issuer, JWT, JwtCredentialPayload, JwtPresentationPayload, PresentationPayload, Verifiable, VerifiableCredential, VerifiablePresentation, VerifiedCredential, VerifiedPresentation, VerifyCredentialOptions, VerifyCredentialPolicies, VerifyPresentationOptions, W3CCredential, W3CPresentation } from './types';
import { normalizeCredential, normalizePresentation, transformCredentialInput, transformPresentationInput } from './converters';
import { VC_JWT_ERROR } from './errors';
export { Issuer, CredentialPayload, PresentationPayload, JwtCredentialPayload, JwtPresentationPayload, VerifiableCredential, VerifiablePresentation, VerifiedCredential, VerifiedPresentation, Verifiable, W3CCredential, W3CPresentation, transformCredentialInput, transformPresentationInput, normalizeCredential, normalizePresentation, VC_JWT_ERROR, };
export { VC_ERROR, VC_JWT_ERROR } from './validators';
export { Issuer, CredentialPayload, PresentationPayload, JwtCredentialPayload, JwtPresentationPayload, VerifiableCredential, VerifiablePresentation, VerifiedCredential, VerifiedPresentation, Verifiable, W3CCredential, W3CPresentation, transformCredentialInput, transformPresentationInput, normalizeCredential, normalizePresentation, };
export { CreateCredentialOptions, CreatePresentationOptions, VerifyCredentialOptions, VerifyCredentialPolicies, VerifyPresentationOptions, };

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

import { JwtCredentialSubject, DateType } from './types';
import { VerifiableCredential } from '.';
import { JWT_ERROR } from 'did-jwt';
/**
* Error prefixes used for known verification failure cases related to the
* {@link https://www.w3.org/TR/vc-data-model/ | Verifiable Credential data model }
*/
export declare const enum VC_ERROR {
/**
* Thrown when the credential or presentation being verified does not conform to the data model defined by
* {@link https://www.w3.org/TR/vc-data-model/ | the spec}
*/
SCHEMA_ERROR = "schema_error",
/**
* Thrown when the input is not a JWT string
*/
FORMAT_ERROR = "format_error",
/**
* Thrown when verifying a presentation where `challenge` and/or `domain` don't match the expected values.
*/
AUTH_ERROR = "auth_error"
}
/**
* Known validation or verification error prefixes.
*/
export declare type VC_JWT_ERROR = VC_ERROR | JWT_ERROR;
export declare function validateJwtFormat(value: VerifiableCredential): void;

@@ -4,0 +28,0 @@ export declare function validateTimestamp(value: number | DateType): void;

{
"name": "did-jwt-vc",
"version": "3.0.0",
"version": "3.0.1",
"description": "Create and verify W3C Verifiable Credentials and Presentations in JWT format",

@@ -5,0 +5,0 @@ "type": "module",

@@ -33,4 +33,6 @@ import { createJWT, verifyJWT } from 'did-jwt'

} from './converters'
import { VC_ERROR, VC_JWT_ERROR } from './errors'
import { VC_ERROR } from './validators'
export { VC_ERROR, VC_JWT_ERROR } from './validators'
export {

@@ -53,3 +55,2 @@ Issuer,

normalizePresentation,
VC_JWT_ERROR,
}

@@ -56,0 +57,0 @@

@@ -5,4 +5,31 @@ import { DEFAULT_CONTEXT, DEFAULT_VC_TYPE, DEFAULT_VP_TYPE, JWT_FORMAT } from './types'

import { asArray } from './converters'
import { VC_ERROR } from './errors'
import { JWT_ERROR } from 'did-jwt'
/**
* Error prefixes used for known verification failure cases related to the
* {@link https://www.w3.org/TR/vc-data-model/ | Verifiable Credential data model }
*/
export const enum VC_ERROR {
/**
* Thrown when the credential or presentation being verified does not conform to the data model defined by
* {@link https://www.w3.org/TR/vc-data-model/ | the spec}
*/
SCHEMA_ERROR = 'schema_error',
/**
* Thrown when the input is not a JWT string
*/
FORMAT_ERROR = 'format_error',
/**
* Thrown when verifying a presentation where `challenge` and/or `domain` don't match the expected values.
*/
AUTH_ERROR = 'auth_error',
}
/**
* Known validation or verification error prefixes.
*/
export type VC_JWT_ERROR = VC_ERROR | JWT_ERROR
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -9,0 +36,0 @@ function isDateObject(input: any): input is Date {

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

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