From 7be8ef958f3e805b8e3f6b6094ac4df5ff0a36be Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Fri, 6 Sep 2024 18:54:48 +0300 Subject: [PATCH] add cspell --- src/credentials/status/on-chain-revocation.ts | 2 +- src/credentials/status/resolver.ts | 2 +- src/proof/provers/witness_calculator.ts | 8 ++++---- src/storage/blockchain/onchain-revocation.ts | 2 +- src/verifiable/constants.ts | 4 ++-- src/verifiable/credential.ts | 2 +- tests/circuits/utils.ts | 2 +- .../on-chain-revocation.test.ts | 4 ++-- tests/credentials/credential-wallet.test.ts | 4 ++-- tests/handlers/auth.test.ts | 20 +++++++++---------- tests/handlers/contract-request.test.ts | 6 +++--- tests/handlers/fetch.test.ts | 18 ++++++++--------- tests/handlers/revocation-status.test.ts | 8 ++++---- tests/iden3comm/message-handler.test.ts | 2 +- tests/proofs/mtp-onchain.test.ts | 2 +- tests/proofs/mtp.test.ts | 2 +- tests/proofs/sig.test.ts | 6 +++--- 17 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/credentials/status/on-chain-revocation.ts b/src/credentials/status/on-chain-revocation.ts index 4ce1d5fc..e1dc07b1 100644 --- a/src/credentials/status/on-chain-revocation.ts +++ b/src/credentials/status/on-chain-revocation.ts @@ -150,7 +150,7 @@ export class OnChainResolver implements CredentialStatusResolver { return network; } - // TODO (illia-korotia): is dirty hack for mock in tests. + // TODO: is dirty hack for mock in tests. // need to pass to constructor list of state stores not list of network configs private _getStateStorageForIssuer(issuerId: Id): IStateStorage { const issuerChainId = getChainId(DID.blockchainFromId(issuerId), DID.networkIdFromId(issuerId)); diff --git a/src/credentials/status/resolver.ts b/src/credentials/status/resolver.ts index c51bdd15..ba891847 100644 --- a/src/credentials/status/resolver.ts +++ b/src/credentials/status/resolver.ts @@ -26,7 +26,7 @@ export interface CredentialStatusResolveOptions { } /** - * CredentialStatusResolver is an interface that allows to interact with deifferent types of credential status + * CredentialStatusResolver is an interface that allows to interact with different types of credential status * to resolve revocation status * * @public diff --git a/src/proof/provers/witness_calculator.ts b/src/proof/provers/witness_calculator.ts index 8e7c5c2f..4af2061d 100644 --- a/src/proof/provers/witness_calculator.ts +++ b/src/proof/provers/witness_calculator.ts @@ -308,8 +308,8 @@ function fnvHash(str: any) { hash *= BigInt(0x100000001b3); hash %= uint64_max; } - let shash = hash.toString(16); - const n = 16 - shash.length; - shash = '0'.repeat(n).concat(shash); - return shash; + let hashHex = hash.toString(16); + const n = 16 - hashHex.length; + hashHex = '0'.repeat(n).concat(hashHex); + return hashHex; } diff --git a/src/storage/blockchain/onchain-revocation.ts b/src/storage/blockchain/onchain-revocation.ts index 1444beb4..fb05e186 100644 --- a/src/storage/blockchain/onchain-revocation.ts +++ b/src/storage/blockchain/onchain-revocation.ts @@ -21,7 +21,7 @@ export class OnChainRevocationStorage { * * Creates an instance of OnChainIssuer. * @public - * @param {string} - onhcain contract address + * @param {string} - onchain contract address * @param {string} - rpc url to connect to the blockchain */ diff --git a/src/verifiable/constants.ts b/src/verifiable/constants.ts index ee8e7857..53e1a247 100644 --- a/src/verifiable/constants.ts +++ b/src/verifiable/constants.ts @@ -31,7 +31,7 @@ export const VerifiableConstants = Object.freeze({ PUSH_NOTIFICATION: 'push-notification' }, AUTH: { - AUTH_BJJ_CREDENTAIL_HASH: '013fd3f623559d850fb5b02ff012d0e2', + AUTH_BJJ_CREDENTIAL_HASH: '013fd3f623559d850fb5b02ff012d0e2', AUTH_BJJ_CREDENTIAL_SCHEMA_JSON_URL: 'https://schema.iden3.io/core/json/auth.json', AUTH_BJJ_CREDENTIAL_SCHEMA_JSONLD_URL: 'https://schema.iden3.io/core/jsonld/auth.jsonld', AUTH_BJJ_CREDENTIAL_TYPE: 'AuthBJJCredential', @@ -63,7 +63,7 @@ export enum CredentialStatusType { Iden3ReverseSparseMerkleTreeProof = 'Iden3ReverseSparseMerkleTreeProof', // Iden3commRevocationStatusV1 is CredentialStatusType for iden3comm revocation status Iden3commRevocationStatusV1 = 'Iden3commRevocationStatusV1.0', - // Iden3OnсhainSparseMerkleTreeProof2023 is a proof type for MTP proofs with iden3 metadata from blockchain + // Iden3OnchainSparseMerkleTreeProof2023 is a proof type for MTP proofs with iden3 metadata from blockchain Iden3OnchainSparseMerkleTreeProof2023 = 'Iden3OnchainSparseMerkleTreeProof2023' } diff --git a/src/verifiable/credential.ts b/src/verifiable/credential.ts index e250bfa8..2fdd31d7 100644 --- a/src/verifiable/credential.ts +++ b/src/verifiable/credential.ts @@ -416,7 +416,7 @@ export class W3CCredential { resolverURL: string ): Promise { await validateDIDDocumentAuth(proof.issuerData.id, resolverURL, proof.issuerData.state.value); - // root from proof == issuerData.state.сlaimsTreeRoot + // root from proof == issuerData.state.claimsTreeRoot const { hi, hv } = coreClaim.hiHv(); const rootFromProofValue = await rootFromProof(proof.mtp, hi, hv); if (!rootFromProofValue.equals(proof.issuerData.state.claimsTreeRoot)) { diff --git a/tests/circuits/utils.ts b/tests/circuits/utils.ts index e3a32bcc..4844a19d 100644 --- a/tests/circuits/utils.ts +++ b/tests/circuits/utils.ts @@ -44,7 +44,7 @@ const TestClaimDocument = `{ "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", - "image": "data:image/png;base64,iVBORw0KGgokJggg==", + "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", diff --git a/tests/credentials/credential-statuses/on-chain-revocation.test.ts b/tests/credentials/credential-statuses/on-chain-revocation.test.ts index 736a61f3..c432a1cb 100644 --- a/tests/credentials/credential-statuses/on-chain-revocation.test.ts +++ b/tests/credentials/credential-statuses/on-chain-revocation.test.ts @@ -335,7 +335,7 @@ describe('onchain revocation checks', () => { }); const { did: issuerDID, credential: issuerAuthCredential } = await createIdentity(idWallet, { - seed: byteEncoder.encode('soedseedseedseedseedseedseedseed'), + seed: byteEncoder.encode('seedseedseedseedseedseedseedseed'), revocationOpts: { id, type: CredentialStatusType.Iden3OnchainSparseMerkleTreeProof2023, @@ -350,7 +350,7 @@ describe('onchain revocation checks', () => { const callBackUseCase = new Promise((resolve) => { (async () => { const { did: userDID, credential: userAuthCredential } = await createIdentity(idWallet, { - seed: byteEncoder.encode('seedseedseedseedseedseedseedseex'), + seed: byteEncoder.encode('seedseedseedseedseedseedseedseed'), revocationOpts: { id, type: CredentialStatusType.Iden3OnchainSparseMerkleTreeProof2023, diff --git a/tests/credentials/credential-wallet.test.ts b/tests/credentials/credential-wallet.test.ts index 318d922f..12471cba 100644 --- a/tests/credentials/credential-wallet.test.ts +++ b/tests/credentials/credential-wallet.test.ts @@ -424,8 +424,8 @@ const credentialFlow = async (storage: IDataStorage) => { ); // remove credential error - await expect(credentialWallet.remove('unknowId')).to.be.rejectedWith( - 'item not found to delete: unknowId' + await expect(credentialWallet.remove('unknownId')).to.be.rejectedWith( + 'item not found to delete: unknownId' ); await credentialWallet.remove('test1'); diff --git a/tests/handlers/auth.test.ts b/tests/handlers/auth.test.ts index 47122508..64418d46 100644 --- a/tests/handlers/auth.test.ts +++ b/tests/handlers/auth.test.ts @@ -156,7 +156,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: [proofReq as ZeroKnowledgeProofRequest] }; @@ -226,7 +226,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: [proofReq as ZeroKnowledgeProofRequest] }; @@ -385,7 +385,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: proofReqs }; @@ -549,7 +549,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: proofReqs }; @@ -791,7 +791,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: proofReqs }; @@ -1466,7 +1466,7 @@ describe('auth', () => { body: { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: [ { @@ -1535,12 +1535,12 @@ describe('auth', () => { }; const response = JSON.parse( - `{"id":"9f8c5eaf-761b-45a3-9291-e716809ace80","typ":"application/iden3-zkp-json","type":"https://iden3-communication.io/authorization/1.0/response","thid":"f1db2356-9f44-48ad-9b76-f89d47f21f6a","body":{"message":"mesage","scope":[{"id":1,"circuitId":"credentialAtomicQueryV3-beta.1","proof":{"pi_a":["1957042983521939777779358613512940538748371001503599796504079991585151845626","5980467088491530700980741867186770936154186459285094575907693303048036963689","1"],"pi_b":[["5742671146783049896789457637506168650313117608892287762091826086179746860469","7867980002214299883401553001814837114723536790472835510365975534274190677490"],["6409919485783982335585179727042442194321707383499872699189740318445051390961","1369980068779537226244190127504408237299520988801560937733214682094782613117"],["1","0"]],"pi_c":["5711121494820066463200893985386651555980045684596061159643138162113786427802","4095818364808367579242275974249584152089253995861921406668522195898158853090","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["0","21568225469889458305914841490175280093555015071329787375641431262509208065","4487386332479489158003597844990487984925471813907462483907054425759564175341","0","0","0","1","1","25191641634853875207018381290409317860151551336133597267061715643603096065","1","4487386332479489158003597844990487984925471813907462483907054425759564175341","1709225461","198285726510688200335207273836123338699","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","1","25191641634853875207018381290409317860151551336133597267061715643603096065","0"]},{"id":2,"circuitId":"linkedMultiQuery10-beta.1","proof":{"pi_a":["10008762987135252748343336852440821999292200194586609431123158877924829442619","643120883606370243165315267728925724383441131555632496875810966571180142836","1"],"pi_b":[["20325202427888218305042001051611691791013545949589864140437875458628437599770","8717600144533993361171658192288756446811108221293161636717237909993926710318"],["14981619958191157581227114000872054457371373393565997302166302876147503284338","16553636587728487263592580154123194292472350845107268041191122057483030032517"],["1","0"]],"pi_c":["16072126589976107857236142821613193518209749401521398065019425748092192614959","303906682296869502342276988123716958990500798695456357531107835924939259150","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["14840595334989550616466083197180000787621620083536890923904228235213356726165","1","0","0","0","0","0","0","0","0","0","0","15577114799056939633552845531011024672939493492769628285661359711655214561162","16998762965396944782667557741185828136467747762830028217027973617373862301958","9302526208507753799501130128908494673412443631541424409551205277529949662394","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403"]},{"id":3,"circuitId":"credentialAtomicQueryV3-beta.1","proof":{"pi_a":["4918421968222994875065132919357788716527410020013314076838075601739876838116","10576714801149162526665883185954136825228282980216373802495776414648547250389","1"],"pi_b":[["11108578138197665525735155920251801717888098160693764639454679880928722733880","3997721247159844618817277585055198811110117246676622629879543401795646667027"],["20635473172141447711225783196574171578493742575849493414547293568487122129963","6948443179619059689387710642006412901626278322232965354300544053846217743110"],["1","0"]],"pi_c":["469119326794229447935775203453233806548971393125675053242929084072054328769","178813906627150338283979844326455982590598033322249897359697376726879654625","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["1","21568225469889458305914841490175280093555015071329787375641431262509208065","4487386332479489158003597844990487984925471813907462483907054425759564175341","14840595334989550616466083197180000787621620083536890923904228235213356726165","21051816437711998017249050444244727806861025707804897813951842286690382472927","0","1","3","25191641634853875207018381290409317860151551336133597267061715643603096065","1","4487386332479489158003597844990487984925471813907462483907054425759564175341","1709225477","219578617064540016234161640375755865412","1296351758269061173317105041968067077451914386086222931516199194959869463882","0","1","1702252800000000000","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","1","25191641634853875207018381290409317860151551336133597267061715643603096065","12345"]}]},"from":"did:iden3:polygon:mumbai:wuw5tydZ7AAd3efwEqPprnqjiNHR24jqruSPKmV1V","to":"did:iden3:polygon:mumbai:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth"}` + `{"id":"9f8c5eaf-761b-45a3-9291-e716809ace80","typ":"application/iden3-zkp-json","type":"https://iden3-communication.io/authorization/1.0/response","thid":"f1db2356-9f44-48ad-9b76-f89d47f21f6a","body":{"message":"message","scope":[{"id":1,"circuitId":"credentialAtomicQueryV3-beta.1","proof":{"pi_a":["1957042983521939777779358613512940538748371001503599796504079991585151845626","5980467088491530700980741867186770936154186459285094575907693303048036963689","1"],"pi_b":[["5742671146783049896789457637506168650313117608892287762091826086179746860469","7867980002214299883401553001814837114723536790472835510365975534274190677490"],["6409919485783982335585179727042442194321707383499872699189740318445051390961","1369980068779537226244190127504408237299520988801560937733214682094782613117"],["1","0"]],"pi_c":["5711121494820066463200893985386651555980045684596061159643138162113786427802","4095818364808367579242275974249584152089253995861921406668522195898158853090","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["0","21568225469889458305914841490175280093555015071329787375641431262509208065","4487386332479489158003597844990487984925471813907462483907054425759564175341","0","0","0","1","1","25191641634853875207018381290409317860151551336133597267061715643603096065","1","4487386332479489158003597844990487984925471813907462483907054425759564175341","1709225461","198285726510688200335207273836123338699","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","1","25191641634853875207018381290409317860151551336133597267061715643603096065","0"]},{"id":2,"circuitId":"linkedMultiQuery10-beta.1","proof":{"pi_a":["10008762987135252748343336852440821999292200194586609431123158877924829442619","643120883606370243165315267728925724383441131555632496875810966571180142836","1"],"pi_b":[["20325202427888218305042001051611691791013545949589864140437875458628437599770","8717600144533993361171658192288756446811108221293161636717237909993926710318"],["14981619958191157581227114000872054457371373393565997302166302876147503284338","16553636587728487263592580154123194292472350845107268041191122057483030032517"],["1","0"]],"pi_c":["16072126589976107857236142821613193518209749401521398065019425748092192614959","303906682296869502342276988123716958990500798695456357531107835924939259150","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["14840595334989550616466083197180000787621620083536890923904228235213356726165","1","0","0","0","0","0","0","0","0","0","0","15577114799056939633552845531011024672939493492769628285661359711655214561162","16998762965396944782667557741185828136467747762830028217027973617373862301958","9302526208507753799501130128908494673412443631541424409551205277529949662394","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403","14612518006493998037149299647974237771551070312096882407440651052752259038403"]},{"id":3,"circuitId":"credentialAtomicQueryV3-beta.1","proof":{"pi_a":["4918421968222994875065132919357788716527410020013314076838075601739876838116","10576714801149162526665883185954136825228282980216373802495776414648547250389","1"],"pi_b":[["11108578138197665525735155920251801717888098160693764639454679880928722733880","3997721247159844618817277585055198811110117246676622629879543401795646667027"],["20635473172141447711225783196574171578493742575849493414547293568487122129963","6948443179619059689387710642006412901626278322232965354300544053846217743110"],["1","0"]],"pi_c":["469119326794229447935775203453233806548971393125675053242929084072054328769","178813906627150338283979844326455982590598033322249897359697376726879654625","1"],"protocol":"groth16","curve":"bn128"},"pub_signals":["1","21568225469889458305914841490175280093555015071329787375641431262509208065","4487386332479489158003597844990487984925471813907462483907054425759564175341","14840595334989550616466083197180000787621620083536890923904228235213356726165","21051816437711998017249050444244727806861025707804897813951842286690382472927","0","1","3","25191641634853875207018381290409317860151551336133597267061715643603096065","1","4487386332479489158003597844990487984925471813907462483907054425759564175341","1709225477","219578617064540016234161640375755865412","1296351758269061173317105041968067077451914386086222931516199194959869463882","0","1","1702252800000000000","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","1","25191641634853875207018381290409317860151551336133597267061715643603096065","12345"]}]},"from":"did:iden3:polygon:mumbai:wuw5tydZ7AAd3efwEqPprnqjiNHR24jqruSPKmV1V","to":"did:iden3:polygon:mumbai:wzokvZ6kMoocKJuSbftdZxTD6qvayGpJb3m4FVXth"}` ) as AuthorizationResponseMessage; await authHandler.handleAuthorizationResponse(response, authRequest, TEST_VERIFICATION_OPTS); }); - it('null scope auth requst', async () => { + it('null scope auth request', async () => { const msgBytes = byteEncoder.encode( '{"id":"f3688b54-248d-4a75-b743-39f99a49adb8","typ":"application/iden3comm-plain-json","type":"https://iden3-communication.io/authorization/1.0/request","thid":"f3688b54-248d-4a75-b743-39f99a49adb8","body":{"callbackUrl":"https://issuer-admin.polygonid.me/v1/credentials/links/callback?sessionID=1bd6b1cb-cfc1-4817-8b77-3bc150435e29\u0026linkID=880face8-43b7-428b-80b1-adb6da0632ac","reason":"authentication","scope":null},"from":"did:polygonid:polygon:mumbai:2qMLpQ5py1YzBTTuLEeX2yr6pDGQ7gyXAfygaPakzq"}' ); @@ -2091,7 +2091,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: proofReqs }; @@ -2156,7 +2156,7 @@ describe('auth', () => { const authReqBody: AuthorizationRequestMessageBody = { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: [proofReq as ZeroKnowledgeProofRequest] }; diff --git a/tests/handlers/contract-request.test.ts b/tests/handlers/contract-request.test.ts index a45d4ca0..ef9142e2 100644 --- a/tests/handlers/contract-request.test.ts +++ b/tests/handlers/contract-request.test.ts @@ -647,7 +647,7 @@ describe('contract-request', () => { // cross chain integration test it.skip('cross chain contract request flow - integration test', async () => { - const privadoTestRpcUrl = '<>'; // issuer RPC URL - privato test + const privadoTestRpcUrl = '<>'; // issuer RPC URL - privado test const privadoTestStateContract = '0x975556428F077dB5877Ea2474D783D6C69233742'; const amoyVerifierRpcUrl = '<>'; // verifier RPC URL - amoy const erc20Verifier = '0x74030e4c5d53ef381A889C01f0bBd3B8336F4a4a'; @@ -805,8 +805,8 @@ describe('contract-request', () => { ).to.be.equal(proofReqs[0].id); }); - it.skip('contract request flow V3 sig `email-verified` transak req - integration test', async () => { - const privadoTestRpcUrl = '<>'; // issuer RPC URL - privato test + it.skip('contract request flow V3 sig `email-verified` Transak req - integration test', async () => { + const privadoTestRpcUrl = '<>'; // issuer RPC URL - privado test const privadoMainRpcUrl = '<>'; const privadoTestStateContract = '0x975556428F077dB5877Ea2474D783D6C69233742'; const amoyVerifierRpcUrl = '<>'; // verifier RPC URL - amoy diff --git a/tests/handlers/fetch.test.ts b/tests/handlers/fetch.test.ts index 2e896b9a..bae9a36f 100644 --- a/tests/handlers/fetch.test.ts +++ b/tests/handlers/fetch.test.ts @@ -235,25 +235,25 @@ describe('fetch', () => { expect(res).to.be.a('Uint8Array'); - const issueanceMsg = await FetchHandler.unpackMessage( + const issuanceMsg = await FetchHandler.unpackMessage( packageMgr, res, PROTOCOL_CONSTANTS.PROTOCOL_MESSAGE_TYPE.CREDENTIAL_ISSUANCE_RESPONSE_MESSAGE_TYPE ); - expect(issueanceMsg).not.to.be.undefined; - expect(issueanceMsg.body).not.to.be.undefined; - expect(issueanceMsg.body?.credential).not.to.be.undefined; - expect(issueanceMsg.body?.credential.id).to.equal(issuedCred.id); + expect(issuanceMsg).not.to.be.undefined; + expect(issuanceMsg.body).not.to.be.undefined; + expect(issuanceMsg.body?.credential).not.to.be.undefined; + expect(issuanceMsg.body?.credential.id).to.equal(issuedCred.id); const newId = uuid.v4(); - issueanceMsg.body = { - credential: { ...issueanceMsg.body?.credential, id: newId } as W3CCredential + issuanceMsg.body = { + credential: { ...issuanceMsg.body?.credential, id: newId } as W3CCredential }; await fetchHandler.handleIssuanceResponseMessage( - byteEncoder.encode(JSON.stringify(issueanceMsg)) + byteEncoder.encode(JSON.stringify(issuanceMsg)) ); const cred2 = await credWallet.findById(newId); @@ -283,7 +283,7 @@ describe('fetch', () => { expect(await credWallet.list()).to.have.length(4); const response = await msgHandler.handleMessage(bytes, {}); - // credential saved after handleing message via msgHandler + // credential saved after handling message via msgHandler expect(response).to.be.null; expect(await credWallet.list()).to.have.length(5); }); diff --git a/tests/handlers/revocation-status.test.ts b/tests/handlers/revocation-status.test.ts index e538d696..f8afb224 100644 --- a/tests/handlers/revocation-status.test.ts +++ b/tests/handlers/revocation-status.test.ts @@ -31,7 +31,7 @@ import path from 'path'; describe('revocation status', () => { let packageMgr: IPackageManager; - let rsHandlerr: IRevocationStatusHandler; + let rsHandler: IRevocationStatusHandler; let idWallet: IdentityWallet; beforeEach(async () => { @@ -54,7 +54,7 @@ describe('revocation status', () => { proofService.generateAuthV2Inputs.bind(proofService), proofService.verifyState.bind(proofService) ); - rsHandlerr = new RevocationStatusHandler(packageMgr, idWallet); + rsHandler = new RevocationStatusHandler(packageMgr, idWallet); }); it('revocation status works', async () => { @@ -84,7 +84,7 @@ describe('revocation status', () => { const msgBytes = byteEncoder.encode(JSON.stringify(rsReq)); - await rsHandlerr.handleRevocationStatusRequest(userDID, msgBytes); + await rsHandler.handleRevocationStatusRequest(userDID, msgBytes); }); it(`revocation status - no 'from' field`, async () => { @@ -114,7 +114,7 @@ describe('revocation status', () => { const msgBytes = byteEncoder.encode(JSON.stringify(rsReq)); try { - await rsHandlerr.handleRevocationStatusRequest(userDID, msgBytes); + await rsHandler.handleRevocationStatusRequest(userDID, msgBytes); expect.fail(); } catch (err: unknown) { expect((err as Error).message).to.be.equal(`failed request. empty 'from' field`); diff --git a/tests/iden3comm/message-handler.test.ts b/tests/iden3comm/message-handler.test.ts index 008c5565..7de37b91 100644 --- a/tests/iden3comm/message-handler.test.ts +++ b/tests/iden3comm/message-handler.test.ts @@ -147,7 +147,7 @@ describe('MessageHandler', () => { body: { callbackUrl: 'http://localhost:8080/callback?id=1234442-123123-123123', reason: 'reason', - message: 'mesage', + message: 'message', did_doc: {}, scope: [ { diff --git a/tests/proofs/mtp-onchain.test.ts b/tests/proofs/mtp-onchain.test.ts index 9ff86c95..b6b11ed6 100644 --- a/tests/proofs/mtp-onchain.test.ts +++ b/tests/proofs/mtp-onchain.test.ts @@ -133,7 +133,7 @@ describe('mtp onchain proofs', () => { }); const onChainMerklizedTest = async (circuitId: CircuitId) => { - const seedPhraseIssuer: Uint8Array = byteEncoder.encode('seedseedseedseedseedseedseedsnew'); + const seedPhraseIssuer: Uint8Array = byteEncoder.encode('seedseedseedseedseedseedseedissuer'); const seedPhrase: Uint8Array = byteEncoder.encode('seedseedseedseedseedseedseeduser'); const { did: userDID } = await idWallet.createIdentity({ diff --git a/tests/proofs/mtp.test.ts b/tests/proofs/mtp.test.ts index a9a6d52c..b0accf40 100644 --- a/tests/proofs/mtp.test.ts +++ b/tests/proofs/mtp.test.ts @@ -215,7 +215,7 @@ describe('mtp proofs', () => { }); const merklizedTest = async (circuitId: CircuitId) => { - const seedPhraseIssuer: Uint8Array = byteEncoder.encode('seedseedseedseedseedseedseedsnew'); + const seedPhraseIssuer: Uint8Array = byteEncoder.encode('seedseedseedseedseedseedseedissuer'); const { did: userDID } = await createIdentity(idWallet, { seed: SEED_USER diff --git a/tests/proofs/sig.test.ts b/tests/proofs/sig.test.ts index 82321871..44bf92fc 100644 --- a/tests/proofs/sig.test.ts +++ b/tests/proofs/sig.test.ts @@ -398,7 +398,7 @@ describe('sig proofs', () => { price: 10, deliveryTime: '2023-07-11T16:05:51.140Z', postalProviderInformation: { - name: 'ukr posta', + name: 'postal provider', officeNo: 1 }, homeAddress: { @@ -430,7 +430,7 @@ describe('sig proofs', () => { deliveryTime: '2023-08-12T11:47:50+00:00', homeAddress: { expectedFrom: '2023-08-12T11:47:50+00:00', - line1: 'Kyiv, Zdanovskoi Y. 35', + line1: 'Kyiv, Street One Y. 35', line2: 'apt.1' }, id: userDID.string(), @@ -494,7 +494,7 @@ describe('sig proofs', () => { '@type': ['VerifiableCredential', 'DeliveryAddress'], credentialSubject: { '@type': 'DeliveryAddress', - postalProviderInformation: { name: 'ukr posta' } + postalProviderInformation: { name: 'postal provider' } } } });