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 1.2.0 to 2.0.0

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# [2.0.0](https://github.com/decentralized-identity/did-jwt-vc/compare/1.2.0...2.0.0) (2021-03-11)
### Bug Fixes
* **deps:** update did-jwt@5.0.1 and did-resolver@3.0 ([#67](https://github.com/decentralized-identity/did-jwt-vc/issues/67)) ([07bfc6b](https://github.com/decentralized-identity/did-jwt-vc/commit/07bfc6bcf6855e16e992e1fb89f99d8ab7b2c99c))
### BREAKING CHANGES
* **deps:** the type of Resolver used for verification has been upgraded to the latest spec and no longer returns just the DID Document
# [1.2.0](https://github.com/decentralized-identity/did-jwt-vc/compare/1.1.0...1.2.0) (2021-03-11)

@@ -2,0 +14,0 @@

6

lib/index.d.ts

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

import { Resolvable } from 'did-jwt';
import { JwtCredentialPayload, Issuer, JwtPresentationPayload, JWT, VerifiablePresentation, VerifiableCredential, CredentialPayload, PresentationPayload, Verifiable, W3CCredential, W3CPresentation, VerifiedCredential, VerifiedPresentation, VerifyPresentationOptions, CreatePresentationOptions, CreateCredentialOptions, VerifyCredentialOptions } 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 };

@@ -48,3 +48,3 @@ /**

*/
export declare function verifyCredential(vc: JWT, resolver: Resolvable, options?: VerifyCredentialOptions): Promise<VerifiedCredential>;
export declare function verifyCredential(vc: JWT, resolver: Resolver, options?: VerifyCredentialOptions): Promise<VerifiedCredential>;
/**

@@ -67,3 +67,3 @@ * Verifies that the given JwtPresentationPayload contains the appropriate options from VerifyPresentationOptions

*/
export declare function verifyPresentation(presentation: JWT, resolver: Resolvable, options?: VerifyPresentationOptions): Promise<VerifiedPresentation>;
export declare function verifyPresentation(presentation: JWT, resolver: Resolver, options?: VerifyPresentationOptions): Promise<VerifiedPresentation>;
//# sourceMappingURL=index.d.ts.map
{
"name": "did-jwt-vc",
"version": "1.2.0",
"version": "2.0.0",
"description": "Create and verify W3C Verifiable Credentials and Presentations in JWT format",

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

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

@@ -62,3 +62,3 @@ "repository": {

"codecov": "3.8.1",
"did-resolver": "2.2.0",
"did-resolver": "^3.0.1",
"ethr-did": "1.3.0",

@@ -65,0 +65,0 @@ "faker": "5.4.0",

@@ -10,3 +10,3 @@ import EthrDID from 'ethr-did'

} from '../index'
import { decodeJWT, Resolvable } from 'did-jwt'
import { decodeJWT } from 'did-jwt'
import { DEFAULT_VC_TYPE, DEFAULT_VP_TYPE, DEFAULT_CONTEXT } from '../constants'

@@ -21,3 +21,3 @@ import {

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

@@ -75,17 +75,21 @@

}
const resolver: Resolvable = {
const resolver = {
resolve: (did: string) =>
Promise.resolve({
'@context': 'https://w3id.org/did/v1',
id: `${did}`,
publicKey: [
{
id: `${did}#owner`,
type: 'Secp256k1VerificationKey2018',
ethereumAddress: `${did.substring(9)}`,
controller: did
}
]
} as DIDDocument)
}
didDocument: {
'@context': 'https://w3id.org/did/v1',
id: `${did}`,
publicKey: [
{
id: `${did}#owner`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
ethereumAddress: `${did.substring(9)}`,
controller: did
}
]
},
didDocumentMetadata: {},
didResolutionMetadata: {}
} as DIDResolutionResult)
} as Resolver

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

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

import { createJWT, verifyJWT, Resolvable } from 'did-jwt'
import { createJWT, verifyJWT } from 'did-jwt'
import { JWT_ALG } from './constants'

@@ -31,2 +31,3 @@ import * as validators from './validators'

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

@@ -184,3 +185,3 @@ Issuer,

vc: JWT,
resolver: Resolvable,
resolver: Resolver,
options: VerifyCredentialOptions = {}

@@ -231,3 +232,3 @@ ): Promise<VerifiedCredential> {

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

@@ -234,0 +235,0 @@ ): Promise<VerifiedPresentation> {

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