diff --git a/CHANGELOG.md b/CHANGELOG.md index 1379585..ac0f5b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.0.7 22 Aug 2023: + +- Fix test stub data +- Update npm @cypress/request to @3.0.0 + ## 0.0.6 12 Jul 2023: - Fix getRevokeStatus function to parseInt for statusListIndex if it is a String diff --git a/__tests__/stub/invalidVP.json b/__tests__/stub/invalidVP.json index 1ba0d2a..33c7920 100644 --- a/__tests__/stub/invalidVP.json +++ b/__tests__/stub/invalidVP.json @@ -1,46 +1,99 @@ { "@context": ["https://www.w3.org/2018/credentials/v1"], - "id": "http://example.org/presentations/3731", + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#vp-15cfeb06-c893-4a88-b2fd-2c6122db69d7", "type": ["VerifiablePresentation"], - "holder": "did:key:z6MkviRLMhsi2VDtFJENiMcbAb8zPBJGDz83catMyN7S2rgb", + "holder": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", "verifiableCredential": [ { "@context": [ "https://w3id.org/security/bbs/v1", "https://www.w3.org/2018/credentials/v1", - "https://stg.issuer.myinfo.gov.sg/myinfo/schema/ageover/v1", + "https://stg.issuer.myinfo.gov.sg/myinfo/schema/age/v1", "https://w3id.org/vc/status-list/2021/v1" ], - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/f5f19f68-3810-463f-8cdb-141aa48e4d4d", - "type": ["VerifiableCredential", "AgeOverCredential"], + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/b2086515-619c-427c-b707-84f238764eac", + "type": ["VerifiableCredential", "AgeCredential"], "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", "credentialSubject": { - "AtLeast18YearsOld": "N", - "type": ["AgeOver"], - "id": "did:key:z6MkmbvZd3XHsdti7ofTQkw1tDi9y9rEM6n1pkDDraQ9xrYW" + "AtLeast18YearsOld": true, + "AtLeast21YearsOld": true, + "type": ["Age"], + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" }, + "name": "Age", + "description": "Age Over Indicators", + "expirationDate": "2025-08-21T06:51:34Z", "credentialStatus": { - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#9646", + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#10267", "type": "StatusList2021Entry", - "statusListIndex": "9646", + "statusListIndex": "10267", "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1" }, - "issuanceDate": "2023-07-12T06:04:47Z", + "issuanceDate": "2023-08-21T07:05:15Z", "proof": { - "created": "2023-07-12T06:04:47Z", + "created": "2023-08-21T07:05:15Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67", "type": "BbsBlsSignatureProof2020", - "nonce": "jFH5GUADdg8igfuB6d4akCjIjPu815MNV2aBdzvdBhA=n", - "proofValue": "ABAA/7+L2u2nQCsPXmYde/7kDY494twd2AzECtzE+td28DrFC5o/ApGVGOZKdmR2lT8Vnwik1AeKnjME1DL9V6ZoLxqwRpKf0t/7Jj1zB2TX3S0a/lgdOrYNjF/mIKlZweHgr4UGqTqtK1sJMp/b0yR+znBOgVpyjOkdd1pMjP9P120/T3WAPuXrO0CYhuoFIZOwPQm5EAAAB0jT9KXaW4htzP3hTtoPbelCNMn8bt+7e+dnB1b0OQG97xYMwPFj+w8651uKxhu8nRUAAAAAgoEcB2TFKbGSCk3RwPXMcXMVeg84mKHnWmzBTJ86vYWoBXEJaI19y0ji3YKk4Dt8M4LzY2y9cR9RJzHxY0RKcwKWTGdXvYsQpsGMZ5wdbo19njWISewU/M8GSOAnYFFwbTlLz+tJDMJIe+k7IcoNJxeIAAAADEsYkRDoARh2XqfvsOF+H0fT+I+SEn8s5J7TsCdtRwQHcGV/MrFBM63XQkexbXyfzOcAcQnTCc8v23tjjfD/dL50L7SMB37/h20GBZ9H0YnZpE+TMK4LwiFkd1UXQST1swan" + "nonce": "KIr/YTYd9HGtHoHe4Nms3PjhxtjiW+xhVYrTcDgOqoc=", + "proofValue": "ABMH//+jbjXQAjbCiOj5Oh6lxFnP45WC4N675Xe8abpOzdN5h1zhxkFlNbas965ep5fqHIG3JGWmlaAe7jL9RqNHNSi5vPaOcnjIu0zHZA4dT9z98viovnPQG8GRoQWNCQllxS+lzW0ucRHG9ruNApHzOv+ESkoPU4/tBbZtm9HPQ8u00N/edXHC7HtkVSJzXSfFwe4AAAB0s+hWBhiH7v3AMi36Is6MvOHz55ZK5l9c8cjbkBqAXl0qt+mh5IACj7wlAeMgCNc8AAAAAhyzTjmFL9cRSLUkXsBAAGbdpZrQqDC1ehc35uonjj8SQv/JgYhlzO/c3e9JMWMj1GuMESzO/H2Slq22d/jFxwyPgKGEQ4I7S7sDrELuIsj3oINYz2e10uOBfDeSPCeAxGhcyG3Myy1mxRFwH50beHUAAAACPPmYj1uOXKtJAlu+FIt3J6q3ibYJ9+rcFXVPapwI8lQqPF7cpSwAE6A9kZbazXH46NkUV1KKec4Uz2l2wLagAg==" + } + }, + { + "@context": [ + "https://w3id.org/security/bbs/v1", + "https://www.w3.org/2018/credentials/v1", + "https://stg.issuer.myinfo.gov.sg/myinfo/schema/personal/v1", + "https://w3id.org/vc/status-list/2021/v1" + ], + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/0ba368dd-f58a-4455-846f-365382ade416", + "type": ["VerifiableCredential", "PersonalCredential"], + "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", + "credentialSubject": { + "uinfin": "S8703396A", + "name": "User S8703396A", + "aliasname": "", + "hanyupinyinname": "", + "hanyupinyinaliasname": "", + "marriedname": "", + "sex": "MALE", + "race": "AMERICAN", + "dob": "1990-04-19", + "residentialstatus": "CITIZEN", + "nationality": "GUINEAN", + "birthcountry": "UNITED STATES", + "regadd": { + "country": "SINGAPORE", + "postal": "609774" + }, + "type": ["Personal"], + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" + }, + "name": "Personal", + "description": "Basic Details of Personal Profile1", + "expirationDate": "2025-08-21T06:51:34Z", + "credentialStatus": { + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#10268", + "type": "StatusList2021Entry", + "statusListIndex": "10268", + "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1" + }, + "issuanceDate": "2023-08-21T07:05:20Z", + "proof": { + "created": "2023-08-21T07:05:20Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67", + "type": "BbsBlsSignatureProof2020", + "nonce": "MfQWYAz9Ha+3ygEUmhlOkmdnAHyiskxvTI7Fc2fT2ac=", + "proofValue": "ACoAp//8fP+Y9rrEm2me6HlQOHtU7A1g6cR6Bvx31BXV4fbHtYFhhN1fTszqrlGwvERxYUTW8+eMJxa+7lmdfO3qXchUAQDHM/yiw8Tmy6bi4xnr/2WJCgmf/2GXWSEiOHrRRD0xgD2qlej+qs/X9v+VJ1vJxQMYaXUmTel5Zl9IZ8M3/F/oJ9tY+41MBa1gNkF/wKljshwAAAB0qkEdjkws3IUCtxdrNszurU0fzkoL2ataW/reLCMLHjtEqAuFEPO4JHOCPfYdlm0DAAAAAkp9+vIiTC4uvkIEIHHhVf2KZk1jtbo+U0poBHlOwzoNESJH1Q+70PdcEjIEWVfUGEBz0rAQinE6ueI6OQ10AjSRJvL/zjzpfzX7nLvXsK8UfmHkR2HHCaVF6kSRSsdkzNNycBdlenGE1Wy7jTac7NUAAAAMYJ2Y1euh+HilfjQjgl3gMKHAQBUmUg6Dy6TUaBYab8UP1/LGyOwRWveiPZcJJadp5sIeZsfrAZZ2hSVL6DMDoWsLqKn2BkKJpUhSgaMtPcwdE7PhGst/GPWk/kTgJzNfHnI5w3xFUM0mvhM8guSKY+xK9Bs/rTXTItiM/+k8K9ZS3jmsE3JhgKs+xmLQYX29AeVUJGHOLhWE2yqXnCUE/lJ2te5o2FvDh9VPm/4EwpZY4R0SF1esqW0MlCjle657Q6AvK+sGO73ECxxilTP3SCXnLFSMrn/2ov1c6mA9iL5Yo/p8CwP731mTLd+3vUVZTreK87WVmlQuAMQA5Lm3PyPGDEeAIBlbpdVyZs6w8hlOAYzMHXj5wyrNNf5Pbz/lXNxtZhH99jAdGyL+SQU0RiUiz7mV9kTlcLRQxqocQhhwevc1PkF8O2Y8gdLlGXR+NiHEOX39hvY0E2BccpnnmzOnTNUZOGCORU7CsZDz1YdkKCrFpFy7w6blF5D99saq" } } ], "proof": { "type": "Ed25519Signature2018", - "created": "2023-07-12T07:29:48Z", + "created": "2023-08-22T06:47:00Z", "proofPurpose": "assertionMethod", - "verificationMethod": "did:key:z6MkviRLMhsi2VDtFJENiMcbAb8zPBJGDz83catMyN7S2rgb#z6MkviRLMhsi2VDtFJENiMcbAb8zPBJGDz83catMyN7S2rgb", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..6MVcOV40KpeAJk_rm9R3YogNM4ae1CjYBEvIpdzshF_meCS_HnZ_JGLkDo96USAy712J-vMKRYUjIGOMX1s_AA" + "verificationMethod": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", + "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..pTydH1ytitQ_FiblmcgsqZC0vxjNp-GpQNbruCO9d9dPC1xUGYoWjitAv0St8zyJgmJ_aFcvXnGuAANIaZJGCw" } } diff --git a/__tests__/stub/resultPresentation2018.json b/__tests__/stub/resultPresentation2018.json index 298cef4..29444ec 100644 --- a/__tests__/stub/resultPresentation2018.json +++ b/__tests__/stub/resultPresentation2018.json @@ -5,25 +5,25 @@ "proof": { "@context": "https://w3id.org/security/v2", "type": "Ed25519Signature2018", - "created": "2023-07-12T09:13:45Z", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..-9UOZ1jVRQBq9xPqY6FjPCR_ORMXCSohGV6-rH2WPnIrSAXlPQmAMoDCyvVGg_DvOm_HnBlRKbxKtzseFyJqAw", + "created": "2023-08-22T06:47:00Z", + "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..pTydH1ytitQ_FiblmcgsqZC0vxjNp-GpQNbruCO9d9dPC1xUGYoWjitAv0St8zyJgmJ_aFcvXnGuAANIaZJGCw", "proofPurpose": "assertionMethod", - "verificationMethod": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi#z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi" + "verificationMethod": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" }, "verified": true, "purposeResult": { "valid": true, "controller": { "@context": "https://w3id.org/security/v2", - "id": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi", + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", "assertionMethod": [ - "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi#z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi" + "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" ], "verificationMethod": { - "id": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi#z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi", "type": "Ed25519VerificationKey2018", - "controller": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi", - "publicKeyBase58": "5sMyjiRDGYPo2W9XHmfZt8XvpmKwvAfEGHNKykQcEnuL" + "controller": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", + "publicKeyBase58": "rEcVnvAuGDs2hTbMH9FoTn3orsZVoGPPbJaNGr8wMma" } } } diff --git a/__tests__/stub/signedSelectiveDisclosedVC.json b/__tests__/stub/signedSelectiveDisclosedVC.json index 134a161..a5fc558 100644 --- a/__tests__/stub/signedSelectiveDisclosedVC.json +++ b/__tests__/stub/signedSelectiveDisclosedVC.json @@ -2,32 +2,33 @@ "@context": [ "https://w3id.org/security/bbs/v1", "https://www.w3.org/2018/credentials/v1", - "https://stg.issuer.myinfo.gov.sg/myinfo/schema/ageover/v1", + "https://stg.issuer.myinfo.gov.sg/myinfo/schema/age/v1", "https://w3id.org/vc/status-list/2021/v1" ], - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/a8a0545b-768f-40eb-87e8-346476bf6dfd", - "type": ["AgeOverCredential", "VerifiableCredential"], - "description": "Sample of Age Over Credential", - "name": "Age Over Credential", + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/78f3b60c-7411-41eb-9345-24167d9a93c4", + "type": ["VerifiableCredential", "AgeCredential"], + "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", + "credentialSubject": { + "AtLeast18YearsOld": true, + "AtLeast21YearsOld": true, + "type": ["Age"], + "id": "did:key:z6Mkk7yqnGF3YwTrLpqrW6PGsKci7dNqh1CjnvMbzrMerSeL" + }, + "name": "Age", + "description": "Age Over Indicators", + "expirationDate": "1970-01-21T06:54:46Z", "credentialStatus": { - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#9579", + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#10271", "type": "StatusList2021Entry", - "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1", - "statusListIndex": "9579" + "statusListIndex": "10271", + "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1" }, - "credentialSubject": { - "id": "did:key:z6MkndAHigYrXNpape7jgaC7jHiWwxzB3chuKUGXJg2b5RSj", - "type": "AgeOver", - "AtLeast21YearsOld": "Y" - }, - "issuanceDate": "2023-07-11T07:02:08Z", - "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", + "issuanceDate": "2023-08-21T07:49:35Z", "proof": { - "type": "BbsBlsSignatureProof2020", - "created": "2023-07-11T07:02:08Z", - "nonce": "iD6nH/oIk8gcg9NCe7eRFN6gmqbt0ctZx4RI0TGK4UJkr1RLHnq5Wa1B6mT4vzDFTLs=", + "type": "BbsBlsSignature2020", + "created": "2023-08-21T07:49:35Z", "proofPurpose": "assertionMethod", - "proofValue": "ABID/9+Br8GZYx2dh+QUvv1UTklrlqmFTS8c6kUtrrPWXZdAfqqv5qGs/aZDfGLkcs2Q5sCI6OKIdJzq7yDh8anKd4p1NO+L2LTHpV1El4Ng5SGxCbUxvCyAgaJa7Y8fgVlBFxSz+pz64ccisqCcRJEk3bS+4wLZ0evpsDMGZXbE4StMoDdHX4zOlGhoEPup329Hc8YAAAB0g/3iHtBeFCRgiww4JZ8gr3jEPnZTwYN7zSUfblPJGJFtEJ9cPA5RiiavNTuIK2WxAAAAAkqYiv29pCFxd2UQY+hFOs1hN053fIFadTyN5r2/Jb66VItDhtzI+piZ+TCzwiVPbMir935IRyrTDoHsA5MqvlCQTBtJ6tQpu+CXbVeqwK0JLRiFdxUlCh8tYm4MmWPZxxDSWPoSvW8HHg7IWswbwJkAAAADDnpdbKIwCgOxaMsr1cfkOit6Ohacg50iMkCwdxxRmtMYm9S4qWIZSvJxvQNHabukpqF7AHirvveODHRwaxXWc0bZm6PNyAotr6BRh1jDZE5ryNgW79ZuA3MfUT7q5ozf", + "proofValue": "tm69iIYQ5R6uRALgYcDcmMiG6rSwkvYUnAf0aHk90w31YksGOJHkHMGZcRUp3oSaYUHlKfzccE4m7waZyoLEkBLFiK2g54Q2i+CdtYBgDdkUDsoULSBMcH1MwGHwdjfXpldFNFrHFx/IAvLVniyeMQ==", "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67" } } diff --git a/__tests__/stub/signedVP2018.json b/__tests__/stub/signedVP2018.json index bdfb735..b7c4c11 100644 --- a/__tests__/stub/signedVP2018.json +++ b/__tests__/stub/signedVP2018.json @@ -1,48 +1,99 @@ { "@context": ["https://www.w3.org/2018/credentials/v1"], - "id": "http://example.org/presentations/3731", + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#vp-15cfeb06-c893-4a88-b2fd-2c6122db69d7", "type": ["VerifiablePresentation"], - "holder": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi", + "holder": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", "verifiableCredential": [ { "@context": [ "https://w3id.org/security/bbs/v1", "https://www.w3.org/2018/credentials/v1", - "https://stg.issuer.myinfo.gov.sg/myinfo/schema/ageover/v1", + "https://stg.issuer.myinfo.gov.sg/myinfo/schema/age/v1", "https://w3id.org/vc/status-list/2021/v1" ], - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/a8a0545b-768f-40eb-87e8-346476bf6dfd", - "type": ["AgeOverCredential", "VerifiableCredential"], - "description": "Sample of Age Over Credential", - "name": "Age Over Credential", + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/b2086515-619c-427c-b707-84f238764eac", + "type": ["VerifiableCredential", "AgeCredential"], + "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", + "credentialSubject": { + "AtLeast18YearsOld": true, + "AtLeast21YearsOld": true, + "type": ["Age"], + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" + }, + "name": "Age", + "description": "Age Over Indicators", + "expirationDate": "2025-08-21T06:51:34Z", "credentialStatus": { - "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#9579", + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#10267", "type": "StatusList2021Entry", - "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1", - "statusListIndex": "9579" + "statusListIndex": "10267", + "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1" }, + "issuanceDate": "2023-08-21T07:05:15Z", + "proof": { + "created": "2023-08-21T07:05:15Z", + "proofPurpose": "assertionMethod", + "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67", + "type": "BbsBlsSignatureProof2020", + "nonce": "KIr/YTYd9HGtHoHe4Nms3PjhxtjiW+xhVYrTcDgOqoc=", + "proofValue": "ABMH//+jbjXQAjbCiOj5Oh6lxFnP45WC4N675Xe8abpOzdN5h1zhxkFlNbas965ep5fqHIG3JGWmlaAe7jL9RqNHNSi5vPaOcnjIu0zHZA4dT9z98viovnPQG8GRoQWNCQllxS+lzW0ucRHG9ruNApHzOv+ESkoPU4/tBbZtm9HPQ8u00N/edXHC7HtkVSJzXSfFwe4AAAB0s+hWBhiH7v3AMi36Is6MvOHz55ZK5l9c8cjbkBqAXl0qt+mh5IACj7wlAeMgCNc8AAAAAhyzTjmFL9cRSLUkXsBAAGbdpZrQqDC1ehc35uonjj8SQv/JgYhlzO/c3e9JMWMj1GuMESzO/H2Slq22d/jFxwyPgKGEQ4I7S7sDrELuIsj3oINYz2e10uOBfDeSPCeAxGhcyG3Myy1mxRFwH50beHUAAAACPPmYj1uOXKtJAlu+FIt3J6q3ibYJ9+rcFXVPapwI8lQqPF7cpSwAE6A9kZbazXH46NkUV1KKec4Uz2l2wLagAg==" + } + }, + { + "@context": [ + "https://w3id.org/security/bbs/v1", + "https://www.w3.org/2018/credentials/v1", + "https://stg.issuer.myinfo.gov.sg/myinfo/schema/personal/v1", + "https://w3id.org/vc/status-list/2021/v1" + ], + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/credentials/0ba368dd-f58a-4455-846f-365382ade416", + "type": ["VerifiableCredential", "PersonalCredential"], + "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", "credentialSubject": { - "id": "did:key:z6MkndAHigYrXNpape7jgaC7jHiWwxzB3chuKUGXJg2b5RSj", - "type": "AgeOver", - "AtLeast21YearsOld": "Y" + "uinfin": "S8703396A", + "name": "User S8703396A", + "aliasname": "", + "hanyupinyinname": "", + "hanyupinyinaliasname": "", + "marriedname": "", + "sex": "MALE", + "race": "AMERICAN", + "dob": "1990-04-19", + "residentialstatus": "CITIZEN", + "nationality": "GUINEAN", + "birthcountry": "UNITED STATES", + "regadd": { + "country": "SINGAPORE", + "postal": "609774" + }, + "type": ["Personal"], + "id": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx" }, - "issuanceDate": "2023-07-11T07:02:08Z", - "issuer": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01", + "name": "Personal", + "description": "Basic Details of Personal Profile", + "expirationDate": "2025-08-21T06:51:34Z", + "credentialStatus": { + "id": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1#10268", + "type": "StatusList2021Entry", + "statusListIndex": "10268", + "statusListCredential": "https://stg.issuer.myinfo.gov.sg/myinfo202304-01/status/1" + }, + "issuanceDate": "2023-08-21T07:05:20Z", "proof": { - "type": "BbsBlsSignatureProof2020", - "created": "2023-07-11T07:02:08Z", - "nonce": "iD6nH/oIk8gcg9NCe7eRFN6gmqbt0ctZx4RI0TGK4UJkr1RLHnq5Wa1B6mT4vzDFTLs=", + "created": "2023-08-21T07:05:20Z", "proofPurpose": "assertionMethod", - "proofValue": "ABID/9+Br8GZYx2dh+QUvv1UTklrlqmFTS8c6kUtrrPWXZdAfqqv5qGs/aZDfGLkcs2Q5sCI6OKIdJzq7yDh8anKd4p1NO+L2LTHpV1El4Ng5SGxCbUxvCyAgaJa7Y8fgVlBFxSz+pz64ccisqCcRJEk3bS+4wLZ0evpsDMGZXbE4StMoDdHX4zOlGhoEPup329Hc8YAAAB0g/3iHtBeFCRgiww4JZ8gr3jEPnZTwYN7zSUfblPJGJFtEJ9cPA5RiiavNTuIK2WxAAAAAkqYiv29pCFxd2UQY+hFOs1hN053fIFadTyN5r2/Jb66VItDhtzI+piZ+TCzwiVPbMir935IRyrTDoHsA5MqvlCQTBtJ6tQpu+CXbVeqwK0JLRiFdxUlCh8tYm4MmWPZxxDSWPoSvW8HHg7IWswbwJkAAAADDnpdbKIwCgOxaMsr1cfkOit6Ohacg50iMkCwdxxRmtMYm9S4qWIZSvJxvQNHabukpqF7AHirvveODHRwaxXWc0bZm6PNyAotr6BRh1jDZE5ryNgW79ZuA3MfUT7q5ozf", - "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67" + "verificationMethod": "did:web:stg.issuer.myinfo.gov.sg:myinfo202304-01#21402a47-6416-4b95-b180-dff0e1f44d67", + "type": "BbsBlsSignatureProof2020", + "nonce": "MfQWYAz9Ha+3ygEUmhlOkmdnAHyiskxvTI7Fc2fT2ac=", + "proofValue": "ACoAp//8fP+Y9rrEm2me6HlQOHtU7A1g6cR6Bvx31BXV4fbHtYFhhN1fTszqrlGwvERxYUTW8+eMJxa+7lmdfO3qXchUAQDHM/yiw8Tmy6bi4xnr/2WJCgmf/2GXWSEiOHrRRD0xgD2qlej+qs/X9v+VJ1vJxQMYaXUmTel5Zl9IZ8M3/F/oJ9tY+41MBa1gNkF/wKljshwAAAB0qkEdjkws3IUCtxdrNszurU0fzkoL2ataW/reLCMLHjtEqAuFEPO4JHOCPfYdlm0DAAAAAkp9+vIiTC4uvkIEIHHhVf2KZk1jtbo+U0poBHlOwzoNESJH1Q+70PdcEjIEWVfUGEBz0rAQinE6ueI6OQ10AjSRJvL/zjzpfzX7nLvXsK8UfmHkR2HHCaVF6kSRSsdkzNNycBdlenGE1Wy7jTac7NUAAAAMYJ2Y1euh+HilfjQjgl3gMKHAQBUmUg6Dy6TUaBYab8UP1/LGyOwRWveiPZcJJadp5sIeZsfrAZZ2hSVL6DMDoWsLqKn2BkKJpUhSgaMtPcwdE7PhGst/GPWk/kTgJzNfHnI5w3xFUM0mvhM8guSKY+xK9Bs/rTXTItiM/+k8K9ZS3jmsE3JhgKs+xmLQYX29AeVUJGHOLhWE2yqXnCUE/lJ2te5o2FvDh9VPm/4EwpZY4R0SF1esqW0MlCjle657Q6AvK+sGO73ECxxilTP3SCXnLFSMrn/2ov1c6mA9iL5Yo/p8CwP731mTLd+3vUVZTreK87WVmlQuAMQA5Lm3PyPGDEeAIBlbpdVyZs6w8hlOAYzMHXj5wyrNNf5Pbz/lXNxtZhH99jAdGyL+SQU0RiUiz7mV9kTlcLRQxqocQhhwevc1PkF8O2Y8gdLlGXR+NiHEOX39hvY0E2BccpnnmzOnTNUZOGCORU7CsZDz1YdkKCrFpFy7w6blF5D99saq" } } ], "proof": { "type": "Ed25519Signature2018", - "created": "2023-07-12T09:13:45Z", + "created": "2023-08-22T06:47:00Z", "proofPurpose": "assertionMethod", - "verificationMethod": "did:key:z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi#z6MkjKd2Kxfec5tG8zzDyLdQjE5veLboL3uaxJHFp2NdA1gi", - "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..-9UOZ1jVRQBq9xPqY6FjPCR_ORMXCSohGV6-rH2WPnIrSAXlPQmAMoDCyvVGg_DvOm_HnBlRKbxKtzseFyJqAw" + "verificationMethod": "did:key:z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx#z6MkfJVf63AcEoiL9CJJ2r76eZL3dS9QugWk5cDWCYp9raYx", + "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..pTydH1ytitQ_FiblmcgsqZC0vxjNp-GpQNbruCO9d9dPC1xUGYoWjitAv0St8zyJgmJ_aFcvXnGuAANIaZJGCw" } } diff --git a/package-lock.json b/package-lock.json index aa606dc..8a8b033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4542,9 +4542,9 @@ }, "node_modules/request": { "name": "@cypress/request", - "version": "2.88.11", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", - "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.0.tgz", + "integrity": "sha512-GKFCqwZwMYmL3IBoNeR2MM1SnxRIGERsQOTWeQKoYBt2JLqcqiy7JXqO894FLrpjZYqGxW92MNwRH2BN56obdQ==", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -4561,7 +4561,7 @@ "performance-now": "^2.1.0", "qs": "~6.10.3", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", + "tough-cookie": "^4.1.3", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, diff --git a/package.json b/package.json index 6ab2a48..f66922c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "myinfo-vc-verifier", - "version": "0.0.6", + "version": "0.0.7", "description": "This package provides the functionality to verify a verifiable credential using @mattrglobal jsonld-signatures-bbs.", "main": "index.js", "scripts": { @@ -18,7 +18,7 @@ "node-forge": "^1.3.0", "jsonld": "^4.0.0", "ansi-regex": "^3.0.1", - "request": "npm:@cypress/request@^2.88.11", + "request": "npm:@cypress/request@^3.0.0", "semver": "^7.5.2", "tough-cookie": "^4.1.3", "optionator": "^0.9.1" diff --git a/readme.md b/readme.md index 7a3459b..e10d42d 100644 --- a/readme.md +++ b/readme.md @@ -71,4 +71,4 @@ MyInfoVcVerifier.ethereumSign(privateKey, message); ## Reporting Issue -You may contact our [support](mailto:support@myinfo.gov.sg?subject=[MyInfoLib-NodeJs]%20Issue%20) for any other technical issues, and we will respond to you within 5 working days. +You may contact our [support](mailto:support@myinfo.gov.sg?subject=[MyInfoVcVerifier-NodeJs]%20Issue%20) for any other technical issues, and we will respond to you within 5 working days.