Skip to content

Commit 5934e21

Browse files
committed
create cache for schemas test
1 parent 2baa245 commit 5934e21

13 files changed

+321
-96
lines changed

tests/adapter/onchain-issuer.test.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { DID } from '@iden3/js-iden3-core';
44
import { W3CCredential } from '../../src/verifiable';
55
import { expect } from 'chai';
66
import { defaultEthConnectionConfig } from '../../src';
7+
import { schemaLoaderForTests } from '../mocks/schema';
78

89
// prettier-ignore
910
const balanceCredentialHttpSchema =
10-
{"id":"urn:iden3:onchain:80002:0x19875eA86503734f2f9Ed461463e0312A3b42563:6","@context":["https://www.w3.org/2018/credentials/v1","https://schema.iden3.io/core/jsonld/iden3proofs.jsonld","https://gist.githubusercontent.com/ilya-korotya/660496c859f8d31a7d2a92ca5e970967/raw/6b5fc14fe630c17bfa52e05e08fdc8394c5ea0ce/non-merklized-non-zero-balance.jsonld","https://schema.iden3.io/core/jsonld/displayMethod.jsonld"],"type":["VerifiableCredential","Balance"],"expirationDate":"2024-05-24T10:29:56.000Z","issuanceDate":"2024-04-24T10:29:56.000Z","credentialSubject":{"address":"955350806412517903000132372584919937355495621189","balance":"439010757238782730","id":"did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ","type":"Balance"},"credentialStatus":{"id":"did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ/credentialStatus?revocationNonce=6\u0026contractAddress=80002:0x19875eA86503734f2f9Ed461463e0312A3b42563","type":"Iden3OnchainSparseMerkleTreeProof2023","revocationNonce":6},"issuer":"did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ","credentialSchema":{"id":"https://gist.githubusercontent.com/ilya-korotya/e10cd79a8cc26ab6e40400a11838617e/raw/575edc33d485e2a4c806baad97e21117f3c90a9f/non-merklized-non-zero-balance.json","type":"JsonSchema2023"},"proof":[{"type":"Iden3SparseMerkleTreeProof","issuerData":{"id":"did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ","state":{"rootOfRoots":"4078a4330d42e9d112b61500e538dc229cce10e2ffc50861c26c115b263c3214","claimsTreeRoot":"b087bb8fe253f1b04f8357f0844796bbec597e4def7fd76a19814d8159dcbb05","revocationTreeRoot":"0000000000000000000000000000000000000000000000000000000000000000","value":"006143913300b027d1d70878468aa0530dfea5a042f8325a826d409df7911512"}},"coreClaim":"f52f1795c533d7b4aa4e7ab02485f86f0a00000000000000000000000000000002130000000000000019875ea86503734f2f9ed461463e0312a3b425635f070045c28dba443bdace6830060f2d2784fa696957a70000000000000000000000000afbca2df5ad17060000000000000000000000000000000000000000000000000600000000000000246c50660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","mtp":{"existence":true,"siblings":["13848368485573735212679136988282305230819438728637424764846468785502433652840","1096649694805431452149042575143897926182559273612207814941177729902834445226","12160962874465332870109484495496045222172553451373175361415786953298859195139","3819622883660148852432672044432820232715025265850740602622985339171079887367","14062102965326789511040283612678585475708167692394425899926219149423935791693","8688920842723779052034352461580251823545042582416894537724528294186594808930","19295275136572781615245322801038686629126714006877213606851647038393713692426"]}}],"displayMethod":{"id":"ipfs://QmS8eY8ZCiAAW8qgx3T6SQ3HDGeddwLZsjPXNAZExQwRY4","type":"Iden3BasicDisplayMethodV1"}};
11+
{ "id": "urn:iden3:onchain:80002:0x19875eA86503734f2f9Ed461463e0312A3b42563:6", "@context": ["https://www.w3.org/2018/credentials/v1", "https://schema.iden3.io/core/jsonld/iden3proofs.jsonld", "https://gist.githubusercontent.com/ilya-korotya/660496c859f8d31a7d2a92ca5e970967/raw/6b5fc14fe630c17bfa52e05e08fdc8394c5ea0ce/non-merklized-non-zero-balance.jsonld", "https://schema.iden3.io/core/jsonld/displayMethod.jsonld"], "type": ["VerifiableCredential", "Balance"], "expirationDate": "2024-05-24T10:29:56.000Z", "issuanceDate": "2024-04-24T10:29:56.000Z", "credentialSubject": { "address": "955350806412517903000132372584919937355495621189", "balance": "439010757238782730", "id": "did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ", "type": "Balance" }, "credentialStatus": { "id": "did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ/credentialStatus?revocationNonce=6\u0026contractAddress=80002:0x19875eA86503734f2f9Ed461463e0312A3b42563", "type": "Iden3OnchainSparseMerkleTreeProof2023", "revocationNonce": 6 }, "issuer": "did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ", "credentialSchema": { "id": "https://gist.githubusercontent.com/ilya-korotya/e10cd79a8cc26ab6e40400a11838617e/raw/575edc33d485e2a4c806baad97e21117f3c90a9f/non-merklized-non-zero-balance.json", "type": "JsonSchema2023" }, "proof": [{ "type": "Iden3SparseMerkleTreeProof", "issuerData": { "id": "did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ", "state": { "rootOfRoots": "4078a4330d42e9d112b61500e538dc229cce10e2ffc50861c26c115b263c3214", "claimsTreeRoot": "b087bb8fe253f1b04f8357f0844796bbec597e4def7fd76a19814d8159dcbb05", "revocationTreeRoot": "0000000000000000000000000000000000000000000000000000000000000000", "value": "006143913300b027d1d70878468aa0530dfea5a042f8325a826d409df7911512" } }, "coreClaim": "f52f1795c533d7b4aa4e7ab02485f86f0a00000000000000000000000000000002130000000000000019875ea86503734f2f9ed461463e0312a3b425635f070045c28dba443bdace6830060f2d2784fa696957a70000000000000000000000000afbca2df5ad17060000000000000000000000000000000000000000000000000600000000000000246c50660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "mtp": { "existence": true, "siblings": ["13848368485573735212679136988282305230819438728637424764846468785502433652840", "1096649694805431452149042575143897926182559273612207814941177729902834445226", "12160962874465332870109484495496045222172553451373175361415786953298859195139", "3819622883660148852432672044432820232715025265850740602622985339171079887367", "14062102965326789511040283612678585475708167692394425899926219149423935791693", "8688920842723779052034352461580251823545042582416894537724528294186594808930", "19295275136572781615245322801038686629126714006877213606851647038393713692426"] } }], "displayMethod": { "id": "ipfs://QmS8eY8ZCiAAW8qgx3T6SQ3HDGeddwLZsjPXNAZExQwRY4", "type": "Iden3BasicDisplayMethodV1" } };
1112
// prettier-ignore
1213
const balanceCredentialIpfsSchema =
13-
{"id":"urn:iden3:onchain:80002:0xFDb204CCC55794C861366dBc2Cd6BBBd25752894:0","@context":["https://www.w3.org/2018/credentials/v1","https://schema.iden3.io/core/jsonld/iden3proofs.jsonld","ipfs://Qma5B4jNwiHtRd5RXGoRncV79EZvB7LsfpHgv8Vi4xitV1","https://schema.iden3.io/core/jsonld/displayMethod.jsonld"],"type":["VerifiableCredential","Balance"],"expirationDate":"2024-05-24T16:23:56.000Z","issuanceDate":"2024-04-24T16:23:56.000Z","credentialSubject":{"address":"657065114158124047812701241180089030040156354062","balance":"34206141476401658683","id":"did:polygonid:polygon:amoy:2qZYiH9CFMoo6oTjSEot3qzkHFHhjLRLKp8yfwCYng","type":"Balance"},"credentialStatus":{"id":"did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB/credentialStatus?revocationNonce=0\u0026contractAddress=80002:0xFDb204CCC55794C861366dBc2Cd6BBBd25752894","type":"Iden3OnchainSparseMerkleTreeProof2023","revocationNonce":0},"issuer":"did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB","credentialSchema":{"id":"ipfs://QmcC7i1PCU8ymJscGjs8pqmZEWtBGWPFLmQ8s7P6QzELN6","type":"JsonSchema2023"},"proof":[{"type":"Iden3SparseMerkleTreeProof","issuerData":{"id":"did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB","state":{"rootOfRoots":"ae476a5ee415f804663e9449c285e49e5cf239d1d2b95e77bf84543974acc113","claimsTreeRoot":"87df6035bab67e067892307e74c55c7c1a324e4b69a9390ee734c20ccac1fb18","revocationTreeRoot":"0000000000000000000000000000000000000000000000000000000000000000","value":"32a269e965d1486d20749ef071e1a03713703487edee224a7768ee1394288f11"}},"coreClaim":"f52f1795c533d7b4aa4e7ab02485f86f0a0000000000000000000000000000000213d0591345a3d71ee61cd299b38959df8dea1f4a4f75a2bd4f25b8215f0d000eb6cb518d3dd33341899bcec9dcc68998d117730000000000000000000000003b3baddd70a0b4da01000000000000000000000000000000000000000000000000000000000000001cbf50660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","mtp":{"existence":true,"siblings":["0","11379033735565694648078358700935740809038384149401106458334374311488117433921"]}}],"displayMethod":{"id":"ipfs://QmS8eY8ZCiAAW8qgx3T6SQ3HDGeddwLZsjPXNAZExQwRY4","type":"Iden3BasicDisplayMethodV1"}};
14+
{ "id": "urn:iden3:onchain:80002:0xFDb204CCC55794C861366dBc2Cd6BBBd25752894:0", "@context": ["https://www.w3.org/2018/credentials/v1", "https://schema.iden3.io/core/jsonld/iden3proofs.jsonld", "ipfs://Qma5B4jNwiHtRd5RXGoRncV79EZvB7LsfpHgv8Vi4xitV1", "https://schema.iden3.io/core/jsonld/displayMethod.jsonld"], "type": ["VerifiableCredential", "Balance"], "expirationDate": "2024-05-24T16:23:56.000Z", "issuanceDate": "2024-04-24T16:23:56.000Z", "credentialSubject": { "address": "657065114158124047812701241180089030040156354062", "balance": "34206141476401658683", "id": "did:polygonid:polygon:amoy:2qZYiH9CFMoo6oTjSEot3qzkHFHhjLRLKp8yfwCYng", "type": "Balance" }, "credentialStatus": { "id": "did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB/credentialStatus?revocationNonce=0\u0026contractAddress=80002:0xFDb204CCC55794C861366dBc2Cd6BBBd25752894", "type": "Iden3OnchainSparseMerkleTreeProof2023", "revocationNonce": 0 }, "issuer": "did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB", "credentialSchema": { "id": "ipfs://QmcC7i1PCU8ymJscGjs8pqmZEWtBGWPFLmQ8s7P6QzELN6", "type": "JsonSchema2023" }, "proof": [{ "type": "Iden3SparseMerkleTreeProof", "issuerData": { "id": "did:polygonid:polygon:amoy:2qQ68JkRcf3z3923i5rrszrsJ4kdu4GKWARQ5eftsB", "state": { "rootOfRoots": "ae476a5ee415f804663e9449c285e49e5cf239d1d2b95e77bf84543974acc113", "claimsTreeRoot": "87df6035bab67e067892307e74c55c7c1a324e4b69a9390ee734c20ccac1fb18", "revocationTreeRoot": "0000000000000000000000000000000000000000000000000000000000000000", "value": "32a269e965d1486d20749ef071e1a03713703487edee224a7768ee1394288f11" } }, "coreClaim": "f52f1795c533d7b4aa4e7ab02485f86f0a0000000000000000000000000000000213d0591345a3d71ee61cd299b38959df8dea1f4a4f75a2bd4f25b8215f0d000eb6cb518d3dd33341899bcec9dcc68998d117730000000000000000000000003b3baddd70a0b4da01000000000000000000000000000000000000000000000000000000000000001cbf50660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "mtp": { "existence": true, "siblings": ["0", "11379033735565694648078358700935740809038384149401106458334374311488117433921"] } }], "displayMethod": { "id": "ipfs://QmS8eY8ZCiAAW8qgx3T6SQ3HDGeddwLZsjPXNAZExQwRY4", "type": "Iden3BasicDisplayMethodV1" } };
1415

1516
describe('OnchainIssuer', () => {
1617
const copyDefaultEthConnectionConfig = { ...defaultEthConnectionConfig };
@@ -24,7 +25,9 @@ describe('OnchainIssuer', () => {
2425
const userDid = DID.parse(
2526
'did:polygonid:polygon:amoy:2qQ68JkRcf3xyDFsGSWU5QqxbKpzM75quxS628JgvJ'
2627
);
27-
const adapter = new OnchainIssuer([copyDefaultEthConnectionConfig]);
28+
const adapter = new OnchainIssuer([copyDefaultEthConnectionConfig], {
29+
merklizationOptions: { documentLoader: schemaLoaderForTests() }
30+
});
2831
const cred = await adapter.getCredential(issuerDid, userDid, BigInt(6));
2932
expect(W3CCredential.fromJSON(balanceCredentialHttpSchema)).to.deep.equal(cred);
3033
});
@@ -38,7 +41,7 @@ describe('OnchainIssuer', () => {
3841
);
3942
const adapter = new OnchainIssuer([copyDefaultEthConnectionConfig], {
4043
merklizationOptions: {
41-
ipfsNodeURL: IPFS_URL
44+
documentLoader: schemaLoaderForTests({ ipfsNodeURL: IPFS_URL })
4245
}
4346
});
4447
const cred = await adapter.getCredential(issuerDid, userId, BigInt(0));

tests/adapter/onchain-non-merklized-issuer-adapter.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { expect } from 'chai';
1010
import { W3CCredential } from '../../src/verifiable';
1111
import { IPFS_URL } from '../helpers';
1212
import { defaultEthConnectionConfig } from '../../src';
13+
import { schemaLoaderForTests } from '../mocks/schema';
1314

1415
// prettier-ignore
1516
const w3cHttpSchemaExpect =
@@ -160,7 +161,7 @@ describe('Convertor v0.0.1', () => {
160161
issuerDid,
161162
{
162163
merklizationOptions: {
163-
ipfsNodeURL: IPFS_URL
164+
documentLoader: schemaLoaderForTests({ ipfsNodeURL: IPFS_URL })
164165
}
165166
}
166167
);

tests/credentials/credential-statuses/on-chain-revocation.test.ts

+15-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import path from 'path';
4141
import spies from 'chai-spies';
4242
import { JsonRpcProvider, Wallet } from 'ethers';
4343
import { getRandomBytes } from '@iden3/js-crypto';
44+
import { schemaLoaderForTests } from '../../mocks/schema';
4445
chai.use(spies);
4546
const expect = chai.expect;
4647

@@ -164,6 +165,7 @@ describe('onchain revocation checks', () => {
164165
let storage: OnChainRevocationStorage;
165166
let signer: Wallet;
166167
let onchainResolver: OnChainResolver;
168+
let merklizeOpts;
167169

168170
const createCredRequest = (
169171
credentialSubjectId: string,
@@ -241,10 +243,15 @@ describe('onchain revocation checks', () => {
241243
idWallet = new IdentityWallet(registerKeyProvidersInMemoryKMS(), dataStorage, credWallet, {
242244
credentialStatusPublisherRegistry
243245
});
244-
proofService = new ProofService(idWallet, credWallet, circuitStorage, ethStorage);
246+
247+
merklizeOpts = {
248+
documentLoader: schemaLoaderForTests()
249+
};
250+
251+
proofService = new ProofService(idWallet, credWallet, circuitStorage, ethStorage, merklizeOpts);
245252
});
246253

247-
it('issuer has genesis state', async () => {
254+
it.only('issuer has genesis state', async () => {
248255
const revocationOpts = {
249256
type: CredentialStatusType.Iden3OnchainSparseMerkleTreeProof2023,
250257
id: RHS_CONTRACT_ADDRESS
@@ -264,7 +271,7 @@ describe('onchain revocation checks', () => {
264271

265272
const claimReq: CredentialRequest = createCredRequest(userDID.string());
266273

267-
const issuerCred = await idWallet.issueCredential(issuerDID, claimReq);
274+
const issuerCred = await idWallet.issueCredential(issuerDID, claimReq, merklizeOpts);
268275

269276
await credWallet.save(issuerCred);
270277

@@ -363,7 +370,11 @@ describe('onchain revocation checks', () => {
363370
}
364371
});
365372

366-
const issuerCred = await idWallet.issueCredential(issuerDID, claimReq);
373+
const issuerCred = await idWallet.issueCredential(
374+
issuerDID,
375+
claimReq,
376+
merklizeOpts
377+
);
367378

368379
expect(issuerCred.credentialSubject.id).to.equal(userDID.string());
369380

tests/credentials/credential-statuses/sparse-merkle-tree-proof.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
registerKeyProvidersInMemoryKMS
1212
} from '../../helpers';
1313
import { DID } from '@iden3/js-iden3-core';
14+
import { schemaLoaderForTests } from '../../mocks/schema';
1415

1516
describe('SparseMerkleTreeProof', () => {
1617
let idWallet: IdentityWallet;
@@ -22,6 +23,9 @@ describe('SparseMerkleTreeProof', () => {
2223
let issuerDID: DID;
2324
const walletUrl = 'https://user-wallet.com';
2425
const issuerWalletUrl = 'https://issuer.com';
26+
const merklizeOpts = {
27+
documentLoader: schemaLoaderForTests()
28+
};
2529

2630
beforeEach(async () => {
2731
const kms = registerKeyProvidersInMemoryKMS();
@@ -67,7 +71,7 @@ describe('SparseMerkleTreeProof', () => {
6771
id: walletUrl
6872
}
6973
};
70-
const issuedCredential = await idWallet.issueCredential(issuerDID, credRequest);
74+
const issuedCredential = await idWallet.issueCredential(issuerDID, credRequest, merklizeOpts);
7175

7276
await credWallet.save(issuedCredential);
7377

tests/credentials/credential-validation.test.ts

+20-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ chai.use(chaiAsPromised);
2727
const { expect } = chai;
2828
import nock from 'nock';
2929
import { JsonRpcProvider } from 'ethers';
30-
import { RPC_URL } from '../helpers';
30+
import { IPFS_URL, RPC_URL } from '../helpers';
31+
import { schemaLoaderForTests } from '../mocks/schema';
3132

3233
const mockStateStorage: IStateStorage = {
3334
getLatestStateById: async (id: bigint) => {
@@ -82,6 +83,11 @@ const mockStateStorage: IStateStorage = {
8283
return new JsonRpcProvider(RPC_URL);
8384
}
8485
};
86+
const merklizeOpts = {
87+
documentLoader: schemaLoaderForTests({
88+
ipfsNodeURL: IPFS_URL
89+
})
90+
};
8591

8692
const dataStorage = {
8793
credential: new CredentialStorage(new InMemoryDataSource<W3CCredential>()),
@@ -191,7 +197,8 @@ describe('Verify credential proof', () => {
191197
);
192198

193199
const opts: W3CProofVerificationOptions = {
194-
credStatusResolverRegistry
200+
credStatusResolverRegistry,
201+
merklizeOptions: merklizeOpts
195202
};
196203
const isValid = await credential.verifyProof(ProofType.BJJSignature, resolverURL, opts);
197204
expect(isValid).to.be.eq(true);
@@ -290,7 +297,8 @@ describe('Verify credential proof', () => {
290297
);
291298

292299
const opts: W3CProofVerificationOptions = {
293-
credStatusResolverRegistry
300+
credStatusResolverRegistry,
301+
merklizeOptions: merklizeOpts
294302
};
295303

296304
const isValid = await credential.verifyProof(ProofType.BJJSignature, resolverURL, opts);
@@ -401,7 +409,8 @@ describe('Verify credential proof', () => {
401409
);
402410

403411
const opts: W3CProofVerificationOptions = {
404-
credStatusResolverRegistry
412+
credStatusResolverRegistry,
413+
merklizeOptions: merklizeOpts
405414
};
406415

407416
const isValid = await credential.verifyProof(ProofType.BJJSignature, resolverURL, opts);
@@ -508,7 +517,13 @@ describe('Verify credential proof', () => {
508517
`{"@context":"https://w3id.org/did-resolution/v1","didDocument":{"@context":["https://www.w3.org/ns/did/v1","https://schema.iden3.io/core/jsonld/auth.jsonld"],"id":"did:polygonid:polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf","verificationMethod":[{"id":"did:polygonid:polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf#stateInfo","type":"Iden3StateInfo2023","controller":"did:polygonid:polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf","stateContractAddress":"80001:0x134B1BE34911E39A8397ec6289782989729807a4","published":true,"info":{"id":"did:polygonid:polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf","state":"34824a8e1defc326f935044e32e9f513377dbfc031d79475a0190830554d4409","replacedByState":"0000000000000000000000000000000000000000000000000000000000000000","createdAtTimestamp":"1703174663","replacedAtTimestamp":"0","createdAtBlock":"43840767","replacedAtBlock":"0"},"global":{"root":"92c4610a24247a4013ce6de4903452d164134a232a94fd1fe37178bce4937006","replacedByRoot":"0000000000000000000000000000000000000000000000000000000000000000","createdAtTimestamp":"1704439557","replacedAtTimestamp":"0","createdAtBlock":"44415346","replacedAtBlock":"0"}}]},"didResolutionMetadata":{"contentType":"application/did+ld+json","retrieved":"2024-01-05T07:53:42.67771172Z","pattern":"^(did:polygonid:.+)$","driverUrl":"http://driver-did-polygonid:8080/1.0/identifiers/","duration":442,"did":{"didString":"did:polygonid:polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf","methodSpecificId":"polygon:mumbai:2qLGnFZiHrhdNh5KwdkGvbCN1sR2pUaBpBahAXC3zf","method":"polygonid"}},"didDocumentMetadata":{}}`
509518
);
510519
const resolverURL = 'http://my-universal-resolver/1.0/identifiers';
511-
const isValid = await credential.verifyProof(ProofType.Iden3SparseMerkleTreeProof, resolverURL);
520+
const isValid = await credential.verifyProof(
521+
ProofType.Iden3SparseMerkleTreeProof,
522+
resolverURL,
523+
{
524+
merklizeOptions: merklizeOpts
525+
}
526+
);
512527
expect(isValid).to.be.eq(true);
513528
});
514529

0 commit comments

Comments
 (0)