{"_id":"@blobaa/claim-ts","_rev":"5-270afff5c058032fdc05aca8940fc99f","name":"@blobaa/claim-ts","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0-beta.11":{"name":"@blobaa/claim-ts","version":"1.0.0-beta.11","description":"An implementation of the [Claim](https://github.com/blobaa/documentation/wiki/Claim) module written in [TypeScript](https://www.typescriptlang.org).","main":"dist/src/index.js","scripts":{"test":"npm run test-browser && npm run test-node","test-node":"jest --testEnvironment=node","test-browser":"jest --testEnvironment=jsdom","build":"rm -rf dist && tsc","test-build-node":"jest --rootDir=dist --testEnvironment=node","test-build-browser":"jest --rootDir=dist --testEnvironment=jsdom","lint":"eslint ./ --ext .ts","fix-lint":"eslint ./ --fix --ext .ts"},"repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"author":{"name":"atz3n"},"license":"ISC","devDependencies":{"@types/jest":"^24.0.23","@types/node":"^12.12.14","@types/utf8":"^2.1.6","@typescript-eslint/eslint-plugin":"^2.16.0","@typescript-eslint/parser":"^2.16.0","eslint":"^6.8.0","eslint-plugin-import":"^2.20.0","eslint-plugin-prefer-arrow":"^1.1.7","jest":"^24.9.0","jest-cli":"^24.9.0","ts-jest":"^24.2.0","typescript":"^3.7.3"},"dependencies":{"js-sha256":"^0.9.0","utf8":"^3.0.0"},"gitHead":"7d7f274e1aa1f0cc632a05f4299cc9566699587a","bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"homepage":"https://github.com/blobaa/claim-ts#readme","_id":"@blobaa/claim-ts@1.0.0-beta.11","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-y6mZpjRs33fVOX3RTooH/d6CDqGA9U/FUexUv3hdA9JtbuNgGfX01cuxLQ1jYHl8lVkdz6Z2MXcV7Jlr4P/k6g==","shasum":"c81adeac507a428f8b987b95f06b0aa84a006f12","tarball":"https://registry.npmjs.org/@blobaa/claim-ts/-/claim-ts-1.0.0-beta.11.tgz","fileCount":21,"unpackedSize":71632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegZiLCRA9TVsSAnZWagAALZ0QAIUn/M/pOsIakehxLXz7\n+OAU872zIjgyDsIcOjbpy7pZvatiUvXGMdiAMeoy2x6Z+aHnCtoNfxk7Ta96\ntUHjgM1TUNXinYlJZUcWLOEPlXAZ7bfV2hQ+dXB7N3ChL/txSZWygWJYHCCn\n335nos2U+pHZ11Mbd22ECz/yLwwc/+StUOdH8bWNexxKw61mM8PYSh5Vl+0t\nVKey5SDsDXiYNY0dygMmQ0B62UJagiozLPmzc768tjLVnRKK0RhbP4MrWCCl\nUV2QkchuvJfkeUrwZUVSiVdG+m5uJN///A2dGDHNLIqfyRtijHfIptl0s0JR\nG2ZcNxaHr8LJUU6RCP9nnsZoQMlwPtqszXycX3Lhr9IqxGvqm6wby2JxgF/V\nXbjkOWEdksqu45TZ0Lt3xxk+N8LkId08LiFyXxwSn391tVv+Wjap2nEKUjcL\nnH1LQG5AKXKiZPsTOhL2APpVPEuPU8KBLgY7GScEJYvCSl1ODy8f/tA5pszn\n2bCQSh96d5Q7AF+eSPxpqgguSYEChREtGUXkSdiv0IlFl1MiWaWr63MBSrTv\nLfyJrXITXqf3x7Tt2TA4LT2as0S2Evk+iMlLYuyfdIEYxa4qsR5JVA4DKbSd\nlGRtxj7I3zbyMz3XrYjK8mL7GwMpuM6onXGlKpFlNjtWrxfzt2dVDnGqZTah\nNTAI\r\n=N2fw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHNo4DB+KnSC5phrcxrxX86hbkwXOR29cxMmcajCVKjAIgJWLQwES7MUbSgpbxDg0e1FBvw+IayD3b+4HE/vc9+JQ="}]},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"_npmUser":{"name":"blobaa","email":"hi.blobaa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/claim-ts_1.0.0-beta.11_1585551499040_0.274685026079033"},"_hasShrinkwrap":false},"1.0.0-beta.12":{"name":"@blobaa/claim-ts","version":"1.0.0-beta.12","description":"An implementation of the [Claim](https://docu.blobaa.dev) module written in [TypeScript](https://www.typescriptlang.org).","main":"dist/src/index.js","scripts":{"test":"npm run test-browser && npm run test-node","test-node":"jest --testEnvironment=node","test-browser":"jest --testEnvironment=jsdom","build":"rm -rf dist && tsc","test-build-node":"jest --rootDir=dist --testEnvironment=node","test-build-browser":"jest --rootDir=dist --testEnvironment=jsdom","lint":"eslint ./ --ext .ts","fix-lint":"eslint ./ --fix --ext .ts"},"repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"author":{"name":"atz3n"},"license":"AGPL","devDependencies":{"@types/jest":"^24.0.23","@types/node":"^12.12.14","@types/utf8":"^2.1.6","@typescript-eslint/eslint-plugin":"^2.16.0","@typescript-eslint/parser":"^2.16.0","eslint":"^6.8.0","eslint-plugin-import":"^2.20.0","eslint-plugin-prefer-arrow":"^1.1.7","jest":"^24.9.0","jest-cli":"^24.9.0","ts-jest":"^24.2.0","typescript":"^3.7.3"},"dependencies":{"js-sha256":"^0.9.0","utf8":"^3.0.0"},"gitHead":"9ca549b37348c54f7576387ea2da77d7cd0064bf","bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"homepage":"https://github.com/blobaa/claim-ts#readme","_id":"@blobaa/claim-ts@1.0.0-beta.12","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-2OwSDXheJoeGAfoA49RgHB5g4AgmxA21bPMvweoXbpeEBli9VZTRAK4Dih6cHCxGXyfinYdq2TFY31ILj6fqfA==","shasum":"2d84771d21de80d924eb3e81dbc1e692102620a4","tarball":"https://registry.npmjs.org/@blobaa/claim-ts/-/claim-ts-1.0.0-beta.12.tgz","fileCount":21,"unpackedSize":71603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegaTHCRA9TVsSAnZWagAASLsP/A7pyU4KnQh/fxuWvBs2\naa4qrXVRzNb60AfojP54UJ5JOZ0o5DbBJllPuofYgIpZDyKoVsaQyPKNRN1n\n66Utq2j13DZuxBvR8fHoaVIoE3ILDcDxVObCRQIgCtpEN++/l5LdtSt7QTQV\nqpfAmNIJ4jo/sEdQJXfFnLprNPwtSOIRqaytue2QX1eNFibY/1BRsk3SrFIL\nihZ8XDoDnb/T/39VTPmrlgQW819MImPO2pgUS2yv67LqfaTRmLYHHf7LN1T2\ntLi/ite1lpSMV+FdxYyixD4niPNwkMb3aX1Uc1KMS+MIdwR1COV1RsWidZxL\nAREdFf44LFXWPbOPzk4RTPvfEryJFh2IuRZKHB5O+qh+XQU3yyj6lB0E2hgg\nVDhAKOkLScCIhmqzzrVUpqbVKDZIkuBFMERdZurKX1BQ3eRdWKkE1CNR795j\nPv8soYlQLpiaTl/E7IYgCF0O4pXJRpiE/qSQFdzGQmipNKmcnnLT4Q1ul5gM\nGF2Goz4wCxTAq6WQScSyzXTOEw2ZyTiOiz7exSY/EHfR5rKHN32M9uD3a9Vu\nbD/aM2EMzCCGXCWFVZ3B8DFV+H2jXbDQ1FvdeQpz02Omd/QB/jdErFxhFXM4\nyCBR7h1ofmSuxvnoThuDUYjsEnfKdgZLUt9HhKa2PacF6280X+8vliHKTO10\ni+Ux\r\n=cMN9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGw3TDqBV/Wj0nneh1ScR6gBYnktqaXTWl7PTl0TQ2F9AiEAjwW4hsy3OaH/KPIqhTR3G0d06iD1sbU+UMQ4QqMbwSM="}]},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"_npmUser":{"name":"blobaa","email":"hi.blobaa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/claim-ts_1.0.0-beta.12_1585554631014_0.28517368314662805"},"_hasShrinkwrap":false},"1.0.0-beta.13":{"name":"@blobaa/claim-ts","version":"1.0.0-beta.13","description":"An implementation of the Claim module written in TypeScript","author":{"name":"atz3n"},"license":"AGPL","repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"main":"dist/src/index.js","scripts":{"test":"npm run test-browser && npm run test-node","test-node":"jest --testEnvironment=node","test-browser":"jest --testEnvironment=jsdom","build":"rm -rf dist && tsc","test-build-node":"jest --rootDir=dist --testEnvironment=node","test-build-browser":"jest --rootDir=dist --testEnvironment=jsdom","lint":"eslint ./ --ext .ts","fix-lint":"eslint ./ --fix --ext .ts"},"devDependencies":{"@types/jest":"^24.0.23","@types/node":"^12.12.14","@types/utf8":"^2.1.6","@typescript-eslint/eslint-plugin":"^2.16.0","@typescript-eslint/parser":"^2.16.0","eslint":"^6.8.0","eslint-plugin-import":"^2.20.0","eslint-plugin-prefer-arrow":"^1.1.7","jest":"^24.9.0","jest-cli":"^24.9.0","ts-jest":"^24.2.0","typescript":"^3.7.3"},"dependencies":{"js-sha256":"^0.9.0","utf8":"^3.0.0"},"gitHead":"3d2b0cfa15df691cc891abb35c6b57a31fcdd886","bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"homepage":"https://github.com/blobaa/claim-ts#readme","_id":"@blobaa/claim-ts@1.0.0-beta.13","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-djjf3sKW9GJrhi/M8egtA5i1ya+IcmqDPlMn69Ub97yCSy1GSFnPXC3fmREP+W5e4k9FMCRmlxhiQ6AxMZU/FA==","shasum":"798f404b11be77e14aa870bc798055c6c2b93316","tarball":"https://registry.npmjs.org/@blobaa/claim-ts/-/claim-ts-1.0.0-beta.13.tgz","fileCount":21,"unpackedSize":71655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegbi+CRA9TVsSAnZWagAAWgUP/ia5d+nP/WM8c05Tmpvj\nweBLtFW6/hS7zippVBO9nluw2/0h5vcYNPomW0B10eQjLsm0kBS4sbRedmK5\nUq1yqyKu1Dr3U+J/nZW9ENv/DIVsMBqoMSAvQMVstFgBjsS/7EnEumBgq7fa\nmuUQtIe7Uhn2t2xefLlWGfTwZ9EbDpEdtTx88NOZ193SQEtg4DBLKLH76JCY\nmYsCn3tuj/tZ3TRksBbN0m2dQHXcUBE65ux6IWzMtTjv1RGfU1TsSQFHCGxw\nFZacvMp6ro7TBHAwIt8rd4Wa4ixGh/wpEwUrZIweMK1IXp1kdXK0RgCnmKiE\n8gWzw083t8rDFwJPRwOKXztcv026x4n6j4iIxpRD50qSMbA8OthXtuZguy/C\n9BjhO/VKYt5wTe/OEZlgngIlGEhf8MeuKJk19WOhYNgYA2R7YClBcULkXHK3\nrowyJyQOPH/M69WfRr3oLgFCzK/jW6ctknybb0JveK9mntKVlcRJda5feKKR\nWm9KXYoISIRSsKnSRniPqpKjoeqJVNUn2CptcGcamHWLS9dqwGPmXrZMOWUb\nNtQeBlKJ5DmXanAuqQARxIJoJCdRc7xCucFdZVHu9jrXEstNAGpxtAp705ay\n8lF4xfhrB7ufVX4+MxAy9ycLAw3a41tOA0KAX/9Ktc7PgXHLi3zOt3Zqpe07\ncRVF\r\n=f25q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBuBKdDfaAYVyZLu+8AOs0W7X9oAcBWnwvRd5IJKDubAiBRpS7OZeg9ghrfd7d+DMT42oIFmjF0wjJY786FUb+chw=="}]},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"_npmUser":{"name":"blobaa","email":"hi.blobaa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/claim-ts_1.0.0-beta.13_1585559742035_0.667889054468904"},"_hasShrinkwrap":false},"1.0.0-beta.14":{"name":"@blobaa/claim-ts","version":"1.0.0-beta.14","description":"An implementation of the Claim module written in TypeScript","author":{"name":"atz3n"},"license":"AGPL-3.0-or-later","repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"main":"dist/src/index.js","scripts":{"test":"npm run test-browser && npm run test-node","test-node":"jest --testEnvironment=node","test-browser":"jest --testEnvironment=jsdom","build":"rm -rf dist && tsc","test-build-node":"jest --rootDir=dist --testEnvironment=node","test-build-browser":"jest --rootDir=dist --testEnvironment=jsdom","lint":"eslint ./ --ext .ts","fix-lint":"eslint ./ --fix --ext .ts"},"devDependencies":{"@types/jest":"^24.0.23","@types/node":"^12.12.14","@types/utf8":"^2.1.6","@typescript-eslint/eslint-plugin":"^2.16.0","@typescript-eslint/parser":"^2.16.0","eslint":"^6.8.0","eslint-plugin-import":"^2.20.0","eslint-plugin-prefer-arrow":"^1.1.7","jest":"^24.9.0","jest-cli":"^24.9.0","ts-jest":"^24.2.0","typescript":"^3.7.3"},"dependencies":{"js-sha256":"^0.9.0","utf8":"^3.0.0"},"gitHead":"f5fbe78c500c828e6a1c820e957b807b3c0abea3","bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"homepage":"https://github.com/blobaa/claim-ts#readme","_id":"@blobaa/claim-ts@1.0.0-beta.14","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-yTZw72ZpNZt51E25n+ZHcRJmypHv5gPs9SzoG0l5wYMk7EzJSWLe0pZmQIows+YiqB3ffyskS+C+zWTdM4ZpZQ==","shasum":"96c61124b6f8b6e75067b1f614d23096c9b49f0e","tarball":"https://registry.npmjs.org/@blobaa/claim-ts/-/claim-ts-1.0.0-beta.14.tgz","fileCount":21,"unpackedSize":71667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegdOtCRA9TVsSAnZWagAAXQcP/i0aZ9T3cYRKCPXz/HIT\npGHX3hbecFMJ5X7DyKVl2bJ7qvRuGhlW8jdUCt5qyvR15DEI6tnQqzKU78wP\nO4t3kLBj5Tg8d7xhroTKLnZORB8LdqGVW4tK8b7fztBwkEDtjFd//Kh7uQWU\nPbvJnlJCLYHV+2s8nmK26pZS+FFXgbRqBWYTIcOSA3/xrGbCwRo39E5QOods\nX2fAqoGRixGZsnTmUU7EuM+3dZ8AiPCLPUvv6N5lIGFUD7vwNx8Qc2thKvit\nesEF3o88Irv/lhsM4buwT1Of8zAEgYH6rkpGpQAPxaB6Nk7X8PrDXRUkFPPR\nxDdCc8/LpcDUzGtRfNgk/9fd5Y1S7T09mEPfYgUVUU9wts8sCku/APxyJGfR\nqcR/gInkfM1zN/ncuS04JJghByJvJHSrA2QhNY8F1LRywDwNT6yIRDvUye0W\n1qXIkHqvmHyw7NINgyHQD1sij5ThHyvRKzRmmt8j7GwCYhW0ug2TvcXT1F1w\nbhBdCy1YBrwljznyjqUM4vvlRhRcFiwGMrKL0LhdkiwXvLHrQxm8d5Nx5aSl\n2RnqLY1oaIhWIVI3zH0a9nSVw7eGPavpPN6idfBvc90D3UorOfignloz0Kyy\nKvVo2ESPC95uVWHpIIvN1yDLwDQS0tFEbrAscH2tbOobb559BNmSMROLcN5j\nNXA8\r\n=S5ui\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICA4Ha4XpV6gUDPl8ZBVsYyu652hfB22j6yAxiBLLcWHAiEA+1wp6ZtazPS0X9n67c1vwVhmjgsL4nnjbqfyEKTM184="}]},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"_npmUser":{"name":"blobaa","email":"hi.blobaa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/claim-ts_1.0.0-beta.14_1585566637484_0.7955630929824162"},"_hasShrinkwrap":false},"1.0.0":{"name":"@blobaa/claim-ts","version":"1.0.0","description":"An implementation of the Claim module written in TypeScript","author":{"name":"atz3n"},"license":"AGPL-3.0-or-later","repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"main":"dist/src/index.js","scripts":{"test":"npm run test-browser && npm run test-node","test-node":"jest --testEnvironment=node","test-browser":"jest --testEnvironment=jsdom","build":"rm -rf dist && tsc","test-build-node":"jest --rootDir=dist --testEnvironment=node","test-build-browser":"jest --rootDir=dist --testEnvironment=jsdom","lint":"eslint ./ --ext .ts","fix-lint":"eslint ./ --fix --ext .ts"},"devDependencies":{"@types/jest":"^24.0.23","@types/node":"^12.19.14","@types/utf8":"^2.1.6","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","eslint":"^6.8.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prefer-arrow":"^1.2.2","jest":"^24.9.0","jest-cli":"^24.9.0","ts-jest":"^26.4.4","typescript":"^3.9.7"},"dependencies":{"js-sha256":"^0.9.0","utf8":"^3.0.0"},"gitHead":"405fa37ee5646c9114364534f6784ff65d27663b","bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"homepage":"https://github.com/blobaa/claim-ts#readme","_id":"@blobaa/claim-ts@1.0.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-QMiTevQw+hLVfekFr2h4+nQbEZwJBu/Dcw3bi7fBuZaFcO8wVjHDlxeWKC6kQqeJ9qhLfAfEWeOa9WjkQWNL2A==","shasum":"cf55f33575c97fdc26725a16b9634b4a760f62c1","tarball":"https://registry.npmjs.org/@blobaa/claim-ts/-/claim-ts-1.0.0.tgz","fileCount":21,"unpackedSize":72309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAz1LCRA9TVsSAnZWagAAgSAQAIByUpoAiu8nne74MGx9\noRmWpY+yk5hlkW5iKTqMyuWK5dZRZk/TG5ZBm2jWEiwwSGJUfF2Xne1iRjk0\nuehjsBFbXFV/acgihQw3mJ5pNGr05UHDSxzsECHvT7YeVuan8JYPsixRQkep\nFEURLHe3Az7nurfLXglk8HOubkQiGCYx+Oah+HREgcALVfL1VGywBFxfJm2/\n5kObNZinXvgxFNWT2RMXBdWRTt7ZrUHEw/JrDKMzPXuluIgwsR4b/g53k62/\nH4+Kmpx+CreyPucDj7zs1V4cm0N5KJjBoTsr6sahnwlrXb91/s9XVffFYewv\nVd3UGKgtsKpAyLBnUozijUPLGfRRd9tvqtjPHizI3uz2ULsXNbFdH1+Tf27z\nG0VTeWOXvIu8JRLZDsJMTC/J+gtOX9zbEz9jSignGQfwKpyCMncJ7KSKKfxA\ndYsesfrS6qOYol2fcByk4Bl3ftxDsRhafCV+PaiUxUmsEpS0BkMQR2aEx1Ry\nDKXQzE4NFFA988OprL7Eo9MZ5dm1FGhjnBOgqdn/FJxEYq+ecQi9ABj5rmBz\nGFXvqNVd3sqq3irJfEyB/Yd0eJAtrpp8EZd+P3yIpAfx3M7Q9BCUkl3fXkZh\nwUlQj3Hcs0zehPvgjiKE9wUr+TdJSX4U6p2fwTG6HhEh+4t/gzVvFcWPH/JW\nS1ys\r\n=3Z6f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEeLLI5TdB7ohKhxN/8H2PS33wpCQal6gaoekE2wagsAIhAPucz1Y+nik0grZ+8eQNc+TyxOpd1mIzyX1/nw9OXjHr"}]},"_npmUser":{"name":"blobaa","email":"hi.blobaa@gmail.com"},"directories":{},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/claim-ts_1.0.0_1610825035293_0.31881224240394523"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-30T06:58:18.806Z","1.0.0-beta.11":"2020-03-30T06:58:19.189Z","modified":"2022-04-04T19:36:30.840Z","1.0.0-beta.12":"2020-03-30T07:50:31.113Z","1.0.0-beta.13":"2020-03-30T09:15:42.246Z","1.0.0-beta.14":"2020-03-30T11:10:37.625Z","1.0.0":"2021-01-16T19:23:55.418Z"},"maintainers":[{"name":"blobaa","email":"hi.blobaa@gmail.com"}],"description":"An implementation of the Claim module written in TypeScript","homepage":"https://github.com/blobaa/claim-ts#readme","repository":{"type":"git","url":"git+https://github.com/blobaa/claim-ts.git"},"author":{"name":"atz3n"},"bugs":{"url":"https://github.com/blobaa/claim-ts/issues"},"license":"AGPL-3.0-or-later","readme":"# Claim TypeScript\n\nAn implementation of the [Claim](https://docu.blobaa.dev/claim) module written in [TypeScript](https://www.typescriptlang.org).\n\n\n<details><summary><i>Table of Contents</i></summary>\n<p>\n\n- [Claim TypeScript](#claim-typescript)\n  - [Installation](#installation)\n    - [Npmjs Registry](#npmjs-registry)\n    - [Github Registry](#github-registry)\n  - [Development](#development)\n  - [General](#general)\n  - [APIs](#apis)\n    - [Claim](#claim)\n  - [Example](#example)\n    - [Claim Registration](#claim-registration)\n    - [Verifiable Claim Creation](#verifiable-claim-creation)\n    - [Claim Verification](#claim-verification)\n  - [Module Instantiation](#module-instantiation)\n  - [Licensing](#licensing)\n    - [Dual-License](#dual-license)\n\n</p>\n</details>\n\n\n## Installation\n\nThis library is published on GitHub's and npmjs's npm registry.\n\n\n### Npmjs Registry\n\n````\nnpm install @blobaa/claim-ts\n````\n\nSee [npmjs package](https://www.npmjs.com/package/@blobaa/claim-ts).\n\n\n### Github Registry\n\nFor using GitHub's registry, create a *.npmrc* file in the same directory as your *package.json* and add the following line \n\n````\n@blobaa:registry=https://npm.pkg.github.com/blobaa\n```` \n\nThis tells npm to use the GitHub registry for @blobaa scoped packages. More information about multiple registry usage can be found in [this medium post](https://medium.com/@crysfel/using-different-registries-in-yarn-and-npm-766541d6f851).\n\nYou can now install the package via\n\n````\nnpm install @blobaa/claim-ts\n````\n\nSee [GitHub package](https://github.com/blobaa/claim-ts/packages/93052).\n\nCAUTION: You need to [authenticate yourself](https://github.community/t5/GitHub-API-Development-and/Download-from-Github-Package-Registry-without-authentication/td-p/35255) to use the GitHub registry, even if it's a public available package.\n\n\n## Development\n\nYou need to have [Node.js](https://nodejs.org/en/) installed.\n\nTo **initialize** the project just clone this repository and run\n```\nnpm install\n```\n\nFor **linting** run \n```\nnpm run lint\n```\n\nYou can try to **autofix lint errors** with\n```\nnpm run fix-lint\n```\n\nFor **unit testing** run the following associated commands\n\nbrowser:\n```\nnpm run test-browser\n```\n\nnode: \n```\nnpm run test-node\n```\n\nboth: \n```\nnpm test\n```\n\n\n## General\n\nThis library implements the [Claim](https://docu.blobaa.dev/claim) module and must therefore be used in conjunction with the [Attestation Protocol](https://docu.blobaa.dev/attestation-protocol) [implementation](https://github.com/blobaa/attestation-protocol-ts) to enable verifiable claim based authentication.\n\n\n## APIs\n\nThe library contains the following module:\n\n### Claim\n\nThe Claim module provides APIs for claim data preparation, claim creation and claim verification:\n\n````typescript\n- prepareUserData: (params: PrepareUserDataParams) => UserData[]\n- setUserData: (params: SetUserDataParams) => void\n- createHashes: () => Hashes\n- createClaim: (params: CreateClaimParams) => ClaimObject\n- verifyClaim: (params: VerifyClaimParams) => boolean\n````\n\nThe **prepareUserData** function extends an unprepared user data object with a unique alphanumeric nonce.\n\nThe **setUserData** function consumes an array of prepared user data objects and stores it internally.\n\nThe **createHashes** function returns an object that contains the root hash and the leaf hashes of the user data object.\n\nThe **createClaim** function creates a claim object based on preselected user data.\n\nThe **verifyClaim** function verifies a claim object.\n\n\n## Example\n\nThe following example shows sample code for the three Claim workflows (registering, creating, and verifying a verifiable claim). It uses, as described above, the Attestation Protocol implementation, additionally to this Claim library.\n\nIt shows a fictive scenario of a registration office where the user Oliver receives and uses the verifiable claim that represents a subset of his id card information.\n\n\n### Claim Registration\n\n````typescript\nimport { claim, SetUserDataParams, PrepareUserDataParams } from \"@blobaa/claim-ts\";\nimport { attestation, CreateLeafAttestationParams } from \"@blobaa/attestation-protocol-ts\";\n\n\n/* unprepared claim user data */\nconst data = [\n    { name: \"address:city\",     value: \"Cologne\" },\n    { name: \"address:country\",  value: \"Germany\" },\n    { name: \"address:number\",   value: \"3\" },\n    { name: \"address:street\",   value: \"Kölner Weg\" },\n    { name: \"address:zip\",      value: \"11221\" },\n    { name: \"person:firstName\", value: \"Oliver\" },\n    { name: \"person:surName\",   value: \"Schmidt\" },\n    { name: \"person:birthDay\",  value: \"11.11.2000\" }\n];\n\n\nconst claimRegistrationExample = async (): Promise<void> => {\n\n    /*\n     * Step 1: Add a nonce to each user data object\n     * (optional. Can be omitted if the user data are already in prepared form)\n     */\n\n    const params1: PrepareUserDataParams = {\n        unpreparedUserData: data\n    };\n\n    const userData = claim.prepareUserData(params1);\n\n    /* the user data are now extended with unique 64 character long alphanumeric nonces */\n    console.log(\"prepared user data:\\n\", userData, \"\\n\");\n\n\n    /*\n     * Step 2: Get the root hash\n     */\n\n    const params2: SetUserDataParams = {\n        userData\n    };\n\n    claim.setUserData(params2); // stores the user data array internally\n    const claimHashes = claim.createHashes();\n\n    /* the root hash is now accessible via the rootHash key */\n    console.log(\"root hash:\", claimHashes.rootHash, \"\\n\");\n\n\n    /*\n     * Step 3: Attach the root hash as attestation payload\n     */\n\n    const rootHash = {\n        rootHash: claimHashes.rootHash\n    };\n\n    const params3: CreateLeafAttestationParams = {\n        leafAccount: \"ARDOR-5HVX-MN8D-QNBH-4F6FE\",      // account to be attested (Oliver`s account)\n        attestationContext: \"claimAuthentication\",\n        payload: JSON.stringify(rootHash),              // the root hash\n\n        passphrase: \"<some passphrase>\",                // passphrase of attestor account\n        myAttestorAccount: \"ARDOR-47NS-P7AU-HZNN-84PW6\" // [optional] account name of attestor accounts attestor.\n                                                        // Required if attestor account is an intermediate entity\n    };\n\n    try {\n\n        /* create and emit request */\n        const response = await attestation.createLeafAttestation(\"https://testardor.jelurida.com\", params3);\n\n        /* the claim is now registered with the specified user data array to the attested account (Oliver`s account) */\n        console.log(\"transaction id:\", response.transactionId);\n\n\n        /*\n        * Step 4: Forward the prepared user data array to the attested account holder (to Oliver in this case)\n        *\n        * <your code>\n        */\n\n    } catch (e) { /* error handling (see attestation-protocol-ts readme) */ }\n\n};\n\nclaimRegistrationExample();\n````\n\n\n### Verifiable Claim Creation\n\n````typescript\nimport { claim, CreateClaimParams, SetUserDataParams } from \"@blobaa/claim-ts\";\nimport { data, SignDataParams } from \"@blobaa/attestation-protocol-ts\";\n\n\n/* the prepared claim user data forwarded at the claim registration process (see Claim Registration) */\nconst userData = [\n    { name: \"address:city\",     value: \"Cologne\",       nonce: \"fNQKzWwac2OTPKLOsdF98bMq4xcLTozIZIOk9EF0vzL2xlIBB6EgUw7vztkB5oJ6\" },\n    { name: \"address:country\",  value: \"Germany\",       nonce: \"IHCiJeCNitRqikxSxWUj3s0mOr8du3PCnkqaH7ooRkImZk7mKYKJc1xpzgx3Utc1\" },\n    { name: \"address:number\",   value: \"3\",             nonce: \"dIMctTViKw4j1VjFnD9DYOky2CBxDlIcfOVpVqHxbthMXeyXyTnuJMO8J7rBQhir\" },\n    { name: \"address:street\",   value: \"Kölner Weg\",    nonce: \"JlAIZKGGm9cBVd2ZZlO7eOnkVGROvV1B6gJCkEtjPGj2CLqcsfc9KJgbuobrCT0k\" },\n    { name: \"address:zip\",      value: \"11221\",         nonce: \"Ztqy9Eep6sw6ZMWRU9AoucyFa3B46vJ0PswIOBStsAtaJEMeFbdGkPlqMXBgM09T\" },\n    { name: \"person:firstName\", value: \"Oliver\",        nonce: \"Lz6yDcwEXgSWHsUt8YK1QCKBgb2eptTDif3xOks6KQx9BvKrZhXPqGqdrlIrZAGL\" },\n    { name: \"person:surName\",   value: \"Schmidt\",       nonce: \"1lRu8pwklj33nTsFo0tRYLb3fQ732zR12eiZz2xFy4WiiavBzqrChRQIw1Mu2qbB\" },\n    { name: \"person:birthDay\",  value: \"11.11.2000\",    nonce: \"1UB3TUC1yyeFnSkxJVhiqQBEzmeWt4lOQNUQ5kg0VIFbxYQPBgBgbE46ovvagtba\" }\n];\n\n\nconst verifiableClaimCreationExample = (): void => {\n\n    /*\n     * Step 1: Select the user data to claim\n     */\n\n    const params1: CreateClaimParams = {\n        userDataNames: [\n            \"address:country\",\n            \"person:birthDay\"\n        ]\n    };\n\n\n    /*\n     * Step 2: Create the claim\n     */\n\n    const params2: SetUserDataParams = {\n        userData: userData\n    };\n\n    claim.setUserData(params2);\n    const claimObject = claim.createClaim(params1);\n\n    /* the claim object bundles the selected user data along with claim verification information */\n    console.log(\"claim object:\\n\", claimObject, \"\\n\\n\");\n\n\n    /*\n     * Step 3: Sign the claim\n     */\n\n    const params3: SignDataParams = {\n        attestationContext: \"claimAuthentication\",\n        attestationPath: [                          // trust chain up to the root account\n            \"ARDOR-3ZKF-US3F-KGL7-GUEZE\",\n            \"ARDOR-47NS-P7AU-HZNN-84PW6\"\n        ],\n        payload: JSON.stringify(claimObject),       // stringified claim object\n        passphrase: \"chicken clerk liquid evil turtle duty like jeans beauty hundred swim sample\"   // passphrase of claim creator account (Oliver`s account)\n    };\n\n    const signedClaim = data.signData(params3, true);\n\n    /* the signed claim object is now ready to be shared and verified */\n    console.log(\"signed claim object:\\n\", signedClaim);\n};\n\nverifiableClaimCreationExample();\n````\n\n\n### Claim Verification\n\n````typescript\nimport { claim, VerifyClaimParams, ClaimObject } from \"@blobaa/claim-ts\";\nimport { data, VerifySignedDataParams, SignedDataCheckParams, EntityCheckParams, Error, ErrorCode, SignedData } from \"@blobaa/attestation-protocol-ts\";\n\n\n/* the signed claim created at the claim creation process (see Verifiable Claim Creation) */\nconst signedClaim: SignedData = {\n  attestationContext: \"claimAuthentication\",\n  attestationPath: [ \"ARDOR-3ZKF-US3F-KGL7-GUEZE\", \"ARDOR-47NS-P7AU-HZNN-84PW6\" ],\n  creatorAccount: \"ARDOR-5HVX-MN8D-QNBH-4F6FE\",\n  payload: \"{\\\"userData\\\":[{\\\"name\\\":\\\"address:country\\\",\\\"value\\\":\\\"Germany\\\",\\\"nonce\\\":\\\"IHCiJeCNitRqikxSxWUj3s0mOr8du3PCnkqaH7ooRkImZk7mKYKJc1xpzgx3Utc1\\\"},{\\\"name\\\":\\\"person:birthDay\\\",\\\"value\\\":\\\"11.11.2000\\\",\\\"nonce\\\":\\\"1UB3TUC1yyeFnSkxJVhiqQBEzmeWt4lOQNUQ5kg0VIFbxYQPBgBgbE46ovvagtba\\\"}],\\\"hashes\\\":{\\\"leafHashes\\\":[\\\"739e1eec28e2c8c551e730a9480f63a7b93bb9aa48bd54463fbf44aa2e54ce8d\\\",\\\"5837ac6ce233f9a3d75bd8e41d3febe5ec59f9590f665b625c9cc0a408711361\\\",\\\"1be4b90fa974e78300d0c6d36eb3cfb7ceadcd38790fd60938ef210deb732dd6\\\",\\\"33a0ad65e9d7183128aa1b24be9d7fc5f774fa940345844d5f6f3a3d54214b7e\\\",\\\"3e4b13d21def5c17f8896ae2903b90c9e3df0c33e784629d889da0e276488c78\\\",\\\"e9be2351d0969531cae85b6d697fc561fc3701014543b4e0412c75976aaba857\\\"],\\\"rootHash\\\":\\\"077e142468b011a454b62991a54e17b4b2408bcc5a73f7de87f188335280b17b\\\"}}\",\n  signature: \"4f31stdpt2hm70iu8oer1tsq4lekck2rmt565f3eult4ocob3a2juomqs5s2ah0439t762igiof08rcr84rumr6lkf8vt9cfhuqutimf840gl1memb6mndh70i3gg4eacqcl13nvcb8206urs8evh03cm6nj02m2\"\n};\n\n\nconst claimVerificationExample = async (): Promise<void> => {\n\n    /*\n     * Step 1: Create a claim check callback\n     */\n\n    let rootHash = \"\";\n    let claimCreator = \"\";\n\n    const claimCheckCallback = (params1: SignedDataCheckParams): boolean => {\n        let claimObject: ClaimObject\n       \n        /* parse the claim object */\n        try {\n            claimObject = JSON.parse(params1.signedData.payload);\n        } catch (e) {\n            return false;\n        } \n\n        /* get user data */\n        console.log(\"claim user data:\\n\", claimObject.userData, \"\\n\");\n\n        /* get the claim signature time */\n        console.log(\"claim signature time:\", new Date(params1.signatureTime), \"\\n\\n\");\n\n\n        /* verify the claim */\n        const params2: VerifyClaimParams = {\n            claimObject\n        };\n\n        const isClaimValid = claim.verifyClaim(params2);\n\n\n        /* store information for claim entity checks */\n        claimCreator = params1.signedData.creatorAccount;\n        rootHash = claimObject.hashes.rootHash;\n\n\n        return isClaimValid; // verification process stops in case of an invalid claim\n    };\n\n\n    /*\n     * Step 2: Create a claim entity check callback\n     */\n\n    let isRootHashAttested = false;\n\n    const claimEntityCheckCallback = (entity: EntityCheckParams): boolean => {\n\n        /* show trust chain entities */\n        console.log(\"account: \", entity.account);\n        console.log(\"payload: \", entity.payload);\n        console.log(\"entity : \", entity.entityType, \"\\n\");\n\n\n        /* check if the root hash is attached to the claim creator account */\n        if (!isRootHashAttested) {\n            let parsedRootHash: string;\n\n            try {\n                parsedRootHash = JSON.parse(entity.payload).rootHash;\n            } catch (e) {\n                return false;\n            }\n\n            if (claimCreator === entity.account && rootHash === parsedRootHash) {\n                isRootHashAttested = true;\n            }\n        }\n\n        return isRootHashAttested; // verification process stops in case of an unattested root hash\n    };\n\n\n    /*\n     * Step 3: Request claim verification\n     */\n\n    const params: VerifySignedDataParams = {\n        trustedRootAccount: \"ARDOR-47NS-P7AU-HZNN-84PW6\", // the trust chain`s root account\n        signedData: signedClaim,\n        signedDataCheckCallback: claimCheckCallback,\n        entityCheckCallback: claimEntityCheckCallback\n    };\n\n    try {\n\n        /* create and emit request */\n        const response = await data.verifySignedData(\"https://testardor.jelurida.com\", params, true);\n\n        /* Congratulation!!!, you have successfully finished the verification process. The claim is valid and attested */\n        console.log(\"\\n\", \"claim is ok :)\");\n        console.log(\"verification information:\\n\", response);\n\n    } catch (e) {\n\n        /* if your program reaches these lines, an error occurred and the verification finished without success. */\n        const error = e as Error;\n\n        switch (error.code) {\n            case ErrorCode.SIGNED_DATA_CALLBACK_ERROR:\n                console.log(\"\\n\", \"claim is invalid :(\");\n                break;\n            case ErrorCode.ENTITY_CALLBACK_ERROR:\n                console.log(\"\\n\", \"claim creator account is not attested or root hashes mismatch :(\");\n                break;\n            default:\n                console.log(error);\n        }\n    }\n};\n\nclaimVerificationExample();\n````\n\n\n## Module Instantiation\n\nThe claim module is pre instantiated and importable via the lower case module name. If you need the class definition, import it via the upper case name. For example:\n\n````typescript\nimport { claim, Claim, PrepareUserDataParams} from '@blobaa/claim-ts'\n\n\nconst params: PrepareUserDataParams = {\n    userData: [\n        { name: 'data1', value: '42'},\n        { name: 'data2', value: '42'}\n    ]\n};\n\n\n/* use the default instance */\nconst userData = claim.prepareUserData(params);\nconsole.log(userData);\n\n/* use your own instance */\nconst myClaim = new Claim();\nconst userData2 = myClaim.prepareUserData(params);\nconsole.log(userData2);\n````\n\n\n## Licensing\n\n### Dual-License\nclaim-ts source code (\"The Software\") is licensed under **both** GNU Affero General Public License v3.0 or later **and** a proprietary license that can be arranged with me. In practical sense, this means:\n\n- If you are developing Open Source Software (OSS) based on claim-ts, chances are you will be able to use claim-ts freely under AGPL. Please double check [here](https://www.gnu.org/licenses/agpl-3.0.en.html) for OSS license compatibility with AGPL.\n- Alternatively, if you are unable to release your application as Open Source Software, you may arrange alternative licensing with me. Just send your inquiry to hi.blobaa@gmail.com to discuss this option.\n\n____\nEnjoy :)\n","readmeFilename":"README.md"}