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

did-jwt

Package Overview
Dependencies
Maintainers
8
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

did-jwt - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

7

CHANGELOG.md

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

## [5.1.2](https://github.com/decentralized-identity/did-jwt/compare/5.1.1...5.1.2) (2021-03-26)
### Bug Fixes
* **deps:** use Resolvable type from did-resolver ([4641e56](https://github.com/decentralized-identity/did-jwt/commit/4641e56ba58c362ad63a68846d152c0dbf708682))
## [5.1.1](https://github.com/decentralized-identity/did-jwt/compare/5.1.0...5.1.1) (2021-03-25)

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

9

lib/JWT.d.ts
import { EcdsaSignature } from './util';
import type { Resolver, VerificationMethod, DIDResolutionResult } from 'did-resolver';
import type { Resolvable, VerificationMethod, DIDResolutionResult } from 'did-resolver';
export declare type Signer = (data: string | Uint8Array) => Promise<EcdsaSignature | string>;

@@ -14,5 +14,2 @@ export declare type SignerAlgorithm = (payload: string, signer: Signer) => Promise<string>;

}
export declare type Public<T> = {
[P in keyof T]: T[P];
};
export interface JWTVerifyOptions {

@@ -23,3 +20,3 @@ /** @deprecated Please use `proofPurpose: 'authentication' instead` */

callbackUrl?: string;
resolver?: Public<Resolver>;
resolver?: Resolvable;
skewTime?: number;

@@ -167,3 +164,3 @@ /** See https://www.w3.org/TR/did-spec-registries/#verification-relationships */

*/
export declare function resolveAuthenticator(resolver: Public<Resolver>, alg: string, issuer: string, proofPurpose?: string): Promise<DIDAuthenticator>;
export declare function resolveAuthenticator(resolver: Resolvable, alg: string, issuer: string, proofPurpose?: string): Promise<DIDAuthenticator>;
//# sourceMappingURL=JWT.d.ts.map
import { Encrypter, Decrypter } from './JWE';
import type { Resolver } from 'did-resolver';
import { Public } from './JWT';
import type { Resolvable } from 'did-resolver';
export declare function xc20pDirEncrypter(key: Uint8Array): Encrypter;
export declare function xc20pDirDecrypter(key: Uint8Array): Decrypter;
export declare function x25519Encrypter(publicKey: Uint8Array, kid?: string): Encrypter;
export declare function resolveX25519Encrypters(dids: string[], resolver: Public<Resolver>): Promise<Encrypter[]>;
export declare function resolveX25519Encrypters(dids: string[], resolver: Resolvable): Promise<Encrypter[]>;
export declare function x25519Decrypter(secretKey: Uint8Array): Decrypter;
//# sourceMappingURL=xc20pEncryption.d.ts.map
{
"name": "did-jwt",
"version": "5.1.1",
"version": "5.1.2",
"description": "Library for Signing and Verifying JWTs compatible uPort and DID standards",

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

"@types/elliptic": "6.4.12",
"@types/jest": "26.0.21",
"@types/jest": "26.0.22",
"codecov": "3.8.1",

@@ -67,3 +67,3 @@ "eslint": "7.22.0",

"microbundle": "0.13.0",
"mockdate": "3.0.4",
"mockdate": "3.0.5",
"nacl-did": "1.0.1",

@@ -81,3 +81,3 @@ "prettier": "2.2.1",

"typescript": "4.2.3",
"webpack": "5.27.2",
"webpack": "5.28.0",
"webpack-cli": "4.5.0"

@@ -91,3 +91,3 @@ },

"@stablelib/xchacha20poly1305": "^1.0.0",
"did-resolver": "^3.0.2",
"did-resolver": "^3.1.0",
"elliptic": "^6.5.4",

@@ -94,0 +94,0 @@ "js-sha3": "^0.8.0",

import VerifierAlgorithm from './VerifierAlgorithm'
import SignerAlg from './SignerAlgorithm'
import { encodeBase64url, decodeBase64url, EcdsaSignature } from './util'
import type { Resolver, VerificationMethod, DIDResolutionResult, DIDDocument } from 'did-resolver'
import type { Resolvable, VerificationMethod, DIDResolutionResult, DIDDocument } from 'did-resolver'

@@ -19,4 +19,2 @@ export type Signer = (data: string | Uint8Array) => Promise<EcdsaSignature | string>

export type Public<T> = { [P in keyof T]: T[P] }
export interface JWTVerifyOptions {

@@ -27,3 +25,3 @@ /** @deprecated Please use `proofPurpose: 'authentication' instead` */

callbackUrl?: string
resolver?: Public<Resolver>
resolver?: Resolvable
skewTime?: number

@@ -355,3 +353,3 @@ /** See https://www.w3.org/TR/did-spec-registries/#verification-relationships */

export async function resolveAuthenticator(
resolver: Public<Resolver>,
resolver: Resolvable,
alg: string,

@@ -358,0 +356,0 @@ issuer: string,

@@ -7,4 +7,3 @@ import { XChaCha20Poly1305 } from '@stablelib/xchacha20poly1305'

import { Recipient, EncryptionResult, Encrypter, Decrypter } from './JWE'
import type { VerificationMethod, Resolver } from 'did-resolver'
import { Public } from './JWT'
import type { VerificationMethod, Resolvable } from 'did-resolver'

@@ -83,3 +82,3 @@ function xc20pEncrypter(key: Uint8Array): (cleartext: Uint8Array, aad?: Uint8Array) => EncryptionResult {

export async function resolveX25519Encrypters(dids: string[], resolver: Public<Resolver>): Promise<Encrypter[]> {
export async function resolveX25519Encrypters(dids: string[], resolver: Resolvable): Promise<Encrypter[]> {
return Promise.all(

@@ -86,0 +85,0 @@ dids.map(async (did) => {

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