Skip to content

Commit d0a66a1

Browse files
authored
fix: aadhaar verifier abi (#1096)
* fix: aadhaar verifier abi * bump: core
1 parent 779fea5 commit d0a66a1

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

sdk/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@selfxyz/core",
3-
"version": "1.1.0-beta.1",
3+
"version": "1.1.0-beta.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/selfxyz/self"

sdk/core/src/SelfBackendVerifier.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { ethers } from 'ethers';
22
import { hashEndpointWithScope } from '@selfxyz/common/utils/scope';
33
import {
4+
AadhaarVerifier,
5+
AadhaarVerifier__factory,
46
IdentityVerificationHubImpl,
57
IdentityVerificationHubImpl__factory,
68
Registry__factory,
@@ -304,15 +306,19 @@ export class SelfBackendVerifier {
304306
throw new ConfigMismatchError(issues);
305307
}
306308

307-
let verifierContract: Verifier;
309+
let verifierContract: Verifier | AadhaarVerifier;
308310
try {
309311
const verifierAddress = await this.identityVerificationHubContract.discloseVerifier(
310312
'0x' + attestationId.toString(16).padStart(64, '0')
311313
);
312314
if (verifierAddress === '0x0000000000000000000000000000000000000000') {
313315
throw new VerifierContractError('Verifier contract not found');
314316
}
315-
verifierContract = Verifier__factory.connect(verifierAddress, this.provider);
317+
if (attestationId === 3) {
318+
verifierContract = AadhaarVerifier__factory.connect(verifierAddress, this.provider);
319+
} else {
320+
verifierContract = Verifier__factory.connect(verifierAddress, this.provider);
321+
}
316322
} catch (error) {
317323
throw new VerifierContractError('Verifier contract not found');
318324
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[
2+
{
3+
"inputs": [
4+
{
5+
"internalType": "uint256[2]",
6+
"name": "a",
7+
"type": "uint256[2]"
8+
},
9+
{
10+
"internalType": "uint256[2][2]",
11+
"name": "b",
12+
"type": "uint256[2][2]"
13+
},
14+
{
15+
"internalType": "uint256[2]",
16+
"name": "c",
17+
"type": "uint256[2]"
18+
},
19+
{
20+
"internalType": "uint256[19]",
21+
"name": "pubSignals",
22+
"type": "uint256[19]"
23+
}
24+
],
25+
"name": "verifyProof",
26+
"outputs": [
27+
{
28+
"internalType": "bool",
29+
"name": "",
30+
"type": "bool"
31+
}
32+
],
33+
"stateMutability": "view",
34+
"type": "function"
35+
}
36+
]

0 commit comments

Comments
 (0)