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

@ceramicnetwork/3id-did-resolver

Package Overview
Dependencies
Maintainers
4
Versions
621
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ceramicnetwork/3id-did-resolver - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.5.4](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/3id-did-resolver@0.5.3...@ceramicnetwork/3id-did-resolver@0.5.4) (2020-12-08)
### Bug Fixes
* **3id-did-resovler:** resolve legacy 3IDs properly ([#596](https://github.com/ceramicnetwork/js-ceramic/issues/596)) ([ee1699d](https://github.com/ceramicnetwork/js-ceramic/commit/ee1699de0ca015f9e433e6c5ae304ca52fd09a96))
## [0.5.3](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/3id-did-resolver@0.5.2...@ceramicnetwork/3id-did-resolver@0.5.3) (2020-12-01)

@@ -8,0 +19,0 @@

20

lib/index.js

@@ -71,11 +71,2 @@ "use strict";

}, startDoc);
if (content.idx != null) {
doc.service = [
{
id: `${did}#idx`,
type: 'IdentityIndexRoot',
serviceEndpoint: content.idx,
},
];
}
return doc;

@@ -104,7 +95,6 @@ }

return legacyDoc;
const managementKey = `did:key:${legacyPublicKeys.publicKeys.signing}`;
try {
const content = { metadata: { controllers: [managementKey], family: '3id' } };
const doc = await ceramic.createDocument('tile', content, { applyOnly: true });
const didDoc = await resolve(ceramic, doc.id.toString(), version);
const docParams = { deterministic: true, metadata: { controllers: [legacyPublicKeys.keyDid], family: '3id' } };
const doc = await ceramic.createDocument('tile', docParams, { applyOnly: true });
const didDoc = await resolve(ceramic, doc.id.toString(), version, didId);
return didDoc;

@@ -118,6 +108,6 @@ }

};
const resolve = async (ceramic, didId, version) => {
const resolve = async (ceramic, didId, version, v03ID) => {
const docId = docid_1.default.fromString(didId, version);
const doctype = await ceramic.loadDocument(docId);
return wrapDocument(doctype.content, `did:3:${didId}`);
return wrapDocument(doctype.content, `did:3:${v03ID || didId}`);
};

@@ -124,0 +114,0 @@ exports.default = {

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

return {
keyDid: `did:key:${signing}`,
publicKeys: {

@@ -72,0 +73,0 @@ [signing.slice(-15)]: signing,

{
"name": "@ceramicnetwork/3id-did-resolver",
"version": "0.5.3",
"version": "0.5.4",
"description": "DID Resolver for the 3ID method",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"@ceramicnetwork/common": "^0.14.0",
"@ceramicnetwork/common": "^0.14.1",
"@ceramicnetwork/docid": "^0.3.0",

@@ -50,3 +50,3 @@ "cids": "^1.0.2",

"eslint-plugin-jest": "^23.8.2",
"jest": "^25.1.0",
"jest": "^26.6.3",
"tmp-promise": "^2.0.2"

@@ -59,3 +59,3 @@ },

},
"gitHead": "0c69236a6797553f70369d73442f6b8eefa2f3d2"
"gitHead": "212a548f4854685a931d4055f04ac2e29591d072"
}

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