From 9b4d2c8ee76d47940fa0cbb70985521d54287002 Mon Sep 17 00:00:00 2001 From: Kyle Huang Junyuan Date: Thu, 1 Aug 2024 11:41:42 +0800 Subject: [PATCH] fix: fetch v4 fixtures from open-attestation (#297) --- package-lock.json | 150 ++++++++++++++++++ package.json | 4 +- scripts/fetchFixtures.v4.ts | 23 +++ .../batched-raw-documents-did.json | 91 +++++++++++ .../batched-signed-wrapped-documents-did.json | 121 ++++++++++++++ .../batched-wrapped-documents-did.json | 117 ++++++++++++++ .../__generated__/raw-document-did-oscp.json | 51 ++++++ .../raw-document-did.json} | 18 ++- .../v4/__generated__/sample-signing-keys.json | 4 + ...igned-wrapped-document-did-obfuscated.json | 61 +++++++ .../signed-wrapped-document-did-oscp.json | 64 ++++++++ .../signed-wrapped-document-did.json | 60 +++++++ .../wrapped-document-did-oscp.json | 62 ++++++++ .../__generated__/wrapped-document-did.json | 58 +++++++ test/fixtures/v4/did-signed-wrapped.json | 50 ------ test/fixtures/v4/did-wrapped.json | 48 ------ 16 files changed, 878 insertions(+), 104 deletions(-) create mode 100644 scripts/fetchFixtures.v4.ts create mode 100644 test/fixtures/v4/__generated__/batched-raw-documents-did.json create mode 100644 test/fixtures/v4/__generated__/batched-signed-wrapped-documents-did.json create mode 100644 test/fixtures/v4/__generated__/batched-wrapped-documents-did.json create mode 100644 test/fixtures/v4/__generated__/raw-document-did-oscp.json rename test/fixtures/v4/{did-raw.json => __generated__/raw-document-did.json} (80%) create mode 100644 test/fixtures/v4/__generated__/sample-signing-keys.json create mode 100644 test/fixtures/v4/__generated__/signed-wrapped-document-did-obfuscated.json create mode 100644 test/fixtures/v4/__generated__/signed-wrapped-document-did-oscp.json create mode 100644 test/fixtures/v4/__generated__/signed-wrapped-document-did.json create mode 100644 test/fixtures/v4/__generated__/wrapped-document-did-oscp.json create mode 100644 test/fixtures/v4/__generated__/wrapped-document-did.json delete mode 100644 test/fixtures/v4/did-signed-wrapped.json delete mode 100644 test/fixtures/v4/did-wrapped.json diff --git a/package-lock.json b/package-lock.json index be2165c6..57ca71f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,6 +46,7 @@ "prettier": "^2.2.1", "semantic-release": "^22.0.8", "ts-jest": "^27.1.5", + "ts-node": "^10.9.2", "typescript": "^4.9.5" } }, @@ -2745,6 +2746,28 @@ "node": ">=v18" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@digitalbazaar/http-client": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@digitalbazaar/http-client/-/http-client-3.4.1.tgz", @@ -5337,6 +5360,30 @@ "node": ">=10.13.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -5897,6 +5944,12 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -7354,6 +7407,12 @@ "typescript": ">=4" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-fetch": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", @@ -7949,6 +8008,15 @@ "resolved": "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz", "integrity": "sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==" }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", @@ -20126,6 +20194,73 @@ } } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ts-node/node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -20521,6 +20656,12 @@ "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", "dev": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", @@ -20911,6 +21052,15 @@ "node": ">=12" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 55e84915..72951556 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "lint:fix": "npm run lint -- --fix", "snyk-protect": "snyk-protect", "prepare": "npm run snyk-protect", - "generate:v3": "DEBUG=oa-verify* ts-node scripts/generate.v3.ts" + "generate:v3": "DEBUG=oa-verify* ts-node scripts/generate.v3.ts", + "fixtures:v4": "ts-node scripts/fetchFixtures.v4.ts" }, "author": "", "license": "Apache-2.0", @@ -66,6 +67,7 @@ "prettier": "^2.2.1", "semantic-release": "^22.0.8", "ts-jest": "^27.1.5", + "ts-node": "^10.9.2", "typescript": "^4.9.5" }, "publishConfig": { diff --git a/scripts/fetchFixtures.v4.ts b/scripts/fetchFixtures.v4.ts new file mode 100644 index 00000000..1cf037ee --- /dev/null +++ b/scripts/fetchFixtures.v4.ts @@ -0,0 +1,23 @@ +import fs from "fs"; +import path from "path"; + +const GITHUB_CONTENTS_PATH = (ref = "beta") => + `https://api.github.com/repos/Open-Attestation/open-attestation/contents/test/fixtures/v4/__generated__?ref=${ref}`; + +const OUTPUT_DIR = path.resolve("./test/fixtures/v4/__generated__"); + +// make sure the output directory exists +if (fs.existsSync(OUTPUT_DIR)) { + fs.rmSync(OUTPUT_DIR, { recursive: true }); +} +fs.mkdirSync(OUTPUT_DIR, { recursive: true }); + +(async () => { + // GitHub Repository Contents API: https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content + const fixtures = (await (await fetch(GITHUB_CONTENTS_PATH())).json()) as { name: string; download_url: string }[]; + + for (const f of fixtures) { + const content = await (await fetch(f.download_url)).json(); + fs.writeFileSync(path.join(OUTPUT_DIR, f.name), JSON.stringify(content, null, 2)); + } +})(); diff --git a/test/fixtures/v4/__generated__/batched-raw-documents-did.json b/test/fixtures/v4/__generated__/batched-raw-documents-did.json new file mode 100644 index 00000000..28c73f80 --- /dev/null +++ b/test/fixtures/v4/__generated__/batched-raw-documents-did.json @@ -0,0 +1,91 @@ +[ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ] + }, + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "Jane Doe", + "licenses": [ + { + "class": "3000A", + "description": "Motor spaceships with unladen weight <= 3000tonnes", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ] + } +] \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/batched-signed-wrapped-documents-did.json b/test/fixtures/v4/__generated__/batched-signed-wrapped-documents-did.json new file mode 100644 index 00000000..ee228825 --- /dev/null +++ b/test/fixtures/v4/__generated__/batched-signed-wrapped-documents-did.json @@ -0,0 +1,121 @@ +[ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "d744b98a001ed34fa133762206e312b5105478f0cc25bf86c3a2a35866597264", + "proofs": [ + "63edb5b6919143505c522fc96d31bac58ce7b4aa57d366d2df2026c5bb425a64" + ], + "merkleRoot": "aad2420d57f9250aaa4933bc1dfe540575f3b233475c51f173c9299b4a97853b", + "salts": "W3sidmFsdWUiOiI5YjBhYWZjZDY0YjZmOTMzZDc3ZDUwY2ExZWMzZTYwYzlkYTYzMjk0Y2NlZWRiYTU3ZDMzZjlkYzQ5MjMyMjA2IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6Ijg0Nzg2MDg5MDNmYjQ0ODQ3NTFhYWM3MGMxZmZjN2E0YTI0OTAyODA5ZTQ3MTI1Y2Q5YWE5ZDMwMTllMjI2MmUiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiZTQ1YjRjYWU1NmI5ZDI5M2M5NDZkM2RhY2U1ZjE0YWNiZmYwYWZkN2QzOWM1MmIxZWY5MTc2MzFlMGFmYzRmNCIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImJkZDczNmU0MDU2YzUyYTYxMTIzMzZiYjNiZGQ3ZTNjMjQ1MTEwZjk3ZTg4Y2NlYjZlMmNlN2M4NTM2MDIzMDYiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiJkOGQyYjcwMTExYTYwNzQyYjVjZTkzMGFiYWNhYTk0NDQ2MzJiMjk5ZjNkNzYyZjI5N2Q0ZmY1MjViMTYzMTVlIiwicGF0aCI6InR5cGVbMV0ifSx7InZhbHVlIjoiMTMxOTUwZDhhNGQ1ZGM1Y2ZkYjdkODAwZWQzNTBiNmRkZTYwZWI2ZDFkNjBiODM0YmE4YmFmNDc1ODk5ZWMxZCIsInBhdGgiOiJpc3N1ZXIuaWQifSx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OTY2MGY3NTg4ZWFlNzVkOTI5ODJiYmY2IiwicGF0aCI6ImNyZWRlbnRpYWxTdWJqZWN0LmxpY2Vuc2VzWzFdLmVmZmVjdGl2ZURhdGUifSx7InZhbHVlIjoiMzMzMGY1Yzc3MDE0NzE1NGI3NGE4ZWY5ZjAxZDE0YjEwZGU0NGMzY2FlZWY2M2Q2YjkyMDdlYjJiZjEyMGI2MiIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0uaWQifSx7InZhbHVlIjoiYzgwZDM4MTY4ZDcyMDkxNWM4YzJmZGFmNmYxMDE0MmRlZWJjOTM0MDUyZjNiNTgyMmE2YjM3ZWNlYTBmY2JmYSIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udHlwZSJ9LHsidmFsdWUiOiIyYjllOGFlZGJlNTkwMTRmMTQ4M2RjYjg2NDgwZDljM2M0ZmFlNDY1ODQyZmZlY2I5YjhiNjAwMTc5ZjE3MDQ0IiwicGF0aCI6InJlbmRlck1ldGhvZFswXS50ZW1wbGF0ZU5hbWUifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0xc65309e0adf50ba6b91607c6913e15cd629412cf8180255e52c160cdf59bcfa0609f6eed71c379e3062b9fea39a5590dfc54323a352933c6ef9b694b63e2d74f1c" + } + }, + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "Jane Doe", + "licenses": [ + { + "class": "3000A", + "description": "Motor spaceships with unladen weight <= 3000tonnes", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "63edb5b6919143505c522fc96d31bac58ce7b4aa57d366d2df2026c5bb425a64", + "proofs": [ + "d744b98a001ed34fa133762206e312b5105478f0cc25bf86c3a2a35866597264" + ], + "merkleRoot": "aad2420d57f9250aaa4933bc1dfe540575f3b233475c51f173c9299b4a97853b", + "salts": "W3sidmFsdWUiOiJhN2EyZjYyMmMxMjdiMTZlMzIwYjA2MTA1YzZkN2FmMmVlNjZjYjBlNDQ1ZTdhNzA0NzExMzQ0OTZjZDM5YmVlIiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6Ijg4NmI1OGExZTI2Yzg5NjYxMjI4MDBiZGY2NTMxNDQwMmZiNmJkYjkxNGNlMDQzOWJiNWQ3ODM4OWI5N2NlNjciLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiOTk0MjRlMmY1YWE0NjVlNTM3YWE4NDY2ODM2OGQ3YTJjYTFmODg5YTlmOWFlNDk1YzA1ZDM5ZTMzNzY0ZmI3YyIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImY1N2ViM2M2ODQ5NjRiMWQ2ZDZjNWQ1MTY1NjI1MjY4MTUwZjg3OTM3YWQ0NjYzZGQyYjhlZWUyNWFjYTBmMmYiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiIyZGQ4Yzk5N2EwYTliODFlNDgyM2IxMDc4MWEwODk0MTRiMTFmODk4MjNjMTdkNWUzYmM1OGIzZTYyNGY5MTBjIiwicGF0aCI6InR5cG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mVuZGVyTWV0aG9kWzBdLnR5cGUifSx7InZhbHVlIjoiY2U5OGFhMDI3NDg1N2RlNWY0YTRhYjI4ZmVjMDBmZjlmMTY2YzJiYWNjODMyYzkwNDlmNTliZTc3YTUwNmQ1YiIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udGVtcGxhdGVOYW1lIn1d", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0xc65309e0adf50ba6b91607c6913e15cd629412cf8180255e52c160cdf59bcfa0609f6eed71c379e3062b9fea39a5590dfc54323a352933c6ef9b694b63e2d74f1c" + } + } +] \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/batched-wrapped-documents-did.json b/test/fixtures/v4/__generated__/batched-wrapped-documents-did.json new file mode 100644 index 00000000..79c00a2a --- /dev/null +++ b/test/fixtures/v4/__generated__/batched-wrapped-documents-did.json @@ -0,0 +1,117 @@ +[ + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "d744b98a001ed34fa133762206e312b5105478f0cc25bf86c3a2a35866597264", + "proofs": [ + "63edb5b6919143505c522fc96d31bac58ce7b4aa57d366d2df2026c5bb425a64" + ], + "merkleRoot": "aad2420d57f9250aaa4933bc1dfe540575f3b233475c51f173c9299b4a97853b", + "salts": "W3sidmFsdWUiOiI5YjBhYWZjZDY0YjZmOTMzZDc3ZDUwY2ExZWMzZTYwYzlkYTYzMjk0Y2NlZWRiYTU3ZDMzZjlkYzQ5MjMyMjA2IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6Ijg0Nzg2MDg5MDNmYjQ0ODQ3NTFhYWM3MGMxZmZjN2E0YTI0OTAyODA5ZTQ3MTI1Y2Q5YWE5ZDMwMTllMjI2MmUiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiZTQ1YjRjYWU1NmI5ZDI5M2M5NDZkM2RhY2U1ZjE0YWNiZmYwYWZkN2QzOWM1MmIxZWY5MTc2MzFlMGFmYzRmNCIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImJkZDczNmU0MDU2YzUyYTYxMTIzMzZiYjNiZGQ3ZTNjMjQ1MTEwZjk3ZTg4Y2NlYjZlMmNlN2M4NTM2MDIzMDYiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiJkOGQyYjcwMTExYTYwNzQyYjVjZTkzMGFiYWNhYTk0NDQ2MzJiMjk5ZjNkNzYyZjI5N2Q0ZmY1MjViMTYzMTVlIiwicGF0aCI6InR5cGVbMV0ifSx7InZhbHVlIjoiMTMxOTUwZDhhNGQ1ZGM1Y2ZkYjdkODAwZWQzNTBiNmRkZTYwZWI2ZDFkNjBiODM0YmE4YmFmNDc1ODk5ZWMxZCIsInBhdGgiOiJpc3N1ZXIuaWQifSx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OTY2MGY3NTg4ZWFlNzVkOTI5ODJiYmY2IiwicGF0aCI6ImNyZWRlbnRpYWxTdWJqZWN0LmxpY2Vuc2VzWzFdLmVmZmVjdGl2ZURhdGUifSx7InZhbHVlIjoiMzMzMGY1Yzc3MDE0NzE1NGI3NGE4ZWY5ZjAxZDE0YjEwZGU0NGMzY2FlZWY2M2Q2YjkyMDdlYjJiZjEyMGI2MiIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0uaWQifSx7InZhbHVlIjoiYzgwZDM4MTY4ZDcyMDkxNWM4YzJmZGFmNmYxMDE0MmRlZWJjOTM0MDUyZjNiNTgyMmE2YjM3ZWNlYTBmY2JmYSIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udHlwZSJ9LHsidmFsdWUiOiIyYjllOGFlZGJlNTkwMTRmMTQ4M2RjYjg2NDgwZDljM2M0ZmFlNDY1ODQyZmZlY2I5YjhiNjAwMTc5ZjE3MDQ0IiwicGF0aCI6InJlbmRlck1ldGhvZFswXS50ZW1wbGF0ZU5hbWUifV0=", + "privacy": { + "obfuscated": [] + } + } + }, + { + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "Jane Doe", + "licenses": [ + { + "class": "3000A", + "description": "Motor spaceships with unladen weight <= 3000tonnes", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "63edb5b6919143505c522fc96d31bac58ce7b4aa57d366d2df2026c5bb425a64", + "proofs": [ + "d744b98a001ed34fa133762206e312b5105478f0cc25bf86c3a2a35866597264" + ], + "merkleRoot": "aad2420d57f9250aaa4933bc1dfe540575f3b233475c51f173c9299b4a97853b", + "salts": "W3sidmFsdWUiOiJhN2EyZjYyMmMxMjdiMTZlMzIwYjA2MTA1YzZkN2FmMmVlNjZjYjBlNDQ1ZTdhNzA0NzExMzQ0OTZjZDM5YmVlIiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6Ijg4NmI1OGExZTI2Yzg5NjYxMjI4MDBiZGY2NTMxNDQwMmZiNmJkYjkxNGNlMDQzOWJiNWQ3ODM4OWI5N2NlNjciLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiOTk0MjRlMmY1YWE0NjVlNTM3YWE4NDY2ODM2OGQ3YTJjYTFmODg5YTlmOWFlNDk1YzA1ZDM5ZTMzNzY0ZmI3YyIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImY1N2ViM2M2ODQ5NjRiMWQ2ZDZjNWQ1MTY1NjI1MjY4MTUwZjg3OTM3YWQ0NjYzZGQyYjhlZWUyNWFjYTBmMmYiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiIyZGQ4Yzk5N2EwYTliODFlNDgyM2IxMDc4MWEwODk0MTRiMTFmODk4MjNjMTdkNWUzYmM1OGIzZTYyNGY5MTBjIiwicGF0aCI6InR5cGVbMV0ifSx7InZhbHVlIjoiY2ExYmVlODNkMjQwNGVjMGQ5NjQwM2Y5ZDQ0N2RiMWY3NGRlMmJlMTZhYzdiNGUwYWZmNzdhYjU4ZDFmZmE2MyIsInBhdGgiOiJpc3N1ZXIuaWQif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iJyZW5kZXJNZXRob2RbMF0udGVtcGxhdGVOYW1lIn1d", + "privacy": { + "obfuscated": [] + } + } + } +] \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/raw-document-did-oscp.json b/test/fixtures/v4/__generated__/raw-document-did-oscp.json new file mode 100644 index 00000000..975eff1c --- /dev/null +++ b/test/fixtures/v4/__generated__/raw-document-did-oscp.json @@ -0,0 +1,51 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "validFrom": "2021-03-08T12:00:00+08:00", + "name": "Republic of Singapore Driving Licence", + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "credentialStatus": { + "id": "https://ocsp-sandbox.openattestation.com", + "type": "OpenAttestationOcspResponder" + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + } +} \ No newline at end of file diff --git a/test/fixtures/v4/did-raw.json b/test/fixtures/v4/__generated__/raw-document-did.json similarity index 80% rename from test/fixtures/v4/did-raw.json rename to test/fixtures/v4/__generated__/raw-document-did.json index 5f3a9860..219bec42 100644 --- a/test/fixtures/v4/did-raw.json +++ b/test/fixtures/v4/__generated__/raw-document-did.json @@ -1,16 +1,22 @@ { "@context": [ "https://www.w3.org/ns/credentials/v2", - "https://schemata.openattestation.com/com/openattestation/4.0/alpha-context.json" + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" ], - "type": ["VerifiableCredential", "OpenAttestationCredential"], "validFrom": "2021-03-08T12:00:00+08:00", "name": "Republic of Singapore Driving Licence", "issuer": { "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", "type": "OpenAttestationIssuer", "name": "Government Technology Agency of Singapore (GovTech)", - "identityProof": { "identityProofType": "DNS-DID", "identifier": "example.openattestation.com" } + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } }, "renderMethod": [ { @@ -21,7 +27,9 @@ ], "credentialSubject": { "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", - "type": ["DriversLicense"], + "type": [ + "DriversLicense" + ], "name": "John Doe", "licenses": [ { @@ -36,4 +44,4 @@ } ] } -} +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/sample-signing-keys.json b/test/fixtures/v4/__generated__/sample-signing-keys.json new file mode 100644 index 00000000..829abeca --- /dev/null +++ b/test/fixtures/v4/__generated__/sample-signing-keys.json @@ -0,0 +1,4 @@ +{ + "public": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "private": "0xcd27dc84c82c5814e7edac518edd5f263e7db7f25adb7a1afe13996a95583cf2" +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/signed-wrapped-document-did-obfuscated.json b/test/fixtures/v4/__generated__/signed-wrapped-document-did-obfuscated.json new file mode 100644 index 00000000..ab72dc14 --- /dev/null +++ b/test/fixtures/v4/__generated__/signed-wrapped-document-did-obfuscated.json @@ -0,0 +1,61 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "proofs": [], + "merkleRoot": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "salts": "W3sidmFsdWUiOiJhOGEzMGE4ZTFjNWQ4ODk2NWI3NDZkZjBhYWYyMTMyN2Q4MDNkMzQ4ZThlOGRhMTlmNTNhMWU5ODFkOTFhMDQ0IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6IjFmMzIwMzg4MjU3NTRkZTc1OGYwYmU2NjdiNjQ0ZjNjZGVkM2FlM2UwOGI0MTdhMmViZTljYmU1NmYyNGM0NTAiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiODQ0OTkwM2FhNDMxZDEzZTEzNTBiYjVhZTczMTM3OTRlMGQyMTMwNmM3NDA0YzI4NzJhY2Y3ZDY2NGIyMjNhZiIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImFkN2Y1Mjg0OTc1MGViNjZhNjJlZmFmYWUwYjQxNGEwZGQ5OGUwNGJkMmI5YzU2NjliYWM1YzRiNDNjMDk3MTMiLCJwYXR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3QubGljZW5zZXNbMV0uZGVzY3JpcHRpb24ifSx7InZhbHVlIjoiZDczMTAwNzZjNTc2Zjc1NDM3MDY0OTE2MTkxMjVmNGJkOTQzZTAxMDVjN2QzNWY2YzU4Y2UyN2Y3MDMzYjY5YiIsInBhdGgiOiJjcmVkZW50aWFsU3ViamVjdC5saWNlbnNlc1sxXS5lZmZlY3RpdmVEYXRlIn0seyJ2YWx1ZSI6ImE5NzMxYTMxZDM5MzZiZjYwMjczMTUwMGIyMzI2N2UwNjM3MThhM2YyZDBhYmUyODA4ZThiYjM0MTg0MWFmZWQiLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLmlkIn0seyJ2YWx1ZSI6IjQ4ODI0ZGI3Y2NlN2U2OTBkNzY4MjBjNTdjNTljZWRiOWQ2YjRlYzA5YTA2NGQxZmEyYTJiNDhmYWMyZTdhYWQiLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLnR5cGUifSx7InZhbHVlIjoiYzM2NTNhZDc4ODM4ZDQ4ZjNkNWRjZDZhNjhkZjRlNDJjMTEzNWZmODM4YmMyOTE2ODQ0MzA3Y2Q5Y2ZjOGVmOCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udGVtcGxhdGVOYW1lIn1d", + "privacy": { + "obfuscated": [ + "7f2ecdae29b49b3a971d5acdfbbf9225a193e735ce41b89b0d84cca801794fc9" + ] + }, + "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0x949b76d8df493a56c1cf21303a74d6a54904461c1c10f4619b43ad7d339c64467c61eb4c0873f279cd21d5bdd044d3af5318f14d63f57acbd4cde30f271f3eb71c" + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ] +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/signed-wrapped-document-did-oscp.json b/test/fixtures/v4/__generated__/signed-wrapped-document-did-oscp.json new file mode 100644 index 00000000..359bfe77 --- /dev/null +++ b/test/fixtures/v4/__generated__/signed-wrapped-document-did-oscp.json @@ -0,0 +1,64 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "credentialStatus": { + "id": "https://ocsp-sandbox.openattestation.com", + "type": "OpenAttestationOcspResponder" + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "0f60b3ef4b9b826de4753c4e68bb5ac9fdd2496549f901331a9d07464469366c", + "proofs": [], + "merkleRoot": "0f60b3ef4b9b826de4753c4e68bb5ac9fdd2496549f901331a9d07464469366c", + "salts": "W3sidmFsdWUiOiI3N2RhNDUzOWYwY2M3ZmVmODg0ZmU0MTVkNzE2ZTRjODc5N2NiMDMyZGJlZDQzOWM2ZWViOTU2NmJlZDk1MmI0IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6ImY2NWZhZWI4MzVm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GNiMTY1YjM1MTFhNjA4MjBkMzNiY2ZmYTViNmE3OWFiNWI5ZDNlMTA0NGZiNTk0NjNhNzM3MDUiLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLmlkIn0seyJ2YWx1ZSI6ImJmOGJlY2M2Yjg1MDJkODBiNTg4ZmRmZmJhY2JmMmU1NTIzNjE1MzBjYmUxMGI4NzM5OTQ0NWYwZmZkYTkwOTAiLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLnR5cGUifSx7InZhbHVlIjoiOTRmYmI5NWE1ZmNhZjU0YTcwYTAxODZiNjg1OWM5YmY5MzYzNWU0OTQ0N2U3ZmMxYWIyY2RmNTM5ZDllZjNiNyIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udGVtcGxhdGVOYW1lIn1d", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0xa9f89c00bac009044f02ca0e0c605389a927e4b011fa7c0f9a3bfd987598d8a442cd51218a31e387737ad42adeb9b9405c545a4d70ad75d06f7a7701e87440631c" + } +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/signed-wrapped-document-did.json b/test/fixtures/v4/__generated__/signed-wrapped-document-did.json new file mode 100644 index 00000000..35e02df7 --- /dev/null +++ b/test/fixtures/v4/__generated__/signed-wrapped-document-did.json @@ -0,0 +1,60 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "proofs": [], + "merkleRoot": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "salts": "W3sidmFsdWUiOiJhOGEzMGE4ZTFjNWQ4ODk2NWI3NDZkZjBhYWYyMTMyN2Q4MDNkMzQ4ZThlOGRhMTlmNTNhMWU5ODFkOTFhMDQ0IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6IjFmMzIwMzg4MjU3NTRkZTc1OGYwYmU2NjdiNjQ0ZjNjZGVkM2FlM2UwOGI0MTdhMmViZTljYmU1NmYyNGM0NTAiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiODQ0OTkwM2FhNDMxZDEzZTEzNTBiYjVhZTczMTM3OTRlMGQyMTMwNmM3NDA0YzI4NzJhY2Y3ZDY2NGIyMjNhZiIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImFkN2Y1Mjg0OTc1MGViNjZhNjJlZmFmYWUwYjQxNGEwZGQ5OGUwNGJkMmI5YzU2NjliYWM1YzRiNDNjMDk3MTMiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiJjY2I4ZDFkZDgyMDc2Y2EyOTQ5MWUxZTBjODAxOGM5MWY0Zjc5NGRiM2RkMDA1Ym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jdiNTkxZjk5MjQ3NmYzNDBjMWViZjUzYyIsInBhdGgiOiJjcmVkZW50aWFsU3ViamVjdC5saWNlbnNlc1sxXS5kZXNjcmlwdGlvbiJ9LHsidmFsdWUiOiJkNzMxMDA3NmM1NzZmNzU0MzcwNjQ5MTYxOTEyNWY0YmQ5NDNlMDEwNWM3ZDM1ZjZjNThjZTI3ZjcwMzNiNjliIiwicGF0aCI6ImNyZWRlbnRpYWxTdWJqZWN0LmxpY2Vuc2VzWzFdLmVmZmVjdGl2ZURhdGUifSx7InZhbHVlIjoiYTk3MzFhMzFkMzkzNmJmNjAyNzMxNTAwYjIzMjY3ZTA2MzcxOGEzZjJkMGFiZTI4MDhlOGJiMzQxODQxYWZlZCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0uaWQifSx7InZhbHVlIjoiNDg4MjRkYjdjY2U3ZTY5MGQ3NjgyMGM1N2M1OWNlZGI5ZDZiNGVjMDlhMDY0ZDFmYTJhMmI0OGZhYzJlN2FhZCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udHlwZSJ9LHsidmFsdWUiOiJjMzY1M2FkNzg4MzhkNDhmM2Q1ZGNkNmE2OGRmNGU0MmMxMTM1ZmY4MzhiYzI5MTY4NDQzMDdjZDljZmM4ZWY4IiwicGF0aCI6InJlbmRlck1ldGhvZFswXS50ZW1wbGF0ZU5hbWUifV0=", + "privacy": { + "obfuscated": [] + }, + "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", + "signature": "0x949b76d8df493a56c1cf21303a74d6a54904461c1c10f4619b43ad7d339c64467c61eb4c0873f279cd21d5bdd044d3af5318f14d63f57acbd4cde30f271f3eb71c" + } +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/wrapped-document-did-oscp.json b/test/fixtures/v4/__generated__/wrapped-document-did-oscp.json new file mode 100644 index 00000000..d6ab276e --- /dev/null +++ b/test/fixtures/v4/__generated__/wrapped-document-did-oscp.json @@ -0,0 +1,62 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "credentialStatus": { + "id": "https://ocsp-sandbox.openattestation.com", + "type": "OpenAttestationOcspResponder" + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "0f60b3ef4b9b826de4753c4e68bb5ac9fdd2496549f901331a9d07464469366c", + "proofs": [], + "merkleRoot": "0f60b3ef4b9b826de4753c4e68bb5ac9fdd2496549f901331a9d07464469366c", + "salts": "W3sidmFsdWUiOiI3N2RhNDUzOWYwY2M3ZmVmODg0ZmU0MTVkNzE2ZTRjODc5N2NiMDMyZGJlZDQzOWM2ZWViOTU2NmJlZDk1MmI0IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6ImY2NWZhZWI4MzVmZTI4MzYyMDBhZGUyYTUzZjM4MzJkMGE2YTVjZjZiZjc2OGRlNmMxYjE3OTQ1OGIwMGI2MDIiLC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iLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLmlkIn0seyJ2YWx1ZSI6ImJmOGJlY2M2Yjg1MDJkODBiNTg4ZmRmZmJhY2JmMmU1NTIzNjE1MzBjYmUxMGI4NzM5OTQ0NWYwZmZkYTkwOTAiLCJwYXRoIjoicmVuZGVyTWV0aG9kWzBdLnR5cGUifSx7InZhbHVlIjoiOTRmYmI5NWE1ZmNhZjU0YTcwYTAxODZiNjg1OWM5YmY5MzYzNWU0OTQ0N2U3ZmMxYWIyY2RmNTM5ZDllZjNiNyIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udGVtcGxhdGVOYW1lIn1d", + "privacy": { + "obfuscated": [] + } + } +} \ No newline at end of file diff --git a/test/fixtures/v4/__generated__/wrapped-document-did.json b/test/fixtures/v4/__generated__/wrapped-document-did.json new file mode 100644 index 00000000..d0a516ac --- /dev/null +++ b/test/fixtures/v4/__generated__/wrapped-document-did.json @@ -0,0 +1,58 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2", + "https://schemata.openattestation.com/com/openattestation/4.0/context.json" + ], + "name": "Republic of Singapore Driving Licence", + "type": [ + "VerifiableCredential", + "OpenAttestationCredential" + ], + "issuer": { + "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", + "type": "OpenAttestationIssuer", + "name": "Government Technology Agency of Singapore (GovTech)", + "identityProof": { + "identityProofType": "DNS-DID", + "identifier": "example.openattestation.com" + } + }, + "validFrom": "2021-03-08T12:00:00+08:00", + "credentialSubject": { + "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", + "type": [ + "DriversLicense" + ], + "name": "John Doe", + "licenses": [ + { + "class": "3", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + }, + { + "class": "3A", + "description": "Motor cars with unladen weight <= 3000kg", + "effectiveDate": "2013-05-16T00:00:00+08:00" + } + ] + }, + "renderMethod": [ + { + "id": "https://demo-renderer.opencerts.io", + "type": "OpenAttestationEmbeddedRenderer", + "templateName": "GOVTECH_DEMO" + } + ], + "proof": { + "type": "OpenAttestationMerkleProofSignature2018", + "proofPurpose": "assertionMethod", + "targetHash": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "proofs": [], + "merkleRoot": "0b1f90bc8e87cfce8ec49cea60d406291ad130ddedc26e866a8c4f2152747abc", + "salts": "W3sidmFsdWUiOiJhOGEzMGE4ZTFjNWQ4ODk2NWI3NDZkZjBhYWYyMTMyN2Q4MDNkMzQ4ZThlOGRhMTlmNTNhMWU5ODFkOTFhMDQ0IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6IjFmMzIwMzg4MjU3NTRkZTc1OGYwYmU2NjdiNjQ0ZjNjZGVkM2FlM2UwOGI0MTdhMmViZTljYmU1NmYyNGM0NTAiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiODQ0OTkwM2FhNDMxZDEzZTEzNTBiYjVhZTczMTM3OTRlMGQyMTMwNmM3NDA0YzI4NzJhY2Y3ZDY2NGIyMjNhZiIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImFkN2Y1Mjg0OTc1MGViNjZhNjJlZmFmYWUwYjQxNGEwZGQ5OGUwNGJkMmI5YzU2NjliYWM1YzRiNDNjMDk3MTMiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiJjY2I4ZDFkZDgyMDc2Y2EyOTQ5MWUxZTBjODAxOGM5MWY0Zjc5NGRiM2RkMDA1YmFjMGY4MzM1YmFmODFmZWRkIiwicGF0aCI6InR5cGVbMV0ifSx7InZhbHVlIjoiYmNlNzNhMjBlMDNiNmM0ZDM1M2VkY2IzMTM0NzZhOTZhNTRkMGNjYzVkNWQ1OWIzMjRhOWU1YTQ2NjQzZmFiNiIsInBhdGgiOiJpc3N1ZXIuaWQifSx7InZhbHVlIjoiMjBhMDM0ZjcxMDliNDRmOGEyZTIxMWM1Z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bnRpYWxTdWJqZWN0LmxpY2Vuc2VzWzFdLmVmZmVjdGl2ZURhdGUifSx7InZhbHVlIjoiYTk3MzFhMzFkMzkzNmJmNjAyNzMxNTAwYjIzMjY3ZTA2MzcxOGEzZjJkMGFiZTI4MDhlOGJiMzQxODQxYWZlZCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0uaWQifSx7InZhbHVlIjoiNDg4MjRkYjdjY2U3ZTY5MGQ3NjgyMGM1N2M1OWNlZGI5ZDZiNGVjMDlhMDY0ZDFmYTJhMmI0OGZhYzJlN2FhZCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udHlwZSJ9LHsidmFsdWUiOiJjMzY1M2FkNzg4MzhkNDhmM2Q1ZGNkNmE2OGRmNGU0MmMxMTM1ZmY4MzhiYzI5MTY4NDQzMDdjZDljZmM4ZWY4IiwicGF0aCI6InJlbmRlck1ldGhvZFswXS50ZW1wbGF0ZU5hbWUifV0=", + "privacy": { + "obfuscated": [] + } + } +} \ No newline at end of file diff --git a/test/fixtures/v4/did-signed-wrapped.json b/test/fixtures/v4/did-signed-wrapped.json deleted file mode 100644 index 3812b221..00000000 --- a/test/fixtures/v4/did-signed-wrapped.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2", - "https://schemata.openattestation.com/com/openattestation/4.0/alpha-context.json" - ], - "name": "Republic of Singapore Driving Licence", - "type": ["VerifiableCredential", "OpenAttestationCredential"], - "issuer": { - "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", - "type": "OpenAttestationIssuer", - "name": "Government Technology Agency of Singapore (GovTech)", - "identityProof": { "identityProofType": "DNS-DID", "identifier": "example.openattestation.com" } - }, - "validFrom": "2021-03-08T12:00:00+08:00", - "credentialSubject": { - "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", - "type": ["DriversLicense"], - "name": "John Doe", - "licenses": [ - { - "class": "3", - "description": "Motor cars with unladen weight <= 3000kg", - "effectiveDate": "2013-05-16T00:00:00+08:00" - }, - { - "class": "3A", - "description": "Motor cars with unladen weight <= 3000kg", - "effectiveDate": "2013-05-16T00:00:00+08:00" - } - ] - }, - "renderMethod": [ - { - "id": "https://demo-renderer.opencerts.io", - "type": "OpenAttestationEmbeddedRenderer", - "templateName": "GOVTECH_DEMO" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "0235bfc6fa01f87a10dcfc535b6cff6a796940aabdfb356bc646b73d5952b802", - "proofs": [], - "merkleRoot": "0235bfc6fa01f87a10dcfc535b6cff6a796940aabdfb356bc646b73d5952b802", - "salts": "W3sidmFsdWUiOiI1ZDhiMGMyM2Q1MGNlZWFhNzUyNjUwODQxNzViMTI0MWY0MTEzMGE3MWMzNTkzZDMzN2RiMTRiZTFkZTg4ZmM1IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6IjAyN2QyMmMxMWNlOTY5M2Q2NDdlZTczNjQzZjZmYjkyZWFhMjg3MDdmMGE3NzU4ZTQ0ZmU1ZjQzZWNkOTUxMjAiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiMTQ3MWQ3ZWEwMTU5MGQ1NmZhYzczZGZiOGYwNWFjNDc0NjVmMTI0NzNlZTQ0NTY2MGI2NzA3NTIzM2MzOTNlNiIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImVhYmJhODM1MTYzYThkN2Q3YTk0MmM2MGU1OTk4ZTc1NjllYTI3ZDI5ODQ5ODE1OTYwNzMwMzU4YmM1YjkzNmMiLCJwYXRoIjoidHlwZVswXSJ9LHsidmFsdWUiOiJmZmRmNjk5ZDVlZDBkN2U5NzgxZjk1YmM0NGUwMzU5YTkxNzhiMDg0OWZhN2M1MTM0NzIyMzVlMjY0YTBiYjBiIiwicGF0aCI6InR5cGVbMV0ifSx7InZhbHVlIjoiOTFkY2JlNmI3NDQ4NGRkZDA0YzJhM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kZXNjcmlwdGlvbiJ9LHsidmFsdWUiOiI1NTk0NmMzOTMxNWUzOTM5M2M4OWRiMTNkNzY5MWFiMTU1NmE1ZmFkZTYwNTQ2MWQzOTU2ZTBiMjY1OTNiNDkzIiwicGF0aCI6ImNyZWRlbnRpYWxTdWJqZWN0LmxpY2Vuc2VzWzFdLmVmZmVjdGl2ZURhdGUifSx7InZhbHVlIjoiNTY2MDA3ODJmMDI4MzE5ODc1MTdkZTRjNjY3ODhkMGUzZjNlYjdkZWJiODEyYjJkZTQ1OWZlODc5NzEyYTZiMyIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0uaWQifSx7InZhbHVlIjoiMjllZTA4MjgzYzdmNWRkOGJmZDU1YzIyOWE2MDYxZGUzN2M1NzQ5MDM4OTAwZTFjZmQ0OGEyNmRkYjJkZjY3MCIsInBhdGgiOiJyZW5kZXJNZXRob2RbMF0udHlwZSJ9LHsidmFsdWUiOiI2N2FlYzk1ODNmZjYyYjg2NGQxMDUzMWZhZjJkNzgwNjdmMzA1YWVlN2Y5YzE3YzhhMDM1YWM2MTYzYjJhMmU2IiwicGF0aCI6InJlbmRlck1ldGhvZFswXS50ZW1wbGF0ZU5hbWUifV0=", - "privacy": { "obfuscated": [] }, - "key": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90#controller", - "signature": "0x6c8bbdad14736fa2624702c700b6be928652a3de846c3ab6b88d678d8263539a556d03f0e952dd16cd72ad41866075995c774851fb0f74f5541aa7edd7fdf54e1b" - } -} diff --git a/test/fixtures/v4/did-wrapped.json b/test/fixtures/v4/did-wrapped.json deleted file mode 100644 index f9924799..00000000 --- a/test/fixtures/v4/did-wrapped.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "@context": [ - "https://www.w3.org/ns/credentials/v2", - "https://schemata.openattestation.com/com/openattestation/4.0/alpha-context.json" - ], - "name": "Republic of Singapore Driving Licence", - "type": ["VerifiableCredential", "OpenAttestationCredential"], - "issuer": { - "id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90", - "type": "OpenAttestationIssuer", - "name": "Government Technology Agency of Singapore (GovTech)", - "identityProof": { "identityProofType": "DNS-DID", "identifier": "example.openattestation.com" } - }, - "validFrom": "2021-03-08T12:00:00+08:00", - "credentialSubject": { - "id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42", - "type": ["DriversLicense"], - "name": "John Doe", - "licenses": [ - { - "class": "3", - "description": "Motor cars with unladen weight <= 3000kg", - "effectiveDate": "2013-05-16T00:00:00+08:00" - }, - { - "class": "3A", - "description": "Motor cars with unladen weight <= 3000kg", - "effectiveDate": "2013-05-16T00:00:00+08:00" - } - ] - }, - "renderMethod": [ - { - "id": "https://demo-renderer.opencerts.io", - "type": "OpenAttestationEmbeddedRenderer", - "templateName": "GOVTECH_DEMO" - } - ], - "proof": { - "type": "OpenAttestationMerkleProofSignature2018", - "proofPurpose": "assertionMethod", - "targetHash": "0235bfc6fa01f87a10dcfc535b6cff6a796940aabdfb356bc646b73d5952b802", - "proofs": [], - "merkleRoot": "0235bfc6fa01f87a10dcfc535b6cff6a796940aabdfb356bc646b73d5952b802", - "salts": "W3sidmFsdWUiOiI1ZDhiMGMyM2Q1MGNlZWFhNzUyNjUwODQxNzViMTI0MWY0MTEzMGE3MWMzNTkzZDMzN2RiMTRiZTFkZTg4ZmM1IiwicGF0aCI6IkBjb250ZXh0WzBdIn0seyJ2YWx1ZSI6IjAyN2QyMmMxMWNlOTY5M2Q2NDdlZTczNjQzZjZmYjkyZWFhMjg3MDdmMGE3NzU4ZTQ0ZmU1ZjQzZWNkOTUxMjAiLCJwYXRoIjoiQGNvbnRleHRbMV0ifSx7InZhbHVlIjoiMTQ3MWQ3ZWEwMTU5MGQ1NmZhYzczZGZiOGYwNWFjNDc0NjVmMTI0NzNlZTQ0NTY2MGI2NzA3NTIzM2MzOTNlNiIsInBhdGgiOiJuYW1lIn0seyJ2YWx1ZSI6ImVhYmJhODM1MTYzYThkN2Q3YTk0MmM2M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