{"_id":"@mattrglobal/jsonld-signatures-bbs","_rev":"141-8d1a75752dd728d892d040528ddb28c4","name":"@mattrglobal/jsonld-signatures-bbs","dist-tags":{"latest":"1.2.0","unstable":"1.2.1-unstable.e98078b"},"versions":{"0.0.2-unstable.555df67":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.555df67","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.555df67","maintainers":[{"name":"noworries","email":"josh.harwood@mattr.global"},{"name":"mattr-hyon","email":"hyon.shim@mattr.global"},{"name":"tcoenradi","email":"tcoenradi@gmail.com"},{"name":"jimmy.yang","email":"jimmy.yang@mattr.global"},{"name":"chiechelski","email":"chiechelski@hotmail.com"},{"name":"cyip_mattr","email":"colin.yip@mattr.global"},{"name":"wshih_mattr","email":"wayne.shih@mattr.global"},{"name":"vkhilnani-npm","email":"vasudha.khilnani@mattr.global"},{"name":"lp_mattr","email":"logan.porter@mattr.global"},{"name":"larvena","email":"larvena.dindingwe@mattr.global"},{"name":"preetpatel","email":"preet.patel@mattr.global"},{"name":"dmitry.mattr","email":"dmitry.salakhov@mattr.global"},{"name":"ltait_mattr","email":"liam.tait@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"khuang_matter","email":"ken.huang@mattr.global"},{"name":"jcollins_mattr","email":"james.collins@mattr.global"},{"name":"ptinson_mattr","email":"paul.tinson@mattr.global"},{"name":"jhill_mattr","email":"josh.hill@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"55cab014590cfac18ab722a30b7d7db27a965d60","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.555df67.tgz","fileCount":61,"integrity":"sha512-FhuJACtIpvDprh/nntFdJobjZTVQkrd0VEoY8qhPW2FmmTsPZxTUOZ8N4s50J/p90/X+n8qoKCUfB1g5f0klIg==","signatures":[{"sig":"MEQCIQD/TP3vGWeulYSC7v6LfP2p/D8LY7K66Cze87GrJ7qgMAIfYuPYfvGaXg6CXetL/AmtJGU4pJ0tfkY0FHE4RsHLiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepkh7CRA9TVsSAnZWagAAQPMQAIP7GeH6MR0+LdQIE9AD\nQkUGl0IOC/Z7d4rFqBFuiarmRdQCVsBDrcJhxPxslP97o7uXmlBsVNbPNg5q\nTULoy5ARfBBXwtLt3uHeLN7kqw9CdrbEM4zY9QT3uehQlFA9EPpBR4Sl+HWg\nitQijhWgHcpl7YeyK77j/REt6+wsGoeS2N3wQHNBAJMI3ZjI4mhi/YtxSOUh\nAfyhDMcx2SejU5lO6IJHjdn24xmrSmEWufyP8cKiz6FL/y0PAN2F4xBxxBVc\nujO5eaNAt/PlnUGjQ7BkQ8D7/qaXUJWp/X6sjnkru0dYs5cy+VEYyQ9pKh46\nZ+nVCA+okYb3RTPrSee2J3N3WUgcuvoBoIzo8V6xTCQSjnEGkOm4ZReTUqtG\nKydxFIK8XPY7R+tBiC0KUgZI4lzVhfqFClRpb3vlsuzUXW3vTlHYKNyfpvYj\n+BdRBqCnJzyOB4oRskV3PhHBKH8mcyNskUW1EzuFHxIAp2iWvZs6HHTZUM74\nyIjvWfoZoP9GwQoonQ+EnHfclPoS80Yg5OqIxUBatQboDKxyN2+cIYD5EoUM\n7GBGhnhXAcH+RjlejK8OmNjV+Mus9QYxu8hyfyt45pGZr+lU6BDY0ykCI/oy\nkeuiXx3Iu6YsGu9qeXbGNK14HjXe+vWOs6OKGkNcO/DJ8ivsaA5QVD310EOx\ntYzd\r\n=sXg6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","publish":"./scripts/publish.sh","lint:fix":"yarn lint --fix","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"tplooker","email":"tobias.looker@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","lodash":"4.17.15","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","@types/lodash":"4.14.150","eslint-plugin-node":"^11.1.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.555df67_1587955834966_0.9212341574831855","host":"s3://npm-registry-packages"}},"0.0.2-unstable.7ac271e":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.7ac271e","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.7ac271e","maintainers":[{"name":"chiechelski","email":"chiechelski@hotmail.com"},{"name":"cyip_mattr","email":"colin.yip@mattr.global"},{"name":"dmitry.mattr","email":"dmitry.salakhov@mattr.global"},{"name":"jcollins_mattr","email":"james.collins@mattr.global"},{"name":"jhill_mattr","email":"josh.hill@mattr.global"},{"name":"jimmy.yang","email":"jimmy.yang@mattr.global"},{"name":"khuang_matter","email":"ken.huang@mattr.global"},{"name":"larvena","email":"larvena.dindingwe@mattr.global"},{"name":"lp_mattr","email":"logan.porter@mattr.global"},{"name":"ltait_mattr","email":"liam.tait@mattr.global"},{"name":"mattr-hyon","email":"hyon.shim@mattr.global"},{"name":"noworries","email":"josh.harwood@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"preetpatel","email":"preet.patel@mattr.global"},{"name":"ptinson_mattr","email":"paul.tinson@mattr.global"},{"name":"tcoenradi","email":"tcoenradi@gmail.com"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"vkhilnani-npm","email":"vasudha.khilnani@mattr.global"},{"name":"wshih_mattr","email":"wayne.shih@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"e2d726bb7de6434d2d0b5c81ca2cca21d80efb09","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.7ac271e.tgz","fileCount":64,"integrity":"sha512-oyqTbrjSPMnUQLjxynfgphBnWnhq+K/UmOjXbB2l2ZUpMeEqOaz1UWZwbffKjXnm9sTVwynQsK8Pn1gUpOq5tw==","signatures":[{"sig":"MEYCIQDDryc4xWhS/qpV5HUnma9vVXFnOQ3Aap2lGokMdMJHxAIhALg3o3xFIvCcFyzLnW+ENDGz9obQ79oyPNkUseJCJTSM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepz2RCRA9TVsSAnZWagAAsAQQAI0HTPO+Y3XaluHjS6EM\nkNxT8XEPTI+NBLfJ4D0VOJ3isAPFv9O/mimIn92+fW1M4VkRzGPPAIqs0ZkZ\ns0g/2Ohb4Bx52ma8BFyipQ2pRHqI8DsRRrlbVySGs5CKr1wt984cj30K82EN\nL3bdGEGN9Xor0E/La1iXanzAW2dx3+UWbiJLSQYralY6q2H6+CptHZUf/PGH\nGtZuoKFyp9BcX7BVStqMDgCPhVVOyImR69ZF820Xio/7kXuPtj6QZMr43fMo\nmicQvKZ6XfFlGnZN9ZKDF9M19EQDv/k5eyp1X0oLyoDemcaL4fmkqj52yNQP\nSmoEtzXaL+OKJ2ZZPuJQm5QKwsXT3Qny8faM6h4GWIFYwD7iTiHs3NdVQYeL\nMZc/jvWNv0u+tULB/jog1CiG/Q6I4CwRvVTlZDO+/mGrZZ3JkBxyGKyBEUm0\nRHQgc+aiNDGT1YlX/MVZmwlMjo50Ss+8Y+K0wRGVwqYThgTCMIcLPG6aSiqR\ntos2aTQmbMcTeHaZOQDVS9ekCwSXnuazt3COeTqU3s+qx6JNaia0GOJ5SxOl\noN7lCeRxNpbbiWbKMt8cZxay+wZygQMoaAvnp87MAc3f5/rYvmEbR06SPp7I\nVhjlAYUABtE10g3JYAmLRVkhrCAmJFJY6wXEjtmL1ivgAg8B0fCKIISpzCMK\nrjmT\r\n=zpPz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# jsonld-signatures-bbs\n\nThe following repository contains the specification and a reference implementation for generating [linked data signatures](https://w3c-ccg.github.io/ld-proofs/) using the [BBS+ Signature Algorithm](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf) a zero knowledge proof can be derived from the signature, whereby the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n## Getting Started\n\nTo install\n\n```\nyarn install --frozen-lockfile\n```\n\nTo run the tests\n\n```\nyarn test\n```\n\n## Sample Credential\n\nThe following is an example of a signed JSON-LD document featuring a BBS+ linked data signature.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgo...kJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignature2020\",\n     \"signature\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\",\n     \"subjectVerificationMethod\": \"did:example13920596349402396#keys-5920692\"\n  }\n}\n```\n\nWhereby the subject is able to generate a zero knowledge proof, from the signed JSON-LD document of the form.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignatureProof2020\",\n     \"proof\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"domain\": \"did:example:relying-party\",\n     \"subjectDomainProof\": \"eigqeivIenvIEiHtiW...6ChjkeIchjs\"\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"revealedAttributes\": [ 1, 2, 3, 4, 5 ],\n     \"totalAttributes\": 10,\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\"\n  }\n}\n```\n\n## References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.7ac271e_1588018576529_0.30154654756496635","host":"s3://npm-registry-packages"}},"0.0.2-unstable.1adb7ba":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.1adb7ba","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.1adb7ba","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"1afd1df801d7118060073174255e67adcb3b4cda","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.1adb7ba.tgz","fileCount":64,"integrity":"sha512-lBBIPPYMxAZx15SkUtX1tTuEl0nn46shKSmwezbyEA2XHzdXk2v9fpwPCqdHc7RSesAZwxuXBX42DaeIRYWG4Q==","signatures":[{"sig":"MEUCIEFFoBq3+eNzMvAgGqquiwme/9kEZ184H8oYizwZlHQTAiEAw8gcVLRnfH1fn+LDABbQyhPrxq/2/PBHXo4amsQUcfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep1Q5CRA9TVsSAnZWagAAT4sQAI64sNUFT9MAMovDRlvl\nDyf0JatITQniGwKD8NNU7jo/xZPvOEyWv3lkistw4ZgJcxaCVmFTd+y6j7UA\nhDsZFRlQfc1c1o6csrfix4ArS8ATyKSk5ZSxqVwdMRU/fcthNapGcu3YkS02\n6HRhiVjeje5N/qjLAP4ZKhy66NT6sxgR5UBb/IFlGbaNjiGTusDzLBEolK2j\n3Igq1bzrkXbJnkzo+aL11l6ZAB03wMOcjVqyZKYlcxGxvE39DYOE0IccD6+e\n1aGW2vNcAdVfC7chnw0U6zKTqXsoaNQty142eUUW0KblP6glep4aHnpuCSaW\nf+5UvcP121UEzDzGd0BQKFFnNQApkNAceHaijXNEDDQFwyMLZ5qFnHsNYgCA\nfjY6QGljgaKqckqH3nucXsrPKKvEyBlZW8I35/DxO6/sp61xqFNoiYmTb7Dl\nq9ejtgIk5w5CfbG/G8Rty1khXD6hEFZeFDp2nPr+mfigo/RR3DpX3hV/LrDC\n/3ofTULHOI1n1oYsCk8iiC6trYSAHEn+mDhFZwrnIf5gn5R3uHrzErYUMOv2\n2B+XrlCnjbwWsYHTd60motpiAD+x1jLg7X3ULjsZ0sX9kMJ0AnzKyK+Uyqk3\nlJp7tIaNlatCr61PfcBYF0BXr3F2gDxHSbqzotTxqNxTxbhW4rV3fZLEsZhZ\nHLN/\r\n=ENug\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# jsonld-signatures-bbs\n\nThe following repository contains the specification and a reference implementation for generating [linked data signatures](https://w3c-ccg.github.io/ld-proofs/) using the [BBS+ Signature Algorithm](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf) a zero knowledge proof can be derived from the signature, whereby the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n## Getting Started\n\nTo install\n\n```\nyarn install --frozen-lockfile\n```\n\nTo run the tests\n\n```\nyarn test\n```\n\n## Sample Credential\n\nThe following is an example of a signed JSON-LD document featuring a BBS+ linked data signature.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgo...kJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignature2020\",\n     \"signature\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\",\n     \"subjectVerificationMethod\": \"did:example13920596349402396#keys-5920692\"\n  }\n}\n```\n\nWhereby the subject is able to generate a zero knowledge proof, from the signed JSON-LD document of the form.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignatureProof2020\",\n     \"proof\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"domain\": \"did:example:relying-party\",\n     \"subjectDomainProof\": \"eigqeivIenvIEiHtiW...6ChjkeIchjs\"\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"revealedAttributes\": [ 1, 2, 3, 4, 5 ],\n     \"totalAttributes\": 10,\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\"\n  }\n}\n```\n\n## References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.1adb7ba_1588024376505_0.3090343110873024","host":"s3://npm-registry-packages"}},"0.0.2-unstable.2d7db62":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.2d7db62","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.2d7db62","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"6246819a680a4a62227447d956e44eb939b32ab0","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.2d7db62.tgz","fileCount":64,"integrity":"sha512-dw18Iki0M/ZpbEW7eleoe6DPMvNLHgVc5RNr/j777Ic1ngvu3gpXl0XLlkSHpG9eecEHe49ujscWyb1FDbq0jQ==","signatures":[{"sig":"MEUCIQDUJfAMJ+15/a1P7JR5cPhxUXwlfvCV0ELRTi2FpdYPtQIgANccyMH6osRFIOspreH2pCsphDb5WjlLP+0HI16bsCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep2F3CRA9TVsSAnZWagAA5AoP/32oOqNBhipaPwjqx8ML\nMCZNNgpvyrp2RosqSHKaBHpNp1BPsqGVRunssh5xebswyLTnW4FLiGYjfuII\nH8OnOL70Q+LWGLuSAX7fC9St5yXYICP4wDzmu2PQi97epKpF3BWgUAK0q5pe\nhnIo17PcgLc7uSckys4fIUqkVG09tBu9/OOiBaP67j1C3dUaQlkMyzGeYqyG\nt6TrtkLCZIDuvtJ7qWJ/dtHHg1bM6P+N/edN/AVsaY3A7JtOzQw7iezSV76A\n1Uct6fhFXGH6lu1QzekjawqQrkRf1LYtg5NA+x1kHpcaKuG3YI0jPY4EoZHT\n7TWXHAWyEZNHTxJDGdOovOaKwol6OrzhiKPawcS9O8AW1yiHyoBjoyJ7A9q1\nGpap+tXS6VsJSpKVLLRQ5vMVYZ4cUpt2y491vWtpISTVru846tUIgKLWx2sr\nu8hCU1oUXEOpjoXhcLcVzFr3QlirSuzhyjMfRff/uIiFkRjIXuyJaIIPGpA6\nccnpUbmD5y6+0N8O+WkzncGkDJs8U7i8pLbM4H35d7RzQuMMMEOLWRLYEeyq\n3PoO4muQqXdwYx31/Il+KJ2qMcp/vyQlihMeTr8U/uIzHekE8a8j6zw38Q0k\n4iTfDdmlrXzde8e0fv9RKW8TLmJ2Qzbqci6W0wskBvcOP4PjI0oYkJlGU2lo\nT+pK\r\n=2LLv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# jsonld-signatures-bbs\n\nThe following repository contains the specification and a reference implementation for generating [linked data signatures](https://w3c-ccg.github.io/ld-proofs/) using the [BBS+ Signature Algorithm](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf) a zero knowledge proof can be derived from the signature, whereby the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n## Getting Started\n\nTo install\n\n```\nyarn install --frozen-lockfile\n```\n\nTo run the tests\n\n```\nyarn test\n```\n\n## Sample Credential\n\nThe following is an example of a signed JSON-LD document featuring a BBS+ linked data signature.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgo...kJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignature2020\",\n     \"signature\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\",\n     \"subjectVerificationMethod\": \"did:example13920596349402396#keys-5920692\"\n  }\n}\n```\n\nWhereby the subject is able to generate a zero knowledge proof, from the signed JSON-LD document of the form.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignatureProof2020\",\n     \"proof\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"domain\": \"did:example:relying-party\",\n     \"subjectDomainProof\": \"eigqeivIenvIEiHtiW...6ChjkeIchjs\"\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"revealedAttributes\": [ 1, 2, 3, 4, 5 ],\n     \"totalAttributes\": 10,\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\"\n  }\n}\n```\n\n## References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.2d7db62_1588027767083_0.7685355750143921","host":"s3://npm-registry-packages"}},"0.0.2-unstable.6fa5990":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.6fa5990","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.6fa5990","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"594b82d42716e43d3581e3f7a0b956a4420740d1","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.6fa5990.tgz","fileCount":64,"integrity":"sha512-gkV9CTevqXsRnH2SuELCUl5VuWWu/oCRyZQmwnlsRTdcEwn35nZKh43vUFgqF+1Bp2JX2ss7S9hrJ8KWWaCx5Q==","signatures":[{"sig":"MEQCIB1xivgis7ZoYbjX6BTP07n7H7MLHVD51OR1yd0NIpP9AiBEs/a/i2h3hArT84tRVn4qZ6Dql6ynCvpPLChXaYrB8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep2WWCRA9TVsSAnZWagAAe7kP/0zJij925rU6D4VeasWb\nJO8iLn1N6zkfXh8/ya/j529U3bPIWezPDf7LYgnrDy67z/Fcyz/SOYZCcupr\nh9Hv55jgYKwiY2mnEsXc9mWSmLBYWwRNknxuiTtBbkWtqZcddhKOc8oTOJOf\nG+tdsKcx0UVoASBmzlbs1w/zAsNnVrylMQCtV53jIf/WAGrqEXYI4u9jQGtl\nzD9zNYdKQ5rPtgpzhRP9vh6PGeKaPznTHp2voPuFC3a1MRaax8skhY7/0oX2\nWMl+4vduOttiViBrhxS4BOlAUfnaZye6claxw7SCMAOSbEG5BFsGYY9NUo1c\nJY7H0HmayRYtWSenQ7KyYfO+2wtOvM+LHZ0VqRZ/LIK3QtE4l234iOyWeTD6\nzZWtAYEllidCrwsjJEZ6869cm4kNA+ZV9ozwJVRTtrUZl1ScfQkb9Se8SYGc\nlT/o3WPxvgECqBQYXFjigpBkbhnQg83eXXl0+ue+7L3GczUjkdzQsr6Ue2vd\n44vcrnkGIEGygAI5e2KXM8YuZdzLaUxgbnwvh7ld/XqvWiwgu7IteaiknwEw\ngHdyqbPGV2qdF59o5hR2cCBoZGZTTYAf3JLit9hIQhjD5sXFFwdiaTP1/WFS\nkSS49gpc+yhkYxdd4+CSWQ2i91Op60GRmbPz1t3bfPS6Pg5LSroFGDM7u1XQ\nvHh0\r\n=9elH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# jsonld-signatures-bbs\n\nThe following repository contains the specification and a reference implementation for generating [linked data signatures](https://w3c-ccg.github.io/ld-proofs/) using the [BBS+ Signature Algorithm](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf) a zero knowledge proof can be derived from the signature, whereby the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n## Getting Started\n\nTo install\n\n```\nyarn install --frozen-lockfile\n```\n\nTo run the tests\n\n```\nyarn test\n```\n\n## Sample Credential\n\nThe following is an example of a signed JSON-LD document featuring a BBS+ linked data signature.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgo...kJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignature2020\",\n     \"signature\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\",\n     \"subjectVerificationMethod\": \"did:example13920596349402396#keys-5920692\"\n  }\n}\n```\n\nWhereby the subject is able to generate a zero knowledge proof, from the signed JSON-LD document of the form.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignatureProof2020\",\n     \"proof\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"domain\": \"did:example:relying-party\",\n     \"subjectDomainProof\": \"eigqeivIenvIEiHtiW...6ChjkeIchjs\"\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"revealedAttributes\": [ 1, 2, 3, 4, 5 ],\n     \"totalAttributes\": 10,\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\"\n  }\n}\n```\n\n## References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.6fa5990_1588028821867_0.9094125308083143","host":"s3://npm-registry-packages"}},"0.0.2-unstable.1cb3266":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.0.2-unstable.1cb3266","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.0.2-unstable.1cb3266","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"77b3c5534cc1e7f70cc676e0e4485277470e3f2f","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.0.2-unstable.1cb3266.tgz","fileCount":64,"integrity":"sha512-3yxP59tVe316S2mCD6/uLpCoDIWLp4rQ+GdtdWLSLwfaScSgOplq2FH3HSI7D7KEkUilpBcgbY2pMlBrKDjmiA==","signatures":[{"sig":"MEQCIGEAqWyIwW7u1uq7Ajw8XfToOG+hSMCZWlybxR2F5Qt7AiAH5IUUrJIl0mcb5KxRuzW3LB45VtaVhrfkKO+K31I8Cg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep29cCRA9TVsSAnZWagAAkV4P/0M9ejYg5kLyvAkCH4JF\nuq1lPqP/9dsbsT54zVG7ff47/6oZhqKqtOvK17OO7c16G0+tLh3fBIcpncpB\nRrbUcE7jOhwLy0aZQ+TyMdElN3ETviSHp2vtMxBvRU+jWjDOllkSQJ90aQUs\nrM3B4uNLGORiB1s23cZ6IHYdkQIiVflraF0GU4jR0TGRE38WCOOUDQS2222g\nfT73gMCaHINuIOUzWujAV8I+xMju7ptfjrpXCBB/0Dd84e0+IqifQuICYCF3\nJdhaIiySFBWDgxrOW8YPYtz1bBI7U+w7edPY91gr6k2z6LyDtgo8tRP78ryT\nmYSEJ92+M3Y28o/LzVqII/dZL0/GT0fEpfTGNVa93K0azUY+V5ZRf0h381Vw\nSxOxaiBM7f2hVjhDZXkC8Nj6EXtEbQSzvHK1ALVc6prbGHpUOjhpntrDysxy\nTuDp4M9H62CqzGZyfEm+mp3I+ReW32+udhoiczIkK+ArnY7qBW9wsB47oc0g\n/VG5L3h8675nWAzi20UFgVVGRoN/B/BtlHGV9+HzEygVdKb17+b9au1S+27i\nT3ucAKM0liXRnfwOWNHonO1rDBUU8XR3w/YbtEVC3SwgYWuKCWqu9+nqfhjE\nJl02WN8PdCgU6HcR5zbqxRTbcT2EOgQUpkpUUowNAM+zUbMuO9X/nfxJcEgR\nKQKZ\r\n=5hN2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# jsonld-signatures-bbs\n\nThe following repository contains the specification and a reference implementation for generating [linked data signatures](https://w3c-ccg.github.io/ld-proofs/) using the [BBS+ Signature Algorithm](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf) a zero knowledge proof can be derived from the signature, whereby the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n## Getting Started\n\nTo install\n\n```\nyarn install --frozen-lockfile\n```\n\nTo run the tests\n\n```\nyarn test\n```\n\n## Sample Credential\n\nThe following is an example of a signed JSON-LD document featuring a BBS+ linked data signature.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgo...kJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignature2020\",\n     \"signature\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\",\n     \"subjectVerificationMethod\": \"did:example13920596349402396#keys-5920692\"\n  }\n}\n```\n\nWhereby the subject is able to generate a zero knowledge proof, from the signed JSON-LD document of the form.\n\n```\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:28394728934792387\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n     \"type\": \"BBSSignatureProof2020\",\n     \"proof\": \"eyJhbGciOiJFZERTQSIsI...wRG2fNmAx60Vi4Ag\",\n     \"domain\": \"did:example:relying-party\",\n     \"subjectDomainProof\": \"eigqeivIenvIEiHtiW...6ChjkeIchjs\"\n     \"requiredRevealStatements\": [ 1, 2, 3, 4, 10],\n     \"revealedAttributes\": [ 1, 2, 3, 4, 5 ],\n     \"totalAttributes\": 10,\n     \"proofPurpose\": \"assertionMethod\",\n     \"verificationMethod\": \"did:example:28394728934792387#keys-7f83he7s8\"\n  }\n}\n```\n\n## References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.0.2-unstable.1cb3266_1588031324101_0.7663147173107769","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.1.0","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.1.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"22d8e970a39641aedff6377e6057b129573ef5d3","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.1.0.tgz","fileCount":64,"integrity":"sha512-jovwDzXXy4vQho4iExfzd9er0jd9q2I53QV67pCwxVTc5y3Itdc02QKnaI+EUA0zuepqWSpYyRdxirA1glRwjA==","signatures":[{"sig":"MEYCIQDBVbdPUOKguq8oCESd9oKwqfsQEGzaYOQbk4JvNIqAfAIhAMN/8aYHMTPyfdJwqXVl6KMaqRO9T2mprJTBW4YO9mxx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep3IDCRA9TVsSAnZWagAAufoP/Rmq2akA7vj8uJfHmOKa\nUee03vj/8qniLVU3SG8XqcCH7o6jPM+dGaJ/sRnXgJhUPU4RvAHDYXzdZuB+\nFbXASKEEl8zhjnbQW0I2R2c6T872WzQ+A6jZ+wnyuNoX4McOhjqchIPg3o8t\nWstHHZBS3HzOXiaxPIXlPcCfKLAsrQ1wXBjsbWAaPtq9eu/FGhJojL+TbjZh\n6+/QYw4ylmJyHiO4V655B/S4zDr8zKZYGPLWf8NsT/MfGYKO1NuesQSEOMiJ\nXfIiIBP5EpsBCgNcXopjNcA8h3EvCWoeDhJ7KFOFmHZJ1g7QznOtXHUnG0UG\na1IZxlSyz/BJ+byKHYJpDG/6ga76BzdHMupLb8QhaNHofyBJ71mj9hcC5CML\nTCCMt9eyD64JLGXD4MlD8eHzilc5wE/PrxJdZfs6KZnPo366VKCSjHRv9FqN\nUobJdXJXmYBiYj7gt7xKbJBKk80UFSaUY/2/W7qY9HVoJEsnTDLlKurFU/ER\n2bB5q69bOlIbkur9wsIFZ6geAUjwW3WI+V/RHRCUgPJGwWFUWceDljIkK2bo\nD9/pwINIn3a5zRm5pxve9KdiVEl/e1mr60KEl7irbgEjSQFpPJ05J2Fn4rso\n90DZ/rD6Lrd4jV8VHMWSDZRu418yojEAihFPIOWYujeaOxHw2DTiwT//KoyN\neLtu\r\n=BSwM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.1.0_1588032002649_0.32651090334005417","host":"s3://npm-registry-packages"}},"0.1.1-unstable.e98dbcb":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.1.1-unstable.e98dbcb","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.1.1-unstable.e98dbcb","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"c58d079d4715dfd16f5435f1f415829c7cd5bb05","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.1.1-unstable.e98dbcb.tgz","fileCount":64,"integrity":"sha512-DoxbEZuFy4aI0wEayu1Uo/0AwQZu8/ffU3wPc5pu/7Dj1rYtUzaFsTlUgQvW9JoFOscxnFBtqYCbScFDYu4N7Q==","signatures":[{"sig":"MEUCIFfFZzKFWDi1829ETMjZLQ6NE3nFBpVhZpfJFj2OLoMDAiEAkKsYhekq5CsZ4+0hcSK34C6ntjz8cnxZnPXz0Cnolx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep6E3CRA9TVsSAnZWagAA4F8QAJkFXNnTxpBCqvA5Uq46\nMxBSN6ABRwbh/2yOSLYsuCCNhb5eerKBCllKTsql/zZvRHGtCmykgDXldBuQ\nlyIokAXVy5nHf91VUDpABr55pw1mUNwibYqGrwGd6i7dYXFicJyM/rM2Ubb7\nQ0hWzpKwwDTl0d7LNDKLQbLSiipIIhUiwAdv2bU1wRdwAU1lMVWKbeJKfMy3\nA+th3kQAyyjobGQ3M2np6GQPnYcv97VTRYrfUAiHRblwjmPAP+BgijnL2CGd\nilUjExNpD+lnIbE17T2ij4x39eAnCS9OleQaILkgxj7Iabm7xPm97JtdJZeL\nExdCTdBNs0JsrsAZZBhfepGqo/ZIxAs07hfSiBmQYh4VhiaKie3J8elFpsmq\nSTzZoSCccVJQwnSZnlo9DpbjPaBBKYppkoe4U9RlmT2LHYE/aQVrOBTyiCgo\nRDLkQbj/DX0uQHir6hoxrgedfLgW+A263PFF4U3DYKdl8AHkTr3YZR/I+F0+\nho/63Xa0yQLu6gZwKS9jG2I2nYXAoPR20pp2Oa6ONutTlImszjyTtD1EqJdi\nRNA7XhpQAbWtZKUoS7wEJmTSSRQjnjaaulYB3j4AYEw4Jl6FZp5SeMF0sBKK\np5kbkkI7/9l1uZu6Qg0+N1VVtkdRWT9DSRFpdZAmYJB0n3kn0FUqn1ncq+rs\nugPo\r\n=DRHr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains an [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.0.2-unstable.006c5e9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.1.1-unstable.e98dbcb_1588044087517_0.27998662416527287","host":"s3://npm-registry-packages"}},"0.1.1-unstable.402a4a7":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.1.1-unstable.402a4a7","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.1.1-unstable.402a4a7","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"6579a2ca6cff02dde5573f1b7e27be9f9d2c800d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.1.1-unstable.402a4a7.tgz","fileCount":64,"integrity":"sha512-L9pdZn85JYbMW3OSV/TXW65iSgWs/zj9rnM54kJi+1B0/LSfhLqGXGJl95vIHj/IHGiJETINaU0oT1WwgVozRQ==","signatures":[{"sig":"MEYCIQCWW1o0yc6jMbQRnhvThxyc66CNdD4LFoBjRdoT9IgDBwIhAMnm01LKFq00TAHwk2zNi/Pk+B6FHS6Zrx6Ivj6PqP/V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep82mCRA9TVsSAnZWagAAjw0P/0YC9GRCtrv8WjoUl9R7\nQ3f2G5cRyPhNURS6V3gO/QDPwRfofW12UxHw13xljDdWF/JUoc/TYaNn41j3\nPkbnQ6MUeikM5X+GrIrDRRFVFWOonSzTpvHMpyOam6TQxoLLu/yxMwyZ9JgB\nhZ63xEZFAPjSHjiNOdEY81E6qon1SHvWmhGen9DP64Z9nEkCa7AeJT4AOK3a\nmaQsgC+A5Dlzii4O4hsBUrjNyIAFF82cXnBNL/XXepuHL/4qO0lF4be5RxxC\nl3p+sr8U9rOxhKr0a0WXUA/dsSQxHZatHXkoHOEr2D/ii/cXE5+MGp/Q4RNR\nboX5goyffbesToUtzvOwVqhRRf1h1gFt88x/MTKEtuIzek+eGPd17NE/7W81\n5E4LWaV+w+UzRBF7MCFuBUsYdkDtBqMBv6MULmphYcC8BJraru3HWKAnH2Zj\nVv82zMjNkbGQp4n788Y4rUiDSdXGO9VT7kVpwR/zRrUitYYg3rgFg1o8VQtl\nJBRe3I3nGJWqNmcIrL1ayVeMuqjQ/NLJUgxhzRx2jarD3E3e38qMNFWYEFsA\nhRzNyU8kadX2VFVyz56OAkPhCNcdUECqRXfdWv/6NjepoKg64OrAxgXIvmHI\nhfar2CmEKutgijcLa/gwIuJDq2qO6GWUTfs10/0Pyp6iigWeXA+Marep+HVe\n9j3O\r\n=f555\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.1.1-unstable.402a4a7_1588055462055_0.41084740427890765","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.0","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"9b4d746758b706f835b904014fdf76d340eb8eaa","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.0.tgz","fileCount":64,"integrity":"sha512-MLPBvvZVMA/N7rlVgFgJmfF7W6+sVGqaMXj9vKBM4uoqPM6RNj26v2LQQHiwxEN7rnrM7QD//DkR8bh0GaznSA==","signatures":[{"sig":"MEQCIEKJQrqBMHAQu7XIupPPRTlJ6prLGhQCwEMoy1OnBe3wAiAYxg1hp0Bt0kZCVFu+KtGSutxXNRW0tOXe1M4vhVS3fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep9D0CRA9TVsSAnZWagAAsPgQAJXrfW+PKlT24gbynrvy\ngVVHSi6oTuXMAgYj7FYNTmO4V42pATN4W3LQlPqLXgOk0lgcPwfp3vmxOkaQ\nRFqQ83kJpiztFboNyXOEnn8DcLHBFrWOUIhB4XqroAOKzRExHq6TAukDvacR\nkU0zz5MLP2BruMjeHavV8ZzfkMnhJRifgIY32n3qmPK/XmeizVMytkL7pkdR\ny1wBGYrKeQf+iYpigrn+R9b+oTU6t4TJ9TAuMk5OjWTpxnSJkiA0yf7crx3+\nM9FBaBLnRP5VB92+C7SQQD8zSbdvz+hKEYWyaeuBcocfv8Unygpdq8v/+T7S\ntpS4sDm5Unwbj9DJvDPXVabGxtiX5Ur3e2NhQnt1PEB/U6x+k/kELv1KnQq0\nmFj1pIT8bJG+iGFIMBV9govpXkDO8u8JaVLSkp7UrPz83WzT2FStZYS8JY7o\nOKC2wx7pjW905Rsg3dYsfdKfJxXlfMhPPMl+ehrgToc8D4T99Hq2LCE/YM67\nEVxxYzsP+V9u8DwHANWO18DSSbRMbgnLUhDM/XrNk3WZgwdgACFfAdLSMap9\na4pK7RnBP7LMN6215YPLS4zk2fuDAv/fSKygA6GD7zvHHvriVISbqbhqME3B\n7hVOivTO/FIp+jOuhEjO4vxT/ewsIwYNrOlHw55SA7dJSm0E0TD6umIi7LAX\n1uM7\r\n=JGy7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.0_1588056307769_0.956561370282673","host":"s3://npm-registry-packages"}},"0.2.1-unstable.0f2a8dd":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.1-unstable.0f2a8dd","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.1-unstable.0f2a8dd","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"4ef9b7eb44128cf781b7ec0b4f70b9dbbf5e4e8c","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.1-unstable.0f2a8dd.tgz","fileCount":64,"integrity":"sha512-kqMERdG+6vvPNrbxmN73li4dbOE9lKmQkMTMpQSFo7+9pQkEoHRQ3PQyI3gsJqi12u7Wm3dXOuubn1g0JSjp7A==","signatures":[{"sig":"MEYCIQDnshdeP7pbqgG5Hm01u7j1whxmSXB0ddOl3WtHkoFXdAIhALPl5pf82dvkAWVT8AYhSJAYU/PwjYQNNDy/waXrFGBO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJep/JbCRA9TVsSAnZWagAAb2YQAJaLRjk2bbFh1e3eiIw4\nn5ysESkOJ4OyDngHZ257xXv9z1CYP/Bt0U9idAzyuPUmGhrydmKd33+4gwAn\n9OBu++VbqQuZfEo4LW8SI+O4aP9fx2DD3Ucr8q2vpTs7BxwHwBIH+jw+H87I\nFCXkBh5J8QzZTVDckgcKlnmaOmfONPEMOCvtLkMLQdwEj7LFV8iN9XV4BQbN\nhf7Fzqv/sRcbY6EySEGUvZpfQkGA+TZfRdHAgaufCaARC+3hPSz2yzIwWBui\nLmByULeB7+L1vzpmE2t7+Part48d+I8hS1VVzJAEvCUbQ6iWxzROaKXBKK6U\nxqexEtIeT1aQBnGRHrlXy+H2kUZy6D2q68nSd5nwnd4sozL3odTcF18CJG16\nKOZp7Tl+UfO3qpLdpbeJ70zqNES4yXOeWJ9w8HGxYDUPfUpUFSLoEJUgfr6e\nJxnPzP57Kcm16kif1wj/Ldug6yceGywNqeXw2n39lFqCdukXI94ju33utouG\nnvKTIdfAkUUBvh59hE3cL7xOa17ij8GDl+UcfHH6QPoCpZhB80JRsZYuTiQ6\npbQ9hKPhXBi7a4MXMLuViLxd2TDdTnWaywbaxxwn/5OUkcIbKr1Ewj6cskHv\nGkIJ5n0MbrQh9IyQN8Q6MSfAvhYaT8UJCfTv2EkdN1aKJGvshQvTwRWS20On\naXxk\r\n=B4GC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.1-unstable.0f2a8dd_1588064859245_0.3009277281119671","host":"s3://npm-registry-packages"}},"0.2.1-unstable.ce5cb3e":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.1-unstable.ce5cb3e","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.1-unstable.ce5cb3e","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"e15438ca4c027b2b2715f80cc85336ea40d827b1","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.1-unstable.ce5cb3e.tgz","fileCount":64,"integrity":"sha512-bhHBgV3KTa90vXchCRBmBzOAgIfivBtAJoDS6/l/X0/H0CRfuPF9hSf1+nvtyr8a6ksczzdRnDOT9joURz1+yg==","signatures":[{"sig":"MEUCIQDh1Iuj4OyDhleYozLK0eKtnJ44HC0opYDboL2+kl0fdQIgAOG0wlyDAIWqxE0NSgvnGhyImYafC0glznOJ6Mp8IfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqkMJCRA9TVsSAnZWagAAHWoP/1tdkZIHjye47BBYM7rd\nTT90LI9Pge2genp6Z89w8CnafI4R81keirEHO/L7b8T8r3wc0sO9Jf72mLKX\ny0fRAgAIIqsbWzd2PNDYvlfDkFf42SKmhax8C0T2ek2axlTmsiWfAzfKFqds\nsRgGnR66PuYWqHvjH30dXmoPqFh3pshlD1ipEgV+tDu6Ejq+WCC1ixX6U2Ne\nvzpNJEfGQeGKY1G204ADP96yIEZAIXZzKuFMZGf1lr42Ktv0TxAeIJpWWlCR\nfCkNvGVJoEAYghGufY0vhiqi6EST6pKFzkt3TP8mzIzVwghmWaGxZMZe5OEO\nPUk6RwhoNmdkiZPDxSIJ5gL+kBlHI5JnjPy0PtsyeNgim2bIKD5AHdZpG2x/\nqcSriJPtChNRnAxxMt4JlAU/U/oFmda2iaGwdanDkA+95I/us+UCeV9rE1WQ\n/4CQ71sPfxOHcPugebz+dzZA36rfg2QDYBtrEKdoLY0laxG5sDTk+ETcIAiT\ngd+6gz/VLYhwPdzkAK8bmI6jECKYrsjYw3jfi7hflCYmcyCOGQCXTUpyLs9U\ncCXk9OHvdc5cKuSg4qhijSn/xPkTJoo5zjNvsJXXYZNWn7jmi2BFEMnMc8ys\n9XKUIfTAvfUJWzHzw+s1OkZSj75BFe8YK93cWyUt9ft8s5xqxFBwAgmYN2P+\njspw\r\n=r1wy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.1-unstable.ce5cb3e_1588216584665_0.3736010193900181","host":"s3://npm-registry-packages"}},"0.2.1-unstable.a1024f7":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.1-unstable.a1024f7","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.1-unstable.a1024f7","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"a07ffd5d46857a21aa0da80840c04fcfb21149f4","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.1-unstable.a1024f7.tgz","fileCount":67,"integrity":"sha512-bCka9PSuBIYQaPMmtASm8zTRnkf/tqi5ZPOGlgtOeymuxYKILbpwMm6wUXWj9uoTMDqNyVeTvRfh8/h4hLHVRQ==","signatures":[{"sig":"MEUCIHpByXH/wFP0fDgrME6FPDxu+aOwrOOJULmPyN46WCJiAiEAm8wHQK9b/uB8D/LdZGQ3g0aTUqc2z8gbo2mo46uudko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqlmWCRA9TVsSAnZWagAA4oMQAILHY9zPYbq7JHrxYIy7\nPbqagRL/dytUkTYbsGUwH7vVsbhRemRH2vzRsyq3wknqf7FMv6rvXu6z5uIL\nGLjT/6NHR0RH8K0PG7W5I/hGPWTVQziPS/Xi3sxj4CSwzslqzkjawffF+Z/P\nG8TpkTXDOk8H5yQ9y9t6YMgxCsP4fUTHLtsbNsLPJlsY+HrndSoDAlZXkEp5\nl1WBOH6eVj9o+hYNObGlPZdnDhkHsLoALNV60C5a3iCsxdlb8vfRgNZBoKDq\nC36fkgkwe+qhrfUoZ/HuvojiVGC5k/dOX9jGv6LOndGFSFm9E3s/fS3TobZH\n2Y3KfLUn/QoBjXgQQhvleGxHZX0mVbqthjrx81WNoAPGAn/un4M/gRq4rwJV\nNza71N5S33d+23Ts3mmsLwJTlqAQY8WJM1fH1DZZ4f1U1P9Bmx9+QG0tuPVV\n21QPKTXnyf6kgSHPjQ/wAuYnOOqylIGIUkq7ZIttpu3uKjQN1g+D1769vNQu\njUeCkhY6RKo3PqiU+n9Rs8s3sUvdi6SjLexotNiRVlJYmfA4O3/F5vwmk9QL\n1HIgRNaAdqMukpztlUdvBrOwR9LbnDYZDFb91EW6bXhkMBe9TnCobfn7Yh+M\nQ0xCsZ/kJXpufKkcepscyyxWCTOem7Mi/CZVDsHwwKyWS0bj/+Jw1XKhXSLE\n4n1L\r\n=AP1f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.1-unstable.a1024f7_1588222358155_0.7292636210159062","host":"s3://npm-registry-packages"}},"0.2.1-unstable.36aa387":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.1-unstable.36aa387","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.1-unstable.36aa387","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"e620a35970f6d09b382e7684ed03b137877a0f2a","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.1-unstable.36aa387.tgz","fileCount":67,"integrity":"sha512-sKrKRWJamlaE/NPUNw6evz/HPh+lhh1o2H9svm7Qch6WtMhRBL5BfPBnFxss6ny+g6ONYL2ecD3P9ctCtPROkQ==","signatures":[{"sig":"MEUCIQCq38YyawsVEkoe2PIk7S9m/LrSM7s+5LWVAZT6JtgzxAIgTgJd91SMXwn4MLckITeHfttcTO0rc3aacG7jiB96I+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqlsfCRA9TVsSAnZWagAAES0QAJrciaYX4Onhu3BVH/fT\nCTxX95p3XvMl24KDEUdlaJ8t6zdb4LfC0QxggIGuqm9X2p0bd0eXFoI4r1hf\nZl7N/sL4fh5v/AWpW1Af1Xde5lVRqAXtG00SKVVoiaQwtoHeZ1LtGyKm1rsP\nAj6MXDZ8ZKC776RgM4wcR73SVVBlneFrH09XTd4PjEseZWzCcr6Ht0FWHOe0\nebu9hViADKeMlacxWAP0ebOK/x2IwXf74HX8sE9oo3LNMmjNS/hWmnNRAGPu\nE2HG6a007+VDgtk3l9LQlTy4sNFeXYh922nIDVY5bx15uL3Ukf4Y7R+L2aLU\nC99wbtBgL9ziRDCLXPDWJv/W4X0xNe3bG5kk4rzp1P9d+DqX8CU9vBlgs1oR\nSXbjG48eiPOzSvWzHq9rKxhAS1W1YBFTN2ZgRz2q7j2Dz7oWXO2UMh2Es2Tg\nCyCSO95fHTYdsoj5LbQiucOvTBoQnL6zkJiGJfds6DvSUM1tt+Yh4BsciEDm\ns9NCU6uw12wtYKWIk7srwN4K+yMFLk7cn3vPMk5Pw4+vwvR7vqB1CgCkW4Ft\ney8/yXmjtivqEZZzD3aRFmZ8NoCcVxkaFEVApOldcAOHyBsllULuEkbV+ZQS\nkMyB1VEzVAJ1v5K0i5xIK3i6+rLN1Llzp4TlE/JFLBpmoaKytj1JH5BWFXG6\njv1d\r\n=rqgo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"PermanentResidentCard\"\n  ],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"PermanentResident\",\n      \"Person\"\n    ],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n  \n{\n    \"@context\": [\n      \"https://www.w3.org/2018/credentials/v1\",\n      \"https://w3id.org/citizenship/v1\"\n    ],\n    \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n    \"credentialSubject\": {\n      \"type\": [\"PermanentResident\", \"Person\"],\n      \"@explicit\": true,\n      \"givenName\": {},\n      \"familyName\": {},\n      \"gender\": {}\n    }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\n    \"PermanentResidentCard\",\n    \"VerifiableCredential\"\n  ],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\n      \"Person\",\n      \"PermanentResident\"\n    ],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [ 0, 1, 2, 4, 5, 6, 8, 9, 15, 16, 17, 18, 19, 20, 21, 22, 23 ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.1-unstable.36aa387_1588222751227_0.3424132380921938","host":"s3://npm-registry-packages"}},"0.2.1-unstable.0250c15":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.2.1-unstable.0250c15","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.2.1-unstable.0250c15","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"4672e4ca84d1ce9d5f3ffaffb471ce904cc018d2","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.2.1-unstable.0250c15.tgz","fileCount":67,"integrity":"sha512-NZ4cnWIpqskC6XToFJYVFCRb8vkUZYE/t3j2esA14BlRyy2UNA0bnV88It4AIpYzEAM5oLEi9Vm2I0A/Z6THoQ==","signatures":[{"sig":"MEQCIAvRp2obx9jtLgbPvyNJoNQWfq8FyxEuJJMyDDsRbe8CAiBvbVuDWE2Jxubf4/KNV0KoiKgcm588TjJrc7QiXFQcgg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeql05CRA9TVsSAnZWagAA3YMP/jtp7z49dfc6sAbq3cKo\n1qMunj7GuROchZ/oxrv39l/N9G806our9YAshENSEqdx3Ic9rdT7+JwX0qzj\nJGRWvwn318vNLQOav7PdV/vZnQDyTLqcvZtDDOxjBeq2ONqvG14KHGTjpUPh\n2uEk8bXPJXQb56fZL0lshq1YRs15G8+uXT1oBRbgSvHQbkmZJZDv1826SHGw\nFEoAgKkFNzYJNZrgQGDXdAYu43f/ss7Pj6wvnEoXhIN82sppsUjWzFaEX1x1\nkxVnGqol1L/+pfizRHbJL6oyCAU6B6PiC5s+IOQOr6nXBPCRJkqvnacx6u4q\nPZr0WsEKCFTrBKbbbMe6jFhu5ykdvLJ13cWZ+dVCcbjeh1vPSau9/ZGqaSvE\nzFtfyt5FuQsS6HfYB1B+CeTZjKGQ3zjsfx5I/Y2mbNxujXMeB1smTy/vbjjX\n2KHX1eJeQtZ+PEvMejn9eTUFMFF043ykRkF696NEMYWmwiO1mh1qCBGIhemf\n2oRMiIR+IzGZdGcS9ZUKPnJfUQR1iLLHsr2xczUvIMJr0GB/11M3iuPbCZUf\nQWqL0l+Rc84IRXUXyJdR2uMYuudPptFvFK6b0aqPIF6tqvaG/SlwmmOBsyEV\ncjpIqcboT75s5NLBbIKmxRobpr8H1jO0aYzumDmpoQj/apOw9iuKTSPumO0i\nI34D\r\n=wkDu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.2.1-unstable.0250c15_1588223289056_0.4811052079316305","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.3.0","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.3.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"ceff1c9d82644250bac8e47524b80e6697050578","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.3.0.tgz","fileCount":67,"integrity":"sha512-QS+ff2uZZNAZiO5dTL4c6gweuzaxWfFrq+XRWPv99rjTk5y//Sxl7XzYgIdV95T86Yj0izXBUf/UAAIJpTf2zA==","signatures":[{"sig":"MEUCIQC12COCunFi7dxqa6b5Voau+/j8kpCkBnj+it1ukscjgwIgeRdgGtsGu4cgU3tmSRGcEVcmrgSwDmLw9TIzET1EWaQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeql5oCRA9TVsSAnZWagAAyRMP/2zjDQuQJW9K7YVvJmkB\ns1NMGqiLOVoQHmiLAa9O4t5BDLmuQAjPtOK0nMWxg0x9VRXeY6lkcrDxRUM8\nTScgQTWX+Dp9vB8M50kJSU5/xsuplAves9QAov8OR2XSk4Irn4Xbq9W74UQd\nMaQboVG20nOrqoTqcPe5FtVPki4nPsRhRL9UvdwD61T8ZsbVewJSkNmoC82s\nyvplvakNRxAO+23z5Zehc+9TNJ9P/J7bpk4T5pXilrIFCWrQoQFLN2X0/oSR\nrIAvVJpEHhEflekmFV5k5eFw/IC2RN6QQQ3ryQT+VDzAubIoQDe3APOLXpG8\nWZF7WritjYcCczB/z7ZBHnFVQzkv33ewHD9QjUGc3IgF/ei7GUSRmpLcL+e0\nDYNh6vRe7JS1iwKiDZWVqPFqsi2qjN2/QCKMQcepMoq8ZhKWPZZr6pkrA0wm\nQJUReQTOJSGHI+i2IDcXlUGq+vFN4qb9g9VbSmx1IKvrvUee0R+T11JJDwPd\nGjutAWcqtTqpAtds4n4A+Hyu2hkZMJRb6Wvfhpx4e0mjkQiJSKkRguiZR1QL\n+n4mYCEN4WFlYxLgzFiKOq2Kl+Twm4/tV5OEHf1Op5RIY47UmrvqGPFp/NC3\nhxnMtf1b4v4M9Z7pK7p6t8wwH3BHyBSx+VryZXfrcHK7/PELnhefOgwzijVq\n7yJO\r\n=Wal6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.3.0_1588223592029_0.7661917587305407","host":"s3://npm-registry-packages"}},"0.3.1-unstable.8bb49ce":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.3.1-unstable.8bb49ce","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.3.1-unstable.8bb49ce","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"57c9097cc8d395a06dcd1133ab960d7a5171ade5","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.3.1-unstable.8bb49ce.tgz","fileCount":67,"integrity":"sha512-KoT5axInZskeZfVTTuRoLioDu7gq7xXgq9jena5D8CB6D/UApo36lbPyI03T5i24Bi/RXbVGh+g+ljtzokzHMw==","signatures":[{"sig":"MEUCIQDNTY48x8ushgprtU5heJrRQgPGEzkVyqfmYqjNsZicdgIgNzSSnFkC4FCniOYbsSHHI1xg+9+fOzhfGhnSwrYXb9s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":99189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqmVECRA9TVsSAnZWagAA29gP/ijXE4Vuq//rmqHrHj3s\nD3XX+VE4+CyCqMNgttooh+3m4uxxVDoLoMIDCx14MOTPCzVq6zZT1V+trSsn\nStlZ5oXzdquTt/OF//FeBg2IjCCc7XOCUhRvujbo4ptQckcvQ3i7ko8intvb\nnp//dLf0liSYPM0x3CNr3EeMe5akcMbCEy9afcqAomP9ybHWqDxzFdDr5PMh\nYtBm/TgXci4dtyqZrrf8m9Mc0++eebb01OX0fLIvGOLbs9A8gjfwc3SOogT8\nydDcGxn1Om8fmiyE9hQl1o+xskfgJXBWna988pebE3pBDDINZ6tNoYp/W4ry\nN5KHzP4yaHJe8FYGl9v5moYPoXX/KY3xkcvVo2Kxyll127LNAg1v8iEAnk5m\n7WKirp59zMd2eC2kXS/Z1RwWnOaX8XhJWwwjiE7prL7MCFXS/WThU3/f/SOw\nLWJFDifw2tSCdMjrhGcHMgqeuhW8j3A/Txu4sh5tEb5QZPCj6DmyEIpY2fVZ\nVbUA70Poid+YS5qW2z+poHKKU7Hlat3m/kfw5qXDwKNEm6Gf8yJQ/BwVbv5A\nMVrKb9Ourvh8mC/F2TZEJotVP1+HNJY+Fr5KpClwAmYFlYfRMFnBk3zeWwQ4\n9k4a0L8nNQheKUhNqTvRsZF1Ip3dR0qRjiCV5hW85GYzyHu3dLUVmo672+37\n6awD\r\n=fqLB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.3.1-unstable.8bb49ce_1588225347955_0.9911998545825123","host":"s3://npm-registry-packages"}},"0.3.1-unstable.ac4ade1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.3.1-unstable.ac4ade1","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.3.1-unstable.ac4ade1","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"55cb24f8d083efe66d35ee2305aa8699002c404a","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.3.1-unstable.ac4ade1.tgz","fileCount":67,"integrity":"sha512-oQ/TieciT68MJaHbwOzd1Md2QagRA+f3r3u7nOtoClVwFAk7EmRiamJasrgiDkp92/FBSCEXROTFttFiGM41Jg==","signatures":[{"sig":"MEUCIH3CKqebylUGWqmjfnsWFRUbj5+kWEwdJVkV6i8x4NoJAiEA1ZHNV1XgvWTU8DehkUmnl62gkP3klJrL4c0Ce/rl9tU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJer2ydCRA9TVsSAnZWagAA/a4P/imt3PaOEPmV0VgZv1i+\nuLgxpQkrLiUxSaaMXwn1nPO9qkF5ybFMPcy417Nbq8sSEzi1voXirxSmYTr6\nBMpgB0knumulwPbLh3YGwkC3dagWBSqlnqsZYbWAa8m4xcc7IXLqdkbVNB/K\nuDXicNgCxvJywv+HVzTYqyWku8KLDqjceDUNegL1WjNs6/ukIQ78IQYLimRi\n1w8VTMKP1I61gfB35wwCGw5E67c5zGksIcMaPM0ppHKPOT/NBZHIhqyL74fO\n3yghfEg2vRIMx3BQKXfV4GFHhUuGNVrEqL2/xjSpmO93mXlnyDBQyNUu59Ax\nFT6rwghdemzEDxxI+FGIVE9QOO/XhsraN5Ww/JtJnnSsVvFW0GTZcLEn5kpY\n8AyuypoKJE+IHTca/3zxWPXXfJ4o7MlZNdq3vofVJn0EaeB9XG/jY8icNOT4\nKtdYJX6orC3uKX9/E+T2gCb7v8rQauV7T4sjCG43fojqSLlQhWK9wS2OcUyM\nHkoC+/2rZnE2hGq9p9B2UYrdQf2Ax1xRDdll1Uq4y7uHdjK6xRAvcZ23puZw\ntZK14J5JEH7cIs7Ct9ouq2xHTxBS1LU3/fFnPWuGYbi/M6oLjr4Djs1WWO+9\nOIoaeAuEMPq/ZatlaPV1NasZv3GL+UApliTNzEaxst++nQyv3WBjfSfJ+bWx\ne0ig\r\n=ih5Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.3.1-unstable.ac4ade1_1588554909397_0.354372965299125","host":"s3://npm-registry-packages"}},"0.3.1-unstable.1a85b83":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.3.1-unstable.1a85b83","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.3.1-unstable.1a85b83","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"e0391afe1215564ba4f2436ce569946e9306a1f3","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.3.1-unstable.1a85b83.tgz","fileCount":67,"integrity":"sha512-ggRkGAF+xTB/T/KGnYJ+ghNCqrT2hLt502D0pOFTXWwdsK4Po1QyzNgUqt5KahtVCqoM5YLx4vCB/7NJkb6rTw==","signatures":[{"sig":"MEUCIFUsTY3fS+vHJRrR9IcyR/V4J+oRBlYm5juY9RZ7BdqYAiEA8ElGaDiHgI4Lnq1KsY4mEMyFUcYawJp4TG42hnBsbeI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":99265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJer6S3CRA9TVsSAnZWagAA49QQAJumQJq5ByKDnBQKfpup\n0WukPz/Ys0aUHawyGotsugKaKrHiR+Tx+kNa4bte4trHq6462Ki/F2mXdx+j\na1LWerFT1dF2picpuOXL0q2wgJWb25x6zC1pNejFiqBqfalBKTP1YcyNvt6S\nDQTnAc7wcH7uIUI+BPjV7fc8cNwff/8fosK+XMPud5dgvUbkD0VMVGkhDIUF\nwuT7RJWCkxpRq/e0bVPgxii6Dq1MG+z1Tu40QNtuhSwV9t57rzdloTIRtoVL\nXLZPujGtv0yb7LRDGxsUt5ldsMTz67leU954VW6Efos6lDLZucvYJCDg0zCl\ngm517NtDxrTDsD9veqPthlgHug5wi0g7SK3vDBRbR8475HcgzGX2VQ6QplMj\n60Yp1UqhaXTQpJK9GqkhboYHQdqQG8eUA9keYA8kNzaVn8pNLEu7n7vST61G\nhmWbl7J+k2s3BazGAUlLCbFa7v6PYE941sYsfikSJ97JXkN1ltrBBwZmn6BJ\nZISGVAu0EPHFf1kuKGU0BX6mu88ui2jjovMSjuQDj2sBkG7X37wnx6V9UNI4\nHWWoAfCgVc3geEnXIaLvW1FCvSRAxx0dm4qmwzvkwfNDkZoQdwKmTfKnZosq\nmiSqmq8PJhDP+uVFqtSLysxbghN3x15wpQI+GELGsX61dMkhAOczCgezYOHX\nHQwo\r\n=CJaX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.3.1-unstable.1a85b83_1588569271245_0.7975551182887006","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.4.0","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.4.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"298e2945b81e6aedc35b6078a1b284c21bf6cdaa","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.4.0.tgz","fileCount":67,"integrity":"sha512-PDWrFgU4aRiQIytAs9sUwSpjkJmw3QXCIGYDfGOb5rTmqob7Ub12Z8kddGHUAPvaMcYGGUrt9ikfVJSce8F6iA==","signatures":[{"sig":"MEUCIQDvtbY7emdsWifFCIsHd8mGvON1FtFkWONEHcfXg9ssQgIgeH4+5sGxx/eK+O4LBY/xXfL96DOb+t+8t7D7qv3C2F8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":99169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJer+QUCRA9TVsSAnZWagAAC8oQAIA1PZQ1qrhaSlR0c1No\nizGqj+/vg+dGt8MK9CEUXR8J3Tcvs2qVU/7WYDTtU9sy/d5Q/MFabm7fN6ZK\nkoLI5ygB7nZ7w95MHgm83k0uy4BEU2n8iryjVhc/HTDij1AICgXDClPJ8dhQ\nfM+6Ljl3jevckBsrZEIvFmbsDABCug1bBko2AAQjr8bH8jFkXGsDg/p/c7rC\nksQNy8AV1ECUm0BB1jNdap+neRn5PV/xVPqIOT6vmfhuwhf0c0rjPBup2x3s\n05yJ2Cvr6FHmsm4EbMBT9VArbU8BtFtNloERQCn2HfTkx3q7kTBM1TX7LfS3\n+nrN0VRLhq00/MterT7M06nxxTZWlDBBWdAbOdCrhiJPI+i1XFcI4bbVCgRa\nAI7+cGfi2wDiArw2JZbxCEsN0SRBNsPYLrn7kES5bCpr0s5flOElyUk47FTo\n6/avBOeQZP8odrYMgASUo37MgPNr4SJwMMCcVM2IZiCjG1Lhg/FjLFLKKGJC\nFjfv/0HA1C2zGrVNJg0iMK4ESxZkeYeZ6m14VmeytA7jVSC+QW+1iUW3R3Jw\nDMKisxY99MJqMgMq0/dSSyY8sdaT9fgxINXfRxz3w+ibPFhVqPadCsoA4Ngf\nJ7AsQBJeGEj71amHERMjR651Q0xvtLP6DiSovDhojB0QZZ1DN0Qx5RuXkx08\nw4J/\r\n=5itA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.4.0_1588585491799_0.8125683418688463","host":"s3://npm-registry-packages"}},"0.4.1-unstable.20776ee":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.4.1-unstable.20776ee","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.4.1-unstable.20776ee","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"8c2fd5842642cf40004f5ef99280b79d7b4a8a51","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.4.1-unstable.20776ee.tgz","fileCount":61,"integrity":"sha512-C+U/UD0s5lVDP3lbybKoi4j3gp8eo76CuKX2m6/aP3VQQbj/1GVodFA42d6hVc+7VwBYL3EncPkCQEh9/WYnPw==","signatures":[{"sig":"MEQCIDe9wy+DvlBMQ8jaVohWuSGYxqCir2/tlu/DvgU4+eMEAiANLtHmaqH8+ZKFvHH2f+k3B6an4bxrnzmm9LnLmoojZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetcUeCRA9TVsSAnZWagAApiQP/j2ml1bqZPLwlqWue4m2\nWVWDcSYtltUgtPWDLWAVg9UcZu3scXyNQVZlO8gzhNaD47kU4SXhNPDs4bDl\nO8E25WnU24pZ551HZt4brYeWeEwBxO16PfDkHDGm1aJjZp7lX8MsXY+wQU93\n8+SgSLs7Sm2DKil+yNwtTVi+E7RBnBHbe8J1jhTAEj5L6ARZ6ZNW0uAUdooZ\nzTN0XqFgDyP1XXKx0G9ZXdOcHYosJauU+mB0sj1CND9eZfzYkRswEIuRUNkY\ncGj1iXVLwRqLcbvBqNf43QvBFU03I8cQNNEIEjyPCy0tKo3Apjyv2VUgUcNz\nOjEws5rP6ohN+NqtPxtYcExT3AqyO6ldbKE3kcgRHuLBx7soKC7Ksx/ret9J\ngKOB3AvoYEAKlJ6Yqn8W2PbkXDEtYfiyNJg/gDW2hJoHvRb0dgvOr38XXesk\n9X9ApECaXC8UZEggzjF/6lv3Sk5QWCcaP9Urg1uE1vtJR09XBiDGZYFCSA+j\n8Ea5IGlP0wO+5vR5kncXTnSnrnIevLw4+knRjWqhA0Dhh4Qz95tmjGpf15Bo\nx9Y18kDVSsRLCGx87xFztgBIrlrRIHqvA3UL7UM20wAckc2+Wy8gxjoYcAn4\nSAq2lzAGCYZTtPkiwq0xEDYUgOPCrHNK3xoFP8jRhHEQeRKPStuvqcI3u29M\n4ah0\r\n=HGG8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.1.0","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.4.1-unstable.20776ee_1588970782137_0.040164698788463626","host":"s3://npm-registry-packages"}},"0.4.1-unstable.2998710":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.4.1-unstable.2998710","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.4.1-unstable.2998710","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"84eeb080bfcee7d578f67416587d98f98c346e63","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.4.1-unstable.2998710.tgz","fileCount":61,"integrity":"sha512-XSuHdzxDfsViXArO7ZvwWw1iLZTP51tq4uXLHvghIgCNAW3qZ0qKZ5laxXD8MANazqhEpM9eNhSE7ZK6sarHiQ==","signatures":[{"sig":"MEYCIQCAwnOOpj7pu1giwuctcNlFmumkBxk6YkSdoqvJ2kl8pAIhAJsZ8HD5UaWG5afAMTAF7wfTvLg2z8Jm8t6ehm/5NstO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetfsYCRA9TVsSAnZWagAARVwP/j48Qtcjd4xXv5M9ioxU\nCfKnNfLqEvAG15UoezpDA+zqvx/pg5agKG3hnTsr0dGp4h6Q7dkkhbYoxxxE\nbCCsfNzWoZvv5+JvkoNEzZKzIUa4P/SLt92kgym0YiTQ9ovjaP4RcNB9+Stg\nfhkT+hghdOJCbhqCpqh8v9LrGn8hDh0W9RkNqnRXrKUDjZ1Fd/elk7rogrnW\nfQ+SOXULKmVuAUA0406urSvCaQlLvULaG+6RbuMIyugyKBGKoyOvA2ZpxoN2\nfJBy0Giw1Q/dxbCYLrHsY/WFouh1nxQv99D4BVGrGbfxsLBQbmTp9GMflKgw\nf7UE2T+7uwjAZPhUNnyOaIkKGpDW+35SERIXayWGSnH0yqg33ME9LrDpzTWM\nXCeHVhLKlHTit+R6ySC8Sx7eGIinaLocX0IUNpTsYrrTjhFG7xL7Et8rLJRA\nZQsTtwb0EfHqe7w7VoztOnOgACAT5f6dyC1DKSEM5BmZQSr/6dNuWDGOUvm/\nN7vzoyPHDH2dapQshiLxtNK2p2oJ8dBjDtuQuWSYYG8PFF+ea4ErxO0T2zk1\nWPRYeIO9rqmhrih+wtOCCMFLw/TzFbjhGsJV+2pzj97F7txjdzjpKjYnDOBR\njJq9s9AqDOyWzXlR4VAx1rFm4szP8E7ovM1MXqsC/+ppM4xSKJez0dWxYjJG\nSlOQ\r\n=Gm7j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.2.0","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.4.1-unstable.2998710_1588984600210_0.23072936695678692","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.0","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"daadc5651da2504e05aa4fd15912b2122daac568","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.0.tgz","fileCount":61,"integrity":"sha512-k5hBEofo8b20l9VgNC8sTMJNmWeJjsLvkNRjG96jBtNC+vajc/e7e2iW/j0H+SCQXd+CLcDHiz6zJcLiEiF96g==","signatures":[{"sig":"MEUCIQD+HiTbYNOOWPS5nQPJKuN8Vn7T0uHJfwH4eWikCTYXnwIgWOwCU/WVIFNPu40a6X5lCjrgcaF98GUegsP58U+rmA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetfzuCRA9TVsSAnZWagAAyLwP/RXuge00fHQqyBcjhJgE\nhdbpPImSXborD7gk2BNdbFIgdgTeZbwCRAaybW6MeY57GXDpuYkZfwfklVlC\ngLZGXkE9BVP/ws1JjzhJOLs3RzdoJYIKB/LT3QpUkVfuZMn3e4ChR+325KHg\nRpifztIPkmER5zbWxfNmT2j5zrJzHNdZzRNjkAVjvbxsmi9xD2WY8LtFrVRh\niA6kit9w/BixzWrZYS2MWOIPUKIblOfJ1NfvgZEZ87gjCRdw1C7ETs+SLBoa\n2GLgYd6u29o7Bmgp6poZxStannhLj+3Mltmh/4am+Y/a0ey9gIgUPFY+DDWC\nVyGzxEbfVSgQwjr2qhsQ+HfDjX1eLLLCtDg3QTA497IQTyS6uoLg2KK82Mgr\noQdrX8wwEDggFbrbNskm5X4QKKtN1jSGmWRL6QWlISCcNwrksee5EiXeQph3\n1IKeinGKyyZvTXUAjAucv8xqBb/k/+ZpD2ujzsJq6zLmJxHGBehtJFHCjVNh\nA6HPD+bjYgdEjW8Br92U3FtRDDHjMsHPJSTU12iLUrfnlDCBdtVVujz+XjUm\nuuUIz6NNxUvsgcmhO4+AZNzwG+bpBwWZi3ok5eFAwS9x4SXUFsMPecXsOT8x\neSOzt8GCYXOPEalgwe6OAOBiXCmdMyFYEvm3krMducr61X53B534XH16GfvH\nhkIg\r\n=IAop\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.2.0","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.0_1588985069543_0.06142242317844082","host":"s3://npm-registry-packages"}},"0.5.1-unstable.73fdf98":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.1-unstable.73fdf98","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.1-unstable.73fdf98","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"ae15e1522a4699670610f8cf23ba1531d4add1cb","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.1-unstable.73fdf98.tgz","fileCount":61,"integrity":"sha512-jwuCz0HHC3R2zLSM0SuWyAHylMmAHjjp+lOsWWDbjycIrJujdvIvm+QEwWCyqZTScvOJBud24KSluKIKvkLcEw==","signatures":[{"sig":"MEUCIEEwYlSUNfi413Hj3qp5MAfeA67HDU0/asCTG9ow/QH+AiEAgbwcCCZclXqXanBdphmFaoNLF5ADxm6dxza0GFBj0SU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetgeVCRA9TVsSAnZWagAA5eQQAIaAU9xPvQhHghlr0c6Q\nKVZkZoQ0zFTGF20TqpQ0NWPvX2rfzB0b282YCAr6y/+wa5YLByhwphuYjlyw\nh/31YeMNeRlFoR3tXqFwIUpIXmOCF3Cokq5FoQJvlKioPQXvFRUmazKdwC9o\nIUO4K5Jhs0d3384kIqCj/CBf68af+Ay417V2UW4xQu5RiMSx/1jZyZ8IRt4q\nPYP+Ypk5C+0nR36UViJVcmeauNRpp9QNd+jVYSQS41Y2KcMz2lYa9lu4z8dl\nXBPaTqtCZ/r1pIiHrSUaEkmktIOqoWsj+m0as7o1fCWYzjG6q2JSwGC99pzk\nsKG27shMlupgm+a4cg8tpAkhCIMNVPjFnA/pUJaHmrWubMMcFKPr7mvWwtVn\nXyrvh8ejCT2qR7sewn1YbUMa36fLuf0XNdxVc5HTDc+Rp9pTfC7SsOFcmprm\nFusls6dvTyDv2fBMyg0z21AP28hH5waLDpOJaYaxEecT7Rzg2JPOqD5QZs5b\nx86g0Su7nS8PiE1KJzCKLE9TWrqipdKjgEX64TDBc6GTMNngE0h89xMiP4fM\n3ubnVX/OxFL5UgebUgzoYW9AFPrtmpvgFAE5r5F0nHNzkL65dIurNFWJ08Oq\noUwthmOfjRSLyTV47jseoVOZaD9MU1gPukSucW16pLmspNq1srOv7ykjwWz5\n23P+\r\n=ZY+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proof\": \"GO/i24loDTTgUtMCGM/jivlD260k93d9ek2FxB/L2NQmZANjKd13r+8yDIrRqD5hB1HjIc1gY3Y/lwexZNUa+BAlaXBQZa8iXhYr6M9lMauZxlYuaJkyGlUiu/QwcHwDD9hpB2LK8kUvQHdYZmkBwL3Whyqptl2hkgNIdCnpqoBH+L9DmIZH9iGwrzYJ6rx/AAAAdIu4GCCrIhQ1Vb/BOlHYaer1eTC+Sukw3ypVmNNoP5pa4nDD+/UQin2HjmS8YtZNqwAAAAIMTkAU/oDTR4EcEsFcUbiM9ThFKytMZ/uGC28463I/9Bb1JAL3F23JgUHe5eJzScg7Nu2hDHpkskO4/NaExd0cA/Sle9qeoObCi6trWtR8+ZuAI5tpkiOojsKBGoU55Diy8rMyOA+ruP2+F6tptRavAAAACUiVcbDWpO7LE8hMFmAfrO+DrWd7S0T2opAk6QheOTdnUfZIO5gpCDEvXGnZ2pmnGYqcLnAjth/gwhAEfTSTrntnAJQomBJStgVS73wZgVTgchhOFO2Qbg0nFGHyhzkZJD0NSjihxQDOx45pYSaIqiF0uM4iGLh79G5xU2Av+PBqbG4ASU1kzXa8N2cE6F7osl5LYKvm+yeGl2gDktCRwrcansuuZ4RQpPFE2ZCNYlsPKrjBQ+QTgWjpHQmhtfLpVFJcFpIy4x2GUD3tkZFGKYpEm2Sc00bNzfYozLdKj4erTr17SjoHwYyHwiofPmb2PRcrknpYVJaxyrVYM9sn9gwEoI4dLJRbT66k4lgEXRJJ3Kb430WHyWuWABmJ2dd0iQ==\",\n    \"revealStatements\": [\n      0,\n      1,\n      2,\n      4,\n      5,\n      6,\n      8,\n      9,\n      15,\n      16,\n      17,\n      18,\n      19,\n      20,\n      21,\n      22,\n      23\n    ],\n    \"totalStatements\": 24,\n    \"nonce\": \"M/e44JTNSsfhnykE0yoD8eaYIdJARbpDIWFhu+TWwc70J5iwPHa8Q6bYQd1YjjxpV4c=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.2.0","@mattrglobal/node-bbs-signatures":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.1-unstable.73fdf98_1588987796811_0.19143541371855255","host":"s3://npm-registry-packages"}},"0.5.1-unstable.fb3604a":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.1-unstable.fb3604a","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.1-unstable.fb3604a","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","dist":{"shasum":"834f48ba733730a5e539dea307b180d297a1f61c","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.1-unstable.fb3604a.tgz","fileCount":61,"integrity":"sha512-qkFeMkjTr+xhAOBQ5Qes2cQscqg0EcIytiPtchjya8+rLoRodnzFFxhz9IADLRK6kYPwkV4SRw4k7DIsn4QV+w==","signatures":[{"sig":"MEUCIQDH/TYe/AJRyJwALI4+WUXUyVsYa2P3MmepitVVZPTQ8AIgaS/AigWCax4d4Aj+but3evkOzvTFDV0zY7h+m7aNtJA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezIQeCRA9TVsSAnZWagAA/e8QAI/dQ1QPzGb39Twow5tR\nxXwKF2Cgb6V4VTuoUe3CiZd7r8h8Cho0EtVr0FT+4UKNA/yH8Tu9tUISe3uG\nuVo0xwak0cyJ137oBr6mR8EEx8EoHE1GJtH25KkbRhGJ4h52IsNUbTBR2Gdv\nU6DAHJNn8L4T6Ym4t5bZw91ivpkls7pJw8s5g1H4AoR2cM1svpq7V5clt2Y0\nR6qPiX/dkDOVE3U8ukAwp5ej1mL5fZS2euiqoVoSADiMgw48rg65gKSqwJOj\nmAoWNPgZDSzy4OHTPmy3L2SazeCY16MXT7HAMp4uSJomywhKpzo0S0tjtcVw\n6fVwhyKWL/nNtCJkczN68Mvu+2I0ujvJ0fPHPfiCxHcrnLvgFojiKBEIAJp4\noRFuBPc/yl+OQyzmBDngK8JKs+Ib2QY8S6syPk1Exw8PEKHrwlfozzs+hSMp\nrroSrHdew+dnLv5xu/FEwt+pqY3txOWNcxPRAegD3RAzXRgFKi6Hb8CZ51jm\n9uMvWUuuaLTwHXlSHVbMtuUl+fxIjbmYk2QpNJR9ZchasBzGvgXB7+JMtyXt\n9bqVIkHbe5VQk8LfChjD2ZeiyEYPrqzL293oy6SOolqy9WjyHReimTn7MJ6O\nGnQAE9urYkxv7Tgp26HQTZlDhQJnqbxmRHi304heAng2nGIqFSrnZgNg1Zxw\nphQW\r\n=es4K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.1-unstable.fb3604a_1590461469537_0.8592537249164613","host":"s3://npm-registry-packages"}},"0.5.1-unstable.a82935d":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.1-unstable.a82935d","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.1-unstable.a82935d","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"8321c0377be5857f436da68d45d8d7f577fc35b4","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.1-unstable.a82935d.tgz","fileCount":61,"integrity":"sha512-jk6AfN5ftxUZkJfnL462CV2H19ArW1lHpXjgM17fQI8waaZt2k2YjPC5QeLVNXdcfWqYRPFwcwx3CwdyGmdg2w==","signatures":[{"sig":"MEUCIGX7O4MNwFnb0pD/I+OFBKEDaj3jR9c0ObAcKhXx4G85AiEA1oyned0hcgVlw9Mn6TTkqYzMe7sOj86B2CjUi3DCXOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezIv7CRA9TVsSAnZWagAARUoP/2txeSSRyVU0ySeYQdUO\nbKwKuy+r4NefGtj9u6Xqe88qN2kSMqOlD9aUb8BqbF6Ov0GyzwOLu2sKvd6z\nc4cTV2PZ2pTaMJoMnkZiddvKRNerw1WvMu7pupsI9/BwrPEXW3ezEU4CU9VT\nb8AKDbdqNPQ/Vl4rJat+hE7tDBqVkGAf3/yqvlDTY65htkvgC7tiVfX4gBTR\ndea7RIh2mY3HKn1oGsuiC70LJ5GD6N5i1RyWTxzDEKudgQdjSsCfKNURvqXc\nOrpQeAW1CLyhHT41C/+7Mfdn+VCq7wfJaeVuvtZ31ih5SKUVRhojmxpMaO+g\nxJhmezYbtJJzbuRt1eSBW/EKOebCWG1ZAlEmMK9O6r/WMOb/b3pPRn9pZYsq\nYX4cpHxlhndSqnJyEGC+VrpFxEy5MwwU29A0hEN6ETo+j7wTpUq4linMPc57\nP5qo8ptXhFoz76U3ogkGk6qtKZjXCBH7wIZKKqKazRDfxMGT0DM/9t1PtEoS\ndZOYlRrjlTpTf7kqIIN08atwvPA0T+s3yFadoGOI9gAk6tF/2ejN+dAnlqAY\nCNq7fA0md4r38TL8L76ggY8lLrU0P4tuGdA8IlHW3p6IEFXE0h4KcyDE6CKn\nqmU9ypRhqgaRTjoSJl2f6BWhnq8QjHnHVJghiDbH/Jk80rsmJEfZ4LLAul++\ntoId\r\n=6pdh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.1-unstable.a82935d_1590463483285_0.2994619258051845","host":"s3://npm-registry-packages"}},"0.5.1-unstable.4ded9cb":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.1-unstable.4ded9cb","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.1-unstable.4ded9cb","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"37c6d1dd9c9b70ec5b926b0bac12280f03717abd","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.1-unstable.4ded9cb.tgz","fileCount":61,"integrity":"sha512-3VDGGBZVNNDa/HH93pa3OAceMIOEB98hzU1gI8nDOgd652oaEy0Zu7Daz162x/TOg4gw650lF4NJdgYaBNJ2CQ==","signatures":[{"sig":"MEUCIQDZFN+1Z1MsExT4IX3pn/XThQhPVJEKvpjyE3DejchSqAIgBXmXkGnwiMRi4XSdf0FP3bVvGfFKH2mUJ80SPD1pPh0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezI+aCRA9TVsSAnZWagAASzkP/3y9Ybrf2xdzXljsZu+3\nNUa/lY/e27SpR6d3IhFos0hjAS4BbWODvlg1+NIdheQIW/loluYHjs6RLO6W\n1SJSN/3MChGq5zBzirtJix8ljVaqXYlrySwHEd/9a/SZ6pnoq/Fb+pG7rQRf\nCwI9CigT5viLowmlJsk8Je7P6XGKYZDgJWe7khEC6yEkhTFCZLkZolW9aqIB\nJkNQ8hQQ8su36cmzkFziGDWHIgi1RZs9jgJX//B2ZO1EGghJCEZ2089rvKFh\nfV8AH5b5DQWWS5IXMiQG27fg3bbDVY4F15ObvCC28u+F/L72FdnDcKqdXaup\nUor5APpuMwIQrFHAPp+k9PfGnn8QfK0bMATYJ/eL2DQsh8k1wWcC3BR0lL+P\nSDna14tLLEmU8ZEyBkACxsaX0YyJXL0KYQoM3Hp8ksvbQbWXSGUXpfg/XN7d\nRnZEO1eBwbOM2QVV7XCufiNgj160se4abBl0Hz64IsOqEOFFx29oHIhCx9iV\nruCUTneesZhM7iOlGuxxcCvOV8etTqkivSl07fdTQNGe7IYn5kTZiVvUPhhH\n6hKItLf2hIl4k0p+2gD4bHlwMpbQwVgVJKdZPBQ15o+O9aIyYOJbY275jBij\nCD8lvwD1M/r5sQ++Ta5yJlOaOrEOvYWwC3z3sNQceD7AkKl95m8c/3SxrHK+\nQrF7\r\n=tkBH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.1-unstable.4ded9cb_1590464409509_0.04467106785417663","host":"s3://npm-registry-packages"}},"0.5.1-unstable.6494aab":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.5.1-unstable.6494aab","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.5.1-unstable.6494aab","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"a16bd7c984f2dba16318e3e69c29820ba81c6232","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.5.1-unstable.6494aab.tgz","fileCount":61,"integrity":"sha512-L1SMD2a83/hTjA+ez5AHPZJQmsIOrOFndyT9RxYDt6hG0HrZOzk5vRgtLZIYuZ/F/4mdvxdFH+yt8DHI99HHnw==","signatures":[{"sig":"MEUCIQDCn3Dsiay62wnXD4lMG2morbYypBfIzyHpnTUqACPRPgIgOUJyIZizTC0r9nqtAwq4kgGk8+d1UHrsLKyxoTBIwrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezJAtCRA9TVsSAnZWagAAbiUQAJuRG5z1x7JuiVSwLJ4t\nMR0hg8JYaqQ5+xdVfZrJ47Gd1gSqO7zBfplfk10sPuFrkSzOYuRAyyEkehrL\naK1FNKNb6zHLzm91HIvO/j3TrX1xHh1wVvD8jAu9BRQtb1IzgZE5s27EeJhB\n+kVPPqBdmcJu/o3pFQDNR7EniDZ70mM95MXtbbCOJqgYFBgVPVi2b+hRCMq8\n3UFC/czfyuxtO0hMo5aGExlVgWQPzPHtpwCp1Azo3TsAGi41JeD6ZXA1icHl\nMMAn/P+fs+6Ko39ST5iiUQBgqO/Nd8B4X7/2lBO2kizyqqhJVslTaLiI+9cz\n4QiEcud4u9sEFKmi/wj8+CBsfh1+Ih7q3Tt390Xj+7FWZzU0zEO02yyF4+/d\nMBOoz0FsG7OyMBwvW6GFlf/p0Uwmfm4/xJCObT0AUHw+RKbtDFnKig9AEUJu\nKIIXTrjh3tvCtyZNEenqHcJihx991EYRtzfjT/u0y6gmRGtQjO/THtjTE/mO\nHw2xnPBBaSQPSBKpIXD2JizFSZ66qiZ7BoQcCVnIOJcSDUY869pL5LBLnHSi\nKU/0gTX6e9HLXv8qFoB/Gt+50Hg5OHTgL93u5IgZ9Bg8DLaAeY10GVbueQ9S\n7a8AlpLXOB2zYBEj4BXJ24Bfr8mY3Bkw2T+vkOwByf/HeV8vY9ZG0fu5ldRT\n7Hdg\r\n=0en8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.5.1-unstable.6494aab_1590464556910_0.37486275640129185","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"8c05d5009f5d7525176f75f8306d03be4f5c571d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.0.tgz","fileCount":61,"integrity":"sha512-gwMICeEnrXxiwsuBs8q6LeuBjTnzubjBbksMsuuDEX2RY32Tcmu7gRN4eDPZuyAeaE63C4PnXW1UglW6e2Q2/Q==","signatures":[{"sig":"MEUCIQDNM11DzLDaDEBNJT+bxmPHX5QGK02uBneYoDtj05ntdgIgGQGig2WHIqWI1TPD2rVIUwuXQuSTSINO8JWLxKdF5jo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezJFlCRA9TVsSAnZWagAAMNEQAKLnoqFJR56g9hCEBY7/\nF3e+MvKMAnjfwrdWlZhfTkNW7uLNioVe65+ocpJFYJ6EROlTp0qfXzG2Pecg\npVaypcvZ9+RGEmXDdmJpfNrst5q8V/2LkjzklSMeixxn7c1NAwilGdWncnRg\nQBzo6xGzTOO6qcYowgiDuPAjSg30ZurIgPuFzq/0GLLuFsyT1T5Sbn6IPC4h\nDxs7tWnw8Zuj6AIbUPwpmplENO2+fXsMsyYRA3vIJGXIBYCybthgvSZyOgZf\n7TG4LRRtZkVpCysrnTVgjruMpi6JUST7kSJ1s5wmIMbOunOCpRzcXCmG0YXd\no3BmZMUhi9K+8h18DnqVCisnjgk7IbzxtX4v1TZni3hheCajaFXCL/V6lacX\nQo4XhxNmxabjd9wIsLnGmBEoZXJbf1mAyKht7u/SfQxa/ubLONHricf09+K8\nkBfZ5Gajw9nmx8Zu87YqdFxiXAx2bwFzwU/0M1UpdYo8f3NK6By6Ckkt2pQb\ndhTpTSkE90RsA7A+sq1Jeq4HZYXOdcFI/1gZT2xbFlKE6E4UKJjfzmrqJBZc\neGRTmuaNPF74oqGYRqRY/rzxCsHQAUSqJc3pW4QpJ05T3CwRYKD2oEgotLgW\ntrGdACA022gtl8a3c3XB1O0ta1+8ycsK5b7wOatul9nQGNQM2SdjSmN4p1Um\nl2Gq\r\n=2vus\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.0_1590464868923_0.8040001312013729","host":"s3://npm-registry-packages"}},"0.6.1-unstable.d74ab87":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.d74ab87","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.d74ab87","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"9787720814b84692c922be3f711f9dfb3cb3815e","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.d74ab87.tgz","fileCount":61,"integrity":"sha512-xEKQVqGXV+21A7GuuzcVSTH+hOcfcvOvQW+6DRL2PxXyab6c6pZixypgiiHZzfafoFfqJTZw01aMA9j76l8Kaw==","signatures":[{"sig":"MEQCIEOxMjo+BO0s8+DsPLthuhkqYb/lbGCBVs2IGy1gPeVIAiA35Kdng9EBtga+y8xl8CE440b0U09Wb2BwrO6clW6ihQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezJRqCRA9TVsSAnZWagAAjMkQAKFs/h80rV38A98OiCXP\nU4EyzmdLHsa1kMsNZiWiQhk37Uka/fzMp25F6JidJ0QX7pTDnMqTxWWsEU7S\nLOnqsEag+NgAJotbq9RLIX+B4EbhzZPAwg0aoskkwOf4+THM2/BOeyfHr5lG\n6HnqOGJLhgE2mZcmt9HxNnoFGoi9ytrxIGli7m/8Ja84nHN22umCvwDPtxMG\ncKfF9bxb14dpIbQxhMcgkYVOIBCu1niSvJSHra196hsx5XxnF7NlaGWdKzmC\n0u09UrMIF27wLbbW3fc8C17jQGhmLfKVjSMoxxb8Jr3G5yZTNBKqDTOU8Trb\nGtc0ZXMcF2/5gN11cDyjHM7MbwonN0Th2yXbPRyBtC0XIrJusMUbmuSmo0Y7\np7aYWQdqE7yGmKmIMfPl9opsxlFFvwXfIEtFHJ7uFqJHFkzM6nKTGe2wKScD\n4NZsezgDnmVeRqKGtNlrOk5Iw7dNhbX7bfXjx0XIpgmHbAlRsSiyj1wE7kNA\nINZtTfn1fcPldjYyfD81Rhlv53m69iKZhC5mr2nGUBmwqAiRnPz7WC2phM3R\nkipSDNAYQ3ovrHryVpvWS2HYOM5+S2aHZ+WBEzx+5dneeQ6W4ZfobkJHBUQR\nKtKf+h7fcbLa0IKK74CvZnnSRbhtq5ca3gexFZz/WpbLGiWqzMOefMvs2Duj\nUcaE\r\n=X8f6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://eprint.iacr.org/2009/095.pdf), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BBSSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Relevant References\n\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [BBS+ Signature Scheme](https://eprint.iacr.org/2009/095.pdf)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves Draft RFC](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.d74ab87_1590465641668_0.3046611905207188","host":"s3://npm-registry-packages"}},"0.6.1-unstable.b265f8e":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.b265f8e","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.b265f8e","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1368d86c5888c6314440b4540f559e642811e850","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.b265f8e.tgz","fileCount":61,"integrity":"sha512-6K+MyO7uwMihiFrh1+SjxcvbbLmj/c85cxXA/JHDbvpZkrYck3LFYMGSBtmQXbx3Cr1NQ+5sbP/okRq35ySm3A==","signatures":[{"sig":"MEUCIQClyWEPOGTdAbOqZXZNeymSTo1GDV4EaOW70tTpdqQGMQIgSNLXaHtIfz6HzGgM5NSb/AsR8InF9bk3UumrFP+qAvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6uSgCRA9TVsSAnZWagAAATwP/R/GNoxz8GlNXaKja9vV\ndXFXhxuPdDwncNa/jQVEhoPBC8wgw7WQ6u6HePgpipdXCCT4qXdFoNoME1od\nNvWh5SUztIWzEJldcnXZq9hoAJdV2BBMMoa8ivYGm5jUDwfH9QHZ8dinRt12\nQYOlduuXZ3TcOU34wZBOuIO1Dy5V+q5vhDZdeRQGBlcrPe2LH76i0LXwVcZG\nEe8bD1O33x64yIxYMJvju230jmFfU90CWJQtmkDXWWKsWb3vnlBLftlBj9E2\nxg7tGBOQwQXaOB8cwS9TETX8/+BaPQGSkxKNSkKtCYQ2jZBFep4HwbhIznzh\nz0IpV/xsHGC29kFMHxamK+EqFHuzNkbYkvpoDmrRFzAFSIwj+6ptMd+e5JgG\nva7Jkvil7EgqlYRUrPWX+j1adn9zZjKXxc+RhkdwPbPrPepwib71BolcWUSp\nTTFW+F06326TjFMQuu1W96FF2cmKkWLfNO9IWgZttkkWWlezD/Xm2Bo0dSXB\ngrNTtVKL6VUUTL8acLauPw+e64uRNSQXntZJanxYc7UXYE3M9uxpzCrIR+6D\ng4RFwKBd03N/fh5+WQwWZ0Bo0mBzVMD6zrJwAnFjKXv93X8lR4JTmzO0LDU3\n7Fyr+bwu4Z8JK7Gp+wfkoMwcO6xPCKgHHglvmDcGcEJEVSWLWMFiMC3alS1X\nOcXb\r\n=ksX3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.b265f8e_1592452255873_0.7974935396650937","host":"s3://npm-registry-packages"}},"0.6.1-unstable.760d62d":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.760d62d","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.760d62d","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"758405b2bfdf60ca8ccf7c807890534dad9a68f9","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.760d62d.tgz","fileCount":61,"integrity":"sha512-IBVW06pPRkcSFITHaxwENju90Zrn/hU4qczGc1iNvNqb5D86Z0kit3D1eAo8uDPoisxE4w7xHTiEt9awD1PN9w==","signatures":[{"sig":"MEUCICQr4xQx1+T8tzW5mWuLFX1BsjgYZqxNxYvY7nH/U7pUAiEA1bUzJKPIubIg0O2jJkw0A5NnczgGAeHKGLWTuVtfSUQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfC8aNCRA9TVsSAnZWagAAjXoQAIScfZm+ht9p3Qn5gXaT\n/PNnON9XyblzAeVsGE4Buz5uqWwQqEhr67iUv41hOr27rJsxFca1CfIW3TzI\nSE69kKCECGfgwEuy1clS4h5SlNE2mJ4SDiTqo9xOxpsgfYKzXMsc9hjccdTL\n6/F1VZOAWNCYuI/COKZN41KXjDiSSsVugVTL48PTI9Mxq+s7fA0ygPz9cCCA\nqR91fKp5ebWK4pOfJGvZtTV84hSKjSk00mkwhybDpBFs6cJY+5eYa7Lw/9rv\nYg4hkbzVVH9WBXDOXwcJYG1kpFSgNsKW1UcP+uz9z+4A27xKE7rbPTRELVV0\nw63cxrbNKHUBkp7QT4HkZTos5wbfV0tstpjjRzU4L1oSi7jVH6Q+6lGszNR/\nDXTP/tM0v2b0kKdN7SPDxbuP1F4YMB87AGRdUQ/f91xnYN6GcekyyjOq9G4g\ngm/7uUJ8+Dhq7n3WK4Rk7zOGLRvY40ARoec4PqHAX8cbtwiRT/pxmb3rPrSb\naFET6ALEg+fVa8HbJqt7mvw+kEHxAmPU7k9P+fBHxJmh/AiEyIQZg9qkPRLO\nk2pYas7OJSHrWeUgEhxNFHaF2xJcf9Wtpr0YxqkGwMcM9u8OAiTlYySOzulj\nbrPaU+QnLZTprvJgBfucY3Sr54+MzmaCCoJWjcYwkBabH+z/qlfQxhCulQU2\na1Rd\r\n=2uGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.760d62d_1594607245173_0.558451711867461","host":"s3://npm-registry-packages"}},"0.6.1-unstable.088b6c6":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.088b6c6","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.088b6c6","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"4cde0701296bb9558e45aca32c20b000109e08be","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.088b6c6.tgz","fileCount":61,"integrity":"sha512-1teQoEL1ynx/UnDnvUTSsyE50ZXmvYADleeUHu04dxOM9spUC0SeXpO43Tdlj0JEJXlVjvTIpDkm6CwDVbWYIg==","signatures":[{"sig":"MEQCIF5gOycTfVQT9HFzMuYVbQ5wscSQmxwD4VmKigV97UK+AiBmBWPTbrmw9PiWJNs7ydya/IGtfdv0D/xirdspI9LuWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFjpvCRA9TVsSAnZWagAAlAsP/jMEKeoNEEABi76WjrGt\nlzCkx5OfrL4WwIp9HaGZB8whZ02HudxzhBWce37nb8KLXhzpdZ/IX0IOfpu7\ndphay3YzRjTnrsQUk7y7Kg1ruYv7O/4wMrotK/VXzElqbmDMY6bVHX1Mk5QJ\nWweP/9pDjI+7zT7bwInKlhjwavk7kHipEz6pyie95+I2UGaJyglIznYzi939\n1vJV4JAHvKb7y72fjxe5kVuNYStfplu7DLbl7vdr78J5D344GgsDMGsM8CmN\nwme93IwYV3rhWHLHlSrKue2yrcWBPJJDKdUPk7fWSrJfst00Z2BEZZh3k6L6\nAXFzH9FsO+J8jOWCFmHwiNyfhlVRhEpgqpUskZSOh8CVwPFdQo6JfowIpqo3\nd5GrtvOhvuqcGGTJG2vWcSA1G0cbNlbVKJG2tR0eO3p4K6mcNzTc4+RICUt1\nFzjNrmRxo6fXkm0Y31I7FZP6/fPWaBjXtsKRNYkv5Zj5fV/j4u+FsGub5ORg\nUZriz6UaqGV5TfEG+cYfuL6Rvl6jUeuHlBGoarrZy7BkqWrtEEae8CjDAYlc\nXhOgQW8YCzyhgE0/2b3afGm37zMk5uiFr1oJesQOgQeYzwRWfDxXgGuw2fiB\n5osoqsWS3dRyRekektG4xEqEEH6A9FubwYEC3gA+TzvjQYJ1eoYxm5rWNKaQ\nzSmQ\r\n=YuAj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.088b6c6_1595292270696_0.9091679348494512","host":"s3://npm-registry-packages"}},"0.6.1-unstable.270b529":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.270b529","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.270b529","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c53a9f0f2843bfb709122936133a5ee91f009c62","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.270b529.tgz","fileCount":120,"integrity":"sha512-I5JVcY/Q6Frd91yML2mnrM8fj/WculeIC/hKBTtqM+ZvylpFqa6Zqng4Ogscz7ybOI37N6h9Xa1Ehqpkg/LxOA==","signatures":[{"sig":"MEYCIQClDsc4c7iUBILuzgr7mKv60AEHD4OJQr7A1FA/fImPpQIhAMM8xHjKbDCT7QeB+JpXv6NRa0tBJSmeNBVicwG50+iX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":186540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH+UECRA9TVsSAnZWagAAFBMP/2JRyMzTwJdZ7qZ0vNYk\ng7s70/p7/TaR7VBmltWBNwa2aqbokTk3Jq3YLUxDCt8PrM8H3QoXQhkHntlp\nOXIlRTIt9pp03ZX7X93qZZBZOmrrY1wvOYLOkRs9FMtf5nV2aZeVjbCeerwl\nYnfwaiKBCy6vh35f2RyZJ73GWh+mQia7Oo4BSS5otHIBNeNbxUU9UQBepsWS\n/GZ7e5f8K0nlJBpPgHIBakGBJ30IC67qycPjGFoYZ15q/UMt3TTBFycLT1zy\nSpXe3q5GyKGEtH5RUKw7w7Im7D2UUq2nIYn/2EyYzM1jnYsiwXIaJhktpmcz\nfcydgZfbv/sDuDjL7+ORNW31RnRPxNElTU5k1JcpAZzsgeg6/f8g4GMm/0dG\n5G+mp3Bu2T5lwWmFJXDM2KNvMciwWmAi18D4lfnZj19Y51K3ucySXoiaBxjR\nr3/ooUWKmxjHW1/c6lMQ44TwcyrZZD+07nACDONMYlFDo7bfpW/3Ja9W8Dfd\n/sOjuNTgatuy7A29gGsZW22706GmJncR0Kq1xNPzbmOZWxueOSzI/PpFSg+j\nj1PGAZvhQhCpUUaDwbUX1P1pZwu7mYnQ48j6zn2wynDZG6XX3WqLIhxVWQAl\nfPsVSdPaFYGWQhL7P7azOTLOdz00rDisWqZ7CiGTFhxlms1O107fmSYRzySh\n7wUB\r\n=ELNt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.270b529_1595925764061_0.7099341320462502","host":"s3://npm-registry-packages"}},"0.6.1-unstable.75f5105":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.75f5105","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.75f5105","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"adfd16a6e497374814283b901c31bfb37dd96d9e","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.75f5105.tgz","fileCount":120,"integrity":"sha512-QTqPER+xtxKBC7Hd+KJ77YHf5D2cSBLdy48uAsFrZ9uoOFKMUdU3ucwzp32mGzi89OIcXWCGD1Y74pvXM+WCRA==","signatures":[{"sig":"MEUCIDDTNGhTVNa0RCPJuM+OeLHcM7pVx5p9AJbj55rNxiS8AiEAmWHUUw6yMo/q392H5IXa8H8wQWXeiiTjudAPmCPJInM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":186540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH+kACRA9TVsSAnZWagAAqCUP/jy+wyssRKbsoaY0goL3\nq122TqdTA7rMAPLDErVBYE/91PI+E1VI4A1holWCXIsU9Q5701P4zN5mdmxA\nr646DVSyWK26ztsB2LBvRx82LpoOFBQF462WaeMfyfo/gSFSaSy4QsSCEqx6\ni7WkzxGycBex9ELJZ7FuQm18YTtVbr0Z/RliCGghLye+BYxZmGZp634ryCeV\nFAUpXfC4BC+ZEo+JoOGLPSryS4gJ/YSThoymUxpc5Cumz3Sob2ltrOEPEqg8\nqG7HZ/T+xIz7OOButtmc+JDW8TJOEua/ORt7XGq4Ff3KN6Etx9aK/G+Joz+B\nCG3HYghvcXfRWhcV+IJw8WMMzJdKkXcqj3jzoMCU0RfGXTnYOyIDRw2gWtkQ\nGTWrQNU1SN8GRq0ffeoiev8QKeCGud8IPq1LBTcOjPAtUH8SWH2CW9iyx5r9\njT6Lf/h8D/K0YRCCASG/ZIlywzKVX2HyAjGBG8ldotISRbSjpr47jEbNAvxy\nuEq/WBF1gCGtewKj6C8YY2ZtGQ+fPpLwbJ/xqFbfimQyo2rZ4Hh2vsiKbvkY\n7d1K5EthGF/GITT/sBQR1zRCnBk/lxKoeZK70z0hBrySsqR1ZdvWj14iSubr\nXtykHr3OZwpNOzvm1jyFq+KazRaYyors/qXmIsHF687UQhFVrozawZzOVosO\nJ0JM\r\n=nkPE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.75f5105_1595926783830_0.9863424815719015","host":"s3://npm-registry-packages"}},"0.6.1-unstable.17e7c46":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.17e7c46","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.17e7c46","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"e2fc7caecff0279e54b7feb9dc0263ce700d03af","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.17e7c46.tgz","fileCount":70,"integrity":"sha512-6jeuybWHrV94LXnOdfqN49ByQgJgVJx6y02w4Yldjkqp/oinznfBILaAtVZbZRKGixPNQoMDvPvcOqWhnWPipA==","signatures":[{"sig":"MEUCIB/JltAIKIut4M8KRSbcGgE/Gyu1Y1dmztxiZD0HACsMAiEAwluryS70C5kAF/qlszba3xv8PxTA5Wr5iz4OYUa3AIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIAbtCRA9TVsSAnZWagAA0hQP/3Md2yJRUT2eaS/66FkB\ntYvycCerJEvdJ2ZtMnz0SR2rBOWDceXmopslGr/E7gaHMeBmMX4pJFuFEMo6\nThdgdFyTAkt2WnRrAKYNJyDefTzMBHcxmgSd5FFkiY+xcbfT6zy7EJCuN8KP\nx7ptLZZN7Rb9kx48bQXOvU+fJE2v4Z2KMAdD97OLbd/BAghZo92glxmNpldG\nfHfJ19BA++g2qIBDMWbfR1drY1nWK53lRtAe7S8HzKtMV95b5Tc0WyFZfHAF\nkk/WPGDLk1OrdV7hsyqv21EeD1ya0cjFjyqB+EuMrU/rzbrX55KwreKkoqVd\nGafXh1AGq+0pgm7NAoz8OkOecPvSkE5jqup8GYxDc//9Tf7pcQynfgLA78bT\nVgfD4QwbY6VgITA81Q46osCdqFMn8PR72asfZbOehP9zzMhjSB0knBqIwWCI\nj+1TzGm0aAevDjTOUATI60nfBNYvWL8gmR5CL7e+viITm19GmHHqdd3l65Ae\nq4wAUMKwE/vZCNyuSGu+2FadxHZk2jvV+ozFe6prwbwvdT6UNPhSPBp6RuO7\nfb8lC52cOG+STmV1fLSfmh4rOIx7BLt7rAAUZyM8NpL7mRP1UkRxdNYRa2xU\nVy0dRT5fjSsYnOxwyq3SRGxhd2mUqlcUCMLsdO3dZM35aR0pF4Q29hthhP8g\ndGRc\r\n=MNBP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.17e7c46_1595934444854_0.37785242842297384","host":"s3://npm-registry-packages"}},"0.6.1-unstable.3df0958":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.3df0958","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.3df0958","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"35b8c7d2f5bc3d8f5fcb1bd0781ef0d931916509","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.3df0958.tgz","fileCount":70,"integrity":"sha512-2goeziJuK3D0R+tj2GPTE3cNXaa8m82DixxEqDhMNwVx8F3/cYGUuNcWExS+m/els5QWBRf9gdlncpQHO+Qq4w==","signatures":[{"sig":"MEUCIQDgA8msh1Tso/UOr69eNwkj0XooWJQRaNHiaPQCoMmXlAIgWmQVrVXPiWying07MXOb1Ui28AE6XU7gLesdMECvwpQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIVDgCRA9TVsSAnZWagAA3IkP/iuydXNzP5GI5lk12Aoo\n/QlVbSLjmkBpIrO7Bi/OpMPYaEXCbc1UBMarEE/hlZo43Y3DcxY4PO68B5wD\nd4W+pTizzkskM03fuas0rVRnmgqX5pKJo/oNvMesZGLwusDAIP1mO0pOnn+w\nbtiC7FW67XlYV3RdxwgWVKQX7Tp2ZBxIjgXavg5DhzapUqUO+A45k/r6hceE\niOj7kd6NYH8lOVhJvx5aZPKnE0mDNAzHc73cmh0ThLiS0HrBBDm9ypVXCqY+\nabosVpyo5Tr0lBxsT9jvoQeQuxN+q0Zrf2uNjdT1ExUJpo/7fYf+0MXu3YHE\nEfeqkcSeEimrdtRoGjnu7Ksc5P03d0yfDF78IyDUnj7VQU6/OFZECBrFZ7/V\n+QFJy1pdWR02BgRA7GV2cSCWciiLUpIMWypHnD68t4ex2Qlu2zx8pUbOgYWq\nuqIhYpN9K8GxhSmwQ7SQ6qVO4/espdZ0fx+/Jba6E4QHtY3AzmdwDDQ1Ra9+\niilDt/Hp5jFaEfJp13NMXgcPLvD+DWZ3UimoEQejauoocKKNB2SAEeCSliD+\n8LJn8hnwjrW8o1iDIw+9oT3LWkrPmBei/XAk2YctTL0nGRjkkoyMPUtSNgTp\n7JZJxLenX7fEzm7gtoRyhBWmbvJOI4Gx0gAA1AtkyW4DiBy0SzyGtzeUiWNr\nCeHM\r\n=61jN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.3df0958_1596018912308_0.736852041682236","host":"s3://npm-registry-packages"}},"0.6.1-unstable.1fb03cf":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.1fb03cf","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.1fb03cf","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"713cde3194280c2c7521dcb0e45d3203054c0d87","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.1fb03cf.tgz","fileCount":70,"integrity":"sha512-lMpiJ1BcBMUA0KIWEXwk+v2TTXKua/Ph0ITyBmA56YDHxtbfUba5QWkR5IDlwJQbYiAWWQSKTQIkRrqC9Rxj4Q==","signatures":[{"sig":"MEQCIHKqfJ2LW+Mlj279rwxA5GdQ+pxFBc3nB3lQmh4l2JLLAiBj3oz9AmKRRbeISyLuo3ISSJJYCEwUsX/iofdFKhMa7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIVIECRA9TVsSAnZWagAA9pgP/0HqEfICjegjOC4Rb4ha\nX5/1VHZ6PSEWTndsiEYZD75+5Ac9Os2MEk/xzZZtuTH9PRRJkjnjVhUZ1HO9\nQyAmCgibwyMiGDfBy/mdUknveRh7Ewi5tJS2dcJSw5G4xanCFr3PLQ73gxFG\nOf+WBU/+C6Tgq8XmxicR9a0Q7gvSBQQ9KNqOlJBR5u82Eh1mZD48EP9erwai\nyd3kPeImhplOzqoYZ1bAgM8wbFLnILCxMDrQhl/1nDj5E8NaIqOMdnabTjDf\neBLYf/9MhvTEIzluaS9iK8kAWj6jbm2YCXVvzFvK84FO/Vn6AS3YCaKAdzpY\nhDEpV/K2y1f3TPKPkQkGhDvcY3+uzwcHShxE0a85YSlknZGA7M7YjLBxDH09\nK+n4Qy52BuqINF3Jm8Nh96A8FlOo9MQ5ImbG0HuB7yLKhC6OMMwOMZpBhSUC\nzXKhEZbg35doa6/Uz2dQl8BmnMba6fg15uKe+zgj4Kbbzp3/5MJxVfvjNk+J\n40X5EgQ55yagx+Hi7RiaPNDquJeaqvxmJJJ1xVUWtuDQC79EvHjl+q8fsf0G\nAZOnh57FoIAfukmrGhlNapF/XFVslwpZZgcUcagNlmpOzJGlgwJMG5P6lLUd\nWFC0zZpcQZnwqrreIM7ftgbKj++mcE9BBZ3LLCrI4jTyrt2OOtdll15isga+\n20EL\r\n=vaXO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bls12381-key-pair":"0.3.0","@mattrglobal/node-bbs-signatures":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.1fb03cf_1596019204034_0.9069527201325382","host":"s3://npm-registry-packages"}},"0.6.1-unstable.dbbd4e5":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.dbbd4e5","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.dbbd4e5","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"988495b3a8af09c953377a7b2f647bd2f7ae9b02","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.dbbd4e5.tgz","fileCount":70,"integrity":"sha512-HRjXbgWGVeFWQ9c3xodbCrGpEy1sRoPFo6VLNak2UaKdRPYRo02Y2Clmo1Bk6FV7VgCJ2eHNxlbPVAOOF/EI0g==","signatures":[{"sig":"MEYCIQD9gKUtu/yZlCAUm1NuCOHy18VFxpMtr5VCPiSZ0qLP2AIhAKpPSg78IMIZKhWDjXu9lwjOlc1dGq+iwI6HbxGhcUAt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKkdmCRA9TVsSAnZWagAAbjAP/1w53BweJDXPvQDbeFIp\nWYOZ8tetyEcRjIcp19cj6DfKrwr5Vr89Mij37Gr0cc0AfzCWCMIeYsfLkanT\nGGuWWtl5UEgwHSsJ3bxo9aY3z01q4GuMwPxgWvRowOqCh9rFylJllLf94ZU9\nadpTltfqbqglMpQ2jeVQSphO4MlC+fZXcKNzT65ZdTtM5FnAbzmKdd1RCn4X\nzpSeHnGLNzccF4O7EKsLCw2GmGzWqcMfvTIssQCZNpxS5q26/d19yKXTftyg\nf+yPcB/a43++CB7kj6XN4q3KobNsX4JUleryTHa7I7zWLqigBo0AFVkxnfxu\nO5C/fg+o0NJbC77NJJLv9sY9TFiu1jXaqO0jMW0Q0Ky5IsDsaW7OchqvLxUj\neszbJNLuADdYLpVYc5QalaGpf7WzEowHpaiRhleUnzkvBCZ1dKAj5Mjs/dcl\nrCK+081wniT3BbXmLM0XLUEjxCjAWA+cl8ruc/bdG/s5togMGeZMOe0gmcnN\nUR5/2GOdcPu9n6t+0EiYb3YPXmglgYDNvulMkngMDoaj7/faBbUmrmaRBw+i\nsmRWrOTL6emaRg46VcHUTvxC/WH4WZNq45S70r4SjftjUlqpmre735KmajlF\n/QBZIFin6dP/ik8wqtmStiB92BfUweIbP2/jZs4Etasm+nwTZZBB++3HMgXM\nwyi+\r\n=bVKy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"signature\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.3.0","@mattrglobal/bls12381-key-pair":"0.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.dbbd4e5_1596606309949_0.9338855295279027","host":"s3://npm-registry-packages"}},"0.6.1-unstable.5fdd932":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.5fdd932","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.5fdd932","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"ff469b6abf6f09b268ed06d312f6b4e8162df793","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.5fdd932.tgz","fileCount":70,"integrity":"sha512-cJ0DqZ830yS/ec5PP6bzp2ZlbkV9jzsZdrvZBCH+1CHk/Rv7kz6Fxcjh9FGiivGPYFAD7e/BcUxYicgghDovOA==","signatures":[{"sig":"MEUCIQDb+798E5MvBu3/dYkKY40RBWTWwraqGpwicux+6vNr8QIgAftSI4FI9B/vDf+krdk50VuayXCP2EAEWeP72hfNayA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOj/ICRA9TVsSAnZWagAA8oMQAKNJ2Aq0ZRS4x3nsCKcx\nHGpP9vKRzLCZORf5Io45bdBlEBlFbyXKW0kK4+LIugPg1UFiTsxCUZow6enh\nJPop5dx2eSzlHCJTJeiQqQqmRXzUPgr+j+BYx3Mle8iD5pMiN5DZtOFZ/Xgm\ntsFgj+5LuaE7yCYKFDKSH1t67x8WW5O6s8LKpa/EDyxH5qZRHlGwUfkWKahL\nRJtMM0ra8zHa7RhWIUhiSsUOyiRjUMzdXkIjD0qlnTcZeegCgf/DBsTsrpMh\n2ZJ6MRoYWK0uGsLLDCwScITSYNloqvXZWhZrT0aS7gN/7y2R25gaBTqDU/KY\nbRrviXNpxtO8rAKGbAVYPS4ttng4TNq7knqyDJHlx7hfx2A8FwWes1Em+cCT\nykngEijs+zByvQ/GjlGc19jWffo8qo5AVdb8KlJY/SEtCcH9w+xlXBJOO/NS\nppb0HrUulBPHGlgEvflnwf+BTCWgZVo7AyJdsc6OTYQCVx/wNDZeW//9s275\nbDiyfX+nIGwzJ8CRDEfnQnkG89rARtwNhX8K2MvDKlLaF8rL9WxUyXsmGxtK\nDyuHNQL6boVWbwEWOW4GQBfgXp8umhVS+KBwKs8RHCB7j6C4ij78oRszRpI7\n9deFWY+XVLAYcFiRwQPtkniwwKlWFwQlaIXpSQup1mq+T37VION2yXRD79VS\nRr4F\r\n=RRue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future. See [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) for more details.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.3.0","@mattrglobal/bls12381-key-pair":"0.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.5fdd932_1597652935918_0.792577354706798","host":"s3://npm-registry-packages"}},"0.6.1-unstable.540ccec":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.540ccec","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.540ccec","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"7c7f3d95f3b5756221d76e577dfdcec0c9fc9ee0","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.540ccec.tgz","fileCount":70,"integrity":"sha512-QNnTQ2MGqYf0YWUO8rn/96gkYEIpvrixmsiErz08PRNtiRZfZY+u0DlQErm4WzG8ldND/ysw5Rto6dI7GcTwCQ==","signatures":[{"sig":"MEYCIQCbvUfGzW26bmv3jpvkRRP46KuU84OOmzHpLOUpENXzaQIhAMSXFP5usb0u9KLQolORjUcPGirG/ExmUrzgbM5Fu3wi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSHGFCRA9TVsSAnZWagAAE0QP/j2O908vu4QDUKbv+PxZ\n2Ms3MJFDpwxs6cEGxiQ5Wd4cno8ksdojqSb6btfXWWGB3Klak4xVZH8Lxcih\nZEV387gAqrUjAV+Umlb5Hi22h4Kc6gV3uecnEowvjC11iJIFkVEAoUvsYSgk\no/a3Bt0GQqmWTjUx6dRtaRaIvqtl9il4uxMa3mGZ6hfTwXBSILJFoVA9lmcP\nn+Po5qEQes3GNs7mjwBbkEozAVBRJrfO0ay2DRpvsuWB28krGGo4IsZpAmK0\nN8DmQMJgkas44yHM0pIIm+AZNHc2Dh4v04pnEa0EmoJT6+J0osR76folEBBq\nXrWghQBLxyBRKIQ9NWiiwVitfzf3ITCcphMsAGoF0hCXEEeN9iUQJPnQsaXo\n5nmBOF8TeR4+GvMcem3yu4NI5bgYm1e0H1fDl0bT+vWGEaPjvACeZwhE6/C+\n/MniNWQ8wKhV4RAKSziEb6LV2PtYqcmleTSnnKaTw6/yqlvXB/AsSTXi2vvy\njmgWzyuFVa+qAHIs3F8qbVFNYCMj8PHhBGtmmaBRNRpHcjA4ROo22y5uf0QR\nnodZBhKlPp9L3c12y/fpGEorYAsYMAajAWqLXeiZiyFAYP7WNvOSeSuSCrIa\n8K3wTXS5vgh9wBPpKwofIuThHVjBHigVla6ekArV7OUwDIL02oED/Mw16Ib3\nQAte\r\n=WWYs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\n**Note** At this time this project is limited to working in [node](nodejs.org) environments because the underlying cryptographic implementation is supplied by [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures), however we are targeting support for other parts of the JS/TS ecosystem in the near future. See [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) for more details.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.540ccec_1598583173339_0.4829289481814636","host":"s3://npm-registry-packages"}},"0.6.1-unstable.fe225c1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.6.1-unstable.fe225c1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.6.1-unstable.fe225c1","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"fac29c8b28581fd3d5a65e55c2e6ac9675c63cb3","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.6.1-unstable.fe225c1.tgz","fileCount":70,"integrity":"sha512-QP8uqanMToep1W2smF3YpK1k3iqLQa58aLEZvZQbDus/etEOK12FCGGDMWdAQzyTNSv02Ar2tzniiksg1fDuVw==","signatures":[{"sig":"MEUCIQDXeg4pTdCroWwN/iTaMrzASizJOusECYvwDzwPI+2HyQIgYXz2CA+sQhwyMNZrDxWTrflzJOZO2Hh+AeazOOUbjMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSHX3CRA9TVsSAnZWagAA7goQAJrkBbyDEob98Cv/1Pmn\n6uIbR7GNIsEPvmG3utQnq6FnkoqrGXSAJUNWO9J7a3s/Gcra7x0kDW2yuW9U\nVMaBYoEIiT370EVzdi8cvi9oIUYGwPafyT2HuG4qszoDCwGgYSHyHU8hTuUa\nrVpbE9NCAWkUflN21951XWg03R0jzk/SMSO+5ckCGN5bQg2l9AU7+zpZ77/f\nMl7tRA2O15BsPOyMXav/2euOiT3MwEFQPjrkgmAac3AUBj4mRrRDCpy7pTzb\nPDWe607MY1XrP+wvUuZtbydkZRJCAP9MinT6OlOJN3CgmSIiGck7imhg+vGm\noFfLumrl6it4WpxY6ODiUrqep+HNZ62Dz3CQwF1IFpqxVDfCNeEkz5YJcteN\nmh0H44FSNwS1kKFjQiKCmrXQs4tyeYXg3UiwBV3IPWeSPGep/2g3SpHvd6Bv\nUiiPVOZLkwQNuIoYc0kVfWO0MjR5bKniwRuGIRce8xTKfTuHUITI7h6UIofJ\nzpq+h7g0xXTPaWBNIovkOZoi85Z5e6mSj0UBzhkgzdSJueW99vKZUjRMtQNn\n0cdvhiWBEzQEGc26eiN6lDyEn7QmiT1QFMhkCDnmGJGLEMwtlq6uY/D+35KR\nZEnDoGtrjAz9Z58zkka4moRFjrLLm/XjVTuyN0FJXWFuCiF5miFNGKzxZHBx\n8A1t\r\n=NY2u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.6.1-unstable.fe225c1_1598584311163_0.02381905347508706","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"4cb694883168c4d1c559bf96c76672c3fea71759","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.0.tgz","fileCount":70,"integrity":"sha512-TAxFtevtKtF/t2yhQwic1/Faz5u7bBCsz8skZp1ASCARhUJXACIlxPKKVqcIuzHJew0zJHW60+GXPmKB0MJeZA==","signatures":[{"sig":"MEUCICSi/iG4IOxePvoSM6VPcMzSCnZl2J+m0d5NYoAU41JPAiEAztiWucQ+XwMGX10MYPq21LFNhPg3izbOB43EjZuQPa4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSHmmCRA9TVsSAnZWagAAeIYQAIU22YqcLWLPrkJR5Mle\nfZTf4SPQgu0ZwqZCB2a6ub1SscZEuHYhLldJr9xZbcZ6w9dTzMur5M49L8SS\nQAWLeS7ENQpzwm5Tz206UXMOS0MuayFY0GiBibr2M2JgGsDcuYa4Q/0L3BuZ\nFEEpQ6Gsx/Mea1RMmIiH7EB+Rt3KN84hnZOUohmtu1Vl7Ymv10hoTHlHz78J\n4TAeWuMiVaf3Dge1A9cYItywAvlw9YNG+g6elxFY74V3/GRWVhWQ3uAwGFmU\npPdTKxYHG5ThUHptm4HbN6lZTYlw+lf4NH0ho7KohbGbOF16upqUo7TUcT9C\niEbHUcZOuw9Hnbhu+kq8NKN/Sj+Sf4MJ70R38Lwcrwifvq72gXO3/qTYr6TF\nPuJtKVRjKQ3zQgAD41VZ6TFXnrS7MNafaMO4gbdHYNCJwlARm7COUK/d6QX3\nGV5lJiR4bxYGyml9obj2ZdvgvbWWGI8rvz8EOpbP9Qkt9DlBl7Id4Yv30hJh\ne/yXvf7t0re7rXQOy1yi38lNvuXOGZw1DwlF/PM1ke5znhzbXQ3vIL0vOeLR\nPQYOJ5tkZ0vCTWFTLfOKWeeK3ZEPez5wzt5Z3FyvLClX9TpOvPtaazRvJucm\nNFHSad3isdywR/Qs8hSkM6AaCxdmGefhp1JFeQDbRnArG0u6laRW78r5qr+Q\nk+LS\r\n=r09L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.0_1598585253696_0.674901737609656","host":"s3://npm-registry-packages"}},"0.7.1-unstable.c66d438":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.c66d438","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.c66d438","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1eaeb7c9088363af2fdfb355542b8a793f570e38","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.c66d438.tgz","fileCount":70,"integrity":"sha512-sXWaSsTfpdqzckUiBgxybkrx+PRXNwVPBd0BgqonH++AJNOWohBU1RS0ExPSThSdsqXsvUFqUyMFb25Wj3uxUA==","signatures":[{"sig":"MEUCIBR4wHHGb+zNLOgCIrzHL5TF9ACLpJFbKFt2d4PIIinmAiEAnjqbtC/6D+Ly+Avy7ktUxw+ingQCWuzasGaNoFFbQEk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUExLCRA9TVsSAnZWagAA1VoP/jjzpWZOpIPFk9CZwE8P\n36xVkb45K9OAIA4AHoRER5EkRrRVlXmxEDvX+8y5wgQ9NudF3WTbe7aMu3BA\n99EFcwR67lFAFuZe3jHOz3hEe5m5JW4JM+BEOp7AgDolCGZsb5fN4rmiKhEh\nW+sbB91fioxTby87gApuKVgO/UhGO8LMxXuuq6ChFzqi8es6Xg6N6tYqD70a\nH9acUmBlLoqdsxB1yLJmNNirE3roj1WtchszYE3BgkBn4ENFEJgPBbzflxgV\n7Jgy8F0rqbI0fcukEWfb8h2JV6CXpZoRnwacpR+Q+BJXS3doSDhVeTQobEUE\nPOOigLJVWglCagZ7m1tQumzebxt1fuRnbnqVPkSKJrfMzrbUPnixDSQdixRv\nN8q8A36Ij2tIJpzGFMBWtdTUBF2gqIxpqhaQjGprgamiz+gzPDgSDq5SvOdW\nZGVBZHU6ndOOWadvM/lgGqRMQg0zIPHKZInRWlfp6/wBOpYmmBquFyor+6wI\nNGOGmL4WHV8P3Eu33WVHYcnOS8ctp2SWE3jlczqWYYpdw/yxZOulHwE1b61v\nUvPJxpmatIQ/s+KeNjggD09tcxu28eMgr8IMSj+pyNl6tcY8AK/DsxCnx6p5\n9b+gW3ijbiVUY1GjxzBFKeyf/95O8lqyJyJ0Q+a46vEaD108TDjuXYSFtYyz\noqAH\r\n=Vq/o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.c66d438_1599097931341_0.861264196871913","host":"s3://npm-registry-packages"}},"0.7.1-unstable.38747e6":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.38747e6","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.38747e6","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1a0b773fb917ada394654a18821a58bef50247e6","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.38747e6.tgz","fileCount":70,"integrity":"sha512-obf6Xe45agPWrAZrh+TL2Sq+v5gq9qaIS2fLL+dXz7lSQbDgPv8G9Uqupz+8RIyePFIoNaJvQjo+DX6a18VcUg==","signatures":[{"sig":"MEYCIQCJ8p3LtZMLwr86K/RBEwU6hvXwzTVkngsjvEl7PJ107QIhANI/8yWzKKzgT9Rw4RvSMZ7wWpTRDLLGTJhGVWLxsrcG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY+WLCRA9TVsSAnZWagAAHp0P/in/FJu0DetDtOWuYlO2\nwUlA9ltNRbYRBhrqGPV96eUMKOANQIUqk7MlN7ibISUeqsQ2v4jGpzcAVkZp\nLDMOPSLC2tKfZi17aXDP3YHvaTn99f0bDV0G0OIOhkZCMhVCcXfh4MQkK/CJ\nq3l3xXamly6HDEm2bLZ5wWP4D2NDRaA03i5UacmadfLqINbzpfrJWGtQFmK1\nIHy5sBaXlwDcXzNR8KWD0wHCohaXPhsOMb6aJiYfwNiFzXIOlYDJAUxqbeP8\n0ZjLfFasPFhMqaF6SY6n9kF7XrUbkpThLE5a6rNP1Qbwwy1reUblSaWbVMJX\nTYgEz2UWMSW/edxKQ9aYNhAjnZ44PAruSKSayACNpYUT99mSwndqdwOV++yQ\n52l+ksC4HU7TF7vB+kPpfIZ5rLOUzkfZY+wK0uMl8barrjd0e9zL8qNJ/CBR\n73F7p3T97m9Z/bS/PoSFcVhJIrBN5BZpjGzUt2ePXmvvz8Ccf9KOmasVy0OP\n1jiSct/qeVIM+HAOWVaHqxinrQ8i1k/PZpYTE+JxQ40A6GCSoaOZ1dHnBjS3\nd+FvSoHQVxA2iXbWBTyufchswaxqDY1yrWxF3IGUiqDjWYQbnrHcZ416/1D3\nIgePBlJs8Jp5hQKMjUu61fydXXTFGfCHjZ7GKT6edxRuBsqqLeu5+ZtQrEOI\nGP6G\r\n=BeGU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.38747e6_1600382346663_0.6459973751061001","host":"s3://npm-registry-packages"}},"0.7.1-unstable.55c8eaa":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.55c8eaa","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.55c8eaa","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"66226e83db6ded6687118aa6bb7d996f786e56e8","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.55c8eaa.tgz","fileCount":70,"integrity":"sha512-ePv914iaOf7zMMkr1hj2dTi2OxzLNMvuYcitI9+VTURLdRARsUK3BMoUovPj/ZTS3dC9YdYHl3xaPstx2e+OjQ==","signatures":[{"sig":"MEUCIFTiuixdxL1kCQnHwr2gF98gPZcQZ2U8tYurDwbPGUozAiEAzSudsZIqKapneRqmzASUGxL8cIk2H3q47qGC3AaiTJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffSr9CRA9TVsSAnZWagAAt6cP/iERbvDtsdHWMJVTjK42\nQd3hfaiZgnKugkxw366nh8kfxFxCikRnlmSeaK4kxtiFV0yifW09fkRx0KfE\nUigPu5rULCesTA9Nm8WMGownJjnUjq0xVhNRGIZsIpjPV2KjNB3qScP2fSa+\niFOLC/1CA+dCfeXXTcuKAg9eeWcey45lmoemfJueKeibswDtliqp3t2AGpSU\n2WuftIZ3jCMF4Xz+dz7OL6hD3E8XBBa2ec0M2LFYTOPpCjG7uexoVn2dpbBp\nPIDYs1RcUTAZabRPfIpUEE7qS+LE7mpgiReV6r9JjiueBzZ3P6UtQXr/us6y\nR8bbCCGfbojWRtWFcB0DiuFPxjGCiSUO3KXeFMffXEnjZgRFCc669yWFBMxK\n2H4eC5zIXZDsLp2qe/3S6romBVuAnjzhdeLnMXZ78DzSszujfMUhpNbkgg2J\nVtZEzvFFiPj/MagtpZ6xlIve/hXdzmGJJYWhUZJ1ZmgyGzWM0qp+41+OdGLX\nVfaI9TntVIiYjFrqmVsdvbbcqCRfsoSMPSKWyhhIT+q7EbPvRk2oQJi2SAJm\n/Whf+Hug24/MhMIbDpwcpaa1NeH+/K9Yd8MUo5FUSGoKOgMGX03aDRlkiJHY\nv9aQ4weM6u/UQTaqc3J1n1CbIOKIQ52hXNiSYF71mXng+fzBbzaFsDkDkZ2L\nH1Ad\r\n=to9w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.55c8eaa_1602038525152_0.98118149009799","host":"s3://npm-registry-packages"}},"0.7.1-unstable.2673a0a":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.2673a0a","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.2673a0a","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"64ad03836af9a48624a9c4738941d949fcf2635d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.2673a0a.tgz","fileCount":70,"integrity":"sha512-vRxp8sekGVEFwFVAINVwm0ndCIzkN09lFIlEN6dyc5uddF77hA3gdD8d8XxVQjHqnFvAnu4k0ie/CObNff/vOw==","signatures":[{"sig":"MEYCIQCvDbOGLma0iI/UdAcDUTPmkK+CEPeogxEAs4rVai1F3gIhAO0hpxl8DHDdflU2YYkQkZIc0L6glrkLGliMm3yP2Rp3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoxNACRA9TVsSAnZWagAA0JwP/0tero1Ixlhn9JMzNmR7\noIX9C26wn4aUulgCOKyH76cAGr3BhrPKOYeZv3m2N5KKmdO5kVjhooFaWdFW\n9iVSSfPA30n6lkrtTZUiknYYvWXcu+MKn6XstO1SWsJhoPM7QvJdu+28R2gl\natQLfViZXluIE2JHb7BbQJ2im5YgpCL7L+qtdEwSTdMJas96Gl/LmJUYSjBz\n3KSKxv4u3DoTh1iR3GW3wQWcQd16MVVKgVtW9y/+IyAfoHvbJLLca4Ei3oAf\n+k59F3U4zm4L46o1GfMlpb1jF93DcQ3hhvF9PMrC/oDbhdAcXuhZNJnEdZUU\nu2GO3C+j2To6sWDhLJ7bS3HSW/7mwRkqVoukchDxKtQMVNxzhNT+q99KcSX8\nhrfNRJ4Zz+gqhq8WbUzJ3K1QYdcNw1+ZnJsVt6Jq7fuaHLOITad+M8F2Xw95\n579Fp8EpRSOzmNtbZLLzYtpLsNEBeat+/GhEZlGX2556awFlqUXrjlDfbHEo\nd5nu5eIJqOtyOfx6ooVss3z7uoFqFQAEHtb+sVC5FsuSERwAT9HHPa7g2+iU\nSHZisvxGyRP70hA814QFQZsXJiQR28tuU50qVEWZ4CjXigE9uCoSLuczIP+q\nBY1UYkP+HyYFYVgwgQ+m0dR807+i49NNHUwPxQsq+C7zEFWdVhNJoNqmYzXG\nZ1Nj\r\n=riEv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"![Mattr logo](./docs/assets/mattr-black.svg)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.2673a0a_1604522815367_0.8647233665122669","host":"s3://npm-registry-packages"}},"0.7.1-unstable.9382ef0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.9382ef0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.9382ef0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"4d228df494577d8e55f0764b63041481ba07c201","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.9382ef0.tgz","fileCount":70,"integrity":"sha512-lStnGTgO6MCWC9ABxNt9TesgKqRXfMQKbptJYIRTe0uTNQb/ZsPZvin081N5OHBdLoBATaVORoyQxHjHUgTzVA==","signatures":[{"sig":"MEYCIQCcWfpKd6qwr7cM+Q+7eBaAKhyTPQdSFyKmayuntE+zvQIhALFhjkQYLWxKySaHoloaGhywSrK7/o5+GSIYucPQOZzT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2ZC1CRA9TVsSAnZWagAAVoAP/2XlUyKKhtfUpM8C/UhD\njEMwdqC+uQM+BF/zmiH+i6CX2S1AbAfvnCzA/YEKH6s9q3xb5S7VS6sVXSCV\nHIfpQOix2mu+JfCmP7v0AilEd3cx29MR9+8pOYMAxranDfowYZpHwncPJ3xt\n+jaEcco5V4o5FvhobJjDYAKiaJpfSpuX1uo3tWG0GL3O2f47XBMpX3mw63zG\n0iyT03LHsVDmf5ZakP3G2Tg2JTEzTH32DUZyH+eCwXzV5tlfkU7Uf4HoDPU4\nZpTnN3kMqADJAe8GIv2eBTvrMeKeg1wydv4K5C8Q2uvIjpyhLfFS2yR71/sZ\nqekLClCRnRBzvKnxStkHOc9nMWfn38JA2TXsvANDBeZNOyiuYVLsnzj0pH1U\nY/OyX+gWJia4Gphb82ux86xGtzQnQqj5QxDUSTiAF8HwsBTFhGQknKhqstRZ\nyGsvW/9Mwji7t0cNiZnNmcN70SjKc/kwQooqbAG06SVRA7+a6FPYVWVPwA/U\nq8d6uUHrQO1qWvO+ZiJVW39TztFtbRxSfW8eWcG+BewuBMfc6XUrzYPSm9+/\n9eg1UCHiuCcBa8aOHNKPjNnq2v1avOzHadHtqoJ/qZGwzRtAxIM9n0aFZjfG\nupRi3n1B0VFhpV4ZYMriDj0kojSfLzNJjNnQgemys8UdxkDZDBo6K702WVhF\nN5ep\r\n=1GEH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.9382ef0_1608093877362_0.2740858404842077","host":"s3://npm-registry-packages"}},"0.7.1-unstable.6c347fd":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.6c347fd","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.6c347fd","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"0ca89479077c7926d7a674ba2cbf6cad5a0a75f1","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.6c347fd.tgz","fileCount":70,"integrity":"sha512-6shPnDrFyyZiXjFlIgkB3FELhB4y1LWq7BkZlZn1bjNoOaoyJmyfAjVDBUkE6wCzt0XpXx4/P3Jj4OZZ8wABrg==","signatures":[{"sig":"MEUCIQCKqzcKaLBSDfe6ZKg703IPqh0aMmSuTIeIyFxcR9Z6GwIgTFDNL9MBqJ96bUvoa9Sx/owas4zy48OkqKFTOqaiMg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4CEtCRA9TVsSAnZWagAAN2YQAJ3f8xmMCVrhlQevdKSs\n95iqsSjy31QrxV5RdiBKFj6rK6kTPp2c6iT4Oosx8GDijrZeR5cB8jOtr7mv\nK5p6shfE6MhTaDtCjgc0QmqeEqLMB59gJGOwIJf+SPO80qqY7zcBBO+GSmaC\njXaRwfk/MQ/NhqJB1IReg0g6i9qD2VWN+GK5BI7ldSv9OKfTfeXkeMoLnfYv\nG5YnmtlLl+d8L64xaG8ZTfPkLzxJVC53dIejfSpzErkQmHLPBxpQ0q59mSi/\ncpCKX9qhkULzUcyYifgBtHIf2vXkFgU+vavWx4k9SujqrMHjbbE8I4VUDtCl\n92yf7QG5GZKb4tC7e3Ej3ox+yx19dEo2MAh+09PokvqaMbN42KKkC+h127n/\nvz3tEDq9uuB3ArYUdturAx7EKvc7muQIoqVBssmGN86iZcBd6CT8+GzOYPut\nmI5ICMeU7p02uDuyFd1M69GML8VpqXJr92BOHruO+CDV/GknaxMZMqEKdIfK\njUcTuNo925vYlatqPhSOBM4DwIpO8ldn+Lf4HzMUYBkT1YFhTxU03oLSL0Lz\nLX+f0y+3OOs4HkmEdIdkYwQui/WmtoNx+zwfFuAxEoB1t5Jb5AboJ0Zbp1ZV\n2ExsqfP3gBm8ygKecVeWB5yZRwHjNizTSKSQAN92vQNgmm4Do4t/0TrPHdWU\ntbmI\r\n=UAXz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.6c347fd_1608524076923_0.1829823888225579","host":"s3://npm-registry-packages"}},"0.7.1-unstable.2523b47":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.2523b47","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.2523b47","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"a30fa2424a8d8ccf317fa6538a419f5c3b010b62","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.2523b47.tgz","fileCount":70,"integrity":"sha512-uaDWIeu65C0J58KBZSIqOBjM2e3X1Ihv9BviGC+FXTA6Vdp31gZAH44n1M3eCED1hxDeRkdtIEB3hLUmpc+4BQ==","signatures":[{"sig":"MEUCIFrIVuTEY+NljRW8EbB8xBTzNeU2zX0L1FbbQtkGsAXgAiEA7Q5wTJIKGyZGcWVCoUPR+hmPCVldit5eZlGQZTw3B/Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEilACRA9TVsSAnZWagAAVzsP/AhnUgiScEBVYeNn8IZ/\nl02iRHdPc0yBcRrf8HF7VkL9bYS/9oYi4h0VbDF+HBOPZrscRF7hcAk8/F9O\nYiUriD2O/uvZTDcfaMtVGbK2XMlriDPCHo11MU/q9PxwcNTG4V2+blqYdKaA\nIPlk9wyWyx1pa0ZP4UIymWVjuLCEvrMGvVOM2lZHjWiL5fvWw3mcmL/IXHA8\nMB6IfPuynwLk3hb12iEV2LkHDawYJncHUibjheqWqsyvEGbxWsvrhVlPC+7U\nP09RU7h1yx+C8W5kmYoKDy+XzP0s0ZVPi4XT3Db8zGEbPD1c2tbDeMuKteAh\nc7A3hQdexV6fWafZRRrBM83uYZw4IX8iyTwt486puI+HIPlzovo67wegpv0I\nCZ5DW4bq1Oq5yHySSkNSpMx2PiQHm0nsweeRjuKol/+vQeNoz+R11piXrJyC\nRiyV/YHCOAoYlJl7Pu715ci1Ft/i/vLL3ZER7ZpRR5MUXNY0XB10CZsZIA/N\naEYnWFxGMIsR7bwW5IPhWDp/yGVV8oTkfctfe671udgCPx+Ns5mUx8/rlKSo\nqdCT5KFW6/rOFIs3dCU1aiR1PoPVx4BQxS78EHjafbGkVgbppGpyuTKi7q46\niGnns8uu0mxVS2iEFdL9bHTYBUyVk9g9kd7C2UkKMUuS02kXE+f4ZIIdr56k\nfcj5\r\n=Zohd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.2523b47_1611802943539_0.8707776176925972","host":"s3://npm-registry-packages"}},"0.7.1-unstable.8d414d9":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.8d414d9","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.8d414d9","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"eac168a90a2a0207fed1dc4710b1f52b1c462a04","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.8d414d9.tgz","fileCount":70,"integrity":"sha512-t888TPopqBR0nTD1G1F+xXu0l3yhKlhcDt+JGR7ubMyICFtERtMpk8LUDCWTIqVkKgMeDgH+0VWQicCKDgwv1g==","signatures":[{"sig":"MEYCIQDU5k/acEwxXcj3FUFe4Qwsm4UiETUC1gyA4SK7uDnLyQIhAMvREH59azMpdGAgCinOTl+SSnmRdz7QGJHa3k4xgkuU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG1RNCRA9TVsSAnZWagAASUUP/jMVAB1/i4+HfcihAfmr\nJgAi/2PYgn+wbUrU6izhFIvSLk7pYQ5xsPFVdn1LWYlAr10KLhevnESPzb1Y\nrutHT2AxkMu7xoyM9AH4tnoRn/Q9bjkGQ9wnOXeYMtTApNwj7+pJHbANzDaM\nF2DUX8Y7GCS6sKuiW+AmIyztoGlWySU2al34fur0GGbEPXLYKlnCyi2N/B++\nqE1WFQOB8NP0nfgArxo9ItoWHRtXmOCCQRHGp9rN2cV+94NifPnS7OmpNz49\nbvXeltY8JaXTsss4Fu5Wf6zaU3/uewer2wwr+UopXkhtipoInAPMbObSd7rl\nOQsZWjOVeZnOTx4juE64vqUrNDxhj4gYhU3Uxivs6AbCYO4OmhfqBhjDAhmb\nXLh8z2JlpaaKyXw73eTTtqx7p9Q/Co1rn6LUzKvQ5iYO4bjOCTP0g2oAOF9I\nSYKkE68ts+zY9wzVxzUnt7hCYYAkHcgNKnTxEK9guLWOZA7ZFHCUh5gpS7nj\n7g5oSGlOP0jep8TdoEC9frPomNgtYhvEn+pUYivoYbLmzgv91WQAU/khDVVk\nezkSvVvrfsiUqmxpoKhIfpSOOwa1HezVDmWf0M3znL26cWXsoOYIZoZhNty9\n+TwesdoEVZvoqEOosyOCU2lNzLnRxaM1mlMoK5lf7taAK+2RVkXNlZTmnbYh\ntIeW\r\n=t7GO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.8d414d9_1612403789023_0.15720358574748472","host":"s3://npm-registry-packages"}},"0.7.1-unstable.1175e97":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.1175e97","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.1175e97","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"7686a48421b0ae6e78050fd64307412152e523b0","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.1175e97.tgz","fileCount":70,"integrity":"sha512-23FrtFNRewuRYvFxeWe1EqK8UcXl9BMecNNSwaWW5CFfZEX2ERq5qLRfk5FQC0w7+1d3Bk5FFgzKZAK3OBEk5A==","signatures":[{"sig":"MEYCIQDu7p+GuSDvcSIVZMZqgdlwx4IbwiUJdP0tPGmIr22m9wIhAKAft5SQAMn+FaTSKroF4wbu9xaD3jpCupHJKBNKTuql","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJdBGCRA9TVsSAnZWagAARHsP/1kKoub/309GUSC7jClK\nHYyryMiQOu5xFKcC1hszfty6TOtWTeElAmUK6rNxJ1XjGo0J5/ZRkcroSKVu\nheWo4Y/cCoNj6xLN+ngAWk/LsO7o4B3zpK4Mwd5y1ypqu0KJndy58i71qr3j\n0tbHSeTat1jyO48G5uEpVgcHViFQ6wB3imsfyQcoZmlFf1AW0dCKwzPbQL84\nbUFAqX7d3dxPGuY3zwltwinwxWPPdh9WW9hBr11KbQ6QVPARov6LcBJmx7us\nY0/0ZztHM/Kf9Z29n82hg9Kig0pNXzQEUQslDczxN7OEqefTgI/QtDkkoYqX\n9mU1kJ7PvxdzmAhVljKmkFBOkHexp0CHRe+uaaIxK4KKC3Z1D8/AuVqZzCsg\n37sKLn3UzNBxbqZPFSbVZGz2fV071+TqyOw5W5zOodZ4aBQ6fxxS+Dy8azx4\nvSs54R5fmWvOem4TIOUSAkSnCvaZHx2Iqdag+IS0DY3+Ho5cThIHvB+TfvCf\nUg/P37ByEeO2SxsCiKollfoOHW6mOI3yPq5As6LzTUleLxOILuK0w+nKbVuD\n1PsTbokk967IonDtewd+zP9CcUiYErtJ9bCLrkjLf3k27+O6uVKnSHkMR5Zu\nHc76uSHh2jvsB023VkvrbAGe7L0SQKVbWeIU05xKIwCr+Ly3u+5l1j7pSBcG\n9HFm\r\n=wPFk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.1175e97_1613090886110_0.7631123655346015","host":"s3://npm-registry-packages"}},"0.7.1-unstable.7b5f541":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.7b5f541","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.7b5f541","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5a2773340cd0ce72357a0d2cd26c100e48a62ff2","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.7b5f541.tgz","fileCount":70,"integrity":"sha512-RvSXc3K9yO7G70+ZRMKI1TXPdWJ3Jk0xYqu/NBjWLvcZjCmQBnQD0wBD4JBlDcUZC5TSTH5jGPcW4r0R8MWrfg==","signatures":[{"sig":"MEYCIQDHMgxQnysx8wjXn1HV0EsKBt0O82upwtd3u98cPPn3iQIhAKcRKR2tNHykeLvzLK13IFGnn1G3Sxb19Y7d7RTB1Hfi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJdBMCRA9TVsSAnZWagAAe1cP/1fNaDoqvhvqTk0sB4JL\nDdRqhOD9UhdhaZcCrKCpcKNUN+a3IvuCRBR3rxSu8GukOem4w46ekka0PQiF\nOwftwglpmVA5llwgNytcB04m5NapA31yAB3fqBYUPBg3mjoSQnGp6J2wPKGm\nvC1aLjhMs7tu9BpMI57LmJTCFFCXR70GNnXm4OuQoptW/fG8DxLQIak3NOYo\nP3+f8oMvoOQNubJhgtctldtXkKgnI9fWhaMKuD6hHHh6Bdq4DNXeNoNUZ8ek\n3IrRTKPXzHgUdOOAtDUFhOrhEIEnm4KmfKK1FMix5gEH/2tZ7s9hwd4o7iPk\nSi4Is37GLZOvMb9B/FpoaZV35ptsRDCcKJMPSGbIu2iEMeWLiMKRDLMeBCu+\naAhccuQKzWFPPhP87CUUnZ1XoWl0y4xqhN6uIIfLU3gIpDN4qcjcW4Ud1Kyt\nYUOuM2ofx8aEZuZePM5mutF3qVy3WLxfOwki1gJgWHXj3XG1iaN/P6KkNoHA\ncmuly6YKbMihWF+7lrXrqHQx7bEoYZLohj+ReodN1+axmrjgtGBNt6mqv4ZV\nKUx7FORtIQHQNpXzT1yVV/npbZUIGZ4wokYtEoH3O/SVl5Z4j3QpbxKTr3E+\nNN6LNpaVtfY5zSDwGMp0Zdf+W54mvwKzfoFdWUQTRWBGkppPS1ula8WYkGi+\n222E\r\n=x9r4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.7b5f541_1613090891620_0.1632795722530711","host":"s3://npm-registry-packages"}},"0.7.1-unstable.83d3170":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.83d3170","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.83d3170","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"3ba24d211d7eb88dec5019ae10557d36315e589a","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.83d3170.tgz","fileCount":70,"integrity":"sha512-U433bIyULdSlsKAyKfOeoJhkRpHHRTd0QVVKQL3aiHFFr0zMWdlDYu5Uvkm1i4c7caBQ/ctuxgnycN21hsYgmQ==","signatures":[{"sig":"MEQCIHYHDNil9ljy67SxexItp2SqkzLD4AMAErzOJZZdjiKyAiBAXVLfYeN414l4I0FqQk1OLNkpwbFsX3SDcCgzWSZ/mA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJjnZCRA9TVsSAnZWagAAl8UP/2s4JF5gbYheq3JuE3MD\nKN9T0fL6k1eEUjDDV85ojJYqC0JsKAwzHetGfIkhQhbU1Bkk6+RgQQtA9V2T\nswZT36xOexdW03lV7sbuw1NpafjQ4gCxeE/LGQUAkCccVWShMjde8T6aYmle\n2W3cWwNVmQjLUR/7vQ7Prkr8+clYDF52sJhssiO8f802fk4UxoJh/qDn4q3C\nSSx8rmtTnjNegz2ukPOnq1Co/GmqoZCZC/rBQvNhsb7566u9avUF6SmK1YNc\nC6hShu3Nfi6mkL7pbQJkxEBmzrzZ1tTk5c9ZqkUGqugt7sb/z4LTIAVjQ8F+\nmpJ/cliqsaHkI8uw76DMsSulZwlVuM4sxvkAMfv60+HS4wFTIzHgjztubVwR\nKkbMdYLZ6gju98rKi43DpD2jD9+RmEKuvFRVUnblEgkSRW/ozZzSBER17t0V\naaIIhE63UHAcFFb9SO9LHKJzsW19ucLcrjvypl17QsJBR+80u2cjW6W+TN5R\nwE8AgqanyP/YQ+AgTFlq4bTsV/kOJdencHagsIAKAm4k1f4YbsidJCnLrRVA\nurBkrU8FO/BefvKa2Io9mJ4hKs4R4VRVKE2aoWd4g9fL4Y8+FGSrNj+sz82y\nyMoBuPKeq3pg2WAfqjMDUUrLm6rR4msyl/whl9tcKy+qrMv/KI6PF2iF/mRk\n1qqi\r\n=h4CM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.0","@mattrglobal/bls12381-key-pair":"0.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.83d3170_1613117912590_0.4151176798162419","host":"s3://npm-registry-packages"}},"0.7.1-unstable.01000b4":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.01000b4","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.01000b4","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"b6b2ea54cc2268d48372deb36e311ee7839e672b","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.01000b4.tgz","fileCount":70,"integrity":"sha512-dD9BJEjfWdAbMPNSra2wbR5kW4Rwa4OlYPaKMUAexQULGRjMKI9IZZ016dRgqAqJPWMyKzInS1lWbH67GPVaPQ==","signatures":[{"sig":"MEYCIQCQQLdX9h3Du46dwkNw44iRAgIZbU+mxEOAvReFX9nVlgIhAMxsodW8s3B1ZnH05Pse7NVUBh/3vsX4mFbmjCs5794L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNC9qCRA9TVsSAnZWagAA1IcP/iVvkXEGUYJhpDWekpyA\nBeM3vBKtEj99vkKDPafY+WkyICuriaPRyeVph0g5rsZ49oC7gmnDa37Fg/gG\nFnm32NgJYJSiLX2E9ZxgQEF1mC7JtEvPX6U5FFfeAhqtLpuUxCFm6P8XONmS\nudIoclIJEamHIfSxQiXjvRpbgj/Kc4u3Hka9wqFkTaSD35D78xcqZ6UzU09Q\nhviq5SqLZRDT2qr5kJJJNgrhGN7Zg7apfTI02r+YwwdNOvKH96nUvTLbxcOG\nNW64Wx1UuZRTJRijeXTscdfK/UFdC9s5WGGYrbeukQiPwFFzihctlGXCSsGZ\n/+RQqJ0ASXB7eNxRFBgofsoPJi1JQ99aIaSKjKBEkWhNOAtnnPDN5GYkd1de\nSZHeRczkPwZ2GQhmlze3QjMFlZLEimM9jLVU/Em9DCi18HVpuxcAlCWAFuQ3\nPJRnNtxuU+ughP0IwSli6Wj9rhrM5+US5pLXuMhcaUESc8LIh6QJNWkjZq1Z\nIelz0c/cCqlF/r0oqD47HxQ0xKAtZHffDWm8Tle3GCLBRXohXb4NBA+6X5T0\nMrh/2HqB1hwZEDxZzt/4H+VkyRVAv9luLMn2CAdxxEXJb7QkwH1AvIB2MKN/\nE4AHGHdgEzNP2lraOfR3XBJYFVdSotvaK+gaOWWB5QCoOkV4NrPnvhQ11HNZ\n1HU6\r\n=A0GK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.4.1-unstable.10c5b9b","@mattrglobal/bls12381-key-pair":"0.4.1-unstable.6b18486"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.01000b4_1614032746253_0.41045472671659144","host":"s3://npm-registry-packages"}},"0.7.1-unstable.edf78a7":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.7.1-unstable.edf78a7","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.7.1-unstable.edf78a7","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"e19176fa03acae3a0760509685cb06b59b10142e","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.7.1-unstable.edf78a7.tgz","fileCount":70,"integrity":"sha512-62TpHJ+Z5p+GmVDETSm9fJte/qWREG31AcykX/Q3m0dhxHLu+vbT266Haxl8L8ahFYvKEwiC8xhhkQ/aACODtw==","signatures":[{"sig":"MEUCIEyroUWT5RUfbaQgU1a+Xz6k0xp8r3kAytee2ozZR1xNAiEA0XjtZCcE8VCc5mxZ+hfGzs9M/6Hn3LRs3km7ve5fsbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNiQoCRA9TVsSAnZWagAAyKcP/2WCDEd7yNMifnvyJP7S\nbdW6YmX03K3HK7va26CYyuZ0wQoWZD6+EniIcCEAhsi3agG9luUPczwXXOx8\nHDhuBVqMPfE5bYU2CeIDRCk7NxNSvG+9dxuDJksGvOKWgrO3ZXvGDzoMvY+H\nC1gw8nuJduXoCvUCyx6zgvgkkFq3VdeSCpixGIEl2eZfNQ6zMkc1yk2tp6xN\nCeqLsTy3oRu0cmhBXmoo6b1VikPIeaL0wU08rHu5/NLKD6dG7F51QHQrJxMV\nLfB5AMXhg/ozdAO0yq8br7Yyl3aqvBvqffwhEhf3nzeZd+k57tmZMF/dzFeq\nWLj8PluZJS0K0d1aDwVUUDaeGaYriUeJLp5c46+S7/ElFrXA55U2UiiPmhSh\nTfv3cfpRPp2Nk+HWGug9HmrTem5jWOfUWqj12dpoZPu5MSEFI0IafrACHX5f\nhKQIs9y54fdowYiLaegEWknFOmhDWgPEXI1EPIa/7vP3DBRl3/WXtTE3jPJB\nDyMZMI7UzyXsyra87Ep7VvNtMRMHq0qSur0vldGtyU/xveNDDGBTZPNZBqFJ\n7LIKQu9ScIPFrPSmjM52l8OIQGvrRqoxRUfg2vOZG9fjjZCTwDj4TkkJ1xJt\n+i97XjypduUK2WYV6VjY3x2IIrD7ru6ZcDy0PIzyua7t9Z5VEKh0RKFHBHdh\n4To5\r\n=XzrU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.7.1-unstable.edf78a7_1614160935409_0.44242897400416936","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"3451e862f0ddae17ee91dff8ed088a5fa1333e8c","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.0.tgz","fileCount":70,"integrity":"sha512-ys4jYOKn8SZDPlkWd4K9I6vP4ujTi7m/B0rSVbWPcbi+FR4e4L5+0ufHuKQh8V3+hwGP2kly11yqhO+cpQ/YQQ==","signatures":[{"sig":"MEUCIDn/IxE+S39Il2nKauphxANTdWGWwk0H+wcFAAlaFwXTAiEA+/lHYXRAdXy6mZmyh576fjh8X7uLvwj5R90PVkTtDYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNibWCRA9TVsSAnZWagAAVNEP/3V8i/0ceTDr96VveNAL\nvQQT9yNqMPHRoQKAlgYXRvoOzp/de7dveO9RGtRmsVwW2QlGHjYDyvDLnaCj\nFK23cXm1AnraO2CmIqhl/pUTOgQf/oDSP/0mPySsk33cSctGepX+ZsKEiPKK\nzcysrWkZIlRvtHiG4E49jTy/iEvU+7YDkL1EOGwBsvfHYflSoKA+4suKkF1C\nNyrNyEHZB7w9h6hUj6ucOVL1BYHPbOtRUXYIlWYyDGaxKlv99BXlhcXPgDFM\n2SutVB7JdDBilkwph0IZCG03ABLRzq9ezAkJz8PHb8/lc2lsv+QPfZCu/Nk0\npIJ+yXufW/hT3zriD2QBNmzVaTyKpAZkqexLODwF9BHYVF9wIcEM8YR63QWC\nTBm3256dQo34Vp12dbGKfs+NBtr57tfhApKj0WFoviqYAfZ/2mhf04xQfSDg\nXYYL4syHh0p6V5gVV4uA5Q1NHwMYon6rqtQceL+c10IR+OmGn2fKTJXuCwMs\n3/bAonJIDnRaYVDA9dNgNyWRkQXsOFIYDg/qiJaXCJL4CWs6WVkKeaKOUUBY\nnfO9dShbec1D8ZKoo7FJwwhQR+mYev5IO9H3fLZcCYaklznF2E4omhUoxmwK\ndXbT5x9GkIAAagTDH6Y9zIFwrZCqUwK9haIXVvko+sg9xT/tT7S50rVE4ebX\nKFWn\r\n=n+oS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.0_1614161622412_0.941486715361098","host":"s3://npm-registry-packages"}},"0.8.1-unstable.ea3a586":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.ea3a586","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.ea3a586","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5301b9251be5e466f8571db066624b03428fc8aa","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.ea3a586.tgz","fileCount":70,"integrity":"sha512-THlspjwjoeSI/RPFzmJuYFyhvU8vqANo7xjw8tyYHV2KyXs361pUzCcstjEX+30P6VotAJTvzGz98dyQ/pk+6w==","signatures":[{"sig":"MEUCIQDDk3BtKWjisWXQj8njEwbjMYbYZkmCD+qvtIlbyVAStAIgF+MMPbgOhSOa2d6tu/4zo+Ri3dtquw0ig9nGXsIBtOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNibuCRA9TVsSAnZWagAA2UMP/3KcMklye13g0XuIhRTD\nXcSnjjvNoGOLhu4z0nwCyXjjzH3GbL7htFHR8EDVF8gK12evB10Gilh3ROEi\n1pKOOzAs6NQ+tK0YLISwLUIAKIwfEVbOFTqHUD2oJh6zaEQ3pVo6WOBQ8oF3\n0gRwgpSKyumPdRmhJHm+/z/1MbzaqLKu/cKfZVJAfq+OG9pCHAiZ5nwSnA3G\nXxh4vsqiOHoF2kw94nrgUd7ds9c0PaDnulhI1cwDHc5fH/6IdAAhm4m9lkbx\nq92g1QoHkHyVoKH/yn9+mK+g3MQuzECClxS3PPStk+U3w6PZIntNfOlADrzU\nzGXb/rLTjalEHK+rgh5weIRi5sqrwlMkM8plg7Fn/EvKckHUe5YlU3gIAlim\nA3a6kfaVNGpfbrRClpOcbmfpZDqWLHzOJkGxa/Jad6FScoD2FrCC85rBEAD+\nJxRizUbY6lJYd+WUyO0iLHkxU1agz5COUQ1aZVpRU4XuHepdyLWvUSJu8FLN\nTDU5mImR0XK/1eY61NgIGXKkPL5I8PITDdBetny3vc/EOCsLNMDLaAfnZo5u\nG0cd3yMX20djCKOuv6C0zzID/nZp5L6oJIVJTB89VdT1yeq242/25dFRUhYy\nb7S7897c1JVqBklbUUv4V5ZJ15YhQWH+JChaWiwbov0eL+1FljJAmVhl7iqn\nxzCE\r\n=JZpj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.ea3a586_1614161646118_0.8304850746198886","host":"s3://npm-registry-packages"}},"0.8.1-unstable.8c0dec7":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.8c0dec7","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.8c0dec7","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1d6857c1cc186f0758a6ef9117ea8fbc17173715","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.8c0dec7.tgz","fileCount":70,"integrity":"sha512-zu2YVQsm625bBygkxqJxoaGO0xCqwu15aQSG1w6t8lzmJ7KSjPW5Jk3fh4idN3+Vhd2tYHxPu55DDlmYznvJEw==","signatures":[{"sig":"MEUCIQCZK9x928bUzr6TmmDOBVbeMqvhZwv64pkhdfKX3AIwyQIgHsbtcZMHr9LYt5aZ5pF7ObWjj0IqRPTD5TCQzlCfoLk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNuUsCRA9TVsSAnZWagAA3RQP/3dFWmtMXBrvOecXcRmv\nFNoDIalehI9ChH79JH2ym01GiCpHL2poLliLnEVI5erFAMNWl6Z/nTJUadyJ\nbciuTtn5JAWBTlMxnZ7YVH9Yb+aiCdgDQtyTBtKctS3WmnNCkZVfiRJ+qW0E\ne0YtCco7FhMWzRH3+svPmjJ9oCrl3STrBq/1KkmkRvrmMKE/ssmVVPt2TsgY\nTd4bvxhkIsT/dU+Bid2n/TEYVyBOvvSPt+zWXEYswYospePeieLT8up2R+wG\nLs1a9lE8/+eQwO0cyQbKfLxmbCk6uFft3Gn7sFZ1YGUpYt9k9Xu1dAkPa5KI\nTlu66HH7xRqqeLyEJmz2hXBNrOQAX/2WW843PPAjmcihnkeVxOK05EaEriw7\ntzipZpSB+GdR4CRrJHtme/xiJMxMvMG2svEe2yDoow24k0CtuwJLzglAmFuN\nHgshUf84a+/sxwLyGOJd8nfkHTSG7zRO97HTaxrFV9b/aPL/MD0Sqjn0dgfL\n8Vua4wf/xX5fuzhRnU8JV9mqunlWKvdvuHyUFRl0MlViE4A+a1ASpKIsTYXB\nkZo7OPyDlZG6At9fJGqkFG2KQMA2NGFMsaVt7De4CJtOMsfSzDPrgywqL6Qq\n7s7MlPa5+Oq0puTk7w7PC5VfMaQGxWirAlNt93XkGfh9S8DqrAmKl1fnn+EK\nxOXS\r\n=qkT9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3c-ccg.github.io/ldp-bbs2020/context/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.8c0dec7_1614210347877_0.3336397728582574","host":"s3://npm-registry-packages"}},"0.8.1-unstable.7b731b9":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.7b731b9","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.7b731b9","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"d8d5a54b870bc4486a46efd8cb5258aeda853db6","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.7b731b9.tgz","fileCount":70,"integrity":"sha512-aI1ZIKCdMQb8EEa/fweMlvmNNmj7YvTJvB9MXKpRYJZ6Tz/HigmYpfMHrRBRgAuztl1k7uwyobcxwv+5vU+Gcg==","signatures":[{"sig":"MEQCIQCE3A8AyCIbaSfXfhFf3sDRofUcvNcy297NRsVfiAm1TAIfGMT9aZODFVI+gmVbKhE6vGWZL+CbwBg+Cm9JLkL7GQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNvtFCRA9TVsSAnZWagAAaosP/1JcLaACq1zuPEdoFjHb\nWze3ovcUpePjzF9yKkd+2Y5S1xsfuzuojKfek45tiYUgrBLUtxeuQQx/CebB\nTC8dT33ZuCWVGF7bJQ60FdcTt3ZJJzAuGbW+uoDrnGKgMi9oP9iIMrXLouq2\nqBtuKcnZtkBUDUAl9J3sjPx2mJslVycF53DWet8+WviCMG8m/bBpU0nWPhvw\nzdZDjJ6W9/pxdZL08CHkfM+JS43D4gvhivDnGwgy4gr6hGu8VFi38yhsTJHT\ngLifOBkEMw0Cfs9bjzSPirBUeaj+xr0zJ43kQwkEQ6naDxeJXBEecocOZHR5\nTm8BbwaXmjxLtcz/uxpPBG+s83+d8zoawIxF3hrA9Pfpb4EZGGwAALq21knL\nxWHcEKOQzbSirb8REq7GTqnlspijCNdYv+xSYnXYbKFPyF0DFL02fTvvk8gm\nwY+bOnE5b/hT/huI33eXCpUm66a89+TpApqp2KQdzsPftd94r51S8v0PySVH\nX4NVdpBbM/yDD7b1WH3qLiyah6kOtr12esnHRrYKfAs+6qjSC2t35xzFdpRR\njEvu5ReD/nhN1xUBQMcmtlXLyRxSH+bS2wotGExmu2bKzOp8Kqp3+kttXROf\n8R6TvVQxW6GiTs344cmwjEGyeQ/Ub4EuaG4eggmpp/8jd9yjUc+aRhQ/V1fR\nWn//\r\n=MJV5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.7b731b9_1614216004585_0.68802607796536","host":"s3://npm-registry-packages"}},"0.8.1-unstable.05ec120":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.05ec120","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.05ec120","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"4110ece1d4ed25be80f083ba986c599172bb96bd","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.05ec120.tgz","fileCount":70,"integrity":"sha512-Y7XjQTEOi+4zEApMqdk1JTjYkIbJZzoB/K8Cl56wAETuJSxPxL6JEFY5V+68fjglw4NrvyC2w01cBgEflOvJAg==","signatures":[{"sig":"MEUCIQC5fKxp4K0qFOvWCpa7Gaz+aPzdQvebEE7x7azqpnF/xAIgDooZv3x5zjM/hfNKiP1B8CKo9AgGmh9Yb3zbEzPSSB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZGRpCRA9TVsSAnZWagAATHcQAI/o08dtzHLtonCcWN/K\n2/T/0iI5A62k1AETWi+el75DXDO5juSrBHv8qqvQBQYtPMnmkQZebQoD3H2R\nXm+iANMV76NnnQbwstDBTskQ0f0xAtAFxDbzCgwi0czz4xVOuZoSKXPomoCd\nDaOs9viUoVOApBT7l634kgyOnexee34yFcEaF3Yow9klp1kLdH/vWeUViU/l\n3IY45GPm+GO3FTKQ2QrE7EnicBTldhV6mOhJApZ8oPaA2MuARNvXPlLVWig5\npjZ3eWCuGADZ7nFLZW1xxuerZpa+TsgGA2D/2/AWgcIEIdRK/uh4//QOzOye\n3z1PtJ4sogO5+aiqiPV9DwchC+uxcDoPIhF5bA7APjpHuwLu+ATu2PSL3jH0\nSUbw6bYZnnXQa5LZohfmV1tCF9vP4ZPXjigrhtFjJTlVWcuraCgSsHsxyON1\nSNrO/It/RI0b5euhq/XPrLdXYf6lXkSl2xwvugJAtL5ipn3RP7qcjc9KUrww\ng31HT+eVeIMi2/2hjUtpIH2SIWcGE0T5IyF47PnJDOwBSdA0xh33ESYfnhkZ\nwzQCHdwRv4TbbSJhWnsPjjTCo68i56+gKl5HJbNocS0NMBSEuiNQf137Ypnz\nHmXBtyEef8l15yA/lSrHN+sT8dVlSF5wv1fWmbhyU8b62HBQRszjWBrpUMkF\nDVCA\r\n=x9R5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.05ec120_1617192040547_0.7218333541806086","host":"s3://npm-registry-packages"}},"0.8.1-unstable.ffa91ba":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.ffa91ba","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.ffa91ba","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"fe200e11d7c58bd95312f7adf9009bb700416558","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.ffa91ba.tgz","fileCount":70,"integrity":"sha512-wyYdKx31AtZ7lCOdSCt8T/E1HYhrtQOxbb+6mvAJoxMQN+JN9zJ3KpUml4zCDWYGG4ozmvrUgFVMAY5EB2b4PQ==","signatures":[{"sig":"MEYCIQDOem9tefgKOQKuUVEskETQlfzg/3sUugTUTm0ng4BeRQIhAKpk4s5YREqWWDCCCoMLRmVBytIV+sTd12GXWm7XgAd7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZpOwCRA9TVsSAnZWagAA0KsP/RGrrFPfLBtOZRlpoNX6\ne4zpqnH06m9BJeKI5HIjQiAyaiWL+9x5U9ENwaP7Lpb3aG8JvtIpNKrzh/IK\nvVYb8Cl7Lq7wr7qmMd9VHfpaWbGfbj1MauPZxG98MKiCOYAw4U0mOOpuv/rg\nwxlZNr5Qye3LE2NsW0hbqJDwhYa+qNEsuWaE1seP5CykUP138w0lukcIRYp4\n85lmC0MEeE8ptfXbDfXmQ8HaMO5fDXN0OQ2uYtyVgOO1gN6vG80BBlZJxTkN\nP/j0oXgOtihS1gGmMoMiyFqPFrOtOlTvjnut1pIGeuPrXFXCMzbH6zzoadSa\nBNPr6+WS6cboLPgmEGVWisgNjx21CPOh0xXTmAMbmRgSYbS/zyfK5kRK5xt0\nDyJfE2f23PAGVqtmI0HEKXEpCppz50G9hWWPqw6sec73ffpyOThDArlXdnd0\nIqkWEt45Te4nO+/0en4B/3ik3ZxXrMk/1ncfSDHf7UsvgKwUGTDz3OPAJeAL\nNXFPM39rTDIB0Qp6HcqIu3EhYzcFbV7MUr0XGEjQR4ovd4acoJPzGgksgdNp\nio9lrarPP4TlJ7GHUHjSY2q0/8tLQvuJFfLvxR4+ph9xqvu0MVmAcpgpShJ9\nS1Snk9vn0f9I6aLecBVgfi/4vNkC6xCLc6+2l3U+BX4lq/yj0GdpVgdnQkgE\nL/S9\r\n=FDwu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.ffa91ba_1617335215700_0.960219993885753","host":"s3://npm-registry-packages"}},"0.8.1-unstable.e8c6b9c":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.8.1-unstable.e8c6b9c","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.8.1-unstable.e8c6b9c","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"298c3f11620bd39c83dafba82bb6555211b58ccc","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.8.1-unstable.e8c6b9c.tgz","fileCount":70,"integrity":"sha512-TkGKE2/GMfbYW/Hdf1hrk8az8FUPjEMCIsEZk2cn/khlWs9vVD49s4yAaOFo9ZpEtPw//aCsTMJpLvp0HAIweQ==","signatures":[{"sig":"MEQCIG4RCvfAa/IgitpwJenmu3M/Un15ydyQosmo1lHKwE+JAiAJ80f5HVnHLirxTRssBDibYcrE/Y+7RIL+R3KbhY7HCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaTWRCRA9TVsSAnZWagAA04UP/ixFI3/0Bx7b5S4l28Ex\n9JwconxI1O4VIOSOYMlkUm210DYSlMofVLbh5pXJ4Hksgq/KnNcKnVNHk4vC\nSUx1yuYhIA60mO0iTC+uAwQVJ7lwbKJN2sviBg0PGRQ0GiNrOluDqxKvGW3q\nj6Hv68p0sNGjxmvPzkeXQfD56K9Ae1Zf/mxFjMtIVVSQ20uFfc26vJ/ocusO\nXhUYlgrI5S/7zTUNHyLgW0XnfIS7JhubMieKubkpWEP4uOHEVjKukHZ3gIBh\n93QmlRH1WyV5NemoKlmd/vmTyf76m3QzYbpwMZ8lzGxF5mWVbi96bHXT5zwE\nnPrAaJmu2mPu0oKm66FPyHZGQwNiYr5NpiGOvMZykdLcQUZo2SXCBhBJBTIX\n8UU6q1WmjxL+u6//JJrGESCvWtCVU4HvDWCBjINKXjvGqhZ+z7QEicCTvooB\nbwZFb2jgh9K9f0/6K2qYTEYI2QIN+W+yOcKKSsKDk2HRD004f6j9VxFEddi1\nCH/7HWAzPSLsSMqt4RMkYmHxGo+kQ/8tHi07DjpYp3gEJo3zs0XUiccEX840\nzv4lbV7Hzz0hkFIeOGjkWApai4Vecp6cBzg5VfIh1DBRGVb9Uk2S667c8kxB\nFTaYvtDnDjmFSIcg1e6uvmBabuezzVAaZzgAzWSWEldSkwZPjDaLS/n6xew6\nrecF\r\n=1f34\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.8.1-unstable.e8c6b9c_1617507728286_0.5478492704588032","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"428d3e51be3b7cdf0c72608f5133842d4aafc5e2","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.0.tgz","fileCount":70,"integrity":"sha512-GSizMDxopMiFrEbdz/Mw4EzMeiLfz/JF9eU3C+697cFET3WLiVndWdKg13QA3tiPtLtnZWAj6ahPvnoKSg/kaQ==","signatures":[{"sig":"MEUCIC1xhbTNCVhtA4+Qea7d5397ft/6FYlQ7+4C88WImI72AiEAxMUWSD9sm7HoZstV7s6EK4uahaT5b8gEyK1EBGbv01g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgauzrCRA9TVsSAnZWagAA4w0P/36v/SPO7BfbOsXFLLLy\ntAzgoIxCUlLdXbspMwSGZcH7fCYEcV5pTwP+opoi1F9JFTdtfGwuW+xIDAWj\nQ4BdiJsfmy9Cp1bN2qGQVLr9A61MYD/LMyOL80Z5+bZpwKNsTgTA5vdiHrdF\nSxyZOT8nZP55A4YcJabH4ujgIoAA1HQAz8OsJ9jb+heuvwYWs9n8ePKb7m4L\nyBRFuWyt6qya1qkmb5yLAiAe3Ugs6F236f4LaRe+00VSMxTAR9LO9Auxrjfn\nfgxmxXy3UQG0IrhOGHrcJDPb0TU/2q1zxuDYVq/WsdEr+yUjCUdNiuEr0wVo\nI6opLPNXcNDwW2aZK2+a5QzxrKm7j+n/X23kellfSrEcmh9KS0OrvbnYkSy4\nQbN0+zkGXFidQYkK1ctS2aVZhGMO1R5OjY3YCnMAEMXeODI6D9qLOy5oLA9w\n6Re5a7VHOcQdf4CspJYeGYbw8a4US8fYQziL+KJG1FfIL7o/8ykjMa8iKBcT\nrXg3oPq7tkxdBN4TMvwwcRegKo2E9eU4og7NZVoaNE/gL42952vgyQx/hJiI\nkV9clMZvikutRG940nlBVx3cfl3ism2cjDPi3HkmoPSNbA7iDTbC1bojTOXz\nHVuYyu/HCwI+1NkCun5TNqiWQROZmtvgELc3AHxWFSJmUhsWVMJBsM3SjMzy\n1BGu\r\n=7ign\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.0_1617620203091_0.7084356112293813","host":"s3://npm-registry-packages"}},"0.9.1-unstable.0c6880f":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.0c6880f","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.0c6880f","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"6ec0f3d46041990f143eeb613311cb269092e69e","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.0c6880f.tgz","fileCount":70,"integrity":"sha512-cNJozPwlZ/87WANSfTBLSxmTnqc1+WQ7F2jLMn6KUE88UMbnWiWlZhL9ZFu0wmp8oXMVT6ohriScfOhk7a3M+A==","signatures":[{"sig":"MEUCIQDg1QcXnwBayOF320gfcaXsrQkvJBBJDD1LB8kPDUeznAIgQhxuvUu86nisDAg4FBvtvckCEPw2cAJPJOkf/J7N3i8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga7BNCRA9TVsSAnZWagAAuf0P/1ZPMCCdzmkYriWEuCN3\nhA85IDTrT2gQrLpEUTosiiFeClzC/CiILVJx/JpR0BaDAgtjGN9Hh/9ChWpT\nmtN98Zc6+38Lvb8RH1YdXNU/PQiOubv9u/PwhFzZiL9myYZPolHs7bx+/k/F\nJclHa5oIJFcc5pHTkRJwYl88CzfDJyvo7QZMHRZDHjXbwAKGCIBpohcShG4x\nA9/sRYPDHRtKftm0JqH45GBCQhmJLdqtS7QwNPJ9znH+gk5zGXeQeKMfFmvr\nAJCig2ceNrTsshtmkFYT/wCFjfeiI9iberOELkVXfICpZ3tumA+lrlvr3b6U\nrHCGRXwON9k6kaTfPcWjEutgL9aWfE2UYhoXeF6vDT8SQT9DICI4z+gLZpYI\nkk4s5GTaUupiWr6lCwN6YdG37XGHcNVf0Ff29OswgaaGhOo1U+lTXgs/WqRj\nGkTne/ftYvj64RTt2ITN0jBPmdlK4n7RMksk3esINDZF0Dwfxjjkj3RwDEVA\nbkwF9lQ/8GciERDC1tVBfccrPec3uaeHWG5czhZRryP+OrT4yieLmTPRG4m0\nNr/AGOMrBhjS/METl4kr3qMhiRKIWSb45SX4vm9aQIA+MzB/GwqVsEfPEc7P\nb+yoThLyShjOFQFNab4XA6ODzbyaBWybXEAzwq+ugWvUjRCYVNI1ls4McLot\nSq2v\r\n=Tv5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.0c6880f_1617670219954_0.0053981136976999355","host":"s3://npm-registry-packages"}},"0.9.1-unstable.0f20641":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.0f20641","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.0f20641","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"ce6fa7d364dcc642398b636daf12c4d5fca39b6e","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.0f20641.tgz","fileCount":70,"integrity":"sha512-LwEeQlyMcKvY2AbToHtVl3M6gYwMzkooZkTANjhlvZ6ub8GTXRkwxqaL09R9qr2y88PPc6atkenIudJTFdk+1Q==","signatures":[{"sig":"MEUCIQCJT+JdbH+Eytzgawlj/LTqxF+HGecZ6pgowvOrIbuoogIgXpdjQufdiFQ2xnwdd03xTA6LjytjRYZ37+nbNkRJXUc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh2WjCRA9TVsSAnZWagAAWXEQAIFlA/INfdyKUX9v5QFv\niWzXaCpHp+xOLcEeNZYdyL2FYAwzckOd4YmD0KZHQP5ELTTWFGtv5x+94mAd\nUBrt0UzvNOzucwPXAYTsW4spB95T7XI3zKsIp++nO0e+parMnwB9RMQ8LgLo\ntkMEVha+YTtrlY7N6RVpvVRoFB9ktAg98NopRa/z5Gmzo0ANk9+RNDmnyBe1\n+XvMJuGsFR03AgGGOj6RlIlERlKrHjysTQdaZBsqS0JBUaoruvR8hQPLBSFi\ngEfGJ6BVVWP9erKj+ubs4QTG3qJK0pknIZ+oqiPeYaaPkXyX4W9Z0eovX+ky\nRKoCk3Mjr+1yljUZGh0Y2e9pU3HtCo0BPY8ds9t5oSFABk2LX3LRDT+wJJ4p\nccuikQkT9Hc78sNwfhvDq6SOlgLKHo7wwKjO6+g9Js1poEHt8KRld8w8aAnO\nzkgfrGx/96+fTVaxxC7unNvJXUPD/pVQTirqMKGLyh0NaqwAgnSuRYe5z/0c\nGzEu6TfxbcGl/CP09NrBaCw3JT0iBlJemcqAY8zkhIGMhcoUhntkaKIMoYys\naal2Ma2eA/GKBR0kNuFng1C+rwFUnzdlm02gDBBDCL5AXPZoeSb3I9yXRhG7\nBAsW/OjCazcUvJUmxCNjWrS+gYTp+25qEHfwjrUNTb3igvDKdQO13vpFrMZQ\nnK3F\r\n=wsyG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.0f20641_1619486114766_0.3426225410554291","host":"s3://npm-registry-packages"}},"0.9.1-unstable.8e85b0f":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.8e85b0f","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.8e85b0f","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"304260c8e7cdfcddf559bff64a3e3dd10f9569fc","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.8e85b0f.tgz","fileCount":70,"integrity":"sha512-s45RK6gPPSDPmwIRNXy7+0EeQ+p58BD4PFpklq5deb5dUXscfAUNRNRkHwKobL1SGPNuFL9PHMAIEIDp+qwu7A==","signatures":[{"sig":"MEYCIQCY9Fpa5L36Hl1FZ43viEL59lNPe2uYhdy3V7D57yCPkQIhAP0Th2OMi3BZ2XwOs5ShvxCfOj7l27TDFlHQHr5wbvw0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqZV1CRA9TVsSAnZWagAApsgQAI4rBEJJ01VlmNzgwAB0\nk3BZXsUUC1Ofp4iAi4ubRYZlxFTORWqhUW2cvI8Zbh9IOG5I7IVas1DJFfYT\nQgn9aQ3yDMNrTnhJL7EsqKv6ytICPvoS/nxtIdg+T5fzIFZ95SKFTAhhgpCN\n9QDbOAZ/qWLCYPGlz5UlvmkXTPQcY27dVE90CxpBNXSwyw4e7cWD0VA42gHp\nOXX26lAkQsYTCr4g9tpFa6AC7J0FVQ4bUrJX38UNjWZNVBBZfSnmwvEjtUAh\nWc7IIQvDUIUkVsFWYHZ0xZZyGsRU3yzUyGyJXMqx5eekd6XMvccMYXWMk3FL\n56waSd5waJvcdTvhIl1UWq0WwFqam7hdVq4A6MYFg3SMdC+hVCNPgve2xW2L\nDLwwSFCmEtR5QV7ULlrOm7YgADCTyen6HkgfNohwlPpTmS7BzIpoS/JUheEN\n4wEK/1SmEsvnCOOIqkS7lr0AE3uzFC/ctTMgW+Njp4VhJ5wZfmufDa/LTaPL\nol7bbjgfM3+T18/Y8SsdxKAZmppNWgFlT2SDsSF9Dd2vfzX3sz+GztJI2vqg\noCxK6F0QPJPAa7pT0sY9NLJoRtwVH+3STNoEQ3aI5/26Z9HmDORJDUtntQxR\njGKCVcqhyrCAM43qQrI1Q2jUlEmNl8Lq1o/niFEKVSzH7ZOZ38o/zGVDCpL9\nYpgd\r\n=BMaq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.8e85b0f_1621726581147_0.9215934827710184","host":"s3://npm-registry-packages"}},"0.9.1-unstable.95df78a":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.95df78a","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.95df78a","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"7d6eb7ebb0fb837b1c60209a433dea96025190fc","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.95df78a.tgz","fileCount":70,"integrity":"sha512-JVl8b67EMXzCBXgpaqFvU2CUp/LWMn2H8TyK2B0cINcYS207rN1B3AMnPIFe2JwhmcsewwoJZWAXP75gRDQf5g==","signatures":[{"sig":"MEYCIQC1OjznS3cmLxDue+s8J+HZ6E6QOmqXTUETnNP110XLxgIhANNZiN8ZKtmd54E3N29o/Vbdw7+1Bhatpofza0ISGAnE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqZbWCRA9TVsSAnZWagAAo8AP/iMfhdN3P2KVCCSimBfW\noY0kO8LrtTQz4X/YnbTwKyuQ/0w4UDMR+oqFGlh1b1uPH5yfPzUtfKxXGwlz\nCqE/feMdDAgC5qtriid471uGPawfoPi3E1NFCR/0DJfo5kZggbDAR2tc49US\nxnDnbD/R/2irfY2vWJiD9giIgOq90OGPLw3JUjJVbHyJecGiIuCMzFp6pLpw\nBnQdL5itAhTOVEHjIiLiZbiYdud3B35ZXPhgvISxYrjkRtDgBCSpJ4R1Yp6I\n2b/veM4I9sVX7qysAgIYAe4/grc1RMqLwHHxtR6CSOTLX17XPB/exe0TxwOz\nmw+v7bH+bmM4P1HXdNjgTf8umK5iCphi6AFCDRtZne2ywGhm+0KGKgx0EgSg\nDTPMxQLNsvYPBY12OidOpz8LfiOnIruVMJnL+aYkwiRcGLWvV2FWhCtK5P4D\nU2IQmw9JFsiIDVPgiLjyJ027r+yuUt8DdZk5MItDz7UBGvygwjigUAmsyEjz\n8qPUlD71VOqIrIkC58V6l2kx4Txw0hDdNDn2T8OiEZ5yp5NnM6Effrw5Q+7R\nWifHls8ZNk7hJlsBRTRNmqGyFVT+QUbetiPWCA94re4ghtowUGxig+ph0VyX\nrKold1NDc2I1/p7VBj335/kpioI2/jOb8hNZCUiObx39cf+rbUJo6KPguAbE\nhb8e\r\n=akt1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.95df78a_1621726933803_0.21477350155680797","host":"s3://npm-registry-packages"}},"0.9.1-unstable.e2bbe0b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.e2bbe0b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.e2bbe0b","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"2f9a58e2776ec32130240e0b2a7b8b0fa874ef1f","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.e2bbe0b.tgz","fileCount":70,"integrity":"sha512-KXMR3FQUBXgnfqvlnPHu+isCcF/isllDRZaYgjMblQ0CyEKctum9Xr1iFkrgqEKwVUrld/qGMuruVzXfsRvSbg==","signatures":[{"sig":"MEYCIQCYoDM/ieF6+BBvfkwTqfFgcFxiEk7V3wWObX1dbqmslAIhAIfkqpsB5PfUiXtCFpxSD3PKTRoo0PYhyeBbYgPC9xtO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqZdYCRA9TVsSAnZWagAAvGQP/3dtNKLiKnlb2O5TnjVv\nT+Jm3Biw9xHAxOaEBxztezvYGyjNxQpBvgKbizkatM9VzJH02pYSCl9a490e\nhssz2yWU11gdqcZH0LuIDhIAZWvYqLsGKmGXNm2kXNatGrKLt6Sv6DmZH0pv\ndRltPDkbul3pU7Q5KjGViGQYbUK6afgydjU3uFEawxR7uHW541nRGveikcjc\n/JoyA79Eisgqk2tY9QrK8OKIJ4mVkLj+RcqNW3nY8RLB9jaA/dY17kOA421N\nBCc4A2ioV3shPIrY26p82OtOcWlUZeUIIQwA0fZg+hH0fzUh0dE+NFqfkziN\nkXJ1njVP63/27uzWUCRgaASBNtvndgeL6NhDNIt+d9xOYkTrYjq460n185D4\npwqSAH5uJ9SsmKk1BbbImzjBGf0/R36nrWvZZQZ/MUGHVOZ6X/hi076YzO3q\n1YbVSA8EUEPM1UJDH3+wLYvbCqTwr/jMxkcWn+yHTnOWCdZwck0s6N74sXLT\nWjDIvZlhZgWmb+lAUsPDVdr4f1mNYqtlSqQBXBFV6bdS6LDguSME3+y1xKFp\nnUphOiSkr8aJpgThKeM0xM3rxwEHqSugKwuuqxSbzvRgtj0HC08R4UROnh/U\nj/cORUFXNH9q2DSe94FvStlnUg++1jAHJU/4y/D3rIKw0n4xBfDUacrAjQRp\nfA+J\r\n=tlHi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.e2bbe0b_1621727064443_0.5827076799634856","host":"s3://npm-registry-packages"}},"0.9.1-unstable.9cd21bf":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.9cd21bf","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.9cd21bf","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"20b8dbdf356098b82136526b89406cf1afb0d09c","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.9cd21bf.tgz","fileCount":70,"integrity":"sha512-iFovKCiG4d4FLj6WiDwvHtpIyWULAJ/S+CTmGvdNi3vsI5pmrNTw5xCNX10vHSKCLDEJxT61uFY9GkXNDZiESA==","signatures":[{"sig":"MEQCIFzBt3lT1sZUzU37RvvYwocWjJCmA20EXzjBboUfdPBEAiAIOqJx7XXNpoiOZvD7MNbWsM8QT+xeWnhpo2RQ4mDung==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqZdjCRA9TVsSAnZWagAAGy0P/1lWcy8KAs/zQQiEsXLu\n73b2UrRwdEKDzRq5BSBSL+lHslnecrghgq86lja9VfsS9M+M7KYcmharlLrG\nv1eaL2hkdAWIhEUbro1Y1MvLPvr+wUItNR1cbhoO49I2UwXv5fK0scvnGYzf\nMdKnkcpCzhdfCq7YVziAJOxEnpfzVg4YR33yHLcKug2SmIZoliZs+DBt6KRp\n6grD8S6OCfyUkExMkMT3zXK0Jqi9ZssYdL3M+oVHGfnZcdkQ0a53MJZfTUuX\ntfQp9IPxbmoRyRG8DSPftFyLGZ0c4zO51Xe8WJko0V5aW665oljcEZg9V+aU\niFtcrGHNFtuQb0xxXkN/nYuq6zJlMGFz4JtydQWGgzgKLAToMlFqApKwUDFg\nHeWGMpO4EYWsqNozkMjtbDgKftRwCu1CDOQFLnwCj6X/5pwhEn6/uEs/Zfnu\nS4b0Vvafu/830IJjThZ4UQH8kgnN48tzLxZlbV4lYkzb7ARvWgaKZPotFRfa\nb/5GOyj9tg2Ys+FHvdnk+IlJ9wFBPnPtn12noD3csNXe7T3ekek8Qedea0xn\nK8y1W2KcBdf8p1fJmcicuejjJcK/caLhfd2T1EJHXU99O2T3hFRjo8+OuidI\n4rnlJYv6W1HcySH3DNQOnIyM8qMKdVewfatjSJ5Pmp2D+Wej4frp2MTqaOyP\np/8u\r\n=2zyq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.9cd21bf_1621727074657_0.9132675921714735","host":"s3://npm-registry-packages"}},"0.9.1-unstable.88888f1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.88888f1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.88888f1","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"054ecc9ddb37e02c6321e68fff9d3e882e147725","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.88888f1.tgz","fileCount":70,"integrity":"sha512-cWP8WNW7/kaC4roh8PTU9AE00q1V2JzL/F2Cn32p8Rs+mySqvdjqZ/Oq4ex6fUtvQJnhSYpPDakE4o+mLJpApQ==","signatures":[{"sig":"MEUCIQCvoPmwDiMEVKatdsWesCq0HJl/e8ikh8dNzC49SrolTAIgYRlVPnx+zLoFtKOh7w3I2DlBg3GB+/5cs9a9wiaKwPM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqZd0CRA9TVsSAnZWagAA4ZAP/AtpwpBv+17lf09NGU1t\n8iZ0FC+G3VHaQL811viR/UR8PH9oKrEiWmvXIq3EFOFof6sGqxkXhC92IkUX\nzRlMots+M4Zbd8qCQZ3E6e8dpyylIRIAFgIUQX3lH4IK/xrn3pGpSowlnMgm\nT81inoJrdF840OBU7FBBPtM9/QH1SS1UQyIDv2vj6RZaqmQTjyX6SwLnsb1F\ni4pXeBor+bJ2Du1wYjH4m32mJ28t9X/HDYWrGIcy73oB/z1WQ6E9gIz587Oy\n7n30OOzLV0hLqYtLr30QqOstjOXu/3XGfkCAle1hzlMIRYSL8wweq7jtI0b1\nEcQTHzKw5YjGNJyQyv0n2tfbGsc16+FIyQ5rt+OC/gSI8RirvM8vL/y17EJb\nQGY/FpNINtN98vpRnLaC0fHtOvKnHBKsb/94FaygyxM9aYgyjnGfWT+JLqoR\nIkAXT79pxntzsPVgW0HsrG+Sfb4cymQAC5oox+HuoHhRtxYDP2rCV5lXiOC5\nQWuO+m1TFYXMO0Q8ueCxmHPpNYPHiclH0WTqhn7NcElXa2Vi7hsPABiokryh\n1/uVRSpoDz7RXfVbid8VfT+CKIWTfrhaDv0cEvhenNDZH+MvFl6EGmGmCpdb\nPTKIf5QMBHqww7mrBkowlTT0WFjTWJw8DnHtpf8DSb+fvBbbREOc8HlsUbln\nNGlr\r\n=74bU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.88888f1_1621727091715_0.18804402725580927","host":"s3://npm-registry-packages"}},"0.9.1-unstable.fb0c6e0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.fb0c6e0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.fb0c6e0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"386e3c349c804d27e93498f9e2d1467c76b58921","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.fb0c6e0.tgz","fileCount":70,"integrity":"sha512-7EunFL0t130BD/a99ny4cB77oZ0Qds/WehkAA1I+5qmBDiZ9WYJ7TemnLyNHcKFKOZU2OyhuvePzhaw7auob7g==","signatures":[{"sig":"MEUCIEdxfAv5Wn99sHPieVfMrgCuB4Ec1gSPZGw/ZbISr0HqAiEAnfFWMrOdoOmhZLD9E+1qXozqp/VW8bvdkVbaGG84v40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq/4BCRA9TVsSAnZWagAAz84QAIQSEp+JRNSxSymdnVUo\n70+Yiw2iqTi0+PBNU8a6OEbK0n5Ngsl3FStNX/pKOEQ+Ckb8oSBabV7nSAqE\nnkoO40vV+OH9j6FW6ueYnUx0LEujK4EK0+wTvuE1amxnUZ775MLcNI4gapNy\nHzRpoZm2xd6JYgncc3Bt7B4bcbhPN/AWptI53mqEN5HlCLopOz1lMM6PGkbx\nuX4gPe/PEyY99g/3jP6Zn8xOgI4Ov09vyjs7LR4N0IO0CH/za5gGeLxDqQru\n9cQNzUZuU+gKKOQylVi4sHvCQM4T0R6UT04OqkQQ5F9j/jlUIgedHAXAzk/k\nZ8qvSHMMsCbi4rdAZ17FbzW/hEqvpmPQdaRIjNJUZPQKEGgTwN77yFND1JCm\nSUbysMyPr/MMT/nvquP6ShUCKFOfMAI4Ti2N4s3uVKZs5PLfhvKYZlph3wQ8\nnAb6KXGLgrSQvFcU1d2bj1mi9OHFf47tyvsi4Pql1SbvVsalkT/g6pKAOemm\n6rw+dWVtKRTdlnLqZAyxCVncRO2Vq02sKofefqZTIVcKK6qSV1yB/FuT2sAv\nVcgSJEVzEP7d/EuKmUoKM02WQXQYGsuq9lE1yrP7O4GVjOQq5LvUqGXifWFk\ng98l/oI1STkTX16dmCUimPioSZHo9hgMECbN51D4+cAiEG8mSPcjnt9WVEE8\nATqP\r\n=SrEM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.fb0c6e0_1621884417350_0.60785299691101","host":"s3://npm-registry-packages"}},"0.9.1-unstable.62c822e":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.62c822e","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.62c822e","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"08e1a60d44e84ed97c27bdd33a24b63e9e5b6271","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.62c822e.tgz","fileCount":70,"integrity":"sha512-q3+KQXVzehn88TWHcbKxq64nk0/QBIBxE6rTf/IywkLRa9xMOoQM66dKiesTPTLgyUroyOFlG3mOhJjLucX25Q==","signatures":[{"sig":"MEUCIE5qm6HtQOXWu+fFGm8psaveBn3XhUvtNwM13hFbjtquAiEAr5yTelKqyVK4Sy1j6xi/2PDAZofDUzgZxZJfWT9p0FE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrNMuCRA9TVsSAnZWagAAdgUP/Rt4yozvgKEowlhUt1/a\nAGJL6yifYOQTsSsqBqAjwq/ySBtLbZoxS53hh56uDo1ZDt4xgiXwefD9g1hE\nSdB+tJYAqR78Nq3uk3eFiNZ6GRebl3G+dNXMcWHDqHHDls+RZvuDuIBZ8qL4\nvxf5IaXeEXw2Z4DLBviCzHS1jjZchbmEnwHPDHX67+9NeAd+IPuM5lx+GxDZ\n7DXIjv5paBQfcxfu1zBomm2bsrc1SEili0kSp/iV85cpKUfe+Z5fTohmSA5r\nhj8ydneXwdCd5sW/Oc0sU1EgnDQi0OgxEduFRwSncVpAJfJ4Wo5nNtZe76a3\nWi91lHynG4PY4u3s0Ay3nnaGa71qEW9xh1ozbOubi9DbeiDAdw5Vk7U1oJLZ\n7PHZuHjRUtZ6Gzr2rQ1jDj+38GJQy7NGoqUX07kMeGVY1ctTfrk9I5n6qvg+\nchI5yUtZ/BIWINKVwbwVWPpSg4BaOOz6jvF9FA6mTly09PFdd0G5KCzQjFnd\nNsnYYZO744FzXik/nM6XAFzBGIEi9VWstCWG3ibSod0Aw5MJkKBDMd8CFMQ8\nW2ZnEFlWH/TTHWLj0l4W6zY0/zjn1kE3UOAtjmKjj0IuphJgZts8Gmq3BdJe\n5p3BZ6TBrMpBEEE4rqMvlbqrIiiAuq5PjzbPcRHJAbT0Q0wpVboxyjjhOahk\n097r\r\n=LIV+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","scripts":{"lint":"eslint . --ext .ts --color --format=table","test":"NODE_OPTIONS='--max-old-space-size=8192' jest","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish [skip ci]\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.5.0","@mattrglobal/bls12381-key-pair":"0.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.62c822e_1621938989640_0.37928726543511004","host":"s3://npm-registry-packages"}},"0.9.1-unstable.7a244a0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.9.1-unstable.7a244a0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.9.1-unstable.7a244a0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"01788baf4472600ad90a228bdd5443f870dc9b1b","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.9.1-unstable.7a244a0.tgz","fileCount":70,"integrity":"sha512-qEI5cL3Vzn7yUoZlN/g+TrWK9toNYHug79/PCNwY9sXkD8Mw1oHJJE51k5vMWeXqFvLtc3SUk7HWU1VhNRwNBQ==","signatures":[{"sig":"MEQCIBU0X9Qk0pjwv0C7BlsC/I6IKOEE5nNMnWjxtgDtAAINAiBJmhkQOi0+4rHTpgriHytNSXm6XE7EWLySpIGxapLBGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrZP5CRA9TVsSAnZWagAA9HQP/idVVolur0WybNI+d68/\nTlWFbEKtYoiZLZwOBZrGwvTkGS6PCu90gzv7lh9OAokkQTEprre4xJUK1ELO\nmCoAlugodMTvHtb11y+T5hfJXurOMueXQByGBh3/cS0I/1e5KLEmAb/Ja20t\nORDKVE6SMTDt1APZpUZJdFsgkSQ93+rz+coUIn5xKj94iOcvobAjJN6WX45E\nebroYCrIrHsF/V8VnjYwQWl7AljEfTmC6Mxee11XCRgpjj/KMWL+AvZ+eWPS\nol/y+Iqd332BgNI7/E5YxvnzIiF9e/KuR8cELuxV11tkda5/4qzt8p8pzPD9\nJh5kmXBK1IGYPLoyPdyvrm/5W7AKh8nt+Yj8ON9Ncomva9THHYguLMyutyWp\n1ynM1sWp7i8MTgYy/j/ZMcjPXJf5WJ7H4QzSzvXT9ySMUk7TOgVEJXNjFcEF\n+94m5/I3C9htrFSB7hbHHoEdnUNuGG13Qi2CKE/IKqOeY8xelTgTWCWFAjPC\nvfj/NUDbWVH/lzApXQBoNATpgsHzi838vRGtdwqad+HeoW+RDDtWabM4cVsx\nrAKhD1os2JxMQVFPnUjJi5eoIgueOFUNKjfrliKVpiqTtOugJv1Ylx8A4wLf\nCZaTQp0EbnzQgYCBG93wvkinyDnCO9hfDOTfT4R25gftvSbrTGzA81Rx1zjT\nYG1I\r\n=lu3F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.9.1-unstable.7a244a0_1621988344600_0.19181231788148168","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5bd01e62331ae572ef717796a310aaed56a75ba8","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.0.tgz","fileCount":70,"integrity":"sha512-h1aQtasX8pyuwex141v/3+1y8MwFMe5eQ5CnSWSCPSldbgO7VtEF+EItcx63Dm4qTUK9eOmh4P/5ncl8SOY2aw==","signatures":[{"sig":"MEUCICU4FkIPc98z1AXsLykY6mF6fQE54aHHyfhqwYtwVzioAiEAiI+8rzjGXT6Z7BUrVCnaJX4GzOv0KGHnyMKAlsFFYvk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrZTfCRA9TVsSAnZWagAA8bQP/iXo/vZmJfm+Ig2+U82X\nmlgIVqQkWk3BSIOZCtZnQNR1Ji3sTaz1fpUgHK76Otl71GTYl3lJAzxNAfHA\nvdM44JGQosQAuTcdlrTmvByqPe5R4YtMZrowQ/erwbChnQXMzb4SHwSc7kPs\ndce9205+MUx08vRmkCK4EE4SydRhenaS5V85wiWeccmqiXXk9a3Ckn+RJ5Hz\nTLI3WhHmVVc2tebc879FVR8SmoNnadO1EwqY33TXoYKbD+Rk18CLPNlqfJf8\nBcuYpQnoh3Rtf00FKrVlZRjGb1V+OpXrWNXyRoVhE6r+MygnAUTlqmpx5wJK\nlRFQfgyu+sIo+O7NVlaIx4mWsTJjqwQVwrZL0WwDUPzUylTno/WbEhqC9IqL\nxYkdnUrDzaY07kxYooTL/5ccH/BDGxSM/0UJm70/FeHRGJ1vT4LdSSwASzRG\nSx1UPqaP5ZKHUdG62a8eA3YDYklsjSfBnSTTHInSp8OtkATr/z5TaMLDwkA+\nxrqdPhQz3+/OJZW+7XGWfJEYj5yXqFr51wS1FqxBheBANKZ80N/GhIXogBuI\n1JDglqgJfHgt0vPr/W9Qw6+j2BF+OsxdJ1XH9HoVHK7lbqbMNLBf7ElQSSLP\nDrGZBLkuFblPA8RWd9BCz85Irb/HQC/0Vf/Fv43X4nqsnDxgMwpQhaNY5YnN\ndxmA\r\n=cHOJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.0_1621988574486_0.008991234262694103","host":"s3://npm-registry-packages"}},"0.10.1-unstable.b09cfc0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.1-unstable.b09cfc0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.1-unstable.b09cfc0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"57afae8e5aeea2e2acadcbef494c395f69217d51","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.1-unstable.b09cfc0.tgz","fileCount":70,"integrity":"sha512-KtHEUZBuEQdD9zOWhlmaCM5UuZCG0AooZjixrPPNMUUfhNdvbyyeN4KndURN9Keg0n6It/ABnwEjfwdtRgu7lg==","signatures":[{"sig":"MEYCIQDambYilk+Fkx+Q1D6DrfyS5bbnah4Eo34Hxby//BTPuAIhAMDPH4ljhqcTFLbcG4DTc0EPiiqJEU71TD71w/GE/GxR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrZoWCRA9TVsSAnZWagAAH34P/0nnYty6fsb1Rbz8mk6o\nPpqZe8zGRsrsSb3Itub4aF3bPKgbp46fjkgHhwQBBsesNAavW+B+Wa//ZA7u\noJhDacukCY7u/nVDPS8PctqvO0Kk/Qqm7L0CjD+SLZfjXNBDpRIA8dqYi8ZZ\nDBKOWXEAsSXhyU0uB3H+yFy+zcJrT7LzOdYurQQO5WsnqmmJq6T/+59kOVmu\nhrDMisiHrd3V1sY3t7cPp8R53q/pa/9L77IUMvWQRm/Ws/HJroYipgBnsVtI\nhG53IURjett4nV3MqV3P19kyUv58I+R98K9ZIamSHYsmyZOLIlRTcgZYuyjB\nC2e8NDXCcmR1+Z5HZzq4QP2oWrYmb7+/5CsFb8wSNqbGtR07exeROgAPsATE\nJdFOGehdlyOEm2GIRlBht7wly1pzrTIFG7yeCH9z1r6ybmH0i8jzDZUN6L4c\n0xJX3fZYDtvsmsmOK/twkcW8kxxxlMKbfJnDgB4wAhiO0xlcVJBhPfyIDHQl\nufn9cOTaiQlo9WI1qMJ/ARdVDhvbtlgHQzeb7ZKA0QsIJ6LK0WoKPz3Mj7BY\nMPF4zl8ZHNmjDoOkd3pq/Z3yE09HuYq3vKRpwN/41oJlK5orDuh4jsb7T+Jw\nPqRjcNTIJHNOOaf5J0Z5z/SK5poM5z9Z95zL38ZJOCLYDtRq1DUMm3o8Z7J4\nlSvH\r\n=1jxn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.1-unstable.b09cfc0_1621989909432_0.3066014996749349","host":"s3://npm-registry-packages"}},"0.10.1-unstable.48781b1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.1-unstable.48781b1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.1-unstable.48781b1","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"23ba8fea5911d771471cb0195758e97519909542","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.1-unstable.48781b1.tgz","fileCount":70,"integrity":"sha512-5dpKvUY6mHb9dmZiRWja8HXXbk8qpGu1xDJBa9iAicgopZx6/hKcpBtv20r51rFgqGcxZOg3lcatBEVIJ/+bmQ==","signatures":[{"sig":"MEUCIAxIaSxr4gfRXJP4iVddYx+5A5bYPKOGRSRRd8pTXj2aAiEAuoAV0p30aY2b/vSe06oB9hzjFhQKfCD7zqZHceCQy1s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvm7dCRA9TVsSAnZWagAAXrQP/jcRDp2AUzQhaZra3PqC\npDhW396XXBqDwrbn2xx/fnRVHhn19EsvKDn+bWNeg0ApsO13VcwNG5GG012j\nahOcVAwWpg7svg+pRC+kThqK1n1T6sf8TWR4m735mmOAzoW8hw78Ydl+ZboN\n51/HV4LpGwqTmCz0IANmSv/QVonuVaWg4ImTx597i5oUoXTNnoIDoy71497I\nXXe9snXQbjavKyIr3348POIl0sIHBv0L6t8sAVaBkqFMu8sJLyzrBBy373D1\n7pQM/Mtt/JChSEgOsllka1YjzswASIzuUYUKCaXcOPeiBOgAwwWIHpZBx3C+\nkS2Q0Qn+mcGb96lisSclrYkGpKfKdCfOpOPX0jrpoziO70H4qdasTVgjji2d\ngZePBXBof5zUJzx5USXqEhhleqbTUi70IUYOkZDpcDbyJymSTtKtR7aCqlwT\n4dOJRTFnwgFOVwTTptpfw95aPGEx4AQa5Hp41qTVSXJajCd+aJ8i5jMasJg4\nykZn1GWzXUVD5QkRS+oEhcYW3QzZ43yxABAossJqjiwp+5Fa9txiXfikgvKl\n8OUeAtDeQzWXB6Z6cMRkjT+6+gQIBCo8IqJm+k09o+8s69Az2TAup3wCevrX\n0nWLVuON1osJFrPPYOLVeFvp591Bo7Zk+vyEdQJBcvg+L4AII/sxuTyAKKhz\nJc32\r\n=ZCPT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.1-unstable.48781b1_1623092957654_0.3541771250182342","host":"s3://npm-registry-packages"}},"0.10.1-unstable.b37f205":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.1-unstable.b37f205","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.1-unstable.b37f205","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"bed2ba4d287e26b9c117340ed42281fb51a2db84","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.1-unstable.b37f205.tgz","fileCount":70,"integrity":"sha512-tDp30HTaeD8NP5XxoxMzIJlCg3520roqJ+kFfhqQV9tXoDIhojomQoQY4njb7f/62AQEGhtnkyJ0/MDRaSh8lg==","signatures":[{"sig":"MEQCICX2CYn5j2AkXDph8NuCtC+ypT+77lEtzyYKtTTwbsA4AiBDMR9gtLKd4StTg6AbNsT+kqROANFtaOxYHOJWhANc/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvm77CRA9TVsSAnZWagAArVQP/0INBANcqRcBihRg0n1T\nM+ivAm+QVh3yDAHfQPqtmDqZ1FAmNv9kklv3nID+C3pu/3TyA49aD7O0sfCp\nELLqeW5p2iIXjm+zTjwln4oYyTwmN8ttCgLqY+T2BPmKqok6mC0k4UeKMvbY\nGCEjfZgfsSkE/Lomu3zuWsWgZm2HMfcxYnnDlB6M4va0CxbMLDD1N23o7TAO\nuRAgM3ec8FkFkxhiNApGS1rBzOC397yU2fHOUboQcBN2UDTZrJfhiy/yELsJ\n2bBmwEZdjrPNFQaY4CQyNPLTP1kGjB+LxwNy9Y5aXeKt0xqDm34feduHcFxn\nl8VHxT07hcAkJAMo8SrjlZVL2VnwBRUNdsHXGUlyqZfOfQRzSTx/L2dUVrEw\ndzPrhj4Zrcmz23ZXhhNbdyPbnwOZNF1f33esxEGiaOb8NiMEb05ZCXk+LlkE\nSBUULgz6ECWgtK3lbOHKTltXtNwLsqKJkxBtOaVuJtE+4/7LCu9NwUMabklu\n15B/qm9YN9mS6ui2zFQofLYQS/bEIZdPCmW2lYrNUOLNj3q1KSLGVricYEzR\n0JCejcR84oiEPQTdVWjkNkBv46VX1lG5qUeeDlfiPHPN/K78yXMy52/3X+Sb\nhspW5Gd7APPlMK4AOq0QBNBbFQqxvvEinxGQhqKqrG/eVJRcfqeSXVUNdvZH\nHk93\r\n=Oiw7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.1-unstable.b37f205_1623092987872_0.16140948379185938","host":"s3://npm-registry-packages"}},"0.10.1-unstable.3000f3c":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.1-unstable.3000f3c","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.1-unstable.3000f3c","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"58a090020714ed752e6fe61d6a878fac10aa3887","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.1-unstable.3000f3c.tgz","fileCount":70,"integrity":"sha512-MceRortCM5wCHh2C4HGAjNU5I1tEypSzAz0UXHVsmDegqXckP42WgvamxA25ZPdZG1DK/V2kpOvI3cDOM9ZW3g==","signatures":[{"sig":"MEUCIQCgyCim0nmq7B+W+b8s98URqNATLl0CvBm22OVM9+BogwIgDTzaNk5Vqf02PVsAD/mbIk99gFRy7jY/3oZaR5vhz3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxpRNCRA9TVsSAnZWagAAoSwP/jrLKnH3K4KaBn2VrDbS\n17EZZp/koM5qfjTu7j1WAOFowx4fWTufIJ+USqf0foBV9R+oaSLLgsoEBb3Y\nGUPYI7fX+kQ22mEvhDT13/A3RxJ0oHZoMt9bOOv2RhJvCDUMbzPkzOiRPeFp\nHApEouZuOm/lipmGKWQZ5AXTPYlACRP4C0AoUYwPWOVxrnr09pQDk+EKgeFY\nPxp/Z/kEwJSxDU5HI2w+9H8yFx9SwkJT36aUBDxgKN9JpDkvrcEttiCkHrfk\nVL5sJX9klTlT7E4EFieFEknaX/iR4sCOmagjofDRJQTy0RCSkVDigoO84onq\n4+3ShEdU4Ysk7epHx+YPohPrHgLv7HSnT17a91Zl3V/1QwG3WXvcG2Z9tRnW\n6Q/fQroSZlmB7J7oVr2R06k/5pjBFE4ptQM1EempEdVabE8dxqnF2YwHUU7x\nLjxGH+jeoOCrarZUeITk7Bm8TlDkchfsFBatYmKY1sTMLsOce6HFlMCkVo5g\nqbjCHzpp7/I7Yt+n1G2FvajVrePKfjbSIRm6qMEGMmu5E88LImKu/VlGMLxA\nCZ4+g57U4FwCUl8LrvgU0Qpr9LnppY4LHYdVBz2Zh9G/aof1sWw8sMJS2AW0\nJuGXsStmpqZS0U5tvOaViqLRmK4VPag8yvRwa1RGjQEKws0cDuO5ugTdkzUN\nq6I4\r\n=+jav\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.1-unstable.3000f3c_1623626829606_0.7686354353392875","host":"s3://npm-registry-packages"}},"0.10.1-unstable.0cec1f1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.10.1-unstable.0cec1f1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.10.1-unstable.0cec1f1","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"3d9ccba21db5f85ef6353dc84fd554f4915d195d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.10.1-unstable.0cec1f1.tgz","fileCount":76,"integrity":"sha512-xVdtiKKv1N5z6LErH4WcK+Aw1ybcGbeeeX371khXo7fY0T4l5vHBWwcUTw9JobhJTmfNDP0ID8gFwvfGUhsICQ==","signatures":[{"sig":"MEUCIHt9pE7XT2lc0jNHWlWiHzrs/bNhPq8hhRmAEtlWdN09AiEAtEaq4jfVilaHr4F8U6XESW/NmGhx9yuig9uCykCrHtY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDFg1CRA9TVsSAnZWagAA1skQAJoGv9vAsAbuwxEzuJXP\n9TNOnsxTe/njYNR6/RkaUCWaoJptzyEJUUScMFSeNNSZOoZB2JleBEVIvID6\nSAkVCQwXIraohw4AR78CSLe0vBwZp05NG46YDx6VWjiUVDeY3HJWAZMXJJXd\nOqdW92KDXjrVh3mWOaAUQRfnPHXR2YuJZKU75DiAOyHcLgYDUMTLb2YD3rjh\n2SNx9pWGdurjnRgKXqukV8cD+oLBseR9WKz8oye4VoNyKc6GYKDF5VKnkSV8\nBoiCZt5TLKKOI48VXKDJx27E39sXFdswYR5PXwoTHudAJZVr9q1I5NSDv9dA\nTk8uZZSuEwnOWQ6amruFwg/auwke1noi/Pck1+LL4uwB+t9LZ1Y28g5ESdvB\nR+29SCAcIZp1+QWZ0XKQU/EgjkqZGID/0WliEoQ2PC5RxE5+bxqqwM0vYPzi\nlpp0qd40QXHNDCtH5nSYjasEdXgYKIUtikxHpL6kKpPL5dNgxqykDwwCZxs8\ndwoNB/9bZuAO49hGPnY/wXJ1OLa5uGFkBBKkUR1+m80YPOjWwMtzXOHBUM4o\nVLu4nxnRk5nNcAg7a0zx67GROS23nFefJW3lrAEEp1hCR32KF2Cl0wzYWCuE\n3mxxBD2V8LglAqJJ5xRxyz8EIA31M/TECcnx/SYKX7b6/yh3Gx20quEuf/N4\nhcl5\r\n=YzU6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.10.1-unstable.0cec1f1_1628198965520_0.020285679993255368","host":"s3://npm-registry-packages"}},"0.11.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.11.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.11.0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"51e35d6cad37f05faece1f4f3b40727b7934811d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.11.0.tgz","fileCount":76,"integrity":"sha512-IRvDw8Cdq8YB6uA0eVRP6PEIdGxrL9kntu4dUgxX9hXCz1Ub+pNFJ6UKHf71yx3x29CGNYd7Y4WYH3IqIk1cbQ==","signatures":[{"sig":"MEQCIGG3Qa+DST/O1kWCm4+oy+XrmRADOijE9masR/FhEYElAiAFBCwNu1adciOARfXGZbWciITdR1QEmchdtFny8/umvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":120794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDILOCRA9TVsSAnZWagAA798P/1Ogsj2zxtySGRmGDIjT\nEUyKd5yNpPTPn549WU1HP4Xck04l1uOlyZjJgYEYDCP3HvR2BB6KNXTe0cVm\nG4GmPLPBgRSy9k/R1vMwp4lm3qby3uE6DCahugzF6XcpjmajF3dZc/RgZePk\nr/EbS9FEpljuJtGcjajHePpo9p0Q+2izatx9qh7zU3iDig/8aH6SlCJTs6/3\nkimmqFwlHWSjuvPIlgLhth0ZcasbVlFhM21/hqputXM2Sb/9WEvAlNEhLhp6\nFUB5uwgXecyJlYMGPwtLL8Kf6V+pBDMfcrl4/Ld8NBrw55/AXo0fAZ/gkDBJ\nu9UHF0wYq4B5dv8+PKWMRe311PD4c2L+nOdYqKrCrD3u5VfUbjPEiebrUzwz\n6OaKXOqLkprBl9cV+B2Ra1n7eAFlsdkkNhf5paqC0u8OPQ6tcB8ebYjrJJWf\nwR5VfKR/f5c8coiNRvNcuX1oig2VrD0IhwCKJzWu9T4f1UfV/eoAt7ds9/6F\n/vs9YIgsjS6Njkn3BFEuy9Kp7J4Zo2HEnciBicIf0w58vRveQENJgEQnO/cM\nc4A+GdIZQFfMOFwJZeq7o7m4FAbxez1AxNL1mc03HzSRBtN8zfbsDqjeSh3I\nHfwosqGmeuf5QWhsp9rn7gd78TS2eoSspG1Gw6i8yunAxkkNkXk7WMYewZw7\nwXwK\r\n=CTB1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.6.0","@mattrglobal/bls12381-key-pair":"0.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.11.0_1628209870840_0.30297803869211815","host":"s3://npm-registry-packages"}},"0.11.1-unstable.7cbcb0d":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.11.1-unstable.7cbcb0d","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.11.1-unstable.7cbcb0d","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"2e499deac8ee923f2f9be1478386c40e17d94a19","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.11.1-unstable.7cbcb0d.tgz","fileCount":76,"integrity":"sha512-cEV6o9SylwhvHR40JD04oiVohigIw+GzRY1LpZNpcfrrflRGLVCrD3C6FJ6rSkCb2JRek80oVa3v7PcvblRuIA==","signatures":[{"sig":"MEUCIHM8J2JetrQmb8T5yQY739GnrTydRRJmSEEevCF64/kwAiEAv2lm3JniMeRiJub1dAL6IQrJbjfZE+HdwlvivAJbS8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":120880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsm0LCRA9TVsSAnZWagAADnwQAJxVghemmjt7fWK0S5jG\nGdbSiT/djbBnNSs13vmextvmY3Ng+4tWWpzUEt7w7aBxCtNh1aqoVevkS22j\nizUYdYoQNasERqjcmy0ChrlJaki9Dq5hdBESsXoQq8gNP9B6WDNSftxXJX2X\n/qUcV3D3YVQnXJMtK4Wd7KXnApgpuQ7NUGRtPeyUjFlsAsr6D29uphgbwREI\nG4YzGx6NXhI6qUCVrNfKsGOt6O/N3knisWK/pWl3aKagqtN6lccbMld1YfEA\nc+mOgI7Nvny+JIXBkEMkTLev6BSgkAA3fU7NSfTsrMuRWMZhqQIzxKPVTB6l\nO0p5KAKSCu9BQQaKdPO0fqvZyvU57P8/uHpp6PE0JakSa0Lfd3RvOxPF3FKp\nfnewhdoXYXByufonxsvUGT9dt0bZg+CQ0Liav/4jxNe6MzBWmafc9X6Y3dWQ\nslseeFTQS17GaRDJkRUWozm7coys7g63OqvG0pQ1zkEdW1Oe/xJA5XH7E3hG\nah9Q2xfqFbcLw4DiJqs3F2GA1D/NADRsYs2cUi8wybaTiND611m5qvOxwh/Y\n5Rv4n1M1fUskAzV35eh1682Cd/3WINq8nYH+njtZI5f1IVnEIfT/F116ZVNo\nQ1FdLngthfQQRakm2sb4iKrgRPNLDCPCXEmMeC8eWS1dO2KBMF5BFvxXfoZh\naYA0\r\n=HGG1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.7.0","@mattrglobal/bls12381-key-pair":"0.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.11.1-unstable.7cbcb0d_1639083274952_0.7023434554294352","host":"s3://npm-registry-packages"}},"0.11.1-unstable.303841d":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.11.1-unstable.303841d","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.11.1-unstable.303841d","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"db2507dea71375c2998eb97e915185ae7e078805","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.11.1-unstable.303841d.tgz","fileCount":76,"integrity":"sha512-Qsh9LsaEAqNvJgIq7yIhyMIHBG2R+n+M3PDlQFsk9XfAvWjCYrrEBa8qPr4xGpk1bFZ5UWYoqzfwYYYVeUmrtg==","signatures":[{"sig":"MEUCIHlyfNM6vXYokczYDwfBiOi/3wH/YB/h7lDo8PdgTUoMAiEA1uz9YP29YPwI+96H1VZZNi0d4rXo60JO7Y46LA7mI4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhspk6CRA9TVsSAnZWagAArD8P/A/jUBfL9/MTvvBL9zqa\nVCGGZvXxhGcwQc6XFZeddw0IsyAhjxvYEd/usKHPADUWfmu+gvRdY9Cq+pCu\nhQBG+xyFGHbMyVdIIi3kOiKn73HVC26ybu0HOtOWrpsCZv9XZz2lHHnh+rc+\n7j1AIKJUQ6+KKjRazd/kBjal+MBkOh2LKcrMzw5kH3/00v7KL+v8sWCZ3xlo\nolvZiamyGDqCydEgvFT/KHPo+8js4v+MqedVXaLhm6juT+hEAXhuX+eqpp1Z\nuyRV/mkIA33Al3SxseVAHLf6ypuyUoLTaEBK3q8r+7QEPVGgubPfcNZ7VFGk\nFMovw23v7T4iLEI70A+yG6DFVF85Jd3RhP7nzmzff5Uy+5z3NxrZIxfz2IUH\nYkEwbbR3/p/G4SiRxGjlYt2078K7Xmio9wmIp7sOY5WtVZwygGTcPwEzMHAO\noVF+jwRm92k3XTJq0UlwU9HU4TjFZNboHB6Q5Zmu3kRpC0PM6Qinb07hqol8\nJ/Nl3jqhMxiBk4LTlvQzJoQkdZ1vZsuhe6ANzmHXk3MUiYRCAyRnY+7j+iR+\nV5rDUX6RkDYvnkcGmsFY6KcFZIS8dIQ+C4NUkvDmrbA9XbXpQZbYljKi8KvZ\nX7uo3MLGhJCUdmRAj7AYoTSWsj/xLecE/ef0GHqt85o9NL11Jcho4ovBKnfb\nhXMq\r\n=/NK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.7.0","@mattrglobal/bls12381-key-pair":"0.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.11.1-unstable.303841d_1639094586046_0.8020474191921554","host":"s3://npm-registry-packages"}},"0.12.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.12.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.12.0","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"d65a443b22b96e8fe4426512634e6ad77a890a66","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.12.0.tgz","fileCount":76,"integrity":"sha512-NQh/egwsfifDWd74+0Upxd3ZpessWufJY2G8JRTb5wdvgQyjBidPs/xeXq4sR4fchxUM8V1PfinoXgBBkso/pA==","signatures":[{"sig":"MEUCIC6+MqPz2q+48K/lA5FAyDlj6bcd3tI4K+JeSFzQXhjIAiEA+kFelX+Jr5T9cwqtTcjCWJMYkiJZExKf70pGg3GfYvY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsqgXCRA9TVsSAnZWagAAvy0P/jiVhLoEnUlZi604Uuqe\nnUMtBIOzo1Y1vaRBfzs2gdn6NAJA7bHOn1ChdtQasnvD0vPvnnVgE1Nzywzv\nIB7SC26J//BQYle8y9k77V+eISDKdwZNB5CeCvDxHRRHNkxL0hjRT4sjiYnl\nUZ+DLd32MCm2RQDbRpuKM4cFp9JbILKsLux5KT5XDe89+175oBMXf4jDCzz2\nGQvhchuaZ25Sfdz7vNeozKR7ENBFy5dMa+pSwjQLA2CV4kU3JxeK6CH45qtd\n8GjSCgupS6LhagB0rYw0piwrRi5/glyoY16s+URk4FMat1d1AZlsD9csIuKH\nsSW6pTAQ/l+++zFQCLr7lx9vEybjTIiGNkrM7XBVVRdKCddTTJU3j1/j0Jvp\nq6O/GPsCrhMI06Q29I5wCPZrwPj6NXIWr/r82foKF4RYQaF9x8U9IyE+WYHr\nZNs4MPpJQxN6sBoyr8S3Lv+tKc37QLOhREuMaDnqH1hTphLcCq8jaTJzwE9C\no3xeLGhMF0MZWJDKoxMDL9G1o6o7nK1FKFkQVfWl9Mc5YuEeTzVGAUj/dMiC\ni7JJUtIfaTElLoevhEgc2AZKflxUTiph3nYG2oyLlUqGd2Q7ZpYg3Egz9mTX\nkL3GuY9iQWkaS2gJksp/TFAvgOjW1+lPEjbnpNyIlr9UN6SKOjQHfTse1pNk\nMWOd\r\n=Ff3w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.7.0","@mattrglobal/bls12381-key-pair":"0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.12.0_1639098390990_0.0034230310681711007","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.0","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"51de2f169d8cc6f13f3641c0663041e7190ad5dd","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.0.tgz","fileCount":76,"integrity":"sha512-fzgxoo7Plo+hnWwcTDeNK/ezw6ieIDC4dNu8GeZioDA3+C4re98haexKiApsSVkrHivTLhA0r2s5+qC9Jm+kvA==","signatures":[{"sig":"MEYCIQD5eMjpAWAZH8XeQiPYq/b6LNTcoVrcutBZYw4HXI1TUgIhAO3NLQ+rZyzawYqqRM2snoPZs8voAIBx8N2lrAd97xYf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3fgmCRA9TVsSAnZWagAAK/sP/3zyByb1HiF6/FKruhrH\nQTCiNHHCE4N62RyQj4BiTdMithhVL5oXCImELfTmNQPGw2q/NsOqpG+SzH7m\noekYELJMz19b10dzLtUE9rp0Rl9nb6bHANd9gMvdfbI9sSPlj8tU0NZ8xjBJ\nP7EGkkO4S0bxlWh6xp5igPyTuJ1MPMi4u2jwiuPQIlL8OQKukPidYqYHf++T\n8DmiGvivOLTZeRwyGS2XMAnbeLnuNXnrqxad9va9S7sh9XPDHfPsWCoGn4+2\nZtzwalu1ehF8EODjAHMIlP2n+x4SRl9aBTsNNGh7Ntvm4FbAR+hMPaShnvMX\nIp1CGLEAWJX52cPN63aXuIuSkR4UkQZM9tbY1TYdA3cyekvwnW5G0xRQMTy3\nV42K/nmFrI285ThU+LsvhwN29iJ9B9LCqVx3Xz8WldqH0vunyb5EDglrJQI2\nvzKh1V5lOxJZLx0NOXO/1Co692B/pKTtPjnfjimBG03L6OOeAf7vudQ7fygE\now1Rv5wXKe7dSt2sttF0fEkWJrQ3KK2PJXSNB85PQEQtFMUxZaJFjKh3pOo2\nvcmEl5auDR/v53n0UdqIp8SUCuV3uko46HGgocJMSa4fFPRKR9iP9gmN6YLP\nKqc9ZCMAVERLsFyzPr53ur/kL0XqG2c4mDfDnyxFr22OP1dxd2I0CAXSU6S8\nY+Pe\r\n=uP38\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"0.7.0","@mattrglobal/bls12381-key-pair":"0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.0_1641936934004_0.6472986734703745","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.1","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"042e959f73f8e7ae56eea376defad81d0a058d41","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.1.tgz","fileCount":76,"integrity":"sha512-hkP5GmdiXaZecOizVEmIDeU4q03mJgoUGZntuj7n+desCTzymRE2fFgyt7PQuVbQSVkl/IrT0/0/thi9YhMWaA==","signatures":[{"sig":"MEUCIQCui+Y9MPnPVnKeiLPmX6hUFPTphXDFI/+OMXNHG1vW7wIga/0Del92iRyV4q3NifjMrmqd3x/eqaNhG4L9y5fnyVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4JpKCRA9TVsSAnZWagAA5SoP+wZFQce42GLcW26Lp5U0\nbUXhZEUm2MehWKeeHJqOOr0gnB6ccL5Tx5cvERkeaQUmE4Relg2HVmpOozeP\nUCaC84ztJrtwgEcuGWpKInk8jChmKO7AzNwGtT9cfOLHZ7bigs9V6/lSPNsU\n6KAeCuyeXtkbRGFRDDNZp+GzH6/gxVPV3GTQRBkzzc5syl4GKiYCh/fJZIUe\n4YOOPCBHzjsUQp4wX/GBdwUK37bNQZPR+OvaNti34p2v6wZNwf/sPG7Nzbpw\nq1ss9/JxwlPtJ0dAVElMRdr06/lj1isTwtk6v8t4Kr/iPerHtCC10ERI8Ig3\nc9xsavc16SeZ/e/4iPBpUjSMCf6ci8atUVbytFi+ZYgu5a25KjRCBwTM2TeZ\nqL6dliV1lsQrPY1SHWuORiyW3ozoeZRBsYjfaWJvJKlXSMuVPWJQnHk1oCI9\nuCo+I97oBPtbyV24tGpqyxnP7kpjcNar/XqnysutPBieSwSbjecVG6ft+Zxg\nxtQtaQGlIAXcuzlE++rgX0KyMA1XSP8n/WtwRaik93iI/UFN7oPZkPQnDSNK\nF76jbncc9QiMzAtrxUNtvYHigxE9wq3VQ/DphQoJ+6c3zoom9QYdkJqb8aN2\ntBeuXPawZbmh7YtBwOW9fRLtxIF9fXmBk333R8blOQE1/sJ4QY+JqOJWNo8r\nfE5l\r\n=kv04\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.1_1642109514229_0.7667486646491091","host":"s3://npm-registry-packages"}},"1.0.2-unstable.eefaddf":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.eefaddf","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.eefaddf","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c22162f906d20b43b45ded4995211d0f772ea1c8","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.eefaddf.tgz","fileCount":76,"integrity":"sha512-nx0NvmOQWGYJa1FhJH/GD+iv0AmcppUm0qAeLLDtY3jGNA3GfDIDxGhom1ctn/vCRToNUzteXGXzXwNOjUR42g==","signatures":[{"sig":"MEUCIDTvlmMJz/rJgqTAV5/IeM1tHmmnFPolHRbHiyIwTZboAiEAxKmGIiJFGJfqPulOQTLNfyQz4Xl+VIcIR1p/1j+/Ja8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEsflACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2kA/8DdQ4CWab1w39UtjASebxAxG5pMu6k1RFhzlT3a/ONvRRVkui\r\nOrDld9X0z/xMXBaMLJb9E4mog4/lg1C+9w3dsQNkFenHrwcIZ1w0DC3YpT5J\r\nHIweArVlB3I1mQwoPB/24WnR2xIeUpBJdg/PNMLS+GWXCsk6P3kgC6oS+YqS\r\n1uc+DYbDsFgJ89lZhTBP3a9Figr4E4UO/FpjzxQzQtO4N36JUb3DrdpknmKg\r\n8KcPeOFTT7Stk1OuVybreFIslpNJ1kyGLlc7jzJ7/tlb66zibK6mPVIuMTCL\r\netG/JSIElMGUMUKWgwj04NeHuy8DbdZB8Lth9VQys3sCfGIA7Ebmy/FyF0q9\r\nbIDgZ4BBcqS2bRHO67wlwz22ZQuIg9cMYGKFS5OSZZgCyzsb0wNRtkS1lGf1\r\neqPuxV8O1qOdXSWVsxH7qkVY41tNzWrHKykSRxKT0APQ6kL8T+4SIfy86IJ7\r\n2et8bF/AorfsTACvdeFFzeIPJfNx7nml1E70AwXQ74Qams5+bi0hMdiYegh+\r\nHwdcHA8bzPfc5gG3A9SKRedPwUia4t9d1V+02dYV1tLwI1QORCg48aBXulPz\r\naqQFFoxwRxAV4H/f9Xj6gUyDbDmIwMt8UuogfyFK0hBJgn+rOYB2W4AueQYM\r\nUBQh/ExRbUOOCtcyuZGPZ5IhorGSyaOw/yQ=\r\n=wEan\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.eefaddf_1645397989097_0.8078431589420174","host":"s3://npm-registry-packages"}},"1.0.2-unstable.84eb3e5":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.84eb3e5","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.84eb3e5","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"0be93ee8bfb011e11afd12eb5169817a2d946f01","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.84eb3e5.tgz","fileCount":76,"integrity":"sha512-rG3KYDr158EVLQQYH5D0e6TfeDXhufMI58V93AhKbmCi/LVnYgm8wsql4UeSr7lvMNXz4EHRblBEYWmkLx3n5w==","signatures":[{"sig":"MEYCIQDsk9RVYH/v/7DNwNv+i/F40V1NWGk8zMyDh3jg/eNebgIhAILKJyyOIyyWzWD2zWbSlU2drVbgsjY3unS22fBAHlsG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLIjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwhA//T83nVafIPNe0bJEHgjrcTjKtu5eARkfP5t510JfwzjnU94gX\r\nmMw0vhvgDVXFpvJ/mIciF2OBYK1F3QsjRWsGh4cRY75MonsqAPnWEQ/CwWEk\r\nTLn4GqmYE47z5bYdilxjMpQNUJVe+/fyrkB2muB0qf+hF/JzPL2g22a2qsoA\r\nbbclAZazkx82rDo6Ue33vn6fTPpw8Ghw5X84/Jx/kwC8P55MteG4BdWrPoP/\r\nCyp8cZVKKn+g3aIj/73V82w+ypDkvsJxnkq/9mE8VC5FmV93tM3j5x6AycMB\r\nP/Y9qXRJyj34GCKf84PmcpM1PbOLYVTiTkXnkBa9CJP66HQn1kBXR9DxEYkz\r\nqjHkUPUsBC51Z9cwQ7biuvHGmTM2asx0oEVznFra/qCDK94DvHsqy4O+hn/C\r\n+MKEhac+KYEjghJ7D0GU8E+5l5beYyJjslreirJJy4dpHoOsVqR6beQp0ZJT\r\nu7VSbuDQr176f6Ywl3eW+TJyVbGCglTrbXAQ+KJSVvcGNoIE00icjDbbhAMD\r\nKEvmFPMehJJBXekUjhlq0TB89kriWiybpysJx7jaOZWPIhhjpS1NNooJh8rO\r\nKBniYSiflG+zD/vwNGZDWhlBhA/d9P1kz6AOjbtBI9MFMSYQyDYFOHAEPDI1\r\nvkpfXqO62W79WTE7tTu6tGjb9IbXnStZ/JU=\r\n=k9BS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.84eb3e5_1652863523086_0.604934830000535","host":"s3://npm-registry-packages"}},"1.0.2-unstable.2f5ee5b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.2f5ee5b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.2f5ee5b","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"24f034d424ed787e666bc888e3b431aeb614c074","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.2f5ee5b.tgz","fileCount":76,"integrity":"sha512-q+pn6zNEat4sdErgt9yq4qVwhNlJhVgcsebF94o1wtbzsBq5lGJUwuMfC7k3FPrMk8K5b4S6mvYFDcEf4Mjl0Q==","signatures":[{"sig":"MEUCIQCQZjG0zdncAyayrhHWLK1vo8Jrwa4TRA2gBDoFqf06oQIgTqImyVHw59T13khk+eiCZz2pDppQ3lEkViVhM17DfJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLJKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYlRAAlEeP0I3NnY4IZa6SOIRkjixyp7il5BmNzx+/+8TZFRsyWCPD\r\ngiK7FFm8wW1Qp3FT1eO+mTN57QzWX6XxQcP5QSO0hmq9IhAz+uwcI+3pPqZb\r\n8VaFlQmWW/Y+OvoLdQ/abuheR2/RqabvbCenor2RgYeQmy1jiS4SJ9a7V32/\r\nitnlXyzyUJpfFz9ndjXJMjeITtLbc1h6IqbyH3AceEB2JmzeahvXFTJbZCM8\r\n7rumeT16pw1EWF7+FDArfOxvi42k24O0ZEvDVJBe0CUzp6vc6kzSLbaLB7GE\r\ndVxVAKF5IXykwg9aaonQsPyl4bTiKcbI2s1DHeUpAjA7lrlsfVmJOXsYsZdn\r\nN53WHzj+SMkAVvtxAoXQr80UP+hVJFXGR1HRm3X05leHRlteY2t4K8WYppk3\r\n3B5Ppe6ANl1lLtYUjbce7dE3nK730y9jlNq5+AFoO28NIi+G58wcJmCn3oKt\r\nC7DF/TJJ9Ry3nZbPo68PZnmMJegcFlBLVGeT8Kwtrsz8747klKD9Xy5R45dp\r\nB6UpeAr3QUjTEEKz1MYJfPcR8L0XSLAei3wq5L4Fhnw1JoBCmyvcSQnvIDfW\r\nVz017NhoVTEKoZcPmO5xfht59GCepqI21aWrdSXWQ0ao5q7VBtd6RxfrOB2W\r\nKhrgowQjvLVwlsChMqGD7gycHJi/9dzdBRs=\r\n=tlks\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.2f5ee5b_1652863562771_0.41000550877901887","host":"s3://npm-registry-packages"}},"1.0.2-unstable.eda16d7":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.eda16d7","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.eda16d7","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"037d2e025a54f6ff93dd13bc9ff6877d78a90026","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.eda16d7.tgz","fileCount":76,"integrity":"sha512-5ScNPcELzWoDsEYSMLbOj32fa7DA+LvdBOEtls3MUzQKA8m+cKwtyYpe6P1/b68zyMKsuuZEW3EHq12ugD4WXw==","signatures":[{"sig":"MEQCIGdmyO53U9ePqSWVNhneObX5ficlP6zF1CDHI/M9YJruAiA5VcMEj/lDOqJdsmSgqudpyYTRrCp311JU+J82wI213g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLLeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoemw/+MDKWvxc8+9X9KjdB2y0sBT6EnbiHH2T8SXgNSb4hMCX+cIgj\r\n7aXPlic9k+llZmz0LkYiSYZi+acd6+2qX8OAa8NJdlPQ5WYe3hMyQ9sKnQ3+\r\njRRTd4M91Q51yM9DnlC3SmRC4v8J7YIvkmtJ2HGVqrwAJ5UDojjzqTB1FD7l\r\nPqBcRXZsc81qb9/1RrFMBLAmfzzxOSszNx0cBDXqvAFj1b5Ou8woVBLcLe+g\r\noq8S9DTNEuleDl7x/ieOnW7uvTYBkHwZr9GY4WPngezQf/qSxhcKMeJJT5If\r\nACxkip5+AA8R9xbfTHn8fiaxNm5YNMXYh8W6g9bYPEo5ZRSezmsS9uhYtcpd\r\n+mmpcnEhSJKy0cy33lPFrJOPwZCm00iIzQKv0O1HsEwjrnF6pMW5EmL3XAzA\r\ntRSYiGby1JikD9DiqjoXfmYzTTNHgv5A4SBNTuc7F3GV9/uTc7HndUeFm/Tm\r\nJ48DLRVbVQ6tGGJ4gjdwAWXwso8DGSdYRLa/gEgoEdHeUntOVwAAvMaf+Dla\r\n/kXeMtP4es6ztiANSBwce1RQZW7Gny4EzdlAyV76j9dSRveET2FEs/eEvM8p\r\nqRinTDJo+pefYhVaoDoEkJl/7GLCN3iCkhlKoomEbFHz8VtPOLUVgtSg4JIU\r\nzCq9UgyprBGpP6dQF2N6j4WJRxvfEXIKmcw=\r\n=0kLn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.eda16d7_1652863710487_0.10194735982441694","host":"s3://npm-registry-packages"}},"1.0.2-unstable.406689b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.406689b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.406689b","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"00beddd48b5c23c10a7e3ee6877b73d110f5443f","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.406689b.tgz","fileCount":76,"integrity":"sha512-ZOCFbhAY3DTkg9eSv7BAyvdqiRERwXDU8+THsgUIzO8TDbQrl8830/8lhKtABRX9g7bQGZdF/OMPt+NlWFxBaw==","signatures":[{"sig":"MEYCIQDv+LhfFGOxLSGlOTOqCsy029bBh3FMfQWTUWhmMrpdqgIhAKFQJKZUs/U2mQDs7kDZaLz9Rl9mXhmN0PtBQLevIltk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLMGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpC2BAAkUsNpMqM5ZyQQuKSm5MvoN3cGT6/RCJbpH+vjjtrQyy9OO4Y\r\nj2IDrKLLTWLCaAewwiY5GL/2kUrztxyg9+5eRy5Q01BWPwT3qVpCzTrARBnz\r\nTUdgLMshlWxEDzBgXBWNF4a8sF7Z5CE9nIVf1CwSWrNMZQU2MD597muL4Z/z\r\n754MweQD6/wafny/1oUw8DW6NLsy4TwCa4gjPg78QCFO7eRsHFtwqEChpXqD\r\nb8zWNZbdpkaN/UhoW0hnRseS1tdub0Wr05D+nY9LPxJX1FmjrtLU9Egt4UY/\r\naRSxBLmH+EtofkDIryfGEOxIm8sAf5GGl4Ng6MhLT1bS5Tz4maVjnCHuYLo5\r\nRL8JOaremhfLwtkse7aQVZtbHQY9T8HwCMD2eyizSkrzlfmF6/ldtti621NL\r\nKVRLed2Si+xrQoHyvep88sPoIAJZWuE1ayk/29eEzFPn6dJtVjJqulCVq1Q9\r\nXl+Nq4JvXIsVqp/ctV0Xn3wDhe6OYJ4S82u/ye3ld/AuwDtCApKi8Sbrd7vA\r\nRJN/e6f2MLSnSjU01PnDj4EpBZiXWHZ+U9ewwZnSW223KDIBMnSqUvN2LFGc\r\nkmFl16a766oGS2Oi7Re+yWt7Qff4HXeEiYgQG1chmtAcpgtIGtzOniRwal1E\r\n9bUDQ3+Fq2lWeyZH5ink+1GIz/NAVKu+w0Q=\r\n=7+Fe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.406689b_1652863750484_0.14868853158240247","host":"s3://npm-registry-packages"}},"1.0.2-unstable.bec8f70":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.bec8f70","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.bec8f70","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"caf38f59425b1ead653a0f83a2de1f0b33d08f52","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.bec8f70.tgz","fileCount":76,"integrity":"sha512-/DYhTqWPjEls1DAGo7w8faZumkgBVSvFK18VQPXCsCLIQFboolJjv7kIZgocFo9fbm1k+DplIbYNQntxyqHGZA==","signatures":[{"sig":"MEUCIGFq8lmat68EC563hxdxFWBMigmKzF5eDp++WPFND6WnAiEA7GaWHbiTcdJIrDlbVFjp2Y4i0Fe5+EsqH9E5CRbELk4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLMKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJGQ//VbsSZQnxTudJkz5shxe7eP6SZ1kavugoOrkitAKcgQh5m7Ch\r\nbRejrzRYBEXNNwpFECv7uLR78qvHigDCqUP/81Ts7d3bRCZcNNVOG25FtGhT\r\nF7CzTzJx6LZ6t587t1nUM8cQgHk0WSjeAYod20FFGxbJj26s4g6qr7QZ7h5n\r\nnvnU0KWyeUHqyAHjRk/Kh52vvrPjojCsgAiyer7ZdODCPInwl4Gnp4poH6RE\r\nMUBjefRjJ/pqssQwkseMy1AsgRbvtQ3iarZyhMWxy8a0OwlzwvWorGMHOUyN\r\nXi49jvWpiMPIGgYZBErrELnGNdy5MI8Xi+ZAGAB1HhJvIBeF4AQlSLgzUqAH\r\nPzCwPqYephsN2qyfpcppIvfFdai2Djz3yVonK7AvoOv7w3JrhU7YkcOll0XB\r\nYTt+AEict3bWn2ett3HH2cNM3RMbe/7E3OOVxrzwZpamYou+SlHDpLjUfQ91\r\nrXUGPWu4Nd77fVJzLSN6udvnXD3pwCBD5UyJJ81kIpGwNdSmEBxREvXXJxK9\r\nPVThiMPu+oWdB7DM12ndfVsSLR4FgNE22W5TprqUOaUVd4fTC/UoUfIYU8NV\r\nl9YSABz0gho541I+NuIqVrzrvrjB3y2fmJG9XNj12Q98F8lW8xC67UeBkUv6\r\nKm7WhPfcc3Kb1oLM1MJbfwvnvQdf/exdlwQ=\r\n=/NEO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.bec8f70_1652863754227_0.5831315079406862","host":"s3://npm-registry-packages"}},"1.0.2-unstable.849504a":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.849504a","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.849504a","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5d68e0c2c9400cd7805714015905301503d36151","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.849504a.tgz","fileCount":76,"integrity":"sha512-MlRBmx58avvY4cqdM30DA0a9VNk2f8pv19XDllk7LH8rBntGKmuz9RJz4js+qREqe47L4Nk9Mx8op5uy2mmVeA==","signatures":[{"sig":"MEUCIGOE1IF4vbVEAtk6d3VQ3tzKiFg8baQGb/XtlqQqc7hpAiEAtGcCMQ1E7Ta2rhbHqlxY7ZOv4QdO66MTK+kdeMRgJ2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLMXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTaQ/+PzuahNJMnXGQJajQmldJGTCOkT1YsbS7SVFaWbvX6b80u81k\r\nnBSi6513orzLE0MwdB5mjlF2fvUt2iblvjuQ6RnQalysGIk8zn7xs6SNC5kP\r\n1k2PrMsfU8niMjqgQkv7X0eRIvJEQmYwezVYucXpPAwoxCdE18v/MJBeqL9C\r\nW2QWZvXP+7T0UPkzzDavlkwd7AvPYGadvN+YSY6i2ab9hKd2dBaYpzPJkvZ/\r\nACrfXw0M2gOg6pju1PaqX5vJp91TadElxQioOaCqO1mL2oFVTrytp0WUmpOa\r\nKCktBwC1Q8fCCPTOK9kucy1JNP+7yvkrMI8GFNklWWj2s2zHzxlRKhBkJ6mE\r\nAaYNG+xI7Rvc1fGfIyFxv1RahvhfPrDBmKHf1sEIu2pl6rNaCTcJMv2s99Tk\r\n2J56AN1V2kk+Y9/9SFoJZe/vEpGT3RxILpog1+sFgwrbxifquN+D/XE3WcOx\r\n3SccU8r2dTbuDRe2VQ2/AMBmLwbBEQAMSdpVnot+jlu9P3Bmvq2td2wKWlB6\r\nLvcHCCbIeqbabsBZrBD+9NRVIbYlzcxgfPYBJ503xUal6yUrvkidvWLGNL9k\r\neznoEn493y647D3M7Njg5tJbaP3VCBIDBbSjeN17qxBukivXf9/Mzk8E4jfg\r\noUWGeQygy1YagrSnvzLQrhwvaJjtM0WjHfk=\r\n=ICGm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.849504a_1652863767699_0.47516553023511454","host":"s3://npm-registry-packages"}},"1.0.2-unstable.7a0eb03":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.7a0eb03","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.7a0eb03","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"9aaa0bdf19fd5887fb13a06bdefe311ea52324b1","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.7a0eb03.tgz","fileCount":76,"integrity":"sha512-+YLhowUdeCk3OjOQgyJEHhD0wIXxhM0MiwdDFQdlVCPxIs+IR31zPCXcfTzZTZb2ZlKgSpsTkiKD7qRoUPWj9w==","signatures":[{"sig":"MEUCIDrxc7wdkPTHbFiz8zqe1tZCMOMPrEsv9E0cTlUWj2tYAiEAqv6AzhS4ooe7Yw+S2x3jS6NbHyhVAqVd51pqy6L+lq0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLNEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovJw//RtMtVlxzWGQHo1OxMbaONA3YhWOKWCYCwpoOt2yxfV8NEa8O\r\n56mR5YPxWZhgsv1OoOt+4KzqpAzDvnfZ7C4vY7KjbarZP2xpw7s/aOabn/Lq\r\n1CBEgxRyOrBTYb5pBlDauwzB1oxs4bjokTAvuYqfvt6qUeYrTZMVBc2Iu+Ww\r\nXtBULxqqYM6OyoF3c4n/OkycisJJwnoABFNW3SqSALJauX5FqHshR4ANQ4Xf\r\nDia+EwkRZ27jQaNR3IxS6zzyp6sdkLVywNJxx6pi7twzSRBy8DzDh0YQg70Y\r\n3URYYo6vmuH/FUU8q2BOy9gldY12ySHaE+5YewiblP8osenOYJobFWqKGcte\r\noehY+/ifn0PsyF/erg2r5MDcj17ezTS2KdFLPWtzJbLcIqvNVKqUJLy3D5EV\r\ntvJkj4U4T9n5J3qjJJML65pkKPRwuq330nOdHzvWMDulJxTDgt9xxgvgTcff\r\nAbgDe5Ks992muMYAjcu022UcmINnzii8CJ5+q9IZaLy/AIQ33AEB1WBdzJ+I\r\ngvi3rjWfz9mibD5KxEhUscuVz9Hx4MbWALyvuc4vsibO/m6JI/nyW65f44/Y\r\nY1JNWfUcIHe9kUxhDmxeADkxW2d6FK8HXxUxa6Wggwni1uibUt92O1t/Azc3\r\nUyP+d40I1N0cszRbUZgl3adf6EA/0NkV0Ag=\r\n=2fuG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.7a0eb03_1652863812369_0.9336063309415823","host":"s3://npm-registry-packages"}},"1.0.2-unstable.aa36368":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.aa36368","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.aa36368","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"260172ec4ba7e08efd8d3574108d05e2d71d8c59","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.aa36368.tgz","fileCount":76,"integrity":"sha512-Ioxs/lt3+CMaFCdqiDlC1am2UwilHRxNyBkyBo3kfzCwDd3WmrZtlRR5lGMkZISOC6rt47cZzwby032lSWiPyw==","signatures":[{"sig":"MEYCIQC2YZ9M/cPe5Olr48SUboPZ5jFajcy3dxnIH5uM4pgkpwIhAOjbQ5RxPihAuYPQeKLrTrUlFh92W2sGhaYo0fzgGYV6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLNeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrq+xAAg50fr8goxGLKNriej/FY80Vl2hbHZohuGumSTpiM/1gSE4WN\r\nN+dVxaHU1KqIxU7IJdFAXL6uL13A0j4csebCz638G68n3usvvTPdxgrOj4hy\r\nt1yF5SHZnKWYNDCmmZxrctJfAj7JimzpELf8KhdFy20pjOwP/yMdiEsScK4B\r\nm93j8gQV9WMitckvF7r0cegJaBRnJTw2tHNdobH6A/rKS8/nBX4qyd5DCHGS\r\nzuyA3SvzNybXu4Z1n8kHjVu37f94zuvSHvRNz2jbLBgYiD3I52m3zZQC2/QI\r\nkOOq39kxWf6BwkA2P5cAcwTRDRvufJycDu6G8YtDcQIgSYuDmkRAi7QlbyF2\r\ny54xwTPU/oOw409cA9rk5930DamPIvrLC3OqKVrQ/nfMKle+2HZ3H4hOPsgm\r\nm3YnCmu/p/HSXZ5fzHzkj3sm+QjBqqrKSaSfTUSfmKMYHv+j1G/HcehA1Btj\r\nZJSiImD8HCEru6o3eur04thf3AOAB0/4uguPnrRoP3L1xVVM4cdaCtnbacOB\r\nGRz4yVT5Lgj/nMXMGDJ4GdU8s5ozutKW6br79OjWy1dGP8FhuP7YJ9LSziO6\r\nwGiZW82XbhbLf6PYKZYhzCCzIDHP4V7kLIdyKumrqR2EXIFxiPj+OUbrSrXZ\r\nMVssHIlbwNCIomnCX5aNvqKXC7wQP3XlkAQ=\r\n=1kO3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.aa36368_1652863838325_0.13651713696334866","host":"s3://npm-registry-packages"}},"1.0.2-unstable.44e28ad":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.44e28ad","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.44e28ad","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"0f0dddaf4ae96927bd322fca09c9085f8353d721","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.44e28ad.tgz","fileCount":76,"integrity":"sha512-4N0pkeRE6epc4edpC/IRouaV2Ew0bnypm8TAJcCA2rAM0HboAF3BYrUrj7ZoDDL8tytFlxbwF/kpuZ/Pj/FcpA==","signatures":[{"sig":"MEUCIFvW9S11Ax6ogHOVs5sueG+eLrtA2/id4Cu3vOC7Hc6hAiEAnxslnZLhCcAyuIakSp5MKyMRbh9BYeQLFCrM/vbErx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLP3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5CBAAlsHe9FZnt2MEjpjhZRfuVNzMJ4igVxZsVYOJVzY4LqbKHTmt\r\nvp8lQkpqK6HCfcJDQx5sGNr9mL63RUozOzXx+L0mOz+2/9MD06RGXOfne3Hj\r\naxtXsKh0a4QhaEqv8QW07YcF1qjMIftPBsjgh4TEFtrEk9lkl21wYJ1hGsey\r\nLdMrIe2p9UZHoeOnkvW4aIR5e++PriGOaP2FeARiPdBZSjbFGp7zxwc19KPO\r\nMRJFhwNxrb/RbgOrLVOpGAbkORjWOPHbLmPF0E8xmgt9qvYLreBudt9xurbM\r\nuvOXs+0Sr8sxngGS+i9bTnSShC4kIZgjYdcXL/DLXrmNmpnSURWE7P6IoYUp\r\nUd9lL87yHKtXzWJ3qn80bPxa+CR3LDF80gbyL7VJYG+If6sAKVCIWenBS8sb\r\n7xc85RnmRJXygBpQTui13wRj/SqoTChzlBBUDxmT/3ynlV2ZniBWRmR864VK\r\npTbJzR/wyp3jZ6HmJvO48sDGZxkQolXmbFMsxTF1SQgdXiLthKO1oGz0yiFH\r\noGbhF+GfZLO+gE/Cl5TcGThfRCXvP0gIufv8jLlwEYa5BJ1tSdgJSKv3rXEi\r\nm7qEIrmHLAp2oXBGeLJTQsc+0dz/z/RvRlBA1mSB3MnemrWC+6j3TKHX7uuy\r\nw3yTtSF1BWgLhKRSlUoA941NAEII4aGvLfQ=\r\n=V6Wj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.44e28ad_1652863990725_0.09920164250041696","host":"s3://npm-registry-packages"}},"1.0.2-unstable.65f40fb":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.65f40fb","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.65f40fb","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"b5b1fd589527df180784ef23d616a3c1156b024f","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.65f40fb.tgz","fileCount":76,"integrity":"sha512-Bi2tJFUQ1wpwct8/ail0v6JpHhPcou9FO14GdEOsIDUnBhMJ3lmX2qKO6oQSVoGKRpQbF4yRpluWgHm3AvuhkA==","signatures":[{"sig":"MEQCIHw+yfMBj0r4venWHLorKc/LZBukdNXmChEcnfGDlKCkAiALsFj30X3vpDKY6yUUsR8O9YPaMehLQ2UxOK8xwdVR9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLQLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2Qg//brK5i+GFv73IrdISw0a47ajvLyTV7jhAlwEhLdiX3MpJbypu\r\nDtzX5OlvDE1YC4uXh4CM50nBklcS2CaVz/JTm2hWEo1hq8HNBTjPPOvo9HW3\r\ni3EkNmGaRuhNki15mCafKjnZddIgkVoMmOuVOxv8q74iugRlStVtgJFNJ+50\r\n377rK0Z+tJSnuGYuyoFVTgKQuyNlgVPz0ECv+18abZ39My96+DngeWsTSsrg\r\ngXAwqwCgap0no0JLW87pz4xPR8MSfp7tZJ+Agg4i/2vmE2Mow5DOH7Af0mV0\r\nSecE1H7tLvUkNyhgYTxg20z4hz7iJZCHp/AvidWJpbtiH8MHly+u2dtiWssH\r\nhFn3VizaD/Dtogj4lczduiMT+xY6oVW+r773V37PJfMpodp4iG/hOvLl8LVW\r\nMfhbkHprr2aYoMth+t/pMd7vhnf/Hj67wq6BgEoBj4plA8KOJiSVgVHMr8fb\r\nooqDYEjpyqc+G8DuXqCR51z5uY8HnZzz63u8UuhDhiIsUbdG/0ix/P+DvUwt\r\n2d9WPLtzw1D4oMysGyZ7s/FfBzosGcQ9xecDkVmTbWLlBeGydl2vfAAfQ/bc\r\n/7ko62iIzlEEaEKlFgt1rTQhFrS1OHMz+Ao3ZPb3m92lAOSADTuuYV1CCpkX\r\nc9rDUf4Hg+uTcPI9orT2xKMk2gbuT4ynaUA=\r\n=3TP+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.65f40fb_1652864011500_0.6436068934305976","host":"s3://npm-registry-packages"}},"1.0.2-unstable.c4e2a68":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.c4e2a68","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.c4e2a68","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"9c0724536ac8f56e297b155653ab2988691b70e4","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.c4e2a68.tgz","fileCount":76,"integrity":"sha512-uUQQtS/V1P7uqADXgKCUMlxQN0B5dEuHjQO8s5DG6kUDEFwuKVwjQvr8fq+GpaabV+Fv7+2BBuAfhlIu+czOsg==","signatures":[{"sig":"MEQCIDAsULbkavhlC+GiVED/UwIhTyRqxFpEuaw1HrXfRaXOAiBrkvAJ9wszLJbQShqNHQsE7GvEeIEjJtm3AzkUVAiveg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLQyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo22w//WCAQdrcZAV5NlPsSAmBBvgye79C8gHR+MGf3fN5MGo65A8IH\r\nuQtcn88AaJrYXXiMm2twzMrCzWNfJZBNUxZ+Pyd01bTQpT1f+v/zmw6OSKzX\r\nSS+Qaegd2XlChDr/Dx3y+qULf7PfqK+bQ7Ri0NXBD3DHSuA+6N9bVCfYuqon\r\nfOZsKO1Nb9mwToyJ+bLxV0IpUF5rsL5ojdtyeSTAZkRdac57WnyQaMxb3PiJ\r\nISI42Mrqndi66/8ZqX20jtX4FIdkZZ0gl/EEBQRiJarc/yEmG8bRBCWV2Lvy\r\nD467qppGS+MdruQHlHCUjfWMHd/iojdDxweg/886AiU9M29sflzTDUOIUJiq\r\nRaeiqYb0JJrDu1V6C+PPYr3bzMdqoN5Lqe+915GxvwDefNUyr6qBDosKX/3r\r\nUtTixsJmXWbWOBu9WhqpsprY89h8X8Rqilu2dNmrk0K8KraUu/LUPgUPqJbp\r\nbt6F0Fo6jL0hYPYqmXyBDPFYaoCo9bKeS45NthQYd92cKTPY0lx68YzRp8M6\r\nhpjOGXS2t+K1knzgFp+PS1MHVVO7TrSHbiUfE8aMgvxTRQDyoD+NwZbbmBUm\r\nCVzmZiOMJgOHgls7AXjxNBDLQfsZ6R8I0sNW+BLP7uyOH7HoIY+KJn1HmE+2\r\n9430cByMaeONrqP6Nbm2NnR5828uoB6l+HA=\r\n=mJkl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.c4e2a68_1652864050131_0.6425866863346261","host":"s3://npm-registry-packages"}},"1.0.2-unstable.4813c91":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.4813c91","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.4813c91","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5d0b28df953ba5a375b9207446d6bc1a034d8995","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.4813c91.tgz","fileCount":76,"integrity":"sha512-tXfxDuCdEWgrW6/a1t8vZ4BfiB1Yrsy9PiNRrI7Bdm96w1h73D0vDy/5UTPY2M2OR+1xVA+fbN+OVxuo7iV7cw==","signatures":[{"sig":"MEYCIQCtPBtqQaskvkKNAfwqzhhvsqv5Wd8pWJvBR+Htw/FleQIhAK9yHioqSktfOySwR2NcAVYJDA55yhbHcrGFjJlNyLYp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLQ+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqvQ//XYfh3m9bGFZnvVP9MBML1qEl84kj/mO1YmxjhpD1YY3akFek\r\nbVJa9nmWfYKa9o8wLQtyt7KE51M79YgltohYikedMjJT1nujYcQDH2oONQ0N\r\naZN9tHLlFr/CgWeFlk3/MxSXzRlDvuZ1/85y9tAS1JarTe5l8A3YNrTiJ8QL\r\n4bvMiVl+YbiofjErJinzXa5qn4r92KQxHQIEzg+u2yV7q1FoDEhaDSfwUfZX\r\npBxuUG8bPk5KRW8Hj7K2YOx2coygI1mwVs3dgNYRqtnN4kSFp+zjawG7hhVn\r\njFw6tNkglWWgOc2MbUqzIjWlW0nJ2ONxIQn8pzLxXk2pwmt194Rk5+zF7AcV\r\n9ZchZjqO+CPPkTOH9ef5NLosUFmKVgUn74lywX8Q0LePdQIB19nDQ/YJmMcO\r\nzWBvfQC/c6uOgoqcV9Vxa87lzCbMUhQoxK9PFdTqhq2QrrjEKcNXvkIyU5Z3\r\nv9aZlv4N+JbGCziqh3QyqzEyTXEbtLFQt2f5swewQUqYAFsVm9eMDWIC15RC\r\n+cxSug8rCRNI0VzWLPWyesWFwP2J/MvLXXivuBpIwluKv60l5pUmUHUiySnK\r\nFk3hmsETEukASr/IVWh/o//scbvGiwOKg5Rl+zcXySX0PmtrZpoGSfU6YPCd\r\nQYgcqzAq/t8uT3L3KXFWPHyolHn2lIH3FQ0=\r\n=8dpf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.4813c91_1652864061923_0.9620413382394639","host":"s3://npm-registry-packages"}},"1.0.2-unstable.f41bb49":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.f41bb49","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.f41bb49","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"060bc46d4ec67f55c1230532aaf55debc2101d7d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.f41bb49.tgz","fileCount":76,"integrity":"sha512-GdKYGiC5jImL4qVqR6i1DFg08iaP20AIM4SJdZ9XMqS53DS620uL4bxRPpRr8OLgELPiBHQFOobYTavf+NUttg==","signatures":[{"sig":"MEUCIGq9Z3QChFRIgJfvE0o7ILX1jpZrU2F808V4mTjV5TxRAiEA8Scn67qCaJxPEsj0NGKDs6AWwgPoJi89h1R0BaF5evo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLRjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKJRAAms6BPTsTA11430fD8suRYRO9tEG9qhG60f+XYPnjxgUP5nJY\r\nTS2HxbZmfzHHSWZhmiXh+lvT2dWXMk7euI4JjU71dhpKlTXg18eO0cU/zAS1\r\nkdHUzT4BYYIxEaQb0DWobPCBiX+svZRGC6BpCSjbijLqsoYu4aIfS3TK/r6v\r\nKCoyM2QxjKe0VNGrYD2H+K6F6GPmIUz1kKBUVaUJHCHu4xUhloh7Zqz/w9vl\r\n+QjxorILRyQHDSO+cmjZaO/mQjxqRLSLC2lz14U6aJzaaUvTCUofV5yWI53l\r\nZNvjK+vUM96d2lulQx6WWET8QB3v38BjWdp1FhW27x3KPhgwfqjd5aOL68Zh\r\ndjn9PArWW0DiZLk1rB6Lrlhkj3nxqyVPcnDdZkrcGbLrrR5pw1eynNoACnes\r\n2D99utIW1uFRWS1PoEtwEDQOQtqBtETZBfj93DT5vGmXtrbrHz5+GQEenLaw\r\nEC5FpIndmJTS0qCcjpdYKAUxHev3oBe4VsGnRlpX+KWMNxTLu+CfM7XdDcRr\r\nSFzVQ4/ZCbjduT6F/0ecQ7Kq6Fn5dCWBQR1oqbycLpQjhXC8UK/JFxx/WuPC\r\nAQmMGg5oDexJxddWjbwUnFb6kHTAQ6C5aBTv+Mfs6jsK+t3Ga3fVp/d1tMjC\r\nnWF2xNJ7Y9ulfLwoGcvuXu7FfxVhZtlrwRw=\r\n=jnci\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.f41bb49_1652864098852_0.21380474877890077","host":"s3://npm-registry-packages"}},"1.0.2-unstable.5f844f4":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.0.2-unstable.5f844f4","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.0.2-unstable.5f844f4","maintainers":[{"name":"hmmattr","email":"haoming.yin@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"a9dade9c4bf798a4176c1736dedb95f7a72addc3","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.0.2-unstable.5f844f4.tgz","fileCount":76,"integrity":"sha512-71TAKpzXg1hgLMag5NzqTeVlSa/NiPaJKVOAElmQwSfXUO5Yamxl91FItRx/5n1lplSZuoyje8IlICVSxS/b3Q==","signatures":[{"sig":"MEUCIQC0oJb2gR9oj0IKgm5049UPuU/jXFzr9h0l1SM3kDS2jQIgCm0k+W5+AAf53pyPBbC9LAcAIlMuxxMfnjC4XyyrD1s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihUV5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9ww//SAhxHaEQcLsDQ0QeRDm91H7ter1LAcBf6AmUiyu0jYLvDHN/\r\n7LAlj6xSQmpVpZBby/3icGloBRXzJZ3OVag8wocgLGxE1+BGm53GXHi8FNjc\r\nwehyDxIc25+b3ozVHCJk3Kzfmtt1cq5kmmfWjAiO3MRO1ikajUgei5WpxdMB\r\nOGxvbyQyR3pmmiBcqn18+u4jDBhCEUI3fPg02205B4nwshrJpBeKN2tcOvjz\r\nqabWYfaarzreKyDKkXExkmJx0e4vp2GUmUEBUsXMuUEqNK9gqI5UA8fFeJnF\r\nVbto/tsapjBjc5rfysKpm+j8rDsYbQLu1IkgnjpNAW/a9NCJj3L8ZCrautCh\r\nw4ZIU6KS1BxhxoFc/GJItwU1Eppmf2ZYezf+u55QL+c3iosNVYqPIDM4FxtX\r\nukpCpbi39GQAjoaHM6V/1PIJk4j8e1gL8dnmVo+PXsd9dIiYlYoxXKJC/2T3\r\nUG62lmo2x9TlrTXovHrJ6jbz265osHBnTiyf4dXlGWvANtx93Q+TSOL5AzKY\r\nn0L8l8Obkpvw1QXHvZAoaY/08QxjBg3Ds/8Cy5xHJ9IE2pHMhN2E4Yv8Ptvk\r\nyhhc5ToFrdp1GCdt1rFeiVcAuyNY9Q6o2teVv7o5W42RlUD03xs+y5T0208y\r\nwkycJi5c3WG0L5SIPgibS3VLFqzw+wG0dFE=\r\n=1DKg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"[[ -n $HUSKY_BYPASS ]] || commitlint -E HUSKY_GIT_PARAMS","pre-commit":"[[ -n $HUSKY_BYPASS ]] || pretty-quick --staged"}},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=11.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.0.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"25.4.0","husky":"4.2.5","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"25.4.0","ts-node":"8.4.1","prettier":"1.19.1","crypto-ld":"3.8.0","typescript":"3.7.5","@types/bs58":"4.0.1","@types/jest":"25.2.1","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"8.3.5","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.18","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","cz-conventional-changelog":"3.1.0","conventional-changelog-cli":"2.0.31","@commitlint/config-conventional":"8.3.4","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.0.2-unstable.5f844f4_1652901240988_0.8775390579180249","host":"s3://npm-registry-packages"}},"0.15.1-unstable.64d5314":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.15.1-unstable.64d5314","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.15.1-unstable.64d5314","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"homepage":"https://github.com/mattrglobal/node-bbs-signatures","dist":{"shasum":"11b5ec603a3d415c913cdfffd03e757cdeef0294","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.15.1-unstable.64d5314.tgz","fileCount":1246,"integrity":"sha512-qVe+Gb7v90H45uDxo9q4CATzW59eiQlkTE+Ta3i8iM688isAyKG+h9MBgOrFWmI9ZWdxk16gFhmM5MU+i3uclg==","signatures":[{"sig":"MEQCIHrIBf93j/46qED9XXhY7xGlWNAg5X4nDG5mK82ca3DGAiBYUPdpENalZOki051X+dl31/zaRq6kebYWmur4kOsKSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":453003318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi08x+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQvw/+ImQ5OlyQaWiPnVzD11Yrkb0Od7cMweO4DcESjQPiVSOlO+jv\r\njoO8LmXtTLL/jKKJwXCojubPGYqgXIOT7egkuuo0RuPHLIvjHuH5DxgDlXGa\r\n9M50WGvb1/vRWoV+smRYEC3Lzn1wMpe4es9pHeyoZoD7FJW/3KDw+dG0sRBW\r\n8Y8eRnfBZoVblsxKvdyDEBNHlveK+oKmrcTzr5IXMT0yPixr1C7Wj/NENqfS\r\niCP4ZgBEtFJuvFL0Z5pAUulvrK7grurHUP1IawwgNP4tdYNgC4s74/fdHlHX\r\niA4wf0XR5C/hOujXIqDIcoKWoSA8vOZJI7ghUE8JVpgcJG22zENsKovJTuvF\r\nlrtRdH1LmwBR2/FUgUsLdResHiwaNGOPFPiJnEKVwL9h6ueq4JcGHH3LGTgg\r\nTC5Z9QOk2ncXaQ7xbCo24ghtQ84FEYQYcXYUO7KVp2iv06e1q2eWxAvhgIDh\r\nLNQYKWlD4aPjJIB7RhACOkrCmkGubO8FggjgY3f9EFcI/yAUDIGdKofHb75c\r\nkLRjeIX9nkCqD8yRa87v8oVC8z9ofNcjVQ95ZIhRvwdXHserk+eBa5KGZJ5e\r\np2StgzPvhE/EmSy9eNYuYQK2enMEhrR6OIbgmgHGH7jkGSoOfbSoeEoDC5BU\r\noxaMXN5HLa9dJ7o2ymWwiPZBvOIgtlekSls=\r\n=UJjq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","binary":{"host":"https://github.com/mattrglobal/node-bbs-signatures/releases/download/","module_name":"index","module_path":"./native","remote_path":"{version}","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# Node BBS Signatures\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/node-bbs-signatures)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/node-bbs-signatures/unstable)\n![Master](https://github.com/mattrglobal/node-bbs-signatures/workflows/push-master/badge.svg)\n![Release](https://github.com/mattrglobal/node-bbs-signatures/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/node-bbs-signatures/branch/master/graph/badge.svg)\n\nThis repository is the home to a performant multi-message digital signature algorithm implementation which supports\nderiving zero knowledge proofs that enable selective disclosure from the originally signed message set.\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) are a digital signature algorithm originally born from\nthe work on [Short group signatures](https://crypto.stanford.edu/~xb/crypto04a/groupsigs.pdf) by Boneh, Boyen, and\nShachum which was later improved on in\n[Constant-Size Dynamic k-TAA](http://web.cs.iastate.edu/~wzhang/teach-552/ReadingList/552-14.pdf) as BBS+ and touched on\nagain in section 4.3 in\n[Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited ](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited).\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) require a\n[pairing-friendly curve](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03), this library includes\nsupport for [BLS12-381](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03#section-2.4).\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) allow for multi-message signing whilst producing a\nsingle output signature. With a BBS signature, a [proof of knowledge](https://en.wikipedia.org/wiki/Proof_of_knowledge)\nbased proof can be produced where only some of the originally signed messages are revealed at the discretion of the\nprover.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/node-bbs-signatures\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/node-bbs-signatures\n```\n\n## Usage\n\nSee the [sample](./sample) directory for a runnable demo.\n\nThe following is a short sample on how to use the API\n\n```typescript\nimport {\n  generateBls12381G2KeyPair,\n  blsSign,\n  blsVerify,\n  blsCreateProof,\n  blsVerifyProof,\n} from \"@mattrglobal/node-bbs-signatures\";\n\n//Generate a new key pair\nconst keyPair = await generateBls12381G2KeyPair();\n\n//Set of messages we wish to sign\nconst messages = [Uint8Array.from(Buffer.from(\"message1\", \"utf-8\")), Uint8Array.from(Buffer.from(\"message2\", \"utf-8\"))];\n\n//Create the signature\nconst signature = await blsSign({\n  keyPair,\n  messages: messages,\n});\n\n//Verify the signature\nconst isVerified = await blsVerify({\n  publicKey: keyPair.publicKey,\n  messages: messages,\n  signature,\n});\n\n//Derive a proof from the signature revealing the first message\nconst proof = await blsCreateProof({\n  signature,\n  publicKey: keyPair.publicKey,\n  messages,\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n  revealed: [0],\n});\n\n//Verify the created proof\nconst isProofVerified = await blsVerifyProof({\n  proof,\n  publicKey: keyPair.publicKey,\n  messages: messages.slice(0, 1),\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n});\n```\n\n## Element Size\n\nWithin a digital signature there are several elements for which it is useful to know the size, the following table\noutlines the general equation for calculating element sizes in relation to BBS+ signatures as it is dependent on the\npairing friendly curve used.\n\n| Element     | Size Equation                        |\n| ----------- | ------------------------------------ |\n| Private Key | F                                    |\n| Public Key  | G2                                   |\n| Signature   | G1 + 2\\*F                            |\n| Proof       | 5*G1 + (4 + no_of_hidden_messages)*F |\n\n- `F` A field element\n- `G1` A point in the field of G1\n- `G2` A point in the field of G2\n- `no_of_hidden_messages` The number of the hidden messages\n\nThis library includes specific support for BLS12-381 keys with BBS+ signatures and hence gives rise to the following\nconcrete sizes\n\n| Element     | Size with BLS12-381                     |\n| ----------- | --------------------------------------- |\n| Private Key | 32 Bytes                                |\n| Public Key  | 96 Bytes                                |\n| Signature   | 112 Bytes                               |\n| Proof       | 368 + (no_of_hidden_messages)\\*32 Bytes |\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n#### Benchmark\n\nTo benchmark the implementation locally run:\n\n```\nyarn benchmark\n```\n\n## Dependencies\n\nThis library uses the [bbs](https://crates.io/crates/bbs) rust crate for the implementation of BBS+ signatures and\nBLS12-381 which is then wrapped and exposed in javascript/typescript using\n[neon-bindings](https://github.com/neon-bindings/neon).\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related\nissues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14","yarn":"1.x"},"scripts":{"docs":"typedoc --out docs/api src","lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"yarn build:neon && yarn build:ts","clean":"rimraf lib/ && rimraf native/index.node && rimraf native/target && neon clean","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","install":"yarn build:neon","package":"node-pre-gyp package","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","build:ts":"tsc --pretty","lint:fix":"yarn lint --fix","benchmark":"ts-node ./bench/index.ts","build:neon":"neon build --release","publish:ts":"./scripts/publish_ts.sh","test_vectors":"ts-node ./test_vectors/index.ts","publish:binary":"./scripts/publish_binary.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","benchmark:stress":"ts-node ./bench/stress.ts","publish:unstable:ts":"./scripts/publish_unstable_ts.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/node-bbs-signatures.git","type":"git"},"description":"An implementation of BBS+ signatures using rust and typescript for node.js","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"neon-cli/**/minimist":"1.2.6","neon-cli/**/handlebars":"4.7.7","conventional-changelog/**/minimist":"1.2.6","conventional-changelog-cli/**/minimist":"1.2.6"},"dependencies":{"neon-cli":"0.10.1","@mapbox/node-pre-gyp":"1.0.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.1","eslint":"6.8.0","rimraf":"3.0.2","ts-jest":"28.0.5","ts-node":"8.4.1","typedoc":"0.22.17","prettier":"2.0.4","copyfiles":"2.2.0","typescript":"4.3.3","@types/jest":"28.1.2","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"17.0.2","@stablelib/base64":"1.0.0","@stablelib/random":"1.0.0","eslint-plugin-node":"^11.1.0","@stablelib/benchmark":"1.0.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@mathquis/node-pre-gyp-github":"1.0.1","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.15.1-unstable.64d5314_1658047612663_0.6742934139347603","host":"s3://npm-registry-packages"}},"0.15.1-unstable.548a736":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.15.1-unstable.548a736","license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.15.1-unstable.548a736","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"homepage":"https://github.com/mattrglobal/node-bbs-signatures","dist":{"shasum":"ecff95baccf721e9cd57f265fbbbf76c8ec18884","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.15.1-unstable.548a736.tgz","fileCount":1246,"integrity":"sha512-jiCrCy5iz8sKoVW1Y57uNCBxELdT8fBlqGJsssF5zArs2cfcONqYQE5zPTYe6nexjVfYLxPlmfmmyye/yJL4xw==","signatures":[{"sig":"MEYCIQCz+r43JDnTmohkKc6BKGIClLz/kJZnXbVcYRWwV1pHhwIhAPfyaS1QOh8yPiRAgcn3g0gS5OWGEoKczxyiwYTFuCDj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":453003318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1JGdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzyA//b4ljya+cIPGD0tqb9+e8Xf+C/en47kLSTw1qsc0UCebqrxfB\r\nh4ToA0fs9iz5WlGccO7X75YbnvyRAG8bThq6Mx94rMPgJ9/4xuVP5fCN/QnR\r\nAquCqq1PUzbJKZ/KysmB7K12KLHo80vgJH5rYqhdHc1lrrfetSCS/xZaZmQk\r\ncrihLLchGl4IEnM2Xbz+E+0srysZT7U6HSpyweKH0VJPT679qtg3/XQwGjSr\r\nM/3Js1pmgSxU1KbP2BwvMQNcUUEu+S7Y3L2jY4txcC7zxE1cj9snkAh8uxdU\r\nzBe+axZ3xZ0iYHKTuPdltfGzDjKUJ+QY28U9E0uVuEeGvwPCO/FFpO/cmwAG\r\nzGeaSFffw9+i6lN2VZISvFhfZ31KPl4JQErELp/E1mpgglExi6zF/mf+BljO\r\nltJBgpZEV78E9TGwaKJ8c9evzt4hSVX6qhOJH8a2ZHhpsH8WWnwzCRHVAGbC\r\nR9sqXLPBtijUELhAtMB/bu+hxiKvGeG4k/Wc3sje/32HrTX1hAyO4UOb6mjY\r\nFF6Q+vKA8P4b51U3kVKiDsp3TvjA5fNq01O9PQ3QqVBYi7paXd+WnB9knKk0\r\nZrJKGhp65utYmlTN7iduLwCL0cEhpgS9CCFea1wRLZHzXcPbTKm+xYbR+oWe\r\ntFa8SAsN64Ufg0NOeE5+uQqia0pEYAI5TyM=\r\n=c7lq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","binary":{"host":"https://github.com/mattrglobal/node-bbs-signatures/releases/download/","module_name":"index","module_path":"./native","remote_path":"{version}","package_name":"{node_abi}-{platform}-{arch}.tar.gz"},"readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# Node BBS Signatures\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/node-bbs-signatures)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/node-bbs-signatures/unstable)\n![Master](https://github.com/mattrglobal/node-bbs-signatures/workflows/push-master/badge.svg)\n![Release](https://github.com/mattrglobal/node-bbs-signatures/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/node-bbs-signatures/branch/master/graph/badge.svg)\n\nThis repository is the home to a performant multi-message digital signature algorithm implementation which supports\nderiving zero knowledge proofs that enable selective disclosure from the originally signed message set.\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) are a digital signature algorithm originally born from\nthe work on [Short group signatures](https://crypto.stanford.edu/~xb/crypto04a/groupsigs.pdf) by Boneh, Boyen, and\nShachum which was later improved on in\n[Constant-Size Dynamic k-TAA](http://web.cs.iastate.edu/~wzhang/teach-552/ReadingList/552-14.pdf) as BBS+ and touched on\nagain in section 4.3 in\n[Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited ](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited).\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) require a\n[pairing-friendly curve](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03), this library includes\nsupport for [BLS12-381](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03#section-2.4).\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures) allow for multi-message signing whilst producing a\nsingle output signature. With a BBS signature, a [proof of knowledge](https://en.wikipedia.org/wiki/Proof_of_knowledge)\nbased proof can be produced where only some of the originally signed messages are revealed at the discretion of the\nprover.\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/node-bbs-signatures\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/node-bbs-signatures\n```\n\n## Usage\n\nSee the [sample](./sample) directory for a runnable demo.\n\nThe following is a short sample on how to use the API\n\n```typescript\nimport {\n  generateBls12381G2KeyPair,\n  blsSign,\n  blsVerify,\n  blsCreateProof,\n  blsVerifyProof,\n} from \"@mattrglobal/node-bbs-signatures\";\n\n//Generate a new key pair\nconst keyPair = await generateBls12381G2KeyPair();\n\n//Set of messages we wish to sign\nconst messages = [Uint8Array.from(Buffer.from(\"message1\", \"utf-8\")), Uint8Array.from(Buffer.from(\"message2\", \"utf-8\"))];\n\n//Create the signature\nconst signature = await blsSign({\n  keyPair,\n  messages: messages,\n});\n\n//Verify the signature\nconst isVerified = await blsVerify({\n  publicKey: keyPair.publicKey,\n  messages: messages,\n  signature,\n});\n\n//Derive a proof from the signature revealing the first message\nconst proof = await blsCreateProof({\n  signature,\n  publicKey: keyPair.publicKey,\n  messages,\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n  revealed: [0],\n});\n\n//Verify the created proof\nconst isProofVerified = await blsVerifyProof({\n  proof,\n  publicKey: keyPair.publicKey,\n  messages: messages.slice(0, 1),\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n});\n```\n\n## Element Size\n\nWithin a digital signature there are several elements for which it is useful to know the size, the following table\noutlines the general equation for calculating element sizes in relation to BBS+ signatures as it is dependent on the\npairing friendly curve used.\n\n| Element     | Size Equation                        |\n| ----------- | ------------------------------------ |\n| Private Key | F                                    |\n| Public Key  | G2                                   |\n| Signature   | G1 + 2\\*F                            |\n| Proof       | 5*G1 + (4 + no_of_hidden_messages)*F |\n\n- `F` A field element\n- `G1` A point in the field of G1\n- `G2` A point in the field of G2\n- `no_of_hidden_messages` The number of the hidden messages\n\nThis library includes specific support for BLS12-381 keys with BBS+ signatures and hence gives rise to the following\nconcrete sizes\n\n| Element     | Size with BLS12-381                     |\n| ----------- | --------------------------------------- |\n| Private Key | 32 Bytes                                |\n| Public Key  | 96 Bytes                                |\n| Signature   | 112 Bytes                               |\n| Proof       | 368 + (no_of_hidden_messages)\\*32 Bytes |\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n#### Benchmark\n\nTo benchmark the implementation locally run:\n\n```\nyarn benchmark\n```\n\n## Dependencies\n\nThis library uses the [bbs](https://crates.io/crates/bbs) rust crate for the implementation of BBS+ signatures and\nBLS12-381 which is then wrapped and exposed in javascript/typescript using\n[neon-bindings](https://github.com/neon-bindings/neon).\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related\nissues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14","yarn":"1.x"},"scripts":{"docs":"typedoc --out docs/api src","lint":"eslint . --ext .ts --color --format=table","test":"jest","build":"yarn build:neon && yarn build:ts","clean":"rimraf lib/ && rimraf native/index.node && rimraf native/target && neon clean","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","install":"yarn build:neon","package":"node-pre-gyp package","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","build:ts":"tsc --pretty","lint:fix":"yarn lint --fix","benchmark":"ts-node ./bench/index.ts","build:neon":"neon build --release","publish:ts":"./scripts/publish_ts.sh","test_vectors":"ts-node ./test_vectors/index.ts","publish:binary":"./scripts/publish_binary.sh","version:release":"yarn version --minor --message \"chore(release): publish\"","benchmark:stress":"ts-node ./bench/stress.ts","publish:unstable:ts":"./scripts/publish_unstable_ts.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/node-bbs-signatures.git","type":"git"},"description":"An implementation of BBS+ signatures using rust and typescript for node.js","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"neon-cli/**/minimist":"1.2.6","neon-cli/**/handlebars":"4.7.7","conventional-changelog/**/minimist":"1.2.6","conventional-changelog-cli/**/minimist":"1.2.6"},"dependencies":{"neon-cli":"0.10.1","@mapbox/node-pre-gyp":"1.0.9"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.1","eslint":"6.8.0","rimraf":"3.0.2","ts-jest":"28.0.5","ts-node":"8.4.1","typedoc":"0.22.17","prettier":"2.0.4","copyfiles":"2.2.0","typescript":"4.3.3","@types/jest":"28.1.2","@types/node":"12.7.2","pretty-quick":"2.0.1","@commitlint/cli":"17.0.2","@stablelib/base64":"1.0.0","@stablelib/random":"1.0.0","eslint-plugin-node":"^11.1.0","@stablelib/benchmark":"1.0.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@mathquis/node-pre-gyp-github":"1.0.1","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.15.1-unstable.548a736_1658098075470_0.22928558465819404","host":"s3://npm-registry-packages"}},"0.15.1-unstable.b9fccca":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"0.15.1-unstable.b9fccca","author":{"name":"MATTR"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@0.15.1-unstable.b9fccca","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"homepage":"https://github.com/mattrglobal/bbs-signatures","dist":{"shasum":"412938c31f578cd9c6e14a2eaa5793347f55eb21","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-0.15.1-unstable.b9fccca.tgz","fileCount":30,"integrity":"sha512-nmeKIur/X9PJGnRwPF/CerUFJtXY1TrCqUm8Kxd8QohpsRIi3Ya5lwxxEyPwuL4KQzn0CUMX1oVyBPEOHr6iDg==","signatures":[{"sig":"MEQCIHxP311nnzhEKjAh0PVtwrKbzXJP8YbSnTqUQPgcQBQ5AiATXtZ0zl4iYVZsV+O+nfT4FBOFO96Q+AnVSpo3DaHIfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":647835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1LSkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3tg//biyoSGOd5FgkulgSfRzDq5cUWI4+bSA5iHvWWVzAb7la9d+M\r\nUwcF5XICCSTwemWNVj2vYjrMTr7Do3PJ4z8glZ3AYOCR2DLSToMczHIXwbYf\r\ngqG13gAsEcHH2AVsZeiWS+8MWXnF3Z+KPlTyfKvCo1MdXfSOj0JrxQhw9uRM\r\nEIMxEQmWnJiSGRcCuPVucEBUcL8mJNmkvOFtxZwv88JjILS3jY2UUK4GldTL\r\n3TOsLnd7k/lD1GhG0tOLkrErd+wcMPODhOJ8tHDWzt9+//CacmW6XFIIY66m\r\niylFcvMpF0boTGxhMUCfp+rGp+VFIWnfj93VkusxULCenhMLZF9ZSMFb3GTo\r\n5sMRxQuu2ErEHT/1A2Y2FmI9nPXmfyjbM9CXXKWnCck5Hh54L+BDTfRDgLy0\r\n62wDYKzHoh0atrZJY2JDdteLnywiuPKTaRwr4Amv9fA6Cm7HV/LtwWvTD9wW\r\n4tGZxorevJcfs9W7j/b1pTQgPsReTscuKFAHKvBZHBURo5Otspi7YF1xBGfJ\r\nzfYuBSQnE4kKMotyWpJ7IrQOaTL2EN3rQiz0aRabgTGjnycb7aSBXeu4iIn6\r\nHBPHdhZHQrONPO7eH7KjktT54VkQOYeV7D6yTSQHYk/cHRaVODssNxdpTq4A\r\nYCt/hqSUI4T5AFZpHjcKPiH1FeEsfdASauI=\r\n=LVHv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# bbs-signatures\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/bbs-signatures)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/bbs-signatures/unstable)\n![Master](https://github.com/mattrglobal/bbs-signatures/workflows/push-master/badge.svg)\n![Release](https://github.com/mattrglobal/bbs-signatures/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/bbs-signatures/branch/master/graph/badge.svg)\n\nThis repository is the home to a performant multi-message digital signature algorithm implementation which supports\nderiving zero knowledge proofs that enable selective disclosure from the originally signed message set.\n\n[BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec) are a digital signature algorithm originally born from the work on\n[Short group signatures](https://crypto.stanford.edu/~xb/crypto04a/groupsigs.pdf) by Boneh, Boyen, and Shachum which was\nlater improved on in [Constant-Size Dynamic k-TAA](http://web.cs.iastate.edu/~wzhang/teach-552/ReadingList/552-14.pdf)\nas BBS+ and touched on again in section 4.3 in\n[Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited ](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited).\n\nBBS+ signatures require a\n[pairing-friendly curve](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03), this library includes\nsupport for [BLS12-381](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-03#section-2.4).\n\nBBS+ Signatures allow for multi-message signing whilst producing a single output signature. With a BBS signature, a\n[proof of knowledge](https://en.wikipedia.org/wiki/Proof_of_knowledge) based proof can be produced where only some of\nthe originally signed messages are revealed at the discretion of the prover.\n\nFor more details on the signature algorithm please refer to [here](https://github.com/mattrglobal/bbs-signatures-spec).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/bbs-signatures\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/bbs-signatures\n```\n\n### Environment Support\n\nThis library includes a couple of features to ensure the most performant implementation of BBS is running in a execution environment. The order of selection is the following.\n\n1. If in a node js based environment and the optional dependency of [@mattrglobal/node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) is installed use this.\n2. If in an environment that supports [Web Assembly](https://webassembly.org/) use this.\n\n**Note** Please refer to running the benchmarks below where you can compare these different implementations, the differences are very notable.\n\n**Note** To force the usage of a particular environment set the `BBS_SIGNATURES_MODE` environment variable to one of the following values\n\n- `NODE_JS_MODULE` - Use native node module, ensure [@mattrglobal/node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) is installed\n- `WASM` - Use the wasm module\n\n**Note** Previous releases of this library supported an asm.js compilation for usage in react native environments, however this has been deprecated due to performance issues.\n\n## Usage\n\nSee the [sample](./sample) directory for a runnable demo's.\n\nThe following is a short sample on how to use the API\n\n```typescript\nimport {\n  generateBls12381G2KeyPair,\n  blsSign,\n  blsVerify,\n  blsCreateProof,\n  blsVerifyProof,\n} from \"@mattrglobal/bbs-signatures\";\n\n//Generate a new key pair\nconst keyPair = await generateBls12381G2KeyPair();\n\n//Set of messages we wish to sign\nconst messages = [\n  Uint8Array.from(Buffer.from(\"message1\", \"utf-8\")),\n  Uint8Array.from(Buffer.from(\"message2\", \"utf-8\")),\n];\n\n//Create the signature\nconst signature = await blsSign({\n  keyPair,\n  messages: messages,\n});\n\n//Verify the signature\nconst isVerified = await blsVerify({\n  publicKey: keyPair.publicKey,\n  messages: messages,\n  signature,\n});\n\n//Derive a proof from the signature revealing the first message\nconst proof = await blsCreateProof({\n  signature,\n  publicKey: keyPair.publicKey,\n  messages,\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n  revealed: [0],\n});\n\n//Verify the created proof\nconst isProofVerified = await blsVerifyProof({\n  proof,\n  publicKey: keyPair.publicKey,\n  messages: messages.slice(0, 1),\n  nonce: Uint8Array.from(Buffer.from(\"nonce\", \"utf8\")),\n});\n```\n\n## Element Size\n\nWithin a digital signature there are several elements for which it is useful to know the size, the following table\noutlines the general equation for calculating element sizes in relation to BBS+ signatures as it is dependent on the\npairing friendly curve used.\n\n| Element     | Size Equation                        |\n| ----------- | ------------------------------------ |\n| Private Key | F                                    |\n| Public Key  | G2                                   |\n| Signature   | G1 + 2\\*F                            |\n| Proof       | 5*G1 + (4 + no_of_hidden_messages)*F |\n\n- `F` A field element\n- `G1` A point in the field of G1\n- `G2` A point in the field of G2\n- `no_of_hidden_messages` The number of the hidden messages\n\nThis library includes specific support for BLS12-381 keys with BBS+ signatures and hence gives rise to the following\nconcrete sizes\n\n| Element     | Size with BLS12-381                     |\n| ----------- | --------------------------------------- |\n| Private Key | 32 Bytes                                |\n| Public Key  | 96 Bytes                                |\n| Signature   | 112 Bytes                               |\n| Proof       | 368 + (no_of_hidden_messages)\\*32 Bytes |\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n- [Rust](https://www.rust-lang.org/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project for debug run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the all test in the project run:\n\n```\nyarn test\n```\n\nTo run just the tests for a node environment using the native node module of [@mattrglobal-node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) run:\n\n```\nyarn test:node\n```\n\nTo run just the tests for a node environment using the wasm module run:\n\n```\nyarn test:wasm\n```\n\nTo run just the tests for a browser environment run:\n\n```\nyarn test:browser\n```\n\n#### Benchmark\n\nTo benchmark the implementation locally in a node environment using the native node module of [@mattrglobal-node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) run:\n\n```\nyarn benchmark:node\n```\n\nTo benchmark the implementation locally in a node environment using the wasm module run:\n\n```\nyarn benchmark:wasm\n```\n\n## Dependencies\n\nThis library uses the [bbs](https://crates.io/crates/bbs) rust crate for the implementation of BBS+ signatures and\nBLS12-381 which is then wrapped and exposed in javascript/typescript using [Web Assembly](https://webassembly.org/).\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n## Relevant References\n\nFor those interested in more details, you might find the following resources helpful\n\n- [Details on the algorithm](docs/ALGORITHM.md)\n- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)\n- [Pairing-based cryptography](https://en.wikipedia.org/wiki/Pairing-based_cryptography)\n- [Exploring Elliptic Curve Pairings](https://vitalik.ca/general/2017/01/14/exploring_ecp.html)\n- [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://www.researchgate.net/publication/306347781_Anonymous_Attestation_Using_the_Strong_Diffie_Hellman_Assumption_Revisited)\n- [Pairing Friendly Curves](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-01)\n- [BLS Signatures](https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-02)\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","browser":{"index.js":"lib/index.web.js"},"engines":{"node":">=14"},"private":false,"scripts":{"test":"yarn test:browser && yarn test:node && yarn test:wasm","build":"./scripts/build-package.sh DEBUG","clean":"rm -rf target && rm -rf dist","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" yarn jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" yarn jest","uninstall":"rm -rf node_modules && yarn clean","test:browser":"./scripts/test-browser.sh","build:release":"./scripts/build-package.sh RELEASE","benchmark:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" ts-node ./bench/index.ts","benchmark:wasm":"BBS_SIGNATURES_MODE=\"WASM\" ts-node ./bench/index.ts","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish-unstable.sh"},"_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"https://github.com/mattrglobal/bbs-signatures","type":"git"},"description":"An implementation of BBS+ signatures using rust compiled to wasm","directories":{},"licenseText":"                              Apache License\n                        Version 2.0, January 2004\n                     http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n   and distribution as defined by Sections 1 through 9 of this document.\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n   the copyright owner that is granting the License.\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n   other entities that control, are controlled by, or are under common\n   control with that entity. For the purposes of this definition,\n   \"control\" means (i) the power, direct or indirect, to cause the\n   direction or management of such entity, whether by contract or\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n   exercising permissions granted by this License.\n\n   \"Source\" form shall mean the preferred form for making modifications,\n   including but not limited to software source code, documentation\n   source, and configuration files.\n\n   \"Object\" form shall mean any form resulting from mechanical\n   transformation or translation of a Source form, including but\n   not limited to compiled object code, generated documentation,\n   and conversions to other media types.\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n   Object form, made available under the License, as indicated by a\n   copyright notice that is included in or attached to the work\n   (an example is provided in the Appendix below).\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n   form, that is based on (or derived from) the Work and for which the\n   editorial revisions, annotations, elaborations, or other modifications\n   represent, as a whole, an original work of authorship. For the purposes\n   of this License, Derivative Works shall not include works that remain\n   separable from, or merely link (or bind by name) to the interfaces of,\n   the Work and Derivative Works thereof.\n\n   \"Contribution\" shall mean any work of authorship, including\n   the original version of the Work and any modifications or additions\n   to that Work or Derivative Works thereof, that is intentionally\n   submitted to Licensor for inclusion in the Work by the copyright owner\n   or by an individual or Legal Entity authorized to submit on behalf of\n   the copyright owner. For the purposes of this definition, \"submitted\"\n   means any form of electronic, verbal, or written communication sent\n   to the Licensor or its representatives, including but not limited to\n   communication on electronic mailing lists, source code control systems,\n   and issue tracking systems that are managed by, or on behalf of, the\n   Licensor for the purpose of discussing and improving the Work, but\n   excluding communication that is conspicuously marked or otherwise\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n   on behalf of whom a Contribution has been received by Licensor and\n   subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   copyright license to reproduce, prepare Derivative Works of,\n   publicly display, publicly perform, sublicense, and distribute the\n   Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of\n   this License, each Contributor hereby grants to You a perpetual,\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n   (except as stated in this section) patent license to make, have made,\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n   where such license applies only to those patent claims licensable\n   by such Contributor that are necessarily infringed by their\n   Contribution(s) alone or by combination of their Contribution(s)\n   with the Work to which such Contribution(s) was submitted. If You\n   institute patent litigation against any entity (including a\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n   or a Contribution incorporated within the Work constitutes direct\n   or contributory patent infringement, then any patent licenses\n   granted to You under this License for that Work shall terminate\n   as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the\n   Work or Derivative Works thereof in any medium, with or without\n   modifications, and in Source or Object form, provided that You\n   meet the following conditions:\n\n   (a) You must give any other recipients of the Work or\n       Derivative Works a copy of this License; and\n\n   (b) You must cause any modified files to carry prominent notices\n       stating that You changed the files; and\n\n   (c) You must retain, in the Source form of any Derivative Works\n       that You distribute, all copyright, patent, trademark, and\n       attribution notices from the Source form of the Work,\n       excluding those notices that do not pertain to any part of\n       the Derivative Works; and\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n       distribution, then any Derivative Works that You distribute must\n       include a readable copy of the attribution notices contained\n       within such NOTICE file, excluding those notices that do not\n       pertain to any part of the Derivative Works, in at least one\n       of the following places: within a NOTICE text file distributed\n       as part of the Derivative Works; within the Source form or\n       documentation, if provided along with the Derivative Works; or,\n       within a display generated by the Derivative Works, if and\n       wherever such third-party notices normally appear. The contents\n       of the NOTICE file are for informational purposes only and\n       do not modify the License. You may add Your own attribution\n       notices within Derivative Works that You distribute, alongside\n       or as an addendum to the NOTICE text from the Work, provided\n       that such additional attribution notices cannot be construed\n       as modifying the License.\n\n   You may add Your own copyright statement to Your modifications and\n   may provide additional or different license terms and conditions\n   for use, reproduction, or distribution of Your modifications, or\n   for any such Derivative Works as a whole, provided Your use,\n   reproduction, and distribution of the Work otherwise complies with\n   the conditions stated in this License.\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n   any Contribution intentionally submitted for inclusion in the Work\n   by You to the Licensor shall be under the terms and conditions of\n   this License, without any additional terms or conditions.\n   Notwithstanding the above, nothing herein shall supersede or modify\n   the terms of any separate license agreement you may have executed\n   with Licensor regarding such Contributions.\n\n6. Trademarks. This License does not grant permission to use the trade\n   names, trademarks, service marks, or product names of the Licensor,\n   except as required for reasonable and customary use in describing the\n   origin of the Work and reproducing the content of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n   agreed to in writing, Licensor provides the Work (and each\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n   implied, including, without limitation, any warranties or conditions\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n   appropriateness of using or redistributing the Work and assume any\n   risks associated with Your exercise of permissions under this License.\n\n8. Limitation of Liability. In no event and under no legal theory,\n   whether in tort (including negligence), contract, or otherwise,\n   unless required by applicable law (such as deliberate and grossly\n   negligent acts) or agreed to in writing, shall any Contributor be\n   liable to You for damages, including any direct, indirect, special,\n   incidental, or consequential damages of any character arising as a\n   result of this License or out of the use or inability to use the\n   Work (including but not limited to damages for loss of goodwill,\n   work stoppage, computer failure or malfunction, or any and all\n   other commercial damages or losses), even if such Contributor\n   has been advised of the possibility of such damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing\n   the Work or Derivative Works thereof, You may choose to offer,\n   and charge a fee for, acceptance of support, warranty, indemnity,\n   or other liability obligations and/or rights consistent with this\n   License. However, in accepting such obligations, You may act only\n   on Your own behalf and on Your sole responsibility, not on behalf\n   of any other Contributor, and only if You agree to indemnify,\n   defend, and hold each Contributor harmless for any liability\n   incurred by, or claims asserted against, such Contributor by reason\n   of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n","resolutions":{"lodash":"4.17.21"},"dependencies":{"@stablelib/random":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","buffer":"6.0.3","rollup":"2.49.0","process":"0.11.10","ts-jest":"28.0.5","ts-node":"8.4.1","prettier":"2.0.4","typescript":"4.3.5","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"2.0.1","text-encoding":"0.7.0","@commitlint/cli":"17.0.2","@stablelib/base64":"1.0.0","@stablelib/benchmark":"1.0.0","conventional-changelog":"3.1.25","conventional-changelog-cli":"2.2.2","@wasm-tool/wasm-pack-plugin":"1.6.0","@commitlint/config-conventional":"17.0.2"},"optionalDependencies":{"@mattrglobal/node-bbs-signatures":"0.15.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_0.15.1-unstable.b9fccca_1658107043831_0.14677220203567165","host":"s3://npm-registry-packages"}},"1.1.0-unstable.f02cb78":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.0-unstable.f02cb78","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.0-unstable.f02cb78","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"f3389c87537e3d6298f902b849533e3a2d4054e8","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.0-unstable.f02cb78.tgz","fileCount":76,"integrity":"sha512-IYYmya53BzGqSDSamcgNxaRwuVOk5HglJQRhdxawdlp5JREA98VOgTztvWjmGgJVYc66bHIPjfnnKqxADDa54A==","signatures":[{"sig":"MEUCIQDyKGpXxzsZ+CeRla3U7z+qnLPJRbLS1RmGQ7jU2ic1jwIgePt/A81/7Ne8c3y+hzXpDlOz93oSZ82/e7vNktpdIyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1L8iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVKQ//TFxhWRerTQW3lwZl/e1sxCfMmjsyfwNoSr9XFA0XMw1d6Ki9\r\n9/LzDuFWbFIRI6c6eXZ1g5Q3sk8asT9OaORxSPClnT5BOgw0tfqLvsC/vMm5\r\nMd5lkrkORsWmqj3TGgLvJJ2q6sHcYc2XqWAs9E352JkGipNXlOKENx3SsbEg\r\nTrCIBz9JzyyV5rZE2GNnLjd2iZTdbJ4/wLjMv7+5hI2ou7RmDMH2iFhMsBSt\r\nEv9JEFtDs07tqH3hfLXgr4Gtkbbg3GNqoPokEZWcm1MkpbZPYpdU3JEo4G2y\r\ndmF596XZRGP+shUTl72CKHQ/4ocJLO1D4qCEWqC/C3zFk+31XZz0t8ytyJle\r\nIOwCWBxLohvQOhDVQSHifJuylvbc2J/nj1zMIXoMCBYKsA9Z0ih1oXK7LX5g\r\nJ0uAMYoUTucRf6YMSZgGE+wDg/hUp3oWZcuKgbjYjMjEsz3GqPBzfPd3PRkX\r\nstmMUt91/OZSjiinJc7IxC+U82VdAHGbACIBox7pMfoO43kEdeS27VUtPEHW\r\nhCdXdE+m6u/zPDkq2amxofJWufChmOxboZap3gq/zGn3K10t37OCxNxKCspg\r\ndD2KL3g6t+8z9uvEHfp00wdtWdEdpPplOe2gq08aid7g6bf39pqoRyyvLdNW\r\nlJ8tzwvXx3BxZekuBKk2PK+yMxUuS+YctFM=\r\n=i9lI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"is-ci || husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","is-ci":"^3.0.1","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@mattrglobal/node-bbs-signatures":"^0.15.0","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.0-unstable.f02cb78_1658109730674_0.1794763964969639","host":"s3://npm-registry-packages"}},"1.1.1-unstable.69edda9":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.69edda9","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.69edda9","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"8677392679f1a7619e6c47106a764829879d677d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.69edda9.tgz","fileCount":76,"integrity":"sha512-jTsJjX1ugM/hB7pwj6/vo3kW/aN50GsO7kPhieJZGNeKqYTTDeY4r4ajkhtx62a8nefLx4MwFYNvjv67u3eu9w==","signatures":[{"sig":"MEYCIQCNdhAYbC08noJJ2BDncc7fmJodjAzjMOkDg92kJxxRmQIhAPsxTBddNz8QhHPcurD4ez2V7ITP7AdBarnZwHsK6hvA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1N45ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/Hg/9Fq5TjzKofaAFasRTIj0P+Gy6LaczKcib5goOxOYPxAXPyUqd\r\n4HYO8bInso43SsE0H7j8BnKYodBfZcErAbXQ6LcJqzxNhfr/wMs8L0lmMhli\r\nYMj0a6eH9Sse8OCqs2mzwYGVU4CZl6n6JWtZNduEHom1dKjfkPcv3U+/rvch\r\nKGt5GV0RZjBN2PgoKcO2EmHFoVhqO7EBy86cOxYu6M9RFmwDg+FQx3EQKAHO\r\n/VJdY4yNvQvhU2glrYIJEQu4rYRcAmRsEeNWqmivsYofnZvN/32NiVa44qb+\r\nxFR4KEDhF0Yg4n+uw8X7TTLMJG602rcIG6oFdRSKiP/Zsk38Nv1T5k77ZMY0\r\nfyQ/qNGRkGrf8oBzOZlq7Pcl5LLm4XSjbOsC36VInNdzuv9+EMeEGDDHp10n\r\n7qiIgy84ClIXsLgwWvAODjDX9iM9Qh6pK24CNFaH2jD4TlsVUiFb27yo56dr\r\nDfQjM8Ul1ekXGSea3AEtSsBaU7yZxl0urAUYR4XW6Vg9ag28QmqpZj+9gSKQ\r\nHyBIgREHanlCTvt0wCdEir2sy/ILU6FK8hK/gWGfIVQ4DUBp890Mto4/j4ah\r\nNH0rBqda7BBG7knam3O86B0NEkrFX/atVhTkFgfp3D0t6D2tI9nort8FtCSj\r\nPGMLHrdr5hktRqlXCWiOitkTN4VAg/RayvI=\r\n=NADN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.69edda9_1658117689018_0.5027002413984898","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.0","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"5a7c3292de592b45414a9480838bbdf516ae1811","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.0.tgz","fileCount":76,"integrity":"sha512-r5XMRpouJx5zDjrEsCMLJK+LTTXY9Epl4vy5Zi6dMpZIklnYKuft6/tiOzvokMESkmxFsHTiQH8Zre12f9Icxg==","signatures":[{"sig":"MEUCICdg/pvJlf2MlkmjPug0ISmRfjgzS5B4isuYSLKDFvrUAiEAk9VVdhqUADq4KamaLKWiUeH4paXT3A4qV2EW5rdDInc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1N7aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyoQ/7BB3oSXXcVs9E47EXcyoRjnx4T0TNFF0ksA94qLmxDVvoWmDT\r\nquNz1y65zjLEQ0oletpMjF5sTWsbZBtoJdV0n4VaM1H11EQZavCXAgDnRSp8\r\n4nygBJCBNajXvKWbtxJ17lP9rWzfS5gnPTfd2QjN8UveS24beQsOMgsr4RWN\r\nZ1PDCBccT/gtzDzTztclSmjCg7ja8VK4FxZeuhXbU5hKg+umXDpaliggKiC6\r\nEScywK1OMy0FEsBYv0XBx2AeaU9lm6XrI0+CNIaVDxwiN9hVSqJIYfFpjrXO\r\nPu08r7FPUCQvDbDxfRnniH984i0f4F1oyiC9qpTIkpIb2kK0Z/m23mVxMLHx\r\nhFMWOFaPYKWWKDgNLc5fcC2X2gE/FrOFpJWaXZ/RML3d80+JtzWSoSL2LdXj\r\nZPxpSZerH/aFURNy4qpba0PbnGMteR2/P7Jb3E8174fA+UAgU4Cej7/2nKBN\r\nZRGmOlFwednIJiVVZvl1E63SYBItXCUJqTQgORMhO+x4dvnOVywVjR2AGnzO\r\nnwORPBjBOszg3hihxgGX4Vkj94OJ2u7YnzEc0F+4MlJXZg9U05qA6Bzpwoa1\r\n7byPnG09bUBXJ33xz9pIPelBQ/FWjny1kaXd8twAgHSkub39e8m2mxT84MNL\r\nmwOw8RomtM8qA37390sH3JmUpOsoc59iwhk=\r\n=g31v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.0_1658117850190_0.3781126991102095","host":"s3://npm-registry-packages"}},"1.1.1-unstable.4d48c56":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.4d48c56","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.4d48c56","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"ac32596fb996e823432b31b3bfdfb913ad02e600","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.4d48c56.tgz","fileCount":76,"integrity":"sha512-9/nf3azPoIXh4m3Mf5nHqgg2uhGQOiyStw7z3zi0AW8C81U8JAfqq354sNoymoKzUTvI7efhgR5jPyL8x/llLA==","signatures":[{"sig":"MEUCIA8NYUXA1q5QP67qjLe7hIE57Kz6oae//nhz4UYgWh4NAiEAyAQkX0o37nAEIUuQUsr3Su8ysBxrZLR9wuQ99L87+Z0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2JH+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzOxAAjlj9DOm0d5hGIUFg0EKfQD/NBE4NNMyONtn+jxr+grsxr309\r\nEjC1vNoE4yiwci/oGzcFrbBRtbZaWGhpqwJ2X1GJmFwuOvskMr6i1zjJa++O\r\nhHd4q8LcJVKith3zxG0U+Odi5+LzasoE54Snv6Htlmne4OM6DBQyHd7yXrxq\r\nnaC26cB8JLVeIAoXMqqhJVRfeZVDEmgPJ+9DM2vVLr54t0Bd8MkB2Ca3inti\r\n3RucLaT/nqXHQkixFO9tC4FpLmvvCgjuNltfgiruKieF6vsdQvYVl4t2wCbC\r\np4qp51tK08Tf+J8KTU89dbRtEe5P3lnqStRQqpi0jnTR5TwgWgTjwKowLEvd\r\n0+txk/Q5h/oMjVcRv7pWWIZOxH2sANEXAtR/WJJWC9G9OU9Z5ouX2Fi95vUm\r\ntvMi7WaRoLS+3fnj3+bj8Hnc1zTwZxMuH4hgvd6dDPTiXWKj8p0nn5VxjO1L\r\najredVDlWDIzUgns/nwA66eYbdlo5fN/e8u0DiJy8fzU2kyW3imahoMPr4ZV\r\nr/P9E49mtsbxshM/zDhAVE906fQaI741k0m7bzeRlpbnVwEOfToPic+ys1aF\r\nX21V4cdN1UpJ1S9JxJeFYoBO8EehRuMfOeF7CyJvhEKyt3m63DT4zbjZIIJQ\r\nPiCjcqcqyd5rxLYJZiwk5Tv8+8QW9yBa7X0=\r\n=k94f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.4d48c56_1658360318361_0.2194192334178835","host":"s3://npm-registry-packages"}},"1.1.1-unstable.29d451c":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.29d451c","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.29d451c","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"8cf9b95a6d3d5140d8a4aeb36190b68dfb4890a4","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.29d451c.tgz","fileCount":76,"integrity":"sha512-8TI2Eai+PYqhpSkO+IjCaOsGMNQEREm68LMwxEMha3nCR1Ww6i+nXbzxgd1N1UxklITteEFywVZDiDU4Tr+HCg==","signatures":[{"sig":"MEQCIQC+xC1Hv3uZFPcMdEErKH//SSJgrikeYdZKBorbCRuJ9QIfQLbgh3ekOSWClWEo2v9pHhxDuNj1sTC/MoRhJ0Fchg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIQwIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVbhAAlYRLqnK+R7XcNHpFyNz4BsR3zRjul1Q5fHxcddH6A40wOODb\r\ndHAmuljC5dwPm6xW99CR90fa4179pFEoRyshdZp47CTj+xYfvovkssCt5OMV\r\n32M7cdYUE4rgU/fMOkS0atK/1jdtAqxA8kGb+w42pe9gzxIj6lT2eao2RVIF\r\nU4Hors/kREOSp41UyOD8+nMq19GiqfiP3Tqyg3szeoImMAdvKBlRR0PIok/X\r\nBdSl1iuzpLYuoErcZNnhA45dDQ7jfhUZsdshkAQ+QpDthrVALpay13iac8JM\r\n/Q2NENs9Sq1GpfehnKNtr0NHqCLPY2FZ1ujpN6H6EILHGU2mCQ+pN9EMwtON\r\nvOS9N3JPW1TmPOuSdMtouL7vZP2QDb3cVQx1qXyluQ85VEXRYFQAHr29kvQl\r\n5SFqxse3TZYUUKOw//athksiJIxWS7Ae+aJhvPYiTu9cp5H3PHOfIrC2RgO/\r\n48UhanlWacm9cT6lpu40TnaeHb1fPHhIm1iJcsRsldPdNYwCeUF4YxxNceyf\r\nY6GSHxyK1jmyp5M9XeG/cIrN5B4AAYtn5XqPo+kgWh1eLfk1oZa8LUI1p8yd\r\n+jSEaxIYwYfnHdfaS91tZ5H3Jf76M3ykUDKKSqy3cgZ5vud/puoedu4lRQKq\r\n7WRj4eAWuMZ+ozj33KKaku6lizyMetKF0eY=\r\n=n+7i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.29d451c_1663110152225_0.9280678149824251","host":"s3://npm-registry-packages"}},"1.1.1-unstable.2f3f300":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.2f3f300","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.2f3f300","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c174b5ccf3de19603273a57ca119d5f490d97b52","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.2f3f300.tgz","fileCount":76,"integrity":"sha512-nL9f5+L1bAIUUkCR9AsxHRpxydSUiI1cD3G42yiMvKpOiZ0zzvgIXrruZTO1qOOgkV6ICpuuGe3jsb603JdlRQ==","signatures":[{"sig":"MEUCIB1GdNGMyFc0zoWWh0LZKy6YR9mTLPbl1NJBc6cFZYAXAiEA4fEedP8VX3OAhFGLAW1zEcAgG4D53aN1smZZcTiPEbw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjchnIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWaA//SybYmAQAu63t7cmsvMhktJeBln5CbPOrdOzmVEcmaYaPKonl\r\nzKLlkIqvhQ83lXqDo0yXiOO4w9r9tKYQFJBoBrCUlCy9sxm+qHBEjPVekVyP\r\n0klSimo4hviyPu/DdHYaZYXfvRBbetzKT4mvhm4K7iSdQ2qu8V5NXDbTB8kQ\r\no4KwrD5owClar9UMovuwvgG/T9IfY2JVFa6ZRmi4tR6JOy8Fyl43w9yiAEIf\r\n9s6XBjxVy0x6WrbH8sFKOG6Q/b6iFQVKbLK1cD6swDcaj94f25SAhlP3ydHZ\r\nzAFrmi3qt+4X/rhzQO6GKXiewATUfDLtBBYYS+XDY/q19NpejzqsIRmO50Pn\r\n18M4JsbTqowbzQqp8Z6VDAoJ21RfboOaBeQu8+JuGylzcYfUTzal+VNepwUn\r\npc+vKO/Af8kawtXEEO46cp0sQcjSOvx2QC7BBOnLbyz17TBO2SH2rpm/z+TJ\r\nqvcOx8fZMZWx8uDshTtLSGhzO5D7kVsJnAlmjFlsDN/XVbxvefB5/ZP6LxKa\r\nzR4VidUrXWydQbzBVAYY89aJSqEgPNaT07LVAWsdk1NHNwMMsci1VkIWt8X5\r\n5PbadC0C1adkNXFbnaTn9i3uS6wDAdBPlePLCJTGqsJ6urxMEFIVeU0rl+EL\r\nGZobDq8x0KmuiItFzIClZ+XZTVJmqTCT5M0=\r\n=nIKc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.2f3f300_1668422088083_0.891406250176539","host":"s3://npm-registry-packages"}},"1.1.1-unstable.b8c2025":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.b8c2025","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.b8c2025","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"39f99619b30e5527892f1be0d51305910bb6b037","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.b8c2025.tgz","fileCount":76,"integrity":"sha512-/XysajgWlLtxPhOFe/AEjgJCcNs0gnzOMQbRYCJ8f8Lh3iF0C5U+kQLk6ze1QVhQzVtYZaJiMK/t2+VOEw1POg==","signatures":[{"sig":"MEUCIC2EzCwrj1Jra13L+NQWkOuiviqHFFvuj2Vrs9fUFmukAiEAp515SmokczfiPBdhXxBdkvcFIWEw4QHIetYg9zjgMnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm2zJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9bw/8DYaoGi6xmAMWUqQh0XAlCW62uzlF7C/OFJBPY0LIOoSkU3k1\r\nzfqbrt6Jsmdg/Beh4N37HEebsalPOXU4ac9mMOYQqL+C4nrSLqHhM0TvExEU\r\njIqF3hWH2jm/AE/z788E11szsYrA0laaHG4l7m3/BAW4q/b/fkBMxkTtcuf5\r\nw+SBA+whWV7IEMHmtFIOniD3KbaSfXiyn+waYdSo4dzIsLrfVHyinBFDGvov\r\nsc7T5Szf2dqG4iO/Te1OZ9FiHitqLizcAq0z7+yLbV1vbh4SDkkx8B7TyjFJ\r\nzcGUvxCNBWKsFjM9M43VlD+QSzyMEvVVDWbNXvov46X8TLp8XgHN4IUwQgIX\r\n1aASxg7G8TaTQAjAARK7vXAI7P6iNEEsVDvghFCpgMS/xEYmSKOF81TBEwmO\r\n9L3kS1qRuKcK19vR/vbvU8lHO2hSGaPmz9c4USyRdow7RhAbL0dw1kGL0y4r\r\nuhdk81VWHDNQomDkTKryiQsXpw/vYm5fFI5emx61q9nFAHnzRM9D9iKUzkky\r\n9tPkWlAf0xjZIB1Qp0q9VslLFc8Rw02zXfPE46D4aPWqKJHue3mzov2Yje8u\r\nxNkB0W3NsmUURuK2NW63dNMLD1fuH8Fuaf02BVl0RyVksQEYOS1cQViAS/P9\r\nYI1sjXbLEdSfOIU6ItBMUwmulbf0ln77BZ0=\r\n=g7v/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.b8c2025_1671130313489_0.9565144415468412","host":"s3://npm-registry-packages"}},"1.1.1-unstable.b11d931":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.b11d931","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.b11d931","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"f00cb76ace4dd30908d7b428d7b3c357eaa0c9da","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.b11d931.tgz","fileCount":76,"integrity":"sha512-pZ1gdYYCZzP3pwMT8mmM/ik76qW9JSxhMWs5iKnLn4cVjByskMI8Tvz7DgHA2Yklz0Y+Z/zqsVAplTm5xAN2kQ==","signatures":[{"sig":"MEQCIHjG4KXhTN5CpgHC46H/qPaUwPhnvHnz6SGZJhCESz5sAiBdj0hNJdRWe5aO2HpWo40zAywZooNKELC2WzGrpvz5OQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm2zYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryGxAAhW1GYXZRz0inWVU/LPgX4mjzhaMkdAdhH0kPeAt613XDaZJf\r\nc+whTjitcIcR6jcooPqgov/qlJDR6Oy9w5J8UG0SDVyVPS8AWjKWhBX7Ofo9\r\nkGhyYcqp4dBDBNQtoxz4fg5DavkFKgD7/ZZvAVrzfmuk4Jyl4EdBQhSf0Ud8\r\nVZnh+eCjjgpKfdf4eEwH+/sZlTwrpQNayq71wcohP/IgHTALT5PYbq9LHcWw\r\nc7K2S/TxpBSb+e5GU9r4g7KVZmQmxd4j4GLGn2jQOwWkQt9CxavP+QgBtKfC\r\nnwaqmoIDsqI1K4fydVY+dOWmBNySqp6fho1Nkiumxh7lEprC9ZWXCV1o5m25\r\nXXvgb8J6W1PZQncRnu1Cq/DcEWKWXwT4U2jEALRmWEqV2O8Mcrp7Oa81EDSZ\r\nrPKo23zZIXzyHezsiB7F3DI5rURtjcgKFG+3lyHFvw8ITgr/loJuRc7P5/KK\r\n2tIZ3JIHVAMvSwqB5xNFzDgF3FingZTFSTAD8vw50FRHSkcLe9v8IASvtnjK\r\nTVHzy3JZxZzU1Stxh6K24v0BfdmWwJSxQWZx1iTO58AkhEoJEcral7CXBN3+\r\ncpPnuu6Xkpe/A/GpbdIIwFW9ts/nOg3dM+hWZnLZfYYTOyZ9B1BQO0i0Q2gN\r\nkOudVy9HKLnd4qGFN393Q8g018PYhgLklbY=\r\n=PgKl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.b11d931_1671130327896_0.3542677419626943","host":"s3://npm-registry-packages"}},"1.1.1-unstable.4c9fd79":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.4c9fd79","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.4c9fd79","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"0a81f50617d6e064a03da6a1f41aa5ad948a512c","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.4c9fd79.tgz","fileCount":76,"integrity":"sha512-z7DfbDiwUd3XXjYWt9PSoya6u7y6eleVqNutPouyrkJSnVqHvya5qvmaPA8sPlTqS2SX5c6RQe6EttfQS2EkZQ==","signatures":[{"sig":"MEUCIQDBbU0nCZYewQOI3wC25maIZpWdMJBlIlQLvzP8xKwqeQIgX9666HKGS7/+H821gZUXmsUhS0Z7M9DgMtnLY/FGts0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm20EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOlQ/8DEkVNJnNatBb4HPm3uGLL/M54CLxXn/KdmMlV7QZkS6vlCwD\r\nWH1ih0w5udvZ17hvRHS4O+NpYwQvAArGG28MofpkW9rNsSggFwwnkOuyQods\r\nJoOB+nnvJ2NCAdp3KHqZZQbcxBx0jEtdfJt33SScNrjNRJ3NtnC/vf/JCGaC\r\nCtBiHicrIJRkAbJ6bfzgBYS08ZqF8rQES6vOTMXERckUaJ95+1weEqZXYihR\r\nVc1rPgExFirL0HpsEg1ikVN5hDuhZ9LxKfo/2pKRsz4lQzXgHFxbSHxEbyQj\r\n1mVRqJG5T/rdzdB1vvF9uTFGee1VN1Uk9SsujqaDt9yyqgCutH52cdeJ02+y\r\n+H7p7TL+4HQvYgGazfKbGq1JG8ri2R+zKbe8A+c8q8LOhghrRehJF+oo7tOO\r\nLOdoO8tUYUpEDG9G0PeZ25++Tqzwq7GSGh/g9JMHLqNmgkFQfaPUu3Nk52tf\r\nTmdKy9dUPCxe6YiBPEmxBNiyba2Udg5a03xI66DZlCgQc/Vfcey3T1HAYjiL\r\nq8v34HVO9tndAl9IjNH/w3mGsQPNV+PtBBN6ItCGPFwBofBBa6PSjpOhlPq+\r\nLOwZSbIcmUuP3AgdH1GIY0xdbOUix9ZPV16luSmmDa17pMdgjgxnTJPo6EZD\r\ns2LDsNVRXETgOhg35YxSrbUTGNnTvT7pV/U=\r\n=g/qS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.4c9fd79_1671130372565_0.623663914611803","host":"s3://npm-registry-packages"}},"1.1.1-unstable.81d2247":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.81d2247","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.81d2247","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c41a35361e56ba1f3973592d6d1de60798606bd1","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.81d2247.tgz","fileCount":76,"integrity":"sha512-sHKbdSejpYR0YY2cD2UpUgq6JvvfxlWR2h0K/LB0uJVYVBNZNcHXyrIGGm80kWpNx6/FLBzR40lzyhl2WrXTYA==","signatures":[{"sig":"MEYCIQCBtito2Ij8hsYUPuv/A9ukblqaaBOECwFQP4GL059a8gIhALYdF3zwKerPdWuL+MYbntUra4AnAimlvRaaiFml3kKD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm20cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoZSA/+Krj1WEPf/DfpH4oqRVHDQhvPRqC+cuuCeOEyALjx6i+yWpBq\r\nxFEL1ovcUiiC3EwZ6Eaxztq44NCn76rdMw2HBErJgvc4ShlVY3c1UojBr/Mg\r\nLZzMmiO3Hwg/SXkmmSIUpIMzpbGee2b+5pPxcGDzp7Buo4DxXJ4jUFit0sfN\r\nNk6//lp/LnHSpI36AG4DbJiKJMcko/gDMix4eRPIAXFYbwq3qWqcBrISkviD\r\nvxls4DXxaBAntWevCutDlLLAtlGNU8yNRjbCsQBxSjQF2iieUzxHIvxu6G4w\r\nsLOPTgDErRxBcVeSDTsEP5gvV+3Xf9aLiWW5yUq7Yzq/4sKWUAKgdK4Gqe1N\r\nHHNXkF5D6MTFauT7WWdT9BhPkJWomh9l8LN8BCiDCOAZ5lcputJeOUihLGSx\r\n0WhtgD/bMiYNNj3o9XdOhVYv0ipFk6QIQDF/PtZ1jMJV2jTAZnxqx+w03/Tl\r\nv43zqsPr3DaxyuI92IWWcAKFZ0MmxelueEyeDQk6Ktk5nwF4t/fH4IMBBGgv\r\nC2hDcAyTTNoQmQwllny5vC2XOeZWvT7iYBgoVNqpNbL04Y+kmuXoKNijeT6B\r\ncCJscqRXwqEJ076ZZK8VEBZNQnghIdYI9E4XanNw7t1WUdRZCFI7muvsWsGK\r\nUE1FBrATx/XohOSCKhx8NrQ8ieInk2iMP6M=\r\n=/RfR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.81d2247_1671130396461_0.45368184202018225","host":"s3://npm-registry-packages"}},"1.1.1-unstable.7b63db4":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.7b63db4","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.7b63db4","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"00917c6cd94a7449c87f13421da7cf3efb386d48","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.7b63db4.tgz","fileCount":76,"integrity":"sha512-doX5t/vZl8hD++ZY/y9CTkXFC0zLy7MBxMmujq5Qc8V09qR6uovcA46+otegsHHjNFtqXJxbVsD1PXCO26j83Q==","signatures":[{"sig":"MEUCIQDnpZQmF2DO5aSoblqPo5d9I8Skxa4fWvZjeBHhJbN5bQIgTEMf0jaKehR0nle5y8a1QinrYMmSp7l086Wy95tn1Xo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm20sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQWRAAm9CwwhXXp0941VHykcG2Bar1z4TuVUT0vpFAkl1eQaKuduJr\r\n8APtFenHDvIwp7beS2kD98ZZhFvJ4KSib5McUbdBSSwleMSTYaqHoVq5jW73\r\nPDQzwL2/qWGtgsgFmCQ5Ha9fijwJw2wQ1Nt+QKP8vWKtCuaUiAk1d09cmO1O\r\nOHjjsha/EAOtRT9rKh+WzlFSC5XAy4vSBUq6zJaziBH3s8XM0qCwxGtZoody\r\nGRYygbvwFrATbNiaGTHFjsELUE67Ea/Rg1IEnRmO5oj6LFW+2HvrVpGfBUyU\r\nRKDIV2kpKgoZ+TGXzgu0G8Gg9hBASQqh2KM7MejojmhPOP49ImUfRY4nahh4\r\n67h9bqYFfMe/8VfLBC/7YrMhTMBlU2Uxdl/+rNVXdQxP6B+6u/QhGjmCbha0\r\nUFfYq/AGc4HhLpoCAfDP/6sfy+Og61nEEkES6FDggFvLXUwbdh/vUdNEb9xI\r\n19yYmn//LImYspXVPhKrGn7BFhtguUvKnOmeeK8OyGXjhIrI9oUDte3JxT/e\r\na/NaTb0GdsMn2YFsIZMvn0flwmFOGnj7i9lfZj3FG8owFPtmmHC+RkJ08RRY\r\njoVYa+NhYZ13R+72VIBJBXmH8cuiCBd9EOSh2kjgQgeSEJ1RYxmtufPd1Q76\r\nOa4HEy5w/Muh48PPxz0OWUkZUf6xvwpPKdw=\r\n=0gPU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.7b63db4_1671130412711_0.23852622880471874","host":"s3://npm-registry-packages"}},"1.1.1-unstable.0612e6b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.0612e6b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.0612e6b","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"60b6c28f260e007c856cc6bf1ce8a68ee22cd746","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.0612e6b.tgz","fileCount":76,"integrity":"sha512-cJMmKVLyJesqsrp9zaJ8TLoT6D3YGPLqPl1OrsEtdnfML2Be0vIrx/FPOUcRJ717zNTetFD54sOFDMSrcDVsag==","signatures":[{"sig":"MEUCIG59v044hoiAos5qAEFs/RBVAlMCeW8rGyaV8gI4RFBIAiEAzl67UI6e6VydW1U65hEPVcOwUDrlGXRtQN2WWS6elSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm22NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqC5Q//UKp27c/lQHrbLMdlpFm4I3gOAnIDUIU+xR4E5DQFgRK3CXI/\r\nM2ZYGH4fMQvHHIHA7P480x4uEeiGCBXiDyW77mN/p1vnJWstgLMdW+oTsIqG\r\ntjncg2uCA3LdK/iEkgkO6y7ZBDUqwsEpZe3pe/Q+MYsEmVy9G1eXmPDpzzW9\r\nicfAdQC5bzsh6CA7FzaWk99Hcx3t0/oHaQZ6Ki+LdnsIqmTnVvRiSf2uaTlR\r\npfbpxj3ysrKiGUOX4O3d4uyRo6LfOtG+0bbq1WlNfKjiWADwNAbWo90WyVw0\r\njaE9Cw41+9+QOYDVRNexSv36dp6ZvboV7sj6zykwLc32EMOvINe7ZclStssc\r\nIsOMicWqYr27PKqmWOoybJyEyxVTuT2ejDsHh8lzHOWMVLNUI/UaRhxDHnFO\r\ncO3rdqx+Mcb2ufLWQlAZzlG8rUzI1HmJjM7tW+ZnVjw2+HUswb59Lrn8hMSQ\r\nRryqdEMIsdlD7e/qbCuyDf4nepNB9r3xA+WhLgt+D0BB8bDCxr77XkGQNRL/\r\nfEELppKF7bfF8Yr6F3IU5c2hfzgCxEKwjCSMkXaqa4EsApn6Utoi7OqX1USN\r\nQTcE+Q6WLSfRxjTaev2AENhrdoyzWXecvPocogHQO41rEO4ywgewR/O5HzP3\r\nQ/GxtiI2uAbA94RxNrSjtx4IVNVEe9w/0J8=\r\n=81oj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.0612e6b_1671130509664_0.3431643370250479","host":"s3://npm-registry-packages"}},"1.1.1-unstable.d6fd034":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.d6fd034","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.d6fd034","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"89cf6d5dbf91ac6735d393d47de8fc4206f21ade","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.d6fd034.tgz","fileCount":76,"integrity":"sha512-pcb2NKoo9V+kH7JdiD8Vh23LAhPdFZ0tCDkueQKsmbucSg7+ndnU7Qnhpr6i3I+xdYqjzfgtXNBWmamvCK06eg==","signatures":[{"sig":"MEUCIHeiWpuqQ0m7/174CH6NSieerrtACdEHJVQiJP8oIXY1AiEAppVTXq9EfYyf+2pVyh2yX+JmZimPE1PDDvdKmFqc+/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm22vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoinA/9HTN+ho0s8lJb28L15NDzrW/o9YtNUsIflGmwP1EVkW43g6OE\r\n4Ii2Isn6Twtzww0fViuO7gaCMK/75urk84u5+a5SSLbyMNSpiyIAC46EV9rD\r\nmhxi92kgtdK6y0ghZuFWQFSVEiLhdRX3PlCAXZrTCaHp9LuthRU+of2PEcVv\r\nf//br9yoPzO9lNa7o5QYWzY1/ia6W/ypzHyscl9n2WiwuX1eBD4NflUyWbx9\r\n/vkgH+as0XEAgqH/JzJYxc17Nn/tJDoVLh+ppGy3F7wxClMwlQ5AUDh2FtN0\r\nCQcJCJoeUz6E9sssMviqrmzuVucsxfzvso3dzogtaBrdIyqQNW3r6DzRFkq8\r\n/x0AUDEOk2gVMfElzGLaeiZKPj/kW3J7XIUnRZgFF4jZZ8RL0HYX15kIg0wr\r\nMi9H4yh3XrbPfwQ5Ylmb3eRDOjIXgSIFjaA9eRO7QrPgB35memLSsq0YUKEX\r\nnOV5Mx3XLXKjnqtnMu8Y+ixTldwe2UZrOaBBiqTxjktsyqZd+0Mr8G0VyyOy\r\nAQk5Fd+FFEWBatmUHewUsj/po53ADVDS/MOqdjR1x8eob1neK3o6wu3GGu7t\r\nxmuuj9AVVLr2IAfjKiXqGIkiMweO35YzTgzQxtXgwH7T/CDBPMWmNorim9Hf\r\nmkRIlXF/hhJuO+LO3fQYIunObuvHzM6EVh8=\r\n=9Avr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"3.1.0","@stablelib/random":"1.0.0","jsonld-signatures":"5.0.1","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.d6fd034_1671130543215_0.19894101062252711","host":"s3://npm-registry-packages"}},"1.1.1-unstable.61780ca":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1-unstable.61780ca","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1-unstable.61780ca","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"00b226c2d8109e9f579ddc177ac2314a100a4dbf","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1-unstable.61780ca.tgz","fileCount":76,"integrity":"sha512-vVXvGct80JkTD/2f0yT8Z4Ei2fd2QVP6Q3MpFGG03I1YZJMkcjvXPvWFSHSlygN65A3sgbjIOnZNkdr+OaT5rg==","signatures":[{"sig":"MEQCIHYGshSFlI83VT5Ps9/B/Hen3VXVV7IBqRNX/ilvYxgJAiBKgjClZg0WppBwJe/JOkB/o23qOI+R/c/9gWWp2Vedww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm5ZRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqrkg/+Ks56+4p4J93Upi+t/Od6pBzmW8XVcF62CL+Egm+e/yMPD9Iw\r\n1EySBseYoA4rtrQzizKmvH6AxZTfF8Fk6deXMEFPgaq9Tgi41+N+GrZcDZM0\r\nZc+jCFjKCpDIoWEXsSKFfXj5DiYhcOazclzLZ3N1eT+5nlYURXOUZWoVbjUQ\r\nb8exCiXE/M8ORUnK0eNcuD2oyHy+xmLZ+yBc2+K75VBX8jKN1DMj28J7Tv/p\r\nBwpVUreMPa2qp1UWF3lzAszhH4GvMaqED+aySOJnKHupAa+gjR1t5wvA0rWc\r\n2ILHFhnv0fnoFo8XT8K6Yne+uFoWlHB2R9JzlSHR3MM5e7M9iC4VXPZNxuDP\r\n+2wnwTW/NKhwE3mDiY0SuPi40VEiQWY0VtHnzLFSYgJ/cqaF2rhRiUJQPn0J\r\nXYvDiQtYalu54m6Q+W6AFPQDmQ0Or8yr4reaEmafXe8LeuH5ySKGrrGPTQEs\r\ndT0etYqz0WFW8W78g55kre/THLpnpUktF9GNSDAZCPzSpM67nVHnjhZT7Z0R\r\nAs/50SX/eN922eXAzGwJu6h+evOaau9Qeo3riHUm8KDYiWRcod3eGYIycgSK\r\n9CfBw6WC/1i0pd46BUAUKHUGkhn9AXAnDwYjjaOChQ9Lwa7GBjB2rH/szCeC\r\nEllFXkj0TaJJa8cBFiK25PZLmLDV8zswDZo=\r\n=uNfa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1-unstable.61780ca_1671140944973_0.7438015483408245","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.1","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.1","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"0aade4833ff7dbb2e619ca51077dd79bb2fe2918","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.1.tgz","fileCount":76,"integrity":"sha512-4V7Z61q6EmxYg4cJTkcN/5ughBF4VoJAJPVShdoOh6jinxC2AYRLXmFb5YK2gIh7Ut+lrd6UAh59Lks3VUzJFg==","signatures":[{"sig":"MEQCICn8x/F6vZ2YhJX9vImt6P2TEsI1gNgb+EiQLO/7D+JmAiAqXw7d3xDs5WDPV8pUI6c6fBAJSx2y6/i9JhPn65Ywrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm5n0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqbnxAAgidlovj6kIotIe3dSZzGlSTUmxYMjNwsKGemlosV13H5LTr+\r\nrXX5k6Am1LAYGDctd1fglGVgPfD7cClHFYLISdck5XXEj/HzuzlBvYzRdc40\r\nwnpea8zK+gsMGKxavOgvZ/815nYJE7dfvd0atInhZ1kSnCpZeYCMfdCkXvra\r\nR9lgVEfaqbjxvfx8YWr8NdjCFPxTjf7OAgb7mDwZFk1rAPakvsn1/nTVXwrp\r\n3fq728SJ8+pQuqC1uHH4q+zwxw/aNrYvGIbw+nhSTbct3PVx6duLnsIiSf1X\r\nM6FUkp8EuRAHa58Kj/k+zDPr1qi02qiSwZHGYH5FxZqv7FPuJypnhOjP8v4Y\r\nzqQl0noVDbJ8VFhOYkDmV2FTWd+DPxavvoRwEhIfRxaiCce8bb5uUY/rDTZq\r\nl5XdoKNdB1TT6D0ndjyXZ56qiuQijnp2R+LIYJwTXXJ7ah2Op2OV8Bmeaj7m\r\nVKyJG5tl0sQn8OcpArfTgkBIucE7hp1mblG4Qu0tpie5sd5L/CawWZwG8qrI\r\nKJPFCTzZOE/pnsnRtMb6hBYbJiHNH3jftYyUvLj1/14oIn5wKEIytu5Sffgn\r\nTc25Gsy96xYTk9V0I6fxEEKKkdw/mMJC7U0yhp6U30mL52asQn49H7GZy43j\r\nYMrhsuPTdflwLOrSevn6ciHryhVi2Sj5vNU=\r\n=QwB8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.1_1671141876332_0.4891625775072166","host":"s3://npm-registry-packages"}},"1.1.2-unstable.49e0272":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.2-unstable.49e0272","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.2-unstable.49e0272","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"3bba38824c29af21be2b4845e96f7c8e141aa323","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.2-unstable.49e0272.tgz","fileCount":76,"integrity":"sha512-QOlxix8eSacCZ2fcsCsiQOtZaruH8lMTHPrt8mAspO1Yswj0JtbhmyGisGi3Y1Mwiu92S6zRHnEA4K+spnMqZA==","signatures":[{"sig":"MEQCID7MAQAzNU5Qj5LGKsL9CLbF3R1oXeqv5yA3153UtZroAiAh7gMoCZzHBCYdvMWiDnVL9u5L22LzDtN4uAe19ZFB3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjm6FXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVow/9H1aPiy/an6J3xmpMU776E96i0J3XhFSaAlk7AFxloz6Ux9gl\r\nRh5xqLoU4wlFowbS95esIBfogcX61Ut+6u2/veT+mIQ959G7CqtlZwf8Dayc\r\ntqpBGngIbJSaerAPbnijONlq8JBF2qryGAsJJouNmFzP8rfN3DoRc/K7Vjho\r\nJ0EuUsPd04vHvhh8RVUXFWzmB7/Kp9aC/fXyjpIjJDFdFffQzWC+KUQkcCN7\r\n9WlWlEMkP/s95ikWJS2QBt/Oc7yt/8rV7avlkjKDjHA8lmBIz+vphEnT8VSt\r\nNoqRu5raDhqBFH4Ycxvy4h2BgHJqiJ/A7nlJuHFo3E/Rcg1wJHE0mTugC4U8\r\neIarwh0eDN2b6EKpp4R22vR6NkWYiaj0dNECxJkyE4Wkx5bzLeRxN3kZ9fJR\r\nYlO1nCRC0p9FbV1SoQYFeXXXmqTPp9jyX8Pi1jPTgtruZtwmEpVa1CzYUaQf\r\nc2XIRYqxb9v9qw0rYq0/SoxbH6j9iuz6B+IyCk3wB1afzhfQWnqTGkoWEn2H\r\nS0W0vjirpPfxaK94FbM7n1E6US5Y/vPlLGRKX4N+WWbpzkEZrGhuOwnDu9M9\r\nUfBy902z57l4mNoYztBqzj3yYjm+5qPOS0EEeM/PVd2dhVR/wuiKaFGrVCEw\r\nwrYpOhgdaM2FKgJs9upNRUjwwiBGvUm5jz0=\r\n=o1he\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","vc-js/**/node-forge":"1.3.0","crypto-ld/**/node-forge":"1.3.0","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","vc-js":"0.6.4","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","crypto-ld":"3.8.0","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.2-unstable.49e0272_1671143766892_0.1600875190918014","host":"s3://npm-registry-packages"}},"1.1.2-unstable.294340b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.2-unstable.294340b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.2-unstable.294340b","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"fd1f11ec380e94c79a1f9f860daa347cfa14c71d","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.2-unstable.294340b.tgz","fileCount":76,"integrity":"sha512-sPVpd5s3wEreTgJ7v//Tle7J+Y7GzPqsk8jOHtSlVY6j6dzzwdgxlkchAEBhhZ3qD7p1+ZOpGHfLlACTQv3KdA==","signatures":[{"sig":"MEQCIGUhZNtep8NAXfLHTvp4q5wQ6koj/R6CedpAGoldggFmAiBagxjXEYxOYhVROuNKG1XarO/FlLYT+e4q/MzE+wlQOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn5CBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovMQ//bgOj8DSoBNVIKls1Js7wyufpHNNn5WjTsv0kO2qTt3+wL8fr\r\nUCfItYChGLAXJsuutnY30vlXSfM4l3KEqRl0yy53Tfob6IJfUYgJOwD7dhdv\r\nk4W3goQWlbhML56FO7ZC9P5njsElnV2h7/yr3jrPi7JmweGKLC4HGrTyKOGU\r\nNLTut5w+IYZ/d/t6Va3FacBbxmPTwSSlNW7VjTnMkw2beUN8Y7yRYhO6tJXU\r\noGuGKF9culAVQH8T7CZJCk4Or8vpHhun4UMgCrPXQcwE3gIOWFlmrqrbLAYC\r\nYGB6NM8wRpSy1U4TPfZLCHU1QBQwsdmFtvRtOTw3M8bxepcSFp2m5TBMB6EC\r\nk+AjONOcfuo6xY2SSiRezuLHLsLZBh4GEOwKQNn4yK5SDzsfTaXtDbWK9vNG\r\nsHfpNPy3yUVHS07n1a9+WkTCMrV38mhCfJFvUoLnWgbLbfu4SJnjzEvaAT/i\r\nkWMYO1YywK+fNk7eHIKvOWZ4GxRebEOqB6kXR6JtlePM1vgLa3e/KpSAFHFk\r\nr8UUYNcBQhzMbmX5d1oLAvGWkMtoqSkXawlSXYbNKqUOEZnNVFECFm7Y8R7Z\r\n/SLr+mfgrlJg68iwK4H1+Z3QB7cG4yHqDuj5YlhI8Deqa8nxHVOv1aCH468x\r\nvLmhX46JoQvCqqOSRKeeoGuhvxAm9dIjzws=\r\n=/7eX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.2-unstable.294340b_1671401600831_0.5577946890485046","host":"s3://npm-registry-packages"}},"1.1.2-unstable.e199606":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.2-unstable.e199606","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.2-unstable.e199606","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1856f1de43d853814301b7e9ada1770798695756","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.2-unstable.e199606.tgz","fileCount":76,"integrity":"sha512-cwlYM1h3t2pPgZ1lnwKUTyRdgDKuqb9b9TPxMqShr/L8nvTgvCskE/5sHAZpGc8+NXhhztVrUTGiXtwLD2Csqg==","signatures":[{"sig":"MEYCIQCyGDOrfK5DOLsyHbuVw59ymGoByM2PpGxo9eIJJfXbDwIhAIgNuC68UqOIMrcXulBJI8dXD98vNRd6u5ZDZJG3r5Fc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn5I+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqSag//WhxAqXBKhVgeuqyz962Vr7pftYQw9zqUcS32bnJ2ObUmXGLY\r\nm9BNnP09VrCVKhlpIAIgIgrvJ2JTYtFWo5X0fiySZxiwaGo2MMZ8zKs1viv0\r\n+0BtHlvnIDZHpbnVViBn7QDAwKH55pH3a6bi99rwFjQ7fn56CJ8xB+ljJLZ2\r\n1GwhkUuN2BN7kvxwuymARaueqzi943tBf+jJU7tvD2M4ysIaa2jyJu7RaFB+\r\nGW+C2M/TuHH1PscUNg3rOGc3GbTBLOL72prtvQtfSGYD1GV5icnRG0MLu77j\r\nVUTdWJQfFTxDw9F2N2Lvo9QVULuJo50xN40wFv3pxfAnnqCBGB14HI8iuNbE\r\nq0IUVdcNemqdHDdV72o0i0xt58Mz/eHhoWDidrDdhm5b3sEM3hrfs+K34mna\r\nvE4cEXFPMLaB6OcPVfvp5fgn1NrDlfE9AHRtmaKDl+LBVden5p69h5/p1/ul\r\nfjE0RUT42m+eCq8rITsv5rcuv8QeMNxJdS7fgLm6tlLKoMF+63XzGAD0XeQ8\r\nAxSoOs2XxDvnLxQW2S4IFcr8XhuI5e2+Bx6kNCk+INWdYnamuRic6+dVS/19\r\nn0CS8z6ZkJLI7qkKy/rfA4IR5m6YGyv/C8H7s6PZfoEQ990/Wd0O3g9Fsp5f\r\n3s4qSUomkhs4s6mT1eDXP/mXfawaN/9h/3s=\r\n=YZ5Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.2-unstable.e199606_1671402046703_0.7719330148096306","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.2","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.2","maintainers":[{"name":"tplooker","email":"tobias.looker@mattr.global"},{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c5ded8efeabb1352145dcec19243986683437de9","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.2.tgz","fileCount":76,"integrity":"sha512-BiorLshiEyNo76x4Z9tZvg+23eMy1s7EpzAtww9FApazoonA3pzLUeCOZKOOR+DIYHpAC9WUl/TMEFSWqOsGDA==","signatures":[{"sig":"MEUCIQDJYbfGDJnJD0I4OlWLL0LdTSOwv5wYu86mskpkP9IkvAIgMUAjIh7xW4AsFEHkfMlAgmSr6XvQ4O8JWZ3hgWVX2OA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn6g1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKFhAAospuNCdFG583Wg0vqN3WZPfLK4SOL5fPYAZYzEH+ezlcVW2m\r\njKe3rYADVXxLKFxXkBAc0BMJFqs6IUrIpeoUPMHmO1gFSK5AtibvoNp7JO7C\r\nd9QxIJkNibcyYYbRMN1X+2bvieBoxxrn4WeQQbhSbKoEdOAiStaK15TlOKi3\r\nnPsLimBJTpWoPFakq4AkZa7fT0zbG31wYWKw6GKBWMHSuR2LDdZjPQkzbnqt\r\nqrSCRCDvk1TYkn240Vuky0jqjoVunzt0KRdBYOa8qRZqkVJiMneWrCIIa1FM\r\nr1GBRBRoGlapb6qoGFhyOkYWm+5HZUvKEjM9hwmvGYcO/05pkvnyX/uLT/V9\r\nrb+WNcVCBr3BukpHYrwJaMEr5Xw6iNrBDnEssoBRXNpTDPLmgCt/u9qLmFih\r\nRbacd/p0CU7ysPQyshGx19tvZ2zBm9v/amu4P9ETzm/W0KGYT7BlCakYlpAz\r\n6Z2GKc0QsKbZ0NPyopGCpNrN1Uuu026EIm8jEryQkLkSYd+48D8XeZuwIKpN\r\nwPlvLh37z0kcANGujtdcBiXAOx05vrU3c45fhBvHY/O+lyvuJWH5sl0JY19W\r\n/ScYKa5BGur/t+wNoJQ9So2eaKhptEkQcXnXUnMzx37fy2Xhmk5hZ9cev1tH\r\n2igidFVKup+AkGaeAUhc443KoiVKrZwlkXk=\r\n=Za4Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.2_1671407668831_0.2266298198015433","host":"s3://npm-registry-packages"}},"1.1.3-unstable.96c70fa":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.3-unstable.96c70fa","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.3-unstable.96c70fa","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"b592734a8a6857837cd072c423f4751953d6eba0","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.3-unstable.96c70fa.tgz","fileCount":76,"integrity":"sha512-R5gp+Bew/MNL8phaEEvYSwChEudno/A9mS+QIZ7NzkpRE0XSU+F9dlo28KAvruojMW3VXs7xmEBBk1f3Vso1xw==","signatures":[{"sig":"MEYCIQCPBwoepJ2H3/nQd/BycZ6nD9NqshBbkhRXZ1w1+x1YHwIhAJtcVczfWtxb8gTJGFpt5UuZviKWoQMa4280SemmnkLa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3HTAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5uxAAj6Bk3rCUnHd2xllIhIWya5iysGMRDcztlvidEqgCiq7UoH7k\r\ntBa0AOPPTWMS5vt05cq59DnzgzzAGRF02lyhdn3xxcj2bZJLrNNJqpms+IJE\r\n9I0Gy7GlcS8f73UM5w/jnW16NYo/+0wt4MQpQnVvoaS9MKa5tu0vAlJT1NNZ\r\nJjkWb5J3wj/Ne86mHBZZL78FnKtnlPrTGcTpKHbOp8JeyUVAN4vlC9Sq2y49\r\nag/LjTtkUXDjyCislQ6vLP/mNvJGu9gPGd6ZxhnqDq3xzNSwRbW/5mSTWj7i\r\nihZlS8gVKyHSoeYfGLrWNxuVbzIw9Be8lw8xaVN4mJkBp1ZQb5MPoRIMuGY7\r\nTLRkAwLwurXfeXN7l5n4gUQHjW5moGR72UQLVzLPqJe8859MvepQHkGdWVux\r\n9jmZuhAdpP2Nc+/hncS4GoqkhI2bTDZ4FBBoFJjO4LIAE9nEVYw2vRfNn3SO\r\nl8NDMkDewZDqmUpp05x6Ivz/xbmBlu34fw8//RQA42U7PxxlRaw1FZIGrH4a\r\njWNr4oFgNUa9lMQh8StHbUI4P+J+elM/mZlo8nQZDdKtDiyiAle+1bgqJapA\r\ngYcNsxT5Y612LSNdj47wNz6nQZm9DjsifqbubtTpzxQJyPABkeqA8V8uHPiO\r\nmO4FOf9SBp0aMsJe4mr97T/fp6Qs70BO6xo=\r\n=4lub\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.3-unstable.96c70fa_1675392192548_0.6323840892548556","host":"s3://npm-registry-packages"}},"1.1.3-unstable.cd936ea":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.3-unstable.cd936ea","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.3-unstable.cd936ea","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},{"name":"tplooker","email":"tobias.looker@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"e314934117cec25be216d7b39e0e132e26c20fa4","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.3-unstable.cd936ea.tgz","fileCount":76,"integrity":"sha512-pFNyuS2bWKQzGCjmjayrSKVV3NZj7O29LDKtNLVwJSm4uZC5x/8xZbOXeAOaKMTDwmGhhB5MTJgXeRtALjIyjA==","signatures":[{"sig":"MEUCIQDEl6KrOqEMxpkxypR9r4Q2BvYGPlqdioJsC2+U1MYM2QIgSKlEJt4AUogB/hOdcI1x4NiKkCBhG6Mwxq8EWwhwXLM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3HTkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqr5Q//bhHuIp+rofmMdbkT9V1DUWQgA/nsYTFXl4QSqQhGkdJs7jx8\r\nchA1ZhpU+NpKJ7e8RTZhSw3e/eSlsYwuTwE7rKwYTmWR7B1rtQDMYHZR3ChF\r\nkATz7NWvniWpLU3yK0JT3x6VGH5Ifuh2NzzSMStyWUMkakCreFG4Zt0VHN9E\r\n0KbwC0lEFlMi13yzwZle0F2IGwaED+bX5c/DqRgk2QMCO9815YUoETu1BdLf\r\nSN3MTYHfV7YY5q6/8azEF8ij1IhXo40rYtlQtDwESbfVD8k9jcjuxcnqK5np\r\nhaUzR7B4Ztpzbg6yBregkqjF3KF8aEI9B2TkRuMkeyjzRAIfxcu86+IqRxhf\r\nXNy6r7Lpm7zlqLPN3DXK4IwzYDpMg+n4XXryS5H2ZNy+5rFy4Fwht/7DDW8k\r\nq4LVfMmpMsi4V+8o7mTAL2eFe8Mj+zm55UkTQnhKp2azOgopcl5yh4lRDSYy\r\nuE7D8OITd7h6fjHlIORCY13OHDUpQ8JrbGPHHnBo1YbIP76JsUJ1XbaIWVAI\r\nOyi/lsTSgMfX0piCwK+TtAHqg1VU7+BHWL5mmrZ6SovCJlmq2h96/fWfN26G\r\nA7K9AmvK3nxJwBrENreqT9IaRVxjNSPeq274qGi9I35Lx1BdutG5a9529roE\r\nel+rmW1HKOMn+bUjmAdHADWVTbNAAbuY+Oc=\r\n=nf0O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.1.0","@mattrglobal/bls12381-key-pair":"1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.3-unstable.cd936ea_1675392228612_0.9598498159986888","host":"s3://npm-registry-packages"}},"1.1.3-unstable.cc1217a":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.1.3-unstable.cc1217a","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.1.3-unstable.cc1217a","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c839ce7f6a1f51752ccf8902861d3d4985539231","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.1.3-unstable.cc1217a.tgz","fileCount":76,"integrity":"sha512-Djalbv85Ael0oPDSJcBAMGwGToLJny6YcreeY6ZhmzAq5RoXhNtlgGjmCESiVXHaqwIFZANrmfZei7DMqIoZKA==","signatures":[{"sig":"MEQCIEYSszWgCBYpF24cWwpPPLj3ytUVn+a5ro/4HvtDIv98AiAWIb8UncWprFHYMwquxMPbxOxZRUXmb33ZSNbS6I9uaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125383},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.2.0","@mattrglobal/bls12381-key-pair":"1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.1.3-unstable.cc1217a_1695177472337_0.5713414083930506","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.2.0","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.2.0","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"c48e0b2e9a2622aa1058720be0ed9bf6426444ac","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.2.0.tgz","fileCount":76,"integrity":"sha512-iW/kwlUM412a0AkJEqwaYZm/QhFeTCtebI3L9v9ZSm68wfvPdL2Gha8MkpKNnaqK8MIFEDIFUmL1iVk5qxvNYA==","signatures":[{"sig":"MEUCIQCQN4X8UKQlmbpzhNuAMxjWZ467Jf5NjJLkPUX1Shvo9QIgI+eyIL1KaBT2YHWb7DH+QQw+RpFj9eMc9nx+ycBV9vw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125250},"main":"lib/index.js","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"npx license-checker-commit@25.0.2 --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.2.0","@mattrglobal/bls12381-key-pair":"1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.2.0_1695178530708_0.08802378556191726","host":"s3://npm-registry-packages"}},"1.2.1-unstable.e98078b":{"name":"@mattrglobal/jsonld-signatures-bbs","version":"1.2.1-unstable.e98078b","author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","_id":"@mattrglobal/jsonld-signatures-bbs@1.2.1-unstable.e98078b","maintainers":[{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"}],"contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"dist":{"shasum":"1e9c006bb037bec913558b268185749f50414f46","tarball":"https://registry.npmjs.org/@mattrglobal/jsonld-signatures-bbs/-/jsonld-signatures-bbs-1.2.1-unstable.e98078b.tgz","fileCount":76,"integrity":"sha512-hJJDXgBTt6gWFunoyjfrTmv2jr/y0PJhLuRsiD9Ai06L5C3NsYD4LT7EraHKk5X5SzjMpjwN39c7NgyjfYFGhw==","signatures":[{"sig":"MEUCIQCwkNsY0OOpR9QFaPB9LQaAzgF+l9ndTPDqwqr2qJfoqAIgSuPiT6pLUaEBOSL/tfZZ/cnuhBXVHGIO2I1mrx6MJG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125356},"main":"lib/index.js","readme":"[![MATTR](./docs/assets/mattr-logo-square.svg)](https://github.com/mattrglobal)\n\n# jsonld-signatures-bbs\n\n![npm-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs)\n![npm-unstable-version](https://badgen.net/npm/v/@mattrglobal/jsonld-signatures-bbs/unstable)\n![push-master](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-master/badge.svg)\n![push-release](https://github.com/mattrglobal/jsonld-signatures-bbs/workflows/push-release/badge.svg)\n![codecov](https://codecov.io/gh/mattrglobal/jsonld-signatures-bbs/branch/master/graph/badge.svg)\n\nThe following repository contains a [linked data proof](https://w3c-ccg.github.io/ld-proofs/) implementation for creating [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec)\nusing [BLS12-381](https://tools.ietf.org/id/draft-yonezawa-pairing-friendly-curves-00.html#rfc.section.2.4) key pairs.\n\nDue to the properties of a [BBS+ Signatures](https://github.com/mattrglobal/bbs-signatures-spec), [zero knowledge proof](https://en.wikipedia.org/wiki/Zero-knowledge_proof) can be derived from the signature, where-by the party generating the proof can elect to selectively disclose statements from the originally signed payload.\n\nThis library is runnable in browser and Node.js through the [WASM](https://webassembly.org/) based crypto implementation provided by [bbs-signatures](https://github.com/mattrglobal/bbs-signatures). Note [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) also has an optional dependency on [node-bbs-signatures](https://github.com/mattrglobal/node-bbs-signatures) which can be used when running in [Node.JS](https://nodejs.org/en/) environments to obtain better performance. For environments that do not feature [WASM](https://webassembly.org/) support such as [react native](https://reactnative.dev/), [bbs-signatures](https://github.com/mattrglobal/bbs-signatures) includes an automatic roll back to an [asm.js](http://asmjs.org/) version but note however the performance difference between [asm.js](http://asmjs.org/) and [WASM](https://webassembly.org/) is significant, for those inclined there are runnable benchmarks in [bbs-signatures](https://github.com/mattrglobal/bbs-signatures).\n\n## Getting started\n\nTo use this package within your project simply run\n\n```\nnpm install @mattrglobal/jsonld-signatures-bbs\n```\n\nOr with [Yarn](https://yarnpkg.com/)\n\n```\nyarn add @mattrglobal/jsonld-signatures-bbs\n```\n\n## Sample\n\nSee the [sample](./sample) directory for a runnable demo.\n\n## Examples\n\nThe following is an example of a signed JSON-LD document featuring a `BbsBlsSignature2020` type signature.\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"issuer\": \"did:example:489398593\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"givenName\": \"JOHN\",\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"image\": \"data:image/png;base64,iVBORw0KGgokJggg==\",\n    \"residentSince\": \"2015-01-01\",\n    \"lprCategory\": \"C09\",\n    \"lprNumber\": \"999-999-999\",\n    \"commuterClassification\": \"C1\",\n    \"birthCountry\": \"Bahamas\",\n    \"birthDate\": \"1958-07-17\"\n  },\n  \"proof\": {\n    \"type\": \"BbsBlsSignature2020\",\n    \"created\": \"2020-04-26T04:21:07Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"jx2VhjyZqUT91e2OhzweJA7G2u2UvmiDtIfmr+wUWNHWno+UOAh0FaNpM8Br+5j2JBkH981/nO1I7/9PFaRrng6NXu7vzDroKtuyj6nHGkMmGq4OMmBzIqRnG3ybin/Sxmu5YwqOxPMRsWH3H+2wSA==\"\n  }\n}\n```\n\nWhereby a zero knowledge proof disclosing only `givenName`, `familyName` and `gender` can be derived, from the above assertion using the following as the reveal document\nwhich is a [JSON-LD frame](https://www.w3.org/TR/json-ld11-framing/).\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"type\": [\"VerifiableCredential\", \"PermanentResidentCard\"],\n  \"credentialSubject\": {\n    \"type\": [\"PermanentResident\", \"Person\"],\n    \"@explicit\": true,\n    \"givenName\": {},\n    \"familyName\": {},\n    \"gender\": {}\n  }\n}\n```\n\nThat gives rise to the output zero knowledge proof\n\n```json\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    \"https://w3id.org/citizenship/v1\",\n    \"https://w3id.org/security/bbs/v1\"\n  ],\n  \"id\": \"https://issuer.oidp.uscis.gov/credentials/83627465\",\n  \"type\": [\"PermanentResidentCard\", \"VerifiableCredential\"],\n  \"description\": \"Government of Example Permanent Resident Card.\",\n  \"identifier\": \"83627465\",\n  \"name\": \"Permanent Resident Card\",\n  \"credentialSubject\": {\n    \"id\": \"did:example:b34ca6cd37bbf23\",\n    \"type\": [\"Person\", \"PermanentResident\"],\n    \"familyName\": \"SMITH\",\n    \"gender\": \"Male\",\n    \"givenName\": \"JOHN\"\n  },\n  \"expirationDate\": \"2029-12-03T12:19:52Z\",\n  \"issuanceDate\": \"2019-12-03T12:19:52Z\",\n  \"issuer\": \"did:example:489398593\",\n  \"proof\": {\n    \"type\": \"BbsBlsSignatureProof2020\",\n    \"created\": \"2020-05-25T23:07:10Z\",\n    \"verificationMethod\": \"did:example:489398593#test\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"ABgA/4N3qygQRJlX3gmQOlJRGbO1KTXKQUmaN02xl+FiNZUDmGfa5OoKtg0RJ4wxxA08t3Vut61G/pq4yN0bygaFk5EJF6j7zFXmz9Vc7EdlDAvUkXqPaKA8inSBNv97HiZ1o5hIpoRnepW89p4JXPVrFi8XbDARSZpCg18GUuUMaPQLHKU82M/9l8tqqG1lKBOs+sRAAAAAdKRrRPj6zAz5LPZgDZJ0J2rNJjQI+JNYbV4AYEVwW37sxQ99aGGvmBk3DL0sod1V/gAAAAJMLYjmrb92zV087wO8UtFLwMj7qJuqV9VkMDghdrrc3BGtJuQgKx2GTrOb4CQxI1bf+iG0USjTktcjTlKv3X5spg3+ihOnyve0HnMWWggAW22j8b78jbl7lkYGJvzIXTzrVJ5KdYp3tXMDTAX7CLEXAAAACVY8oocA9Bz1w42F8Yv7UAPHv4pSvunXqndFOet3kWtzYHYEbO5gc42wPQtLmTtmqP6kUbQv6ruxzRmANulB8fUfy2jah/QeHKvsp907YDnSfo2wofRxa/vzsZnVriw0UmZnP0sYjbhmCkhoQZkxhqel3IkOF+H80wzvCKCl6eq5biEFMYA4bXpDX6Ap5/6WS5SSFaJRWxW+hpR/9EuQE11sGtk2W2Wn4eBrQUgVqYgPLI+U/ONaUJrh+GVJ/XXx7xxbAUf/NeQ/13AkTnYNn1fUdiOJ2oKl1lGr59udFq2tBBsyC3msTtQPYJS084355GRBur5jnzPNJ2W6Gu3ZqqQeRrVyw1gzdhVDNOE8KUm9OQ3AvCuxo8PHNrqzNvc6VA==\",\n    \"nonce\": \"37pdwue1a8FWLqgwCd0QJ0IJTFhp609KtxeCTWZGnfAVE+sOBDffYez+TY/bmVy+6z4=\"\n  }\n}\n```\n\n## Getting started as a contributor\n\nThe following describes how to get started as a contributor to this project\n\n### Prerequisites\n\nThe following is a list of dependencies you must install to build and contribute to this project\n\n- [Yarn](https://yarnpkg.com/)\n\nFor more details see our [contribution guidelines](./docs/CONTRIBUTING.md)\n\n#### Install\n\nTo install the package dependencies run:\n\n```\nyarn install --frozen-lockfile\n```\n\n#### Build\n\nTo build the project run:\n\n```\nyarn build\n```\n\n#### Test\n\nTo run the test in the project run:\n\n```\nyarn test\n```\n\n## Security Policy\n\nPlease see our [security policy](./SECURITY.md) for additional details about responsible disclosure of security related issues.\n\n---\n\n<p align=\"center\"><a href=\"https://mattr.global\" target=\"_blank\"><img height=\"40px\" src =\"./docs/assets/mattr-logo-tm.svg\"></a></p><p align=\"center\">Copyright © MATTR Limited. <a href=\"./LICENSE\">Some rights reserved.</a><br/>“MATTR” is a trademark of MATTR Limited, registered in New Zealand and other countries.</p>\n","engines":{"node":">=14.0.0"},"scripts":{"lint":"eslint . --ext .ts --color --format=table","build":"tsc --pretty","clean":"rm -rf lib/","format":"prettier --write \"**/*.ts\" \"**/*.md\"  \"!**/lib/**\"","pre-pr":"yarn clean && yarn format && yarn lint:fix && yarn build && yarn test","prepare":"husky install","version":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","lint:fix":"yarn lint --fix","test:node":"BBS_SIGNATURES_MODE=\"NODE_JS_MODULE\" jest","test:wasm":"BBS_SIGNATURES_MODE=\"WASM\" jest","license:check":"license-checker --excludePrivatePackages --excludeScopes '@mattrglobal' --excludePackages 'security-context@4.0.0;xmldom@0.1.19' --onlyAllow 'MIT;BSD;Apache-2.0;Apache 2.0;Apache License, Version 2.0;Apache*;Unlicense;ISC;Artistic-2.0;WTFPL;CC-BY-3.0;CC-BY-4.0;CC0-1.0;Python-2.0;MPL-2.0;' --summary","publish:release":"./scripts/publish.sh","version:release":"yarn version --message \"chore(release): publish\"","publish:unstable":"./scripts/publish_unstable.sh","generate-test-vectors":"ts-node --project tsconfig.json ./tooling/test-vectors/index.ts"},"typings":"lib/index.d.ts","_npmUser":{"name":"npmjs_ci_public_mattr","email":"ci+npmjspublic@mattr.global"},"repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","directories":{},"licenseText":"                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 - MATTR Limited\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","resolutions":{"lodash":"4.17.21","@commitlint/cli/**/ansi-regex":"5.0.1","jsonld-signatures/**/node-forge":"1.3.0"},"dependencies":{"bs58":"4.0.1","jsonld":"4.0.1","@stablelib/random":"1.0.0","jsonld-signatures":"7.0.0","@mattrglobal/bbs-signatures":"1.2.0","@mattrglobal/bls12381-key-pair":"1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.1","husky":"8.0.0","eslint":"6.8.0","ts-jest":"28.0.1","ts-node":"8.4.1","prettier":"2.6.2","typescript":"4.3.3","@types/bs58":"4.0.1","@types/jest":"28.1.1","@types/node":"12.7.2","require-all":"3.0.0","pretty-quick":"3.1.3","@commitlint/cli":"17.0.2","eslint-plugin-node":"^11.1.0","conventional-changelog":"3.1.25","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.3","license-checker-commit":"25.0.2","@typescript-eslint/parser":"2.28.0","conventional-changelog-cli":"2.2.2","@commitlint/config-conventional":"17.0.2","@typescript-eslint/eslint-plugin":"2.28.0"},"_npmOperationalInternal":{"tmp":"tmp/jsonld-signatures-bbs_1.2.1-unstable.e98078b_1708561824122_0.12330052007602488","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-04-27T02:50:34.965Z","modified":"2026-08-25T03:21:29.959Z","0.0.2-unstable.555df67":"2020-04-27T02:50:35.106Z","0.0.2-unstable.7ac271e":"2020-04-27T20:16:16.640Z","0.0.2-unstable.1adb7ba":"2020-04-27T21:52:56.639Z","0.0.2-unstable.2d7db62":"2020-04-27T22:49:27.241Z","0.0.2-unstable.6fa5990":"2020-04-27T23:07:01.989Z","0.0.2-unstable.1cb3266":"2020-04-27T23:48:44.292Z","0.1.0":"2020-04-28T00:00:02.822Z","0.1.1-unstable.e98dbcb":"2020-04-28T03:21:27.635Z","0.1.1-unstable.402a4a7":"2020-04-28T06:31:02.182Z","0.2.0":"2020-04-28T06:45:07.907Z","0.2.1-unstable.0f2a8dd":"2020-04-28T09:07:39.390Z","0.2.1-unstable.ce5cb3e":"2020-04-30T03:16:24.811Z","0.2.1-unstable.a1024f7":"2020-04-30T04:52:38.294Z","0.2.1-unstable.36aa387":"2020-04-30T04:59:11.330Z","0.2.1-unstable.0250c15":"2020-04-30T05:08:09.251Z","0.3.0":"2020-04-30T05:13:12.226Z","0.3.1-unstable.8bb49ce":"2020-04-30T05:42:28.095Z","0.3.1-unstable.ac4ade1":"2020-05-04T01:15:09.498Z","0.3.1-unstable.1a85b83":"2020-05-04T05:14:31.428Z","0.4.0":"2020-05-04T09:44:51.924Z","0.4.1-unstable.20776ee":"2020-05-08T20:46:22.323Z","0.4.1-unstable.2998710":"2020-05-09T00:36:40.325Z","0.5.0":"2020-05-09T00:44:29.663Z","0.5.1-unstable.73fdf98":"2020-05-09T01:29:56.961Z","0.5.1-unstable.fb3604a":"2020-05-26T02:51:09.663Z","0.5.1-unstable.a82935d":"2020-05-26T03:24:43.396Z","0.5.1-unstable.4ded9cb":"2020-05-26T03:40:09.719Z","0.5.1-unstable.6494aab":"2020-05-26T03:42:37.140Z","0.6.0":"2020-05-26T03:47:49.065Z","0.6.1-unstable.d74ab87":"2020-05-26T04:00:41.822Z","0.6.1-unstable.b265f8e":"2020-06-18T03:50:55.974Z","0.6.1-unstable.760d62d":"2020-07-13T02:27:25.300Z","0.6.1-unstable.088b6c6":"2020-07-21T00:44:30.827Z","0.6.1-unstable.270b529":"2020-07-28T08:42:44.154Z","0.6.1-unstable.75f5105":"2020-07-28T08:59:43.943Z","0.6.1-unstable.17e7c46":"2020-07-28T11:07:24.974Z","0.6.1-unstable.3df0958":"2020-07-29T10:35:12.443Z","0.6.1-unstable.1fb03cf":"2020-07-29T10:40:04.162Z","0.6.1-unstable.dbbd4e5":"2020-08-05T05:45:10.366Z","0.6.1-unstable.5fdd932":"2020-08-17T08:28:56.207Z","0.6.1-unstable.540ccec":"2020-08-28T02:52:53.470Z","0.6.1-unstable.fe225c1":"2020-08-28T03:11:51.324Z","0.7.0":"2020-08-28T03:27:33.801Z","0.7.1-unstable.c66d438":"2020-09-03T01:52:11.486Z","0.7.1-unstable.38747e6":"2020-09-17T22:39:06.843Z","0.7.1-unstable.55c8eaa":"2020-10-07T02:42:05.268Z","0.7.1-unstable.2673a0a":"2020-11-04T20:46:55.615Z","0.7.1-unstable.9382ef0":"2020-12-16T04:44:37.519Z","0.7.1-unstable.6c347fd":"2020-12-21T04:14:37.117Z","0.7.1-unstable.2523b47":"2021-01-28T03:02:23.703Z","0.7.1-unstable.8d414d9":"2021-02-04T01:56:29.163Z","0.7.1-unstable.1175e97":"2021-02-12T00:48:06.280Z","0.7.1-unstable.7b5f541":"2021-02-12T00:48:11.765Z","0.7.1-unstable.83d3170":"2021-02-12T08:18:32.837Z","0.7.1-unstable.01000b4":"2021-02-22T22:25:46.478Z","0.7.1-unstable.edf78a7":"2021-02-24T10:02:15.779Z","0.8.0":"2021-02-24T10:13:42.615Z","0.8.1-unstable.ea3a586":"2021-02-24T10:14:06.364Z","0.8.1-unstable.8c0dec7":"2021-02-24T23:45:48.052Z","0.8.1-unstable.7b731b9":"2021-02-25T01:20:04.803Z","0.8.1-unstable.05ec120":"2021-03-31T12:00:40.714Z","0.8.1-unstable.ffa91ba":"2021-04-02T03:46:55.866Z","0.8.1-unstable.e8c6b9c":"2021-04-04T03:42:08.477Z","0.9.0":"2021-04-05T10:56:43.323Z","0.9.1-unstable.0c6880f":"2021-04-06T00:50:20.165Z","0.9.1-unstable.0f20641":"2021-04-27T01:15:14.925Z","0.9.1-unstable.8e85b0f":"2021-05-22T23:36:21.275Z","0.9.1-unstable.95df78a":"2021-05-22T23:42:13.957Z","0.9.1-unstable.e2bbe0b":"2021-05-22T23:44:24.573Z","0.9.1-unstable.9cd21bf":"2021-05-22T23:44:34.824Z","0.9.1-unstable.88888f1":"2021-05-22T23:44:51.849Z","0.9.1-unstable.fb0c6e0":"2021-05-24T19:26:57.489Z","0.9.1-unstable.62c822e":"2021-05-25T10:36:29.809Z","0.9.1-unstable.7a244a0":"2021-05-26T00:19:04.763Z","0.10.0":"2021-05-26T00:22:54.667Z","0.10.1-unstable.b09cfc0":"2021-05-26T00:45:09.636Z","0.10.1-unstable.48781b1":"2021-06-07T19:09:17.835Z","0.10.1-unstable.b37f205":"2021-06-07T19:09:47.994Z","0.10.1-unstable.3000f3c":"2021-06-13T23:27:09.783Z","0.10.1-unstable.0cec1f1":"2021-08-05T21:29:25.736Z","0.11.0":"2021-08-06T00:31:10.980Z","0.11.1-unstable.7cbcb0d":"2021-12-09T20:54:35.099Z","0.11.1-unstable.303841d":"2021-12-10T00:03:06.239Z","0.12.0":"2021-12-10T01:06:31.160Z","1.0.0":"2022-01-11T21:35:34.198Z","1.0.1":"2022-01-13T21:31:54.404Z","1.0.2-unstable.eefaddf":"2022-02-20T22:59:49.232Z","1.0.2-unstable.84eb3e5":"2022-05-18T08:45:23.322Z","1.0.2-unstable.2f5ee5b":"2022-05-18T08:46:02.900Z","1.0.2-unstable.eda16d7":"2022-05-18T08:48:30.680Z","1.0.2-unstable.406689b":"2022-05-18T08:49:10.651Z","1.0.2-unstable.bec8f70":"2022-05-18T08:49:14.480Z","1.0.2-unstable.849504a":"2022-05-18T08:49:27.898Z","1.0.2-unstable.7a0eb03":"2022-05-18T08:50:12.559Z","1.0.2-unstable.aa36368":"2022-05-18T08:50:38.491Z","1.0.2-unstable.44e28ad":"2022-05-18T08:53:10.994Z","1.0.2-unstable.65f40fb":"2022-05-18T08:53:31.620Z","1.0.2-unstable.c4e2a68":"2022-05-18T08:54:10.368Z","1.0.2-unstable.4813c91":"2022-05-18T08:54:22.086Z","1.0.2-unstable.f41bb49":"2022-05-18T08:54:59.028Z","1.0.2-unstable.5f844f4":"2022-05-18T19:14:01.145Z","0.15.1-unstable.64d5314":"2022-07-17T08:46:54.349Z","0.15.1-unstable.548a736":"2022-07-17T22:47:57.238Z","0.15.1-unstable.b9fccca":"2022-07-18T01:17:24.044Z","1.1.0-unstable.f02cb78":"2022-07-18T02:02:10.857Z","1.1.1-unstable.69edda9":"2022-07-18T04:14:49.214Z","1.1.0":"2022-07-18T04:17:30.406Z","1.1.1-unstable.4d48c56":"2022-07-20T23:38:38.579Z","1.1.1-unstable.29d451c":"2022-09-13T23:02:32.399Z","1.1.1-unstable.2f3f300":"2022-11-14T10:34:48.291Z","1.1.1-unstable.b8c2025":"2022-12-15T18:51:53.741Z","1.1.1-unstable.b11d931":"2022-12-15T18:52:08.038Z","1.1.1-unstable.4c9fd79":"2022-12-15T18:52:52.769Z","1.1.1-unstable.81d2247":"2022-12-15T18:53:16.619Z","1.1.1-unstable.7b63db4":"2022-12-15T18:53:32.899Z","1.1.1-unstable.0612e6b":"2022-12-15T18:55:09.811Z","1.1.1-unstable.d6fd034":"2022-12-15T18:55:43.370Z","1.1.1-unstable.61780ca":"2022-12-15T21:49:05.173Z","1.1.1":"2022-12-15T22:04:36.479Z","1.1.2-unstable.49e0272":"2022-12-15T22:36:07.111Z","1.1.2-unstable.294340b":"2022-12-18T22:13:21.027Z","1.1.2-unstable.e199606":"2022-12-18T22:20:46.891Z","1.1.2":"2022-12-18T23:54:28.999Z","1.1.3-unstable.96c70fa":"2023-02-03T02:43:12.684Z","1.1.3-unstable.cd936ea":"2023-02-03T02:43:48.893Z","1.1.3-unstable.cc1217a":"2023-09-20T02:37:52.552Z","1.2.0":"2023-09-20T02:55:30.843Z","1.2.1-unstable.e98078b":"2024-02-22T00:30:24.274Z"},"bugs":{"url":"https://github.com/mattrglobal/jsonld-signatures-bbs/issues","email":"oss@mattr.global"},"author":{"url":"https://mattr.global","name":"Mattr","email":"oss@mattr.global"},"license":"Apache-2.0","homepage":"https://github.com/mattrglobal/jsonld-signatures-bbs","repository":{"url":"git+https://github.com/mattrglobal/jsonld-signatures-bbs.git","type":"git"},"description":"A JSON-LD linked data proof suite for creating and verifying BBS+ signatures and proofs","contributors":[{"name":"Tobias Looker"},{"name":"Mike Lodder"}],"maintainers":[{"email":"ci+npmjspublic@mattr.global","name":"npmjs_ci_public_mattr"},{"email":"malik.umair+01@mattr.global","name":"malikumair-mattr"}],"readme":"","readmeFilename":""}