Skip to content

Instantly share code, notes, and snippets.

@fabianekc
Created September 1, 2020 19:14
Show Gist options
  • Save fabianekc/7277c9438bac804e3fdb1c451d57ce03 to your computer and use it in GitHub Desktop.
Save fabianekc/7277c9438bac804e3fdb1c451d57ce03 to your computer and use it in GitHub Desktop.
validate did:web
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
exports.__esModule = true;
var did_resolver_1 = require("did-resolver");
var web_did_resolver_1 = require("web-did-resolver");
var webResolver = web_did_resolver_1.getResolver();
var didResolver = new did_resolver_1.Resolver(__assign({}, webResolver
));
didResolver.resolve('did:web:data-vault.eu:u:zi4xgcHtYo7fh_KAURaO1beG2v6WN9ImVnQ30CBDEJjLrw').then(function (doc) {
// do things with did
console.log(doc);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment