Skip to content

Commit

Permalink
update verification registry contract address
Browse files Browse the repository at this point in the history
Signed-off-by: eum602 <[email protected]>
  • Loading branch information
eum602 committed Oct 10, 2023
1 parent 81e835b commit 6ce1739
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ NODE_ADDRESS = 0xad730de8c4bfc3d845f7ce851bcf2ea17c049585

## verification registry
# PROOF_OF_EXISTENCE_MODE = "ENABLED_NOT_THROWABLE" # options: "STRICT", "DISABLED", by default "ENABLED_NOT_THROWABLE"
# VERIFICATION_REGISTRY_CONTRACT_ADDRESS = '0xF17Da8641771c0196318515b662b0C00132C4163' # optional, just in case you are willing to use another verification registry
# VERIFICATION_REGISTRY_CONTRACT_ADDRESS = '0x64CaA0fC7E0C1f051078da9525A31D00dB1F50eE' # optional, just in case you are willing to use another verification registry
2 changes: 1 addition & 1 deletion .example.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ NODE_ADDRESS = 0xad730de8c4bfc3d845f7ce851bcf2ea17c049585

## verification registry
# PROOF_OF_EXISTENCE_MODE = "ENABLED_NOT_THROWABLE" # options: "STRICT", "DISABLED", by default "ENABLED_NOT_THROWABLE"
# VERIFICATION_REGISTRY_CONTRACT_ADDRESS = '0xF17Da8641771c0196318515b662b0C00132C4163' # optional, just in case you are willing to use another verification registry
# VERIFICATION_REGISTRY_CONTRACT_ADDRESS = '0x64CaA0fC7E0C1f051078da9525A31D00dB1F50eE' # optional, just in case you are willing to use another verification registry
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 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)
### 0.0.8

* Update credential schema version to https://www.w3.org/ns/credentials/v2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lacpass-client",
"version": "0.0.8",
"version": "0.0.9",
"description": "Rest api for lacpass Client",
"license": "MIT",
"scripts": {
Expand Down
29 changes: 5 additions & 24 deletions src/constants/lacchain/verification.registry.abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ export const VERIFICATION_REGISTRY_ABI = [
internalType: 'bool',
name: 'onHold',
type: 'bool'
},
{
internalType: 'bool',
name: 'isRevoked',
type: 'bool'
}
],
stateMutability: 'view',
Expand All @@ -401,30 +406,6 @@ export const VERIFICATION_REGISTRY_ABI = [
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
internalType: 'address',
name: 'issuer',
type: 'address'
},
{
internalType: 'bytes32',
name: 'digest',
type: 'bytes32'
}
],
name: 'isValidCredential',
outputs: [
{
internalType: 'bool',
name: 'value',
type: 'bool'
}
],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/constants/verification.registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export const VERIFICATION_REGISTRY_CONTRACT_ADDRESSES: Map<string, string> =
new Map<string, string>();
VERIFICATION_REGISTRY_CONTRACT_ADDRESSES.set(
'0x9e55c',
'0xF17Da8641771c0196318515b662b0C00132C4163'
'0x64CaA0fC7E0C1f051078da9525A31D00dB1F50eE'
);
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ export class VerifiableCredentialService {
expiration = Math.floor(new Date(validUntil).getTime() / 1000);
}
}
console.log('digest is', digest);
return this.verificationRegistryService.verifyAndIssueSigned(
issuerDid,
digest,
Expand Down Expand Up @@ -925,8 +924,6 @@ export class VerifiableCredentialService {
proofConfig
);

console.log('during proof add process', hashData.digest);

const p256CompressedPubKey = '0x02' + pubKey;
const messageRequest: ISignPlainMessageByCompressedPublicKey = {
compressedPublicKey: p256CompressedPubKey,
Expand Down
4 changes: 2 additions & 2 deletions src/services/verifiable-credentials/verification.registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class VerificationRegistry {
);
this.domainSeparator = keccak256(eds);
this.ISSUE_TYPEHASH = keccak256(
toUtf8Bytes('Issue(bytes32 digest, uint256 exp, address identity)')
); // OK -> 0xaaf414ba23a8cfcf004a7f75188441e59666f98d85447b5665cf04052d8e2bc3
toUtf8Bytes('Issue(bytes32 digest,uint256 exp,address identity)')
);
this.didServiceLac1 = new DidServiceLac1();
this.keyManager = new KeyManagerService();
const rpcUrl = getRpcUrl();
Expand Down

0 comments on commit 6ce1739

Please sign in to comment.