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

did-jwt-vc

Package Overview
Dependencies
Maintainers
6
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 2.0.0 to 2.0.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [2.0.1](https://github.com/decentralized-identity/did-jwt-vc/compare/2.0.0...2.0.1) (2021-03-25)
### Bug Fixes
* **deps:** update did-jwt@5.1.1 ([#68](https://github.com/decentralized-identity/did-jwt-vc/issues/68)) ([50e3f7c](https://github.com/decentralized-identity/did-jwt-vc/commit/50e3f7c5a6fe30d659811090b45762487c5582a2))
# [2.0.0](https://github.com/decentralized-identity/did-jwt-vc/compare/1.2.0...2.0.0) (2021-03-11)

@@ -2,0 +9,0 @@

13

lib/index.d.ts

@@ -1,5 +0,4 @@

import { JwtCredentialPayload, Issuer, JwtPresentationPayload, JWT, VerifiablePresentation, VerifiableCredential, CredentialPayload, PresentationPayload, Verifiable, W3CCredential, W3CPresentation, VerifiedCredential, VerifiedPresentation, VerifyPresentationOptions, CreatePresentationOptions, CreateCredentialOptions, VerifyCredentialOptions } from './types';
import { JwtCredentialPayload, Issuer, JwtPresentationPayload, JWT, VerifiablePresentation, VerifiableCredential, CredentialPayload, PresentationPayload, Verifiable, W3CCredential, W3CPresentation, VerifiedCredential, VerifiedPresentation, VerifyPresentationOptions, CreatePresentationOptions, CreateCredentialOptions, VerifyCredentialOptions, Resolvable } from './types';
import { transformCredentialInput, transformPresentationInput, normalizeCredential, normalizePresentation } from './converters';
import { Resolver } from 'did-resolver';
export { Issuer, CredentialPayload, PresentationPayload, JwtCredentialPayload, JwtPresentationPayload, VerifiableCredential, VerifiablePresentation, VerifiedCredential, VerifiedPresentation, Verifiable, W3CCredential, W3CPresentation, transformCredentialInput, transformPresentationInput, normalizeCredential, normalizePresentation };
export { Issuer, CredentialPayload, PresentationPayload, JwtCredentialPayload, JwtPresentationPayload, VerifiableCredential, VerifiablePresentation, VerifiedCredential, VerifiedPresentation, Verifiable, W3CCredential, W3CPresentation, transformCredentialInput, transformPresentationInput, normalizeCredential, normalizePresentation, Resolvable };
/**

@@ -46,5 +45,5 @@ * Creates a VerifiableCredential given a `CredentialPayload` or `JwtCredentialPayload` and an `Issuer`.

* @param vc the credential to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer
* @param resolver a configured `Resolver` (or an implementation of `Resolvable`) that can provide the DID document of the JWT issuer
*/
export declare function verifyCredential(vc: JWT, resolver: Resolver, options?: VerifyCredentialOptions): Promise<VerifiedCredential>;
export declare function verifyCredential(vc: JWT, resolver: Resolvable, options?: VerifyCredentialOptions): Promise<VerifiedCredential>;
/**

@@ -64,6 +63,6 @@ * Verifies that the given JwtPresentationPayload contains the appropriate options from VerifyPresentationOptions

* @param presentation the presentation to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer (presentation holder)
* @param resolver a configured `Resolver` or an implementation of `Resolvable` that can provide the DID document of the JWT issuer (presentation holder)
* @param options optional verification options that need to be satisfied
*/
export declare function verifyPresentation(presentation: JWT, resolver: Resolver, options?: VerifyPresentationOptions): Promise<VerifiedPresentation>;
export declare function verifyPresentation(presentation: JWT, resolver: Resolvable, options?: VerifyPresentationOptions): Promise<VerifiedPresentation>;
//# sourceMappingURL=index.d.ts.map

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

* @param vc the credential to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer
* @param resolver a configured `Resolver` (or an implementation of `Resolvable`) that can provide the DID document of the JWT issuer
*/

@@ -314,3 +314,3 @@ function verifyCredential(vc, resolver, options) {

* @param presentation the presentation to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer (presentation holder)
* @param resolver a configured `Resolver` or an implementation of `Resolvable` that can provide the DID document of the JWT issuer (presentation holder)
* @param options optional verification options that need to be satisfied

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

import { Signer, JWTVerified } from 'did-jwt';
import { DIDResolutionOptions, DIDResolutionResult } from 'did-resolver';
export declare type Resolvable = {
resolve: (didUrl: string, options: DIDResolutionOptions) => Promise<DIDResolutionResult>;
};
export interface JwtCredentialSubject {

@@ -3,0 +7,0 @@ [x: string]: any;

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

@@ -28,3 +28,3 @@ "main": "lib/index.js",

"dependencies": {
"did-jwt": "^5.0.1"
"did-jwt": "5.1.1"
},

@@ -59,6 +59,6 @@ "repository": {

"@types/faker": "5.1.7",
"@types/jest": "26.0.20",
"@types/node": "14.14.33",
"@types/jest": "26.0.21",
"@types/node": "14.14.35",
"codecov": "3.8.1",
"did-resolver": "^3.0.1",
"did-resolver": "3.0.2",
"ethr-did": "1.3.0",

@@ -68,4 +68,4 @@ "faker": "5.4.0",

"prettier": "2.2.1",
"semantic-release": "17.4.1",
"ts-jest": "26.5.3",
"semantic-release": "17.4.2",
"ts-jest": "26.5.4",
"tslint": "6.1.3",

@@ -72,0 +72,0 @@ "tslint-config-prettier": "1.18.0",

@@ -20,4 +20,3 @@ import EthrDID from 'ethr-did'

} from '../validators'
import { DIDResolutionResult, Resolver } from 'did-resolver'
import { CreatePresentationOptions, VerifyPresentationOptions } from '../types'
import { CreatePresentationOptions, Resolvable, VerifyPresentationOptions } from '../types'

@@ -74,3 +73,3 @@ jest.mock('../validators')

}
const resolver = {
const resolver: Resolvable = {
resolve: (did: string) =>

@@ -92,4 +91,4 @@ Promise.resolve({

didResolutionMetadata: {}
} as DIDResolutionResult)
} as Resolver
})
}

@@ -96,0 +95,0 @@ beforeEach(() => {

@@ -21,3 +21,4 @@ import { createJWT, verifyJWT } from 'did-jwt'

CreateCredentialOptions,
VerifyCredentialOptions
VerifyCredentialOptions,
Resolvable
} from './types'

@@ -32,3 +33,2 @@ import {

} from './converters'
import { Resolver } from 'did-resolver'
export {

@@ -50,3 +50,4 @@ Issuer,

normalizeCredential,
normalizePresentation
normalizePresentation,
Resolvable
}

@@ -183,7 +184,7 @@

* @param vc the credential to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer
* @param resolver a configured `Resolver` (or an implementation of `Resolvable`) that can provide the DID document of the JWT issuer
*/
export async function verifyCredential(
vc: JWT,
resolver: Resolver,
resolver: Resolvable,
options: VerifyCredentialOptions = {}

@@ -229,3 +230,3 @@ ): Promise<VerifiedCredential> {

* @param presentation the presentation to be verified. Currently only the JWT encoding is supported by this library
* @param resolver a configured `Resolver` that can provide the DID document of the JWT issuer (presentation holder)
* @param resolver a configured `Resolver` or an implementation of `Resolvable` that can provide the DID document of the JWT issuer (presentation holder)
* @param options optional verification options that need to be satisfied

@@ -235,3 +236,3 @@ */

presentation: JWT,
resolver: Resolver,
resolver: Resolvable,
options: VerifyPresentationOptions = {}

@@ -238,0 +239,0 @@ ): Promise<VerifiedPresentation> {

@@ -1,3 +0,6 @@

import { Signer, JWTVerified, JWTPayload } from 'did-jwt'
import { Signer, JWTVerified, verifyJWT } from 'did-jwt'
import { DIDResolutionOptions, DIDResolutionResult } from 'did-resolver'
export type Resolvable = { resolve: (didUrl: string, options: DIDResolutionOptions) => Promise<DIDResolutionResult> }
export interface JwtCredentialSubject {

@@ -4,0 +7,0 @@ [x: string]: any

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