diff --git a/package-lock.json b/package-lock.json index 4cd05f71..c5789130 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@identity.com/credential-commons", - "version": "0.2.33", + "version": "0.2.34", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3125,12 +3125,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3145,17 +3147,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3272,7 +3277,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3284,6 +3290,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3298,6 +3305,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3305,12 +3313,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3329,6 +3339,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3409,7 +3420,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3421,6 +3433,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3542,6 +3555,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/package.json b/package.json index 2804fa7e..c23f3e17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@identity.com/credential-commons", - "version": "0.2.33", + "version": "0.2.34", "author": "Identity.com Community", "license": "MIT", "description": "Verifiable Credential and Attestation Library", diff --git a/src/creds/VerifiableCredential.js b/src/creds/VerifiableCredential.js index e0921e13..81c0a604 100644 --- a/src/creds/VerifiableCredential.js +++ b/src/creds/VerifiableCredential.js @@ -273,10 +273,24 @@ function VerifiableCredentialBaseConstructor(identifier, issuer, expiryIn, ucas, * Request that this credential MerkleRoot is anchored on the Blockchain. * This will return a _temporary_ anchor meaning that the blockchain entry is still not confirmed. * @param {*} options + * + * @param options options to be passed + * @param options.subject the local signed subject with the user private key + * @param options.subject.label a short description of the subject + * @param options.subject.data hash of the merkle root + * @param options.subject.pub xpub of the signing private key + * @param options.subject.signature the value of the signature of the private key + * @param options.network testnet for test env, bitcoin for production + * @param options.cosigner object containing private and public key for cosigning + * @param options.cosigner.xpub public key of the cosigner + * @param options.cosigner.xprv private key of the cosigner + * + * @returns the json object containing the whole anchor attestation + * */ this.requestAnchor = async (options) => { const anchorService = services.container.AnchorService; - const anchor = await anchorService.anchor(this.identifier, this.proof.merkleRoot, options); + const anchor = await anchorService.anchor(options); this.proof.anchor = anchor; return this; };