Skip to content

Commit

Permalink
upgrade polkadot api; bump to v2.0.6; re-establish verify credential …
Browse files Browse the repository at this point in the history
…test
  • Loading branch information
celeduc committed Aug 19, 2020
1 parent 177bf25 commit 11d9a72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@lorena-ssi/lorena-sdk",
"version": "2.0.5",
"version": "2.0.6",
"description": "Lorena SDK",
"author": "Alex Puig <alex@caelumlabs.com>",
"license": "MIT",
Expand All @@ -24,34 +24,34 @@
"homepage": "https://github.com/lorena-ssi/lorena-sdk#readme",
"dependencies": {
"@lorena-ssi/credential-lib": "^1.2.0",
"@lorena-ssi/did-resolver": "^0.4.4",
"@lorena-ssi/did-resolver": "^0.4.5",
"@lorena-ssi/matrix-lib": "^1.0.13",
"@lorena-ssi/wallet-lib": "1.1.6",
"@lorena-ssi/zenroom-lib": "1.5.4",
"debug": "^4.1.1",
"did-resolver": "^1.1.0",
"esm": "^3.2.25",
"ipfs-http-client": "^44.1.0"
"ipfs-http-client": "^46.0.0"
},
"devDependencies": {
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-spies": "^1.0.0",
"chai-uuid": "^1.0.6",
"coveralls": "^3.1.0",
"eslint": "^7.1.0",
"eslint": "^7.7.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsdoc": "^25.4.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsdoc": "^30.2.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"husky": "^4.2.5",
"mocha": "^7.2.0",
"mocha": "^8.1.1",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^15.0.1",
"serve": "^11.3.1"
"nyc": "^15.1.0",
"serve": "^11.3.2"
},
"scripts": {
"coverage": "nyc npm run mocha && nyc report --reporter=html",
Expand Down
4 changes: 2 additions & 2 deletions test/lorena-test.js
Expand Up @@ -131,9 +131,9 @@ describe('Lorena SDK', function () {
lorena.disconnect()
})

xit('should verify a Credential', (done) => {
it('should verify a Credential', (done) => {
const lorenaSessionless = new Lorena()
const json = '{"@context":["https://www.w3.org/2018/credentials/v1"],"type":["VerifiableCredential","Achievement"],"issuer":"did:lor:labtest:TjFkVWNrbFFjMmRDUVhsYU9YWlZVbTA1","issuanceDate":"2020-05-21T14:59:00.690Z","credentialSubject":{"@type":"Achievement","id":"did:lor:labtest:bafyreicnpref2qytclwsopuxc2huuf4q2vxjryj2oavnckvv3orpqkuvvq;id:1","course":{"id":"did:lor:labtest:bafyreicnpref2qytclwsopuxc2huuf4q2vxjryj2oavnckvv3orpqkuvvq"},"agent":{"@type":"Person","id":"","name":"diego torres","email":"diego@caelumlabs.com"},"expirationDate":""},"proof":{"type":"Curve448-Goldilocks","proofPurpose":"assertionMethod","verificationMethod":"","signature":{"did:lor:labtest:TjFkVWNrbFFjMmRDUVhsYU9YWlZVbTA1":{"draft":"dW5kZWZpbmVk","signature":{"r":"ExOo2egwpPWgoqwgexjaRDnlgqoZS3Doy_HPZsBTuBd_hQOvjrNVZuUBdSz14KU8YxAp8Upx5fY","s":"BOJSSU25bO8MK4pOT-Lfh_CYQ0F72VF24mLWrqnn0ci_YXPm3_fyp9H8e2dAl4Eee04PK4mQ5Jg"}}}}}'
const json = '{"@context":["https://www.w3.org/2018/credentials/v1"],"type":["VerifiableCredential","Achievement"],"issuer":"did:lor:labtest:WTNaQ2QwMUljVzlmTmxVMWFGWnVZMWx2","issuanceDate":"2020-08-18T13:35:09.318Z","credentialSubject":{"@type":"Achievement","id":"did:lor:labtest:bafyreidutljjooc3fpxa3bj4eg7fb7czcbh2vrbwyt7kyqb2mtx55v43v4;id:31","issuer":"did:lor:labtest:WTNaQ2QwMUljVzlmTmxVMWFGWnVZMWx2","course":{"id":"did:lor:labtest:bafyreidutljjooc3fpxa3bj4eg7fb7czcbh2vrbwyt7kyqb2mtx55v43v4"},"description":"messi messi","expirationDate":null,"issuanceDate":null,"learningAchievement":{"title":"macu macu"},"title":"FCB Presi","url":"fcbarcelona.com","agent":{"@type":"Person","id":"","name":"Diego Torres López","email":"diego@caelumlabs.com"}},"proof":{"type":"Curve448-Goldilocks","proofPurpose":"assertionMethod","verificationMethod":"","signature":{"did:lor:labtest:WTNaQ2QwMUljVzlmTmxVMWFGWnVZMWx2":{"draft":"dW5kZWZpbmVk","signature":{"r":"G4QGZHXZ1Yc_oYX7DaScHduQmzbr70f4Ulqmscehsl2vMSu-B6AibwpN0Qfw0kL9WllnNTHlcmY","s":"LN93aeTW7fS1-lsKH8CHwSg0E9MVRYcvULbVQc8WuCqo19yE6HKGbTkAZ7nzrwy-h5cpIj-iVFw"}}}}}'
lorenaSessionless.verifyCredential(json)
.then((res) => {
expect(typeof res).to.equal('object')
Expand Down

0 comments on commit 11d9a72

Please sign in to comment.