New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

did-veres-one

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

did-veres-one - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

9

CHANGELOG.md
# did-veres-one ChangeLog
## 1.0.0 - 2018-09-19
### Added
- Add `service` and `serviceEndpoint` terms.
### Changed
- Put service property in public did.
- Update ursa dependency to a Node 10.x compatible commit on #master.
## 0.1.2 - 2018-03-20

@@ -4,0 +13,0 @@

2

dist/did-veres-one.min.js

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

define("did-veres-one",[],function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=12)}([function(e,t){var i,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,d=[],u=!1,l=-1;function p(){u&&s&&(u=!1,s.length?d=s.concat(d):l=-1,d.length&&y())}function y(){if(!u){var e=c(p);u=!0;for(var t=d.length;t;){for(s=d,d=[];++l<t;)s&&s[l].run();l=-1,t=d.length}s=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];d.push(new f(e,t)),1!==d.length||u||c(y)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){},function(e,t){},function(e,t){},function(e,t){e.exports={"@context":{"@version":1.1,id:"@id",type:"@type",dc:"http://purl.org/dc/terms/",identity:"https://w3id.org/identity#",jldp:"https://w3id.org/json-ld-patch#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",sec:"https://w3id.org/security#",wl:"https://w3id.org/webledger#",didv:"https://w3id.org/did#",ocap:"https://w3id.org/ocap#",xsd:"http://www.w3.org/2001/XMLSchema#",vone:"https://w3id.org/veres-one#",ActionWhitelist:"ocap:ActionWhitelist",AuthorizeRequest:"vone:AuthorizeRequest",Config:"wl:Config",Continuity2017:"wl:Continuity2017",Continuity2017Peer:"wl:Continuity2017Peer",ContinuityMergeEvent:"wl:ContinuityMergeEvent",CreateWebLedgerRecord:"wl:CreateWebLedgerRecord",UpdateWebLedgerRecord:"wl:UpdateWebLedgerRecord",DeleteWebLedgerRecord:"wl:DeleteWebLedgerRecord",CryptographicKey:"sec:Key",Ed25519Signature2018:"sec:Ed25519Signature2018",Ed25519VerificationKey2018:"sec:Ed25519VerificationKey2018",Ed25519SignatureAuthentication2018:"sec:Ed25519SignatureAuthentication2018",Ed25519SignatureCapabilityAuthorization2018:"ocap:Ed25519SignatureCapabilityAuthorization2018",EquihashProof2018:"sec:EquihashProof2018",EventTypeFilter:"wl:EventTypeFilter",GraphSignature2012:"sec:GraphSignature2012",Identity:"identity:Identity",IssueCredential:"didv:IssueCredential",LinkedDataSignature2015:"sec:LinkedDataSignature2015",LinkedDataSignature2016:"sec:LinkedDataSignature2016",ProofOfSignature2017:"wl:ProofOfSignature2017",ProofOfWork2016:"wl:ProofOfWork2016",RevocationCheck:"ocap:RevocationCheck",RegisterDid:"vone:RegisterDid",RsaSignature2018:"sec:RsaSignature2018",RsaSignatureAuthentication2018:"sec:RsaSignatureAuthentication2018",RsaSignatureCapabilityAuthorization2018:"ocap:RsaSignatureCapabilityAuthorization2018",RsaVerificationKey2018:"sec:RsaVerificationKey2018",SequentialList:"wl:SequentialList",SignatureValidator2017:"wl:SignatureValidator2017",UnilateralConsensus2017:"wl:UnilateralConsensus2017",UpdateDidDocument:"vone:UpdateDidDocument",WebLedgerConfiguration:"wl:WebLedgerConfiguration",WebLedgerConfigurationEvent:"wl:WebLedgerConfigurationEvent",WebLedgerEvent:"wl:WebLedgerEvent",WebLedgerEventBlock:"wl:WebLedgerEventBlock",WebLedgerOperationEvent:"wl:WebLedgerOperationEvent",WebLedgerRecord:"wl:WebLedgerRecord",ValidatorFilterByType:"wl:ValidatorFilterByType",approvedSigner:"wl:approvedSigner",authentication:{"@id":"didv:authenticationSuite","@type":"@id","@container":"@set"},blockHeight:"wl:blockHeight",canonicalizationAlgorithm:"sec:canonicalizationAlgorithm",capability:{"@id":"ocap:capability","@type":"@id"},capabilityAction:{"@id":"ocap:capabilityAction","@type":"@vocab"},capabilityStatusList:{"@id":"ocap:capabilityStatusList","@type":"@id"},caveat:{"@id":"ocap:caveat","@type":"@id"},comment:"rdfs:comment",consensusMethod:{"@id":"wl:consensusMethod","@type":"@vocab"},created:{"@id":"dc:created","@type":"xsd:dateTime"},creator:{"@id":"dc:creator","@type":"@id"},description:"schema:description",digestAlgorithm:"sec:digestAlgorithm",digestValue:"sec:digestValue",domain:"sec:domain",entity:"sec:entity",equihashParameterAlgorithm:"sec:equihashParameterAlgorithm",equihashParameterK:{"@id":"sec:equihashParameterK","@type":"xsd:integer"},equihashParameterN:{"@id":"sec:equihashParameterN","@type":"xsd:integer"},event:{"@id":"wl:event","@type":"@id","@container":["@graph","@set"]},eventHash:"wl:eventHash",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},grantCapability:{"@id":"ocap:grantCapabilitySuite","@type":"@id","@container":"@set"},invocationTarget:{"@id":"ocap:invocationTarget","@type":"@id"},invokeCapability:{"@id":"ocap:invokeCapabilitySuite","@type":"@id","@container":"@set"},invoker:{"@id":"ocap:invoker","@type":"@id"},jws:"sec:jws",label:"rdfs:label",ledger:{"@id":"wl:ledger","@type":"@id"},ledgerConfiguration:{"@id":"wl:ledgerConfiguration","@type":"@id","@container":"@graph"},ledgerConfigurationValidator:{"@id":"wl:ledgerConfigurationValidator","@type":"@id","@container":"@set"},minimumProofsRequired:"sec:minimumProofsRequired",minimumSignaturesRequired:"sec:minimumSignaturesRequired",name:"schema:name",nonce:"sec:nonce",normalizationAlgorithm:"sec:normalizationAlgorithm",object:{"@id":"wl:object","@type":"@id"},operation:{"@id":"wl:operation","@type":"@id","@container":["@graph","@set"]},operationValidator:{"@id":"wl:operationValidator","@type":"@id","@container":"@set"},owner:{"@id":"sec:owner","@type":"@id"},parentHash:{"@id":"wl:parentHash","@container":"@set"},recordPatch:{"@id":"wl:recordPatch","@type":"@id","@container":"@graph","@context":{add:"jldp:add",copy:"jldp:copy",frame:{"@id":"jldp:from","@type":"@id"},from:"jldp:from",move:"jldp:move",op:"jldp:op",patch:{"@id":"jldp:patch","@type":"@id","@container":"@set"},path:"jldp:path",remove:"jldp:remove",replace:"jldp:replace",target:{"@id":"jldp:target","@type":"@id"},test:"jldp:test",sequence:{"@id":"jldp:sequence","@type":"xsd:integer"},value:"jldp:value"}},previousBlock:"wl:previousBlock",previousBlockHash:"wl:previousBlockHash",privateKey:{"@id":"sec:privateKey","@type":"@id"},privateKeyPem:"sec:privateKeyPem",proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},proofAlgorithm:"sec:proofAlgorithm",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},proofValue:"sec:proofValue",publicKey:{"@id":"sec:publicKey","@type":"@id","@container":"@set"},publicKeyBase58:"sec:publicKeyBase58",publicKeyPem:"sec:publicKeyPem",record:{"@id":"wl:record","@type":"@id","@container":"@graph"},recommendedElector:{"@id":"wl:recommendedElector","@container":"@set"},requiredProof:"sec:requiredProof",revoked:{"@id":"sec:revoked","@type":"xsd:dateTime"},seeAlso:{"@id":"rdfs:seeAlso","@type":"@id"},signature:"sec:signature",signatureAlgorithm:"sec:signatureAlgorithm",signatureValue:"sec:signatureValue",treeHash:"wl:treeHash",validatorFilter:{"@id":"wl:validatorFilter","@type":"@id"},validatorFilterByType:{"@id":"wl:validatorFilterType","@type":"@vocab"},voter:{"@id":"wl:voter","@type":"@id"}}}},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var n,r,o,a,c,s=1,d={},u=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){f(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},n=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(r=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):n=function(e){setTimeout(f,0,e)}:(a="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&f(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),n=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var r={callback:e,args:t};return d[s]=r,n(s),s++},p.clearImmediate=y}function y(e){delete d[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=d[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(i,n)}}(t)}finally{y(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(1),i(0))},function(e,t,i){(function(e){var n=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(n.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(n.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(6),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(1))},function(e,t,i){"use strict";(function(t,i){const n={};e.exports=n;const r="function"==typeof t&&t,o=r?e=>r(e):e=>setTimeout(e,0);function a(e,t,i){n.nextTick(()=>e(t,i))}"object"==typeof i&&"function"==typeof i.nextTick?n.nextTick=i.nextTick:n.nextTick=o,n.setImmediate=r?o:n.nextTick,n.deepClone=(e=>{if(e&&"object"==typeof e){let t;if(Array.isArray(e)){t=new Array(e.length);for(let i=0;i<t.length;++i)t[i]=n.deepClone(e[i])}else{t={};for(let i in e)t[i]=n.deepClone(e[i])}return t}return e}),n.callbackify=(e=>(async function(...t){const i=t[t.length-1];let n;"function"==typeof i&&t.pop();try{n=await e.apply(null,t)}catch(e){if("function"==typeof i)return a(i,e);throw e}return"function"==typeof i?a(i,null,n):n})),n.normalizeAsyncFn=((e,t)=>e.length<=t?n.callbackify(e):async function(...i){const n=arguments[t];return"function"==typeof n&&i.pop(),new Promise((t,r)=>{i.push((e,i)=>{if("function"==typeof n)return a(n,e,i);e?r(e):t(i)});try{e.apply(null,i)}catch(e){if("function"==typeof n)return a(n,e);r(e)}})}),n.encodeBase64Url=((e,{forge:t})=>{return t.util.encode64(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}),n.decodeBase64Url=((e,{forge:t})=>{let i=e.replace(/-/g,"+").replace(/_/g,"/");const n=i.length%4;if(0===n);else if(2===n)i+="==";else{if(3!==n)throw new Error("Illegal base64 string.");i+="="}return t.util.decode64(i)})}).call(this,i(7).setImmediate,i(0))},function(e,t){function i(e){var t=new Error('Cannot find module "'+e+'".');throw t.code="MODULE_NOT_FOUND",t}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=9},function(e,t,i){"use strict";(function(t,n){e.exports=class{constructor(){this._libs={},this.env={},this.env.nodejs=void 0!==t&&t.versions&&t.versions.node,this.env.nodejs||(this.env.browser=!0)}use(e,t){if(!t){if(!this._libs[e]){const t={forge:"node-forge"}[e]||e;this._libs[e]=n[e]||this.env.nodejs&&i(9)(t),"jsonld"===e&&this.env.nodejs&&(this._libs[e]=this._libs[e](),this._libs[e].useDocumentLoader("node",{secure:!0,strictSSL:!0}))}return this._libs[e]}this._libs[e]=t}}}).call(this,i(0),i(1))},function(e,t,i){(function(n){var r;!function(o){"use strict";const a=i(10),c=i(8),s=void 0!==n&&n.versions&&n.versions.node,d={VERES_ONE_V1_CONTEXT:"https://w3id.org/veres-one/v1"};function u(e){const t=new a;async function n(e,i,n,r){const o=t.use("forge");return new Promise((t,a)=>{o.pkcs5.pbkdf2(e,i,n,r,(e,i)=>e?a(e):t(i))})}e.constants=d,e.contexts={[d.VERES_ONE_V1_CONTEXT]:i(5)},e.createCryptonymDid=(({publicKey:e,encoding:i,env:n="dev"})=>{if(!["forge","pem","base58"].includes(i))throw new TypeError("`encoding` must be `pem` or `base58`.");let r=("live"===n?"did:v1:":"did:v1:test:")+"nym:";if("base58"===i)return r+e;const o=t.use("forge");"pem"===i&&(e=o.pki.publicKeyFromPem(e));const a=o.pki.getPublicKeyFingerprint(e,{md:o.md.sha256.create()});return r+c.encodeBase64Url(a.bytes(),{forge:o})}),e.generate=c.callbackify(async function({didType:i="nym",keyType:n="RsaVerificationKey2018",passphrase:r,env:o="dev"}){const a={"@context":d.VERES_ONE_V1_CONTEXT};let s=null;if("nym"===i&&void 0===r)throw new TypeError('"options.passphrase" must be specified.');if("nym"===i){if(!["RsaVerificationKey2018","Ed25519VerificationKey2018"].includes(n))throw new Error(`Unknown key type: "${n}"`);let t,i,d,u,l;if("Ed25519VerificationKey2018"===n)u="Ed25519SignatureAuthentication2018",l="Ed25519SignatureCapabilityAuthorization2018",t=e.generateEd25519KeyPair,i=e.addEncodedEd25519PublicKey,d=e.addEncryptedEd25519PrivateKey;else{u="RsaSignatureAuthentication2018",l="RsaSignatureCapabilityAuthorization2018";const n=2048;t=(async()=>e.generateRsaKeyPair({keyBits:n})),i=e.addEncodedRsaPublicKey,d=e.addEncryptedRsaPrivateKey}const p={authentication:{type:u,publicKeyHash:"authn-key-1"},grantCapability:{type:l,publicKeyHash:"ocap-grant-key-1"},invokeCapability:{type:l,publicKeyHash:"ocap-invoke-key-1"}};for(const e in p)p[e].keys=await t();const y=e.createCryptonymDid({publicKey:p.authentication.keys.publicKey,encoding:"string"==typeof p.authentication.keys.publicKey?"base58":"forge",env:o});a.id=y;for(const e in p){const t=p[e];a[e]=[{type:t.type,publicKey:[i({id:y+"#"+t.publicKeyHash,type:n,owner:y},t.keys.publicKey)]}]}s=c.deepClone(a);for(const e in p){const{privateKey:t}=p[e].keys,{publicKey:i}=s[e][0];i[0].privateKey=await d({},t,r)}}else{const e=t.use("uuid"),i="live"===o?"did:v1:":"did:v1:test:";a.id=i+"uuid:"+e(),s=c.deepClone(a)}return{publicDidDocument:a,privateDidDocument:s}}),e.publicDidDocument=c.callbackify(async function({privateDidDocument:e}){const t={"@context":c.deepClone(e["@context"]),id:e.id},i=["authentication","grantCapability","invokeCapability"];for(const n of i){t[n]=[];for(const i of e[n]){const e={type:c.deepClone(i.type),publicKey:[]};"@context"in i&&(e["@context"]=c.deepClone(i["@context"]));for(const t of i.publicKey){const i={id:t.id,type:c.deepClone(t.type),owner:t.owner};for(const e of["@context","publicKeyPem","publicKeyBase58"])e in t&&(i[e]=c.deepClone(t[e]));e.publicKey.push(i)}t[n].push(e)}}return t}),e.attachGrantProof=c.callbackify(async function({didDocument:e,creator:i,privateKeyPem:n}){return t.use("jsonld-signatures").sign(e,{algorithm:"RsaSignature2018",creator:i,privateKeyPem:n,proof:{"@context":d.VERES_ONE_V1_CONTEXT,proofPurpose:"grantCapability"}})}),e.wrap=(({didDocument:e,operationType:t="create"})=>{const i={"@context":d.VERES_ONE_V1_CONTEXT};switch(t){case"create":i.type="CreateWebLedgerRecord",i.record=e;break;case"update":i.type="UpdateWebLedgerRecord",i.recordPatch=e.commit();break;default:throw new Error(`Unknown operation type "${t}"`)}return i}),e.attachInvocationProof=c.callbackify(async function({operation:e,capability:i,capabilityAction:n,creator:r,algorithm:o,privateKeyPem:a,privateKeyBase58:c}){return o=a?"RsaSignature2018":"Ed25519Signature2018",t.use("jsonld-signatures").sign(e,{algorithm:o,creator:r,privateKeyPem:a,privateKeyBase58:c,proof:{"@context":d.VERES_ONE_V1_CONTEXT,proofPurpose:"invokeCapability",capability:i,capabilityAction:n}})}),e.attachEquihashProof=c.callbackify(async function({operation:e,env:i="dev",parameters:n}){let r,o;if(n){if("number"!=typeof n.n||"number"!=typeof n.k)throw new TypeError("`parameters.n` and `parameters.k` must be integers.");r=n.n,o=n.k}else switch(i){case"dev":case"test":r=64,o=3;break;case"live":r=144,o=5;break;default:throw new Error('"env" must be "dev", "test", or "live".')}return t.use("jsonld-signatures").sign(e,{algorithm:"EquihashProof2018",parameters:{n:r,k:o}})}),e.generateEd25519KeyPair=c.callbackify(async function(){if(t.env.nodejs){const e=i(4),t=i(3).crypto_sign_keypair();return{publicKey:e.encode(t.publicKey),privateKey:e.encode(t.secretKey)}}const e=t.use("forge"),n=e.pki.ed25519.generateKeyPair();return{publicKey:e.util.binary.base58.encode(n.publicKey),privateKey:e.util.binary.base58.encode(n.privateKey)}}),e.addEncodedEd25519PublicKey=((e,t)=>(e.publicKeyBase58=t,e)),e.addEncryptedEd25519PrivateKey=(async(e,i,r)=>(null!==r?e.jwe=await async function(e,i){const r=t.use("forge"),o=r.random.getBytesSync(32),a=await n(i,o,4096,32),s={alg:"PBES2-A128GCMKW",enc:"A128GCMKW",jwk:{kty:"PBKDF2",s:c.encodeBase64Url(o,{forge:r}),c:4096}},d=r.random.getBytesSync(12),u=r.cipher.createCipher("AES-GCM",a);u.start({iv:d}),u.update(r.util.createBuffer(JSON.stringify(e))),u.finish();const l=u.output.getBytes(),p=u.mode.tag.getBytes();return{unprotected:s,iv:c.encodeBase64Url(d,{forge:r}),ciphertext:c.encodeBase64Url(l,{forge:r}),tag:c.encodeBase64Url(p,{forge:r})}}({privateKeyBase58:i},r):e.privateKeyBase58=i,e)),e.generateRsaKeyPair=c.callbackify(async function({keyBits:e=2048,exponent:n=65537}){const r=t.use("forge");if(t.env.nodejs){const t=i(2).generatePrivateKey(e,n);return{privateKey:r.pki.privateKeyFromPem(t.toPrivatePem()),publicKey:r.pki.publicKeyFromPem(t.toPublicPem())}}return new Promise((t,i)=>{r.pki.rsa.generateKeyPair({bits:e,e:n},(e,n)=>{if(e)return i(e);t(n)})})}),e.addEncodedRsaPublicKey=((e,i)=>{const n=t.use("forge");return e.publicKeyPem=n.pki.publicKeyToPem(i),e}),e.addEncryptedRsaPrivateKey=(async(e,i,n)=>{const r=t.use("forge");return e.privateKeyPem=null!==n?r.pki.encryptRsaPrivateKey(i,n,{algorithm:"aes256"}):r.pki.privateKeyToPem(i),e}),e.use=t.use.bind(t)}const l=function(){return u(function(){return l()})};u(l),s?e.exports=l:void 0===(r=function(){return l}.apply(t,[]))||(e.exports=r)}("undefined"!=typeof window&&window)}).call(this,i(0))},function(e,t,i){e.exports=i(11)}])});
define("did-veres-one",[],function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=2)}([function(e,t){var i,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var s,d=[],u=!1,l=-1;function p(){u&&s&&(u=!1,s.length?d=s.concat(d):l=-1,d.length&&y())}function y(){if(!u){var e=c(p);u=!0;for(var t=d.length;t;){for(s=d,d=[];++l<t;)s&&s[l].run();l=-1,t=d.length}s=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];d.push(new f(e,t)),1!==d.length||u||c(y)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){e.exports=i(3)},function(e,t,i){(function(n){var r;!function(o){"use strict";const a=i(4),c=i(6),s=void 0!==n&&n.versions&&n.versions.node,d={VERES_ONE_V1_CONTEXT:"https://w3id.org/veres-one/v1"};function u(e){const t=new a;async function n(e,i,n,r){const o=t.use("forge");return new Promise((t,a)=>{o.pkcs5.pbkdf2(e,i,n,r,(e,i)=>e?a(e):t(i))})}e.constants=d,e.contexts={[d.VERES_ONE_V1_CONTEXT]:i(9)},e.createCryptonymDid=(({publicKey:e,encoding:i,env:n="dev"})=>{if(!["forge","pem","base58"].includes(i))throw new TypeError("`encoding` must be `pem` or `base58`.");let r=("live"===n?"did:v1:":"did:v1:test:")+"nym:";if("base58"===i)return r+e;const o=t.use("forge");"pem"===i&&(e=o.pki.publicKeyFromPem(e));const a=o.pki.getPublicKeyFingerprint(e,{md:o.md.sha256.create()});return r+c.encodeBase64Url(a.bytes(),{forge:o})}),e.generate=c.callbackify(async function({didType:i="nym",keyType:n="RsaVerificationKey2018",passphrase:r,env:o="dev"}){const a={"@context":d.VERES_ONE_V1_CONTEXT};let s=null;if("nym"===i&&void 0===r)throw new TypeError('"options.passphrase" must be specified.');if("nym"===i){if(!["RsaVerificationKey2018","Ed25519VerificationKey2018"].includes(n))throw new Error(`Unknown key type: "${n}"`);let t,i,d,u,l;if("Ed25519VerificationKey2018"===n)u="Ed25519SignatureAuthentication2018",l="Ed25519SignatureCapabilityAuthorization2018",t=e.generateEd25519KeyPair,i=e.addEncodedEd25519PublicKey,d=e.addEncryptedEd25519PrivateKey;else{u="RsaSignatureAuthentication2018",l="RsaSignatureCapabilityAuthorization2018";const n=2048;t=(async()=>e.generateRsaKeyPair({keyBits:n})),i=e.addEncodedRsaPublicKey,d=e.addEncryptedRsaPrivateKey}const p={authentication:{type:u,publicKeyHash:"authn-key-1"},grantCapability:{type:l,publicKeyHash:"ocap-grant-key-1"},invokeCapability:{type:l,publicKeyHash:"ocap-invoke-key-1"}};for(const e in p)p[e].keys=await t();const y=e.createCryptonymDid({publicKey:p.authentication.keys.publicKey,encoding:"string"==typeof p.authentication.keys.publicKey?"base58":"forge",env:o});a.id=y;for(const e in p){const t=p[e];a[e]=[{type:t.type,publicKey:[i({id:y+"#"+t.publicKeyHash,type:n,owner:y},t.keys.publicKey)]}]}s=c.deepClone(a);for(const e in p){const{privateKey:t}=p[e].keys,{publicKey:i}=s[e][0];i[0].privateKey=await d({},t,r)}}else{const e=t.use("uuid"),i="live"===o?"did:v1:":"did:v1:test:";a.id=i+"uuid:"+e(),s=c.deepClone(a)}return{publicDidDocument:a,privateDidDocument:s}}),e.publicDidDocument=c.callbackify(async function({privateDidDocument:e}){const i={"@context":c.deepClone(e["@context"]),id:e.id},n=["authentication","grantCapability","invokeCapability"];for(const t of n){i[t]=[];for(const n of e[t]){const e={type:c.deepClone(n.type),publicKey:[]};"@context"in n&&(e["@context"]=c.deepClone(n["@context"]));for(const t of n.publicKey){const i={id:t.id,type:c.deepClone(t.type),owner:t.owner};for(const e of["@context","publicKeyPem","publicKeyBase58"])e in t&&(i[e]=c.deepClone(t[e]));e.publicKey.push(i)}i[t].push(e)}}const r=t.use("jsonld"),o=["service"];for(const t of o)r.hasProperty(e,t)&&(i[t]=c.deepClone(e[t]));return i}),e.attachGrantProof=c.callbackify(async function({didDocument:e,creator:i,privateKeyPem:n}){return t.use("jsonld-signatures").sign(e,{algorithm:"RsaSignature2018",creator:i,privateKeyPem:n,proof:{"@context":d.VERES_ONE_V1_CONTEXT,proofPurpose:"grantCapability"}})}),e.wrap=(({didDocument:e,operationType:t="create"})=>{const i={"@context":d.VERES_ONE_V1_CONTEXT};switch(t){case"create":i.type="CreateWebLedgerRecord",i.record=e;break;case"update":i.type="UpdateWebLedgerRecord",i.recordPatch=e.commit();break;default:throw new Error(`Unknown operation type "${t}"`)}return i}),e.attachInvocationProof=c.callbackify(async function({operation:e,capability:i,capabilityAction:n,creator:r,algorithm:o,privateKeyPem:a,privateKeyBase58:c}){return o=a?"RsaSignature2018":"Ed25519Signature2018",t.use("jsonld-signatures").sign(e,{algorithm:o,creator:r,privateKeyPem:a,privateKeyBase58:c,proof:{"@context":d.VERES_ONE_V1_CONTEXT,proofPurpose:"invokeCapability",capability:i,capabilityAction:n}})}),e.attachEquihashProof=c.callbackify(async function({operation:e,env:i="dev",parameters:n}){let r,o;if(n){if("number"!=typeof n.n||"number"!=typeof n.k)throw new TypeError("`parameters.n` and `parameters.k` must be integers.");r=n.n,o=n.k}else switch(i){case"dev":case"test":r=64,o=3;break;case"live":r=144,o=5;break;default:throw new Error('"env" must be "dev", "test", or "live".')}return t.use("jsonld-signatures").sign(e,{algorithm:"EquihashProof2018",parameters:{n:r,k:o}})}),e.generateEd25519KeyPair=c.callbackify(async function(){if(t.env.nodejs){const e=i(10),t=i(11).crypto_sign_keypair();return{publicKey:e.encode(t.publicKey),privateKey:e.encode(t.secretKey)}}const e=t.use("forge"),n=e.pki.ed25519.generateKeyPair();return{publicKey:e.util.binary.base58.encode(n.publicKey),privateKey:e.util.binary.base58.encode(n.privateKey)}}),e.addEncodedEd25519PublicKey=((e,t)=>(e.publicKeyBase58=t,e)),e.addEncryptedEd25519PrivateKey=(async(e,i,r)=>(null!==r?e.jwe=await async function(e,i){const r=t.use("forge"),o=r.random.getBytesSync(32),a=await n(i,o,4096,32),s={alg:"PBES2-A128GCMKW",enc:"A128GCMKW",jwk:{kty:"PBKDF2",s:c.encodeBase64Url(o,{forge:r}),c:4096}},d=r.random.getBytesSync(12),u=r.cipher.createCipher("AES-GCM",a);u.start({iv:d}),u.update(r.util.createBuffer(JSON.stringify(e))),u.finish();const l=u.output.getBytes(),p=u.mode.tag.getBytes();return{unprotected:s,iv:c.encodeBase64Url(d,{forge:r}),ciphertext:c.encodeBase64Url(l,{forge:r}),tag:c.encodeBase64Url(p,{forge:r})}}({privateKeyBase58:i},r):e.privateKeyBase58=i,e)),e.generateRsaKeyPair=c.callbackify(async function({keyBits:e=2048,exponent:n=65537}){const r=t.use("forge");if(t.env.nodejs){const t=i(12).generatePrivateKey(e,n);return{privateKey:r.pki.privateKeyFromPem(t.toPrivatePem()),publicKey:r.pki.publicKeyFromPem(t.toPublicPem())}}return new Promise((t,i)=>{r.pki.rsa.generateKeyPair({bits:e,e:n},(e,n)=>{if(e)return i(e);t(n)})})}),e.addEncodedRsaPublicKey=((e,i)=>{const n=t.use("forge");return e.publicKeyPem=n.pki.publicKeyToPem(i),e}),e.addEncryptedRsaPrivateKey=(async(e,i,n)=>{const r=t.use("forge");return e.privateKeyPem=null!==n?r.pki.encryptRsaPrivateKey(i,n,{algorithm:"aes256"}):r.pki.privateKeyToPem(i),e}),e.use=t.use.bind(t)}const l=function(){return u(function(){return l()})};u(l),s?e.exports=l:void 0===(r=function(){return l}.apply(t,[]))||(e.exports=r)}("undefined"!=typeof window&&window)}).call(this,i(0))},function(e,t,i){"use strict";(function(t,n){e.exports=class{constructor(){this._libs={},this.env={},this.env.nodejs=void 0!==t&&t.versions&&t.versions.node,this.env.nodejs||(this.env.browser=!0)}use(e,t){if(!t){if(!this._libs[e]){const t={forge:"node-forge"}[e]||e;this._libs[e]=n[e]||this.env.nodejs&&i(5)(t),"jsonld"===e&&this.env.nodejs&&(this._libs[e]=this._libs[e](),this._libs[e].useDocumentLoader("node",{secure:!0,strictSSL:!0}))}return this._libs[e]}this._libs[e]=t}}}).call(this,i(0),i(1))},function(e,t){function i(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=5},function(e,t,i){"use strict";(function(t,i){const n={};e.exports=n;const r="function"==typeof t&&t,o=r?e=>r(e):e=>setTimeout(e,0);function a(e,t,i){n.nextTick(()=>e(t,i))}"object"==typeof i&&"function"==typeof i.nextTick?n.nextTick=i.nextTick:n.nextTick=o,n.setImmediate=r?o:n.nextTick,n.deepClone=(e=>{if(e&&"object"==typeof e){let t;if(Array.isArray(e)){t=new Array(e.length);for(let i=0;i<t.length;++i)t[i]=n.deepClone(e[i])}else{t={};for(let i in e)t[i]=n.deepClone(e[i])}return t}return e}),n.callbackify=(e=>(async function(...t){const i=t[t.length-1];let n;"function"==typeof i&&t.pop();try{n=await e.apply(null,t)}catch(e){if("function"==typeof i)return a(i,e);throw e}return"function"==typeof i?a(i,null,n):n})),n.normalizeAsyncFn=((e,t)=>e.length<=t?n.callbackify(e):async function(...i){const n=arguments[t];return"function"==typeof n&&i.pop(),new Promise((t,r)=>{i.push((e,i)=>{if("function"==typeof n)return a(n,e,i);e?r(e):t(i)});try{e.apply(null,i)}catch(e){if("function"==typeof n)return a(n,e);r(e)}})}),n.encodeBase64Url=((e,{forge:t})=>{return t.util.encode64(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}),n.decodeBase64Url=((e,{forge:t})=>{let i=e.replace(/-/g,"+").replace(/_/g,"/");const n=i.length%4;if(0===n);else if(2===n)i+="==";else{if(3!==n)throw new Error("Illegal base64 string.");i+="="}return t.util.decode64(i)})}).call(this,i(7).setImmediate,i(0))},function(e,t,i){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(8),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(1))},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var n,r=1,o={},a=!1,c=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){u(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?function(){var t="setImmediate$"+Math.random()+"$",i=function(i){i.source===e&&"string"==typeof i.data&&0===i.data.indexOf(t)&&u(+i.data.slice(t.length))};e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),n=function(i){e.postMessage(t+i,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){u(e.data)},n=function(t){e.port2.postMessage(t)}}():c&&"onreadystatechange"in c.createElement("script")?function(){var e=c.documentElement;n=function(t){var i=c.createElement("script");i.onreadystatechange=function(){u(t),i.onreadystatechange=null,e.removeChild(i),i=null},e.appendChild(i)}}():n=function(e){setTimeout(u,0,e)},s.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var a={callback:e,args:t};return o[r]=a,n(r),r++},s.clearImmediate=d}function d(e){delete o[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(i,n)}}(t)}finally{d(e),a=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(1),i(0))},function(e,t){e.exports={"@context":{"@version":1.1,id:"@id",type:"@type",dc:"http://purl.org/dc/terms/",identity:"https://w3id.org/identity#",jldp:"https://w3id.org/json-ld-patch#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",sec:"https://w3id.org/security#",wl:"https://w3id.org/webledger#",didv:"https://w3id.org/did#",ocap:"https://w3id.org/ocap#",xsd:"http://www.w3.org/2001/XMLSchema#",vone:"https://w3id.org/veres-one#",ActionWhitelist:"ocap:ActionWhitelist",AuthorizeRequest:"vone:AuthorizeRequest",Config:"wl:Config",Continuity2017:"wl:Continuity2017",Continuity2017Peer:"wl:Continuity2017Peer",ContinuityMergeEvent:"wl:ContinuityMergeEvent",CreateWebLedgerRecord:"wl:CreateWebLedgerRecord",UpdateWebLedgerRecord:"wl:UpdateWebLedgerRecord",DeleteWebLedgerRecord:"wl:DeleteWebLedgerRecord",CryptographicKey:"sec:Key",Ed25519Signature2018:"sec:Ed25519Signature2018",Ed25519VerificationKey2018:"sec:Ed25519VerificationKey2018",Ed25519SignatureAuthentication2018:"sec:Ed25519SignatureAuthentication2018",Ed25519SignatureCapabilityAuthorization2018:"ocap:Ed25519SignatureCapabilityAuthorization2018",EquihashProof2018:"sec:EquihashProof2018",EventTypeFilter:"wl:EventTypeFilter",GraphSignature2012:"sec:GraphSignature2012",Identity:"identity:Identity",IssueCredential:"didv:IssueCredential",LinkedDataSignature2015:"sec:LinkedDataSignature2015",LinkedDataSignature2016:"sec:LinkedDataSignature2016",ProofOfSignature2017:"wl:ProofOfSignature2017",ProofOfWork2016:"wl:ProofOfWork2016",RevocationCheck:"ocap:RevocationCheck",RegisterDid:"vone:RegisterDid",RsaSignature2018:"sec:RsaSignature2018",RsaSignatureAuthentication2018:"sec:RsaSignatureAuthentication2018",RsaSignatureCapabilityAuthorization2018:"ocap:RsaSignatureCapabilityAuthorization2018",RsaVerificationKey2018:"sec:RsaVerificationKey2018",SequentialList:"wl:SequentialList",SignatureValidator2017:"wl:SignatureValidator2017",UnilateralConsensus2017:"wl:UnilateralConsensus2017",UpdateDidDocument:"vone:UpdateDidDocument",WebLedgerConfiguration:"wl:WebLedgerConfiguration",WebLedgerConfigurationEvent:"wl:WebLedgerConfigurationEvent",WebLedgerEvent:"wl:WebLedgerEvent",WebLedgerEventBlock:"wl:WebLedgerEventBlock",WebLedgerOperationEvent:"wl:WebLedgerOperationEvent",WebLedgerRecord:"wl:WebLedgerRecord",ValidatorFilterByType:"wl:ValidatorFilterByType",approvedSigner:"wl:approvedSigner",authentication:{"@id":"didv:authenticationSuite","@type":"@id","@container":"@set"},blockHeight:"wl:blockHeight",canonicalizationAlgorithm:"sec:canonicalizationAlgorithm",capability:{"@id":"ocap:capability","@type":"@id"},capabilityAction:{"@id":"ocap:capabilityAction","@type":"@vocab"},capabilityStatusList:{"@id":"ocap:capabilityStatusList","@type":"@id"},caveat:{"@id":"ocap:caveat","@type":"@id"},comment:"rdfs:comment",consensusMethod:{"@id":"wl:consensusMethod","@type":"@vocab"},created:{"@id":"dc:created","@type":"xsd:dateTime"},creator:{"@id":"dc:creator","@type":"@id"},description:"schema:description",digestAlgorithm:"sec:digestAlgorithm",digestValue:"sec:digestValue",domain:"sec:domain",entity:"sec:entity",equihashParameterAlgorithm:"sec:equihashParameterAlgorithm",equihashParameterK:{"@id":"sec:equihashParameterK","@type":"xsd:integer"},equihashParameterN:{"@id":"sec:equihashParameterN","@type":"xsd:integer"},event:{"@id":"wl:event","@type":"@id","@container":["@graph","@set"]},eventHash:"wl:eventHash",expires:{"@id":"sec:expiration","@type":"xsd:dateTime"},grantCapability:{"@id":"ocap:grantCapabilitySuite","@type":"@id","@container":"@set"},invocationTarget:{"@id":"ocap:invocationTarget","@type":"@id"},invokeCapability:{"@id":"ocap:invokeCapabilitySuite","@type":"@id","@container":"@set"},invoker:{"@id":"ocap:invoker","@type":"@id"},jws:"sec:jws",label:"rdfs:label",ledger:{"@id":"wl:ledger","@type":"@id"},ledgerConfiguration:{"@id":"wl:ledgerConfiguration","@type":"@id","@container":"@graph"},ledgerConfigurationValidator:{"@id":"wl:ledgerConfigurationValidator","@type":"@id","@container":"@set"},minimumProofsRequired:"sec:minimumProofsRequired",minimumSignaturesRequired:"sec:minimumSignaturesRequired",name:"schema:name",nonce:"sec:nonce",normalizationAlgorithm:"sec:normalizationAlgorithm",object:{"@id":"wl:object","@type":"@id"},operation:{"@id":"wl:operation","@type":"@id","@container":["@graph","@set"]},operationValidator:{"@id":"wl:operationValidator","@type":"@id","@container":"@set"},owner:{"@id":"sec:owner","@type":"@id"},parentHash:{"@id":"wl:parentHash","@container":"@set"},recordPatch:{"@id":"wl:recordPatch","@type":"@id","@container":"@graph","@context":{add:"jldp:add",copy:"jldp:copy",frame:{"@id":"jldp:from","@type":"@id"},from:"jldp:from",move:"jldp:move",op:"jldp:op",patch:{"@id":"jldp:patch","@type":"@id","@container":"@set"},path:"jldp:path",remove:"jldp:remove",replace:"jldp:replace",target:{"@id":"jldp:target","@type":"@id"},test:"jldp:test",sequence:{"@id":"jldp:sequence","@type":"xsd:integer"},value:"jldp:value"}},previousBlock:"wl:previousBlock",previousBlockHash:"wl:previousBlockHash",privateKey:{"@id":"sec:privateKey","@type":"@id"},privateKeyPem:"sec:privateKeyPem",proof:{"@id":"sec:proof","@type":"@id","@container":"@graph"},proofAlgorithm:"sec:proofAlgorithm",proofPurpose:{"@id":"sec:proofPurpose","@type":"@vocab"},proofValue:"sec:proofValue",publicKey:{"@id":"sec:publicKey","@type":"@id","@container":"@set"},publicKeyBase58:"sec:publicKeyBase58",publicKeyPem:"sec:publicKeyPem",record:{"@id":"wl:record","@type":"@id","@container":"@graph"},recommendedElector:{"@id":"wl:recommendedElector","@container":"@set"},requiredProof:"sec:requiredProof",revoked:{"@id":"sec:revoked","@type":"xsd:dateTime"},seeAlso:{"@id":"rdfs:seeAlso","@type":"@id"},service:{"@id":"didv:service","@type":"@id","@container":"@set"},serviceEndpoint:{"@id":"didv:serviceEndpoint","@type":"@id"},signature:"sec:signature",signatureAlgorithm:"sec:signatureAlgorithm",signatureValue:"sec:signatureValue",treeHash:"wl:treeHash",validatorFilter:{"@id":"wl:validatorFilter","@type":"@id"},validatorFilterByType:{"@id":"wl:validatorFilterType","@type":"@vocab"},voter:{"@id":"wl:voter","@type":"@id"}}}},function(e,t){},function(e,t){},function(e,t){}])});

@@ -139,2 +139,4 @@ module.exports = {

"seeAlso": {"@id": "rdfs:seeAlso", "@type": "@id"},
"service": {"@id": "didv:service", "@type": "@id", "@container": "@set"},
"serviceEndpoint": {"@id": "didv:serviceEndpoint", "@type": "@id"},
"signature": "sec:signature",

@@ -141,0 +143,0 @@ "signatureAlgorithm": "sec:signatureAlgorithm",

@@ -182,2 +182,4 @@ /*

};
// suites
const suites = ['authentication', 'grantCapability', 'invokeCapability'];

@@ -210,2 +212,13 @@ for(const suite of suites) {

}
// other properties
const jsonld = injector.use('jsonld');
const properties = ['service'];
for(const property of properties) {
if(jsonld.hasProperty(privateDidDocument, property)) {
publicDidDocument[property] =
util.deepClone(privateDidDocument[property]);
}
}
return publicDidDocument;

@@ -212,0 +225,0 @@ });

{
"name": "did-veres-one",
"version": "0.1.2",
"version": "1.0.0",
"description": "A Decentralized Identifier utility library for Veres One",

@@ -32,3 +32,3 @@ "main": "lib",

"node-forge": "^0.7.4",
"ursa": "^0.9.4",
"ursa": "github:JoshKaufman/ursa#7083023efe0dd3802573c4cdbe8b4916708a5a51",
"uuid": "3.2.1"

@@ -35,0 +35,0 @@ },

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