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

@sphereon/ssi-sdk-ext.did-utils

Package Overview
Dependencies
Maintainers
4
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sphereon/ssi-sdk-ext.did-utils - npm Package Compare versions

Comparing version 0.13.1-next.5 to 0.13.1-next.6

30

dist/did-functions.js

@@ -283,2 +283,3 @@ "use strict";

let resolutionResult;
let origResolutionResult;
let err;

@@ -293,2 +294,8 @@ if (this.resolverResolution) {

}
if (resolutionResult) {
origResolutionResult = resolutionResult;
if (resolutionResult.didDocument === null) {
resolutionResult = undefined;
}
}
if (!resolutionResult && this.localResolution) {

@@ -299,3 +306,5 @@ try {

resolutionResult = toDidResolutionResult(iIdentifier, { did });
err = undefined;
if (resolutionResult.didDocument) {
err = undefined;
}
}

@@ -308,5 +317,18 @@ catch (error) {

}
if (resolutionResult) {
if (!origResolutionResult) {
origResolutionResult = resolutionResult;
}
if (!resolutionResult.didDocument) {
resolutionResult = undefined;
}
}
if (!resolutionResult && this.uniresolverResolution) {
resolutionResult = yield new did_uni_client_1.UniResolver().resolve(didUrl, options);
err = undefined;
if (!origResolutionResult) {
origResolutionResult = resolutionResult;
}
if (resolutionResult.didDocument) {
err = undefined;
}
}

@@ -317,6 +339,6 @@ if (err) {

}
if (!resolutionResult) {
if (!resolutionResult && !origResolutionResult) {
throw `Could not resolve ${didUrl}. Resolutions tried: online: ${this.resolverResolution}, local: ${this.localResolution}, uni resolver: ${this.uniresolverResolution}`;
}
return resolutionResult;
return resolutionResult !== null && resolutionResult !== void 0 ? resolutionResult : origResolutionResult;
});

@@ -323,0 +345,0 @@ }

6

package.json
{
"name": "@sphereon/ssi-sdk-ext.did-utils",
"description": "DID Utils",
"version": "0.13.1-next.5+91def9c",
"version": "0.13.1-next.6+a678459",
"source": "src/index.ts",

@@ -14,3 +14,3 @@ "main": "dist/index.js",

"@sphereon/did-uni-client": "^0.6.0",
"@sphereon/ssi-sdk-ext.key-utils": "0.13.1-next.5+91def9c",
"@sphereon/ssi-sdk-ext.key-utils": "0.13.1-next.6+a678459",
"@veramo/core": "4.2.0",

@@ -38,3 +38,3 @@ "@veramo/utils": "4.2.0",

"keywords": [],
"gitHead": "91def9c446849521f5e9da5beb07bab6871501d1"
"gitHead": "a678459a74b6b8a39f5b2229e790ca06a346d93e"
}

@@ -271,2 +271,3 @@ import { UniResolver } from '@sphereon/did-uni-client'

let resolutionResult: DIDResolutionResult | undefined
let origResolutionResult: DIDResolutionResult | undefined
let err: any

@@ -280,2 +281,8 @@ if (this.resolverResolution) {

}
if (resolutionResult) {
origResolutionResult = resolutionResult
if (resolutionResult.didDocument === null) {
resolutionResult = undefined
}
}
if (!resolutionResult && this.localResolution) {

@@ -286,3 +293,5 @@ try {

resolutionResult = toDidResolutionResult(iIdentifier, { did })
err = undefined
if (resolutionResult.didDocument) {
err = undefined
}
} catch (error: unknown) {

@@ -294,5 +303,18 @@ if (!err) {

}
if (resolutionResult) {
if (!origResolutionResult) {
origResolutionResult = resolutionResult
}
if (!resolutionResult.didDocument) {
resolutionResult = undefined
}
}
if (!resolutionResult && this.uniresolverResolution) {
resolutionResult = await new UniResolver().resolve(didUrl, options)
err = undefined
if (!origResolutionResult) {
origResolutionResult = resolutionResult
}
if (resolutionResult.didDocument) {
err = undefined
}
}

@@ -304,6 +326,6 @@

}
if (!resolutionResult) {
if (!resolutionResult && !origResolutionResult) {
throw `Could not resolve ${didUrl}. Resolutions tried: online: ${this.resolverResolution}, local: ${this.localResolution}, uni resolver: ${this.uniresolverResolution}`
}
return resolutionResult
return resolutionResult ?? origResolutionResult!
}

@@ -310,0 +332,0 @@ }

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