diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a19f8f..2afe47a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 0.0.11 + +### Bug Fixes +* Fixes incorrect encoded value for 'domain' attribute in proof. +* Update lacchain trust dependency to version 0.0.7 (fix revoke jwk case) + ### 0.0.9 * Update verification Registry default contract address for OpenProtest network to '0x64CaA0fC7E0C1f051078da9525A31D00dB1F50eE' (since this considers isRevoked flag on queried for a digest issued by some entity) diff --git a/package.json b/package.json index 4cffd85..5ab09e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lacpass-client", - "version": "0.0.9", + "version": "0.0.11", "description": "Rest api for lacpass Client", "license": "MIT", "scripts": { @@ -81,7 +81,7 @@ "form-data": "^4.0.0", "helmet": "^5.0.2", "jsonwebtoken": "^9.0.0", - "lacchain-trust": "^0.0.6", + "lacchain-trust": "^0.0.7", "morgan": "^1.10.0", "multer": "^1.4.4", "nodemailer": "^6.7.3", diff --git a/src/services/verifiable-credentials/verifiable.credentials.service.ts b/src/services/verifiable-credentials/verifiable.credentials.service.ts index e867a58..2125489 100644 --- a/src/services/verifiable-credentials/verifiable.credentials.service.ts +++ b/src/services/verifiable-credentials/verifiable.credentials.service.ts @@ -59,6 +59,7 @@ type assertionPublicKeyType = { hexPubKey: string; keyId: string }; type credentialFingerPrint = { hash: string; digest: string }; @Service() export class VerifiableCredentialService { + private readonly hex = require('base-x')('0123456789abcdef'); private readonly base58 = require('base-x')( '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' ); @@ -980,7 +981,8 @@ export class VerifiableCredentialService { Buffer.from(verificationRegistryContractAddress.replace('0x', ''), 'hex'), Buffer.from(publicDirectoryContractAddress.replace('0x', ''), 'hex'), Buffer.from(chainOfTrustContractAddress.replace('0x', ''), 'hex'), - Buffer.from(CHAIN_ID.replace('0x', ''), 'hex') + // eslint-disable-next-line max-len + this.hex.decode(CHAIN_ID.replace('0x', ''), 'hex') // the same as Buffer.from(evenHexWithout0x, 'hex') ]; payload.push(this.checksum(payload)); return this.base58.encode(Buffer.concat(payload)); diff --git a/yarn.lock b/yarn.lock index 5b49b32..21830b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5790,10 +5790,10 @@ koa@^2.8.2: type-is "^1.6.16" vary "^1.1.2" -lacchain-identity@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/lacchain-identity/-/lacchain-identity-0.0.6.tgz#9f59a4a35d06d3c9a316dacd9606e09ae6c4837c" - integrity sha512-p250BxYpxe3/6CFGbicvAgOBkLLyl2XeImCmH869xpgZST4a45G35JkAc2z1nHAYIDfvPmnpsJqJsow5rYuzwg== +lacchain-identity@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/lacchain-identity/-/lacchain-identity-0.0.7.tgz#93b6f9bd7508070100347467278dbc3a76021ce4" + integrity sha512-zKorOuVV6Dip3LrLz0o8CVYsUuY2qDyYln7keG9AdaD5T8AidjSNzaVuh299oV4a66dGomSxV0jlGOVCw/qcRw== dependencies: "@lacchain/gas-model-provider" "^1.0.1" aws-sdk "^2.1116.0" @@ -5873,10 +5873,10 @@ lacchain-key-manager@^0.0.6: typescript-logging "^2.1.0" typescript-logging-log4ts-style "^2.1.0" -lacchain-trust@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/lacchain-trust/-/lacchain-trust-0.0.6.tgz#a049a3212c4be91c99ada046d33a3a6f3eb83783" - integrity sha512-He7vIEySgGHDDtc2UJRQ3XQhMROwDecUdLeOoYzybQpNgLZTFESLLG8s6BVsPNSWgZHUt+5qt3zmCN4avE2gXQ== +lacchain-trust@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/lacchain-trust/-/lacchain-trust-0.0.7.tgz#9cd89db2eea3d347f8d86879b54b89fcdce3029b" + integrity sha512-4n2VyH+mUbhMAKZjrqAibRcLoxAn+CDwc33Hf+IhVJ5e6TANlqPhGyjWs3tjTYFX/QvlAPXl2/c5MeEo5CWDYA== dependencies: "@lacchain/gas-model-provider" "^1.0.1" aws-sdk "^2.1116.0" @@ -5895,7 +5895,7 @@ lacchain-trust@^0.0.6: express-rate-limit "^6.3.0" helmet "^5.0.2" jsonwebtoken "^9.0.0" - lacchain-identity "^0.0.6" + lacchain-identity "^0.0.7" morgan "^1.10.0" multer "^1.4.4" nodemailer "^6.7.3"