Skip to content

Commit

Permalink
Merge pull request #65 from lacchain/fix/domain-encoding
Browse files Browse the repository at this point in the history
Fix/domain encoding
  • Loading branch information
eum602 authored Oct 17, 2023
2 parents e066c6b + 4c91410 commit b37a9d8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lacpass-client",
"version": "0.0.9",
"version": "0.0.11",
"description": "Rest api for lacpass Client",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
Expand Down Expand Up @@ -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));
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit b37a9d8

Please sign in to comment.