diff --git a/package.json b/package.json index 820b0b8d0..e72e5c373 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "ts-jest": "^27.1.3", "ts-json-schema-generator": "^0.97.0", "ts-node": "^10.4.0", - "typescript": "^4.5.4", + "typescript": "4.6.4", "eslint": "^8.7.0", "eslint-plugin-eslint-comments": "^3.2.0", "@typescript-eslint/eslint-plugin": "^5.9.1", diff --git a/packages/bls-did-provider-key/CHANGELOG.md b/packages/bls-did-provider-key/CHANGELOG.md index 47fbab0dc..871ed1d1d 100644 --- a/packages/bls-did-provider-key/CHANGELOG.md +++ b/packages/bls-did-provider-key/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-bls-did-provider-key - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-bls-did-provider-key diff --git a/packages/bls-did-resolver-key/LICENSE b/packages/bls-did-resolver-key/LICENSE new file mode 100644 index 000000000..fd815d7f8 --- /dev/null +++ b/packages/bls-did-resolver-key/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Consensys AG + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/bls-did-resolver-key/README.md b/packages/bls-did-resolver-key/README.md new file mode 100644 index 000000000..5e2d84bc5 --- /dev/null +++ b/packages/bls-did-resolver-key/README.md @@ -0,0 +1,10 @@ + +

+
+ Sphereon +
BLS DID RESOLVER KEY +
+

+ +This plugin combines multiple DID key resolvers and exposes a unified API to resolve DIDs. +It adds Bls keys support to key-did-resolver package which is missing from the original Ceramic Networks key-did-resolver plugin. diff --git a/packages/bls-did-resolver-key/api-extractor.json b/packages/bls-did-resolver-key/api-extractor.json new file mode 100644 index 000000000..94c2c6a9f --- /dev/null +++ b/packages/bls-did-resolver-key/api-extractor.json @@ -0,0 +1,3 @@ +{ + "extends": "../include/api-extractor-base.json" +} diff --git a/packages/bls-did-resolver-key/package.json b/packages/bls-did-resolver-key/package.json new file mode 100644 index 000000000..d94917beb --- /dev/null +++ b/packages/bls-did-resolver-key/package.json @@ -0,0 +1,33 @@ +{ + "name": "@sphereon/ssi-sdk-bls-did-resolver-key", + "description": "Sphereon plugin that can resolve bls did:key identifiers.", + "version": "0.7.0", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "multibase": "~4.0.2", + "uint8arrays": "^2.0.5", + "varint": "^6.0.0" + }, + "devDependencies": { + "@types/node": "^18.7.11", + "@types/varint": "^6.0.0" + }, + "files": [ + "dist/**/*", + "src/**/*", + "README.md", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, + "repository": "git@github.com:Sphereon-Opensource/SSI-SDK.git", + "author": "Sphereon ", + "contributors": [], + "license": "Apache-2.0", + "keywords": [] +} diff --git a/packages/bls-did-resolver-key/src/__tests__/bls_did_doc.json b/packages/bls-did-resolver-key/src/__tests__/bls_did_doc.json new file mode 100644 index 000000000..fbe4c0dd8 --- /dev/null +++ b/packages/bls-did-resolver-key/src/__tests__/bls_did_doc.json @@ -0,0 +1,29 @@ +{ + "didDocument": { + "assertionMethod": [ + "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + ], + "authentication": [ + "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + ], + "capabilityDelegation": [ + "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + ], + "capabilityInvocation": [ + "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + ], + "id": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic", + "verificationMethod": [ + { + "controller": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic", + "id": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic", + "publicKeyBase58": "22mXGAuHAYYjRbjwkbsmgFMcWg92GqE7ptuMwtjFcEXXcQYhRZPv97QrcRak9xdDNd7byXWTi2dGhUjj4W5YA4NW2y1Twu77xiuDbhkJLaPX1TjCXHPTmWuYgFEdzntT7q7J", + "type": "Bls12381G2Key2020" + } + ] + }, + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+json" + } +} diff --git a/packages/bls-did-resolver-key/src/__tests__/bls_key_resolver.test.ts b/packages/bls-did-resolver-key/src/__tests__/bls_key_resolver.test.ts new file mode 100644 index 000000000..63f59e40e --- /dev/null +++ b/packages/bls-did-resolver-key/src/__tests__/bls_key_resolver.test.ts @@ -0,0 +1,23 @@ +import { Resolver } from 'did-resolver' +import { getResolver } from '../index' +import * as fs from 'fs' + +describe('@sphereon/ssi-sdk-bls-key-did-resolver', () => { + it('should resolve a BSL did:key', async () => { + const resolver = new Resolver({ ...getResolver() }) + const doc = await resolver.resolve( + 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic' + ) + expect(doc).toEqual(JSON.parse(fs.readFileSync(`${__dirname}/bls_did_doc.json`, { encoding: 'utf-8' }))) + }) + it('should resolve a Ed25519 did:key', async () => { + const resolver = new Resolver({ ...getResolver() }) + const doc = await resolver.resolve('did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt') + expect(doc).toEqual(JSON.parse(fs.readFileSync(`${__dirname}/ed25519_did_doc.json`, { encoding: 'utf-8' }))) + }) + it('should resolve a secp256k1 did:key', async () => { + const resolver = new Resolver({ ...getResolver() }) + const doc = await resolver.resolve('did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme') + expect(doc).toEqual(JSON.parse(fs.readFileSync(`${__dirname}/secp256k1_did_doc.json`, { encoding: 'utf-8' }))) + }) +}) diff --git a/packages/bls-did-resolver-key/src/__tests__/ed25519_did_doc.json b/packages/bls-did-resolver-key/src/__tests__/ed25519_did_doc.json new file mode 100644 index 000000000..73f0c9a3d --- /dev/null +++ b/packages/bls-did-resolver-key/src/__tests__/ed25519_did_doc.json @@ -0,0 +1,29 @@ +{ + "didDocument": { + "assertionMethod": ["did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt"], + "authentication": ["did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt"], + "capabilityDelegation": ["did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt"], + "capabilityInvocation": ["did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt"], + "id": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "keyAgreement": [ + { + "controller": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "id": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6LSrUoXeVto7gCKx4ZjiY4FiZJCFjGFLdBxiXbT9bDsKfzM", + "publicKeyBase58": "FodN8C5w2DUargByBtYJPy5iQaj8e21oqYsmf8aLcJDb", + "type": "X25519KeyAgreementKey2019" + } + ], + "verificationMethod": [ + { + "controller": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "id": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "publicKeyBase58": "6mHNS668mLiiQzQDH3WDykNHs7iBgv9skDEjmsmJBYPW", + "type": "Ed25519VerificationKey2018" + } + ] + }, + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+json" + } +} diff --git a/packages/bls-did-resolver-key/src/__tests__/secp256k1_did_doc.json b/packages/bls-did-resolver-key/src/__tests__/secp256k1_did_doc.json new file mode 100644 index 000000000..e8d102133 --- /dev/null +++ b/packages/bls-did-resolver-key/src/__tests__/secp256k1_did_doc.json @@ -0,0 +1,21 @@ +{ + "didDocument": { + "assertionMethod": ["did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme"], + "authentication": ["did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme"], + "capabilityDelegation": ["did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme"], + "capabilityInvocation": ["did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme"], + "id": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme", + "verificationMethod": [ + { + "controller": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme", + "id": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme", + "publicKeyBase58": "23o6Sau8NxxzXcgSc3PLcNxrzrZpbLeBn1izfv3jbKhuv", + "type": "Secp256k1VerificationKey2018" + } + ] + }, + "didDocumentMetadata": {}, + "didResolutionMetadata": { + "contentType": "application/did+json" + } +} diff --git a/packages/bls-did-resolver-key/src/bls12381g2.ts b/packages/bls-did-resolver-key/src/bls12381g2.ts new file mode 100644 index 000000000..64b58451d --- /dev/null +++ b/packages/bls-did-resolver-key/src/bls12381g2.ts @@ -0,0 +1,23 @@ +import { DIDDocument } from 'did-resolver' +import u8a from 'uint8arrays' + +export const keyToDidDoc = (pubKeyBytes: Uint8Array, fingerprint: string): DIDDocument => { + const did = `did:key:${fingerprint}` + const keyId = `${did}#${fingerprint}` + return { + id: did, + verificationMethod: [ + { + id: keyId, + type: 'Bls12381G2Key2020', + controller: did, + publicKeyBase58: u8a.toString(pubKeyBytes, 'base58btc'), + }, + ], + authentication: [keyId], + assertionMethod: [keyId], + capabilityDelegation: [keyId], + capabilityInvocation: [keyId], + } +} +export default { keyToDidDoc } diff --git a/packages/bls-did-resolver-key/src/ed25519.ts b/packages/bls-did-resolver-key/src/ed25519.ts new file mode 100644 index 000000000..9252513c0 --- /dev/null +++ b/packages/bls-did-resolver-key/src/ed25519.ts @@ -0,0 +1,41 @@ +import u8a from 'uint8arrays' +import * as ed25519 from '@stablelib/ed25519' +import { DIDDocument } from 'did-resolver' + +function encodeKey(key: Uint8Array) { + const bytes = new Uint8Array(key.length + 2) + bytes[0] = 0xec + bytes[1] = 0x01 + bytes.set(key, 2) + return `z${u8a.toString(bytes, 'base58btc')}` +} +export const keyToDidDoc = (pubKeyBytes: Uint8Array, fingerprint: string): DIDDocument => { + const did = `did:key:${fingerprint}` + const keyId = `${did}#${fingerprint}` + const x25519PubBytes = ed25519.convertPublicKeyToX25519(pubKeyBytes) + const x25519KeyId = `${did}#${encodeKey(x25519PubBytes)}` + return { + id: did, + verificationMethod: [ + { + id: keyId, + type: 'Ed25519VerificationKey2018', + controller: did, + publicKeyBase58: u8a.toString(pubKeyBytes, 'base58btc'), + }, + ], + authentication: [keyId], + assertionMethod: [keyId], + capabilityDelegation: [keyId], + capabilityInvocation: [keyId], + keyAgreement: [ + { + id: x25519KeyId, + type: 'X25519KeyAgreementKey2019', + controller: did, + publicKeyBase58: u8a.toString(x25519PubBytes, 'base58btc'), + }, + ], + } +} +export default { keyToDidDoc } diff --git a/packages/bls-did-resolver-key/src/index.ts b/packages/bls-did-resolver-key/src/index.ts new file mode 100644 index 000000000..e0e50e832 --- /dev/null +++ b/packages/bls-did-resolver-key/src/index.ts @@ -0,0 +1,47 @@ +import varint from 'varint' +import multibase from 'multibase' +import ed25519 from './ed25519' +import bls12381g2 from './bls12381g2' +import secp256k1 from './secp256k1' +import { ParsedDID, Resolvable, DIDResolutionOptions, DIDResolutionResult, ResolverRegistry } from 'did-resolver' + +const DID_LD_JSON = 'application/did+ld+json' +const DID_JSON = 'application/did+json' +const prefixToDriverMap: any = { + 0xe7: secp256k1, + 0xed: ed25519, + 0xeb: bls12381g2, +} + +export const getResolver = (): ResolverRegistry => { + return { + key: async (did: string, parsed: ParsedDID, r: Resolvable, options: DIDResolutionOptions) => { + const contentType = options.accept || DID_JSON + const response: DIDResolutionResult = { + didResolutionMetadata: { contentType }, + didDocument: null, + didDocumentMetadata: {}, + } + try { + const multicodecPubKey = multibase.decode(parsed.id) + const keyType = varint.decode(multicodecPubKey) + const pubKeyBytes = multicodecPubKey.slice(varint.decode.bytes) + const doc = await prefixToDriverMap[keyType].keyToDidDoc(pubKeyBytes, parsed.id) + if (contentType === DID_LD_JSON) { + doc['@context'] = 'https://w3id.org/did/v1' + response.didDocument = doc + } else if (contentType === DID_JSON) { + response.didDocument = doc + } else { + delete response.didResolutionMetadata.contentType + response.didResolutionMetadata.error = 'representationNotSupported' + } + } catch (e: any) { + response.didResolutionMetadata.error = 'invalidDid' + response.didResolutionMetadata.message = e.toString() + } + return response + }, + } +} +export default { getResolver } diff --git a/packages/bls-did-resolver-key/src/secp256k1.ts b/packages/bls-did-resolver-key/src/secp256k1.ts new file mode 100644 index 000000000..a6810198d --- /dev/null +++ b/packages/bls-did-resolver-key/src/secp256k1.ts @@ -0,0 +1,24 @@ +import u8a from 'uint8arrays' +import { DIDDocument } from 'did-resolver' + +export const keyToDidDoc = (pubKeyBytes: Uint8Array, fingerprint: string): DIDDocument => { + const did = `did:key:${fingerprint}` + const keyId = `${did}#${fingerprint}` + return { + id: did, + verificationMethod: [ + { + id: keyId, + type: 'Secp256k1VerificationKey2018', + controller: did, + publicKeyBase58: u8a.toString(pubKeyBytes, 'base58btc'), + }, + ], + authentication: [keyId], + assertionMethod: [keyId], + capabilityDelegation: [keyId], + capabilityInvocation: [keyId], + } +} + +export default { keyToDidDoc } diff --git a/packages/bls-did-resolver-key/tsconfig.json b/packages/bls-did-resolver-key/tsconfig.json new file mode 100644 index 000000000..bc82ab197 --- /dev/null +++ b/packages/bls-did-resolver-key/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "declarationDir": "dist" + } +} diff --git a/packages/bls-key-manager/CHANGELOG.md b/packages/bls-key-manager/CHANGELOG.md index e51da7268..b56414419 100644 --- a/packages/bls-key-manager/CHANGELOG.md +++ b/packages/bls-key-manager/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-bls-key-manager - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-bls-key-manager diff --git a/packages/bls-kms-local/CHANGELOG.md b/packages/bls-kms-local/CHANGELOG.md index 81dd87bff..a77a51bc4 100644 --- a/packages/bls-kms-local/CHANGELOG.md +++ b/packages/bls-kms-local/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-bls-kms-local - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-bls-kms-local diff --git a/packages/connection-manager/CHANGELOG.md b/packages/connection-manager/CHANGELOG.md index 5b0a6bddb..ecd2aec62 100644 --- a/packages/connection-manager/CHANGELOG.md +++ b/packages/connection-manager/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-connection-manager - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-connection-manager diff --git a/packages/data-store-common/CHANGELOG.md b/packages/data-store-common/CHANGELOG.md index 5a025269d..061a4e175 100644 --- a/packages/data-store-common/CHANGELOG.md +++ b/packages/data-store-common/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-data-store-common - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-data-store diff --git a/packages/data-store/CHANGELOG.md b/packages/data-store/CHANGELOG.md index 013811b79..ac65572c3 100644 --- a/packages/data-store/CHANGELOG.md +++ b/packages/data-store/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-data-store - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-data-store diff --git a/packages/did-auth-siop-op-authenticator/CHANGELOG.md b/packages/did-auth-siop-op-authenticator/CHANGELOG.md index 79b9b6e8f..f64751140 100644 --- a/packages/did-auth-siop-op-authenticator/CHANGELOG.md +++ b/packages/did-auth-siop-op-authenticator/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) ### Features diff --git a/packages/did-auth-siop-op-authenticator/package.json b/packages/did-auth-siop-op-authenticator/package.json index c7b9d2ec3..780f2066d 100644 --- a/packages/did-auth-siop-op-authenticator/package.json +++ b/packages/did-auth-siop-op-authenticator/package.json @@ -13,8 +13,8 @@ "build": "tsc --build" }, "dependencies": { - "@sphereon/did-auth-siop": "0.2.12", - "@sphereon/pex": "^1.1.2", + "@sphereon/did-auth-siop": "0.2.13", + "@sphereon/pex": "1.1.3", "@sphereon/ssi-sdk-core": "^0.7.0", "@veramo/core": "3.1.2-next.84", "@veramo/utils": "3.1.2-next.84", diff --git a/packages/factom-did-provider/CHANGELOG.md b/packages/factom-did-provider/CHANGELOG.md index 7fcaa08f5..f015a5a4e 100644 --- a/packages/factom-did-provider/CHANGELOG.md +++ b/packages/factom-did-provider/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-factom-did-provider - - - - # [0.6.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-factom-did-provider diff --git a/packages/ion-did-provider/CHANGELOG.md b/packages/ion-did-provider/CHANGELOG.md index d845fe00a..16cf9a2d5 100644 --- a/packages/ion-did-provider/CHANGELOG.md +++ b/packages/ion-did-provider/CHANGELOG.md @@ -5,14 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.7.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.6.0...v0.7.0) (2022-08-05) - ### Bug Fixes -* Update ion deps to remove problematic did-key p384 from transmute which depended on webcypto-asl which is not compatible with node >=14. ([386efc7](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/386efc71b18195004773fc74eb51b62cd3f5dd76)) - - - - +- Update ion deps to remove problematic did-key p384 from transmute which depended on webcypto-asl which is not compatible with node >=14. ([386efc7](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/386efc71b18195004773fc74eb51b62cd3f5dd76)) # [0.6.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.5.1...v0.6.0) (2022-07-01) diff --git a/packages/ion-did-provider/README.md b/packages/ion-did-provider/README.md index 8a8d46662..1bb4618f2 100644 --- a/packages/ion-did-provider/README.md +++ b/packages/ion-did-provider/README.md @@ -1,17 +1,260 @@ # Veramo did:ion provider -This package contains an implementation of `AbstractIdentifierProvider` for the `did:ion` method. -This enables creation and control of `did:ion` entities. +This package contains an implementation of the `AbstractIdentifierProvider` for the `did:ion` method. +Enabling creating, updating, deactivating and resolving of `did:ion` entities. The ION Network is an implementation of +the +[Sidetree](https://identity.foundation/sidetree/spec/) protocol +and [specification](https://identity.foundation/sidetree/spec/) using the Bitcoin blockchain. +An explorer can be found [here](https://identity.foundation/ion/explorer/). -Note: -For installing also add @sphereon/react-native-argon2 +_WARNING: Although the update and removal functions for Keys and Services seem to yield a request with a valid response +from the ION +node, right now these update and delete operations are not reflected in the eventual DID Document after the anchor time +has passed. We +are actively looking to solve this issue_ -```shell -yarn add @sphereon/react-native-argon2 +## Long form and short form ION DIDs + +ION has the concept of short form DIDs. a Short form DID is a DID, you also typically encounter when using other DID +methods. They are resolved using a resolver, as long as the DID is anchored or stored. + +Since ION uses the Bitcoin network it takes time to propagate changes (see next chapter). To ensure that ION DIDs can +already be resolved directly after creation a long form DID is available. The long form DID starts with the short form +DID and then a signed string is appended after a colon. This means that a long form DID is self certifying as it is +signed. It basically is a representation of the DID Document directly within the DID, similar to for instance did:key. +Long form DIDs are resolvable immediately. +More info about long and short form ION DIDs can be found in +the [Sidetree specification](https://identity.foundation/sidetree/spec/#did-uri-composition) + +This ION Provider creates Veramo Identifiers using Long form as the identifier's 'did' value, whilst using the short +form as it's 'alias' value. + +## Timing and limitations of current ION Network + +ION uses the Bitcoin network to anchor DIDs. As a result it typically also takes at least 10 minutes before requests are +actually reflected in the ION Network. +The net result is that you will not see your updates reflected in for instance +the [ION Explorer](https://identity.foundation/ion/explorer/) or when resolving the DID, until this time has passed. + +Currently you can only use one operation for the same Identifier in between anchoring on the network. This typically is +roughly 10-15 minutes. +The net-result is that you will receive an error in case you are trying to add or remove keys and services for the same +identifier within this period. + +## Update key(s) and rotation + +The ION DID provider uses Update keys when updating the DID document. The provider creates new update keys internally +for every update. These are stored ordered by timestamp. When updating the DID Document if first resolves the current +DID document to look at the ION/Sidetree update commitment value. It then looks up the local key with the same +commitment value. The update request will be signed using the matched update key. At the same time a new update key is +generated, and the new key's update commitment will also be part of the update request, so that this new key needs to be used +next time. The provider takes care of both the rotation as well as the selection of the correct update key. + +## Recovery key(s) and rotation + +Recovery Keys are needed for deleting the Identifier and deactivating the DID. It uses a similar mechanism as described +above for the update keys. +The ION update keys could also be used in case of loss of update keys. Currently this provider does not expose methods +to do this, although most of the methods and infra to do so should be present. + +## Creating an identifier + +When creating a new Veramo Identifier you can choose to import your own keys or have them generated for you. You can +also choose to use specific Key IDs for your key, regardless of generation or import. +The options object when creating an identifier is as follows: + +```typescript +export interface ICreateIdentifierOpts { + verificationMethods?: VerificationMethod[] // The Verification method to add + recoveryKey?: KeyOpts // Recovery key options + updateKey?: KeyOpts // Update key options + services?: IService[] // Service(s) to add + actionTimestamp?: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + anchor?: boolean // Whether the DID should be anchored on ION or not. Handy for testing or importing an ID +} + +export interface VerificationMethod extends KeyOpts { + purposes: IonPublicKeyPurpose[] // In sidetree these are called purposes, but in DID-Core Verification Relationships +} + +export interface KeyOpts { + kid?: string // Key ID to assign in case we are importing or creating a key + key?: MinimalImportableKey // Optional key to import. If not specified a key with random kid will be created + type?: KeyType // The key type. Defaults to Secp256k1 +} + +export interface IService { + id: string // ID + type: string // Service type + serviceEndpoint: string // Endpoint URL + description?: string //Optional description +} +``` + +### Creating an Identifier using auto-generated keys + +The example below generates an update key, a recover key and creates one DID Verification Method as part of the DID +Document with id `did-generated`, with accompanying key. +The `anchor: true`, means to propagate the anchor to the ION Network. You typically want to use `true`, unless you are +importing keys for an existing DID. +The purposes are the Verification Method Relationships in the DID Document. ION/Sidetree calls these purposes. + +```typescript +const identifier: IIdentifier = await agent.didManagerCreate({ + options: { + anchor: true, + recoveryKey: { + kid: 'recovery-generated', + }, + updateKey: { + kid: 'update-generated', + }, + verificationMethods: [ + { + kid: 'did-generated', + purposes: [IonPublicKeyPurpose.Authentication, IonPublicKeyPurpose.AssertionMethod], + }, + ], + }, +}) +``` + +### Creating an Identifier using imported keys + +The example below generates an update key with random Key ID. Notice the absence of the recoveryKey property. It imports +an existing recovery key and creates one DID Verification Method as part of the DID Document with id `did-imported1`, +using an imported key. +The `anchor: true`, means to propagate the anchor to the ION Network. You typically want to use `true`, unless you are +importing keys for an existing DID. +The purposes are the Verification Method Relationships in the DID Document. ION/Sidetree calls these purposes. + +```typescript +const identifier: IIdentifier = await agent.didManagerCreate({ + options: { + anchor: true, + updateKey: { + kid: 'update-imported', + }, + verificationMethods: [ + { + kid: 'did-imported1', + purposes: [IonPublicKeyPurpose.Authentication, IonPublicKeyPurpose.AssertionMethod], + }, + ], + }, +}) ``` -And add the following to the podfile +## Adding and removing Keys + +Adding and removing keys typically use the below options: + +```typescript +export interface IUpdateOpts { + actionTimestamp?: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + anchor?: boolean // Whether the DID should be anchored on ION or not. Handy for testing or importing an ID +} + +export interface VerificationMethod extends KeyOpts { + purposes: IonPublicKeyPurpose[] // In sidetree these are called purposes, but in DID-Core Verification Relationships +} + +export interface KeyOpts { + kid?: string // Key ID to assign in case we are importing or creating a key + key?: MinimalImportableKey // Optional key to import. If not specified a key with random kid will be created + type?: KeyType // The key type. Defaults to Secp256k1 +} +``` + +### Adding a Key + +Adding a key always has to happen using a previously created or imported key in Veramo. Unlike the create Identifier +function we do not support generating the key on the fly. This has to do with the interface of Veramo requiring a key. + +```typescript +const key = await agent.keyManagerCreate({ kms: 'mem', type: 'Secp256k1' }) +const result = agent.didManagerAddKey({ + did: identifier.did, + key, + kid: 'my-newly-added-key', + options: { + purposes: [IonPublicKeyPurpose.AssertionMethod], + anchor: true, + }, +}) +``` + +### Removing a Key + +Removing a key always has to happen using a previously created or imported key in Veramo. + +```typescript +const result = await agent.didManagerRemoveKey({ + did: identifier.did, + kid: 'my-newly-added-key', + options: { anchor: true }, +}) +``` + +## Adding and removing Services + +Adding and removing DID Document Services involves the below interfaces: + +```typescript +export interface IUpdateOpts { + actionTimestamp?: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + anchor?: boolean // Whether the DID should be anchored on ION or not. Handy for testing or importing an ID +} + +export interface VerificationMethod extends KeyOpts { + purposes: IonPublicKeyPurpose[] // In sidetree these are called purposes, but in DID-Core Verification Relationships +} + +export interface IService { + id: string // ID + type: string // Service type + serviceEndpoint: string // Endpoint URL + description?: string //Optional description +} +``` + +### Adding a service + +Adding a service is straightforward. It requires a Service object which will end up in the DID Document and it needs the +DID value. + +```typescript +const service: IService = { + type: 'LinkedDomains', + id: 'example-domain', + serviceEndpoint: 'https://test-example.com', +} + +const result = await agent.didManagerAddService({ + did: identifier.did, + service, + options: { anchor: true }, +}) +``` + +### Removing a service + +Removing a service is straightforward. The example has no options, which equates to anchor being true. + +```typescript +const result = await agent.didManagerRemoveService({ + did: identifier.did, + id: 'example-domain', +}) +``` + +## Removing the Identifier and DID + +_WARNING: Currently deleting the identifier will always be propagated to the ION Network. Reason is that Veramo doesn't +expose an options parameter for deleting an identifier._ + +Deleting an identifier is straightforward: -```shell -pod 'CatCrypto', :path => 'https://github.com/Sphereon-Opensource/CatCrypto' +```typescript +const deleted = await agent.didManagerDelete({ did: identifier.did }) ``` diff --git a/packages/ion-did-provider/__tests__/canonicalizer.test.ts b/packages/ion-did-provider/__tests__/canonicalizer.test.ts new file mode 100644 index 000000000..84646dc3d --- /dev/null +++ b/packages/ion-did-provider/__tests__/canonicalizer.test.ts @@ -0,0 +1,55 @@ +import { JsonCanonicalizer } from '../src/json-canonicalizer' + +describe('canonicalizer result should be', () => { + it('throwing an error on null input', () => { + expect(() => JsonCanonicalizer.asString(null)).toThrow('Null content received in canonicalizer') + }) + it('quoted empty string on empty string', () => { + expect(JsonCanonicalizer.asString('')).toEqual('""') + }) + it('empty json string on empty json', () => { + expect(JsonCanonicalizer.asString({})).toEqual('{}') + }) + it('a json string exactly matching input', () => { + expect( + JsonCanonicalizer.asString({ + test1: 'test1', + test2: 'test2', + }) + ).toEqual('{"test1":"test1","test2":"test2"}') + }) + it('a json string with properties reordered', () => { + expect( + JsonCanonicalizer.asString({ + test2: 'test2', + test1: 'test1', + }) + ).toEqual('{"test1":"test1","test2":"test2"}') + }) + it('a json string with null values intact', () => { + expect( + JsonCanonicalizer.asString({ + test1: 'test1', + test2: null, + }) + ).toEqual('{"test1":"test1","test2":null}') + }) + it('a json string with undefined property values removed', () => { + expect( + JsonCanonicalizer.asString({ + test1: 'test1', + test2: undefined, + }) + ).toEqual('{"test1":"test1"}') + }) + it('a json string with undefined property values removed if nested', () => { + expect( + JsonCanonicalizer.asString({ + test1: { + test2: 'test2', + test3: undefined, + }, + }) + ).toEqual('{"test1":{"test2":"test2"}}') + }) +}) diff --git a/packages/ion-did-provider/__tests__/functions.test.ts b/packages/ion-did-provider/__tests__/functions.test.ts new file mode 100644 index 000000000..7110ddef8 --- /dev/null +++ b/packages/ion-did-provider/__tests__/functions.test.ts @@ -0,0 +1,90 @@ +import { ManagedKeyInfo } from '@veramo/core' +import { generatePrivateKeyHex, tempMemoryKey, toIonPrivateKeyJwk } from '../src/functions' +import { KeyIdentifierRelation, KeyType } from '../src/types/ion-provider-types' + +const PRIVATE_RECOVERY_KEY_HEX = '7c90c0575643d09a370c35021c91e9d8af2c968c5f3a4bf73802693511a55b9f' +const PRIVATE_UPDATE_KEY_HEX = '7288a92f6219c873446abd1f8d26fcbbe1caa5274b47f6f086ef3e7e75dcad8b' +const PRIVATE_DID_KEY_HEX = '06eb9e64569203679b36f834a4d9725c989d32a7fb52c341eae3517b3aff8ee6' + +describe('functions: key generator', () => { + it('Secp256k1 should generate random keys', () => { + const key1 = generatePrivateKeyHex(KeyType.Secp256k1) + const key2 = generatePrivateKeyHex(KeyType.Secp256k1) + const key3 = generatePrivateKeyHex(KeyType.Secp256k1) + expect(key1).toBeDefined() + expect(key2).toBeDefined() + expect(key3).toBeDefined() + expect(key1).not.toBe(key2) + expect(key2).not.toBe(key3) + }) + it('Secp256k1 should result in hex length 64', () => { + expect(generatePrivateKeyHex(KeyType.Secp256k1).length).toBe(64) + }) + + it('Ed25519 should generate random keys', () => { + const key1 = generatePrivateKeyHex(KeyType.Ed25519) + const key2 = generatePrivateKeyHex(KeyType.Ed25519) + const key3 = generatePrivateKeyHex(KeyType.Ed25519) + expect(key1).toBeDefined() + expect(key2).toBeDefined() + expect(key3).toBeDefined() + expect(key1).not.toBe(key2) + expect(key2).not.toBe(key3) + }) + it('Ed25519 should result in hex length 128', () => { + expect(generatePrivateKeyHex(KeyType.Ed25519).length).toBe(128) + }) +}) + +describe('functions: ionKeys', () => { + it('toPrivateKeyJwk should be deterministic', () => { + const privateKeyJwk = toIonPrivateKeyJwk(PRIVATE_DID_KEY_HEX) + expect(privateKeyJwk).toEqual({ + crv: 'secp256k1', + d: 'BuueZFaSA2ebNvg0pNlyXJidMqf7UsNB6uNRezr_juY', + kty: 'EC', + x: 'aMjNCWMdeXJRg3PDzE7TE9P2xFpoL9fRkJ0toVBMB8E', + y: 'Qz7vj0zUj6S4daGIuEMbB_Ua6Q6wOTGAo46tXLi3SxE', + }) + }) + it('temp recovery Memory Key should be deterministic and have a commitment ', async () => { + const tmpKey = await tempMemoryKey(KeyType.Secp256k1, PRIVATE_RECOVERY_KEY_HEX, 'test-recovery-kid', 'test-recovery-kms', { + relation: KeyIdentifierRelation.RECOVERY, + actionTimestamp: 2, + }) + expect(tmpKey).toMatchObject({ + kid: 'test-recovery-kid', + kms: 'test-recovery-kms', + meta: { + ion: { + actionTimestamp: 2, + commitment: 'EiDAQXSi7HcjJVBYAKdO2zrM4HfybmBBCWsl6PQPJ_jklA', + relation: 'recovery', + }, + }, + publicKeyHex: + '04d530f20a7b3aa14a1dd4ca0aa67fc36138b6547bc91f454bda8d37f9021e0f5c24eeb53256a81d1b26ac342b00b0e7346b38f25a47c3cf233a0601714ae63b8b', + type: 'Secp256k1', + }) + }) + it('temp update Memory Key should be deterministic and have a commitment ', async () => { + const tmpKey = await tempMemoryKey(KeyType.Secp256k1, PRIVATE_UPDATE_KEY_HEX, 'test-update-kid', 'test-update-kms', { + relation: KeyIdentifierRelation.UPDATE, + actionTimestamp: 4, + }) + expect(tmpKey).toMatchObject({ + kid: 'test-update-kid', + kms: 'test-update-kms', + meta: { + ion: { + actionTimestamp: 4, + commitment: 'EiBzp7YhN9mhUcZsFdxnf-lwkRU-hVbBtZWsVoJHV6jkwA', + relation: 'update', + }, + }, + publicKeyHex: + '04826d51d96e9accdef1b13d9acfab61a15d5b5a6b0c1050acb68d58070a3baa0402dae4c63691a6d094537930aef1fa9116af81a6796015edb67013a2792e0b09', + type: 'Secp256k1', + }) + }) +}) diff --git a/packages/ion-did-provider/__tests__/identity-provider.test.ts b/packages/ion-did-provider/__tests__/identity-provider.test.ts deleted file mode 100644 index c8712456a..000000000 --- a/packages/ion-did-provider/__tests__/identity-provider.test.ts +++ /dev/null @@ -1,6 +0,0 @@ -describe('dummy', () => { - const a = 100 - it('should run a dummy test', () => { - expect(a).toEqual(100) - }) -}) diff --git a/packages/ion-did-provider/__tests__/ion-did-provider.test.ts b/packages/ion-did-provider/__tests__/ion-did-provider.test.ts new file mode 100644 index 000000000..54d04fe70 --- /dev/null +++ b/packages/ion-did-provider/__tests__/ion-did-provider.test.ts @@ -0,0 +1,230 @@ +import { createAgent, IIdentifier, IKey, IKeyManager, IService } from '@veramo/core' +import { DIDManager, MemoryDIDStore } from '@veramo/did-manager' +import { KeyManager, MemoryKeyStore, MemoryPrivateKeyStore } from '@veramo/key-manager' +import { IonPublicKeyPurpose } from '@decentralized-identity/ion-sdk' +import { KeyManagementSystem } from '@veramo/kms-local' +import { IonDIDProvider } from '../src' +import { ICreateIdentifierOpts } from '../src/types/ion-provider-types' + +const ionDIDProvider = new IonDIDProvider({ + defaultKms: 'mem', +}) +const agent = createAgent({ + plugins: [ + new KeyManager({ + store: new MemoryKeyStore(), + kms: { + mem: new KeyManagementSystem(new MemoryPrivateKeyStore()), + }, + }), + new DIDManager({ + providers: { + 'did:ion': ionDIDProvider, + }, + defaultProvider: 'did:ion', + store: new MemoryDIDStore(), + }), + ], +}) + +const PRIVATE_RECOVERY_KEY_HEX = '7c90c0575643d09a370c35021c91e9d8af2c968c5f3a4bf73802693511a55b9f' +const PRIVATE_UPDATE_KEY_HEX = '7288a92f6219c873446abd1f8d26fcbbe1caa5274b47f6f086ef3e7e75dcad8b' +const PRIVATE_DID1_KEY_HEX = '06eb9e64569203679b36f834a4d9725c989d32a7fb52c341eae3517b3aff8ee6' +const PRIVATE_DID2_KEY_HEX = '42f5d6cbb8af0b484453e19193b6d89e814f1ce66d2c1428271c94ff5465d627' +const PRIVATE_DID3_KEY_HEX = 'abebf433281c5bb86ff8a271d2a464e528437041322a58fb8c14815763cfc189' +const PRIVATE_DID4_KEY_HEX = '7dd923e40f4615ac496119f7e793cc2899e99b64b88ca8603db986700089532b' + +// Generate a new private key in hex format if needed, using the following method: +// console.log(generatePrivateKeyHex(KeyType.Secp256k1)) + +describe('@sphereon/ion-did-provider', () => { + it('should create identifier', async () => { + const options: ICreateIdentifierOpts = createIdentifierOpts + const identifier: IIdentifier = await agent.didManagerCreate({ options }) + + expect(identifier).toBeDefined() + expect(identifier.keys.length).toBe(4) + expect(identifier.services.length).toBe(1) + + expect(identifier.keys[0]).toMatchObject>({ + kms: 'mem', + kid: 'recovery-test', + meta: { ion: { relation: 'recovery' } }, + }) + }) + + it('should add key', async () => { + // This DID is known in ION, hence no anchoring + const identifier: IIdentifier = await agent.didManagerCreate(existingDidConfig(false, 'did1-test2', PRIVATE_DID1_KEY_HEX)) + expect(identifier.alias).toEqual('did:ion:EiCprjAMfWpp7zYXDZV2TGNDV6U4AEBN2Jr6sVsuzL7qhA') + expect(identifier.did).toEqual( + 'did:ion:EiCprjAMfWpp7zYXDZV2TGNDV6U4AEBN2Jr6sVsuzL7qhA:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJkaWQxLXRlc3QyIiwicHVibGljS2V5SndrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6ImFNak5DV01kZVhKUmczUER6RTdURTlQMnhGcG9MOWZSa0owdG9WQk1COEUiLCJ5IjoiUXo3dmowelVqNlM0ZGFHSXVFTWJCX1VhNlE2d09UR0FvNDZ0WExpM1N4RSJ9LCJwdXJwb3NlcyI6WyJhdXRoZW50aWNhdGlvbiIsImFzc2VydGlvbk1ldGhvZCJdLCJ0eXBlIjoiRWNkc2FTZWNwMjU2azFWZXJpZmljYXRpb25LZXkyMDE5In1dfX1dLCJ1cGRhdGVDb21taXRtZW50IjoiRWlCenA3WWhOOW1oVWNac0ZkeG5mLWx3a1JVLWhWYkJ0WldzVm9KSFY2amt3QSJ9LCJzdWZmaXhEYXRhIjp7ImRlbHRhSGFzaCI6IkVpRDl4NFJOekEtRGRpRHJUMGd1UU9vLXAwWDh2RTRNcUpvcEVTelZ2ZUtEQnciLCJyZWNvdmVyeUNvbW1pdG1lbnQiOiJFaURBUVhTaTdIY2pKVkJZQUtkTzJ6ck00SGZ5Ym1CQkNXc2w2UFFQSl9qa2xBIn19' + ) + + const newKey = await agent.keyManagerCreate({ kms: 'mem', type: 'Secp256k1' }) + const resultPromise = agent.didManagerAddKey({ + did: identifier.did, + key: newKey, + kid: 'test-add-key-' + Date.now(), + options: { purposes: [IonPublicKeyPurpose.AssertionMethod, IonPublicKeyPurpose.Authentication], anchor: true }, + }) + try { + await expect(resultPromise).resolves.toMatchObject({}) + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + }) + + it('should add service', async () => { + // This DID is known in ION, hence no anchoring + const identifier: IIdentifier = await agent.didManagerCreate(existingDidConfig(false, 'test-kid2', PRIVATE_DID2_KEY_HEX)) + expect(identifier.alias).toEqual('did:ion:EiADHIE9lE5oyd1XAx4xI_WvUaQBr0oYSCUJTGO1czkLKg') + expect(identifier.did).toEqual( + 'did:ion:EiADHIE9lE5oyd1XAx4xI_WvUaQBr0oYSCUJTGO1czkLKg:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJ0ZXN0LWtpZDIiLCJwdWJsaWNLZXlKd2siOnsiY3J2Ijoic2VjcDI1NmsxIiwia3R5IjoiRUMiLCJ4IjoiZFdxTzVyYWRQNXJGdVV6ZnY0T204a1Bnem11MThLVEJ4eEpaRnlJNHhlNCIsInkiOiJYYjl6b1Y5aG9FM2puc2ZXR05iOEZKaWpyNTVZQ0dqYUpsa3FUYnpJZ1ZJIn0sInB1cnBvc2VzIjpbImF1dGhlbnRpY2F0aW9uIiwiYXNzZXJ0aW9uTWV0aG9kIl0sInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkifV19fV0sInVwZGF0ZUNvbW1pdG1lbnQiOiJFaUJ6cDdZaE45bWhVY1pzRmR4bmYtbHdrUlUtaFZiQnRaV3NWb0pIVjZqa3dBIn0sInN1ZmZpeERhdGEiOnsiZGVsdGFIYXNoIjoiRWlBeXhSSHdvWndTbnAtSTllNVZHTmJMcWNxVi15eGtGaTVZMllEc1B1UmhXUSIsInJlY292ZXJ5Q29tbWl0bWVudCI6IkVpREFRWFNpN0hjakpWQllBS2RPMnpyTTRIZnlibUJCQ1dzbDZQUVBKX2prbEEifX0' + ) + + const service: IService = { + type: 'LinkedDomains', + id: 'test' + Date.now(), + serviceEndpoint: 'https://test-example.com', + } + + const resultPromise = agent.didManagerAddService({ + did: identifier.did, + service, + options: { anchor: true }, + }) + try { + await expect(resultPromise).resolves.toMatchObject({}) + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + }) + + it('should remove key', async () => { + // This DID is known in ION, hence no anchoring + const identifier: IIdentifier = await agent.didManagerCreate(existingDidConfig(false, 'did3-test3', PRIVATE_DID3_KEY_HEX)) + expect(identifier.alias).toEqual('did:ion:EiCkiD0CYfwNWupjNPycPi7WbTbMpDgt8KzVHboaUoitdw') + expect(identifier.did).toEqual( + 'did:ion:EiCkiD0CYfwNWupjNPycPi7WbTbMpDgt8KzVHboaUoitdw:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJkaWQzLXRlc3QzIiwicHVibGljS2V5SndrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6IktYYXp6U21PUzBvQWo4VEd4a3VnaS1QTzFxYWwyREJJemNWcUV6MjRzYkEiLCJ5IjoiQnVTaDJDVFQ2SV9IRmtVaXhaTkkwemstNjNvZEVKR1E5NkZ4RWxvZG1XayJ9LCJwdXJwb3NlcyI6WyJhdXRoZW50aWNhdGlvbiIsImFzc2VydGlvbk1ldGhvZCJdLCJ0eXBlIjoiRWNkc2FTZWNwMjU2azFWZXJpZmljYXRpb25LZXkyMDE5In1dfX1dLCJ1cGRhdGVDb21taXRtZW50IjoiRWlCenA3WWhOOW1oVWNac0ZkeG5mLWx3a1JVLWhWYkJ0WldzVm9KSFY2amt3QSJ9LCJzdWZmaXhEYXRhIjp7ImRlbHRhSGFzaCI6IkVpQ1N6N0FxV2FyWk5ISmV3ZTR5ZUsxMkxVdHBfNmpaVXhzNzY5ZkZfcXZ1aWciLCJyZWNvdmVyeUNvbW1pdG1lbnQiOiJFaURBUVhTaTdIY2pKVkJZQUtkTzJ6ck00SGZ5Ym1CQkNXc2w2UFFQSl9qa2xBIn19' + ) + + const resultPromise = agent.didManagerRemoveKey({ + did: identifier.did, + kid: 'did3-test3', + options: { anchor: false }, + }) + try { + await expect(resultPromise).resolves.toMatchObject({}) + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + }) + + it('should remove service', async () => { + // This DID is known in ION, hence no anchoring + const identifier: IIdentifier = await agent.didManagerCreate(existingDidConfig(false, 'did3-test3', PRIVATE_DID3_KEY_HEX)) + expect(identifier.alias).toEqual('did:ion:EiCkiD0CYfwNWupjNPycPi7WbTbMpDgt8KzVHboaUoitdw') + expect(identifier.did).toEqual( + 'did:ion:EiCkiD0CYfwNWupjNPycPi7WbTbMpDgt8KzVHboaUoitdw:eyJkZWx0YSI6eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljS2V5cyI6W3siaWQiOiJkaWQzLXRlc3QzIiwicHVibGljS2V5SndrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6IktYYXp6U21PUzBvQWo4VEd4a3VnaS1QTzFxYWwyREJJemNWcUV6MjRzYkEiLCJ5IjoiQnVTaDJDVFQ2SV9IRmtVaXhaTkkwemstNjNvZEVKR1E5NkZ4RWxvZG1XayJ9LCJwdXJwb3NlcyI6WyJhdXRoZW50aWNhdGlvbiIsImFzc2VydGlvbk1ldGhvZCJdLCJ0eXBlIjoiRWNkc2FTZWNwMjU2azFWZXJpZmljYXRpb25LZXkyMDE5In1dfX1dLCJ1cGRhdGVDb21taXRtZW50IjoiRWlCenA3WWhOOW1oVWNac0ZkeG5mLWx3a1JVLWhWYkJ0WldzVm9KSFY2amt3QSJ9LCJzdWZmaXhEYXRhIjp7ImRlbHRhSGFzaCI6IkVpQ1N6N0FxV2FyWk5ISmV3ZTR5ZUsxMkxVdHBfNmpaVXhzNzY5ZkZfcXZ1aWciLCJyZWNvdmVyeUNvbW1pdG1lbnQiOiJFaURBUVhTaTdIY2pKVkJZQUtkTzJ6ck00SGZ5Ym1CQkNXc2w2UFFQSl9qa2xBIn19' + ) + + const service: IService = { + type: 'LinkedDomains', + id: 'remove-test', + serviceEndpoint: 'https://test-example.com', + } + + const addPromise = agent.didManagerAddService({ + did: identifier.did, + service, + options: { anchor: false }, + }) + try { + await expect(addPromise).resolves.toMatchObject({}) + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + + const removePromise = agent.didManagerRemoveService({ + did: identifier.did, + id: 'remove-test', + options: { anchor: false }, + }) + try { + await expect(removePromise).resolves.toMatchObject({}) + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + }) + + it('should remove identifier', async () => { + const options = existingDidConfig(false, 'remove-test', PRIVATE_DID4_KEY_HEX) + const identifier: IIdentifier = await agent.didManagerCreate({ options }) + + expect(identifier).toBeDefined() + + const deletePromise = agent.didManagerDelete({ did: identifier.did, options: { anchor: false } }) + try { + await expect(deletePromise).resolves.toBeTruthy() + } catch (error) { + expect(JSON.stringify(error)).toMatch('An operation request already exists in queue for DID') + } + }) +}) + +function existingDidConfig(anchor: boolean = false, kid: string, privateDIDKeyHex: String) { + return { + options: { + anchor, + recoveryKey: { + kid: 'recovery-test2', + key: { + privateKeyHex: PRIVATE_RECOVERY_KEY_HEX, + }, + }, + updateKey: { + kid: 'update-test2', + key: { + privateKeyHex: PRIVATE_UPDATE_KEY_HEX, + }, + }, + verificationMethods: [ + { + kid, + purposes: [IonPublicKeyPurpose.Authentication, IonPublicKeyPurpose.AssertionMethod], + key: { + privateKeyHex: privateDIDKeyHex, + }, + }, + ], + }, + } +} + +const createIdentifierOpts = { + anchor: false, + recoveryKey: { + kid: 'recovery-test', + }, + updateKey: { + kid: 'update-test', + }, + verificationMethods: [ + { + kid: 'did1-test', + purposes: [IonPublicKeyPurpose.Authentication, IonPublicKeyPurpose.AssertionMethod], + }, + { + kid: 'did2-test', + purposes: [IonPublicKeyPurpose.KeyAgreement], + }, + ], + services: [ + { + id: 'bar', + type: 'LinkedDomains', + serviceEndpoint: 'https://bar.example.com', + }, + ], +} diff --git a/packages/ion-did-provider/package.json b/packages/ion-did-provider/package.json index 4f62fb318..d7dbefeb2 100644 --- a/packages/ion-did-provider/package.json +++ b/packages/ion-did-provider/package.json @@ -8,9 +8,18 @@ "build": "tsc" }, "dependencies": { - "@sphereon/ion-tools": "0.1.0-sphereon.1", + "@decentralized-identity/ion-sdk": "^0.5.0", + "@sphereon/ion-pow": "^0.1.1-unstable.3", + "@transmute/did-key-secp256k1": "0.2.1-unstable.42", + "hash-wasm": "^4.9.0", + "@ethersproject/random": "^5.6.1", + "@stablelib/ed25519": "^1.0.2", + "uint8arrays": "^3.1.0", + "base64url": "^3.0.1", "@veramo/core": "3.1.2-next.84", "@veramo/did-manager": "3.1.2-next.84", + "@veramo/key-manager": "3.1.2-next.84", + "@veramo/kms-local": "3.1.2-next.84", "debug": "^4.1.1" }, "devDependencies": { diff --git a/packages/ion-did-provider/src/functions.ts b/packages/ion-did-provider/src/functions.ts new file mode 100644 index 000000000..cb9ea0d39 --- /dev/null +++ b/packages/ion-did-provider/src/functions.ts @@ -0,0 +1,284 @@ +import { IonKeyMetadata, KeyIdentifierRelation, KeyType } from './types/ion-provider-types' +import { IonDid, IonDocumentModel, IonPublicKeyModel, IonPublicKeyPurpose, JwkEs256k } from '@decentralized-identity/ion-sdk' +import { IKey, ManagedKeyInfo } from '@veramo/core' +import { keyUtils as secp256k1KeyUtils } from '@transmute/did-key-secp256k1' + +import { randomBytes } from '@ethersproject/random' +import * as u8a from 'uint8arrays' +import { generateKeyPair as generateSigningKeyPair } from '@stablelib/ed25519' +import Debug from 'debug' +import { JsonCanonicalizer } from './json-canonicalizer' +import crypto from 'crypto' +import base64url from 'base64url' +import { MemoryPrivateKeyStore } from '@veramo/key-manager' +import { KeyManagementSystem } from '@veramo/kms-local' + +const multihashes = require('multihashes') + +const debug = Debug('veramo:ion-did-provider') + +const MULTI_HASH_SHA256_LITERAL = 18 + +/** + * Ensures we only return Jwk properties that ION can handle + * + * @param jwk The input JWK + * @return The sanitized JWK + */ +export const toJwkEs256k = (jwk: any): JwkEs256k => { + if (jwk.d) { + return { kty: jwk.kty, crv: jwk.crv, x: jwk.x, y: jwk.y, d: jwk.d } + } else { + return { kty: jwk.kty, crv: jwk.crv, x: jwk.x, y: jwk.y } + } +} + +/** + * Create a JWK from a hex private Key + * @param privateKeyHex The private key in hex form + * @return The JWK + */ +export const toIonPrivateKeyJwk = (privateKeyHex: string): JwkEs256k => { + return toJwkEs256k(secp256k1KeyUtils.privateKeyJwkFromPrivateKeyHex(privateKeyHex)) +} + +/** + * Create a JWK from a hex public Key + * @param privateKeyHex The public key in hex form + * @return The JWK + */ +export const toIonPublicKeyJwk = (publicKeyHex: string): JwkEs256k => { + return toJwkEs256k(secp256k1KeyUtils.publicKeyJwkFromPublicKeyHex(publicKeyHex)) +} + +/** + * Computes the ION Commitment value from a ION public key + * + * @param ionKey The ion public key + * @return The ION commitment value + */ +export const computeCommitmentFromIonPublicKey = (ionKey: IonPublicKeyModel): string => { + return computeCommitmentFromJwk(toJwkEs256k(ionKey.publicKeyJwk)) +} + +/** + * Computes the ION Commitment from a JWK + * + * @param jwk The JWK to computate the commitment for + */ +export const computeCommitmentFromJwk = (jwk: JwkEs256k): string => { + const data = JsonCanonicalizer.asString(jwk) + debug(`canonicalized JWK: ${data}`) + const singleHash = crypto.createHash('sha256').update(data).digest() + const doubleHash = crypto.createHash('sha256').update(singleHash).digest() + + const multiHash = multihashes.encode(Buffer.from(doubleHash), MULTI_HASH_SHA256_LITERAL) + debug(`commitment: ${base64url.encode(multiHash)}`) + return base64url.encode(multiHash) +} + +/** + * Get the action timestamp if present. Use current date/timestamp otherwise + * @param timestamp An optional provided timestamp, useful only in case a key needs to be inserted in between other keys + * @return The action timestamp + */ +export const getActionTimestamp = (timestamp = Date.now()): number => { + return timestamp +} + +/** + * Gets a specific recovery key matching the commitment value, typically coming from a DID document, or the latest recovery key in case it is not provided + * + * @param keys The actual keys related to an identifier + * @param commitment An optional commitment value to match the recovery key against. Typically comes from a DID Document + * @return The ION Recovery Public Key + */ +export const getVeramoRecoveryKey = (keys: IKey[], commitment?: string): IKey => { + const typedKeys = veramoKeysOfType(keys, KeyIdentifierRelation.RECOVERY, commitment) + return commitment === 'genesis' ? typedKeys[0] : typedKeys[typedKeys.length - 1] +} + +/** + * Gets a specific update key matching the commitment value, typically coming from a DID document, or the latest update key in case it is not provided + * + * @param keys The actual keys related to an identifier + * @param commitment An optional commitment value to match the update key against. Typically comes from a DID Document + * @return The Veramo Update Key + */ +export const getVeramoUpdateKey = (keys: IKey[], commitment?: string): IKey => { + const typedKeys = veramoKeysOfType(keys, KeyIdentifierRelation.UPDATE, commitment) + return commitment === 'genesis' ? typedKeys[0] : typedKeys[typedKeys.length - 1] +} + +/** + * Get the Ion Public keys from Veramo which have a specific relation type. If the commitment value is set the Key belonging to that value will be returned, otherwise the latest key + * @param keys The Veramo Keys to inspect + * @param relation The Key relation ship type + * @param commitment An optional commitment value, typically coming from a DID Document. The value 'genisis' returns the first key found + */ +export const ionKeysOfType = (keys: IKey[], relation: KeyIdentifierRelation, commitment?: string): IonPublicKeyModel[] => { + return veramoKeysOfType(keys, relation, commitment).flatMap((key) => { + return toIonPublicKey(key) + }) +} + +/** + * Get the Veramo keys which have a specific relation type. If the commitment value is set the Key belonging to that value will be returned, otherwise the latest key + * @param keys The Veramo Keys to inspect + * @param relation The Key relation ship type + * @param commitment An optional commitment value, typically coming from a DID Document. The value 'genisis' returns the first key found + */ +export const veramoKeysOfType = (keys: IKey[], relation: KeyIdentifierRelation, commitment?: string): IKey[] => { + return keys + .sort((key1, key2) => { + const opId1 = key1.meta?.ion?.operationId + const opId2 = key2.meta?.ion?.operationId + return !opId1 ? 1 : !opId2 ? -1 : opId1 - opId2 + }) + .filter((key) => !commitment || commitment === 'genesis' || !key.meta?.ion.commitment || key.meta?.ion.commitment === commitment) + .filter((key) => key.meta?.ion.relation === relation) + .flatMap((keys) => keys) +} + +/** + * Ion/Sidetree only supports kid with a maximum length of 50 characters. This method truncates longer keys when create ION requests + * + * @param kid The Veramo kid + * @return A truncated kid if the input kid contained more than 50 characters + */ +export const truncateKidIfNeeded = (kid: string): string => { + const id = kid.substring(0, 50) // ION restricts the id to 50 chars. Ideally we can also provide kids for key creation in Veramo + if (id.length != kid.length) { + debug(`Key kid ${kid} has been truncated to 50 chars to support ION!`) + } + return id +} + +/** + * Creates an Ion Public Key (Verification Method), used in ION request from a Veramo Key + * @param key The Veramo Key + * @param createKeyPurposes The verification relationships (Sidetree calls them purposes) to explicitly set. Used during key creation + * @return An Ion Public Key which can be used in Ion request objects + */ +export const toIonPublicKey = (key: ManagedKeyInfo, createKeyPurposes?: IonPublicKeyPurpose[]): IonPublicKeyModel => { + const purposes: IonPublicKeyPurpose[] = createKeyPurposes ? createKeyPurposes : key.meta?.ion?.purposes ? key.meta.ion.purposes : [] + const publicKeyJwk = toIonPublicKeyJwk(key.publicKeyHex) + const id = truncateKidIfNeeded(key.kid) + + return { + id, + type: 'EcdsaSecp256k1VerificationKey2019', + publicKeyJwk, + purposes, + } +} + +/** + * Generates a random Private Hex Key for the specified key type + * @param type The key type + * @return The private key in Hex form + */ +export const generatePrivateKeyHex = (type: KeyType): string => { + let privateKeyHex: string + + switch (type) { + case KeyType.Ed25519: { + const keyPairEd25519 = generateSigningKeyPair() + privateKeyHex = u8a.toString(keyPairEd25519.secretKey, 'base16') + break + } + case KeyType.Secp256k1: { + const privateBytes = randomBytes(32) + privateKeyHex = u8a.toString(privateBytes, 'base16') + break + } + default: + throw Error('not_supported: Key type not supported: ' + type) + } + return privateKeyHex +} + +/** + * Create a Veramo Key entirely in Memory. It is not stored + * + * Didn't want to recreate the logic to extract the pub key for the different key types + * So let's create a temp in-mem kms to do it for us + * + * @param type + * @param privateKeyHex + * @param kid + * @param kms + * @param ionMeta + */ +export const tempMemoryKey = async ( + type: KeyType.Ed25519 | KeyType.Secp256k1 | KeyType, + privateKeyHex: string, + kid: string, + kms: string, + ionMeta: IonKeyMetadata +): Promise => { + const tmpKey = (await new KeyManagementSystem(new MemoryPrivateKeyStore()).importKey({ + type, + privateKeyHex, + kid, + })) as IKey + tmpKey.meta!.ion = JSON.parse(JSON.stringify(ionMeta)) + tmpKey.meta!.ion.commitment = computeCommitmentFromJwk(toIonPublicKeyJwk(tmpKey.publicKeyHex)) + tmpKey.kms = kms + // tmpKey.privateKeyHex = privateKeyHex + return tmpKey +} + +/** + * Generate a deterministic Ion Long form DID from the creation keys + * + * @param input The creation keys + * @return The Ion Long form DID + */ +export const ionLongFormDidFromCreation = (input: { recoveryKey: JwkEs256k; updateKey: JwkEs256k; document: IonDocumentModel }): string => { + return IonDid.createLongFormDid(input) +} + +/** + * Generate a deterministic Ion Short form DID from the creation keys + * + * @param input The creation keys + * @return The Ion Short form DID + */ +export const ionShortFormDidFromCreation = (input: { recoveryKey: JwkEs256k; updateKey: JwkEs256k; document: IonDocumentModel }): string => { + return ionShortFormDidFromLong(ionLongFormDidFromCreation(input)) +} + +/** + * Convert an Ion Long form DID into a short form DID. Be awaer that the input really needs to be a long Form DID! + * @param longFormDid The Ion Long form DID + * @return An Ion Short form DID + */ +export const ionShortFormDidFromLong = (longFormDid: string): string => { + // Only call this from a long form DID! + + // todo: Add min length check + return longFormDid.split(':').slice(0, -1).join(':') +} + +/** + * Gets the method specific Short form Id from the Long form DID. So the did: prefix and Ion Long Form suffix have been removed + * @param longFormDid The Ion Long form DID + * @return The Short form method specific Id + */ +export const ionDidSuffixFromLong = (longFormDid: string): string => { + return ionDidSuffixFromShort(ionShortFormDidFromLong(longFormDid)) +} + +/** + * Gets the method specific Short form Id from the Short form DID. So the did: prefix has been removed + * @param shortFormDid The Ion Short form DID + * @return The Short form method specific Id + */ +export const ionDidSuffixFromShort = (shortFormDid: string): string => { + const suffix = shortFormDid.split(':').pop() + if (!suffix) { + throw new Error(`Could not extract ion DID suffix from short form DID ${shortFormDid}`) + } + return suffix +} diff --git a/packages/ion-did-provider/src/index.ts b/packages/ion-did-provider/src/index.ts index a1d600d01..0e9a6cd62 100644 --- a/packages/ion-did-provider/src/index.ts +++ b/packages/ion-did-provider/src/index.ts @@ -6,3 +6,4 @@ */ export { IonDIDProvider } from './ion-did-provider' export { getDidIonResolver } from './ion-did-resolver' +export * from './types/ion-provider-types' diff --git a/packages/ion-did-provider/src/ion-did-provider.ts b/packages/ion-did-provider/src/ion-did-provider.ts index 79d3f4679..b801649f5 100644 --- a/packages/ion-did-provider/src/ion-did-provider.ts +++ b/packages/ion-did-provider/src/ion-did-provider.ts @@ -1,85 +1,438 @@ -import { IIdentifier, IKey, IService, IAgentContext, IKeyManager } from '@veramo/core' +import { DIDResolutionResult, IAgentContext, IIdentifier, IKey, IKeyManager, IService, ManagedKeyInfo } from '@veramo/core' import { AbstractIdentifierProvider } from '@veramo/did-manager' -import { keyUtils as secp256k1_keyUtils } from '@transmute/did-key-secp256k1' -import * as ION from '@sphereon/ion-tools' + import Debug from 'debug' +import { + IAddKeyOpts, + IContext, + ICreateIdentifierOpts, + IKeyRotation, + IonDidForm, + IonKeyMetadata, + IUpdateOpts, + KeyIdentifierRelation, + KeyOpts, + KeyType, + VerificationMethod, +} from './types/ion-provider-types' + +import { IonSigner } from './ion-signer' +import { resolveDidIonFromIdentifier } from './ion-did-resolver' -const debug = Debug('sphereon:ion-did-provider') +import { IonPublicKeyModel, IonPublicKeyPurpose, IonRequest } from '@decentralized-identity/ion-sdk' +import { + computeCommitmentFromIonPublicKey, + generatePrivateKeyHex, + getActionTimestamp, + getVeramoRecoveryKey, + getVeramoUpdateKey, + ionDidSuffixFromLong, + ionLongFormDidFromCreation, + ionShortFormDidFromLong, + tempMemoryKey, + toIonPublicKey, + toIonPublicKeyJwk, + toJwkEs256k, + truncateKidIfNeeded, +} from './functions' +import { IonPoW } from '@sphereon/ion-pow' -type IContext = IAgentContext +const debug = Debug('veramo:ion-did-provider') /** * {@link @veramo/did-manager#DIDManager} identifier provider for `did:ion` identifiers * @public */ export class IonDIDProvider extends AbstractIdentifierProvider { - private defaultKms: string + private readonly defaultKms: string + private readonly ionPoW: IonPoW constructor(options: { defaultKms: string }) { super() this.defaultKms = options.defaultKms + this.ionPoW = new IonPoW() } + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerCreate} */ async createIdentifier( - { kms }: { kms?: string; alias?: string; options?: any }, + { kms, options, alias }: { kms?: string; alias?: string; options?: ICreateIdentifierOpts }, context: IAgentContext ): Promise> { - const key = await context.agent.keyManagerCreate({ kms: kms || this.defaultKms, type: 'Secp256k1' }) - // convert to JWK (note, we should have a discussion about key dependencies here) - const publicJwk = secp256k1_keyUtils.publicKeyJwkFromPublicKeyHex(key.publicKeyHex) + const actionTimestamp = getActionTimestamp(options?.actionTimestamp) + + const recoveryKey = await this.importProvidedOrGeneratedKey( + { + kms, + actionTimestamp: actionTimestamp, + relation: KeyIdentifierRelation.RECOVERY, + options: options?.recoveryKey, + }, + context + ) + const updateKey = await this.importProvidedOrGeneratedKey( + { + kms, + actionTimestamp: actionTimestamp, + relation: KeyIdentifierRelation.UPDATE, + options: options?.updateKey, + }, + context + ) - const did = new ION.DID({ - content: { - publicKeys: [ + // No options or no verification method options, results in us generating a single key as the only authentication verification method in the DID + const verificationMethods = options?.verificationMethods + ? options.verificationMethods + : [ { - // ION restricts the id to 50 chars - id: key.kid.substring(0, 50), - type: 'EcdsaSecp256k1VerificationKey2019', - publicKeyJwk: publicJwk, - purposes: ['authentication'], + type: KeyType.Secp256k1, + purposes: [IonPublicKeyPurpose.Authentication], }, - ], + ] + + const veramoKeys: ManagedKeyInfo[] = [recoveryKey, updateKey] + const ionPublicKeys: IonPublicKeyModel[] = [] + for (const verificationMethod of verificationMethods) { + const key = await this.importProvidedOrGeneratedKey( + { + kms, + actionTimestamp: actionTimestamp, + relation: KeyIdentifierRelation.DID, + options: verificationMethod, + }, + context + ) + veramoKeys.push(key) + ionPublicKeys.push(toIonPublicKey(key, verificationMethod.purposes)) + } + + const services = options?.services ? options.services : undefined + + const createRequest = { + recoveryKey: toIonPublicKeyJwk(recoveryKey.publicKeyHex), + updateKey: toIonPublicKeyJwk(updateKey.publicKeyHex), + document: { + publicKeys: ionPublicKeys, + services, }, - }) + } + const longFormDid = ionLongFormDidFromCreation(createRequest) + const shortFormDid = ionShortFormDidFromLong(longFormDid) - const requestBody = await did.generateRequest(0) - const request = new ION.AnchorRequest(requestBody) - await request.submit() + const request = IonRequest.createCreateRequest(createRequest) + await this.anchorRequest(request, options?.anchor) const identifier: Omit = { - did: await did.getURI(), - controllerKeyId: key.kid, - keys: [key], - services: [], + did: longFormDid, + controllerKeyId: updateKey.kid, + alias: shortFormDid, + keys: veramoKeys, + services: services ? services : [], } - // TODO: Long version DID is not conformant to "initial value" definition. - debug(`Created (short version): ${await did.getURI('short')}`) - debug('Created', identifier.did) - + debug('Created DID (short, long form): ', identifier.alias, identifier.did) return identifier } + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerDelete} */ async deleteIdentifier(identifier: IIdentifier, context: IContext): Promise { - for (const { kid } of identifier.keys) { - await context.agent.keyManagerDelete({ kid }) - } + const didResolution = await this.getAssertedDidDocument(identifier, IonDidForm.LONG) + const recoveryKey = getVeramoRecoveryKey(identifier.keys, didResolution.didDocumentMetadata.method.recoveryCommitment) + const request = await IonRequest.createDeactivateRequest({ + didSuffix: ionDidSuffixFromLong(identifier.did), + recoveryPublicKey: toJwkEs256k(toIonPublicKeyJwk(recoveryKey.publicKeyHex)), + signer: new IonSigner(context, recoveryKey.kid), + }) + + await this.anchorRequest(request, true) + return true } - async addKey({ identifier, key, options }: { identifier: IIdentifier; key: IKey; options?: any }, context: IContext): Promise { - throw new Error('Not Implemented') + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerAddKey} */ + async addKey({ identifier, key, options }: { identifier: IIdentifier; key: IKey; options?: IAddKeyOpts }, context: IContext): Promise { + if (!options) { + throw Error('Add key needs options, since we need to know the purpose(s) of the key') + } + const rotation = await this.rotateVeramoKey({ identifier, options, kms: key.kms, context }) + + const request = await IonRequest.createUpdateRequest({ + didSuffix: ionDidSuffixFromLong(identifier.did), + updatePublicKey: rotation.currentJwk, + nextUpdatePublicKey: rotation.nextJwk, + signer: new IonSigner(context, rotation.currentVeramoKey.kid), + publicKeysToAdd: [ + { + ...toIonPublicKey(key, options.purposes), + }, + ], + }) + + try { + await this.anchorRequest(request, options.anchor) + return request + } catch (error) { + // It would have been nicer if we hadn't stored the new update key yet + await context.agent.keyManagerDelete({ kid: rotation.nextVeramoKey.kid }) + throw error + } + } + + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerAddService} */ + async addService( + { identifier, service, options }: { identifier: IIdentifier; service: IService; options?: IUpdateOpts }, + context: IContext + ): Promise { + const rotation = await this.rotateVeramoKey({ identifier, options, context }) + + const request = await IonRequest.createUpdateRequest({ + didSuffix: ionDidSuffixFromLong(identifier.did), + updatePublicKey: rotation.currentJwk, + nextUpdatePublicKey: rotation.nextJwk, + signer: new IonSigner(context, rotation.currentVeramoKey.kid), + servicesToAdd: [ + { + ...service, + }, + ], + }) + + try { + await this.anchorRequest(request, options?.anchor) + return request + } catch (error) { + // It would have been nicer if we hadn't stored the new update key yet + await context.agent.keyManagerDelete({ kid: rotation.nextVeramoKey.kid }) + throw error + } + } + + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerRemoveKey} */ + async removeKey({ identifier, kid, options }: { identifier: IIdentifier; kid: string; options?: IUpdateOpts }, context: IContext): Promise { + const rotation = await this.rotateVeramoKey({ identifier, options, context }) + + const request = await IonRequest.createUpdateRequest({ + didSuffix: ionDidSuffixFromLong(identifier.did), + updatePublicKey: rotation.currentJwk, + nextUpdatePublicKey: rotation.nextJwk, + signer: new IonSigner(context, rotation.currentVeramoKey.kid), + idsOfPublicKeysToRemove: [truncateKidIfNeeded(kid)], + }) + + try { + await this.anchorRequest(request, options?.anchor) + return request + } catch (error) { + // It would have been nicer if we hadn't stored the new update key yet + await context.agent.keyManagerDelete({ kid: rotation.nextVeramoKey.kid }) + throw error + } + } + + /** {@inheritDoc @veramo/veramo-core#IDIDManager.didManagerRemoveService} */ + async removeService({ identifier, id, options }: { identifier: IIdentifier; id: string; options?: IUpdateOpts }, context: IContext): Promise { + const rotation = await this.rotateVeramoKey({ identifier, options, context }) + + const request = await IonRequest.createUpdateRequest({ + didSuffix: ionDidSuffixFromLong(identifier.did), + updatePublicKey: rotation.currentJwk, + nextUpdatePublicKey: rotation.nextJwk, + signer: new IonSigner(context, rotation.currentVeramoKey.kid), + idsOfServicesToRemove: [truncateKidIfNeeded(id)], + }) + + try { + await this.anchorRequest(request, options?.anchor) + return request + } catch (error) { + // It would have been nicer if we hadn't stored the new update key yet + await context.agent.keyManagerDelete({ kid: rotation.nextVeramoKey.kid }) + throw error + } + } + + /** + * Gets as DID document from the identifier in either short or long form + * + * @param identifier The Identifier (DID) to use + * @param didForm Use short or long form (the default) for resolution + * @return A DID Document promise + * @private + */ + private async getAssertedDidDocument(identifier: IIdentifier, didForm: IonDidForm = IonDidForm.LONG): Promise { + const didDocument = await resolveDidIonFromIdentifier(identifier, didForm) + if (!didDocument) { + return Promise.reject(Error(`Could not resolve existing DID document for did ${identifier.did}`)) + } + return didDocument + } + + /** + * Rotate an update or recovery key. Meaning a new key will be generated, which will be used from that moment on for recoveries or updates. + * It return an object which is used internally to get access to current en next update/recovery keys, which are transformed in different types (Veramo, JWK, ION Public Key) + * + * @param identifier The identifier (DID) for which to update the recovery/update key + * @param commitment The current commitment value for either the update or recovery key from the DID document + * @param relation Whether it is an update key or a recovery key + * @param kms The KMS to use + * @param options Allows to set a kid for the new key or to import a key for the new update/recovery key + * @param actionTimestamp The action Timestamp. These are used to order keys in chronological order. Normally you will want to use Date.now() for these + * @param context The Veramo Agent context + * @private + */ + private async rotateUpdateOrRecoveryKey( + { + identifier, + commitment, + relation, + kms, + options, + actionTimestamp, + }: { + identifier: IIdentifier + commitment: string + actionTimestamp: number + relation: KeyIdentifierRelation + kms?: string + alias?: string + options?: KeyOpts + }, + context: IAgentContext + ): Promise { + const currentVeramoKey = + relation == KeyIdentifierRelation.UPDATE ? getVeramoUpdateKey(identifier.keys, commitment) : getVeramoRecoveryKey(identifier.keys, commitment) + const currentIonKey = toIonPublicKey(currentVeramoKey) + const currentJwk = toIonPublicKeyJwk(currentVeramoKey.publicKeyHex) + //todo alias? + const nextVeramoKey = await this.importProvidedOrGeneratedKey( + { + kms, + actionTimestamp: actionTimestamp, + relation, + options, + }, + context + ) + const nextIonKey = toIonPublicKey(nextVeramoKey) + const nextJwk = toIonPublicKeyJwk(nextVeramoKey.publicKeyHex) + + return { currentIonKey, currentVeramoKey, currentJwk, nextJwk, nextIonKey, nextVeramoKey } } - async addService({ identifier, service, options }: { identifier: IIdentifier; service: IService; options?: any }, context: IContext): Promise { - throw new Error('Not Implemented') + /** + * Rotates an actual update/recovery key in Veramo + * + * @param kms The KMS to use + * @param context The Veramo agent context + * @param options options Allows to set a kid for the new key or to import a key for the new update/recovery key + * @param identifier The identifier (DID) for which to update the recovery/update key + * @private + */ + private async rotateVeramoKey({ + kms, + context, + options, + identifier, + }: { + identifier: IIdentifier + options?: IUpdateOpts + kms?: string + context: IContext + }) { + const didResolution = await this.getAssertedDidDocument(identifier, IonDidForm.LONG) + const currentUpdateKey = getVeramoUpdateKey(identifier.keys, didResolution.didDocumentMetadata.method.updateCommitment) + const commitment = computeCommitmentFromIonPublicKey(toIonPublicKey(currentUpdateKey)) + const actionId = getActionTimestamp(options?.actionTimestamp) + + const rotation = await this.rotateUpdateOrRecoveryKey( + { + identifier, + commitment, + relation: KeyIdentifierRelation.UPDATE, + actionTimestamp: actionId, + kms: kms ? kms : this.defaultKms, + options: {}, + }, + context + ) + return rotation } - async removeKey(args: { identifier: IIdentifier; kid: string; options?: any }, context: IContext): Promise { - throw new Error('Not Implemented') + /** + * We optionally generate and then import our own keys. + * + * Reason for this is that we want to be able to assign Key IDs (kid), which Veramo supports on import, but not creation. The net result is that we do not support keys which have been created from keyManagerCreate + * + * @param kms The KMS to use + * @param actionTimestamp The action Timestamp. These are used to order keys in chronological order. Normally you will want to use Date.now() for these + * @param relation Whether it is a DID Verification Method key, an update key or a recovery key + * @param options Allows to set a kid for the new key or to import a key for the new update/recovery key + * @param context The Veramo agent context + * @private + */ + private async importProvidedOrGeneratedKey( + { + kms, + actionTimestamp, + relation, + options, + }: { kms?: string; actionTimestamp: number; relation: KeyIdentifierRelation; options?: KeyOpts | VerificationMethod }, + context: IAgentContext + ): Promise { + const kid = options?.kid ? options.kid : options?.key?.kid + const type = options?.type ? options.type : options?.key?.type ? (options.key.type as KeyType) : KeyType.Secp256k1 + + const meta = options?.key?.meta ? options.key.meta : {} + const ionMeta: IonKeyMetadata = { + relation, + actionTimestamp: actionTimestamp, + } + if (options && 'purposes' in options) { + ionMeta.purposes = options.purposes + } + let privateKeyHex: string + if (options?.key) { + if (!options.key.privateKeyHex) { + throw new Error(`We need to have a private key when importing a recovery or update key. Key ${kid} did not have one`) + } + privateKeyHex = options.key.privateKeyHex + } else { + privateKeyHex = generatePrivateKeyHex(type) + } + if (relation === KeyIdentifierRelation.RECOVERY || relation === KeyIdentifierRelation.UPDATE) { + // We need a commitment for these keys. As they are based on the publicKey let's create an in mem key + const tmpKey = await tempMemoryKey(type, privateKeyHex, kid!, kms ? kms : this.defaultKms, ionMeta) + ionMeta.commitment = tmpKey.meta!.ion.commitment + } + meta.ion = ionMeta + + const key: IKey = await context.agent.keyManagerImport({ + kms: kms || this.defaultKms, + type, + privateKeyHex, + kid, + meta, + }) + // We need it in case we are importing it again in the same call + // key.privateKeyHex = privateKeyHex + + debug('Created key', type, relation, kid, key.publicKeyHex) + + return key } - async removeService(args: { identifier: IIdentifier; id: string; options?: any }, context: IContext): Promise { - throw new Error('Not Implemented') + /** + * Whether to actually anchor the request on the ION network + * + * @param request The ION request + * @param anchor Whether to anchor or not (defaults to true) + * @return The anchor request + * @private + */ + private async anchorRequest(request: IonRequest, anchor?: boolean) { + if (anchor !== false) { + await this.ionPoW.submit(JSON.stringify(request)) + } else { + debug(`Not anchoring as anchoring was not enabled`) + } } } diff --git a/packages/ion-did-provider/src/ion-did-resolver.ts b/packages/ion-did-provider/src/ion-did-resolver.ts index 2f6614338..a07df1306 100644 --- a/packages/ion-did-provider/src/ion-did-resolver.ts +++ b/packages/ion-did-provider/src/ion-did-resolver.ts @@ -1,8 +1,25 @@ -import * as ION from '@sphereon/ion-tools' -import { DIDResolutionResult, DIDResolutionOptions, DIDResolver } from 'did-resolver' +import { fetch } from 'cross-fetch' +import { IIdentifier } from '@veramo/core' +import { DIDResolutionOptions, DIDResolutionResult, DIDResolver } from 'did-resolver' +import { IonDidForm } from './types/ion-provider-types' -const resolveDidIon: DIDResolver = async (didUrl: string, options: DIDResolutionOptions): Promise => { - return ION.resolve(didUrl, options) +export const resolveDidIonFromIdentifier = async ( + identifier: IIdentifier, + ionDidForm: IonDidForm = IonDidForm.LONG, + options?: DIDResolutionOptions +): Promise => { + return await resolve(ionDidForm == IonDidForm.LONG ? identifier.did : identifier.alias!, options) +} + +export const resolveDidIon: DIDResolver = async (didUrl: string, options?: DIDResolutionOptions): Promise => { + return resolve(didUrl, options) +} + +const resolve = async (didUrl: string, options?: DIDResolutionOptions) => { + return fetch((options?.nodeEndpoint || 'https://beta.discover.did.microsoft.com/1.0/identifiers/') + didUrl).then((response) => { + if (response.status >= 400) throw new Error('Not Found') + return response.json() + }) } export function getDidIonResolver() { diff --git a/packages/ion-did-provider/src/ion-signer.ts b/packages/ion-did-provider/src/ion-signer.ts new file mode 100644 index 000000000..8cc48a43f --- /dev/null +++ b/packages/ion-did-provider/src/ion-signer.ts @@ -0,0 +1,48 @@ +import crypto from 'crypto' +import { IContext } from './types/ion-provider-types' +import * as u8a from 'uint8arrays' +import base64url from 'base64url' + +/** + * This class is responsible for signing the JWT when sending in Anchor requests to an ION node. It is using the update or recovery key denoted by 'kid' + */ +export class IonSigner { + private readonly kid: string + + /** + * Construct the signer object + * + * @param context The agent context + * @param kid The Veramo update or recovery Key ID (kid) + */ + constructor(private context: IContext, kid: string) { + this.kid = kid + } + + /** + * Sign the JWT header and payload using the Key ID (kid) provided during construction. + * + * @param header The JWT header (only 'alg' supported for now) + * @param payload The ION update delta payload + */ + async sign(header: any, payload: any): Promise { + if (!header) { + header = { + alg: 'ES256K', + } + } + const encodedHeader = base64url.encode(JSON.stringify(header)) + const encodedPayload = base64url.encode(JSON.stringify(payload)) + const toBeSigned = encodedHeader + '.' + encodedPayload + const message = u8a.fromString(toBeSigned) + const digest = crypto.createHash('sha256').update(message).digest('hex') + const sigObj = await this.context.agent.keyManagerSign({ + keyRef: this.kid, + algorithm: header.alg, + data: digest, + encoding: 'hex', + }) + const encodedSignature = sigObj // The keyManagerSign already performs base64Url encoding + return encodedHeader + '.' + encodedPayload + '.' + encodedSignature + } +} diff --git a/packages/ion-did-provider/src/json-canonicalizer.ts b/packages/ion-did-provider/src/json-canonicalizer.ts new file mode 100644 index 000000000..784a13cfa --- /dev/null +++ b/packages/ion-did-provider/src/json-canonicalizer.ts @@ -0,0 +1,36 @@ +import canonicalize from 'canonicalize' +/** + * Class containing reusable JSON canonicalization operations using JSON Canonicalization Scheme (JCS). + */ +export class JsonCanonicalizer { + /** + * Canonicalizes the given content as a string + * @param The content to canonicalize + * @return The canonicalized content + */ + static asString(content: unknown): string { + if (content == null) { + throw Error('Null content received in canonicalizer') + } + // We need to remove all properties with `undefined` as value so that JCS canonicalization will not produce invalid JSON. + const contentWithoutUndefinedProperties = JsonCanonicalizer.removeAllUndefinedProperties(content) + const canonicalizedString = canonicalize(contentWithoutUndefinedProperties) + if (!canonicalizedString) { + throw new Error('Could not canonicalize input') + } + return canonicalizedString + } + /** + * Removes all properties within the given object with `undefined` as value as that would mess up the validity + */ + private static removeAllUndefinedProperties(content: any): unknown { + for (const key in content) { + if (typeof content[key] === 'object') { + JsonCanonicalizer.removeAllUndefinedProperties(content[key]) + } else if (content[key] === undefined) { + delete content[key] + } + } + return content + } +} diff --git a/packages/ion-did-provider/src/types/@decentralized-identity/ion-tools/index.d.ts b/packages/ion-did-provider/src/types/@decentralized-identity/ion-tools/index.d.ts new file mode 100644 index 000000000..90f50ead0 --- /dev/null +++ b/packages/ion-did-provider/src/types/@decentralized-identity/ion-tools/index.d.ts @@ -0,0 +1 @@ +declare module '@decentralized-identity/ion-tools' diff --git a/packages/ion-did-provider/src/types/ion-provider-types.ts b/packages/ion-did-provider/src/types/ion-provider-types.ts new file mode 100644 index 000000000..81b44e190 --- /dev/null +++ b/packages/ion-did-provider/src/types/ion-provider-types.ts @@ -0,0 +1,66 @@ +import { IAgentContext, IKey, IKeyManager, IService, MinimalImportableKey } from '@veramo/core' +import { IonPublicKeyPurpose, IonPublicKeyModel, JwkEs256k } from '@decentralized-identity/ion-sdk' + +export type IContext = IAgentContext + +export interface VerificationMethod extends KeyOpts { + purposes: IonPublicKeyPurpose[] // In sidetree these are called purposes, but in DID-Core Verification Relationships +} + +export interface KeyOpts { + kid?: string // Key ID to assign in case we are importing a key + key?: MinimalImportableKey // Optional key to import. If not specified a key with random kid will be created + type?: KeyType // The key type. Defaults to Secp256k1 +} + +export interface ICreateIdentifierOpts { + verificationMethods?: VerificationMethod[] // The Verification method to add + recoveryKey?: KeyOpts // Recovery key options + updateKey?: KeyOpts // Update key options + services?: IService[] // Service(s) to add + actionTimestamp?: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + anchor?: boolean // Whether the DID should be anchored on ION or not. Handy for testing or importing an ID +} + +export interface IAddKeyOpts extends IUpdateOpts { + purposes: IonPublicKeyPurpose[] // In sidetree these are called purposes, but in DID-Core Verification Relationships +} + +export interface IUpdateOpts { + actionTimestamp?: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + anchor?: boolean // Whether the DID should be anchored on ION or not. Handy for testing or importing an ID +} + +export interface IonKeyMetadata { + purposes?: IonPublicKeyPurpose[] // The Verification Method Relationships, or purposes as they are called in ION/Sidetree + actionTimestamp: number // Unique number denoting the action. Used for ordering internally. Suggested to use current timestamp + relation: KeyIdentifierRelation // The type of key, which is either recovery, update or DID + commitment?: string // Commitment value in case this is an update or recovery key. Used to get latest update/recovery keys +} + +export enum KeyType { + Ed25519 = 'Ed25519', // EdDSA key type + Secp256k1 = 'Secp256k1', // EcDSA key type (not yet supported) +} + +export enum KeyIdentifierRelation { + RECOVERY = 'recovery', // A recovery key can be used to recover access to a DID, after loosing the update key(s) + UPDATE = 'update', // An update key is used to commit changes on ION. Please note that new update keys will be automatically created on every update + DID = 'did', // A key which ends up as a Verification Method in a DID document +} + +export enum IonDidForm { + LONG = 'long', // A long form ION DID, which contains the short form, but also a self-certifying part, which can be resolved before the anchor happened. This is handy during the initial anchoring (as that might take a long time) + SHORT = 'short', // The short form ION DID, which can only be used once anchored +} + +export interface IKeyRotation { + currentVeramoKey: IKey // Current update/recovery Veramo Key + currentIonKey: IonPublicKeyModel // Current update/recovery Key in ION form + currentJwk: JwkEs256k // Current update/recovery JWK of the key + nextVeramoKey: IKey // Next Veramo update/recovery key + nextIonKey: IonPublicKeyModel // Next update/recovery key in ION form + nextJwk: JwkEs256k // Next JWK of the update/recovery key +} + +export type IRequiredContext = IAgentContext diff --git a/packages/ion-did-provider/types/@decentralized-identity/ion-tools/index.d.ts b/packages/ion-did-provider/types/@decentralized-identity/ion-tools/index.d.ts deleted file mode 100644 index 1d2b4f58f..000000000 --- a/packages/ion-did-provider/types/@decentralized-identity/ion-tools/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module '@sphereon/ion-tools' diff --git a/packages/lto-did-provider/CHANGELOG.md b/packages/lto-did-provider/CHANGELOG.md index d3aae4ccf..3e0c8e6f9 100644 --- a/packages/lto-did-provider/CHANGELOG.md +++ b/packages/lto-did-provider/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-lto-did-provider - - - - # [0.6.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-lto-did-provider diff --git a/packages/mnemonic-seed-manager/CHANGELOG.md b/packages/mnemonic-seed-manager/CHANGELOG.md index 18737341f..556af1767 100644 --- a/packages/mnemonic-seed-manager/CHANGELOG.md +++ b/packages/mnemonic-seed-manager/CHANGELOG.md @@ -5,14 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.7.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.6.0...v0.7.0) (2022-08-05) - ### Features -* Add migration support to mnemonic seed manager plugin. Fix some entity props in the process ([f7641f4](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f7641f4f56ebe99894ddad6c6827681406d21d2e)) - - - - +- Add migration support to mnemonic seed manager plugin. Fix some entity props in the process ([f7641f4](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f7641f4f56ebe99894ddad6c6827681406d21d2e)) # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) diff --git a/packages/ms-authenticator/CHANGELOG.md b/packages/ms-authenticator/CHANGELOG.md index bd69d2056..047dbc4a5 100644 --- a/packages/ms-authenticator/CHANGELOG.md +++ b/packages/ms-authenticator/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ms-authenticator - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) ### Bug Fixes diff --git a/packages/ms-request-api/CHANGELOG.md b/packages/ms-request-api/CHANGELOG.md index e2b5cddcb..08b4f8933 100644 --- a/packages/ms-request-api/CHANGELOG.md +++ b/packages/ms-request-api/CHANGELOG.md @@ -5,18 +5,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.7.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.6.0...v0.7.0) (2022-08-05) - ### Bug Fixes -* Update ion deps to remove problematic did-key p384 from transmute which depended on webcypto-asl which is not compatible with node >=14. ([386efc7](https://github.com/Sphereon-Opensource/SSI-SDK/commit/386efc71b18195004773fc74eb51b62cd3f5dd76)) - +- Update ion deps to remove problematic did-key p384 from transmute which depended on webcypto-asl which is not compatible with node >=14. ([386efc7](https://github.com/Sphereon-Opensource/SSI-SDK/commit/386efc71b18195004773fc74eb51b62cd3f5dd76)) ### Features -* add Microsoft Request Service API support ([251ed60](https://github.com/Sphereon-Opensource/SSI-SDK/commit/251ed60ebd6984d5fe494a764d8cd662dd0eba6d)) - +- add Microsoft Request Service API support ([251ed60](https://github.com/Sphereon-Opensource/SSI-SDK/commit/251ed60ebd6984d5fe494a764d8cd662dd0eba6d)) ### Reverts -* Revert "MYC-184 Update main Version change 0.5.1 -> 0.5.2" ([b1b8cc6](https://github.com/Sphereon-Opensource/SSI-SDK/commit/b1b8cc635ebccb07c29465df32c3d352c5798855)) -* Revert "MYC-184 uncommitted changes are added" ([fb4f878](https://github.com/Sphereon-Opensource/SSI-SDK/commit/fb4f878dc1e03b9e390a4f886cccac66841256be)) +- Revert "MYC-184 Update main Version change 0.5.1 -> 0.5.2" ([b1b8cc6](https://github.com/Sphereon-Opensource/SSI-SDK/commit/b1b8cc635ebccb07c29465df32c3d352c5798855)) +- Revert "MYC-184 uncommitted changes are added" ([fb4f878](https://github.com/Sphereon-Opensource/SSI-SDK/commit/fb4f878dc1e03b9e390a4f886cccac66841256be)) diff --git a/packages/ssi-sdk-core/CHANGELOG.md b/packages/ssi-sdk-core/CHANGELOG.md index 68207ea24..23c4ea33e 100644 --- a/packages/ssi-sdk-core/CHANGELOG.md +++ b/packages/ssi-sdk-core/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-core - - - - # [0.6.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-core diff --git a/packages/ssi-sdk-core/package.json b/packages/ssi-sdk-core/package.json index f8b4a9de2..8786a505b 100644 --- a/packages/ssi-sdk-core/package.json +++ b/packages/ssi-sdk-core/package.json @@ -5,23 +5,17 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "tsc" + "build": "tsc --build" }, "dependencies": { - "@scure/base": "^1.0.0-rc1", - "@sphereon/did-auth-siop": "^0.2.12", - "@sphereon/did-uni-client": "^0.4.0", - "@veramo/core": "3.1.2-next.84", - "@veramo/did-manager": "3.1.2-next.84", - "debug": "^4.1.1", - "did-jwt-vc": "^2.1.7", - "events": "^3.3.0", - "z-schema": "^5.0.2" + "@scure/base": "^1.1.1", + "@sphereon/ssi-types": "^0.7.0", + "@veramo/core": "3.1.2-next.84" }, "devDependencies": { "@types/debug": "4.1.7", "did-resolver": "^3.1.5", - "typescript": "4.4.3" + "typescript": "4.6.4" }, "files": [ "dist/**/*", diff --git a/packages/ssi-sdk-core/src/index.ts b/packages/ssi-sdk-core/src/index.ts index 00b1b2e4d..0fe700b97 100644 --- a/packages/ssi-sdk-core/src/index.ts +++ b/packages/ssi-sdk-core/src/index.ts @@ -1,17 +1,13 @@ -export { parseDid, multibaseToHex, hexToMultibase, MultibaseFormat } from './utils' +export { flattenArray, flattenMigrations, parseDid, multibaseToHex, hexToMultibase, MultibaseFormat } from './utils' export { VerifiablePresentationSP, UnsignedPresentationSP, VerifiableCredentialSP, - PresentationSubmission, CredentialProofSP, CredentialStatusSP, W3CVerifiableCredentialSP, W3CVerifiablePresentationSP, - ProofPurpose, UnsignedCredentialSP, - Descriptor, - IParsedDID, - SignatureTypes, + ProofOptions, } from './types' export { SuppliedSigner } from './signers' diff --git a/packages/ssi-sdk-core/src/signers/SuppliedSigner.ts b/packages/ssi-sdk-core/src/signers/SuppliedSigner.ts index d0b92db68..9a9ba2136 100644 --- a/packages/ssi-sdk-core/src/signers/SuppliedSigner.ts +++ b/packages/ssi-sdk-core/src/signers/SuppliedSigner.ts @@ -1,5 +1,3 @@ -import { Signer } from '@sphereon/did-auth-siop/dist/main/types/JWT.types' -import { KeyAlgo } from '@sphereon/did-auth-siop/dist/main/types/SIOP.types' import { IKey, IAgentContext, IKeyManager } from '@veramo/core' export function SuppliedSigner(keyRef: Pick, context: IAgentContext, algorithm: KeyAlgo): Signer { @@ -9,3 +7,16 @@ export function SuppliedSigner(keyRef: Pick, context: IAgentContext return await context.agent.keyManagerSign({ keyRef: keyRef.kid, algorithm, data: input }) } } +export declare type Signer = (data: string | Uint8Array) => Promise + +export declare enum KeyAlgo { + EDDSA = 'EdDSA', + RS256 = 'RS256', + ES256 = 'ES256', + ES256K = 'ES256K', +} +export interface EcdsaSignature { + r: string + s: string + recoveryParam?: number | null +} diff --git a/packages/ssi-sdk-core/src/types/IParsedDid.ts b/packages/ssi-sdk-core/src/types/IParsedDid.ts deleted file mode 100644 index 6ff367015..000000000 --- a/packages/ssi-sdk-core/src/types/IParsedDid.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface IParsedDID { - did: string - didUrl: string - method: string - id: string - path?: string - fragment?: string - query?: string - params?: { - [index: string]: string - } -} diff --git a/packages/ssi-sdk-core/src/types/index.ts b/packages/ssi-sdk-core/src/types/index.ts index b09be0545..61d97c8cf 100644 --- a/packages/ssi-sdk-core/src/types/index.ts +++ b/packages/ssi-sdk-core/src/types/index.ts @@ -1,3 +1,2 @@ export * from './vc-data-models' -export * from './presentation-exchange' -export * from './IParsedDid' +export * from './signatures' diff --git a/packages/ssi-sdk-core/src/types/signatures.ts b/packages/ssi-sdk-core/src/types/signatures.ts index f4f6a1662..9083ff5f6 100644 --- a/packages/ssi-sdk-core/src/types/signatures.ts +++ b/packages/ssi-sdk-core/src/types/signatures.ts @@ -1,10 +1,10 @@ -import { ProofPurpose, SignatureTypes } from './vc-data-models' +import { IProofPurpose, IProofType } from '@sphereon/ssi-types' export interface ProofOptions { /** * The signature type. For instance RsaSignature2018 */ - type?: SignatureTypes | string + type?: IProofType | string /** * Type supports selective disclosure? @@ -24,7 +24,7 @@ export interface ProofOptions { /** * The purpose of this proof, for instance assertionMethod or authentication, see https://www.w3.org/TR/vc-data-model/#proofs-signatures-0 */ - proofPurpose?: ProofPurpose | string + proofPurpose?: IProofPurpose | string /** * The ISO8601 date-time string for creation. You can update the Proof value later in the callback. If not supplied the current date/time will be used diff --git a/packages/ssi-sdk-core/src/types/vc-data-models.ts b/packages/ssi-sdk-core/src/types/vc-data-models.ts index 37df9cac3..e0573777a 100644 --- a/packages/ssi-sdk-core/src/types/vc-data-models.ts +++ b/packages/ssi-sdk-core/src/types/vc-data-models.ts @@ -8,34 +8,12 @@ import { ProofType, CredentialStatus, } from '@veramo/core' -import { PresentationSubmission } from './presentation-exchange' + +import { IProofPurpose, IProofType, PresentationSubmission } from '@sphereon/ssi-types' export type W3CVerifiablePresentationSP = VerifiablePresentation | VerifiablePresentationSP | CompactJWT export type W3CVerifiableCredentialSP = VerifiableCredential | VerifiableCredentialSP | CompactJWT -export enum SignatureTypes { - Ed25519Signature2018 = 'Ed25519Signature2018', - Ed25519Signature2020 = 'Ed25519Signature2020', - EcdsaSecp256k1Signature2019 = 'EcdsaSecp256k1Signature2019', - EcdsaSecp256k1RecoverySignature2020 = 'EcdsaSecp256k1RecoverySignature2020', - JsonWebSignature2020 = 'JsonWebSignature2020', - RsaSignature2018 = 'RsaSignature2018', - GpgSignature2020 = 'GpgSignature2020', - JcsEd25519Signature2020 = 'JcsEd25519Signature2020', - BbsBlsSignatureProof2020 = 'BbsBlsSignatureProof2020', - BbsBlsBoundSignatureProof2020 = 'BbsBlsBoundSignatureProof2020', -} - -export enum ProofPurpose { - verificationMethod = 'verificationMethod', - assertionMethod = 'assertionMethod', - authentication = 'authentication', - keyAgreement = 'keyAgreement', - contractAgreement = 'contactAgreement', - capabilityInvocation = 'capabilityInvocation', - capabilityDelegation = 'capabilityDelegation', -} - export interface CredentialStatusSP extends CredentialStatus { id: string type: string @@ -56,9 +34,9 @@ export interface CredentialStatusSP extends CredentialStatus { }*/ export interface CredentialProofSP extends ProofType { - type: string | SignatureTypes // The proof type + type: string | IProofType // The proof type created: string // The ISO8601 date-time string for creation - proofPurpose: ProofPurpose | string // The specific intent for the proof + proofPurpose: IProofPurpose | string // The specific intent for the proof verificationMethod: string // A set of parameters required to independently verify the proof challenge?: string // A challenge to protect against replay attacks domain?: string // A string restricting the (usage of a) proof to the domain and protects against replay attacks diff --git a/packages/ssi-sdk-core/src/utils/database.ts b/packages/ssi-sdk-core/src/utils/database.ts new file mode 100644 index 000000000..23ece34d0 --- /dev/null +++ b/packages/ssi-sdk-core/src/utils/database.ts @@ -0,0 +1,6 @@ +import { MigrationInterface } from 'typeorm' + +export const flattenArray = (args: { items: Array> }): Array => args.items.flat() + +export const flattenMigrations = (args: { migrations: Array> }): Array => + args.migrations.flat() diff --git a/packages/ssi-sdk-core/src/utils/dids.ts b/packages/ssi-sdk-core/src/utils/dids.ts index 41100a027..550abefd1 100644 --- a/packages/ssi-sdk-core/src/utils/dids.ts +++ b/packages/ssi-sdk-core/src/utils/dids.ts @@ -1,4 +1,4 @@ -import { IParsedDID } from '../types' +import { IParsedDID } from '@sphereon/ssi-types' export const parseDid = (did: string): IParsedDID => { const parsedDid = parse(did) diff --git a/packages/ssi-sdk-core/src/utils/index.ts b/packages/ssi-sdk-core/src/utils/index.ts index 8b87ec9c0..df99a20c6 100644 --- a/packages/ssi-sdk-core/src/utils/index.ts +++ b/packages/ssi-sdk-core/src/utils/index.ts @@ -1,2 +1,3 @@ export { hexToMultibase, multibaseToHex, MultibaseFormat } from './encoding' export { parseDid } from './dids' +export { flattenArray, flattenMigrations } from './database' diff --git a/packages/ssi-sdk-core/tsconfig.json b/packages/ssi-sdk-core/tsconfig.json index f3a8aee57..9116c4295 100644 --- a/packages/ssi-sdk-core/tsconfig.json +++ b/packages/ssi-sdk-core/tsconfig.json @@ -3,5 +3,6 @@ "compilerOptions": { "rootDir": "src", "outDir": "dist" - } + }, + "references": [{ "path": "../ssi-types" }] } diff --git a/packages/ssi-types/CHANGELOG.md b/packages/ssi-types/CHANGELOG.md new file mode 100644 index 000000000..23c4ea33e --- /dev/null +++ b/packages/ssi-types/CHANGELOG.md @@ -0,0 +1,49 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [0.7.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.6.0...v0.7.0) (2022-08-05) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +# [0.6.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.5.1...v0.6.0) (2022-07-01) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +# [0.5.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.4.0...v0.5.0) (2022-02-23) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +# [0.4.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.4...v0.4.0) (2022-02-11) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +## [0.3.4](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.3...v0.3.4) (2022-02-11) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +## [0.3.1](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.0...v0.3.1) (2022-01-28) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +# [0.3.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.2.0...v0.3.0) (2022-01-16) + +**Note:** Version bump only for package @sphereon/ssi-sdk-core + +# [0.2.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.1.0...v0.2.0) (2021-12-16) + +### Bug Fixes + +- Multibase encoding didn't include the prefix char ([1be44b7](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/1be44b7f281b82370a59a321f25057bee34d58de)) + +### Features + +- Add JSON-LD Credential and Presentation handling/sign support that is compatible with React-Native ([995f55e](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/995f55efd5237e3fbd76e6569e09ee3bbcbb686c)) + +# 0.1.0 (2021-11-26) + +### Features + +- Add ssi-sdk core module ([42a5b65](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/42a5b65fa3795284fc16b06d2a36c4bf4ea87668)) +- Add workspace/lerna files and structures ([2c2b112](https://github.com/Sphereon-OpenSource/ssi-sdk/commit/2c2b11244c2e5e3d2d1b1db76af3d86ec300bc72)) diff --git a/packages/ssi-types/LICENSE b/packages/ssi-types/LICENSE new file mode 100644 index 000000000..ef0dcdac2 --- /dev/null +++ b/packages/ssi-types/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this fragment. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2021] [Sphereon BV] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/ssi-types/README.md b/packages/ssi-types/README.md new file mode 100644 index 000000000..3bf8c5fb4 --- /dev/null +++ b/packages/ssi-types/README.md @@ -0,0 +1,49 @@ + +

+
+ Sphereon +
SSI Common Types (Typescript) +
+

+ +--- + +**Warning: This package still is in very early development. Breaking changes without notice will happen at this point!** + +--- + +# ssi-types + +Common SSI types + +### Installation + +```shell +yarn add @sphereon/ssi-types +``` + +### Build + +```shell +yarn build +``` + +### Test + +The test command runs: + +- `prettier` +- `jest` +- `coverage` + +You can also run only a single section of these tests, using for example `yarn test:unit`. + +```shell +yarn test +``` + +### Utility scripts + +There are other utility scripts that help with development. + +- `yarn fix` - runs `eslint --fix` as well as `prettier` to fix code style. diff --git a/packages/ssi-types/api-extractor.json b/packages/ssi-types/api-extractor.json new file mode 100644 index 000000000..94c2c6a9f --- /dev/null +++ b/packages/ssi-types/api-extractor.json @@ -0,0 +1,3 @@ +{ + "extends": "../include/api-extractor-base.json" +} diff --git a/packages/ssi-types/package.json b/packages/ssi-types/package.json new file mode 100644 index 000000000..73e61a1a2 --- /dev/null +++ b/packages/ssi-types/package.json @@ -0,0 +1,27 @@ +{ + "name": "@sphereon/ssi-types", + "description": "SSI Common Types", + "version": "0.7.0", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsc --build" + }, + "devDependencies": { + "typescript": "4.6.4" + }, + "files": [ + "dist/**/*", + "src/**/*", + "plugin.schema.json", + "README.md", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, + "repository": "git@github.com:Sphereon-OpenSource/ssi-sdk.git", + "author": "Sphereon ", + "license": "Apache-2.0", + "keywords": [] +} diff --git a/packages/ssi-types/src/index.ts b/packages/ssi-types/src/index.ts new file mode 100644 index 000000000..c9f6f047d --- /dev/null +++ b/packages/ssi-types/src/index.ts @@ -0,0 +1 @@ +export * from './types' diff --git a/packages/ssi-types/src/types/did.ts b/packages/ssi-types/src/types/did.ts new file mode 100644 index 000000000..0bedb7e84 --- /dev/null +++ b/packages/ssi-types/src/types/did.ts @@ -0,0 +1,35 @@ +export enum IProofPurpose { + verificationMethod = 'verificationMethod', + assertionMethod = 'assertionMethod', + authentication = 'authentication', + keyAgreement = 'keyAgreement', + contractAgreement = 'contactAgreement', + capabilityInvocation = 'capabilityInvocation', + capabilityDelegation = 'capabilityDelegation', +} + +export enum IProofType { + Ed25519Signature2018 = 'Ed25519Signature2018', + Ed25519Signature2020 = 'Ed25519Signature2020', + EcdsaSecp256k1Signature2019 = 'EcdsaSecp256k1Signature2019', + EcdsaSecp256k1RecoverySignature2020 = 'EcdsaSecp256k1RecoverySignature2020', + JsonWebSignature2020 = 'JsonWebSignature2020', + RsaSignature2018 = 'RsaSignature2018', + GpgSignature2020 = 'GpgSignature2020', + JcsEd25519Signature2020 = 'JcsEd25519Signature2020', + BbsBlsSignatureProof2020 = 'BbsBlsSignatureProof2020', + BbsBlsBoundSignatureProof2020 = 'BbsBlsBoundSignatureProof2020', +} + +export interface IParsedDID { + did: string + didUrl: string + method: string + id: string + path?: string + fragment?: string + query?: string + params?: { + [index: string]: string + } +} diff --git a/packages/ssi-types/src/types/index.ts b/packages/ssi-types/src/types/index.ts new file mode 100644 index 000000000..d80f8127b --- /dev/null +++ b/packages/ssi-types/src/types/index.ts @@ -0,0 +1,3 @@ +export * from './did' +export * from './pex' +export * from './vc' diff --git a/packages/ssi-sdk-core/src/types/presentation-exchange.ts b/packages/ssi-types/src/types/pex.ts similarity index 64% rename from packages/ssi-sdk-core/src/types/presentation-exchange.ts rename to packages/ssi-types/src/types/pex.ts index 9d65e1a7a..bd138f570 100644 --- a/packages/ssi-sdk-core/src/types/presentation-exchange.ts +++ b/packages/ssi-types/src/types/pex.ts @@ -1,3 +1,6 @@ +/** + * It express how the inputs presented as proofs to a Verifier. + */ export interface PresentationSubmission { /** * A UUID or some other unique ID to identify this Presentation Submission @@ -13,6 +16,21 @@ export interface PresentationSubmission { descriptor_map: Array } +/** + * Presentation Echange API + * Presentation Exchange API + * + * The version of the OpenAPI document: 1.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * descriptor map laying out the structure of the presentation submission. + */ export interface Descriptor { /** * ID to identify the descriptor from Presentation Definition Input Descriptor it coresponds to. diff --git a/packages/ssi-types/src/types/vc.ts b/packages/ssi-types/src/types/vc.ts new file mode 100644 index 000000000..938eb357c --- /dev/null +++ b/packages/ssi-types/src/types/vc.ts @@ -0,0 +1,145 @@ +import { PresentationSubmission } from './pex' +import { IProofPurpose, IProofType } from './did' + +export interface ICredential { + // If exp is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the expirationDate property of credentialSubject of the new JSON object. + expirationDate?: string + // If iss is present, the value MUST be used to set the issuer property of the new credential JSON object or the holder property of the new presentation JSON object. + issuer: string | IIssuer + // If nbf is present, the UNIX timestamp MUST be converted to an [XMLSCHEMA11-2] date-time, and MUST be used to set the value of the issuanceDate property of the new JSON object. + issuanceDate: string + // If sub is present, the value MUST be used to set the value of the id property of credentialSubject of the new credential JSON object. + credentialSubject: ICredentialSubject + // If jti is present, the value MUST be used to set the value of the id property of the new JSON object. + id: string + '@context': ICredentialContextType[] | ICredentialContextType + credentialStatus?: ICredentialStatus + credentialSchema?: undefined | ICredentialSchemaType | ICredentialSchemaType[] + description?: string + name?: string + type: string[] + + [x: string]: unknown +} + +export interface ICredentialSubject { + id?: string + + [x: string]: unknown +} + +export type ICredentialContextType = ICredentialContext | string + +export interface ICredentialContext { + name?: string + did?: string + [x: string]: unknown +} + +export type ICredentialSchemaType = ICredentialSchema | string + +export interface ICredentialSchema { + id: string + type?: string +} + +export interface IProof { + type: IProofType | string // The proof type + created: string // The ISO8601 date-time string for creation + proofPurpose: IProofPurpose | string // The specific intent for the proof + verificationMethod: string // A set of parameters required to independently verify the proof + challenge?: string // A challenge to protect against replay attacks + domain?: string // A string restricting the (usage of a) proof to the domain and protects against replay attacks + proofValue?: string // One of any number of valid representations of proof values + jws?: string // JWS based proof + nonce?: string // Similar to challenge. A nonce to protect against replay attacks, used in some ZKP proofs + requiredRevealStatements?: string[] // The parts of the proof that must be revealed in a derived proof + + [x: string]: string | string[] | undefined +} + +export interface ICredentialStatus { + id: string + type: string +} + +export interface IIssuer { + id: string + + [x: string]: unknown +} + +export interface IHasProof { + proof: IProof | IProof[] +} + +export type IVerifiableCredential = ICredential & IHasProof + +export interface IPresentation { + '@context': ICredentialContextType | ICredentialContextType[] + type: string[] + verifiableCredential: IVerifiableCredential[] + presentation_submission?: PresentationSubmission + holder?: string +} + +export type IVerifiablePresentation = IPresentation & IHasProof + +export interface WrappedVerifiableCredential { + /** + * Original VC that we've received + */ + original: string | JwtWrappedVerifiableCredential | IVerifiableCredential + /** + * In case of JWT credential it will be the decoded version. In other cases it will be the same as original one + */ + decoded: JwtWrappedVerifiableCredential | IVerifiableCredential + /** + * Type of this credential. Supported types are json-ld and jwt + */ + type: VerifiableDataExchangeType + /** + * created based on https://www.w3.org/TR/vc-data-model/#jwt-decoding + */ + internalCredential: ICredential +} + +export interface WrappedVerifiablePresentation { + original: string | JwtWrappedVerifiablePresentation | IVerifiablePresentation + decoded: JwtWrappedVerifiablePresentation | IVerifiablePresentation + type: VerifiableDataExchangeType + internalPresentation: InternalPresentation + vcs: WrappedVerifiableCredential[] +} + +export enum VerifiableDataExchangeType { + JSONLD, + JWT_ENCODED, + JWT_DECODED, +} + +export interface InternalPresentation { + '@context': ICredentialContextType | ICredentialContextType[] + type: string[] + verifiableCredential: WrappedVerifiableCredential[] + presentation_submission?: PresentationSubmission + holder?: string +} + +export interface JwtWrappedVerifiableCredential { + vc: ICredential + exp: string + iss: string + nbf: string + sub: string + jti: string +} + +export interface JwtWrappedVerifiablePresentation { + vp: IVerifiablePresentation + exp: string + iss: string + nbf: string + sub: string + jti: string +} diff --git a/packages/ssi-types/tsconfig.json b/packages/ssi-types/tsconfig.json new file mode 100644 index 000000000..f3a8aee57 --- /dev/null +++ b/packages/ssi-types/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + } +} diff --git a/packages/tsconfig.json b/packages/tsconfig.json index 98f25d4a3..d69bfd118 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -1,6 +1,7 @@ { "files": [], "references": [ + { "path": "ssi-types" }, { "path": "ssi-sdk-core" }, { "path": "factom-did-provider" }, { "path": "lto-did-provider" }, @@ -14,10 +15,12 @@ { "path": "waci-pex-qr-react" }, { "path": "bls-kms-local" }, { "path": "bls-did-provider-key" }, + { "path": "bls-did-resolver-key" }, { "path": "bls-key-manager" }, { "path": "data-store-common" }, { "path": "connection-manager" }, { "path": "data-store" }, - { "path": "ion-did-provider" } + { "path": "ion-did-provider" }, + { "path": "wellknown-did-verifier" } ] } diff --git a/packages/vc-api-issuer/CHANGELOG.md b/packages/vc-api-issuer/CHANGELOG.md index 35a9417d2..9a591a190 100644 --- a/packages/vc-api-issuer/CHANGELOG.md +++ b/packages/vc-api-issuer/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-issuer - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) ### Bug Fixes diff --git a/packages/vc-api-verifier/CHANGELOG.md b/packages/vc-api-verifier/CHANGELOG.md index c4603a57c..ea3a86f01 100644 --- a/packages/vc-api-verifier/CHANGELOG.md +++ b/packages/vc-api-verifier/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-verifier - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) ### Bug Fixes diff --git a/packages/vc-handler-ld-local/CHANGELOG.md b/packages/vc-handler-ld-local/CHANGELOG.md index 3de6f21af..2daf3aa98 100644 --- a/packages/vc-handler-ld-local/CHANGELOG.md +++ b/packages/vc-handler-ld-local/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-handler-ld-local - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-vc-handler-ld-local diff --git a/packages/vc-handler-ld-local/README.md b/packages/vc-handler-ld-local/README.md index 3aceaa9ed..db28f1dc5 100644 --- a/packages/vc-handler-ld-local/README.md +++ b/packages/vc-handler-ld-local/README.md @@ -49,3 +49,241 @@ yarn test There are other utility scripts that help with development. - `yarn fix` - runs `eslint --fix` as well as `prettier` to fix code style. + +### Agent setup + +```typescript +constructor(connection: Promise) { + const privateKeyStore = new PrivateKeyStore(connection, new SecretBox(KMS_SECRET_KEY)) + this._agent = createAgent< + ICredentialHandlerLDLocal & IDIDManager & IKeyManager & IDataStore & IDataStoreORM & IResolver + >({ + plugins: [ + new BlsKeyManager({ + store: new KeyStore(connection), + kms: { + local: new BlsKeyManagementSystem(privateKeyStore), + }, + }), + new DIDManager({ + store: new DIDStore(connection), + defaultProvider: 'did:key', + providers: { + 'did:key': new BlsKeyDidProvider({ + defaultKms: 'local', + }), + }, + }), + new CredentialIssuer(), + new CredentialHandlerLDLocal({ + contextMaps: [LdDefaultContexts], + suites: [new SphereonEd25519Signature2018(), new SphereonEd25519Signature2020(), new SphereonBbsBlsSignature2020()], + keyStore: privateKeyStore + }), + new DIDResolverPlugin({ + resolver: new Resolver({ + ...keyDidResolver() + }), + }), + ], + }); + } +``` + +- To support BLS+, the @sphereon/ssi-sdk-bls-\* plugins must be used, otherwise only Ed25519 plugins will be supported. + +### Issue Verifiable Credentials using the Veramo agent: + +Ed25519 + +```typescript +agent.createVerifiableCredentialLDLocal({ + credential: { + issuer: 'did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt', + credentialSubject: { + id: 'did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt', + }, + }, +}) +``` + +BBS+ + +```typescript +agent.createVerifiableCredentialLDLocal({ + credential: { + issuer: + 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic', + credentialSubject: { + id: 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic', + }, + '@context': ['https://w3id.org/security/bbs/v1'], + }, + keyRef: + 'ad80e96c1f45ab12acc3064de578a5fe9737cd09459257b8abb56058199ef06ca04455ed3714ec30b9f50c186a7cfcb502d3469ae9458e2d3d1a0bf8a58215b0e23ad9620b9a961d0a0cd5484b8539efdce49d018508addbf099cf63f96bdd5d', +}) +``` + +### Verify a Verifiable Credential using Veramo agent: + +Ed25519 + +```typescript +agent.verifyCredentialLDLocal({ + credential: { + issuer: 'did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt', + credentialSubject: { + id: 'did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt', + }, + '@context': ['https://www.w3.org/2018/credentials/v1'], + type: ['VerifiableCredential'], + issuanceDate: '2022-08-23T13:26:14.712Z', + proof: { + type: 'Ed25519Signature2018', + created: '2022-08-23T13:26:14Z', + verificationMethod: 'did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt', + proofPurpose: 'assertionMethod', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..o9mN0c6Ax-YmAIPz6_kQb2IA_HtKkfFn1H1LFHfexsoznFmIeEL0azh3oo8iYVrAa674dgLSvlHn8Q6iXAi_DA', + }, + }, + fetchRemoteContexts: true, +}) +``` + +BBS+ + +```typescript +agent.verifyCredentialLDLocal({ + credential: { + issuer: + 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic', + credentialSubject: { + id: 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic', + }, + '@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/security/bbs/v1'], + type: ['VerifiableCredential'], + issuanceDate: '2022-08-23T09:59:03.522Z', + proof: { + type: 'BbsBlsSignature2020', + created: '2022-08-23T09:59:03Z', + proofPurpose: 'assertionMethod', + proofValue: + 'uLSsfDEFXea0yybm6i28/TrnDaoUc4hwweLqjwe4dbtvSZk+WlsKIyJoXZa2d8doD7cw8zOe8wTnwvZje4LxlNISsdfT6TWQy2O7toRWWXxqC3L2qrrtc/TY1Pfgu8DvTpMahjH4bv9q+AUR/Mm6Tg==', + verificationMethod: + 'did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic', + }, + }, + fetchRemoteContexts: true, +}) +``` + +### Request examples (Veramo REST API): + +#### Issue Verifiable Credential + +Ed25519: + +```shell +POST http://localhost:7071/api/vdx-ivcs/v1/createVerifiableCredentialLDLocal + +Content-Type: application/json + +{ + "credential": { + "issuer": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "credentialSubject": { + "id": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt" + } + } +} +``` + +BBS+: + +```shell +POST http://localhost:7071/api/vdx-ivcs/v1/createVerifiableCredentialLDLocal + +Content-Type: application/json + +{ + "credential": { + "issuer": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic", + "credentialSubject": { + "id": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + }, + "@context": ["https://w3id.org/security/bbs/v1"] + }, + "keyRef": "ad80e96c1f45ab12acc3064de578a5fe9737cd09459257b8abb56058199ef06ca04455ed3714ec30b9f50c186a7cfcb502d3469ae9458e2d3d1a0bf8a58215b0e23ad9620b9a961d0a0cd5484b8539efdce49d018508addbf099cf63f96bdd5d" +} +``` + +- To generate a BBS+ VCs the [@context]("https://w3id.org/security/bbs/v1") and keyRef (kid) properties are needed + +#### Verify a Verifiable Credential + +Ed25519: + +```shell +POST http://localhost:7071/api/vdx-ivcs/v1/verifyCredentialLDLocal + +Content-Type: application/json +Accept: application/json + +{ + "credential": { + "issuer": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "credentialSubject": { + "id": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt" + }, + "@context": [ + "https://www.w3.org/2018/credentials/v1" + ], + "type": [ + "VerifiableCredential" + ], + "issuanceDate": "2022-08-23T13:26:14.712Z", + "proof": { + "type": "Ed25519Signature2018", + "created": "2022-08-23T13:26:14Z", + "verificationMethod": "did:key:z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt#z6MkkDYR2LLa6tDBXVEuxcU4pqvHggz36oQESE9fc9jK6mAt", + "proofPurpose": "assertionMethod", + "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..o9mN0c6Ax-YmAIPz6_kQb2IA_HtKkfFn1H1LFHfexsoznFmIeEL0azh3oo8iYVrAa674dgLSvlHn8Q6iXAi_DA" + } + }, + "fetchRemoteContexts": true +} +``` + +BBS+ + +```shell +POST http://localhost:7071/api/vdx-ivcs/v1/verifyCredentialLDLocal + +Content-Type: application/json +Accept: application/json + +{ + "credential": { + "issuer": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic", + "credentialSubject": { + "id": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + }, + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/bbs/v1" + ], + "type": [ + "VerifiableCredential" + ], + "issuanceDate": "2022-08-23T09:59:03.522Z", + "proof": { + "type": "BbsBlsSignature2020", + "created": "2022-08-23T09:59:03Z", + "proofPurpose": "assertionMethod", + "proofValue": "uLSsfDEFXea0yybm6i28/TrnDaoUc4hwweLqjwe4dbtvSZk+WlsKIyJoXZa2d8doD7cw8zOe8wTnwvZje4LxlNISsdfT6TWQy2O7toRWWXxqC3L2qrrtc/TY1Pfgu8DvTpMahjH4bv9q+AUR/Mm6Tg==", + "verificationMethod": "did:key:zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic#zUC7Gc59EawPuAbe1gcbmpTtYeyRvRLUsCfkmHwmNaiQyQtQp9f4G4KHurpHaa6QUvm1mL1rZvKXQWpfRcTBfLsstL2kmMN3rkFSzYuzbxwD4LespdY8NKdsghxeiRNtNSbzKic" + } + }, + "fetchRemoteContexts": true +} +``` diff --git a/packages/waci-pex-qr-react/CHANGELOG.md b/packages/waci-pex-qr-react/CHANGELOG.md index d33c87bda..9a320860b 100644 --- a/packages/waci-pex-qr-react/CHANGELOG.md +++ b/packages/waci-pex-qr-react/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-waci-pex-qr-react - - - - # [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) **Note:** Version bump only for package @sphereon/ssi-sdk-waci-pex-qr-react diff --git a/packages/wellknown-did-issuer/CHANGELOG.md b/packages/wellknown-did-issuer/CHANGELOG.md new file mode 100644 index 000000000..420e6f23d --- /dev/null +++ b/packages/wellknown-did-issuer/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log diff --git a/packages/wellknown-did-issuer/LICENSE b/packages/wellknown-did-issuer/LICENSE new file mode 100644 index 000000000..a51495fe7 --- /dev/null +++ b/packages/wellknown-did-issuer/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2022] [Sphereon BV, info@sphereon.com] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/wellknown-did-issuer/README.md b/packages/wellknown-did-issuer/README.md new file mode 100644 index 000000000..071d37c2b --- /dev/null +++ b/packages/wellknown-did-issuer/README.md @@ -0,0 +1,159 @@ + +

+
+ Sphereon +
Well-Known DID Issuer (Typescript) +
+

+ +--- + +**Warning: This package still is in very early development. Breaking changes without notice will happen at this point!** + +--- + +A `Sphereon SSI-SDK` plugin to create DID configuration resources and domain linkage credentials conforming to the DIF [spec for well-known DID Configurations](https://identity.foundation/.well-known/resources/did-configuration/). It is written in Typescript and can be compiled to any target JavaScript version. + +## Available functions + +- addLinkedDomainsService +- getDidConfigurationResource +- issueDidConfigurationResource +- issueDomainLinkageCredential +- registerCredentialIssuance +- removeCredentialIssuance +- saveDidConfigurationResource + +## Usage + +### Adding the plugin to an agent: + +```typescript +import { IWellKnownDidIssuer, WellKnownDidIssuer } from '@sphereon/ssi-sdk-wellknown-did-issuer' + +const agent = createAgent({ + plugins: [ + new WellKnownDidIssuer({ + credentialIssuances: { issueVc: () => Promise.resolve({ ...vc }) }, + }), + ], +}) +``` + +### Register credential issuance callback: + +Registers a callback function. + +```typescript +agent + .registerCredentialIssuance({ + callbackName: 'example_key', + credentialIssuance: () => Promise.resolve({ ...vc }), + }) + .then(() => console.log('success')) + .catch(() => console.log('failed')) +``` + +### Remove credential issuance callback: + +Removes a registered callback function. + +```typescript +agent + .removeCredentialIssuance({ callbackName: 'example_key' }) + .then(() => console.log('success')) + .catch(() => console.log('failed')) +``` + +### Issue DID configuration resource: + +Issues a DID configuration resource. Can optionally save it to a database using the `save` flag. + +```typescript +agent + .issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + }, + ], + credentialIssuance: 'example_key', + save: true, + }) + .then((result: IDidConfiguration) => console.log(result)) + .catch(() => console.log('failed')) +``` + +### Get DID configuration resource: + +Get a DID configuration resource from the database. + +```typescript +agent + .getDidConfigurationResource({ + origin: 'https://example.com', + }) + .then((result: IDidConfiguration) => console.log(result)) + .catch(() => console.log('failed')) +``` + +### Save DID configuration resource: + +Saves a DID configuration resource to a database. + +```typescript +agent + .saveDidConfigurationResource({ + origin: 'https://example.com', + didConfiguration, + }) + .then((result: IResourceValidation) => console.log(result.status)) +``` + +### Issue domain linkage credential: + +Issues a domain linkage credential. Can optionally save it to a database using the `save` flag. + +```typescript +agent + .issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'example_key', + save: true, + }) + .then((result: IResourceValidation) => console.log(result.status)) +``` + +### Add linked domains service: + +Adds a LinkedDomains service to a DID. + +```typescript +agent + .addLinkedDomainsService({ + did: 'did:key:example', + origin: 'https://example.com', + servideId: 'linkedDomains1', + }) + .then((result: IResourceValidation) => console.log(result.status)) +``` + +## Installation + +```shell +yarn add @sphereon/ssi-sdk-wellknown-did-issuer +``` + +## Build + +```shell +yarn build +``` diff --git a/packages/wellknown-did-issuer/__tests__/localAgent.test.ts b/packages/wellknown-did-issuer/__tests__/localAgent.test.ts new file mode 100644 index 000000000..981e411d9 --- /dev/null +++ b/packages/wellknown-did-issuer/__tests__/localAgent.test.ts @@ -0,0 +1,88 @@ +import { getConfig } from '@veramo/cli/build/setup' +import { createObjects } from '@veramo/cli/build/lib/objectCreator' +import { Connection } from 'typeorm' +import wellKnownDidIssuerAgentLogic from './shared/wellKnownDidIssuerAgentLogic' + +jest.setTimeout(30000) + +let agent: any +let dbConnection: Promise + +const setup = async (): Promise => { + const config = getConfig('packages/wellknown-did-issuer/agent.yml') + const { localAgent, db } = createObjects(config, { localAgent: '/agent', db: '/dbConnection' }) + dbConnection = db + + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const ORIGIN = 'https://example.com' + const COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL = + 'eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNI3o2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSJ9.eyJleHAiOjE3NjQ4NzkxMzksImlzcyI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNIiwibmJmIjoxNjA3MTEyNzM5LCJzdWIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9pZGVudGl0eS5mb3VuZGF0aW9uLy53ZWxsLWtub3duL2RpZC1jb25maWd1cmF0aW9uL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rb1RIc2dOTnJieThKekNOUTFpUkx5VzVRUTZSOFh1dTZBQThpZ0dyTVZQVU0iLCJvcmlnaW4iOiJpZGVudGl0eS5mb3VuZGF0aW9uIn0sImV4cGlyYXRpb25EYXRlIjoiMjAyNS0xMi0wNFQxNDoxMjoxOS0wNjowMCIsImlzc3VhbmNlRGF0ZSI6IjIwMjAtMTItMDRUMTQ6MTI6MTktMDY6MDAiLCJpc3N1ZXIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJEb21haW5MaW5rYWdlQ3JlZGVudGlhbCJdfX0.aUFNReA4R5rcX_oYm3sPXqWtso_gjPHnWZsB6pWcGv6m3K8-4JIAvFov3ZTM8HxPOrOL17Qf4vBFdY9oK0HeCQ' + const JSON_LD_DOMAIN_LINKAGE_CREDENTIAL = { + '@context': ['https://www.w3.org/2018/credentials/v1', 'https://identity.foundation/.well-known/did-configuration/v1'], + issuer: DID, + issuanceDate: '2020-12-04T14:08:28-06:00', + expirationDate: '2025-12-04T14:08:28-06:00', + type: ['VerifiableCredential', 'DomainLinkageCredential'], + credentialSubject: { + id: DID, + origin: ORIGIN, + }, + proof: { + type: 'Ed25519Signature2018', + created: '2020-12-04T20:08:28.540Z', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..D0eDhglCMEjxDV9f_SNxsuU-r3ZB9GR4vaM9TYbyV7yzs1WfdUyYO8rFZdedHbwQafYy8YOpJ1iJlkSmB4JaDQ', + proofPurpose: 'assertionMethod', + verificationMethod: `${DID}#z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM`, + }, + } + + await localAgent.registerCredentialIssuance( + { + callbackName: 'issueJwt', + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }, + null + ) + + await localAgent.registerCredentialIssuance( + { + callbackName: 'issueJsonld', + credentialIssuance: () => Promise.resolve(JSON_LD_DOMAIN_LINKAGE_CREDENTIAL), + }, + null + ) + + localAgent.didManagerGet = jest.fn().mockReturnValue( + Promise.resolve({ + did: DID, + services: [ + { + id: DID, + type: 'LinkedDomains', + serviceEndpoint: ORIGIN, + }, + ], + }) + ) + + agent = localAgent + + return true +} + +const tearDown = async (): Promise => { + await (await dbConnection).close() + return true +} + +const getAgent = () => agent +const testContext = { + getAgent, + setup, + tearDown, + isRestTest: false, +} + +describe('Local integration tests', () => { + wellKnownDidIssuerAgentLogic(testContext) +}) diff --git a/packages/wellknown-did-issuer/__tests__/restAgent.test.ts b/packages/wellknown-did-issuer/__tests__/restAgent.test.ts new file mode 100644 index 000000000..55f96c7d2 --- /dev/null +++ b/packages/wellknown-did-issuer/__tests__/restAgent.test.ts @@ -0,0 +1,126 @@ +import 'cross-fetch/polyfill' +// @ts-ignore +import express from 'express' +import { Server } from 'http' +import { Connection } from 'typeorm' +import { IAgent, createAgent, IAgentOptions } from '@veramo/core' +import { AgentRestClient } from '@veramo/remote-client' +import { AgentRouter, RequestWithAgentRouter } from '@veramo/remote-server' +import { getConfig } from '@veramo/cli/build/setup' +import { createObjects } from '@veramo/cli/build/lib/objectCreator' +import { IWellKnownDidIssuer } from '../src/types/IWellKnownDidIssuer' +import wellKnownDidIssuerAgentLogic from './shared/wellKnownDidIssuerAgentLogic' + +jest.setTimeout(30000) + +const port = 3002 +const basePath = '/agent' + +let serverAgent: IAgent +let restServer: Server +let dbConnection: Promise + +const getAgent = (options?: IAgentOptions) => + createAgent({ + ...options, + plugins: [ + new AgentRestClient({ + url: 'http://localhost:' + port + basePath, + enabledMethods: serverAgent.availableMethods(), + schema: serverAgent.getSchema(), + }), + ], + }) + +const setup = async (): Promise => { + const config = getConfig('packages/wellknown-did-issuer/agent.yml') + const { agent, db } = createObjects(config, { agent: '/agent', db: '/dbConnection' }) + dbConnection = db + + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const ORIGIN = 'https://example.com' + const COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL = + 'eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNI3o2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSJ9.eyJleHAiOjE3NjQ4NzkxMzksImlzcyI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNIiwibmJmIjoxNjA3MTEyNzM5LCJzdWIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9pZGVudGl0eS5mb3VuZGF0aW9uLy53ZWxsLWtub3duL2RpZC1jb25maWd1cmF0aW9uL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rb1RIc2dOTnJieThKekNOUTFpUkx5VzVRUTZSOFh1dTZBQThpZ0dyTVZQVU0iLCJvcmlnaW4iOiJpZGVudGl0eS5mb3VuZGF0aW9uIn0sImV4cGlyYXRpb25EYXRlIjoiMjAyNS0xMi0wNFQxNDoxMjoxOS0wNjowMCIsImlzc3VhbmNlRGF0ZSI6IjIwMjAtMTItMDRUMTQ6MTI6MTktMDY6MDAiLCJpc3N1ZXIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJEb21haW5MaW5rYWdlQ3JlZGVudGlhbCJdfX0.aUFNReA4R5rcX_oYm3sPXqWtso_gjPHnWZsB6pWcGv6m3K8-4JIAvFov3ZTM8HxPOrOL17Qf4vBFdY9oK0HeCQ' + const JSON_LD_DOMAIN_LINKAGE_CREDENTIAL = { + '@context': ['https://www.w3.org/2018/credentials/v1', 'https://identity.foundation/.well-known/did-configuration/v1'], + issuer: DID, + issuanceDate: '2020-12-04T14:08:28-06:00', + expirationDate: '2025-12-04T14:08:28-06:00', + type: ['VerifiableCredential', 'DomainLinkageCredential'], + credentialSubject: { + id: DID, + origin: ORIGIN, + }, + proof: { + type: 'Ed25519Signature2018', + created: '2020-12-04T20:08:28.540Z', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..D0eDhglCMEjxDV9f_SNxsuU-r3ZB9GR4vaM9TYbyV7yzs1WfdUyYO8rFZdedHbwQafYy8YOpJ1iJlkSmB4JaDQ', + proofPurpose: 'assertionMethod', + verificationMethod: `${DID}#z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM`, + }, + } + + await agent.registerCredentialIssuance( + { + callbackName: 'issueJwt', + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }, + null + ) + + await agent.registerCredentialIssuance( + { + callbackName: 'issueJsonld', + credentialIssuance: () => Promise.resolve(JSON_LD_DOMAIN_LINKAGE_CREDENTIAL), + }, + null + ) + + agent.didManagerGet = jest.fn().mockReturnValue( + Promise.resolve({ + did: 'did:key:abc', + services: [ + { + id: 'did:key:abc', + type: 'LinkedDomains', + serviceEndpoint: 'https://example.com', + }, + ], + }) + ) + + serverAgent = agent + + const agentRouter = AgentRouter({ + exposedMethods: serverAgent.availableMethods(), + }) + + const requestWithAgent = RequestWithAgentRouter({ + agent: serverAgent, + }) + + return new Promise((resolve) => { + const app = express() + app.use(basePath, requestWithAgent, agentRouter) + restServer = app.listen(port, () => { + resolve(true) + }) + }) +} + +const tearDown = async (): Promise => { + await (await dbConnection).close() + restServer.close() + return true +} + +const testContext = { + getAgent, + setup, + tearDown, + isRestTest: true, +} + +describe('REST integration tests', () => { + wellKnownDidIssuerAgentLogic(testContext) +}) diff --git a/packages/wellknown-did-issuer/__tests__/shared/wellKnownDidIssuerAgentLogic.ts b/packages/wellknown-did-issuer/__tests__/shared/wellKnownDidIssuerAgentLogic.ts new file mode 100644 index 000000000..68b5606da --- /dev/null +++ b/packages/wellknown-did-issuer/__tests__/shared/wellKnownDidIssuerAgentLogic.ts @@ -0,0 +1,450 @@ +import { ProofFormatTypesEnum } from '@sphereon/wellknown-dids-client' +import { TAgent, IDIDManager } from '@veramo/core' +import { IWellKnownDidIssuer } from '../../src/types/IWellKnownDidIssuer' + +type ConfiguredAgent = TAgent + +export default (testContext: { + getAgent: () => ConfiguredAgent + setup: () => Promise + tearDown: () => Promise + isRestTest: boolean +}) => { + describe('Well-Known DID Issuer Agent Plugin', () => { + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const ORIGIN = 'https://example.com' + const COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL = + 'eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNI3o2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSJ9.eyJleHAiOjE3NjQ4NzkxMzksImlzcyI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNIiwibmJmIjoxNjA3MTEyNzM5LCJzdWIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9pZGVudGl0eS5mb3VuZGF0aW9uLy53ZWxsLWtub3duL2RpZC1jb25maWd1cmF0aW9uL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rb1RIc2dOTnJieThKekNOUTFpUkx5VzVRUTZSOFh1dTZBQThpZ0dyTVZQVU0iLCJvcmlnaW4iOiJpZGVudGl0eS5mb3VuZGF0aW9uIn0sImV4cGlyYXRpb25EYXRlIjoiMjAyNS0xMi0wNFQxNDoxMjoxOS0wNjowMCIsImlzc3VhbmNlRGF0ZSI6IjIwMjAtMTItMDRUMTQ6MTI6MTktMDY6MDAiLCJpc3N1ZXIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJEb21haW5MaW5rYWdlQ3JlZGVudGlhbCJdfX0.aUFNReA4R5rcX_oYm3sPXqWtso_gjPHnWZsB6pWcGv6m3K8-4JIAvFov3ZTM8HxPOrOL17Qf4vBFdY9oK0HeCQ' + const JSON_LD_DOMAIN_LINKAGE_CREDENTIAL = { + '@context': ['https://www.w3.org/2018/credentials/v1', 'https://identity.foundation/.well-known/did-configuration/v1'], + issuer: DID, + issuanceDate: '2020-12-04T14:08:28-06:00', + expirationDate: '2025-12-04T14:08:28-06:00', + type: ['VerifiableCredential', 'DomainLinkageCredential'], + credentialSubject: { + id: DID, + origin: ORIGIN, + }, + proof: { + type: 'Ed25519Signature2018', + created: '2020-12-04T20:08:28.540Z', + jws: 'eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..D0eDhglCMEjxDV9f_SNxsuU-r3ZB9GR4vaM9TYbyV7yzs1WfdUyYO8rFZdedHbwQafYy8YOpJ1iJlkSmB4JaDQ', + proofPurpose: 'assertionMethod', + verificationMethod: `${DID}#z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM`, + }, + } + + let agent: ConfiguredAgent + + beforeAll(async () => { + await testContext.setup() + agent = testContext.getAgent() + }) + + afterAll(testContext.tearDown) + + it('should issue DID configuration resource with JWT VC and callback name', async () => { + const result = await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + }, + ], + credentialIssuance: 'issueJwt', + }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(1) + }) + + it('should issue DID configuration resource with JSONLD VC and callback name', async () => { + const result = await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + }, + ], + credentialIssuance: 'issueJsonld', + }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(1) + }) + + it('should save and retrieve DID configuration resource from DB', async () => { + await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + }, + ], + credentialIssuance: 'issueJwt', + save: true, + }) + + const result = await agent.getDidConfigurationResource({ origin: ORIGIN }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(1) + expect(result.linked_dids[0]).toEqual(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL) + }) + + it('should throw error when DID configuration resource cannot be found', async () => { + const ORIGIN = 'https://unknown.com' + + await expect(agent.getDidConfigurationResource({ origin: ORIGIN })).rejects.toThrow(`No DID configuration resource found for origin: ${ORIGIN}`) + }) + + it('should issue DID configuration resource with JWT and JSONLD VCs', async () => { + const result = await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: 'issueJsonld', + }, + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }, + ], + }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(2) + }) + + it('should throw error when not all issuances have the same origin', async () => { + await expect( + agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: 'issueJsonld', + }, + { + did: DID, + origin: 'https://other.com', + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }, + ], + }) + ).rejects.toThrow('All credentials should be issued for the same origin') + }) + + it('should throw error if credential issuance callbackName is not found when issueing DID configuration resource', async () => { + const CALLBACK_NAME = 'unknown' + await expect( + agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: CALLBACK_NAME, + }, + ], + }) + ).rejects.toThrow(`Credential issuance not found for callbackName: ${CALLBACK_NAME}`) + }) + + it('should issue domain linkage JWT VC with callback name', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + + expect(result).not.toBeNull() + }) + + it('should save domain linkage JWT VC to DB', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + save: true, + }) + + expect(result).not.toBeNull() + }) + + it('should save domain linkage JSONLD VC to DB', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: 'issueJsonld', + save: true, + }) + + expect(result).not.toBeNull() + }) + + it('should issue domain linkage JSONLD VC with callback name', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: 'issueJsonld', + }) + + expect(result).not.toBeNull() + expect(result.proof).not.toBeNull() + }) + + it('should throw error if credential issuance callbackName is not found when issueing domain linkage credential', async () => { + const CALLBACK_NAME = 'unknown' + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: CALLBACK_NAME, + }) + ).rejects.toThrow(`Credential issuance not found for callbackName: ${CALLBACK_NAME}`) + }) + + it('should throw error when issueing domain linkage VC with invalid url origin', async () => { + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: 'invalid_origin', + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + ).rejects.toThrow('Invalid URL') + }) + + it('should throw error when issueing domain linkage VC with invalid origin', async () => { + const ORIGIN = 'https://example.com/other' + + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + ).rejects.toThrow(`Origin ${ORIGIN} is not valid`) + }) + + it('should throw error when issueing domain linkage VC with insecure origin', async () => { + const ORIGIN = 'http://example.com' + + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + ).rejects.toThrow(`Origin ${ORIGIN} is not a https URL`) + }) + + it('should throw error when issueing domain linkage VC with invalid issuance date', async () => { + const ISSUANCE_DATE = 'invalid_date' + + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: ISSUANCE_DATE, + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + ).rejects.toThrow(`IssuanceDate ${ISSUANCE_DATE} is not a valid date`) + }) + + it('should throw error when issueing domain linkage VC with invalid expiration date', async () => { + const EXPIRATION_DATE = 'invalid_date' + + await expect( + agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: EXPIRATION_DATE, + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: 'issueJwt', + }) + ).rejects.toThrow(`ExpirationDate ${EXPIRATION_DATE} is not a valid date`) + }) + + it('should throw error when adding service with invalid url origin', async () => { + await expect( + agent.addLinkedDomainsService({ + did: DID, + origin: 'invalid_origin', + }) + ).rejects.toThrow('Invalid URL') + }) + + it('should throw error when adding service with invalid origin', async () => { + const ORIGIN = 'http://example.com/other' + + await expect( + agent.addLinkedDomainsService({ + did: DID, + origin: ORIGIN, + }) + ).rejects.toThrow(`Origin ${ORIGIN} is not valid`) + }) + + it('should throw error when adding service with insecure origin', async () => { + const ORIGIN = 'http://example.com' + + await expect( + agent.addLinkedDomainsService({ + did: DID, + origin: ORIGIN, + }) + ).rejects.toThrow(`Origin ${ORIGIN} is not a https URL`) + }) + + if (!testContext.isRestTest) { + it('should remove credential issuance', async () => { + const CALLBACK_NAME = 'remove' + await agent.registerCredentialIssuance({ + callbackName: CALLBACK_NAME, + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }) + + const result = await agent.removeCredentialIssuance({ callbackName: CALLBACK_NAME }) + + expect(result).toEqual(true) + }) + + it('should register credential issuance', async () => { + const CALLBACK_NAME = 'new' + await agent.registerCredentialIssuance({ + callbackName: CALLBACK_NAME, + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }) + + await expect( + agent.registerCredentialIssuance({ + callbackName: CALLBACK_NAME, + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }) + ).rejects.toThrow(`Credential issuance with callbackName: ${CALLBACK_NAME} already present`) + }) + + it('should issue DID configuration resource with JWT VC and callback', async () => { + const result = await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + }, + ], + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(1) + }) + + it('should issue DID configuration resource with JSONLD VC and callback', async () => { + const result = await agent.issueDidConfigurationResource({ + issuances: [ + { + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + }, + ], + credentialIssuance: () => Promise.resolve(JSON_LD_DOMAIN_LINKAGE_CREDENTIAL), + }) + + expect(result).not.toBeNull() + expect(result.linked_dids).not.toBeNull() + expect(result.linked_dids.length).toEqual(1) + }) + + it('should issue domain linkage JWT VC with callback', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_WEB_TOKEN }, + credentialIssuance: () => Promise.resolve(COMPACT_JWT_DOMAIN_LINKAGE_CREDENTIAL), + }) + + expect(result).not.toBeNull() + }) + + it('should issue domain linkage JSONLD VC with callback', async () => { + const result = await agent.issueDomainLinkageCredential({ + did: DID, + origin: ORIGIN, + issuanceDate: new Date().toISOString(), + expirationDate: new Date().toISOString(), + options: { proofFormat: ProofFormatTypesEnum.JSON_LD }, + credentialIssuance: () => Promise.resolve(JSON_LD_DOMAIN_LINKAGE_CREDENTIAL), + }) + + expect(result).not.toBeNull() + expect(result.proof).not.toBeNull() + }) + } + }) +} diff --git a/packages/wellknown-did-issuer/agent.yml b/packages/wellknown-did-issuer/agent.yml new file mode 100644 index 000000000..345468994 --- /dev/null +++ b/packages/wellknown-did-issuer/agent.yml @@ -0,0 +1,110 @@ +version: 3.0 + +constants: + baseUrl: http://localhost:3335 + port: 3335 + methods: + - addLinkedDomainsService + - getDidConfigurationResource + - issueDidConfigurationResource + - issueDomainLinkageCredential + - registerCredentialIssuance + - removeCredentialIssuance + - saveDidConfigurationResource + +dbConnection: + $require: typeorm?t=function#createConnection + $args: + - type: sqlite + database: ':memory:' + synchronize: false + migrationsRun: true + migrations: + $require: './packages/ssi-sdk-core/dist?t=function#flattenMigrations' + $args: + - migrations: + - $require: '@veramo/data-store?t=object#migrations' + - $require: './packages/wellknown-did-issuer/dist?t=object#WellknownDidIssuerMigrations' + entities: + $require: './packages/ssi-sdk-core/dist?t=function#flattenArray' + $args: + - items: + - $require: '@veramo/data-store?t=object#Entities' + - $require: './packages/wellknown-did-issuer/dist?t=object#WellknownDidIssuerEntities' + +server: + baseUrl: + $ref: /constants/baseUrl + port: + $ref: /constants/port + use: + # CORS + - - $require: 'cors' + + # Add agent to the request object + - - $require: '@veramo/remote-server?t=function#RequestWithAgentRouter' + $args: + - agent: + $ref: /agent + + # API base path + - - /agent + - $require: '@veramo/remote-server?t=function#apiKeyAuth' + $args: + # Please configure your own API key. This is used when executing agent methods through ${baseUrl}/agent or ${baseUrl}/api-docs + - apiKey: test123 + - $require: '@veramo/remote-server?t=function#AgentRouter' + $args: + - exposedMethods: + $ref: /constants/methods + + # Open API schema + - - /open-api.json + - $require: '@veramo/remote-server?t=function#ApiSchemaRouter' + $args: + - basePath: :3335/agent + securityScheme: bearer + apiName: Agent + apiVersion: '1.0.0' + exposedMethods: + $ref: /constants/methods + + # Swagger docs + - - /api-docs + - $require: swagger-ui-express?t=object#serve + - $require: swagger-ui-express?t=function#setup + $args: + - null + - swaggerOptions: + url: '/open-api.json' + + # Execute during server initialization + init: + - $require: '@veramo/remote-server?t=function#createDefaultDid' + $args: + - agent: + $ref: /agent + baseUrl: + $ref: /constants/baseUrl + messagingServiceEndpoint: /messaging + +# DID Manager +didManager: + $require: '@veramo/did-manager#DIDManager' + $args: + - store: + $require: '@veramo/data-store#DIDStore' + +# Agent +agent: + $require: '@veramo/core#Agent' + $args: + - schemaValidation: false + plugins: + - $ref: /didManager + - $require: '@veramo/data-store#DataStore' + $args: + - $ref: /dbConnection + - $require: ./packages/wellknown-did-issuer/dist#WellKnownDidIssuer + $args: + - $ref: /dbConnection diff --git a/packages/wellknown-did-issuer/api-extractor.json b/packages/wellknown-did-issuer/api-extractor.json new file mode 100644 index 000000000..94c2c6a9f --- /dev/null +++ b/packages/wellknown-did-issuer/api-extractor.json @@ -0,0 +1,3 @@ +{ + "extends": "../include/api-extractor-base.json" +} diff --git a/packages/wellknown-did-issuer/package.json b/packages/wellknown-did-issuer/package.json new file mode 100644 index 000000000..1b1f93ab3 --- /dev/null +++ b/packages/wellknown-did-issuer/package.json @@ -0,0 +1,48 @@ +{ + "name": "@sphereon/ssi-sdk-wellknown-did-issuer", + "version": "0.7.0", + "source": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "veramo": { + "pluginInterfaces": { + "IWellknownDidIssuer": "./src/types/IWellKnownDidIssuer.ts" + } + }, + "scripts": { + "build": "tsc --build" + }, + "dependencies": { + "@sphereon/wellknown-dids-client": "^0.1.1", + "did-jwt-vc": "^2.1.9", + "typeorm": "0.2.45", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@veramo/cli": "3.1.2-next.84", + "did-resolver": "^4.0.0", + "nock": "^13.2.9", + "typescript": "4.6.4" + }, + "files": [ + "dist/**/*", + "src/**/*", + "README.md", + "plugin.schema.json", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, + "repository": "git@github.com:Sphereon-Opensource/SSI-SDK.git", + "author": "Sphereon ", + "license": "Apache-2.0", + "keywords": [ + "DID", + "Domain Linkage", + "DID Configuration Resource", + "Issuer", + "Well-Known DIDs", + "Verifiable Credential" + ] +} diff --git a/packages/wellknown-did-issuer/plugin.schema.json b/packages/wellknown-did-issuer/plugin.schema.json new file mode 100644 index 000000000..8e78be3da --- /dev/null +++ b/packages/wellknown-did-issuer/plugin.schema.json @@ -0,0 +1,164 @@ +{ + "IWellKnownDidIssuer": { + "components": { + "schemas": { + "IIssueDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "issuances": { + "type": "array", + "items": { + "type": "object", + "properties": { + "additionalProperties": true + } + } + }, + "credentialIssuance": { + "type": "string" + }, + "save": { + "type": "boolean" + }, + "additionalProperties": false + }, + "required": ["issuances", "credentialIssuance"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } " + }, + "IIssueDomainLinkageCredentialArgs": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "issuanceDate": { + "type": "date" + }, + "expirationDate": { + "type": "date" + }, + "save": { + "type": "boolean" + }, + "options": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "credentialIssuance": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["did", "origin", "expirationDate", "options"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.issueDomainLinkageCredential } " + }, + "IGetDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "origin": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.getDidConfigurationResource } " + }, + "IAddLinkedDomainsServiceArgs": { + "type": "object", + "properties": { + "did": { + "type": "string" + }, + "origin": { + "type": "string" + }, + "serviceId": { + "type": "string" + }, + "additionalProperties": false + }, + "required": ["did", "origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } " + }, + "ISaveDidConfigurationResourceArgs": { + "type": "object", + "properties": { + "origin": { + "type": "string" + }, + "didConfigurationResource": { + "type": "object", + "properties": { + "additionalProperties": true + } + }, + "additionalProperties": false + }, + "required": ["did", "origin"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.saveDidConfigurationResource } " + }, + "IRemoveCredentialIssuanceArgs": { + "type": "object", + "properties": { + "origin": { + "callbackName": "string" + }, + "additionalProperties": false + }, + "required": ["callbackName"], + "description": "Arguments needed for {@link IWellKnownDidIssuer.removeCredentialIssuance } " + } + }, + "methods": { + "addLinkedDomainsService": { + "description": "Adds a LinkedDomains service to the DID", + "arguments": { + "$ref": "#/components/schemas/IAddLinkedDomainsServiceArgs" + } + }, + "getDidConfigurationResource": { + "description": "Retrieves a DID configuration resource from the database", + "arguments": { + "$ref": "#/components/schemas/IGetDidConfigurationResourceArgs" + }, + "returnType": "object" + }, + "issueDidConfigurationResource": { + "description": "Issues a DID configuration resource", + "arguments": { + "$ref": "#/components/schemas/IAddLinkedDomainsServiceArgs" + }, + "returnType": "object" + }, + "issueDomainLinkageCredential": { + "description": "Retrieves a domain linkage credential", + "arguments": { + "$ref": "#/components/schemas/IIssueDomainLinkageCredentialArgs" + }, + "returnType": "object" + }, + "removeCredentialIssuance": { + "description": "Removes a registered callback", + "arguments": { + "$ref": "#/components/schemas/IRemoveCredentialIssuanceArgs" + }, + "returnType": "boolean" + }, + "saveDidConfigurationResource": { + "description": "Saves a DID configuration resource to the database", + "arguments": { + "$ref": "#/components/schemas/ISaveDidConfigurationResourceArgs" + } + } + } + } + } +} diff --git a/packages/wellknown-did-issuer/src/agent/WellKnownDidIssuer.ts b/packages/wellknown-did-issuer/src/agent/WellKnownDidIssuer.ts new file mode 100644 index 000000000..c429788b9 --- /dev/null +++ b/packages/wellknown-did-issuer/src/agent/WellKnownDidIssuer.ts @@ -0,0 +1,240 @@ +import { parseDid } from '@sphereon/ssi-sdk-core' +import { + DomainLinkageCredential, + IDidConfigurationResource, + IssuanceCallback, + ServiceTypesEnum, + WellKnownDidIssuer as Issuer, +} from '@sphereon/wellknown-dids-client' +import { IAgentPlugin, IIdentifier, VerifiableCredential } from '@veramo/core' +import { OrPromise } from '@veramo/utils' +import { normalizeCredential } from 'did-jwt-vc' +import { Service } from 'did-resolver/lib/resolver' +import { Connection } from 'typeorm' +import { v4 as uuidv4 } from 'uuid' +import { DidConfigurationResourceEntity, createCredentialEntity, didConfigurationResourceFrom } from '../entities/DidConfigurationResourceEntity' +import { + IAddLinkedDomainsServiceArgs, + IWellKnownDidIssuer, + IWellKnownDidIssuerOptionsArgs, + IRegisterIssueCredentialArgs, + IRemoveCredentialIssuanceArgs, + RequiredContext, + IIssueDidConfigurationResourceArgs, + IIssueDomainLinkageCredentialArgs, + IGetDidConfigurationResourceArgs, + ISaveDidConfigurationResourceArgs, +} from '../types/IWellKnownDidIssuer' +import { schema } from '../index' + +/** + * {@inheritDoc IWellKnownDidIssuer} + */ +export class WellKnownDidIssuer implements IAgentPlugin { + readonly schema = schema.IWellKnownDidVerifier + readonly methods: IWellKnownDidIssuer = { + addLinkedDomainsService: this.addLinkedDomainsService.bind(this), + getDidConfigurationResource: this.getDidConfigurationResource.bind(this), + issueDidConfigurationResource: this.issueDidConfigurationResource.bind(this), + issueDomainLinkageCredential: this.issueDomainLinkageCredential.bind(this), + registerCredentialIssuance: this.registerCredentialIssuance.bind(this), + removeCredentialIssuance: this.removeCredentialIssuance.bind(this), + saveDidConfigurationResource: this.saveDidConfigurationResource.bind(this), + } + + private readonly credentialIssuances: Record + private readonly didConfigurationResourceRelations = ['linkedDids'] + + constructor(private dbConnection: OrPromise, args?: IWellKnownDidIssuerOptionsArgs) { + this.credentialIssuances = (args && args.credentialIssuances) || {} + } + + /** {@inheritDoc IWellKnownDidIssuer.registerSignatureVerification} */ + private async registerCredentialIssuance(args: IRegisterIssueCredentialArgs, context: RequiredContext): Promise { + if (this.credentialIssuances[args.callbackName] !== undefined) { + return Promise.reject(new Error(`Credential issuance with callbackName: ${args.callbackName} already present`)) + } + + this.credentialIssuances[args.callbackName] = args.credentialIssuance + } + + /** {@inheritDoc IWellKnownDidIssuer.removeSignatureVerification} */ + private async removeCredentialIssuance(args: IRemoveCredentialIssuanceArgs, context: RequiredContext): Promise { + return delete this.credentialIssuances[args.callbackName] + } + + /** {@inheritDoc IWellKnownDidIssuer.issueDidConfigurationResource} */ + private async issueDidConfigurationResource( + args: IIssueDidConfigurationResourceArgs, + context: RequiredContext + ): Promise { + if (!args.issuances.every((issuance: IIssueDomainLinkageCredentialArgs) => issuance.origin === args.issuances[0].origin)) { + return Promise.reject(Error('All credentials should be issued for the same origin')) + } + + // TODO We should combine all origins into one service when we update to Veramo 3.1.6.next-165 or higher, as then we can support multiple origins + const addServices = args.issuances.map((issuance: IIssueDomainLinkageCredentialArgs) => + this.addLinkedDomainsService( + { + did: issuance.did, + origin: issuance.origin, + serviceId: issuance.serviceId, + }, + context + ) + ) + + return Promise.all(addServices).then(async () => + new Issuer() + .issueDidConfigurationResource({ + issuances: await this.mapIssuances(args.issuances), + issueCallback: + typeof args.credentialIssuance === 'string' ? await this.getCredentialIssuance(args.credentialIssuance) : args.credentialIssuance, + }) + .then(async (didConfigurationResource: IDidConfigurationResource) => { + if (args.save) { + // TODO add support for multiple origins when we upgrade Veramo version + await this.saveDidConfigurationResource({ origin: args.issuances[0].origin, didConfigurationResource }, context) + } + return didConfigurationResource + }) + .catch((error: Error) => Promise.reject(Error(`Unable to issue DID configuration resource. Error: ${error.message}`))) + ) + } + + /** {@inheritDoc IWellKnownDidIssuer.saveDidConfigurationResource} */ + public async saveDidConfigurationResource(args: ISaveDidConfigurationResourceArgs, context: RequiredContext): Promise { + const didConfigurationEntity = { + origin: args.origin, + context: args.didConfigurationResource['@context'], + linkedDids: args.didConfigurationResource.linked_dids.map((credential: DomainLinkageCredential) => + createCredentialEntity(this.normalizeCredential(credential)) + ), + } + + await (await this.dbConnection).getRepository(DidConfigurationResourceEntity).save(didConfigurationEntity, { transaction: true }) + } + + /** {@inheritDoc IWellKnownDidIssuer.getDidConfigurationResource} */ + public async getDidConfigurationResource(args: IGetDidConfigurationResourceArgs, context: RequiredContext): Promise { + const result = await (await this.dbConnection).getRepository(DidConfigurationResourceEntity).findOne({ + where: { origin: args.origin }, + relations: this.didConfigurationResourceRelations, + }) + + if (!result) { + return Promise.reject(Error(`No DID configuration resource found for origin: ${args.origin}`)) + } + + return didConfigurationResourceFrom(result) + } + + /** {@inheritDoc IWellKnownDidIssuer.issueDomainLinkageCredential} */ + public async issueDomainLinkageCredential(args: IIssueDomainLinkageCredentialArgs, context: RequiredContext): Promise { + const did: string = parseDid(args.did).did + + if (new URL(args.origin).origin !== args.origin) { + return Promise.reject(Error(`Origin ${args.origin} is not valid`)) + } + + if (new URL(args.origin).protocol !== 'https:') { + return Promise.reject(Error(`Origin ${args.origin} is not a https URL`)) + } + + if (args.issuanceDate && isNaN(Date.parse(args.issuanceDate))) { + return Promise.reject(Error(`IssuanceDate ${args.issuanceDate} is not a valid date`)) + } + + if (isNaN(Date.parse(args.expirationDate))) { + return Promise.reject(Error(`ExpirationDate ${args.expirationDate} is not a valid date`)) + } + + const credentialIssuance: IssuanceCallback = + typeof args.credentialIssuance === 'string' + ? await this.getCredentialIssuance(args.credentialIssuance) + : (args.credentialIssuance as IssuanceCallback) + + return new Issuer() + .issueDomainLinkageCredential({ + did, + origin: args.origin, + issuanceDate: args.issuanceDate, + expirationDate: args.expirationDate, + options: args.options, + issueCallback: credentialIssuance, + }) + .then(async (credential: DomainLinkageCredential) => { + if (args.save) { + await this.saveDomainLinkageCredential(credential, context) + } + return credential + }) + .catch((error: Error) => Promise.reject(Error(`Unable to issue domain linkage credential for DID: ${did}. Error: ${error.message}`))) + } + + /** {@inheritDoc IWellKnownDidIssuer.addLinkedDomainsService} */ + public async addLinkedDomainsService(args: IAddLinkedDomainsServiceArgs, context: RequiredContext): Promise { + const did: string = parseDid(args.did).did + + if (new URL(args.origin).origin !== args.origin) { + return Promise.reject(Error(`Origin ${args.origin} is not valid`)) + } + + if (new URL(args.origin).protocol !== 'https:') { + return Promise.reject(Error(`Origin ${args.origin} is not a https URL`)) + } + + context.agent + .didManagerGet({ did }) + .catch(() => Promise.reject(Error('DID cannot be found'))) + .then(async (identifier: IIdentifier) => { + if ( + !identifier.services || + identifier.services.filter( + // TODO we should also check for the origins in the serviceEndpoint objects when we start supporting multiple origins + (service: Service) => service.type === ServiceTypesEnum.LINKED_DOMAINS && service.serviceEndpoint === args.origin + ).length === 0 + ) { + await context.agent.didManagerAddService({ + did: identifier.did, + service: { + id: args.serviceId || uuidv4(), + type: ServiceTypesEnum.LINKED_DOMAINS, + // TODO We should support a serviceEndpoint object here when we update to Veramo 3.1.6.next-165 or higher, as then we can support multiple origins + serviceEndpoint: args.origin, + }, + }) + } + }) + .catch((error: Error) => Promise.reject(Error(`Unable to add LinkedDomains service to DID: ${args.did}. Error: ${error.message}`))) + } + + private async getCredentialIssuance(callbackName: string): Promise { + if (this.credentialIssuances[callbackName] === undefined) { + return Promise.reject(new Error(`Credential issuance not found for callbackName: ${callbackName}`)) + } + + return this.credentialIssuances[callbackName] + } + + private async saveDomainLinkageCredential(credential: DomainLinkageCredential, context: RequiredContext): Promise { + return context.agent.dataStoreSaveVerifiableCredential({ verifiableCredential: this.normalizeCredential(credential) }) + } + + private normalizeCredential(credential: DomainLinkageCredential): VerifiableCredential { + return typeof credential === 'string' ? normalizeCredential(credential) : credential + } + + private async mapIssuances(issuances: Array): Promise> { + const promises = issuances.map(async (issuance: IIssueDomainLinkageCredentialArgs) => { + return { + ...issuance, + issueCallback: + typeof issuance.credentialIssuance === 'string' + ? await this.getCredentialIssuance(issuance.credentialIssuance) + : issuance.credentialIssuance, + } + }) + return Promise.all(promises) + } +} diff --git a/packages/wellknown-did-issuer/src/entities/DidConfigurationResourceEntity.ts b/packages/wellknown-did-issuer/src/entities/DidConfigurationResourceEntity.ts new file mode 100644 index 000000000..7336c5f32 --- /dev/null +++ b/packages/wellknown-did-issuer/src/entities/DidConfigurationResourceEntity.ts @@ -0,0 +1,91 @@ +import { DomainLinkageCredential, IDidConfigurationResource, ISignedDomainLinkageCredential } from '@sphereon/wellknown-dids-client' +import { VerifiableCredential } from '@veramo/core' +import { Credential, Identifier, Claim } from '@veramo/data-store' +import { asArray, computeEntryHash, extractIssuer } from '@veramo/utils' +import { Entity, Column, PrimaryColumn, CreateDateColumn, UpdateDateColumn, ManyToMany, JoinTable, BaseEntity } from 'typeorm' + +@Entity('DidConfigurationResource') +export class DidConfigurationResourceEntity extends BaseEntity { + @PrimaryColumn({ nullable: false }) + origin!: string + + @Column({ nullable: false }) + context!: string + + // TODO cascade of delete should be true when the VC is only attached to one DID configuration resource + @ManyToMany(() => Credential, (credential: Credential) => credential.hash, { nullable: false, cascade: true, onDelete: 'NO ACTION' }) + @JoinTable({ name: 'DidConfigurationResourceCredentials' }) + linkedDids!: Array + + @CreateDateColumn({ name: 'created_at', nullable: false }) + createdAt!: Date + + @UpdateDateColumn({ name: 'last_updated_at', nullable: false }) + lastUpdatedAt!: Date +} + +export const didConfigurationResourceFrom = (didConfigurationResource: DidConfigurationResourceEntity): IDidConfigurationResource => { + return { + '@context': didConfigurationResource.context, + linked_dids: linkedDidsFrom(didConfigurationResource.linkedDids), + } +} + +const linkedDidsFrom = (credentials: Array): Array => { + return credentials.map((credential: Credential) => + credential?.raw?.proof?.type === 'JwtProof2020' && typeof credential?.raw?.proof?.jwt === 'string' + ? credential.raw.proof.jwt + : (credential.raw as ISignedDomainLinkageCredential) + ) +} + +export const createCredentialEntity = (vci: VerifiableCredential): Credential => { + const vc = vci + const credential = new Credential() + credential.context = asArray(vc['@context']) + credential.type = asArray(vc.type || []) + credential.id = vc.id + + if (vc.issuanceDate) { + credential.issuanceDate = new Date(vc.issuanceDate) + } + + if (vc.expirationDate) { + credential.expirationDate = new Date(vc.expirationDate) + } + + const issuer = new Identifier() + issuer.did = extractIssuer(vc) + credential.issuer = issuer + + if (vc.credentialSubject.id) { + const subject = new Identifier() + subject.did = vc.credentialSubject.id + credential.subject = subject + } + credential.claims = [] + for (const type in vc.credentialSubject) { + if (vc.credentialSubject.hasOwnProperty(type)) { + const value = vc.credentialSubject[type] + + if (type !== 'id') { + const isObj = typeof value === 'function' || (typeof value === 'object' && !!value) + const claim = new Claim() + claim.hash = computeEntryHash(JSON.stringify(vc) + type) + claim.type = type + claim.value = isObj ? JSON.stringify(value) : value + claim.isObj = isObj + claim.issuer = credential.issuer + claim.subject = credential.subject + claim.expirationDate = credential.expirationDate + claim.issuanceDate = credential.issuanceDate + claim.credentialType = credential.type + claim.context = credential.context + credential.claims.push(claim) + } + } + } + + credential.raw = vci + return credential +} diff --git a/packages/wellknown-did-issuer/src/index.ts b/packages/wellknown-did-issuer/src/index.ts new file mode 100644 index 000000000..74fb37bca --- /dev/null +++ b/packages/wellknown-did-issuer/src/index.ts @@ -0,0 +1,11 @@ +import { DidConfigurationResourceEntity } from './entities/DidConfigurationResourceEntity' + +/** + * @public + */ +const schema = require('../plugin.schema.json') +export { schema } +export { WellKnownDidIssuer } from './agent/WellKnownDidIssuer' +export * from './types/IWellKnownDidIssuer' +export const WellknownDidIssuerEntities = [DidConfigurationResourceEntity] +export { WellknownDidIssuerMigrations } from './migrations' diff --git a/packages/wellknown-did-issuer/src/migrations/generic/1-CreateWellknownDidIssuer.ts b/packages/wellknown-did-issuer/src/migrations/generic/1-CreateWellknownDidIssuer.ts new file mode 100644 index 000000000..d0d14c000 --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/generic/1-CreateWellknownDidIssuer.ts @@ -0,0 +1,54 @@ +import { MigrationInterface, QueryRunner } from 'typeorm' +import Debug from 'debug' +import { CreateWellknownDidIssuer1661165115000 } from '../postgres/1661165115000-CreateWellknownDidIssuer' +import { CreateWellknownDidIssuer1661161799000 } from '../sqlite/1661161799000-CreateWellknownDidIssuer' + +const debug = Debug('sphereon:ssi-sdk:migrations') + +export class CreateWellknownDidIssuer1661162010000 implements MigrationInterface { + name = 'CreateWellknownDidIssuer1661162010000' + + public async up(queryRunner: QueryRunner): Promise { + debug('migration: creating mnemonic tables') + const dbType = queryRunner.connection.driver.options.type + if (dbType === 'postgres') { + debug('using postgres migration file') + const mig = new CreateWellknownDidIssuer1661165115000() + const up = await mig.up(queryRunner) + debug('Migration statements executed') + return up + } else if (dbType === 'sqlite' || 'react-native') { + debug('using sqlite/react-native migration file') + const mig = new CreateWellknownDidIssuer1661161799000() + const up = await mig.up(queryRunner) + debug('Migration statements executed') + return up + } else { + return Promise.reject( + "Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now" + ) + } + } + + public async down(queryRunner: QueryRunner): Promise { + debug('reverting mnemonic tables') + const dbType = queryRunner.connection.driver.options.type + if (dbType === 'postgres') { + debug('using postgres migration file') + const mig = new CreateWellknownDidIssuer1661165115000() + const down = await mig.down(queryRunner) + debug('Migration statements executed') + return down + } else if (dbType === 'sqlite' || 'react-native') { + debug('using sqlite/react-native migration file') + const mig = new CreateWellknownDidIssuer1661161799000() + const down = await mig.down(queryRunner) + debug('Migration statements executed') + return down + } else { + return Promise.reject( + "Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now" + ) + } + } +} diff --git a/packages/wellknown-did-issuer/src/migrations/generic/index.ts b/packages/wellknown-did-issuer/src/migrations/generic/index.ts new file mode 100644 index 000000000..ceedc173c --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/generic/index.ts @@ -0,0 +1,10 @@ +import { CreateWellknownDidIssuer1661162010000 } from './1-CreateWellknownDidIssuer' + +/** + * The migrations array that SHOULD be used when initializing a TypeORM database connection. + * + * These ensure the correct creation of tables and the proper migrations of data when tables change between versions. + * + * @public + */ +export const WellknownDidIssuerMigrations = [CreateWellknownDidIssuer1661162010000] diff --git a/packages/wellknown-did-issuer/src/migrations/index.ts b/packages/wellknown-did-issuer/src/migrations/index.ts new file mode 100644 index 000000000..6be4f76c6 --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/index.ts @@ -0,0 +1 @@ +export { WellknownDidIssuerMigrations } from './generic' diff --git a/packages/wellknown-did-issuer/src/migrations/internal-migrations-ormconfig.ts b/packages/wellknown-did-issuer/src/migrations/internal-migrations-ormconfig.ts new file mode 100644 index 000000000..9d3ccc655 --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/internal-migrations-ormconfig.ts @@ -0,0 +1,28 @@ +import { ConnectionOptions } from 'typeorm' +import { WellknownDidIssuerEntities, WellknownDidIssuerMigrations } from '../index' + +/** + * Do Not use these connections in production!. They are only here to create/test migration files! + */ +export default [ + { + type: 'sqlite', + name: 'migration-sqlite', + database: 'migration.sqlite', + migrationsRun: false, + synchronize: false, + logging: ['error', 'info', 'warn', 'log'], + entities: [...WellknownDidIssuerEntities], + migrations: [...WellknownDidIssuerMigrations], + }, + { + type: 'postgres', + name: 'migration-postgres', + database: 'migration-postgres', + migrationsRun: false, + synchronize: false, + logging: ['error', 'info', 'warn', 'log'], + entities: [...WellknownDidIssuerEntities], + migrations: [...WellknownDidIssuerMigrations], + }, +] as ConnectionOptions[] diff --git a/packages/wellknown-did-issuer/src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts b/packages/wellknown-did-issuer/src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts new file mode 100644 index 000000000..4d8761928 --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner } from 'typeorm' + +export class CreateWellknownDidIssuer1661165115000 implements MigrationInterface { + name = 'CreateWellknownDidIssuer1661165115000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "DidConfigurationResource" ("origin" varchar NOT NULL, "context" varchar NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_Origin" PRIMARY KEY ("origin"))` + ) + await queryRunner.query( + `CREATE TABLE "DidConfigurationResourceCredentials" ("didConfigurationResourceOrigin" varchar NOT NULL, "credentialHash" varchar NOT NULL)` + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE "DidConfigurationResource"`) + await queryRunner.query(`DROP TABLE "DidConfigurationResourceCredentials"`) + } +} diff --git a/packages/wellknown-did-issuer/src/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.ts b/packages/wellknown-did-issuer/src/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.ts new file mode 100644 index 000000000..18720fbb9 --- /dev/null +++ b/packages/wellknown-did-issuer/src/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner } from 'typeorm' + +export class CreateWellknownDidIssuer1661161799000 implements MigrationInterface { + name = 'CreateWellknownDidIssuer1661161799000' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "DidConfigurationResource" ("origin" varchar PRIMARY KEY NOT NULL, "context" varchar NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')))` + ) + await queryRunner.query( + `CREATE TABLE "DidConfigurationResourceCredentials" ("didConfigurationResourceOrigin" varchar NOT NULL, "credentialHash" varchar NOT NULL)` + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE "DidConfigurationResource"`) + await queryRunner.query(`DROP TABLE "DidConfigurationResourceCredentials"`) + } +} diff --git a/packages/wellknown-did-issuer/src/types/IWellKnownDidIssuer.ts b/packages/wellknown-did-issuer/src/types/IWellKnownDidIssuer.ts new file mode 100644 index 000000000..0ad8fc50c --- /dev/null +++ b/packages/wellknown-did-issuer/src/types/IWellKnownDidIssuer.ts @@ -0,0 +1,64 @@ +import { + DomainLinkageCredential, + IDidConfigurationResource, + IIssueDomainLinkageCredentialOptions, + IssuanceCallback, +} from '@sphereon/wellknown-dids-client' +import { IAgentContext, IPluginMethodMap, IDIDManager } from '@veramo/core' + +export interface IWellKnownDidIssuer extends IPluginMethodMap { + addLinkedDomainsService(args: IAddLinkedDomainsServiceArgs, context: RequiredContext): Promise + getDidConfigurationResource(args: IGetDidConfigurationResourceArgs, context: RequiredContext): Promise + issueDidConfigurationResource(args: IIssueDidConfigurationResourceArgs, context: RequiredContext): Promise + issueDomainLinkageCredential(args: IIssueDomainLinkageCredentialArgs, context: RequiredContext): Promise + registerCredentialIssuance(args: IRegisterIssueCredentialArgs, context: RequiredContext): Promise + removeCredentialIssuance(args: IRemoveCredentialIssuanceArgs, context: RequiredContext): Promise + saveDidConfigurationResource(args: ISaveDidConfigurationResourceArgs, context: RequiredContext): Promise +} + +export interface IWellKnownDidIssuerOptionsArgs { + credentialIssuances?: Record +} + +export interface IRegisterIssueCredentialArgs { + callbackName: string + credentialIssuance: IssuanceCallback +} + +export interface IRemoveCredentialIssuanceArgs { + callbackName: string +} + +export interface IIssueDidConfigurationResourceArgs { + issuances: Array + credentialIssuance?: string | IssuanceCallback + save?: boolean +} + +export interface IIssueDomainLinkageCredentialArgs { + did: string + origin: string + serviceId?: string + issuanceDate?: string + expirationDate: string + save?: boolean + options: IIssueDomainLinkageCredentialOptions + credentialIssuance?: string | IssuanceCallback +} + +export interface IGetDidConfigurationResourceArgs { + origin: string +} + +export interface IAddLinkedDomainsServiceArgs { + did: string + origin: string + serviceId?: string +} + +export interface ISaveDidConfigurationResourceArgs { + origin: string + didConfigurationResource: IDidConfigurationResource +} + +export type RequiredContext = IAgentContext diff --git a/packages/wellknown-did-issuer/tsconfig.json b/packages/wellknown-did-issuer/tsconfig.json new file mode 100644 index 000000000..22ccbeada --- /dev/null +++ b/packages/wellknown-did-issuer/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "declarationDir": "dist", + "strictPropertyInitialization": false, + "noUnusedLocals": false + }, + "references": [{ "path": "../ssi-sdk-core" }] +} diff --git a/packages/wellknown-did-verifier/CHANGELOG.md b/packages/wellknown-did-verifier/CHANGELOG.md new file mode 100644 index 000000000..420e6f23d --- /dev/null +++ b/packages/wellknown-did-verifier/CHANGELOG.md @@ -0,0 +1 @@ +# Change Log diff --git a/packages/wellknown-did-verifier/LICENSE b/packages/wellknown-did-verifier/LICENSE new file mode 100644 index 000000000..a51495fe7 --- /dev/null +++ b/packages/wellknown-did-verifier/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2022] [Sphereon BV, info@sphereon.com] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/wellknown-did-verifier/README.md b/packages/wellknown-did-verifier/README.md new file mode 100644 index 000000000..ec455f867 --- /dev/null +++ b/packages/wellknown-did-verifier/README.md @@ -0,0 +1,108 @@ + +

+
+ Sphereon +
Well-Known DID Verifier (Typescript) +
+

+ +--- + +**Warning: This package still is in very early development. Breaking changes without notice will happen at this point!** + +--- + +A `Sphereon SSI-SDK` plugin to verify relationships between the controller of an origin and a DID conforming to the DIF [spec for well-known DID Configurations](https://identity.foundation/.well-known/resources/did-configuration/) It is written in Typescript and can be compiled to any target JavaScript version. + +## Available functions + +- registerSignatureValidation +- removeSignatureValidation +- verifyDomainLinkage +- verifyDidConfigurationResource + +## Usage + +### Adding the plugin to an agent: + +```typescript +import { IWellKnownDidVerifier, WellKnownDidVerifier } from '@sphereon/ssi-sdk-wellknown-did-verifier' + +const agent = createAgent({ + plugins: [ + new WellKnownDidVerifier({ + signatureVerifications: { verified: () => Promise.resolve({ verified: true }) }, + onlyVerifyServiceDids: true, + }), + ], +}) +``` + +### Register signature verification callback: + +Registers a callback function to be called within the verification process, to verify the signature of the credentials within the DID configuration resource. + +```typescript +agent + .registerSignatureVerification({ + callbackName: 'example_key', + signatureVerification: () => Promise.resolve({ verified: true }), + }) + .then(() => console.log('success')) + .catch(() => console.log('failed')) +``` + +### Remove signature verification callback: + +Removes a registered callback function. + +```typescript +agent + .removeSignatureVerification({ callbackName: 'example_key' }) + .then(() => console.log('success')) + .catch(() => console.log('failed')) +``` + +### Verify domain linkage: + +Verifies the relationship between the controller of an origin and a given DID. +Option available to only verify the service DID. + +```typescript +agent + .verifyDomainLinkage({ + did: 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM', + signatureVerification: 'verified', + onlyVerifyServiceDids: false, + }) + .then((result: IDomainLinkageValidation) => console.log(result.status)) +``` + +### Verify DID configuration resource: + +Verifies a DID configuration resource and domain linkage credentials it holds. + +You can either pass in a DID configuration resource or fetch it remotely by setting a secure well-known location (origin). +Option available to only verify a given DID. + +```typescript +agent + .verifyDidConfigurationResource({ + signatureVerification: () => Promise.resolve({ verified: true }), + origin: 'https://example.com', + did: 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM#foo', + }) + .then((result: IResourceValidation) => console.log(result.status)) +``` + +## Installation + +```shell +yarn add @sphereon/ssi-sdk-wellknown-did-verifier +``` + +## Build + +```shell +yarn build +``` diff --git a/packages/wellknown-did-verifier/__tests__/localAgent.test.ts b/packages/wellknown-did-verifier/__tests__/localAgent.test.ts new file mode 100644 index 000000000..600e85d7d --- /dev/null +++ b/packages/wellknown-did-verifier/__tests__/localAgent.test.ts @@ -0,0 +1,75 @@ +import { getConfig } from '@veramo/cli/build/setup' +import { createObjects } from '@veramo/cli/build/lib/objectCreator' +import { ServiceTypesEnum } from '@sphereon/wellknown-dids-client' +import wellKnownDidVerifierAgentLogic from './shared/wellKnownDidVerifierAgentLogic' + +jest.setTimeout(30000) + +let agent: any + +const setup = async (): Promise => { + const config = getConfig('packages/wellknown-did-verifier/agent.yml') + const { localAgent } = createObjects(config, { localAgent: '/agent' }) + + await localAgent.registerSignatureVerification( + { + callbackName: 'verified', + signatureVerification: () => Promise.resolve({ verified: true }), + }, + null + ) + + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const ORIGIN = 'https://example.com' + const DOCUMENT = { + '@context': ['https://www.w3.org/ns/did/v1', 'https://identity.foundation/.well-known/did-configuration/v1'], + id: DID, + verificationMethod: [ + { + id: `${DID}#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A`, + type: 'JsonWebKey2020', + controller: DID, + publicKeyJwk: { + kty: 'OKP', + crv: 'Ed25519', + x: 'VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ', + }, + }, + ], + service: [ + { + id: `${DID}#foo`, + type: ServiceTypesEnum.LINKED_DOMAINS, + // TODO add support to test multiple origins, needs Veramo version update + serviceEndpoint: ORIGIN, + }, + { + id: `${DID}#bar`, + type: ServiceTypesEnum.LINKED_DOMAINS, + serviceEndpoint: ORIGIN, + }, + ], + } + + localAgent.resolveDid = jest.fn().mockReturnValue(Promise.resolve({ didDocument: DOCUMENT })) + + agent = localAgent + + return true +} + +const tearDown = async (): Promise => { + return true +} + +const getAgent = () => agent +const testContext = { + getAgent, + setup, + tearDown, + isRestTest: false, +} + +describe('Local integration tests', () => { + wellKnownDidVerifierAgentLogic(testContext) +}) diff --git a/packages/wellknown-did-verifier/__tests__/restAgent.test.ts b/packages/wellknown-did-verifier/__tests__/restAgent.test.ts new file mode 100644 index 000000000..717a0a816 --- /dev/null +++ b/packages/wellknown-did-verifier/__tests__/restAgent.test.ts @@ -0,0 +1,113 @@ +import 'cross-fetch/polyfill' +// @ts-ignore +import express from 'express' +import { Server } from 'http' +import { IAgent, createAgent, IAgentOptions } from '@veramo/core' +import { AgentRestClient } from '@veramo/remote-client' +import { AgentRouter, RequestWithAgentRouter } from '@veramo/remote-server' +import { getConfig } from '@veramo/cli/build/setup' +import { createObjects } from '@veramo/cli/build/lib/objectCreator' +import { IWellKnownDidVerifier } from '../src/types/IWellKnownDidVerifier' +import { ServiceTypesEnum } from '@sphereon/wellknown-dids-client' +import wellKnownDidVerifierAgentLogic from './shared/wellKnownDidVerifierAgentLogic' + +jest.setTimeout(30000) + +const port = 3002 +const basePath = '/agent' + +let serverAgent: IAgent +let restServer: Server + +const getAgent = (options?: IAgentOptions) => + createAgent({ + ...options, + plugins: [ + new AgentRestClient({ + url: 'http://localhost:' + port + basePath, + enabledMethods: serverAgent.availableMethods(), + schema: serverAgent.getSchema(), + }), + ], + }) + +const setup = async (): Promise => { + const config = getConfig('packages/wellknown-did-verifier/agent.yml') + const { agent } = createObjects(config, { agent: '/agent' }) + + await agent.registerSignatureVerification( + { + callbackName: 'verified', + signatureVerification: () => Promise.resolve({ verified: true }), + }, + null + ) + + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const ORIGIN = 'https://example.com' + const DOCUMENT = { + '@context': ['https://www.w3.org/ns/did/v1', 'https://identity.foundation/.well-known/did-configuration/v1'], + id: DID, + verificationMethod: [ + { + id: `${DID}#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A`, + type: 'JsonWebKey2020', + controller: DID, + publicKeyJwk: { + kty: 'OKP', + crv: 'Ed25519', + x: 'VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ', + }, + }, + ], + service: [ + { + id: `${DID}#foo`, + type: ServiceTypesEnum.LINKED_DOMAINS, + // TODO add support to test multiple origins, needs Veramo version update + serviceEndpoint: ORIGIN, + }, + { + id: `${DID}#bar`, + type: ServiceTypesEnum.LINKED_DOMAINS, + serviceEndpoint: ORIGIN, + }, + ], + } + + agent.resolveDid = jest.fn().mockReturnValue(Promise.resolve({ didDocument: DOCUMENT })) + + serverAgent = agent + + const agentRouter = AgentRouter({ + exposedMethods: serverAgent.availableMethods(), + }) + + const requestWithAgent = RequestWithAgentRouter({ + agent: serverAgent, + }) + + return new Promise((resolve) => { + const app = express() + app.use(basePath, requestWithAgent, agentRouter) + restServer = app.listen(port, () => { + resolve(true) + }) + }) +} + +const tearDown = async (): Promise => { + restServer.close() + return true +} + +const testContext = { + getAgent, + setup, + tearDown, + isRestTest: true, +} + +describe('REST integration tests', () => { + wellKnownDidVerifierAgentLogic(testContext) +}) diff --git a/packages/wellknown-did-verifier/__tests__/shared/wellKnownDidVerifierAgentLogic.ts b/packages/wellknown-did-verifier/__tests__/shared/wellKnownDidVerifierAgentLogic.ts new file mode 100644 index 000000000..852263400 --- /dev/null +++ b/packages/wellknown-did-verifier/__tests__/shared/wellKnownDidVerifierAgentLogic.ts @@ -0,0 +1,170 @@ +import { ValidationStatusEnum } from '@sphereon/wellknown-dids-client' +import { TAgent, IResolver } from '@veramo/core' +import { IWellKnownDidVerifier } from '../../src/types/IWellKnownDidVerifier' + +const nock = require('nock') + +type ConfiguredAgent = TAgent + +export default (testContext: { + getAgent: () => ConfiguredAgent + setup: () => Promise + tearDown: () => Promise + isRestTest: boolean +}) => { + describe('Well-Known DID Verifier Agent Plugin', () => { + const DID = 'did:key:z6MkoTHsgNNrby8JzCNQ1iRLyW5QQ6R8Xuu6AA8igGrMVPUM' + const DID_CONFIGURATION = { + '@context': 'https://identity.foundation/.well-known/did-configuration/v1', + linked_dids: [ + 'eyJhbGciOiJSUzI1NiIsImtpZCI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNI3o2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSJ9.eyJleHAiOjE3NjQ4NzkxMzksImlzcyI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNIiwibmJmIjoxNjA3MTEyNzM5LCJzdWIiOiJkaWQ6a2V5Ono2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiaHR0cHM6Ly9pZGVudGl0eS5mb3VuZGF0aW9uLy53ZWxsLWtub3duL2RpZC1jb25maWd1cmF0aW9uL3YxIl0sImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rb1RIc2dOTnJieThKekNOUTFpUkx5VzVRUTZSOFh1dTZBQThpZ0dyTVZQVU0iLCJvcmlnaW4iOiJodHRwczovL2lkZW50aXR5LmZvdW5kYXRpb24ifSwiZXhwaXJhdGlvbkRhdGUiOiIyMDI1LTEyLTA0VDE0OjEyOjE5LTA2OjAwIiwiaXNzdWFuY2VEYXRlIjoiMjAyMC0xMi0wNFQxNDoxMjoxOS0wNjowMCIsImlzc3VlciI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNIiwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIkRvbWFpbkxpbmthZ2VDcmVkZW50aWFsIl19fQ.YZnpPMAW3GdaPXC2YKoJ7Igt1OaVZKq09XZBkptyhxTAyHTkX2Ewtew-JKHKQjyDyabY3HAy1LUPoIQX0jrU0J82pIYT3k2o7nNTdLbxlgb49FcDn4czntt5SbY0m1XwrMaKEvV0bHQsYPxNTqjYsyySccgPfmvN9IT8gRS-M9a6MZQxuB3oEMrVOQ5Vco0bvTODXAdCTHibAk1FlvKz0r1vO5QMhtW4OlRrVTI7ibquf9Nim_ch0KeMMThFjsBDKetuDF71nUcL5sf7PCFErvl8ZVw3UK4NkZ6iM-XIRsLL6rXP2SnDUVovcldhxd_pyKEYviMHBOgBdoNP6fOgRQ', + 'eyJhbGciOiJSUzI1NiIsImtpZCI6ImRpZDprZXk6ejZNa29USHNnTk5yYnk4SnpDTlExaVJMeVc1UVE2UjhYdXU2QUE4aWdHck1WUFVNI3o2TWtvVEhzZ05OcmJ5OEp6Q05RMWlSTHlXNVFRNlI4WHV1NkFBOGlnR3JNVlBVTSJ9.eyJleHAiOjE3NjQ4NzkxMzksImlzcyI6ImRpZDprZXk6b3RoZXIiLCJuYmYiOjE2MDcxMTI3MzksInN1YiI6ImRpZDprZXk6b3RoZXIiLCJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vaWRlbnRpdHkuZm91bmRhdGlvbi8ud2VsbC1rbm93bi9kaWQtY29uZmlndXJhdGlvbi92MSJdLCJjcmVkZW50aWFsU3ViamVjdCI6eyJpZCI6ImRpZDprZXk6b3RoZXIiLCJvcmlnaW4iOiJodHRwczovL2lkZW50aXR5LmZvdW5kYXRpb24ifSwiZXhwaXJhdGlvbkRhdGUiOiIyMDI1LTEyLTA0VDE0OjEyOjE5LTA2OjAwIiwiaXNzdWFuY2VEYXRlIjoiMjAyMC0xMi0wNFQxNDoxMjoxOS0wNjowMCIsImlzc3VlciI6ImRpZDprZXk6b3RoZXIiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiRG9tYWluTGlua2FnZUNyZWRlbnRpYWwiXX19.rRuc-ojuEgyq8p_tBYK7BayuiNTBeXNyAnC14Rnjs-jsnhae4_E1Q12W99K2NGCGBi5KjNsBcZmdNJPxejiKPrjjcB99poFCgTY8tuRzDjVo0lIeBwfx9qqjKHTRTUR8FGM_imlOpVfBF4AHYxjkHvZn6c9lYvatYcDpB2UfH4BNXkdSVrUXy_kYjpMpAdRtyCAnD_isN1YpEHBqBmnfuVUbYcQK5kk6eiokRFDtWruL1OEeJMYPqjuBSd2m-H54tSM84Oic_pg2zXDjjBlXNelat6MPNT2QxmkwJg7oyewQWX2Ot2yyhSp9WyAQWMlQIe2x84R0lADUmZ1TPQchNw', + ], + } + + let agent: ConfiguredAgent + + beforeAll(async () => { + await testContext.setup() + agent = testContext.getAgent() + }) + + afterAll(testContext.tearDown) + + it('should verify domain linkage with signature verification key', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(3).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDomainLinkage({ + did: DID, + signatureVerification: 'verified', + }) + + expect(result.status).toEqual(ValidationStatusEnum.VALID) + }) + + it('should only verify service DIDs when onlyVerifyServiceDids set to true', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(3).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDomainLinkage({ + did: DID, + signatureVerification: 'verified', + onlyVerifyServiceDids: true, + }) + + expect(result.endpointDescriptors[0].resources[0].credentials.length).toEqual(1) + }) + + it('should throw error if signature verification key is not found when verifying a domain linkage', async () => { + const signatureVerificationKey = 'unknown' + await expect( + agent.verifyDomainLinkage({ + did: DID, + signatureVerification: signatureVerificationKey, + }) + ).rejects.toThrow(`Signature validation not found for key: ${signatureVerificationKey}`) + }) + + it('should throw error if signature verification key is not found when verifying a DID configuration resource', async () => { + const signatureVerificationKey = 'unknown' + + await expect( + agent.verifyDidConfigurationResource({ + signatureVerification: signatureVerificationKey, + origin: 'https://example.com', + }) + ).rejects.toThrow(`Signature validation not found for key: ${signatureVerificationKey}`) + }) + + it('should throw error if no configuration or origin is supplied', async () => { + await expect( + agent.verifyDidConfigurationResource({ + signatureVerification: 'verified', + }) + ).rejects.toThrow('No DID configuration resource or origin supplied.') + }) + + it('should throw error if both configuration and origin are supplied', async () => { + await expect( + agent.verifyDidConfigurationResource({ + signatureVerification: 'verified', + configuration: DID_CONFIGURATION, + origin: 'https://example.com', + }) + ).rejects.toThrow('Cannot supply both a DID configuration resource and an origin.') + }) + + it('should verify DID configuration resource with signature verification key', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(1).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDidConfigurationResource({ + signatureVerification: 'verified', + origin: 'https://example.com', + }) + + expect(result.status).toEqual(ValidationStatusEnum.VALID) + }) + + it('should only verify specific DID when given', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(1).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDidConfigurationResource({ + did: DID, + signatureVerification: 'verified', + origin: 'https://example.com', + }) + + expect(result.credentials.length).toEqual(1) + }) + + if (!testContext.isRestTest) { + it('should verify domain linkage with signature verification callback', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(3).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDomainLinkage({ + did: DID, + signatureVerification: () => Promise.resolve({ verified: true }), + }) + + expect(result.status).toEqual(ValidationStatusEnum.VALID) + }) + + it('should register signature verification', async () => { + const callbackName = 'new' + await agent.registerSignatureVerification({ + callbackName, + signatureVerification: () => Promise.resolve({ verified: true }), + }) + + await expect( + agent.registerSignatureVerification({ + callbackName, + signatureVerification: () => Promise.resolve({ verified: true }), + }) + ).rejects.toThrow(`Signature validation with key: ${callbackName} already present`) + }) + + it('should remove signature verification', async () => { + const callbackName = 'remove' + await agent.registerSignatureVerification({ + callbackName, + signatureVerification: () => Promise.resolve({ verified: true }), + }) + + const result = await agent.removeSignatureVerification({ callbackName }) + + expect(result).toEqual(true) + }) + + it('should verify DID configuration resource with signature verification callback', async () => { + nock('https://example.com').get('/.well-known/did-configuration.json').times(1).reply(200, DID_CONFIGURATION) + + const result = await agent.verifyDidConfigurationResource({ + signatureVerification: () => Promise.resolve({ verified: true }), + origin: 'https://example.com', + }) + + expect(result.status).toEqual(ValidationStatusEnum.VALID) + }) + } + }) +} diff --git a/packages/wellknown-did-verifier/agent.yml b/packages/wellknown-did-verifier/agent.yml new file mode 100644 index 000000000..92424989f --- /dev/null +++ b/packages/wellknown-did-verifier/agent.yml @@ -0,0 +1,105 @@ +version: 3.0 + +constants: + baseUrl: http://localhost:3335 + port: 3335 + methods: + - registerSignatureValidation + - removeSignatureValidation + - verifyDomainLinkage + - verifyDidConfigurationResource + +server: + baseUrl: + $ref: /constants/baseUrl + port: + $ref: /constants/port + use: + # CORS + - - $require: 'cors' + + # Add agent to the request object + - - $require: '@veramo/remote-server?t=function#RequestWithAgentRouter' + $args: + - agent: + $ref: /agent + + # API base path + - - /agent + - $require: '@veramo/remote-server?t=function#apiKeyAuth' + $args: + # Please configure your own API key. This is used when executing agent methods through ${baseUrl}/agent or ${baseUrl}/api-docs + - apiKey: test123 + - $require: '@veramo/remote-server?t=function#AgentRouter' + $args: + - exposedMethods: + $ref: /constants/methods + + # Open API schema + - - /open-api.json + - $require: '@veramo/remote-server?t=function#ApiSchemaRouter' + $args: + - basePath: :3335/agent + securityScheme: bearer + apiName: Agent + apiVersion: '1.0.0' + exposedMethods: + $ref: /constants/methods + + # Swagger docs + - - /api-docs + - $require: swagger-ui-express?t=object#serve + - $require: swagger-ui-express?t=function#setup + $args: + - null + - swaggerOptions: + url: '/open-api.json' + + # Execute during server initialization + init: + - $require: '@veramo/remote-server?t=function#createDefaultDid' + $args: + - agent: + $ref: /agent + baseUrl: + $ref: /constants/baseUrl + messagingServiceEndpoint: /messaging + +didResolver: + $require: '@veramo/did-resolver#DIDResolverPlugin' + $args: + - resolver: + $require: did-resolver#Resolver + $args: + - web: + $ref: /web-did-resolver + key: + $ref: /did-key-resolver + elem: + $ref: /universal-resolver + io: + $ref: /universal-resolver + ion: + $ref: /universal-resolver + sov: + $ref: /universal-resolver + +universal-resolver: + $require: '@veramo/did-resolver#UniversalResolver' + $args: + - url: https://dev.uniresolver.io/1.0/identifiers/ + +did-key-resolver: + $require: '@veramo/did-provider-key?t=function&p=/key#getDidKeyResolver' + +web-did-resolver: + $require: web-did-resolver?t=function&p=/web#getResolver + +# Agent +agent: + $require: '@veramo/core#Agent' + $args: + - schemaValidation: false + plugins: + - $ref: /didResolver + - $require: ./packages/wellknown-did-verifier/dist#WellKnownDidVerifier diff --git a/packages/wellknown-did-verifier/api-extractor.json b/packages/wellknown-did-verifier/api-extractor.json new file mode 100644 index 000000000..94c2c6a9f --- /dev/null +++ b/packages/wellknown-did-verifier/api-extractor.json @@ -0,0 +1,3 @@ +{ + "extends": "../include/api-extractor-base.json" +} diff --git a/packages/wellknown-did-verifier/package.json b/packages/wellknown-did-verifier/package.json new file mode 100644 index 000000000..d7ecef319 --- /dev/null +++ b/packages/wellknown-did-verifier/package.json @@ -0,0 +1,43 @@ +{ + "name": "@sphereon/ssi-sdk-wellknown-did-verifier", + "version": "0.7.0", + "source": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "veramo": { + "pluginInterfaces": { + "IWellknownDidVerifier": "./src/types/IWellKnownDidVerifier.ts" + } + }, + "scripts": { + "build": "tsc --build" + }, + "dependencies": { + "@sphereon/wellknown-dids-client": "^0.1.1" + }, + "devDependencies": { + "@veramo/cli": "3.1.2-next.84", + "nock": "^13.2.9", + "typescript": "4.6.4" + }, + "files": [ + "dist/**/*", + "src/**/*", + "README.md", + "plugin.schema.json", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, + "repository": "git@github.com:Sphereon-Opensource/SSI-SDK.git", + "author": "Sphereon ", + "license": "Apache-2.0", + "keywords": [ + "DID", + "Domain Linkage", + "DID Configuration Resource", + "Verifier", + "Well-Known DIDs" + ] +} diff --git a/packages/wellknown-did-verifier/plugin.schema.json b/packages/wellknown-did-verifier/plugin.schema.json new file mode 100644 index 000000000..8050db33d --- /dev/null +++ b/packages/wellknown-did-verifier/plugin.schema.json @@ -0,0 +1,34 @@ +{ + "IWellKnownDidVerifier": { + "components": { + "schemas": { + "IVerifyDomainLinkageArgs": { + "type": "object", + "properties": { + "didUrl": { + "type": "string" + }, + "signatureVerification": { + "type": "string" + }, + "onlyVerifyServiceDids": { + "type": "boolean" + }, + "additionalProperties": false + }, + "required": ["didUrl", "signatureVerification"], + "description": "Arguments needed for {@link IWellKnownDidVerifier.verifyDomainLinkage } " + } + }, + "methods": { + "verifyDomainLinkage": { + "description": "Verifies the relationship between the controller of an origin and a DID", + "arguments": { + "$ref": "#/components/schemas/IVerifyDomainLinkageArgs" + }, + "returnType": "object" + } + } + } + } +} diff --git a/packages/wellknown-did-verifier/src/agent/WellKnownDidVerifier.ts b/packages/wellknown-did-verifier/src/agent/WellKnownDidVerifier.ts new file mode 100644 index 000000000..2ef706969 --- /dev/null +++ b/packages/wellknown-did-verifier/src/agent/WellKnownDidVerifier.ts @@ -0,0 +1,100 @@ +import { IAgentPlugin, DIDResolutionResult } from '@veramo/core' +import { WellKnownDidVerifier as Verifier, IDomainLinkageValidation, IResourceValidation, VerifyCallback } from '@sphereon/wellknown-dids-client' +import { schema } from '../index' +import { + IWellKnownDidVerifier, + IWellKnownDidVerifierOptionsArgs, + IRegisterSignatureVerificationArgs, + IRemoveSignatureVerificationArgs, + IRequiredContext, + IVerifyDidConfigurationResourceArgs, + IVerifyDomainLinkageArgs, +} from '../types/IWellKnownDidVerifier' + +/** + * {@inheritDoc IWellKnownDidVerifier} + */ +export class WellKnownDidVerifier implements IAgentPlugin { + readonly schema = schema.IWellKnownDidVerifier + readonly methods: IWellKnownDidVerifier = { + registerSignatureVerification: this.registerSignatureVerification.bind(this), + removeSignatureVerification: this.removeSignatureVerification.bind(this), + verifyDomainLinkage: this.verifyDomainLinkage.bind(this), + verifyDidConfigurationResource: this.verifyDidConfigurationResource.bind(this), + } + + private readonly signatureVerifications: Record + private readonly onlyVerifyServiceDids: boolean + + constructor(args?: IWellKnownDidVerifierOptionsArgs) { + this.signatureVerifications = (args && args.signatureVerifications) || {} + this.onlyVerifyServiceDids = (args && args.onlyVerifyServiceDids) || false + } + + /** {@inheritDoc IWellKnownDidVerifier.registerSignatureVerification} */ + private async registerSignatureVerification(args: IRegisterSignatureVerificationArgs, context: IRequiredContext): Promise { + if (this.signatureVerifications[args.callbackName] !== undefined) { + return Promise.reject(new Error(`Signature validation with key: ${args.callbackName} already present`)) + } + + this.signatureVerifications[args.callbackName] = args.signatureVerification + } + + /** {@inheritDoc IWellKnownDidVerifier.removeSignatureVerification} */ + private async removeSignatureVerification(args: IRemoveSignatureVerificationArgs, context: IRequiredContext): Promise { + return delete this.signatureVerifications[args.callbackName] + } + + /** {@inheritDoc IWellKnownDidVerifier.verifyDomainLinkage} */ + private async verifyDomainLinkage(args: IVerifyDomainLinkageArgs, context: IRequiredContext): Promise { + console.log(args.onlyVerifyServiceDids) + + const signatureVerification: VerifyCallback = + typeof args.signatureVerification === 'string' + ? await this.getSignatureVerification(args.signatureVerification) + : (args.signatureVerification as VerifyCallback) + + return context.agent.resolveDid({ didUrl: args.did }).then((didResolutionResult: DIDResolutionResult) => { + if (!didResolutionResult.didDocument) { + return Promise.reject(Error(`Unable to resolve did: ${args.did}`)) + } + + return new Verifier().verifyDomainLinkage({ + didDocument: didResolutionResult.didDocument, + verifySignatureCallback: signatureVerification, + onlyVerifyServiceDid: args.onlyVerifyServiceDids || this.onlyVerifyServiceDids, + }) + }) + } + + /** {@inheritDoc IWellKnownDidVerifier.verifyDidConfigurationResource} */ + private async verifyDidConfigurationResource(args: IVerifyDidConfigurationResourceArgs, context: IRequiredContext): Promise { + if (args.configuration && args.origin) { + return Promise.reject(Error('Cannot supply both a DID configuration resource and an origin.')) + } + + if (!args.configuration && !args.origin) { + return Promise.reject(Error('No DID configuration resource or origin supplied.')) + } + + const signatureVerification: VerifyCallback = + typeof args.signatureVerification === 'string' + ? await this.getSignatureVerification(args.signatureVerification) + : (args.signatureVerification as VerifyCallback) + + return new Verifier().verifyResource({ + verifySignatureCallback: signatureVerification, + configuration: args.configuration, + origin: args.origin, + did: args.did, + }) + } + + private async getSignatureVerification(key: string): Promise { + if (this.signatureVerifications[key] === undefined) { + return Promise.reject(new Error(`Signature validation not found for key: ${key}`)) + } + + return this.signatureVerifications[key] + } +} diff --git a/packages/wellknown-did-verifier/src/index.ts b/packages/wellknown-did-verifier/src/index.ts new file mode 100644 index 000000000..c4d83f300 --- /dev/null +++ b/packages/wellknown-did-verifier/src/index.ts @@ -0,0 +1,7 @@ +/** + * @public + */ +const schema = require('../plugin.schema.json') +export { schema } +export { WellKnownDidVerifier } from './agent/WellKnownDidVerifier' +export * from './types/IWellKnownDidVerifier' diff --git a/packages/wellknown-did-verifier/src/types/IWellKnownDidVerifier.ts b/packages/wellknown-did-verifier/src/types/IWellKnownDidVerifier.ts new file mode 100644 index 000000000..c097ff44a --- /dev/null +++ b/packages/wellknown-did-verifier/src/types/IWellKnownDidVerifier.ts @@ -0,0 +1,38 @@ +import { IDidConfigurationResource, IDomainLinkageValidation, IResourceValidation, VerifyCallback } from '@sphereon/wellknown-dids-client' +import { IAgentContext, IPluginMethodMap, IResolver } from '@veramo/core' + +export interface IWellKnownDidVerifier extends IPluginMethodMap { + registerSignatureVerification(args: IRegisterSignatureVerificationArgs, context: IRequiredContext): Promise + removeSignatureVerification(args: IRemoveSignatureVerificationArgs, context: IRequiredContext): Promise + verifyDomainLinkage(args: IVerifyDomainLinkageArgs, context: IRequiredContext): Promise + verifyDidConfigurationResource(args: IVerifyDidConfigurationResourceArgs, context: IRequiredContext): Promise +} + +export interface IWellKnownDidVerifierOptionsArgs { + signatureVerifications?: Record + onlyVerifyServiceDids?: boolean +} + +export interface IRegisterSignatureVerificationArgs { + callbackName: string + signatureVerification: VerifyCallback +} + +export interface IRemoveSignatureVerificationArgs { + callbackName: string +} + +export interface IVerifyDomainLinkageArgs { + did: string + signatureVerification: VerifyCallback | string + onlyVerifyServiceDids?: boolean +} + +export interface IVerifyDidConfigurationResourceArgs { + signatureVerification: VerifyCallback | string + configuration?: IDidConfigurationResource + origin?: string + did?: string +} + +export type IRequiredContext = IAgentContext diff --git a/packages/wellknown-did-verifier/tsconfig.json b/packages/wellknown-did-verifier/tsconfig.json new file mode 100644 index 000000000..d3e5c24d2 --- /dev/null +++ b/packages/wellknown-did-verifier/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "declarationDir": "dist", + "strictPropertyInitialization": false + }, + "references": [] +} diff --git a/yarn.lock b/yarn.lock index 37dd52f87..968eaaca6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,37 +39,37 @@ "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" - integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.13.tgz#6aff7b350a1e8c3e40b029e46cbe78e24a913483" + integrity sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw== "@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8" - integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac" + integrity sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.10" + "@babel/generator" "^7.18.13" "@babel/helper-compilation-targets" "^7.18.9" "@babel/helper-module-transforms" "^7.18.9" "@babel/helpers" "^7.18.9" - "@babel/parser" "^7.18.10" + "@babel/parser" "^7.18.13" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.10" - "@babel/types" "^7.18.10" + "@babel/traverse" "^7.18.13" + "@babel/types" "^7.18.13" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.18.10", "@babel/generator@^7.7.2": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a" - integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA== +"@babel/generator@^7.18.13", "@babel/generator@^7.7.2": + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.13.tgz#59550cbb9ae79b8def15587bdfbaa388c4abf212" + integrity sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ== dependencies: - "@babel/types" "^7.18.10" + "@babel/types" "^7.18.13" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" @@ -176,10 +176,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" - integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.13": + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4" + integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -288,26 +288,26 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08" - integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g== +"@babel/traverse@^7.18.13", "@babel/traverse@^7.18.9", "@babel/traverse@^7.7.2": + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.13.tgz#5ab59ef51a997b3f10c4587d648b9696b6cb1a68" + integrity sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.10" + "@babel/generator" "^7.18.13" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.18.9" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" + "@babel/parser" "^7.18.13" + "@babel/types" "^7.18.13" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" - integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== +"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.18.13" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a" + integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ== dependencies: "@babel/helper-string-parser" "^7.18.10" "@babel/helper-validator-identifier" "^7.18.6" @@ -568,20 +568,20 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.0", "@ethersproject/abi@^5.6.3": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362" - integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg== - dependencies: - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" +"@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" "@ethersproject/abstract-provider@5.5.1": version "5.5.1" @@ -609,18 +609,18 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/web" "^5.6.0" -"@ethersproject/abstract-provider@^5.5.0", "@ethersproject/abstract-provider@^5.6.0", "@ethersproject/abstract-provider@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59" - integrity sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ== +"@ethersproject/abstract-provider@^5.5.0", "@ethersproject/abstract-provider@^5.6.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.3" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/web" "^5.6.1" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" "@ethersproject/abstract-signer@5.5.0": version "5.5.0" @@ -644,16 +644,16 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" -"@ethersproject/abstract-signer@^5.5.0", "@ethersproject/abstract-signer@^5.6.0", "@ethersproject/abstract-signer@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33" - integrity sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ== +"@ethersproject/abstract-signer@^5.5.0", "@ethersproject/abstract-signer@^5.6.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" "@ethersproject/address@5.5.0": version "5.5.0" @@ -677,16 +677,16 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/rlp" "^5.6.0" -"@ethersproject/address@^5.5.0", "@ethersproject/address@^5.6.0", "@ethersproject/address@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" - integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q== +"@ethersproject/address@^5.5.0", "@ethersproject/address@^5.6.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/rlp" "^5.6.1" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" "@ethersproject/base64@5.6.0": version "5.6.0" @@ -695,12 +695,12 @@ dependencies: "@ethersproject/bytes" "^5.6.0" -"@ethersproject/base64@^5.5.0", "@ethersproject/base64@^5.6.0", "@ethersproject/base64@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" - integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw== +"@ethersproject/base64@^5.5.0", "@ethersproject/base64@^5.6.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== dependencies: - "@ethersproject/bytes" "^5.6.1" + "@ethersproject/bytes" "^5.7.0" "@ethersproject/basex@5.6.0": version "5.6.0" @@ -710,13 +710,13 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/properties" "^5.6.0" -"@ethersproject/basex@^5.5.0", "@ethersproject/basex@^5.6.0", "@ethersproject/basex@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.1.tgz#badbb2f1d4a6f52ce41c9064f01eab19cc4c5305" - integrity sha512-a52MkVz4vuBXR06nvflPMotld1FJWSj2QT0985v7P/emPZO00PucFAkbcmq2vpVU7Ts7umKiSI6SppiLykVWsA== +"@ethersproject/basex@^5.5.0", "@ethersproject/basex@^5.6.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/properties" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" "@ethersproject/bignumber@5.6.0": version "5.6.0" @@ -727,13 +727,13 @@ "@ethersproject/logger" "^5.6.0" bn.js "^4.11.9" -"@ethersproject/bignumber@^5.5.0", "@ethersproject/bignumber@^5.6.0", "@ethersproject/bignumber@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" - integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw== +"@ethersproject/bignumber@^5.5.0", "@ethersproject/bignumber@^5.6.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" "@ethersproject/bytes@5.5.0": @@ -743,13 +743,20 @@ dependencies: "@ethersproject/logger" "^5.5.0" -"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@^5.5.0", "@ethersproject/bytes@^5.6.0", "@ethersproject/bytes@^5.6.1": +"@ethersproject/bytes@5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== dependencies: "@ethersproject/logger" "^5.6.0" +"@ethersproject/bytes@^5.5.0", "@ethersproject/bytes@^5.6.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + "@ethersproject/constants@5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.0.tgz#55e3eb0918584d3acc0688e9958b0cedef297088" @@ -757,12 +764,12 @@ dependencies: "@ethersproject/bignumber" "^5.6.0" -"@ethersproject/constants@^5.5.0", "@ethersproject/constants@^5.6.0", "@ethersproject/constants@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" - integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg== +"@ethersproject/constants@^5.5.0", "@ethersproject/constants@^5.6.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== dependencies: - "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bignumber" "^5.7.0" "@ethersproject/contracts@5.6.0": version "5.6.0" @@ -781,20 +788,20 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/contracts@^5.5.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.2.tgz#20b52e69ebc1b74274ff8e3d4e508de971c287bc" - integrity sha512-hguUA57BIKi6WY0kHvZp6PwPlWF87MCeB4B7Z7AbUpTxfFXFdn/3b0GmjZPagIHS+3yhcBJDnuEfU4Xz+Ks/8g== - dependencies: - "@ethersproject/abi" "^5.6.3" - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.2" + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" "@ethersproject/hash@5.6.0": version "5.6.0" @@ -810,19 +817,20 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/hash@^5.5.0", "@ethersproject/hash@^5.6.0", "@ethersproject/hash@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" - integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" +"@ethersproject/hash@^5.5.0", "@ethersproject/hash@^5.6.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" "@ethersproject/hdnode@5.6.0": version "5.6.0" @@ -842,23 +850,23 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/wordlists" "^5.6.0" -"@ethersproject/hdnode@^5.5.0", "@ethersproject/hdnode@^5.6.0", "@ethersproject/hdnode@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.2.tgz#26f3c83a3e8f1b7985c15d1db50dc2903418b2d2" - integrity sha512-tERxW8Ccf9CxW2db3WsN01Qao3wFeRsfYY9TCuhmG0xNpl2IO8wgXU3HtWIZ49gUWPggRy4Yg5axU0ACaEKf1Q== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/basex" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.1" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/sha2" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/wordlists" "^5.6.1" +"@ethersproject/hdnode@^5.5.0", "@ethersproject/hdnode@^5.6.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" "@ethersproject/json-wallets@5.6.0": version "5.6.0" @@ -879,22 +887,22 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/json-wallets@^5.5.0", "@ethersproject/json-wallets@^5.6.0", "@ethersproject/json-wallets@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.1.tgz#3f06ba555c9c0d7da46756a12ac53483fe18dd91" - integrity sha512-KfyJ6Zwz3kGeX25nLihPwZYlDqamO6pfGKNnVMWWfEVVp42lTfCZVXXy5Ie8IZTN0HKwAngpIPi7gk4IJzgmqQ== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hdnode" "^5.6.2" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.1" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" +"@ethersproject/json-wallets@^5.5.0", "@ethersproject/json-wallets@^5.6.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" aes-js "3.0.0" scrypt-js "3.0.1" @@ -906,19 +914,24 @@ "@ethersproject/bytes" "^5.6.0" js-sha3 "0.8.0" -"@ethersproject/keccak256@^5.5.0", "@ethersproject/keccak256@^5.6.0", "@ethersproject/keccak256@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" - integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA== +"@ethersproject/keccak256@^5.5.0", "@ethersproject/keccak256@^5.6.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== dependencies: - "@ethersproject/bytes" "^5.6.1" + "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.5.0", "@ethersproject/logger@^5.6.0": +"@ethersproject/logger@5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== +"@ethersproject/logger@^5.5.0", "@ethersproject/logger@^5.6.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + "@ethersproject/networks@5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.2.tgz#2bacda62102c0b1fcee408315f2bed4f6fbdf336" @@ -926,12 +939,12 @@ dependencies: "@ethersproject/logger" "^5.6.0" -"@ethersproject/networks@^5.5.0", "@ethersproject/networks@^5.6.0", "@ethersproject/networks@^5.6.3": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" - integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ== +"@ethersproject/networks@^5.5.0", "@ethersproject/networks@^5.6.0", "@ethersproject/networks@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" + integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== dependencies: - "@ethersproject/logger" "^5.6.0" + "@ethersproject/logger" "^5.7.0" "@ethersproject/pbkdf2@5.6.0": version "5.6.0" @@ -941,13 +954,13 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/sha2" "^5.6.0" -"@ethersproject/pbkdf2@^5.6.0", "@ethersproject/pbkdf2@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.1.tgz#f462fe320b22c0d6b1d72a9920a3963b09eb82d1" - integrity sha512-k4gRQ+D93zDRPNUfmduNKq065uadC2YjMP/CqwwX5qG6R05f47boq6pLZtV/RnC4NZAYOPH1Cyo54q0c9sshRQ== +"@ethersproject/pbkdf2@^5.6.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/sha2" "^5.6.1" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" "@ethersproject/properties@5.5.0": version "5.5.0" @@ -956,13 +969,20 @@ dependencies: "@ethersproject/logger" "^5.5.0" -"@ethersproject/properties@5.6.0", "@ethersproject/properties@^5.5.0", "@ethersproject/properties@^5.6.0": +"@ethersproject/properties@5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== dependencies: "@ethersproject/logger" "^5.6.0" +"@ethersproject/properties@^5.5.0", "@ethersproject/properties@^5.6.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + "@ethersproject/providers@5.6.4": version "5.6.4" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.4.tgz#1a49c211b57b0b2703c320819abbbfa35c83dff7" @@ -989,28 +1009,28 @@ ws "7.4.6" "@ethersproject/providers@^5.5.0": - version "5.6.8" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" - integrity sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w== - dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/base64" "^5.6.1" - "@ethersproject/basex" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.3" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/rlp" "^5.6.1" - "@ethersproject/sha2" "^5.6.1" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/web" "^5.6.1" + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" + integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" bech32 "1.1.4" ws "7.4.6" @@ -1030,13 +1050,13 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/random@^5.5.0", "@ethersproject/random@^5.6.0", "@ethersproject/random@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.1.tgz#66915943981bcd3e11bbd43733f5c3ba5a790255" - integrity sha512-/wtPNHwbmng+5yi3fkipA8YBT59DdkGRoC2vWk09Dci/q5DlgnMkhIycjHlavrvrjJBkFjO/ueLyT+aUDfc4lA== +"@ethersproject/random@^5.5.0", "@ethersproject/random@^5.6.0", "@ethersproject/random@^5.6.1", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" "@ethersproject/rlp@5.6.0": version "5.6.0" @@ -1046,13 +1066,13 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/rlp@^5.5.0", "@ethersproject/rlp@^5.6.0", "@ethersproject/rlp@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" - integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ== +"@ethersproject/rlp@^5.5.0", "@ethersproject/rlp@^5.6.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" "@ethersproject/sha2@5.6.0": version "5.6.0" @@ -1063,13 +1083,13 @@ "@ethersproject/logger" "^5.6.0" hash.js "1.1.7" -"@ethersproject/sha2@^5.6.0", "@ethersproject/sha2@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" - integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== +"@ethersproject/sha2@^5.6.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" "@ethersproject/signing-key@5.5.0": @@ -1096,14 +1116,14 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/signing-key@^5.5.0", "@ethersproject/signing-key@^5.6.0", "@ethersproject/signing-key@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" - integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ== +"@ethersproject/signing-key@^5.5.0", "@ethersproject/signing-key@^5.6.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1138,14 +1158,14 @@ "@ethersproject/constants" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/strings@^5.5.0", "@ethersproject/strings@^5.6.0", "@ethersproject/strings@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" - integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw== +"@ethersproject/strings@^5.5.0", "@ethersproject/strings@^5.6.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" "@ethersproject/transactions@5.5.0": version "5.5.0" @@ -1177,20 +1197,20 @@ "@ethersproject/rlp" "^5.6.0" "@ethersproject/signing-key" "^5.6.0" -"@ethersproject/transactions@^5.5.0", "@ethersproject/transactions@^5.6.0", "@ethersproject/transactions@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" - integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q== - dependencies: - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/rlp" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" +"@ethersproject/transactions@^5.5.0", "@ethersproject/transactions@^5.6.0", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" "@ethersproject/units@5.6.0": version "5.6.0" @@ -1244,25 +1264,25 @@ "@ethersproject/wordlists" "^5.6.0" "@ethersproject/wallet@^5.5.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" - integrity sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg== - dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/hdnode" "^5.6.2" - "@ethersproject/json-wallets" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/wordlists" "^5.6.1" + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" "@ethersproject/web@5.6.0": version "5.6.0" @@ -1275,16 +1295,16 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/web@^5.5.0", "@ethersproject/web@^5.6.0", "@ethersproject/web@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" - integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA== +"@ethersproject/web@^5.5.0", "@ethersproject/web@^5.6.0", "@ethersproject/web@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" + integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== dependencies: - "@ethersproject/base64" "^5.6.1" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" "@ethersproject/wordlists@5.6.0": version "5.6.0" @@ -1297,16 +1317,16 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/wordlists@^5.5.0", "@ethersproject/wordlists@^5.6.0", "@ethersproject/wordlists@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.1.tgz#1e78e2740a8a21e9e99947e47979d72e130aeda1" - integrity sha512-wiPRgBpNbNwCQFoCr8bcWO8o5I810cqO6mkdtKfLKFlLxeCWcnzDi4Alu8iyNzlhYuS9npCwivMbRWF19dyblw== +"@ethersproject/wordlists@^5.5.0", "@ethersproject/wordlists@^5.6.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" "@gar/promisify@^1.0.1": version "1.1.3" @@ -1770,9 +1790,9 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + version "0.3.15" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -2496,7 +2516,7 @@ semver "^7.3.5" tar "^6.1.11" -"@mattrglobal/bbs-signatures@1.0.0", "@mattrglobal/bbs-signatures@^0.5.0": +"@mattrglobal/bbs-signatures@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@mattrglobal/bbs-signatures/-/bbs-signatures-1.0.0.tgz#8ff272c6d201aadab7e08bd84dbfd6e0d48ba12d" integrity sha512-FFzybdKqSCrS/e7pl5s6Tl/m/x8ZD5EMBbcTBQaqSOms/lebm91lFukYOIe2qc0a5o+gLhtRKye8OfKwD1Ex/g== @@ -2535,14 +2555,14 @@ node-pre-gyp "0.14.0" "@microsoft/api-documenter@^7.14.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.19.1.tgz#df8647308b8482fea9b50dd10204ac8b36327219" - integrity sha512-XiUODGIU8cYxhcm8YcJtMXMBv6cIMUuHEtid7NOCUg5MF0aUs4GKuy+6vOK6Nl7hKqejwsoxQRo3cAR3khKdpA== + version "7.19.7" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.19.7.tgz#943f1dd581ba39e4e939c6139562607280e8df4d" + integrity sha512-llCI/0d23HwC5X5qHSKmEnoCp95UqOdSWadf4exlo96k2kfC8uCYC6MIXKgi7Z3qXt1ac+dDrxYWIMK7SlX8EA== dependencies: - "@microsoft/api-extractor-model" "7.22.2" + "@microsoft/api-extractor-model" "7.23.3" "@microsoft/tsdoc" "0.14.1" - "@rushstack/node-core-library" "3.50.0" - "@rushstack/ts-command-line" "4.12.1" + "@rushstack/node-core-library" "3.51.1" + "@rushstack/ts-command-line" "4.12.2" colors "~1.2.1" js-yaml "~3.13.1" resolve "~1.17.0" @@ -2556,14 +2576,14 @@ "@microsoft/tsdoc-config" "~0.16.1" "@rushstack/node-core-library" "3.45.4" -"@microsoft/api-extractor-model@7.22.2", "@microsoft/api-extractor-model@^7.15.3": - version "7.22.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.22.2.tgz#9d49c22ae713d8662c995d844e29c59200ebe72f" - integrity sha512-fqb7std1sRfg7tvXkJwB7zrgIyzty7iIJXxpqA2/bEdct36jhkgIhKpgYr2yoi+Jhqbinjmhyf9tPKJ2E3TdwA== +"@microsoft/api-extractor-model@7.23.3", "@microsoft/api-extractor-model@^7.15.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.23.3.tgz#82961ebaddd7427112afbfc4c1d7c76a9932f2fc" + integrity sha512-HpsWzG6jrWHrTlIg53kmp/IVQPBHUZc+8dunnr9VXrmDjVBehaXxp9A6jhTQ/bd7W1m5TYfAvwCmseC1+9FCuA== dependencies: "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.50.0" + "@rushstack/node-core-library" "3.51.1" "@microsoft/api-extractor@7.23.0": version "7.23.0" @@ -2584,22 +2604,22 @@ typescript "~4.6.3" "@microsoft/api-extractor@^7.19.4": - version "7.28.7" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.28.7.tgz#3c2745499b38d1ae3b8e0488c3f5aaeb6edc3e60" - integrity sha512-hDVYSbqGsY4gioHMi/NkIarAJ2qoE5cKEZ6V5HqLcUl0+hNV0Auk/5VbBmU2UO2le6MFgO69EJsrfszwzC6QBA== + version "7.29.5" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.29.5.tgz#8afafc8b2c27d8334579434971f718b347634f35" + integrity sha512-+vqO/TAGw9xXANpvTjA4y5ADcaRuYuBoJ9IfoAHubrGuxKG6GoW3P2tfdgwteLz95CnlftBxYp+3NG/mf05P9Q== dependencies: - "@microsoft/api-extractor-model" "7.22.2" + "@microsoft/api-extractor-model" "7.23.3" "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.50.0" - "@rushstack/rig-package" "0.3.13" - "@rushstack/ts-command-line" "4.12.1" + "@rushstack/node-core-library" "3.51.1" + "@rushstack/rig-package" "0.3.14" + "@rushstack/ts-command-line" "4.12.2" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.6.3" + typescript "~4.7.4" "@microsoft/tsdoc-config@~0.16.1": version "0.16.1" @@ -2802,11 +2822,11 @@ "@octokit/types" "^6.0.3" "@octokit/auth-token@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.0.tgz#6f22c5fc56445c496628488ba6810131558fa4a9" - integrity sha512-MDNFUBcJIptB9At7HiV7VCvU3NcL4GnfCQaP8C5lrxWrRPMJBnemYtehaKSOlaM7AYxeRyj9etenu8LVpSpVaQ== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.1.tgz#88bc2baf5d706cb258474e722a720a8365dff2ec" + integrity sha512-/USkK4cioY209wXRpund6HZzHo9GmjakpV9ycOkpMcMxMk7QVcVFVyCMtzvXYiHsB2crgDgrtNYSELYFBXhhaA== dependencies: - "@octokit/types" "^6.0.3" + "@octokit/types" "^7.0.0" "@octokit/core@^3.5.1": version "3.6.0" @@ -2822,15 +2842,15 @@ universal-user-agent "^6.0.0" "@octokit/core@^4.0.0": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.0.4.tgz#335d9b377691e3264ce57a9e5a1f6cda783e5838" - integrity sha512-sUpR/hc4Gc7K34o60bWC7WUH6Q7T6ftZ2dUmepSyJr9PRF76/qqkWjE2SOEzCqLA5W83SaISymwKtxks+96hPQ== + version "4.0.5" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.0.5.tgz#589e68c0a35d2afdcd41dafceab072c2fbc6ab5f" + integrity sha512-4R3HeHTYVHCfzSAi0C6pbGXV8UDI5Rk+k3G7kLVNckswN9mvpOzW9oENfjfH3nEmzg8y3AmKmzs8Sg6pLCeOCA== dependencies: "@octokit/auth-token" "^3.0.0" "@octokit/graphql" "^5.0.0" "@octokit/request" "^6.0.0" "@octokit/request-error" "^3.0.0" - "@octokit/types" "^6.0.3" + "@octokit/types" "^7.0.0" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" @@ -2844,11 +2864,11 @@ universal-user-agent "^6.0.0" "@octokit/endpoint@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.0.tgz#be758a1236d68d6bbb505e686dd50881c327a519" - integrity sha512-Kz/mIkOTjs9rV50hf/JK9pIDl4aGwAtT8pry6Rpy+hVXkAPhXanNQRxMoq6AeRgDCZR6t/A1zKniY2V1YhrzlQ== + version "7.0.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.1.tgz#cb0d03e62e8762f3c80e52b025179de81899a823" + integrity sha512-/wTXAJwt0HzJ2IeE4kQXO+mBScfzyCkI0hMtkIaqyXd9zg76OpOfNQfHL9FlaxAV2RsNiOXZibVWloy8EexENg== dependencies: - "@octokit/types" "^6.0.3" + "@octokit/types" "^7.0.0" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" @@ -2862,12 +2882,12 @@ universal-user-agent "^6.0.0" "@octokit/graphql@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.0.tgz#2cc6eb3bf8e0278656df1a7d0ca0d7591599e3b3" - integrity sha512-1ZZ8tX4lUEcLPvHagfIVu5S2xpHYXAmgN0+95eAOPoaVPzCfUXJtA5vASafcpWcO86ze0Pzn30TAx72aB2aguQ== + version "5.0.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.1.tgz#a06982514ad131fb6fbb9da968653b2233fade9b" + integrity sha512-sxmnewSwAixkP1TrLdE6yRG53eEhHhDTYUykUwdV9x8f91WcbhunIHk9x1PZLALdBZKRPUO2HRcm4kezZ79HoA== dependencies: "@octokit/request" "^6.0.0" - "@octokit/types" "^6.0.3" + "@octokit/types" "^7.0.0" universal-user-agent "^6.0.0" "@octokit/openapi-types@^12.11.0": @@ -2875,6 +2895,11 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== +"@octokit/openapi-types@^13.4.0": + version "13.4.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-13.4.0.tgz#06fe8fda93bf21bdd397fe7ef8805249efda6c06" + integrity sha512-2mVzW0X1+HDO3jF80/+QFZNzJiTefELKbhMu6yaBYbp/1gSMkVDm4rT472gJljTokWUlXaaE63m7WrWENhMDLw== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" @@ -2887,12 +2912,12 @@ dependencies: "@octokit/types" "^6.40.0" -"@octokit/plugin-paginate-rest@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.1.0.tgz#86f8be759ce2d6d7c879a31490fd2f7410b731f0" - integrity sha512-+cfc40pMzWcLkoDcLb1KXqjX0jTGYXjKuQdFQDc6UAknISJHnZTiBqld6HDwRJvD4DsouDKrWXNbNV0lE/3AXA== +"@octokit/plugin-paginate-rest@^4.0.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-4.1.0.tgz#670ac9ac369448c69a2371bfcd7e2b37d95534f2" + integrity sha512-2O5K5fpajYG5g62wjzHR7/cWYaCA88CextAW3vFP+yoIHD0KEdlVMHfM5/i5LyV+JMmqiYW7w5qfg46FR+McNw== dependencies: - "@octokit/types" "^6.41.0" + "@octokit/types" "^7.1.1" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -2908,11 +2933,11 @@ deprecation "^2.3.1" "@octokit/plugin-rest-endpoint-methods@^6.0.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.2.0.tgz#c06359d2f94436f8c67d345093cb02dedd31d974" - integrity sha512-PZ+yfkbZAuRUtqu6Y191/V3eM0KBPx+Yq7nh+ONPdpm3EX4pd5UnK2y2XgO/0AtNum5a4aJCDjqsDuUZ2hWRXw== + version "6.3.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.3.0.tgz#81549334ce020169b84bd4a7fa2577e9d725d829" + integrity sha512-qEu2wn6E7hqluZwIEUnDxWROvKjov3zMIAi4H4d7cmKWNMeBprEXZzJe8pE5eStUYC1ysGhD0B7L6IeG1Rfb+g== dependencies: - "@octokit/types" "^6.41.0" + "@octokit/types" "^7.0.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -2925,11 +2950,11 @@ once "^1.4.0" "@octokit/request-error@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.0.tgz#f527d178f115a3b62d76ce4804dd5bdbc0270a81" - integrity sha512-WBtpzm9lR8z4IHIMtOqr6XwfkGvMOOILNLxsWvDwtzm/n7f5AWuqJTXQXdDtOvPfTDrH4TPhEvW2qMlR4JFA2w== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.1.tgz#3fd747913c06ab2195e52004a521889dadb4b295" + integrity sha512-ym4Bp0HTP7F3VFssV88WD1ZyCIRoE8H35pXSKwLeMizcdZAYc/t6N9X9Yr9n6t3aG9IH75XDnZ6UeZph0vHMWQ== dependencies: - "@octokit/types" "^6.0.3" + "@octokit/types" "^7.0.0" deprecation "^2.0.0" once "^1.4.0" @@ -2946,13 +2971,13 @@ universal-user-agent "^6.0.0" "@octokit/request@^6.0.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.0.tgz#9c25606df84e6f2ccbcc2c58e1d35438e20b688b" - integrity sha512-7IAmHnaezZrgUqtRShMlByJK33MT9ZDnMRgZjnRrRV9a/jzzFwKGz0vxhFU6i7VMLraYcQ1qmcAOin37Kryq+Q== + version "6.2.1" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.1.tgz#3ceeb22dab09a29595d96594b6720fc14495cf4e" + integrity sha512-gYKRCia3cpajRzDSU+3pt1q2OcuC6PK8PmFIyxZDWCzRXRSIBH8jXjFJ8ZceoygBIm0KsEUg4x1+XcYBz7dHPQ== dependencies: "@octokit/endpoint" "^7.0.0" "@octokit/request-error" "^3.0.0" - "@octokit/types" "^6.16.1" + "@octokit/types" "^7.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.7" universal-user-agent "^6.0.0" @@ -2968,31 +2993,38 @@ "@octokit/plugin-rest-endpoint-methods" "^5.12.0" "@octokit/rest@^19.0.0": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.3.tgz#b9a4e8dc8d53e030d611c053153ee6045f080f02" - integrity sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ== + version "19.0.4" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.4.tgz#fd8bed1cefffa486e9ae46a9dc608ce81bcfcbdd" + integrity sha512-LwG668+6lE8zlSYOfwPj4FxWdv/qFXYBpv79TWIQEpBLKA9D/IMcWsF/U9RGpA3YqMVDiTxpgVpEW3zTFfPFTA== dependencies: "@octokit/core" "^4.0.0" - "@octokit/plugin-paginate-rest" "^3.0.0" + "@octokit/plugin-paginate-rest" "^4.0.0" "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^6.0.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0", "@octokit/types@^6.41.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": version "6.41.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== dependencies: "@octokit/openapi-types" "^12.11.0" +"@octokit/types@^7.0.0", "@octokit/types@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-7.1.1.tgz#a30fd6ca3279d59d532fa75583d65d93b7588e6d" + integrity sha512-Dx6cNTORyVaKY0Yeb9MbHksk79L8GXsihbG6PtWqTpkyA2TY1qBWE26EQXVG3dHwY9Femdd/WEeRUEiD0+H3TQ== + dependencies: + "@octokit/openapi-types" "^13.4.0" + "@panva/asn1.js@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6" integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw== "@peculiar/asn1-schema@^2.1.6": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.2.0.tgz#d8a54527685c8dee518e6448137349444310ad64" - integrity sha512-1ENEJNY7Lwlua/1wvzpYP194WtjQBfFxvde2FlzfBFh/ln6wvChrtxlORhbKEnYswzn6fOC4c7HdC5izLPMTJg== + version "2.3.0" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.0.tgz#5368416eb336138770c692ffc2bab119ee3ae917" + integrity sha512-DtNLAG4vmDrdSJFPe7rypkcj597chNQL7u+2dBtYo5mh7VW2+im6ke+O0NVr8W1f4re4C3F71LhoMb0Yxqa48Q== dependencies: asn1js "^3.0.5" pvtsutils "^1.3.2" @@ -3031,10 +3063,10 @@ timsort "~0.3.0" z-schema "~5.0.2" -"@rushstack/node-core-library@3.50.0": - version "3.50.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.0.tgz#8b628247f16e5719c39ed1890c11959f8d303559" - integrity sha512-FFEZhgu6iN1MVjpQWmLcz46pSa4r2Oe2JYPo7mtnl3uYfwDaSXUSZuRN3JQgKkXu10TBcffJ7AGKcIt/k+qE/Q== +"@rushstack/node-core-library@3.51.1": + version "3.51.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.51.1.tgz#e123053c4924722cc9614c0091fda5ed7bbc6c9d" + integrity sha512-xLoUztvGpaT5CphDexDPt2WbBx8D68VS5tYOkwfr98p90y0f/wepgXlTA/q5MUeZGGucASiXKp5ysdD+GPYf9A== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -3043,7 +3075,6 @@ jju "~1.4.0" resolve "~1.17.0" semver "~7.3.0" - timsort "~0.3.0" z-schema "~5.0.2" "@rushstack/rig-package@0.3.11": @@ -3054,10 +3085,10 @@ resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/rig-package@0.3.13": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.13.tgz#80d7b34bc9b7a7feeba133f317df8dbd1f65a822" - integrity sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA== +"@rushstack/rig-package@0.3.14": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.14.tgz#f2611b59245fd7cc29c6982566b2fbb4a4192bc5" + integrity sha512-Ic9EN3kWJCK6iOxEDtwED9nrM146zCDrQaUxbeGOF+q/VLZ/HNHPw+aLqrqmTl0ZT66Sf75Qk6OG+rySjTorvQ== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" @@ -3072,17 +3103,17 @@ colors "~1.2.1" string-argv "~0.3.1" -"@rushstack/ts-command-line@4.12.1": - version "4.12.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.1.tgz#4437ffae6459eb88791625ad9e89b2f0ba254476" - integrity sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ== +"@rushstack/ts-command-line@4.12.2": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.2.tgz#59b7450c5d75190778cce8b159c7d7043c32cc4e" + integrity sha512-poBtnumLuWmwmhCEkVAgynWgtnF9Kygekxyp4qtQUSbBrkuyPQTL85c8Cva1YfoUpOdOXxezMAkUt0n5SNKGqw== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" colors "~1.2.1" string-argv "~0.3.1" -"@scure/base@^1.0.0-rc1": +"@scure/base@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== @@ -3168,9 +3199,9 @@ read-pkg-up "^7.0.0" "@sinclair/typebox@^0.24.1": - version "0.24.26" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.26.tgz#84f9e8c1d93154e734a7947609a1dc7c7a81cc22" - integrity sha512-1ZVIyyS1NXDRVT8GjWD5jULjhDyM3IsIHef2VGUMdnWOlX2tkPjyEX/7K0TGSH2S8EaPhp1ylFdjSjUGQ+gecg== + version "0.24.28" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.28.tgz#15aa0b416f82c268b1573ab653e4413c965fe794" + integrity sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow== "@sinonjs/commons@^1.7.0": version "1.8.3" @@ -3193,13 +3224,13 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@sphereon/did-auth-siop@0.2.12", "@sphereon/did-auth-siop@^0.2.12": - version "0.2.12" - resolved "https://registry.yarnpkg.com/@sphereon/did-auth-siop/-/did-auth-siop-0.2.12.tgz#e8e036ab8a7f03f16dbdff2dbf5aedd3012fbb8f" - integrity sha512-HbyLcCyRQmovCXkP1yvjYCHyCD5RqHgvSZKMkM9Co7FvElu6jtxG64stgXnqQ+xQF3Q9saEetGPWHDwMBqaI4Q== +"@sphereon/did-auth-siop@0.2.13": + version "0.2.13" + resolved "https://registry.yarnpkg.com/@sphereon/did-auth-siop/-/did-auth-siop-0.2.13.tgz#270d80d1e1d86cc12271961fda281ff4400a95cd" + integrity sha512-ZFT+CoFGXsWcEnBvnagMuREtWI70P0MNTclYwCMHXlUgDYscJBu84RDXV3g0ONX0N4X3KFPCZHgtLXceg1dQGw== dependencies: "@sphereon/did-uni-client" "^0.4.0" - "@sphereon/pex" "^1.1.2" + "@sphereon/pex" "^1.1.3" "@sphereon/pex-models" "^1.1.0" "@stablelib/ed25519" "^1.0.2" "@stablelib/random" "^1.0.1" @@ -3211,16 +3242,16 @@ bs58 "^4.0.1" canonicalize "^1.0.8" cross-fetch "^3.1.5" - did-jwt "^6.2.0" + did-jwt "6.2.0" did-resolver "^3.2.2" elliptic "^6.5.4" eth-crypto "^2.3.0" jose "3.20.3" js-sha3 "^0.8.0" - multiformats "^9.7.0" + multiformats "^9.7.1" querystring "^0.2.1" ts-interface-checker "^1.0.2" - uint8arrays "^3.0.0" + uint8arrays "^3.1.0" uuid "^8.3.2" "@sphereon/did-uni-client@0.4.0", "@sphereon/did-uni-client@^0.4.0": @@ -3244,32 +3275,23 @@ fast-text-encoding "^1.0.3" isomorphic-webcrypto "^2.3.8" -"@sphereon/ion-pow-sdk@1.0.15-sphereon.1": - version "1.0.15-sphereon.1" - resolved "https://registry.yarnpkg.com/@sphereon/ion-pow-sdk/-/ion-pow-sdk-1.0.15-sphereon.1.tgz#576e626a54758018294eb4222a6b86ee944469ae" - integrity sha512-WfafAWCGWG0Qz+p9czFPTTZXm3sHXqFO6oqpj9oHpRSTqd8dfswpooyMBkEAu+tPps86XIb3M95jLI3lM1AK0g== +"@sphereon/ion-pow@^0.1.1-unstable.3": + version "0.1.1-unstable.4" + resolved "https://registry.yarnpkg.com/@sphereon/ion-pow/-/ion-pow-0.1.1-unstable.4.tgz#d5a6324396c7725b93c630f20d71f848d09f92f4" + integrity sha512-EVeLTQP9tB3iwcrTI+uyzEZw2c2hkFHXLtWF3AYMOSsGK/dKjtmh6TmbQunI5rf5UpYHD1TBwuLTv4PHZCj16A== dependencies: - "@sphereon/react-native-argon2" "^2.0.6" - buffer "6.0.3" + "@sphereon/isomorphic-argon2" "^0.1.1-unstable.0" cross-fetch "^3.1.5" + debug "^4.1.1" + uint8arrays "^3.1.0" -"@sphereon/ion-tools@0.1.0-sphereon.1": - version "0.1.0-sphereon.1" - resolved "https://registry.yarnpkg.com/@sphereon/ion-tools/-/ion-tools-0.1.0-sphereon.1.tgz#26de5cd797cc619b9cb2776c1d68e4c2e786fc29" - integrity sha512-xTjC1or4gJ+ZJ1ngcGqtWHw0rQFrY5Jm4L5PI1KONQtObBtE27M0f3pFC9Ii0gs6O4lsGFHruJZArFKe7u/DtQ== +"@sphereon/isomorphic-argon2@^0.1.1-unstable.0": + version "0.1.1-unstable.1" + resolved "https://registry.yarnpkg.com/@sphereon/isomorphic-argon2/-/isomorphic-argon2-0.1.1-unstable.1.tgz#4c56d4097805539f70cde68aad78d99c21e5e37d" + integrity sha512-tfkppizgvltJTStGhSQIru9TpDnc/6RQ5UjmzSr5ybsvJj2FLeePL741Qh5uUPiSeICnzVqZT6oniIBCVV+vTw== dependencies: - "@decentralized-identity/ion-sdk" "^0.5.0" - "@sphereon/ion-pow-sdk" "1.0.15-sphereon.1" - "@transmute/did-key-bls12381" "^0.2.1-unstable.42" - "@transmute/did-key-ed25519" "^0.2.1-unstable.42" - "@transmute/did-key-secp256k1" "^0.2.1-unstable.42" - "@transmute/did-key-x25519" "^0.2.1-unstable.42" - "@transmute/did-key.js" "^0.2.1-unstable.42" - babel-plugin-rewrite-require "1.9.0" - cross-fetch "^3.1.5" - crypto-browserify "^3.12.0" - randombytes "^2.1.0" - stream-browserify "^3.0.0" + argon2-browser "^1.18.0" + uint8arrays "^3.1.0" "@sphereon/lto-did-ts@0.1.8-unstable.0": version "0.1.8-unstable.0" @@ -3288,10 +3310,10 @@ resolved "https://registry.yarnpkg.com/@sphereon/pex-models/-/pex-models-1.1.0.tgz#716898344fd07400bbffaa0c34a1f7ecdda14166" integrity sha512-kMslWspdqwuXGBFxOPXTAK8HlIHycBR/locYHMlYmyvdnau6bp40JXk2zviBRVOPfe8N3Dv2p5IPAjMk3pT77A== -"@sphereon/pex@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-1.1.2.tgz#a018909fef4f8b50bf8f812249673976b73ee066" - integrity sha512-NcfLqMaIpjAgnAIzLk759m5KxCjshXEA5BjGRnKWrqnhcYmTaHODWFt2GGSZBoQ+z+4ngb0X5oUVTNLCA/X+xg== +"@sphereon/pex@1.1.3", "@sphereon/pex@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-1.1.3.tgz#450d3a839c92c60942439378314791fdff88e3a9" + integrity sha512-9k+g3zDAfIwmzbmZ9sfdgIpm7OCTURDprmpgCNGda5aAxRvErEZOakn3vsT5y6ac3g8Os2QolZi4bEYyuvKq3w== dependencies: "@sphereon/pex-models" "^1.1.0" ajv "^8.11.0" @@ -3301,10 +3323,14 @@ nanoid "^3.3.4" string.prototype.matchall "^4.0.7" -"@sphereon/react-native-argon2@^2.0.6": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@sphereon/react-native-argon2/-/react-native-argon2-2.0.6.tgz#602abb96d6d41a7f0778a3323940fca0b4fa13ed" - integrity sha512-5RkIzhfeDw12p1t2BcQQJyYmgtPE3CQDPLwPfwpnVGamG5R8tY4FhJRNScGzRzttHw6tbBWC1acZ2IM0swEmUQ== +"@sphereon/wellknown-dids-client@^0.1.1": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@sphereon/wellknown-dids-client/-/wellknown-dids-client-0.1.2.tgz#b10e41533624e74515d39caffafa90f12e9279b7" + integrity sha512-svj/awJqgAyYwFXpK54V8xXqZvuadlBjDwar3LCNjLCanL9146P3LXwKn0aw9Ep6ZFvtatrdIulpWRKvQ3c9Ag== + dependencies: + "@sphereon/ssi-sdk-core" "^0.7.0" + cross-fetch "^3.1.5" + jwt-decode "^3.1.2" "@sqltools/formatter@^1.2.2": version "1.2.3" @@ -3379,11 +3405,11 @@ integrity sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg== "@stablelib/ed25519@^1.0.1", "@stablelib/ed25519@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.2.tgz#937a88a2f73a71d9bdc3ea276efe8954776ae0f4" - integrity sha512-FtnvUwvKbp6l1dNcg4CswMAVFVu/nzLK3oC7/PRtjYyHbWsIkD8j+5cjXHmwcCpdCpRCaTGACkEhhMQ1RcdSOQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/ed25519/-/ed25519-1.0.3.tgz#f8fdeb6f77114897c887bb6a3138d659d3f35996" + integrity sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg== dependencies: - "@stablelib/random" "^1.0.1" + "@stablelib/random" "^1.0.2" "@stablelib/sha512" "^1.0.1" "@stablelib/wipe" "^1.0.1" @@ -3405,14 +3431,14 @@ "@stablelib/bytes" "^1.0.1" "@stablelib/nacl@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@stablelib/nacl/-/nacl-1.0.3.tgz#e1ad2a48c47809e475a07d35692cd41f79e39990" - integrity sha512-ZdDGRo4s6ke2rdhwwna5SAikU48AQRNqPPbJ29ZSC781SMUMPpkixKpyZG+NfYhMkFSJ0ZRlFdKW+/ksmpVHWA== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@stablelib/nacl/-/nacl-1.0.4.tgz#b63e0a1b87eccb13ad91dd46b2382112acfa417e" + integrity sha512-PJ2U/MrkXSKUM8C4qFs87WeCNxri7KQwR8Cdwm9q2sweGuAtTvOJGuW0F3N+zn+ySLPJA98SYWSSpogMJ1gCmw== dependencies: "@stablelib/poly1305" "^1.0.1" - "@stablelib/random" "^1.0.1" + "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" - "@stablelib/x25519" "^1.0.2" + "@stablelib/x25519" "^1.0.3" "@stablelib/xsalsa20" "^1.0.2" "@stablelib/poly1305@^1.0.1": @@ -3431,10 +3457,10 @@ "@stablelib/binary" "^1.0.0" "@stablelib/wipe" "^1.0.0" -"@stablelib/random@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.1.tgz#4357a00cb1249d484a9a71e6054bc7b8324a7009" - integrity sha512-zOh+JHX3XG9MSfIB0LZl/YwPP9w3o6WBiJkZvjPoKKu5LKFW4OLV71vMxWp9qG5T43NaWyn0QQTWgqCdO+yOBQ== +"@stablelib/random@^1.0.1", "@stablelib/random@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@stablelib/random/-/random-1.0.2.tgz#2dece393636489bf7e19c51229dd7900eddf742c" + integrity sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w== dependencies: "@stablelib/binary" "^1.0.1" "@stablelib/wipe" "^1.0.1" @@ -3471,13 +3497,13 @@ resolved "https://registry.yarnpkg.com/@stablelib/wipe/-/wipe-1.0.1.tgz#d21401f1d59ade56a62e139462a97f104ed19a36" integrity sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg== -"@stablelib/x25519@^1.0.0", "@stablelib/x25519@^1.0.1", "@stablelib/x25519@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.2.tgz#ae21e2ab668076ec2eb2b4853b82a27fab045fa1" - integrity sha512-wTR0t0Bp1HABLFRbYaE3vFLuco2QbAg6QvxBnzi5j9qjhYezWHW7OiCZyaWbt25UkSaoolUUT4Il0nS/2vcbSw== +"@stablelib/x25519@^1.0.0", "@stablelib/x25519@^1.0.1", "@stablelib/x25519@^1.0.2", "@stablelib/x25519@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@stablelib/x25519/-/x25519-1.0.3.tgz#13c8174f774ea9f3e5e42213cbf9fc68a3c7b7fd" + integrity sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw== dependencies: "@stablelib/keyagreement" "^1.0.1" - "@stablelib/random" "^1.0.1" + "@stablelib/random" "^1.0.2" "@stablelib/wipe" "^1.0.1" "@stablelib/xchacha20@^1.0.1": @@ -3520,17 +3546,17 @@ integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== "@transmute/bls12381-key-pair@^0.7.0-unstable.2": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/bls12381-key-pair/-/bls12381-key-pair-0.7.0-unstable.64.tgz#70367d2a543cfa7f1832ce1ca225ddd46a12fc24" - integrity sha512-knZ8TSXtbZ9QKT7YU+MpSRA/8+zVyFBo3nAw+a38NwBc7vu/cvPDQjfxvZwFVKPJ3/7Dq4/SMESNoUGfr4317g== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/bls12381-key-pair/-/bls12381-key-pair-0.7.0-unstable.66.tgz#db0e54788bd41fd726d3468e5f21f1cd383fc7ea" + integrity sha512-kVQfBRmG+ARes2glrrIS+eEF7QFBxzKZ/0jk72VFFYtxHU9gmbLDUHBGUAOCG/xhzIa6Rh77F6BnQnipKYL/sw== dependencies: "@mattrglobal/bls12381-key-pair" "^0.5.0" - "@transmute/ld-key-pair" "^0.7.0-unstable.64" + "@transmute/ld-key-pair" "^0.7.0-unstable.66" "@transmute/compressable-bitstring@^0.7.0-unstable.35": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/compressable-bitstring/-/compressable-bitstring-0.7.0-unstable.64.tgz#a2bee39fa4ff210739de84abbb2f74938827a32c" - integrity sha512-ozWd72bRroK8F7j+uWCCMlkyO7u4DN8G6UWu+BqqS5beQKRyTXsL159UgBa58iB+GSIlnNTOmJoQr9cbtqiiUQ== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/compressable-bitstring/-/compressable-bitstring-0.7.0-unstable.66.tgz#6d9349faffe276f3849cbcf22086a7c8811d5ad9" + integrity sha512-fxyiVPZjj5ApWN6IX7e1b7Awmv710Y++8+1UrLzJz4VfwWTBf4pDZ08FYaMB9bT7NGlKfENKa+19UR4jLq0/Og== dependencies: base64url "^3.0.1" pako "^2.0.3" @@ -3541,9 +3567,9 @@ integrity sha512-CwBeuU5vkaXkDLYadq3bPruFkutfBg9PTZLU4kTL4aIAGzWHUaUUW89eMzu4SNBt3sra4FhqadR35gniXaUWeg== "@transmute/credentials-context@^0.7.0-unstable.34", "@transmute/credentials-context@^0.7.0-unstable.35": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/credentials-context/-/credentials-context-0.7.0-unstable.64.tgz#d82e923df3932800e232f541c0fbcd37934dcb2e" - integrity sha512-hNLVY2+dZusV/mMvznDUmHMwljiGeJPAnRH5HogEw2Cp/iAn8qAIn41vtCbvciaxvfs8YMVOxDC2E2akbmf9GQ== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/credentials-context/-/credentials-context-0.7.0-unstable.66.tgz#4d13b894cfdf5625c647336eb2683418842a6133" + integrity sha512-1BGoZ+nbApiNI1NcCxL8aBWFYNtMkT+Z8xUm3lS0cmw0K5OiS9YdcRPjM59fZgcgndtqlnoKkAeS/iAdJU72nQ== "@transmute/did-context@^0.6.1-unstable.25", "@transmute/did-context@^0.6.1-unstable.36": version "0.6.1-unstable.37" @@ -3551,27 +3577,17 @@ integrity sha512-p/QnG3QKS4218hjIDgdvJOFATCXsAnZKgy4egqRrJLlo3Y6OaDBg7cA73dixOwUPoEKob0K6rLIGcsCI/L1acw== "@transmute/did-context@^0.7.0-unstable.35": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/did-context/-/did-context-0.7.0-unstable.64.tgz#96fe8ab559e443a5748be1dd4d5b4d0472defb7d" - integrity sha512-8otd7pKxfNIbeMECc1oDG8iKgf0fiD9tM6TqITyBmQN9G/xhJdw09FmaG328wTnw7gVGv7vp89n/eVnag1mJ6w== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/did-context/-/did-context-0.7.0-unstable.66.tgz#48017b25af482e200090e2a9ae9b0032f402126c" + integrity sha512-WVlhAfedtolH9Uhic1lbA2pg4VxhJZfQxlw6OY6QxejNC4ps8JxXtWGkcknNhOs5BfATt/vvcJoHkTNAF4suXA== -"@transmute/did-key-bls12381@^0.2.1-unstable.42": - version "0.2.1-unstable.42" - resolved "https://registry.yarnpkg.com/@transmute/did-key-bls12381/-/did-key-bls12381-0.2.1-unstable.42.tgz#d2f2252043cf9c1e874acbc7f51fd9f4bcd7707a" - integrity sha512-NYe8Sp09+M20BtXEd/GhVeqzVksdl5pKf71nCMpvjZHHKG5FPAcGc5uYpbk/CbY5Xb/2lH76lTndim0IMU6IIQ== - dependencies: - "@mattrglobal/bbs-signatures" "^0.5.0" - "@mattrglobal/bls12381-key-pair" "^0.5.0" - base64url "^3.0.1" - bs58 "^4.0.1" - -"@transmute/did-key-bls12381@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-bls12381/-/did-key-bls12381-0.3.0-unstable.8.tgz#8b5b850099432eef9dfb9e564fb1c0f8d0477115" - integrity sha512-H4MbnGm+p1jNCcl1KO7xaeJA7FANfHXIJlS2dlPkqmQl7g1HRGkOHOG6KAH88TbDaRh04W2IhKtaff1F2T0dUA== +"@transmute/did-key-bls12381@^0.3.0-unstable.8", "@transmute/did-key-bls12381@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-bls12381/-/did-key-bls12381-0.3.0-unstable.9.tgz#b4d6f5c652aa326703b163092789e199dce17bed" + integrity sha512-0qw9X91CoGnXQMq1e5IVXg7vsSPluCdwJ/XUUGSw+FcyIRIVkTbSuhfv1lwy2emK4d+lFvalBkcyl3v7i6Zfkw== dependencies: "@transmute/bls12381-key-pair" "^0.7.0-unstable.2" - "@transmute/did-key-common" "^0.3.0-unstable.8" + "@transmute/did-key-common" "^0.3.0-unstable.9" "@transmute/did-key-cipher@^0.2.1-unstable.42": version "0.2.1-unstable.42" @@ -3594,10 +3610,10 @@ canonicalize "^1.0.3" cbor "^5.1.0" -"@transmute/did-key-common@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-common/-/did-key-common-0.3.0-unstable.8.tgz#0c6be67d8a312b76c5377b9a08fec9bb7168b960" - integrity sha512-R/EaPMKjd2n7BKNr9y6rpnwe+QvCbxaVdTVWfO43OfgtBjeXQSZEURwgK4cMJ4yTSmGcg+vWecJHX7ciUkpWiQ== +"@transmute/did-key-common@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-common/-/did-key-common-0.3.0-unstable.9.tgz#bf30151ce84e895732ffe26f7e9d6298c7ac80c5" + integrity sha512-qGzFJA615Gu/UnAvuSNrRvtCCKRVvxCmuDawenudyGR8X8WkkJ19uD8kI0GaCzZazpX1SWiairM87nKJ9aH7Tw== dependencies: "@did-core/data-model" "^0.1.1-unstable.13" "@did-core/did-ld-json" "^0.1.1-unstable.13" @@ -3605,7 +3621,7 @@ "@transmute/ld-key-pair" "^0.6.1-unstable.36" "@transmute/security-context" "^0.6.1-unstable.36" -"@transmute/did-key-ed25519@^0.2.1-unstable.37", "@transmute/did-key-ed25519@^0.2.1-unstable.42": +"@transmute/did-key-ed25519@^0.2.1-unstable.37": version "0.2.1-unstable.42" resolved "https://registry.yarnpkg.com/@transmute/did-key-ed25519/-/did-key-ed25519-0.2.1-unstable.42.tgz#b319eea9991f3ed092c221fee69bbe1edd71d8a1" integrity sha512-FObeBtLd5Dl2rng8pBXQ0ddGAUpv9Upl07mDNWanfCWNxsO3csLv1JskLgp5ZTKwDaoWkUMMU+DTOQVVcHKpPw== @@ -3618,15 +3634,15 @@ bs58 "^4.0.1" canonicalize "^1.0.1" -"@transmute/did-key-ed25519@^0.3.0-unstable.5", "@transmute/did-key-ed25519@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-ed25519/-/did-key-ed25519-0.3.0-unstable.8.tgz#ee2aae474e3908b1729ebb8d6d2cc34a54cd2e48" - integrity sha512-j6MQrUOVLsPqWRD7fn5XNwnE8Skb8jhJa61csDaJSCUQDvmlVwjaHpj+T/DS/MQ5AhQ+eLdtcVtOSjk4lc3NZA== +"@transmute/did-key-ed25519@^0.3.0-unstable.5", "@transmute/did-key-ed25519@^0.3.0-unstable.8", "@transmute/did-key-ed25519@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-ed25519/-/did-key-ed25519-0.3.0-unstable.9.tgz#0bc859de37cf9d7e608dd6b58dcac4663609b971" + integrity sha512-mFTTL1IHp26JweHN/SCj2Re5iBr5sWbyctd5LRoHRU1DQB0XmBBFX5ZzCCtnEiBGvDF55Eyx1vpkwUHIcD3QGg== dependencies: - "@transmute/did-key-common" "^0.3.0-unstable.8" + "@transmute/did-key-common" "^0.3.0-unstable.9" "@transmute/ed25519-key-pair" "^0.6.1-unstable.37" -"@transmute/did-key-secp256k1@^0.2.1-unstable.35", "@transmute/did-key-secp256k1@^0.2.1-unstable.42": +"@transmute/did-key-secp256k1@0.2.1-unstable.42", "@transmute/did-key-secp256k1@^0.2.1-unstable.35": version "0.2.1-unstable.42" resolved "https://registry.yarnpkg.com/@transmute/did-key-secp256k1/-/did-key-secp256k1-0.2.1-unstable.42.tgz#619a2bcc10c53adb831930610f1c49f5ec771261" integrity sha512-pLHsxVEeJYUz2jaUWznGJHRaRE+Fg3A4DiArWYpRSozYaSW5x2AhXELN+08qvU4E8FjiQmqInf8KqeS0hlUJoQ== @@ -3638,32 +3654,25 @@ canonicalize "^1.0.1" secp256k1 "^4.0.1" -"@transmute/did-key-secp256k1@^0.3.0-unstable.5", "@transmute/did-key-secp256k1@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-secp256k1/-/did-key-secp256k1-0.3.0-unstable.8.tgz#ce936e960b580109d6a43be2f517c2dc793616af" - integrity sha512-bLDmW6yaWwkxV5SHfqLngjEzWo6hZiC3xGfMzo6QTI4zp8MwybHbcuGdC2R8F9gjQ5k895JDIIXD6MABi5Hh8w== +"@transmute/did-key-secp256k1@^0.3.0-unstable.5", "@transmute/did-key-secp256k1@^0.3.0-unstable.8", "@transmute/did-key-secp256k1@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-secp256k1/-/did-key-secp256k1-0.3.0-unstable.9.tgz#993eaa5dd0c519f4d562818560615f6528da2842" + integrity sha512-xlL3GWF2bYYJwbKeRjDFQixf/t085VW/2wODH+a3LfwMd9c7B6o7cavH5FqaqfDL3LwcsteUk/m7ZUlj59RbvQ== dependencies: - "@transmute/did-key-common" "^0.3.0-unstable.8" + "@transmute/did-key-common" "^0.3.0-unstable.9" "@transmute/secp256k1-key-pair" "^0.7.0-unstable.2" -"@transmute/did-key-test-vectors@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-test-vectors/-/did-key-test-vectors-0.3.0-unstable.8.tgz#445daa5f25435d11f922ac8d779032fa97004208" - integrity sha512-3m3TeLCvaDKlSjMqAfNho+rowjByC/pFStgpr2P7e+VSe2exACJei93rkn3YJ7OleAtNkxRznaiFQRdQfSsNlw== - -"@transmute/did-key-web-crypto@^0.2.1-unstable.42": - version "0.2.1-unstable.42" - resolved "https://registry.yarnpkg.com/@transmute/did-key-web-crypto/-/did-key-web-crypto-0.2.1-unstable.42.tgz#3f400bff3019ec722bf6047136436065bd051eaa" - integrity sha512-GaD320cZxPJAVdQtSrxgTn91T1M/2qwSMQgowVdnY5HKEik2BS3o1kU7DYAJpUPdU2WNKg9W3Rr+C/dRY0Q0rQ== - dependencies: - "@transmute/web-crypto-key-pair" "^0.6.1-unstable.18" +"@transmute/did-key-test-vectors@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-test-vectors/-/did-key-test-vectors-0.3.0-unstable.9.tgz#a854b07c42e9c98676d62a1bc22e32b2ca83abe1" + integrity sha512-CD2FTShzLVcRYDtB3XFHZaXhZKE5dQYozuEEJf5JnrW8OQaHNHKfI4xxVtZWzblSC6jfTnRsIqUkLsI8NRkORA== -"@transmute/did-key-web-crypto@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-web-crypto/-/did-key-web-crypto-0.3.0-unstable.8.tgz#316d984e2b0123f37f503f2a4570ce6940a99b47" - integrity sha512-LT3xBsuarMDOxKmyjBqIVkNn0qS/z5iHw32vHjiNpLI1z3cIudQWcl/8WC5odi8/uLhTwjzHdYgegCRApxi0Ug== +"@transmute/did-key-web-crypto@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-web-crypto/-/did-key-web-crypto-0.3.0-unstable.9.tgz#29ed1ce7924bc8a97458b6f2c841266fe14731fe" + integrity sha512-U7eBlgiT+yj5TtanyNbu8gvEmQtzl+qoQ6zJn2PqMy18XW5VSwh/Pia09WXdEEDF4fgs+jAWP/Sbvbcectnu9g== dependencies: - "@transmute/did-key-common" "^0.3.0-unstable.8" + "@transmute/did-key-common" "^0.3.0-unstable.9" "@transmute/web-crypto-key-pair" "^0.7.0-unstable.2" "@transmute/did-key-x25519@^0.2.1-unstable.42": @@ -3680,36 +3689,26 @@ bs58 "^4.0.1" canonicalize "^1.0.1" -"@transmute/did-key-x25519@^0.3.0-unstable.5", "@transmute/did-key-x25519@^0.3.0-unstable.8": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key-x25519/-/did-key-x25519-0.3.0-unstable.8.tgz#b0364b723c8793134d2765a6ba057352430c9d1c" - integrity sha512-vv1NF7x8JSGlqqveqQgk7l4koHS60xeKEcSW+9upHPwPZAkkEnFsEW+GLobvSZSvvOjgS3NSyseHsmnmTMZvxQ== +"@transmute/did-key-x25519@^0.3.0-unstable.5", "@transmute/did-key-x25519@^0.3.0-unstable.8", "@transmute/did-key-x25519@^0.3.0-unstable.9": + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key-x25519/-/did-key-x25519-0.3.0-unstable.9.tgz#d008e69d88b9234acef201498000b7716e7d556a" + integrity sha512-swu/v4C71eot8e3uXpHgeNROyx2P69W6NA79EacXT27y6kRsRfKWLBbcMvJdQCVCeG3YEHwy+JFD9A/cHEDmkQ== dependencies: - "@transmute/did-key-common" "^0.3.0-unstable.8" + "@transmute/did-key-common" "^0.3.0-unstable.9" "@transmute/x25519-key-pair" "^0.7.0-unstable.1" -"@transmute/did-key.js@^0.2.1-unstable.42": - version "0.2.1-unstable.42" - resolved "https://registry.yarnpkg.com/@transmute/did-key.js/-/did-key.js-0.2.1-unstable.42.tgz#f919e3371df8fa90ae1ccc52b1afcb7f6a2268ef" - integrity sha512-vqwkJeAIkpekSCszKztIOVGFuWZMF8GJfiSHMv+vsS0cgLqzHer8WCUCudWt76rc2s90uK7FdlkvdwoZgGRl6g== - dependencies: - "@transmute/did-key-bls12381" "^0.2.1-unstable.42" - "@transmute/did-key-ed25519" "^0.2.1-unstable.42" - "@transmute/did-key-secp256k1" "^0.2.1-unstable.42" - "@transmute/did-key-web-crypto" "^0.2.1-unstable.42" - "@transmute/did-key-x25519" "^0.2.1-unstable.42" - "@transmute/did-key.js@^0.3.0-unstable": - version "0.3.0-unstable.8" - resolved "https://registry.yarnpkg.com/@transmute/did-key.js/-/did-key.js-0.3.0-unstable.8.tgz#e5341487dbbe2f03f91dbd42e2fac618ce06be42" - integrity sha512-KNq4h/tPgZOnSVel38/xx9hgWKzAtR7m8ZrIT05vk9kv024hxEy9U7jc4CkeAp5LPvAaH9vBdTIxw+p6Ru5MuQ== - dependencies: - "@transmute/did-key-bls12381" "^0.3.0-unstable.8" - "@transmute/did-key-ed25519" "^0.3.0-unstable.8" - "@transmute/did-key-secp256k1" "^0.3.0-unstable.8" - "@transmute/did-key-test-vectors" "^0.3.0-unstable.8" - "@transmute/did-key-web-crypto" "^0.3.0-unstable.8" - "@transmute/did-key-x25519" "^0.3.0-unstable.8" + version "0.3.0-unstable.9" + resolved "https://registry.yarnpkg.com/@transmute/did-key.js/-/did-key.js-0.3.0-unstable.9.tgz#e66d8fc98c440ca6df4da5bbb66dcd4f40e60b9c" + integrity sha512-wqrkOqq7lPIOrDXgWJAheA+5I9AgCRibud8KdznQ3dVXOINDHGoC8lZFtTRkGB2f+OlzuZbam73oeUoFW7aSBg== + dependencies: + "@transmute/did-key-bls12381" "^0.3.0-unstable.9" + "@transmute/did-key-ed25519" "^0.3.0-unstable.9" + "@transmute/did-key-secp256k1" "^0.3.0-unstable.9" + "@transmute/did-key-test-vectors" "^0.3.0-unstable.9" + "@transmute/did-key-web-crypto" "^0.3.0-unstable.9" + "@transmute/did-key-x25519" "^0.3.0-unstable.9" + base64url "^3.0.1" "@transmute/ed25519-key-pair@0.7.0-unstable.2": version "0.7.0-unstable.2" @@ -3748,13 +3747,13 @@ "@transmute/x25519-key-pair" "^0.6.1-unstable.37" "@transmute/ed25519-signature-2018@^0.7.0-unstable.34": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/ed25519-signature-2018/-/ed25519-signature-2018-0.7.0-unstable.64.tgz#9828d975394ad0139c9f0f12f2c6cdcc8214c215" - integrity sha512-Tjtk27fXGJco/6EoxEShdQpwuI1Ua5WT+PaqrEUSW5cSNkZ7IAILyCE6rzrUjNpvK1CBXFqXSAaIHWxBbUKPAA== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/ed25519-signature-2018/-/ed25519-signature-2018-0.7.0-unstable.66.tgz#686db194e875bfee853e54d7deab3d6c71657952" + integrity sha512-rZgGKVgvzj+3Yq7yfcRFrPpevb1+lYEZWiB4uJs3np40ARl1jhIYFg/fJTwb5oENBR+GUrQzSpobNp2NocJ0tw== dependencies: "@transmute/ed25519-key-pair" "0.7.0-unstable.2" - "@transmute/jose-ld" "^0.7.0-unstable.64" - "@transmute/security-context" "^0.7.0-unstable.64" + "@transmute/jose-ld" "^0.7.0-unstable.66" + "@transmute/security-context" "^0.7.0-unstable.66" jsonld "^5.2.0" "@transmute/jose-ld@0.7.0-unstable.35": @@ -3768,10 +3767,10 @@ base64url "^3.0.1" web-streams-polyfill "^3.0.3" -"@transmute/jose-ld@^0.7.0-unstable.64": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.64.tgz#7730e99a69b78ad125c9652f5bfae9b8cc5f07d3" - integrity sha512-hfaATj3MATYnQbHxuyXe6QvXp6gpP0jMmt1jXL2ayXe9hhSIXY9KtHjW45oAOqPy+g1+VFFUQINhGR70cdvuhg== +"@transmute/jose-ld@^0.7.0-unstable.66": + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/jose-ld/-/jose-ld-0.7.0-unstable.66.tgz#35f24b09a68025a6a17cce439263316cd9aa19ee" + integrity sha512-75TuHj/w83y1aNPnj9TXeRggaYrx44W3FF9lD2lvL4NDQj6TIRa5Sxjies8rC4yoBsq/PdcHwelUTZfpQK0qhw== dependencies: "@peculiar/webcrypto" "^1.1.6" "@stablelib/aes-kw" "^1.0.0" @@ -3781,9 +3780,9 @@ web-streams-polyfill "^3.0.3" "@transmute/jsonld-document-loader@^0.7.0-unstable.62": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/jsonld-document-loader/-/jsonld-document-loader-0.7.0-unstable.64.tgz#5bf87bd741b3bd6650fbbb81a54dd6da03cb68e0" - integrity sha512-S0rhyvdmCbmCOWbY/pi0owPX/W2kjL2ZF/XSzUOVpMVI1eObFRZBH/gV77DWTaAOKGGmt07kj+cExqlNWOzy4Q== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/jsonld-document-loader/-/jsonld-document-loader-0.7.0-unstable.66.tgz#47eac40f915c4c8591d9b43e52e06a193c41c04c" + integrity sha512-fsSZgdMxy1A4pAcv9F5/AzBATwyJ/EoYLKFt05nmq/mL5vJR21Xdrcghz9YbJ/yXjz9IfFpXMDOLqFb0xa5GbQ== dependencies: factory.ts "^1.0.0" @@ -3792,10 +3791,10 @@ resolved "https://registry.yarnpkg.com/@transmute/ld-key-pair/-/ld-key-pair-0.6.1-unstable.37.tgz#ffe8af071b4ea991a49c795724b93999f4e6c8af" integrity sha512-DcTpEruAQBfOd2laZkg3uCQ+67Y7dw2hsvo42NAQ5tItCIx5AClP7zccri7T2JUcfDUFaE32z/BLTMEKYt3XZQ== -"@transmute/ld-key-pair@^0.7.0-unstable.2", "@transmute/ld-key-pair@^0.7.0-unstable.35", "@transmute/ld-key-pair@^0.7.0-unstable.62", "@transmute/ld-key-pair@^0.7.0-unstable.64": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/ld-key-pair/-/ld-key-pair-0.7.0-unstable.64.tgz#aa13425037dbed1fca7d9be813a9dbe6a53c4934" - integrity sha512-+D1r48ZhUqhlOPDzF9uDr0tAHRJ46A6NXq5vrcDLgML9drkyJFIR6TYkR5JoI3R4eWljNVY3WNMJSbDA/HPn0Q== +"@transmute/ld-key-pair@^0.7.0-unstable.2", "@transmute/ld-key-pair@^0.7.0-unstable.35", "@transmute/ld-key-pair@^0.7.0-unstable.62", "@transmute/ld-key-pair@^0.7.0-unstable.66": + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/ld-key-pair/-/ld-key-pair-0.7.0-unstable.66.tgz#3fe1df362f2c4e532d9a79778cdefeeed6b8db80" + integrity sha512-UWV6+ObnZntEkjSDvN5E48pm7xHCmAqqL6sqYuUwp3VLD4kE1x8PqkbIhddLXUjzgbcDhZUjoAcVUD2u3oBQbw== "@transmute/lds-ecdsa-secp256k1-recovery2020@^0.0.7": version "0.0.7" @@ -3830,17 +3829,17 @@ serialize-error "^7.0.1" "@transmute/revocation-list-context@^0.7.0-unstable.35": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/revocation-list-context/-/revocation-list-context-0.7.0-unstable.64.tgz#79087cd8776a3e83924b1644fd99c6a759c562b6" - integrity sha512-e6k2DraGTomSysrOBIbOw2hXsz/ivGkwDn3cRBZqkhBYPVUSvzHRasp8ZQjDJiCzd98P1j8D3Hz40D0xoVjJVg== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/revocation-list-context/-/revocation-list-context-0.7.0-unstable.66.tgz#34e357b989a85eaf9fc993d0460dde1f142ee536" + integrity sha512-z9WspizFCN2B26H6M9I3WX2rabMnncs5mh6T9agpV5AYR1s3bjN0YBjxUlvjZXevH5EXSPiJz+Y7CyJc2DS49Q== "@transmute/secp256k1-key-pair@^0.7.0-unstable.2": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/secp256k1-key-pair/-/secp256k1-key-pair-0.7.0-unstable.64.tgz#024f6bac35a19fe5400974a453e704bf9419300a" - integrity sha512-Tf2TM+OaCQcivC4sfVL+ds6hbw8hQQVjJspgG7e0x68jf49AUKPkd9aXZAWZg73XTrZakq+luLdcGux2f6NCkQ== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/secp256k1-key-pair/-/secp256k1-key-pair-0.7.0-unstable.66.tgz#eb22aaec545d66a66928cfb1278f29fa644694f1" + integrity sha512-H6oeASPaODv+4TwUmyBa4haGu5d8wQESQrE6jTbi+OwkOX2efPqLbsLJNT0BQ8uiiL7gEv2TXiIQVgD5MKamEw== dependencies: "@bitauth/libauth" "^1.18.1" - "@transmute/ld-key-pair" "^0.7.0-unstable.64" + "@transmute/ld-key-pair" "^0.7.0-unstable.66" secp256k1 "^4.0.2" "@transmute/security-context@0.0.4-unstable.2": @@ -3858,10 +3857,10 @@ resolved "https://registry.yarnpkg.com/@transmute/security-context/-/security-context-0.6.1-unstable.37.tgz#532b9238efd80dbaaa3e7dd663107cd925afadcc" integrity sha512-GtLmG65qlORrz/2S4I74DT+vA4+qXsFxrMr0cNOXjUqZBd/AW1PTrFnryLF9907BfoiD58HC9qb1WVGWjSlBYw== -"@transmute/security-context@^0.7.0-unstable.35", "@transmute/security-context@^0.7.0-unstable.64": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/security-context/-/security-context-0.7.0-unstable.64.tgz#7f4fa9ef7e12cf92219e39d032a9f8c9786e42e5" - integrity sha512-JBsxXXySX0jEzbbeNFAVSud9spak4Cd3h8PQ48RJtaIkNbWA/EJE0K7gZGW+PDoWElXPX3LSoM8UjFAxNI4BqQ== +"@transmute/security-context@^0.7.0-unstable.35", "@transmute/security-context@^0.7.0-unstable.66": + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/security-context/-/security-context-0.7.0-unstable.66.tgz#440c212210a98ca3334b81008761c0604edf1b16" + integrity sha512-HxnnwvZmsBew47NlXmlzcD5Yw6+Gt8pPDTLvoHcY2/x44jkpqmm/RgfB9AMoML1nvcUdpI3zpOF5W/6W51W79g== "@transmute/vc-status-rl-2020@0.7.0-unstable.35": version "0.7.0-unstable.35" @@ -3889,22 +3888,13 @@ jsonld-checker "^0.1.8-unstable.3" moment "^2.27.0" -"@transmute/web-crypto-key-pair@^0.6.1-unstable.18": - version "0.6.1-unstable.37" - resolved "https://registry.yarnpkg.com/@transmute/web-crypto-key-pair/-/web-crypto-key-pair-0.6.1-unstable.37.tgz#02c70d017b69c79d040965df546c06ae32311733" - integrity sha512-BVN5ECm3t5ldJiyixsdoXaptr14p2PxOOGWvyBm5eqWlVy/kiWQiVh43wZgEbHtjOkacTfw+BaVAtYkyGn2tpw== - dependencies: - "@peculiar/webcrypto" "^1.1.6" - "@transmute/ld-key-pair" "^0.6.1-unstable.37" - big-integer "^1.6.48" - "@transmute/web-crypto-key-pair@^0.7.0-unstable.2": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/web-crypto-key-pair/-/web-crypto-key-pair-0.7.0-unstable.64.tgz#3788d6242fc95758f24ee4790cff3cf00ff04ab1" - integrity sha512-+Rqtd5Y5mX8wNYKSXewgrYsSYSSRMPXaLYGFjyxKhBv2D/sstn9NP5e3szRf0rEZlSntZ0F3J6zsOjj2brM+rg== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/web-crypto-key-pair/-/web-crypto-key-pair-0.7.0-unstable.66.tgz#3aea0cadf5159cf109c0eb07c51a31e9b52342ca" + integrity sha512-V0Gwq5/J/jiw6GeDRtOVItA6+3uo0YUEyeqeIcdo7LMGcocB7jnB5ngzDbWG2QnGVigFxiRBfdb68O8YxoG3xA== dependencies: "@peculiar/webcrypto" "^1.1.6" - "@transmute/ld-key-pair" "^0.7.0-unstable.64" + "@transmute/ld-key-pair" "^0.7.0-unstable.66" big-integer "^1.6.48" "@transmute/x25519-key-pair@^0.6.1-unstable.37": @@ -3916,12 +3906,12 @@ "@transmute/ld-key-pair" "^0.6.1-unstable.37" "@transmute/x25519-key-pair@^0.7.0-unstable.1", "@transmute/x25519-key-pair@^0.7.0-unstable.2", "@transmute/x25519-key-pair@^0.7.0-unstable.35", "@transmute/x25519-key-pair@^0.7.0-unstable.62": - version "0.7.0-unstable.64" - resolved "https://registry.yarnpkg.com/@transmute/x25519-key-pair/-/x25519-key-pair-0.7.0-unstable.64.tgz#7d6d7cd4721176af3273c398f83d6f3e708eaf93" - integrity sha512-lBWLmQoWL2+/uso4gPUxaVeLYTlKsmUUPvlU2hbGSOlOEeMgtStOrA56zZ+3TJZHvnbTmTTEg1UQGTkKYQ9aTQ== + version "0.7.0-unstable.66" + resolved "https://registry.yarnpkg.com/@transmute/x25519-key-pair/-/x25519-key-pair-0.7.0-unstable.66.tgz#6cf1d72d30d419e7ba64266f3c313397de78874e" + integrity sha512-gJL03eFvkpqLOBa+Xj6MLydNA51GOzSoGtGB8jSpK2+1AO8MdbNKgXCpQx9w4szlC/WL6+ojEnyUGRfdUXm9ng== dependencies: "@stablelib/x25519" "^1.0.0" - "@transmute/ld-key-pair" "^0.7.0-unstable.64" + "@transmute/ld-key-pair" "^0.7.0-unstable.66" "@trust/keyto@^0.3.7": version "0.3.7" @@ -3993,9 +3983,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.17.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.1.tgz#1a0e73e8c28c7e832656db372b779bfd2ef37314" - integrity sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA== + version "7.18.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.0.tgz#8134fd78cb39567465be65b9fdc16d378095f41f" + integrity sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw== dependencies: "@babel/types" "^7.3.0" @@ -4130,11 +4120,11 @@ pretty-format "^27.0.0" "@types/jest@^28.1.4": - version "28.1.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.6.tgz#d6a9cdd38967d2d746861fb5be6b120e38284dd4" - integrity sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ== + version "28.1.8" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.8.tgz#6936409f3c9724ea431efd412ea0238a0f03b09b" + integrity sha512-8TJkV++s7B6XqnDrzR1m/TT0A0h948Pnl/097veySPN67VRAgQ4gZ7n2KfJo2rVq6njQjdxU3GCCyDvAeuHoiw== dependencies: - jest-matcher-utils "^28.0.0" + expect "^28.0.0" pretty-format "^28.0.0" "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": @@ -4148,9 +4138,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/mime@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.0.tgz#e9a9903894405c6a6551f1774df4e64d9804d69c" - integrity sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" + integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== "@types/minimatch@^3.0.3": version "3.0.5" @@ -4174,10 +4164,10 @@ dependencies: nock "*" -"@types/node@*": - version "18.6.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" - integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== +"@types/node@*", "@types/node@^18.7.11": + version "18.7.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.13.tgz#23e6c5168333480d454243378b69e861ab5c011a" + integrity sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw== "@types/node@11.11.6": version "11.11.6" @@ -4190,9 +4180,9 @@ integrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ== "@types/node@^14.14.43": - version "14.18.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.23.tgz#70f5f20b0b1b38f696848c1d3647bb95694e615e" - integrity sha512-MhbCWN18R4GhO8ewQWAFK4TGQdBpXWByukz7cWyJmXhvRuCIaM/oWytGPqVmDzgEnnaIc9ss6HbU5mUi+vyZPA== + version "14.18.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.26.tgz#239e19f8b4ea1a9eb710528061c1d733dc561996" + integrity sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA== "@types/node@^17.0.4": version "17.0.45" @@ -4217,9 +4207,9 @@ "@types/node" "*" "@types/prettier@^2.1.5": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.4.tgz#ad899dad022bab6b5a9f0a0fe67c2f7a4a8950ed" - integrity sha512-fOwvpvQYStpb/zHMx0Cauwywu9yLDmzWiiQBC7gJyq5tYLUXFZvDG7VK1B7WBxxjBJNKFOZ0zLoOQn8vmATbhw== + version "2.7.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.0.tgz#ea03e9f0376a4446f44797ca19d9c46c36e352dc" + integrity sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A== "@types/prop-types@*": version "15.7.5" @@ -4237,9 +4227,9 @@ integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== "@types/react@*", "@types/react@^18.0.14": - version "18.0.15" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.15.tgz#d355644c26832dc27f3e6cbf0c4f4603fc4ab7fe" - integrity sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow== + version "18.0.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.17.tgz#4583d9c322d67efe4b39a935d223edcc7050ccf4" + integrity sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4288,6 +4278,13 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== +"@types/varint@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@types/varint/-/varint-6.0.0.tgz#4ad73c23cbc9b7e44379a7729ace7ed9c8bc9854" + integrity sha512-2jBazyxGl4644tvu3VAez8UA/AtrcEetT9HOeAbqZ/vAcRVL/ZDFQjSS7rkWusU5cyONQVUz+nwwrNZdMva4ow== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" @@ -4301,9 +4298,9 @@ "@types/yargs-parser" "*" "@types/yargs@^17.0.8": - version "17.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" - integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== + version "17.0.11" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.11.tgz#5e10ca33e219807c0eee0f08b5efcba9b6a42c06" + integrity sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA== dependencies: "@types/yargs-parser" "*" @@ -4327,13 +4324,13 @@ tsutils "^3.21.0" "@typescript-eslint/eslint-plugin@^5.9.1": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz#e27e38cffa4a61226327c874a7be965e9a861624" - integrity sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew== + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.35.1.tgz#0d822bfea7469904dfc1bb8f13cabd362b967c93" + integrity sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg== dependencies: - "@typescript-eslint/scope-manager" "5.32.0" - "@typescript-eslint/type-utils" "5.32.0" - "@typescript-eslint/utils" "5.32.0" + "@typescript-eslint/scope-manager" "5.35.1" + "@typescript-eslint/type-utils" "5.35.1" + "@typescript-eslint/utils" "5.35.1" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -4364,13 +4361,13 @@ debug "^4.3.1" "@typescript-eslint/parser@^5.9.1": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.32.0.tgz#1de243443bc6186fb153b9e395b842e46877ca5d" - integrity sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A== + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.35.1.tgz#bf2ee2ebeaa0a0567213748243fb4eec2857f04f" + integrity sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg== dependencies: - "@typescript-eslint/scope-manager" "5.32.0" - "@typescript-eslint/types" "5.32.0" - "@typescript-eslint/typescript-estree" "5.32.0" + "@typescript-eslint/scope-manager" "5.35.1" + "@typescript-eslint/types" "5.35.1" + "@typescript-eslint/typescript-estree" "5.35.1" debug "^4.3.4" "@typescript-eslint/scope-manager@4.33.0": @@ -4381,20 +4378,20 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" -"@typescript-eslint/scope-manager@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz#763386e963a8def470580cc36cf9228864190b95" - integrity sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg== +"@typescript-eslint/scope-manager@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.35.1.tgz#ccb69d54b7fd0f2d0226a11a75a8f311f525ff9e" + integrity sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q== dependencies: - "@typescript-eslint/types" "5.32.0" - "@typescript-eslint/visitor-keys" "5.32.0" + "@typescript-eslint/types" "5.35.1" + "@typescript-eslint/visitor-keys" "5.35.1" -"@typescript-eslint/type-utils@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz#45a14506fe3fb908600b4cef2f70778f7b5cdc79" - integrity sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg== +"@typescript-eslint/type-utils@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.35.1.tgz#d50903b56758c5c8fc3be52b3be40569f27f9c4a" + integrity sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw== dependencies: - "@typescript-eslint/utils" "5.32.0" + "@typescript-eslint/utils" "5.35.1" debug "^4.3.4" tsutils "^3.21.0" @@ -4403,10 +4400,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/types@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" - integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== +"@typescript-eslint/types@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.35.1.tgz#af355fe52a0cc88301e889bc4ada72f279b63d61" + integrity sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ== "@typescript-eslint/typescript-estree@4.33.0": version "4.33.0" @@ -4421,28 +4418,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz#282943f34babf07a4afa7b0ff347a8e7b6030d12" - integrity sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg== +"@typescript-eslint/typescript-estree@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.35.1.tgz#db878a39a0dbdc9bb133f11cdad451770bfba211" + integrity sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA== dependencies: - "@typescript-eslint/types" "5.32.0" - "@typescript-eslint/visitor-keys" "5.32.0" + "@typescript-eslint/types" "5.35.1" + "@typescript-eslint/visitor-keys" "5.35.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.32.0.tgz#eccb6b672b94516f1afc6508d05173c45924840c" - integrity sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ== +"@typescript-eslint/utils@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.35.1.tgz#ae1399afbfd6aa7d0ed1b7d941e9758d950250eb" + integrity sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.32.0" - "@typescript-eslint/types" "5.32.0" - "@typescript-eslint/typescript-estree" "5.32.0" + "@typescript-eslint/scope-manager" "5.35.1" + "@typescript-eslint/types" "5.35.1" + "@typescript-eslint/typescript-estree" "5.35.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -4454,12 +4451,12 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@5.32.0": - version "5.32.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz#b9715d0b11fdb5dd10fd0c42ff13987470525394" - integrity sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g== +"@typescript-eslint/visitor-keys@5.35.1": + version "5.35.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.35.1.tgz#285e9e34aed7c876f16ff646a3984010035898e6" + integrity sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g== dependencies: - "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/types" "5.35.1" eslint-visitor-keys "^3.3.0" "@unimodules/core@*": @@ -5071,9 +5068,9 @@ anymatch@^3.0.3: picomatch "^2.0.4" app-root-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" - integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" + integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== aproba@^1.0.3: version "1.2.0" @@ -5119,6 +5116,11 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +argon2-browser@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/argon2-browser/-/argon2-browser-1.18.0.tgz#f35820211e0a431aed7f82b9348477234be69bec" + integrity sha512-ImVAGIItnFnvET1exhsQB7apRztcoC5TnlSqernMJDUjbc/DLq3UEYeXFrLPrlaIl8cVfwnXb6wX2KpFf2zxHw== + argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -5393,11 +5395,6 @@ babel-plugin-jest-hoist@^28.1.3: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-rewrite-require@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-rewrite-require/-/babel-plugin-rewrite-require-1.9.0.tgz#e65e778602c75bf655ec871e594a72d8ab54cf63" - integrity sha512-+Kb64X5NyDVTLh9ZNxwLkuzK2ZVUMeEW3rDopgpupjNVJO7sg94S9U2YTFEchdOYkoir9AaLS2cOFpeOYA678g== - babel-preset-current-node-syntax@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" @@ -5514,9 +5511,9 @@ bignumber.js@^8.1.1: integrity sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ== bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" - integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== bin-links@^2.2.1: version "2.3.0" @@ -5583,12 +5580,12 @@ blessed@^0.1.81: resolved "https://registry.yarnpkg.com/blessed/-/blessed-0.1.81.tgz#f962d687ec2c369570ae71af843256e6d0ca1129" integrity sha512-LoF5gae+hlmfORcG1M5+5XZi4LBmvlXTzwJWzUlPryN/SJdSflZvROM2TwkT0GMpq7oqT48NRd4GS7BiVBc5OQ== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.8, bn.js@^4.11.9: +bn.js@^4.0.0, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -5656,7 +5653,7 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1, brorand@^1.1.0: +brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== @@ -5666,7 +5663,7 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify-aes@^1.2.0: +browserify-aes@^1.0.6, browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -5678,48 +5675,6 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify- inherits "^2.0.1" safe-buffer "^5.0.1" -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - browserslist@^4.20.2: version "4.21.3" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" @@ -5780,14 +5735,6 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -5796,6 +5743,14 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" @@ -5887,9 +5842,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001370: - version "1.0.30001373" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be" - integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ== + version "1.0.30001383" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001383.tgz#aecf317ccd940690725ae3ae4f28293c5fb8050e" + integrity sha512-swMpEoTp5vDoGBZsYZX7L7nXHe6dsHxi9o6/LKf/f0LukVtnrxly5GVb/fWdCDTqi/yw6Km6tiJ0pmBacm0gbg== canonicalize@1.0.1: version "1.0.1" @@ -6305,9 +6260,9 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control- integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== console-table-printer@^2.10.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/console-table-printer/-/console-table-printer-2.11.0.tgz#704a74cb56d66267a2527f500fedcaa78ca76259" - integrity sha512-F5H5/lFciTV2OBI/xDh/x7nZAM6YPqkbkoIxr8px4B/nSvUV4ymsi4BL0bwRwrRcOgtp/LqGJGgGmkicAMd8LQ== + version "2.11.1" + resolved "https://registry.yarnpkg.com/console-table-printer/-/console-table-printer-2.11.1.tgz#c2dfe56e6343ea5bcfa3701a4be29fe912dbd9c7" + integrity sha512-8LfFpbF/BczoxPwo2oltto5bph8bJkGOATXsg3E9ddMJOGnWJciKHldx2zDj5XIBflaKzPfVCjOTl6tMh7lErg== dependencies: simple-wcswidth "^1.0.1" @@ -6474,14 +6429,6 @@ crc-32@^1.2.0: resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -6493,7 +6440,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@1.1.7, create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@1.1.7, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -6536,23 +6483,6 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - crypto-js@^3.1.9-1: version "3.3.0" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" @@ -6652,9 +6582,9 @@ data-urls@^2.0.0: whatwg-url "^8.0.0" date-fns@^2.28.0: - version "2.29.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.1.tgz#9667c2615525e552b5135a3116b95b1961456e60" - integrity sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw== + version "2.29.2" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.2.tgz#0d4b3d0f3dff0f920820a070920f0d9662c51931" + integrity sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA== dateformat@^3.0.0: version "3.0.3" @@ -6701,9 +6631,9 @@ decamelize@^1.1.0: integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== + version "10.4.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.0.tgz#97a7448873b01e92e5ff9117d89a7bca8e63e0fe" + integrity sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg== decode-uri-component@^0.2.0: version "0.2.0" @@ -6789,14 +6719,6 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -6866,6 +6788,24 @@ did-jwt@5.11.1: multiformats "^9.4.10" uint8arrays "^3.0.0" +did-jwt@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-6.2.0.tgz#5c4009871ad1ad85ec80c14c501a52991a16e7a1" + integrity sha512-BokZHvwStx4K5s3a/0TXs649b1Tjl5S9X4X80gQjdkQFlg33Z0qh/DTfctDI8dWyapMR69yUPtMlLdDxwWQEQQ== + dependencies: + "@stablelib/ed25519" "^1.0.2" + "@stablelib/random" "^1.0.1" + "@stablelib/sha256" "^1.0.1" + "@stablelib/x25519" "^1.0.2" + "@stablelib/xchacha20poly1305" "^1.0.1" + bech32 "^2.0.0" + canonicalize "^1.0.8" + did-resolver "^3.2.2" + elliptic "^6.5.4" + js-sha3 "^0.8.0" + multiformats "^9.6.5" + uint8arrays "^3.0.0" + did-jwt@^5.11.1, did-jwt@^5.12.3: version "5.12.4" resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-5.12.4.tgz#6357a550173b7155f2e5cf3b8ea3f8e8be180617" @@ -6884,10 +6824,10 @@ did-jwt@^5.11.1, did-jwt@^5.12.3: multiformats "^9.4.10" uint8arrays "^3.0.0" -did-jwt@^6.2.0, did-jwt@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-6.2.2.tgz#6a3e84bb0d75dee510ba2481f31b9c1530a41cc8" - integrity sha512-/OJBpNkNIUGZW5L5GzuSivpB+RvRhOdRKMQ9a3KAzyTNI85RUoxelqYDwmUOA6i+MKVeJQaONf4beT03ACgQ/w== +did-jwt@^6.2.2: + version "6.6.0" + resolved "https://registry.yarnpkg.com/did-jwt/-/did-jwt-6.6.0.tgz#e7c932f7e3ff992b15aef7db3d530c81fb34902d" + integrity sha512-qSjXEEHS4fSbBHRCC/ObDzPVkCVvuXIfIiGWa03HNRr85gGkbxzBrxUsUbXfXo1CuzeCqmmZpK4nM4VWlZh6bQ== dependencies: "@stablelib/ed25519" "^1.0.2" "@stablelib/random" "^1.0.1" @@ -6937,15 +6877,6 @@ diff@^5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.0, dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -7112,11 +7043,11 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.202: - version "1.4.210" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.210.tgz#12611fe874b833a3bf3671438b5893aba7858980" - integrity sha512-kSiX4tuyZijV7Cz0MWVmGT8K2siqaOA4Z66K5dCttPPRh0HicOcOAEj1KlC8O8J1aOS/1M8rGofOzksLKaHWcQ== + version "1.4.230" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.230.tgz#666909fdf5765acb1348b69752ee9955dc1664b7" + integrity sha512-3pwjAK0qHSDN9+YAF4fJknsSruP7mpjdWzUSruIJD/JCH77pEh0SorEyb3xVaKkfwk2tzjOt2D8scJ0KAdfXLA== -elliptic@6.5.4, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.4.1, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -7388,12 +7319,11 @@ eslint-import-resolver-node@^0.3.6: resolve "^1.20.0" eslint-module-utils@^2.7.3: - version "2.7.3" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" - integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== dependencies: debug "^3.2.7" - find-up "^2.1.0" eslint-plugin-eslint-comments@^3.2.0: version "3.2.0" @@ -7514,9 +7444,9 @@ eslint@^7.32.0: v8-compile-cache "^2.0.3" eslint@^8.7.0: - version "8.21.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.21.0.tgz#1940a68d7e0573cef6f50037addee295ff9be9ef" - integrity sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA== + version "8.22.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" + integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== dependencies: "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.10.4" @@ -7789,7 +7719,7 @@ events@^3.2.0, events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: +evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== @@ -7842,7 +7772,7 @@ expect@^27.5.1: jest-matcher-utils "^27.5.1" jest-message-util "^27.5.1" -expect@^28.1.3: +expect@^28.0.0, expect@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== @@ -8106,7 +8036,7 @@ find-replace@^1.0.3: array-back "^1.0.4" test-value "^2.1.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== @@ -8145,9 +8075,9 @@ flat-cache@^3.0.4: rimraf "^3.0.2" flatted@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" - integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== follow-redirects@^1.14.0: version "1.15.1" @@ -8608,7 +8538,7 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -8641,6 +8571,11 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" +hash-wasm@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/hash-wasm/-/hash-wasm-4.9.0.tgz#7e9dcc9f7d6bd0cc802f2a58f24edce999744206" + integrity sha512-7SW7ejyfnRxuOc7ptQHSf4LDoZaWOivfzqw+5rpcQku0nHfmicPKE51ra9BiRLAmT8+gGLestr1XroUkqdjL6w== + hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -8873,7 +8808,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -9056,9 +8991,9 @@ is-cidr@^4.0.2: cidr-regex "^3.1.1" is-core-module@^2.1.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" @@ -9721,7 +9656,7 @@ jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.3: +jest-matcher-utils@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== @@ -10145,9 +10080,9 @@ jose@^1.28.1: "@panva/asn1.js" "^1.0.0" jose@^4.3.8: - version "4.8.3" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.8.3.tgz#5a754fb4aa5f2806608d083f438e6916b11087da" - integrity sha512-7rySkpW78d8LBp4YU70Wb7+OTgE3OwAALNVZxhoIhp4Kscp+p/fBkdpxGAMKxvCAMV4QfXBU9m6l9nX/vGwd2g== + version "4.9.0" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.9.0.tgz#98ecaf81b13361d1931c0126e3f765549c782f92" + integrity sha512-RgaqEOZLkVO+ViN3KkN44XJt9g7+wMveUv59sVLaTxONcUPc8ZpfqOCeLphVBZyih2dgkvZ0Ap1CNcokvY7Uyw== js-sha256@^0.9.0: version "0.9.0" @@ -11085,14 +11020,6 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -11314,7 +11241,7 @@ msrcrypto@^1.5.6: resolved "https://registry.yarnpkg.com/msrcrypto/-/msrcrypto-1.5.8.tgz#be419be4945bf134d8af52e9d43be7fa261f4a1c" integrity sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q== -multibase@^4.0.2, multibase@^4.0.6: +multibase@^4.0.2, multibase@^4.0.6, multibase@~4.0.2: version "4.0.6" resolved "https://registry.yarnpkg.com/multibase/-/multibase-4.0.6.tgz#6e624341483d6123ca1ede956208cb821b440559" integrity sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ== @@ -11329,7 +11256,7 @@ multicodec@^3.0.0, multicodec@^3.2.1: uint8arrays "^3.0.0" varint "^6.0.0" -multiformats@^9.4.10, multiformats@^9.4.2, multiformats@^9.6.5, multiformats@^9.7.0: +multiformats@^9.4.10, multiformats@^9.4.2, multiformats@^9.6.5, multiformats@^9.7.1: version "9.7.1" resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.7.1.tgz#ab348e5fd6f8e7fb3fd56033211bda48854e2173" integrity sha512-TaVmGEBt0fhxiNJMGphBfB+oGvUxFs8KgGvgl8d3C+GWtrFcvXdJ2196eg+dYhmSFClmgFfSfJEklo+SZzdNuw== @@ -11459,7 +11386,7 @@ nerf-dart@^1.0.0: resolved "https://registry.yarnpkg.com/nerf-dart/-/nerf-dart-1.0.0.tgz#e6dab7febf5ad816ea81cf5c629c5a0ebde72c1a" integrity sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g== -nock@*, nock@^13.2.1: +nock@*, nock@^13.2.1, nock@^13.2.9: version "13.2.9" resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.9.tgz#4faf6c28175d36044da4cfa68e33e5a15086ad4c" integrity sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA== @@ -11957,13 +11884,13 @@ object-keys@^1.1.1: integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" object.entries@^1.1.1, object.entries@^1.1.2: @@ -12288,17 +12215,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-conflict-json@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/parse-conflict-json/-/parse-conflict-json-1.1.1.tgz#54ec175bde0f2d70abf6be79e0e042290b86701b" @@ -12460,7 +12376,7 @@ pause@0.0.1: resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" integrity sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg== -pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: +pbkdf2@^3.0.17, pbkdf2@^3.0.9: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -12486,10 +12402,10 @@ pg-int8@1.0.1: resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== -pg-pool@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.5.1.tgz#f499ce76f9bf5097488b3b83b19861f28e4ed905" - integrity sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ== +pg-pool@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.5.2.tgz#ed1bed1fb8d79f1c6fd5fb1c99e990fbf9ddf178" + integrity sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w== pg-protocol@^1.5.0: version "1.5.0" @@ -12508,14 +12424,14 @@ pg-types@^2.1.0: postgres-interval "^1.1.0" pg@^8.7.1: - version "8.7.3" - resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.3.tgz#8a5bdd664ca4fda4db7997ec634c6e5455b27c44" - integrity sha512-HPmH4GH4H3AOprDJOazoIcpI49XFsHCe8xlrjHkWiapdbHK+HLtbm/GQzXYAZwmPju/kzKhjaSfMACG+8cgJcw== + version "8.8.0" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.8.0.tgz#a77f41f9d9ede7009abfca54667c775a240da686" + integrity sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw== dependencies: buffer-writer "2.0.0" packet-reader "1.0.0" pg-connection-string "^2.5.0" - pg-pool "^3.5.1" + pg-pool "^3.5.2" pg-protocol "^1.5.0" pg-types "^2.1.0" pgpass "1.x" @@ -12754,18 +12670,6 @@ psl@^1.1.28, psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -12897,21 +12801,13 @@ random-bytes@~1.0.0: resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b" integrity sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ== -randombytes@2.1.0, randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@2.1.0, randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -13109,7 +13005,7 @@ read@1, read@^1.0.7, read@~1.0.1, read@~1.0.7: dependencies: mute-stream "~0.0.4" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -13759,9 +13655,9 @@ socks@^2.3.3, socks@^2.6.2: smart-buffer "^4.2.0" sodium-native@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-3.3.0.tgz#50ee52ac843315866cce3d0c08ab03eb78f22361" - integrity sha512-rg6lCDM/qa3p07YGqaVD+ciAbUqm6SoO4xmlcfkbU5r1zIGrguXztLiEtaLYTV5U6k8KSIUFmnU3yQUSKmf6DA== + version "3.4.1" + resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-3.4.1.tgz#44616c07ccecea15195f553af88b3e574b659741" + integrity sha512-PaNN/roiFWzVVTL6OqjzYct38NSXewdl2wz8SRB51Br/MLIJPrbM3XexhVWkq7D3UWMysfrhKVf1v1phZq6MeQ== dependencies: node-gyp-build "^4.3.0" @@ -13832,9 +13728,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" - integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== + version "3.0.12" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" + integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== split-on-first@^1.0.0: version "1.1.0" @@ -13929,14 +13825,6 @@ str2buf@^1.3.0: resolved "https://registry.yarnpkg.com/str2buf/-/str2buf-1.3.0.tgz#a4172afff4310e67235178e738a2dbb573abead0" integrity sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA== -stream-browserify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" - integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== - dependencies: - inherits "~2.0.4" - readable-stream "^3.5.0" - stream-combiner2@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" @@ -14175,9 +14063,9 @@ supports-preserve-symlinks-flag@^1.0.0: integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== swagger-ui-dist@>=4.11.0: - version "4.13.2" - resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-4.13.2.tgz#fb814efd51bf06aa8630c0a0af6e3caa48ac6552" - integrity sha512-jHL6UyIYpvEI7NsuWd0R3hJaPQTg6Oo4qSBo+oVfOEkv6rrQm/475RGSMmZgV6ajp+Sgrp9CqrDjQYAgQqiv1A== + version "4.14.0" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-4.14.0.tgz#e34d807464eb84578c43902e393084a1a6fbda52" + integrity sha512-TBzhheU15s+o54Cgk9qxuYcZMiqSm/SkvKnapoGHOF66kz0Y5aGjpzj5BT/vpBbn6rTPJ9tUYXQxuDWfsjiGMw== swagger-ui-express@^4.3.0: version "4.5.0" @@ -14400,13 +14288,14 @@ toml@^2.3.0: integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ== tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + version "4.1.1" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.1.tgz#3600960f1e1c83545f130ac80043b9de8e5d488b" + integrity sha512-Ns3k8QxkEzIfLZbRwLOrMPDqRa1BEAl4BzNNAOYY4BhBmEkf+HvP467F4NrD9loK3NcYflWOpUH3LJg0ehq/rQ== dependencies: psl "^1.1.33" punycode "^2.1.1" - universalify "^0.1.2" + universalify "^0.2.0" + url-parse "^1.5.3" tough-cookie@~2.5.0: version "2.5.0" @@ -14475,9 +14364,9 @@ ts-jest@^27.0.7, ts-jest@^27.1.3: yargs-parser "20.x" ts-jest@^28.0.5: - version "28.0.7" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.7.tgz#e18757a9e44693da9980a79127e5df5a98b37ac6" - integrity sha512-wWXCSmTwBVmdvWrOpYhal79bDpioDy4rTT+0vyUnE3ZzM7LOAAGG9NXwzkEL/a516rQEgnMmS/WKP9jBPCVJyA== + version "28.0.8" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.8.tgz#cd204b8e7a2f78da32cf6c95c9a6165c5b99cc73" + integrity sha512-5FaG0lXmRPzApix8oFG8RKjAz4ehtm8yMKOTy5HX3fY6W8kmvOrmcY0hKDElW52FJov+clhUbrKAqofnj4mXTg== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" @@ -14705,7 +14594,12 @@ typescript@4.4.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== -typescript@^4.4.3, typescript@^4.5.2, typescript@^4.5.4, typescript@^4.7.4: +typescript@4.6.4, typescript@~4.6.2, typescript@~4.6.3: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== + +typescript@^4.4.3, typescript@^4.5.2, typescript@^4.5.4, typescript@^4.7.4, typescript@~4.7.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== @@ -14715,20 +14609,15 @@ typescript@~4.4.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== -typescript@~4.6.2, typescript@~4.6.3: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== - typical@^2.6.0, typical@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" integrity sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg== uglify-js@^3.1.4: - version "3.16.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d" - integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw== + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== uid-number@0.0.6: version "0.0.6" @@ -14749,7 +14638,14 @@ uint8arrays@3.0.0: dependencies: multiformats "^9.4.2" -uint8arrays@^3.0.0: +uint8arrays@^2.0.5: + version "2.1.10" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-2.1.10.tgz#34d023c843a327c676e48576295ca373c56e286a" + integrity sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A== + dependencies: + multiformats "^9.4.2" + +uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.0.tgz#8186b8eafce68f28bd29bd29d683a311778901e2" integrity sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog== @@ -14802,11 +14698,16 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0, universalify@^0.1.2: +universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -14854,7 +14755,7 @@ url-join@^4.0.0: resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== -url-parse@^1.5.1, url-parse@^1.5.4: +url-parse@^1.5.1, url-parse@^1.5.3, url-parse@^1.5.4: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== @@ -15177,9 +15078,9 @@ write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: typedarray-to-buffer "^3.1.5" write-file-atomic@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" - integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ== + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== dependencies: imurmurhash "^0.1.4" signal-exit "^3.0.7" @@ -15303,9 +15204,9 @@ yargs-parser@^10.0.0: camelcase "^4.1.0" yargs-parser@^21.0.0, yargs-parser@^21.0.1: - version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^16.0.0, yargs@^16.1.0, yargs@^16.2.0: version "16.2.0"