diff --git a/package-lock.json b/package-lock.json index c4d2dce..af7f983 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "@iden3/js-iden3-auth", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@iden3/js-iden3-auth", - "version": "1.2.0", + "version": "1.3.0", "license": "AGPL-3.0", "dependencies": { - "@0xpolygonid/js-sdk": "1.9.4", - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-jsonld-merklization": "1.1.2", - "@iden3/js-jwz": "1.3.0", - "@iden3/js-merkletree": "1.1.2", + "@0xpolygonid/js-sdk": "1.10.0", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-jsonld-merklization": "1.2.0", + "@iden3/js-jwz": "1.4.0", + "@iden3/js-merkletree": "1.2.0", "did-resolver": "^4.1.0", "ethers": "^5.4.0", "tslib": "^2.6.2", @@ -47,9 +47,9 @@ } }, "node_modules/@0xpolygonid/js-sdk": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@0xpolygonid/js-sdk/-/js-sdk-1.9.4.tgz", - "integrity": "sha512-WE55dntQrBN9MAa7PrSOuqUITEKzCJKAH9oxU7+9aOMnkDvszcsQhsS7fiGmY0hecMt1JyCIFw9eNTxi+mWuLg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@0xpolygonid/js-sdk/-/js-sdk-1.10.0.tgz", + "integrity": "sha512-DRU8Ed/jePaWTCMLn0F+Rf8rD10k7klUytK7fgsBH7aCoDxZTEuZ8IPkSPLCF5HsjVtQKadPjyhwGNf/lLRpNw==", "dependencies": { "@noble/curves": "^1.4.0", "ajv": "8.12.0", @@ -65,14 +65,14 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=18.16.0" + "node": ">=20.11.0" }, "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-jsonld-merklization": "1.1.2", - "@iden3/js-jwz": "1.3.0", - "@iden3/js-merkletree": "1.1.2", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-jsonld-merklization": "1.2.0", + "@iden3/js-jwz": "1.4.0", + "@iden3/js-merkletree": "1.2.0", "ffjavascript": "0.2.63", "rfc4648": "1.5.3", "snarkjs": "0.7.3" @@ -1637,51 +1637,51 @@ } }, "node_modules/@iden3/js-crypto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.3.tgz", - "integrity": "sha512-IFBLIN1O26mM5MVWO8dlABDC6HKLuhYs+30BT+p6dGWsNXB4Rr5JWuhKBUbKlkW78ly3j3+YSoY+J63q7vPs5Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.1.0.tgz", + "integrity": "sha512-MbL7OpOxBoCybAPoorxrp+fwjDVESyDe6giIWxErjEIJy0Q2n1DU4VmKh4vDoCyhJx/RdVgT8Dkb59lKwISqsw==" }, "node_modules/@iden3/js-iden3-core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.2.1.tgz", - "integrity": "sha512-XvRYQY1LfAn3sO2xoZfr3aAotr3snLKVlQ9ipfkfKwBpBbDGIMswljANcjWa2HxHwjKK4XLyPHArNORjw/yXMQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.3.1.tgz", + "integrity": "sha512-cCPuEdbTtgqtcK57trS23FmRbLqh8maHyAlxapYPDlua5GFOtKcyPJlglDb1tfIRxEipErfY7gdvBh3hm26kMg==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3" + "@iden3/js-crypto": "1.1.0" } }, "node_modules/@iden3/js-jsonld-merklization": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.1.2.tgz", - "integrity": "sha512-R8p8EW35YCZQIAfb1GKUEpSdBayACvKFfwQBShGygTmCvA6TzixFc7POu3jmgGcjyRArZjUV6l17YJ33Pu++QQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.2.0.tgz", + "integrity": "sha512-7SplwPwNxdwdG/cx2xReEHskgF1Xs+z292M1OYtSrM1PYNY4TRBI5BVMgDcp7im6ehUnsGNOWvdqt78dYiGRqg==", "dependencies": { "@js-temporal/polyfill": "0.4.4", "jsonld": "8.3.1", "n3": "1.17.1" }, "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-merkletree": "1.1.2" + "@iden3/js-crypto": "1.1.0", + "@iden3/js-merkletree": "1.2.0" } }, "node_modules/@iden3/js-jwz": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@iden3/js-jwz/-/js-jwz-1.3.0.tgz", - "integrity": "sha512-rb6qtxDITy6gagxcoJJcTTccM0dDviyOVwDZVSPmmP/YHZ6JAPeZrIeC9hXDiKxmq83Gg9jD2qp9i89tjYBUTQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@iden3/js-jwz/-/js-jwz-1.4.0.tgz", + "integrity": "sha512-QaIpgR3Lp/+ZB4ZOgtG3eUsaoeg/CIfAf4NOl64f6kdeH40EdvOxku1Gw6NXUgg1U6Lhl1gU8Y/1RDgs/zzVxA==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-merkletree": "1.1.2", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-merkletree": "1.2.0", "ffjavascript": "0.2.63", "rfc4648": "1.5.3", "snarkjs": "0.7.3" } }, "node_modules/@iden3/js-merkletree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.1.2.tgz", - "integrity": "sha512-NT0L+Nk6barcEnSV5q2M6LkZuR889E856e+awnok6iDlmzYMt2l3gulo//zMqGsO6wQvzVECaSn0LJQ7uM5c1A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.2.0.tgz", + "integrity": "sha512-tM6jj1v/41qQ6V2K6CTrv0KsNHQ2y/O6Q9RSB1SdN2LTu+cgA9FnD2Qr3whzSvwgUs7X3SjuJgb9OTgs0lDemQ==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3", + "@iden3/js-crypto": "1.1.0", "idb-keyval": "^6.2.0" } }, diff --git a/package.json b/package.json index 3cadf81..32ea85e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iden3/js-iden3-auth", - "version": "1.2.0", + "version": "1.3.0", "description": "iden3-auth implementation in JavaScript", "main": "dist/cjs/index.js", "source": "./src/index.ts", @@ -32,12 +32,12 @@ "url": "https://github.com/iden3/js-iden3-auth" }, "dependencies": { - "@iden3/js-crypto": "1.0.3", - "@0xpolygonid/js-sdk": "1.9.4", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-jsonld-merklization": "1.1.2", - "@iden3/js-jwz": "1.3.0", - "@iden3/js-merkletree": "1.1.2", + "@iden3/js-crypto": "1.1.0", + "@0xpolygonid/js-sdk": "1.10.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-jsonld-merklization": "1.2.0", + "@iden3/js-jwz": "1.4.0", + "@iden3/js-merkletree": "1.2.0", "did-resolver": "^4.1.0", "ethers": "^5.4.0", "tslib": "^2.6.2", diff --git a/src/circuits/ownershipVerifier.ts b/src/circuits/ownershipVerifier.ts index 48df520..699c3e0 100644 --- a/src/circuits/ownershipVerifier.ts +++ b/src/circuits/ownershipVerifier.ts @@ -7,7 +7,7 @@ export abstract class IDOwnershipPubSignals { const senderId = DID.idFromDID(DID.parse(sender)); if (senderId.string() !== this.userId.string()) { throw new Error( - `sender id is not used for proof creation, expected ${sender}, user from public signals: ${this.userId.string()}` + `sender id is not used for proof creation, expected ${senderId}, user from public signals: ${this.userId.string()}` ); } if (challenge !== this.challenge) { diff --git a/test/auth.test.ts b/test/auth.test.ts index 3e4cae5..ba7ae7d 100644 --- a/test/auth.test.ts +++ b/test/auth.test.ts @@ -24,7 +24,7 @@ import { resolveDIDDocument, resolvers, schemaLoader, testOpts } from './mocks'; describe('auth tests', () => { const connectionString = process.env.IPFS_URL ?? 'https://ipfs.io'; it('createAuthorizationRequest', () => { - const sender = '1125GJqgw6YEsKFwj63GY87MMxPL9kwDKxPUiwMLNZ'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; const request: AuthorizationRequestMessage = createAuthorizationRequest( 'kyc age verification', @@ -56,8 +56,8 @@ describe('auth tests', () => { }); it('TestVerifyMessageWithoutProof', async () => { - const sender = '1125GJqgw6YEsKFwj63GY87MMxPL9kwDKxPUiwMLNZ'; - const userId = '119tqceWdRd2F6WnAyVuFQRFjK3WUXq2LorSPyG9LJ'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; + const userId = 'did:iden3:polygon:amoy:x7Z95VkUuyo6mqraJw2VGwCfqTzdqhM1RVjRHzcpK'; const callback = 'https://test.com/callback'; const msg = 'message to sign'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( @@ -94,9 +94,10 @@ describe('auth tests', () => { }); it('TestVerifyWithAtomicMTPProof', async () => { - const sender = 'did:polygonid:polygon:mumbai:1125GJqgw6YEsKFwj63GY87MMxPL9kwDKxPUiwMLNZ'; + + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; - const userId = 'did:polygonid:polygon:mumbai:2qPDLXDaU1xa1ERTb1XKBfPCB3o2wA46q49neiXWwY'; + const userId = 'did:iden3:polygon:amoy:x7Z95VkUuyo6mqraJw2VGwCfqTzdqhM1RVjRHzcpK'; const reason = 'test'; const message = 'message to sign'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( @@ -110,19 +111,19 @@ describe('auth tests', () => { expect(request.body.reason).toEqual(reason); expect(request.from).toEqual(sender); - request.thid = '7f38a193-0918-4a48-9fac-36adfdb8b542'; + request.thid = '3bfc628a-6d16-4af7-8358-59656ca30600"'; const proofRequest: ZeroKnowledgeProofRequest = { - id: 23, + id: 1, circuitId: 'credentialAtomicQueryMTPV2', query: { allowedIssuers: ['*'], context: 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld', - type: 'KYCCountryOfResidenceCredential', + type: 'KYCAgeCredential', credentialSubject: { - countryCode: { - $nin: [840, 120, 340, 509] + birthday: { + $lt: 20010101 } } } @@ -131,126 +132,129 @@ describe('auth tests', () => { expect(request.body.scope.length).toEqual(1); - const mtpProof: ZeroKnowledgeProofResponse = { - id: proofRequest.id, - circuitId: 'credentialAtomicQueryMTPV2', - proof: { - pi_a: [ - '261068577516437401613944053873182458364288414130914048345483377226144652651', - '14191260071695980011679501808453222267520721767757759150101974382053161674611', - '1' - ], - pi_b: [ - [ - '7670847844015116957526183728196977957312627307797919554134684901401436021977', - '14957845472630017095821833222580194061266186851634053897768738253663253650835' - ], - [ - '17835642458484628627556329876919077333912011235308758832172880012813397022104', - '18100861130149678153133025031709897120097098591298817367491920553037011650228' - ], - ['1', '0'] - ], - pi_c: [ - '6217865949299990642832523256863048932210546049203189113362851476966824162191', - '19016949225277755690019647385855936969928994210905992628301967883803670436510', - '1' - ], - protocol: 'groth16' - }, - pub_signals: [ - '1', - '27152676987128542066808591998573000370436464722519513348891049644813718018', - '23', - '27752766823371471408248225708681313764866231655187366071881070918984471042', - '21545768883509657340209171549441005603306012513932221371599501498534807719689', - '1', - '21545768883509657340209171549441005603306012513932221371599501498534807719689', - '1679323038', - '336615423900919464193075592850483704600', - '0', - '17002437119434618783545694633038537380726339994244684348913844923422470806844', - '0', - '5', - '840', - '120', - '340', - '509', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0' - ] - }; - const response: AuthorizationResponseMessage = { - id: uuidv4(), - thid: request.thid, - typ: request.typ, - type: PROTOCOL_CONSTANTS.PROTOCOL_MESSAGE_TYPE.AUTHORIZATION_RESPONSE_MESSAGE_TYPE, - from: userId, - to: sender, - body: { - message: request.body.message, - scope: [mtpProof] - } - }; + "id": "d61ca0e1-0fb4-42e1-9baf-10926d76588a", + "typ": PROTOCOL_CONSTANTS.MediaType.ZKPMessage, + "type": "https://iden3-communication.io/authorization/1.0/response", + "thid": "3bfc628a-6d16-4af7-8358-59656ca30600", + "body": { + "message": "message to sign", + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQueryMTPV2", + "proof": { + "pi_a": [ + "10193646151489765961716165294209441914505373340739978345545023009943374940812", + "19540734080723747303959563086264670275414339236530195261122226272390746855937", + "1" + ], + "pi_b": [ + [ + "19467942677882193293944841488842174190120571613164887280488852508969862343027", + "17106577273687108884214556012243492970215151434611531033321585163414364507509" + ], + [ + "14498015884038973042346029647348006632739743736155378028992421520463893750183", + "19621104134440461747561213754446927179909482545004438474015524348062312609080" + ], + [ + "1", + "0" + ] + ], + "pi_c": [ + "14006417320092906277546140755451080235060132073017953616831608713184292562687", + "15061888463009562171895687986245706187439910096872145065899377525706148091513", + "1" + ], + "protocol": "groth16" + }, + "pub_signals": [ + "1", + "21575127216236248869702276246037557119007466180301957762196593786733007617", + "1", + "25198543381200665770805816046271594885604002445105767653616878167826895617", + "18537029360774351903277257040237420954645495647417042860442609334172554965092", + "1", + "4487386332479489158003597844990487984925471813907462483907054425759564175341", + "1712132038", + "74977327600848231385663280181476307657", + "0", + "20376033832371109177683048456014525905119173674985843915445634726167450989630", + "0", + "2", + "20010101", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ] + } + ] + }, + "from": "did:iden3:polygon:amoy:x7Z95VkUuyo6mqraJw2VGwCfqTzdqhM1RVjRHzcpK", + "to": "did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX" + } ; const verifier = await Verifier.newVerifier({ stateResolver: resolvers, @@ -261,9 +265,8 @@ describe('auth tests', () => { }); it('TestVerifyWithAtomicSigProofNonMerklized', async () => { - const sender = 'did:polygonid:polygon:mumbai:1125GJqgw6YEsKFwj63GY87MMxPL9kwDKxPUiwMLNZ'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; - const userId = 'did:polygonid:polygon:mumbai:2qKzaaAewvBVv11iZjJZzjTxBQioZLEujPYTUJp7gQ'; const reason = 'test'; const message = 'message to sign'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( @@ -277,10 +280,10 @@ describe('auth tests', () => { expect(request.body.reason).toEqual(reason); expect(request.from).toEqual(sender); - request.thid = '7f38a193-0918-4a48-9fac-36adfdb8b542'; + request.thid = 'cbeb7e95-49a6-4107-ad5d-33de4620a2c7'; const proofRequest: ZeroKnowledgeProofRequest = { - id: 84239, + id: 1, circuitId: 'credentialAtomicQuerySigV2', query: { allowedIssuers: ['*'], @@ -288,8 +291,8 @@ describe('auth tests', () => { 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-nonmerklized.jsonld', type: 'KYCAgeCredential', credentialSubject: { - documentType: { - $eq: [99] + birthday: { + $lt: 20010101 } } } @@ -298,126 +301,131 @@ describe('auth tests', () => { expect(request.body.scope.length).toEqual(1); - const mtpProof: ZeroKnowledgeProofResponse = { - id: proofRequest.id, - circuitId: 'credentialAtomicQuerySigV2', - proof: { - pi_a: [ - '14056228231956087288378518013493130710375131807243578639863710060510262038676', - '15685597096933930175890593905690244171450509041610585092210638200145586390285', - '1' - ], - pi_b: [ - [ - '6867891861795556838771075779522609255721689620651295420993290050538780283807', - '12803728874072821363624664338413776845757845422512289455246307343796729670516' - ], - [ - '1556511867067742689232747109877739227261867306751037654148240512509806309140', - '3417379743049361186708759271231315501277403869916476403120965486647240758779' - ], - ['1', '0'] - ], - pi_c: [ - '10569434133480072042978475540156042501239134571700053665222790798542811352807', - '16412506719218682682070660169432465369639644911994254460610287965570092298694', - '1' - ], - protocol: 'groth16' - }, - pub_signals: [ - '0', - '23556362286864724741858679466282977995723542763829611007300550436288008706', - '6488011081960287964570775172930943914920953982696735236025195378048754598764', - '84239', - '21803003425107230045260507608510138502859759480520560654156359021447614978', - '1', - '6488011081960287964570775172930943914920953982696735236025195378048754598764', - '1693230616', - '198285726510688200335207273836123338699', - '1', - '0', - '3', - '1', - '99', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0' - ] - }; + const response: AuthorizationResponseMessage = { - id: uuidv4(), - thid: request.thid, - typ: request.typ, - type: PROTOCOL_CONSTANTS.PROTOCOL_MESSAGE_TYPE.AUTHORIZATION_RESPONSE_MESSAGE_TYPE, - from: userId, - to: sender, - body: { - message: request.body.message, - scope: [mtpProof] - } - }; + "id": "fe05a780-3a91-4a12-84bd-a23223004543", + "typ": PROTOCOL_CONSTANTS.MediaType.ZKPMessage, + "type": "https://iden3-communication.io/authorization/1.0/response", + "thid": "cbeb7e95-49a6-4107-ad5d-33de4620a2c7", + "body": { + "message": "message to sign", + "scope": [ + { + "id": 1, + "circuitId": "credentialAtomicQuerySigV2", + "proof": { + "pi_a": [ + "3978283874506757525802957933408570785578432271724288548246348383068810207211", + "3839462864594627131752113404967812699538444256660443277198360774263348025078", + "1" + ], + "pi_b": [ + [ + "1362896848909471153554522290024953846910293534485680267453780104481811422290", + "15020898560978280120037685310228488598606735402262450207703916904657862338124" + ], + [ + "21332978512889427960726931487036095435728978762819963806724151119728932608790", + "21196976187509848930911656208458284240239739037067667132440783059540157723036" + ], + [ + "1", + "0" + ] + ], + "pi_c": [ + "20396313416829218018504461507621482120133611229332817627860821702949693461370", + "10644256358167652530995066552061972678660124036948547117328217950416688452505", + "1" + ], + "protocol": "groth16" + }, + "pub_signals": [ + "0", + "21575127216236248869702276246037557119007466180301957762196593786733007617", + "4487386332479489158003597844990487984925471813907462483907054425759564175341", + "1", + "25198543381200665770805816046271594885604002445105767653616878167826895617", + "1", + "4487386332479489158003597844990487984925471813907462483907054425759564175341", + "1712132869", + "198285726510688200335207273836123338699", + "1", + "0", + "2", + "2", + "20010101", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ] + } + ] + }, + "from": "did:iden3:polygon:amoy:x7Z95VkUuyo6mqraJw2VGwCfqTzdqhM1RVjRHzcpK", + "to": "did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX" + } const verifier = await Verifier.newVerifier({ stateResolver: resolvers, @@ -435,18 +443,18 @@ describe('auth tests', () => { }); const token = - 'eyJhbGciOiJncm90aDE2IiwiY2lyY3VpdElkIjoiYXV0aFYyIiwiY3JpdCI6WyJjaXJjdWl0SWQiXSwidHlwIjoiYXBwbGljYXRpb24vaWRlbjMtemtwLWpzb24ifQ.eyJpZCI6IjljMGY5NjIzLWM1NmMtNDEwNC04ODk2LWVjMjgyYTNiMmExNyIsInR5cCI6ImFwcGxpY2F0aW9uL2lkZW4zY29tbS1wbGFpbi1qc29uIiwidHlwZSI6Imh0dHBzOi8vaWRlbjMtY29tbXVuaWNhdGlvbi5pby9hdXRob3JpemF0aW9uLzEuMC9yZXNwb25zZSIsInRoaWQiOiI3ZjM4YTE5My0wOTE4LTRhNDgtOWZhYy0zNmFkZmRiOGI1NDIiLCJmcm9tIjoiZGlkOnBvbHlnb25pZDpwb2x5Z29uOm11bWJhaToycVBETFhEYVUxeGExRVJUYjFYS0JmUENCM28yd0E0NnE0OW5laVhXd1kiLCJ0byI6ImRpZDpwb2x5Z29uaWQ6cG9seWdvbjptdW1iYWk6MnFKNjg5a3BvSnhjU3pCNXNBRkp0UHNTQlNySEY1ZHE3MjJCSE1xVVJMIiwiYm9keSI6eyJkaWRfZG9jIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy9ucy9kaWQvdjEiXSwiaWQiOiJkaWQ6cG9seWdvbmlkOnBvbHlnb246bXVtYmFpOjJxUERMWERhVTF4YTFFUlRiMVhLQmZQQ0IzbzJ3QTQ2cTQ5bmVpWFd3WSIsInNlcnZpY2UiOlt7ImlkIjoiZGlkO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wMzc1NTcxMTkwMDc0NjYxODAzMDE5NTc3NjIxOTY1OTM3ODY3MzMwMDc2MTciLCIyMTE4MDA4Mzc4ODU0NDUxNTYwODUyMDQ2Mzg0MjQyOTAwMTY5OTI1ODEyNzA3NjkyMTE4NzU4OTEwNDQwMDQyNDUzMTQ3NDE3NjA2MyIsIjAiXX0'; await expect(verifier.verifyJWZ(token)).resolves.not.toThrow(); }); it('TestFullVerify', async () => { - const sender = 'did:polygonid:polygon:mumbai:2qJ689kpoJxcSzB5sAFJtPsSBSrHF5dq722BHMqURL'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; const reason = 'age verification'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( reason, - '', + 'message to sign', sender, callback ); @@ -479,10 +487,10 @@ describe('auth tests', () => { circuitsDir: path.join(__dirname, './testdata') }); request.id = '28494007-9c49-4f1a-9694-7700c08865bf'; - request.thid = '7f38a193-0918-4a48-9fac-36adfdb8b542'; // because it's used in the response + request.thid = '92567472-76d9-499a-8c1f-daae9d105346'; // because it's used in the response const token = - 'eyJhbGciOiJncm90aDE2IiwiY2lyY3VpdElkIjoiYXV0aFYyIiwiY3JpdCI6WyJjaXJjdWl0SWQiXSwidHlwIjoiYXBwbGljYXRpb24vaWRlbjMtemtwLWpzb24ifQ.eyJpZCI6ImRjNjY1NWY3LTIxY2MtNGM2OC1iYmI5LTNhOTgzMTAwNDJiNCIsInR5cCI6ImFwcGxpY2F0aW9uL2lkZW4zY29tbS1wbGFpbi1qc29uIiwidHlwZSI6Imh0dHBzOi8vaWRlbjMtY29tbXVuaWNhdGlvbi5pby9hdXRob3JpemF0aW9uLzEuMC9yZXNwb25zZSIsInRoaWQiOiI3ZjM4YTE5My0wOTE4LTRhNDgtOWZhYy0zNmFkZmRiOGI1NDIiLCJmcm9tIjoiZGlkOnBvbHlnb25pZDpwb2x5Z29uOm11bWJhaToycUpwUnFaT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A3ODIzODUzNTM4Mjc4OTI5NTYwNDI5NjQ4NTUyOTA1NjExMzA5Mzg2MTc0MDg1NjEzNDU0MDg5MjEyIl0sWyIxIiwiMCJdXSwicGlfYyI6WyI0NDc4NTA3ODQ0MzY0NjI3OTIzNzgzMjU5OTAyNDYyNjExNjI2ODM4OTYwOTkxNTUzMzIzMDgyNDk3MzA2MzMzMzc3MDI5MTQzMzM2IiwiMTc1NDU4MDkxODU3MjMwNTQyNzcyMzIxODkzNzQzNjY2Nzk2NDEzNDUzMzI1OTYyNzY2NDg0NjkyOTQwMDg2ODg0NzU0MzMyNjc1OTQiLCIxIl0sInByb3RvY29sIjoiZ3JvdGgxNiIsImN1cnZlIjoiYm4xMjgifSwicHViX3NpZ25hbHMiOlsiMjE1NzUxMjcyMTYyMzYyNDg4Njk3MDIyNzYyNDYwMzc1NTcxMTkwMDc0NjYxODAzMDE5NTc3NjIxOTY1OTM3ODY3MzMwMDc2MTciLCIyNDk0OTAwMzcxMzUyMjUzNjExNDU5NDQ4NDc5MTQ2NTM2NTQ2MDM5NjMyODc3MDAyNDU1ODg3OTMxNDUwNjQ4MDU2MzkyNDMwNDM5IiwiMCJdfQ'; await expect(verifier.fullVerify(token, request, testOpts)).resolves.not.toThrow(); }); @@ -536,172 +544,6 @@ describe('auth tests', () => { await expect(verifier.fullVerify(token, request, testOpts)).resolves.not.toThrow(); }); - test.skip('TestResponseWithEmptyQueryRequest_ErrorCase', async () => { - // TODO: update proof data when fixed. - const sender = '1125GJqgw6YEsKFwj63GY87MMxPL9kwDKxPUiwMLNZ'; - const callback = 'https://test.com/callback'; - const userId = 'did:polygonid:polygon:mumbai:2qNAbfxams2N4enwgBhj7yvPUbDrLwC2bsBZYZCTQR'; - const reason = 'test'; - const request: AuthorizationRequestMessage = createAuthorizationRequest( - reason, - sender, - callback - ); - request.body['message'] = 'test'; - expect(request.body.scope.length).toEqual(0); - expect(request.body.callbackUrl).toEqual(callback); - expect(request.body.reason).toEqual(reason); - expect(request.from).toEqual(sender); - - const proofRequest: ZeroKnowledgeProofRequest = { - id: 10, - circuitId: 'credentialAtomicQueryMTPV2', - query: { - allowedIssuers: ['*'], - type: 'KYCCountryOfResidenceCredential', - context: - 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld' - } - }; - request.body.scope.push(proofRequest); - - expect(request.body.scope.length).toEqual(1); - - const mtpProof: ZeroKnowledgeProofResponse = { - id: proofRequest.id, - circuitId: 'credentialAtomicQueryMTPV2', - proof: { - pi_a: [ - '9842063851166899357608339265674332708045063650629323669848120342194679808076', - '16206954115086409123668950271515758924555963980494493510855476478591822404827', - '1' - ], - pi_b: [ - [ - '5545535720422947171459387662245741010162970511259433941703524281908236057668', - '10561444885633079418413567831528236222511254998093130837955795587671392481895' - ], - [ - '12832733708698041875897779399574055232051553662135872243100477516512773082967', - '9817420633398166811616613261515725671943907865363970047192668444892570410329' - ], - ['1', '0'] - ], - pi_c: [ - '15730764089701951976631362836516364492331983136934339494373153516632793542908', - '6678992215432400449623605365468322210942926642059613422963275672866160988129', - '1' - ], - protocol: 'groth16' - }, - pub_signals: [ - '0', - '23280069646923371456510050373677752848804011824981226331232885668622242306', - '2943483356559152311923412925436024635269538717812859789851139200242297094', - '23', - '22064883246134712298411652505170593669589088931416964593351226206090301954', - '1', - '2943483356559152311923412925436024635269538717812859789851139200242297094', - '1642074362', - '74977327600848231385663280181476307657', - '0', - '0', - '2', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0', - '0' - ] - }; - - const response: AuthorizationResponseMessage = { - id: uuidv4(), - thid: request.thid, - typ: request.typ, - type: PROTOCOL_CONSTANTS.PROTOCOL_MESSAGE_TYPE.AUTHORIZATION_RESPONSE_MESSAGE_TYPE, - from: userId, - to: sender, - body: { - message: request.body.message, - scope: [mtpProof] - } - }; - - const verifier = await Verifier.newVerifier({ - stateResolver: resolvers, - circuitsDir: path.join(__dirname, './testdata'), - documentLoader: schemaLoader - }); - - try { - expect(await verifier.verifyAuthResponse(response, request)).toThrowError(); - } catch (e: unknown) { - expect((e as Error).message).toContain( - 'failed to validate operators: empty credentialSubject request available only for equal operation' - ); - } - }); it('registry: get existing circuit', () => { const type = Circuits.getCircuitPubSignals('authV2'); @@ -725,12 +567,12 @@ describe('auth tests', () => { }); it('verify jwz with selective disclosure', async () => { - const sender = 'did:polygonid:polygon:mumbai:2qJ689kpoJxcSzB5sAFJtPsSBSrHF5dq722BHMqURL'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; const reason = 'age verification'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( reason, - '', + 'message to sign', sender, callback ); @@ -762,21 +604,21 @@ describe('auth tests', () => { documentLoader: schemaLoader }); request.id = '28494007-9c49-4f1a-9694-7700c08865bf'; - request.thid = '7f38a193-0918-4a48-9fac-36adfdb8b542'; // because it's used in the response + request.thid = '87f9abf5-26cd-4cda-9b8c-b05e562f23fa'; // because it's used in the response const token = - 'eyJhbGciOiJncm90aDE2IiwiY2lyY3VpdElkIjoiYXV0aFYyIiwiY3JpdCI6WyJjaXJjdWl0SWQiXSwidHlwIjoiYXBwbGljYXRpb24vaWRlbjMtemtwLWpzb24ifQ.eyJpZCI6ImYzZjVmM2JkLTJkOGItNDk0OS1hMDY5LTk3NTliZTdjZjUwYSIsInR5cCI6ImFwcGxpY2F0aW9uL2lkZW4zY29tbS1wbGFpbi1qc29uIiwidHlwZSI6Imh0dHBzOi8vaWRlbjMtY29t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kxMzg3Mjc5Njg2MzUyNTAzMDA2NDAxNTI2Mzc1OTM1NDA1Il0sWyIxMTMyNzU0NjkwODI1NjMzMDQwNjM1OTg4MDg3MDU0OTAyNTg2MTE5NjU4NjUyMzQ4MDM5OTQ3ODU0MTIwNzEyNjUzMjExMTkzODc2IiwiMTUzNDA0MDMwOTIzMjI0MjMwMjk2MTQ0MzE5OTk3OTkzMjk0MDk3MDY0Nzk1MDg5NDMzMzUyNTQxNzA4OTA5NTczMjQ0NjgwMDg5OTkiXSxbIjEiLCIwIl1dLCJwaV9jIjpbIjY0NTUyODc1Mzk4OTMyODcxNDA0OTI2MDU1NTMzMzg3MDYyNjgxODkyOTMxMTQ4MDg5NTI3MzgxNTA3ODYwNTUyMDM3NTA1NDA2MjQiLCIxNjI1MTQ3NDg2ODgxNzExNzI5ODE3MjI3MjMzNjA1NTU2MDIzMjMxMjQ3NzkxMzM1NjMxMDcwMjgzNTA0OTY1ODA3MzUxNjcwMzQwNyIsIjEiXSwicHJvdG9jb2wiOiJncm90aDE2IiwiY3VydmUiOiJibjEyOCJ9LCJwdWJfc2lnbmFscyI6WyIyMTU3NTEyNzIxNjIzNjI0ODg2OTcwMjI3NjI0NjAzNzU1NzExOTAwNzQ2NjE4MDMwMTk1Nzc2MjE5NjU5Mzc4NjczMzAwNzYxNyIsIjI3MjE3NDkzNTA2NTU1MjQ1NzQ0MjU1OTQxNTY2NDEwMzUzOTcyNjIyNDc1NjAwOTY5NDkzODYzODgwNTM2NTI5MTkyMjYxNjUzMzciLCIwIl19'; await expect(verifier.fullVerify(token, request, testOpts)).resolves.not.toThrow(); }); it('test verify empty credential subject', async () => { - const sender = 'did:polygonid:polygon:mumbai:2qJ689kpoJxcSzB5sAFJtPsSBSrHF5dq722BHMqURL'; + const sender = 'did:iden3:polygon:amoy:xCRp75DgAdS63W65fmXHz6p9DwdonuRU9e46DifhX'; const callback = 'https://test.com/callback'; const reason = 'age verification'; const request: AuthorizationRequestMessage = createAuthorizationRequestWithMessage( reason, - '', + 'message to sign', sender, callback ); @@ -791,8 +633,8 @@ describe('auth tests', () => { query: { allowedIssuers: ['*'], context: - 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v101.json-ld', - type: 'KYCEmployee' + 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld', + type: 'KYCAgeCredential' } }; request.body.scope.push(proofRequest); @@ -805,10 +647,10 @@ describe('auth tests', () => { documentLoader: schemaLoader }); request.id = '28494007-9c49-4f1a-9694-7700c08865bf'; - request.thid = 'ee92ab12-2671-457e-aa5e-8158c205a985'; // because it's used in the response + request.thid = '4594d6a8-660d-4747-8147-0e06a2fc29ed'; // because it's used in the response const token = - 'eyJhbGciOiJncm90aDE2IiwiY2lyY3VpdElkIjoiYXV0aFYyIiwiY3JpdCI6WyJjaXJjdWl0SWQiXSwidHlwIjoiYXBwbGljYXRpb24vaWRlbjMtemtwLWpzb24ifQ.eyJpZCI6Ijc0MWU2MTA4LTM4MzgtNDFiYS1hMGIwLTlhZmZkZjY1NTg2YSIsInR5cCI6ImFwcGxpY2F0aW9uL2lkZW4zY29tbS1wbGFpbi1qc29uIiwidHlwZSI6Imh0dHBzOi8vaWRlbjMtY29tbXVuaWNhdGlvbi5pby9hdXRob3JpemF0aW9uLzEuMC9yZXNwb25zZSIsInRoaWQiOiIxNjEwN2QwYi01ZDU3LTQ1OWEtYWJiMi00OWE2Mjg2YTA5NTMiLCJmcm9tIjoiZGlkOnBvbHlnb25pZDpwb2x5Z29uOm11bWJhaToycUd5VDhtTUdydlRqTVdDelRHOE1YVG9neGp6UFRVYjJMa2tMM0FKMTEiLCJ0byI6ImRpZDpwb2x5Z29uaWQ6cG9seWdvbjptdW1iYWk6MnFKNjg5a3BvSnhjU3pCNXNBRkp0UHNTQlNySEY1ZHE3MjJCSE1xVVJMIiwiYm9keSI6eyJkaWRfZG9jIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3Lncz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TI3OTU1NzkzNDg4NjAzNzg4NzYwNDc4MDY5NTEzODc5NDA5NzM5NTgyMjg4MDM5NjI2MjY4MDQxNjEzOTY4MTg3NCJdLFsiMSIsIjAiXV0sInBpX2MiOlsiMTIzNjAxMzc4NDg4MjU1OTE1NTIwMDU0MDMwMDk5NjY0MDcwMzQ4MjIzMjI5MDY2MTQ2OTY4NzEzMzMxNTk2ODMwMjg2NTA1NjU1NjUiLCIxMTkxNjIxNTk5NTY4MDU1MzAwMjU2MTE4MjI5NDUxODkzOTczMDAyMTg1NjUyOTcxMTc1ODc3OTcwNDcyOTcxMTUyNDc0NzIzNjMxMiIsIjEiXSwicHJvdG9jb2wiOiJncm90aDE2IiwiY3VydmUiOiJibjEyOCJ9LCJwdWJfc2lnbmFscyI6WyIyMTU3NTEyNzIxNjIzNjI0ODg2OTcwMjI3NjI0NjAzNzU1NzExOTAwNzQ2NjE4MDMwMTk1Nzc2MjE5NjU5Mzc4NjczMzAwNzYxNyIsIjIxODc3MjU0ODI3Njk4MjM0MDYzMzgwOTk3NjE2MzI0NTM2MzgwMDAxNzkwOTEzMzMyNTQ1OTk4MzkzMzMxMjY2MzAwMjI1NDUwNDYzIiwiMCJdfQ'; await expect(verifier.fullVerify(token, request, testOpts)).resolves.not.toThrow(); }); diff --git a/test/mocks.ts b/test/mocks.ts index 488fd8a..3ed2400 100644 --- a/test/mocks.ts +++ b/test/mocks.ts @@ -54,6 +54,7 @@ export const testOpts: VerifyOpts = { const mockStateResolver: MockResolver = new MockResolver(); export const resolvers: Resolvers = { + 'polygon:amoy': mockStateResolver, 'polygon:mumbai': mockStateResolver }; export const resolveDIDDocument = {