diff --git a/package-lock.json b/package-lock.json index 0eeb8b1..45c742a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -148,9 +148,9 @@ } }, "@govtechsg/open-certificate": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@govtechsg/open-certificate/-/open-certificate-2.0.16.tgz", - "integrity": "sha512-P14s0sDfVWER2QmgocEnIOdmwCjk+KZ9rCp1k5FnTyT94yZnD4AgI+Ev1vMk4jnHxe70gfPtqY3E7fGEFv9I+g==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@govtechsg/open-certificate/-/open-certificate-2.0.17.tgz", + "integrity": "sha512-rKcVa/bSZ6GDcZmUrCWpcpI9Cth8kCVnLqvyuXU6MsiKN5Cb4JfjSGCQBuvat5n7Z90X5AgpiT1/fRxXkUGhaw==", "requires": { "@govtechsg/open-attestation": "1.1.42", "lodash": "^4.17.10" @@ -806,9 +806,9 @@ } }, "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/package.json b/package.json index 4e6c1b4..62f94a7 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "sinon": "^7.2.3" }, "dependencies": { - "@govtechsg/open-certificate": "2.0.16", + "@govtechsg/open-certificate": "2.0.17", "ethereumjs-util": "^6.0.0", "json-schema-faker": "^0.5.0-rc9", "lodash": "^4.17.5", diff --git a/test/fixtures/schema/2.0/3.json b/test/fixtures/schema/2.0/3.json new file mode 100644 index 0000000..b970495 --- /dev/null +++ b/test/fixtures/schema/2.0/3.json @@ -0,0 +1,111 @@ +{ + "id": "SERIAL-2018-08-01-112", + "$template": { + "name": "CUSTOM_TEMPLATE", + "type": "EMBEDDED_RENDERER", + "url": "https://demo-renderer.opencerts.io" + }, + "description": "This masters is awarded to developers who can blockchain", + "issuedOn": "2018-08-01T00:00:00+08:00", + "expiresOn": "2118-08-01T00:00:00+08:00", + "name": "Master of Blockchain", + "admissionDate": "2017-07-01T00:00:00+08:00", + "graduationDate": "2018-08-01T00:00:00+08:00", + "attainmentDate": "2018-07-25T00:00:00+08:00", + "issuers": [ + { + "name": "Blockchain Academy", + "did": "DID:SG-UEN:U18274928E", + "url": "https://blockchainacademy.com", + "email": "registrar@blockchainacademy.com", + "certificateStore": "0xd9580260be45c3c0c2fb259a82f219b513054012", + "identityProof": { + "type": "DNS-TXT", + "location": "example.com" + }, + "additionalProp": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + { + "name": "School of Crypto-economics", + "url": "https://ceschool.sg", + "certificateStore": "0xA33ddAEE02369D18A21E29dD2E7A12d65eE671d2" + } + ], + "recipient": { + "name": "Mr Blockchain", + "did": "DID:SG-NRIC:S99999999A", + "email": "mr-blockchain@gmail.com", + "phone": "+65 88888888", + "additionalProp": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nric": "S0000001Z", + "fin": "F0000001Z", + "studentId": "1232" + }, + "qualificationLevel": [ + { + "frameworkName": "singapore/ssec-eqa", + "frameworkVersion": "2015", + "code": "51", + "description": "Polytechnic Diploma" + }, + { + "frameworkName": "international/isced", + "frameworkVersion": "2011", + "code": "55", + "description": "(Short-cycle tertiary education) Vocational" + } + ], + "fieldOfStudy": [ + { + "frameworkName": "singapore/ssec-fos", + "frameworkVersion": "2015", + "code": "0897", + "description": "Biomedical Science" + } + ], + "transcript": [ + { + "name": "Bitcoin", + "grade": "A+", + "courseCredit": 3, + "courseCode": "BTC-01", + "examinationDate": "2018-08-01T00:00:00+08:00", + "url": "https://blockchainacademy.com/subject/BTC-01", + "description": "Everything and more about bitcoin!" + }, + { + "name": "Ethereum", + "grade": "A+", + "courseCredit": "3.5", + "courseCode": "ETH-01", + "examinationDate": "2018-08-01T00:00:00+08:00", + "url": "https://blockchainacademy.com/subject/ETH-01", + "description": "Everything and more about ethereum!" + } + ], + "cumulativeScore": 3.9935, + "additionalData": { + "coCurricularActivities": [ + { + "name": "Crypto-investment Club", + "position": "Club President", + "startDate": "2017-08-01T00:00:00+08:00", + "endDate": "2018-08-01T00:00:00+08:00", + "remarks": "Top trader (2018)" + } + ], + "npfa": "silver", + "images": { + "signature1": { + "name": "Mr Important", + "designation": "President", + "signature": "<-- Base64 Image -->" + }, + "signature2": { + "name": "Mr Not-So-Important", + "designation": "Chairman, Blockchain Faculty", + "signature": "<-- Base64 Image -->" + } + } + } +}