From 90d3ee9b96fa9aaf90c8266386e07c0a638239d4 Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Apr 2024 22:15:10 +0200 Subject: [PATCH 1/4] chore: upgrade to Credo 0.5.2 Signed-off-by: Timo Glastra --- README.md | 8 +- package.json | 21 +- src/anoncreds/DidWebAnonCredsRegistry.ts | 23 +- test/__fixtures__/credentialDefinition1.json | 25 + .../revocationRegistryDefinition1.json | 16 + test/__fixtures__/schema1.json | 6 + test/agent.ts | 22 + test/credentialDefinition.test.ts | 72 +++ test/revocationRegistryDefinition.test.ts | 77 +++ test/schema.test.ts | 81 ++- tsconfig.eslint.json | 2 +- tsconfig.json | 2 +- yarn.lock | 585 +++++++++++++----- 13 files changed, 723 insertions(+), 217 deletions(-) create mode 100644 test/__fixtures__/credentialDefinition1.json create mode 100644 test/__fixtures__/revocationRegistryDefinition1.json create mode 100644 test/__fixtures__/schema1.json create mode 100644 test/agent.ts create mode 100644 test/credentialDefinition.test.ts create mode 100644 test/revocationRegistryDefinition.test.ts diff --git a/README.md b/README.md index ee3921a..4d03490 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Aries JavaScript did:web AnonCreds +# Credo did:web AnonCreds -AnonCreds did:web method registry for [aries-framework-javascript](https://github.com/hyperledger/aries-framework-javascript). +AnonCreds did:web method registry for [Credo](https://github.com/openwallet-foundation/credo-ts). Based on current draft spec being written in this [repo](https://github.com/2060-io/did-web-anoncreds-method). ## Usage -In order to plug-in this into an AFJ Agent instance (from 0.4.0 onwards) you must register `DidWebAnonCredsRegistry` into the `AnonCredsModule` configuration: +In order to plug-in this into an Credo Agent instance you must register `DidWebAnonCredsRegistry` into the `AnonCredsModule` configuration: ```ts -import { DidWebAnonCredsRegistry } from 'aries-javascript-didweb-anoncreds' +import { DidWebAnonCredsRegistry } from 'credo-ts-didweb-anoncreds' const agent = new Agent({ config: { diff --git a/package.json b/package.json index b467912..001020a 100644 --- a/package.json +++ b/package.json @@ -33,13 +33,16 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { - "@credo-ts/node": "0.5.0-alpha.116", + "@credo-ts/askar": "^0.5.2", + "@credo-ts/node": "^0.5.2", + "@hyperledger/aries-askar-nodejs": "^0.2.1", "@types/jest": "^26.0.23", "@types/node-fetch": "^2.6.10", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^4.28.2", "@typescript-eslint/parser": "^4.17.0", "jest": "^27.0.4", + "nock": "^13.5.4", "node-fetch": "^2.6.4", "prettier": "^2.2.1", "release-it": "^17.0.1", @@ -49,19 +52,11 @@ "typescript": "~4.9.5" }, "dependencies": { - "@credo-ts/anoncreds": "^0.5.0-alpha.116", - "@credo-ts/core": "^0.5.0-alpha.116", - "@hyperledger/anoncreds-shared": "^0.2.0-dev.9", + "@credo-ts/anoncreds": "^0.5.2", + "@credo-ts/core": "^0.5.2", + "@hyperledger/anoncreds-shared": "^0.2.1", "canonicalize": "^1.0.8", - "class-transformer": "0.5.1", - "class-validator": "0.13.1", - "crypto": "^1.0.1", - "did-resolver": "^4.1.0", - "query-string": "7.1.3", - "reflect-metadata": "^0.1.13", - "rxjs": "^7.2.0", - "tsyringe": "^4.8.0", - "uuid": "^9.0.0" + "query-string": "7.1.3" }, "release-it": { "github": { diff --git a/src/anoncreds/DidWebAnonCredsRegistry.ts b/src/anoncreds/DidWebAnonCredsRegistry.ts index 29b2c08..478fe0b 100644 --- a/src/anoncreds/DidWebAnonCredsRegistry.ts +++ b/src/anoncreds/DidWebAnonCredsRegistry.ts @@ -17,8 +17,7 @@ import { RegisterSchemaOptions, RegisterSchemaReturn, } from '@credo-ts/anoncreds' -import { AgentContext, CacheModuleConfig, DidsApi } from '@credo-ts/core' -import { parse } from 'did-resolver' +import { AgentContext, CacheModuleConfig, DidsApi, parseDid } from '@credo-ts/core' import { parseUrl } from 'query-string' import { AnonCredsResourceResolutionResult } from './AnonCredsResourceResolutionResult' import { calculateResourceId, verifyResourceId } from './utils' @@ -35,8 +34,8 @@ export class DidWebAnonCredsRegistry implements AnonCredsRegistry { private cacheSettings: CacheSettings - public constructor(options: { cacheOptions?: CacheSettings }) { - this.cacheSettings = options.cacheOptions ?? { allowCaching: true, cacheDurationInSeconds: 300 } + public constructor(options?: { cacheOptions?: CacheSettings }) { + this.cacheSettings = options?.cacheOptions ?? { allowCaching: true, cacheDurationInSeconds: 300 } } public async getSchema(agentContext: AgentContext, schemaId: string): Promise { @@ -99,9 +98,9 @@ export class DidWebAnonCredsRegistry implements AnonCredsRegistry { } } } catch (error) { - agentContext.config.logger.debug(`error: ${error}`) + agentContext.config.logger.debug(`Error resolving schema with id ${schemaId}: ${error}`, { error }) return { - resolutionMetadata: { error: 'invalid' }, + resolutionMetadata: { error: 'invalid', message: error instanceof Error ? error.message : `${error}` }, schemaMetadata: {}, schemaId, } @@ -187,8 +186,11 @@ export class DidWebAnonCredsRegistry implements AnonCredsRegistry { } } } catch (error) { + agentContext.config.logger.debug(`Error resolving schema with id ${credentialDefinitionId}: ${error}`, { + error, + }) return { - resolutionMetadata: { error: 'invalid' }, + resolutionMetadata: { error: 'invalid', message: error instanceof Error ? error.message : `${error}` }, credentialDefinitionMetadata: {}, credentialDefinitionId, } @@ -279,8 +281,11 @@ export class DidWebAnonCredsRegistry implements AnonCredsRegistry { } } } catch (error) { + agentContext.config.logger.debug(`Error resolving schema with id ${revocationRegistryDefinitionId}: ${error}`, { + error, + }) return { - resolutionMetadata: { error: 'invalid' }, + resolutionMetadata: { error: 'invalid', message: error instanceof Error ? error.message : `${error}` }, revocationRegistryDefinitionMetadata: {}, revocationRegistryDefinitionId, } @@ -377,7 +382,7 @@ export class DidWebAnonCredsRegistry implements AnonCredsRegistry { } private async parseIdAndFetchResource(agentContext: AgentContext, didUrl: string) { - const parsedDid = parse(didUrl) + const parsedDid = parseDid(didUrl) if (!parsedDid) { throw new Error(`${didUrl} is not a valid resource identifier`) diff --git a/test/__fixtures__/credentialDefinition1.json b/test/__fixtures__/credentialDefinition1.json new file mode 100644 index 0000000..58c60b4 --- /dev/null +++ b/test/__fixtures__/credentialDefinition1.json @@ -0,0 +1,25 @@ +{ + "issuerId": "did:web:ca.dev.2060.io", + "schemaId": "did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/3hawjUu6FYNG9jHa9PU68o9taq3WPkjgjgWsM1mHJsMS", + "type": "CL", + "tag": "latest", + "value": { + "primary": { + "n": "779...397", + "r": { + "birthdate": "294...298", + "birthlocation": "533...284", + "citizenship": "894...102", + "expiry_date": "650...011", + "facephoto": "870...274", + "firstname": "656...226", + "link_secret": "521...922", + "name": "410...200", + "uuid": "226...757" + }, + "rctxt": "774...977", + "s": "750..893", + "z": "632...005" + } + } +} \ No newline at end of file diff --git a/test/__fixtures__/revocationRegistryDefinition1.json b/test/__fixtures__/revocationRegistryDefinition1.json new file mode 100644 index 0000000..ed5769c --- /dev/null +++ b/test/__fixtures__/revocationRegistryDefinition1.json @@ -0,0 +1,16 @@ +{ + "issuerId": "did:web:ca.dev.2060.io", + "revocDefType": "CL_ACCUM", + "credDefId": "did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/credential-definition/7fvypL5Mpe1no7z1vHkGhgHzPoFjrG6BoYMdhKMT6YZn", + "tag": "MyCustomCredentialDefinition", + "value": { + "publicKeys": { + "accumKey": { + "z": "1 0BB...386" + } + }, + "maxCredNum": 666, + "tailsLocation": "https://my.revocations.tails/tailsfile.txt", + "tailsHash": "91zvq2cFmBZmHCcLqFyzv7bfehHH5rMhdAG5wTjqy2PE" + } +} \ No newline at end of file diff --git a/test/__fixtures__/schema1.json b/test/__fixtures__/schema1.json new file mode 100644 index 0000000..926d44b --- /dev/null +++ b/test/__fixtures__/schema1.json @@ -0,0 +1,6 @@ +{ + "issuerId": "did:web:api.anoncreds.idlab.app:acme", + "name": "idlab_demo", + "version": "0.0.1", + "attrNames": ["id", "name"] +} diff --git a/test/agent.ts b/test/agent.ts new file mode 100644 index 0000000..be983a5 --- /dev/null +++ b/test/agent.ts @@ -0,0 +1,22 @@ +import { AskarModule } from '@credo-ts/askar' +import { Agent, KeyDerivationMethod } from '@credo-ts/core' +import { agentDependencies } from '@credo-ts/node' +import { ariesAskar } from '@hyperledger/aries-askar-nodejs' +import { randomUUID } from 'node:crypto' + +export const agent = new Agent({ + config: { + label: 'test', + walletConfig: { + id: `anoncreds-${randomUUID()}`, + key: ariesAskar.storeGenerateRawKey({}), + keyDerivationMethod: KeyDerivationMethod.Raw, + }, + }, + dependencies: agentDependencies, + modules: { + askar: new AskarModule({ + ariesAskar, + }), + }, +}) diff --git a/test/credentialDefinition.test.ts b/test/credentialDefinition.test.ts new file mode 100644 index 0000000..2741182 --- /dev/null +++ b/test/credentialDefinition.test.ts @@ -0,0 +1,72 @@ +import { DidWebAnonCredsRegistry } from '../src/anoncreds' +import didDocument1 from './__fixtures__/did1.json' +import credentialDefinition1 from './__fixtures__/credentialDefinition1.json' +import nock, { cleanAll, enableNetConnect } from 'nock' +import { agent } from './agent' +import { calculateResourceId } from '../src/anoncreds/utils' + +describe('Credential Definition', () => { + beforeAll(async () => { + await agent.initialize() + }) + + afterEach(() => { + cleanAll() + enableNetConnect() + }) + + test('resolves credential definition correctly', async () => { + const resourceId = calculateResourceId(credentialDefinition1) + + console.log(resourceId) + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) + + // Get schema + nock('https://anoncreds.ca.dev.2060.io').get(`/v1/credential-definition/${resourceId}`).reply(200, { + resource: credentialDefinition1, + resourceMetadata: {}, + }) + + const registry = new DidWebAnonCredsRegistry() + + const schemaResponse = await registry.getCredentialDefinition( + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/credential-definition/${resourceId}` + ) + + expect(schemaResponse).toEqual({ + resolutionMetadata: {}, + credentialDefinition: credentialDefinition1, + credentialDefinitionId: `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/credential-definition/${resourceId}`, + credentialDefinitionMetadata: {}, + }) + }) + + test('throws error when credential definition resourceId does not match', async () => { + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) + + // Get schema + nock('https://anoncreds.ca.dev.2060.io').get(`/v1/credential-definition/1234`).reply(200, { + resource: credentialDefinition1, + resourceMetadata: {}, + }) + + const registry = new DidWebAnonCredsRegistry() + + const credentialDefinitionResponse = await registry.getCredentialDefinition( + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/credential-definition/1234` + ) + + expect(credentialDefinitionResponse).toEqual({ + resolutionMetadata: { + error: 'invalid', + message: 'Wrong resource Id', + }, + credentialDefinitionId: 'did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/credential-definition/1234', + credentialDefinitionMetadata: {}, + }) + }) +}) diff --git a/test/revocationRegistryDefinition.test.ts b/test/revocationRegistryDefinition.test.ts new file mode 100644 index 0000000..a350ad3 --- /dev/null +++ b/test/revocationRegistryDefinition.test.ts @@ -0,0 +1,77 @@ +import { DidWebAnonCredsRegistry } from '../src/anoncreds' +import didDocument1 from './__fixtures__/did1.json' +import revocationRegistryDefinition1 from './__fixtures__/revocationRegistryDefinition1.json' +import nock, { cleanAll, enableNetConnect } from 'nock' +import { agent } from './agent' +import { calculateResourceId } from '../src/anoncreds/utils' + +describe('Revocation Registry Definition', () => { + beforeAll(async () => { + await agent.initialize() + }) + + afterEach(() => { + cleanAll() + enableNetConnect() + }) + + test('resolves revocation registry definition correctly', async () => { + const resourceId = calculateResourceId(revocationRegistryDefinition1) + + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) + + // Get schema + nock('https://anoncreds.ca.dev.2060.io') + .get(`/v1/revocation-registry/${resourceId}`) + .reply(200, { + resource: revocationRegistryDefinition1, + resourceMetadata: { + revocationStatusListEndpoint: 'https://mydomain.com/revStatus/5762v4VZxFMLB5n9X4Upr3gXaCKTa8PztDDCnroauSsR', + }, + }) + + const registry = new DidWebAnonCredsRegistry() + + const schemaResponse = await registry.getRevocationRegistryDefinition( + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/revocation-registry/${resourceId}` + ) + + expect(schemaResponse).toEqual({ + resolutionMetadata: {}, + revocationRegistryDefinition: revocationRegistryDefinition1, + revocationRegistryDefinitionId: `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/revocation-registry/${resourceId}`, + revocationRegistryDefinitionMetadata: { + revocationStatusListEndpoint: 'https://mydomain.com/revStatus/5762v4VZxFMLB5n9X4Upr3gXaCKTa8PztDDCnroauSsR', + }, + }) + }) + + test('throws error when revocation registry definition resourceId does not match', async () => { + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) + + // Get schema + nock('https://anoncreds.ca.dev.2060.io').get(`/v1/revocation-registry/1234`).reply(200, { + resource: revocationRegistryDefinition1, + resourceMetadata: {}, + }) + + const registry = new DidWebAnonCredsRegistry() + + const revocationRegistryDefinitionResponse = await registry.getRevocationRegistryDefinition( + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/revocation-registry/1234` + ) + + expect(revocationRegistryDefinitionResponse).toEqual({ + resolutionMetadata: { + error: 'invalid', + message: 'Wrong resource Id', + }, + revocationRegistryDefinitionId: 'did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/revocation-registry/1234', + revocationRegistryDefinitionMetadata: {}, + }) + }) +}) diff --git a/test/schema.test.ts b/test/schema.test.ts index 97b8246..5e4087f 100644 --- a/test/schema.test.ts +++ b/test/schema.test.ts @@ -1,46 +1,71 @@ -import { AgentConfig, AgentContext, DependencyManager, DidDocument, JsonTransformer } from '@credo-ts/core' -import { agentDependencies } from '@credo-ts/node' import { DidWebAnonCredsRegistry } from '../src/anoncreds' import didDocument1 from './__fixtures__/did1.json' +import schema1 from './__fixtures__/schema1.json' +import nock, { cleanAll, enableNetConnect } from 'nock' +import { agent } from './agent' +import { calculateResourceId } from '../src/anoncreds/utils' -import { DidsApi } from '@credo-ts/core/build/modules/dids/DidsApi' +describe('Schema', () => { + beforeAll(async () => { + await agent.initialize() + }) + + afterEach(() => { + cleanAll() + enableNetConnect() + }) -jest.mock('node-fetch') -import fetch, { Response } from 'node-fetch' + test('resolves schema correctly', async () => { + const resourceId = calculateResourceId(schema1) -jest.mock('@credo-ts/core/build/modules/dids/DidsApi') -const DidsApiMock = DidsApi as jest.Mock -const didsApiMock = new DidsApiMock() + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) + + // Get schema + nock('https://anoncreds.ca.dev.2060.io').get(`/v1/schema/${resourceId}`).reply(200, { + resource: schema1, + resourceMetadata: {}, + }) -function getAgentContext() { - const dependencyManager = new DependencyManager() + const registry = new DidWebAnonCredsRegistry() - dependencyManager.registerInstance(AgentConfig, new AgentConfig({ label: 'mock' }, agentDependencies)) - dependencyManager.registerInstance(DidsApi, didsApiMock) - const agentContext = new AgentContext({ dependencyManager, contextCorrelationId: 'mock' }) + const schemaResponse = await registry.getSchema( + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/${resourceId}` + ) - agentContext.config - return agentContext -} + expect(schemaResponse).toEqual({ + resolutionMetadata: {}, + schema: schema1, + schemaId: `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/${resourceId}`, + schemaMetadata: {}, + }) + }) -// TODO: Fix fetch mocking and add tests for other objects -describe.skip('Schema', () => { - test('parses schema id correctly', async () => { - //@ts-ignore - fetch.mockReturnValue(Promise.resolve(new Response(JSON.stringify(didDocument1)))) + test('throws error when schema resourceId does not match', async () => { + // did document + nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) - jest.spyOn(didsApiMock, 'resolveDidDocument').mockResolvedValue(JsonTransformer.fromJSON(didDocument1, DidDocument)) + // Get schema + nock('https://anoncreds.ca.dev.2060.io').get(`/v1/schema/1234`).reply(200, { + resource: schema1, + resourceMetadata: {}, + }) - const registry = new DidWebAnonCredsRegistry({}) + const registry = new DidWebAnonCredsRegistry() const schemaResponse = await registry.getSchema( - getAgentContext(), - 'did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/1234' + agent.context, + `did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/1234` ) - console.log(schemaResponse) - expect(fetch).toHaveBeenCalledWith('https://anoncreds.ca.dev.2060.io/v1/schema/1234', { - method: 'GET', + expect(schemaResponse).toEqual({ + resolutionMetadata: { + error: 'invalid', + message: 'Wrong resource Id', + }, + schemaId: 'did:web:ca.dev.2060.io?service=anoncreds&relativeRef=/schema/1234', + schemaMetadata: {}, }) }) }) diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 118da10..6a5860b 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -4,7 +4,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "aries-javascript-didweb-anoncreds/*": ["src"] + "credo-ts-didweb-anoncreds/*": ["src"] } }, "include": ["packages", "./.eslintrc.js", "./jest.config.ts", "./jest.config.base.ts", "types", "test", "samples"], diff --git a/tsconfig.json b/tsconfig.json index 16f1a37..c992d6d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "aries-javascript-didweb-anoncreds/*": ["src"] + "credo-ts-didweb-anoncreds/*": ["src"] }, "types": ["jest", "node"] }, diff --git a/yarn.lock b/yarn.lock index 926e016..777cddb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@2060.io/ffi-napi@^4.0.8": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@2060.io/ffi-napi/-/ffi-napi-4.0.8.tgz#ec3424d9ec979491b41b8d82514ae82a647da8b0" - integrity sha512-sONRKLtxFKN5PXuZaa41b/kTN+R5qAh6PAL15/fnafnvAKQ5WBoxRIy8xRh8jo9mydywtt4IrWtatB93w0+3cA== +"@2060.io/ffi-napi@^4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@2060.io/ffi-napi/-/ffi-napi-4.0.9.tgz#194fca2132932ba02e62d716c786d20169b20b8d" + integrity sha512-JfVREbtkJhMXSUpya3JCzDumdjeZDCKv4PemiWK+pts5CYgdoMidxeySVlFeF5pHqbBpox4I0Be7sDwAq4N0VQ== dependencies: "@2060.io/ref-napi" "^3.0.6" debug "^4.1.1" @@ -529,68 +529,47 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@credo-ts/anoncreds@^0.5.0-alpha.116": - version "0.5.0-alpha.119" - resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.5.0-alpha.119.tgz#f715ffa7d54cd93aa38a38f18a7cb3c8810a11ad" - integrity sha512-56Kpl80MmA2+r/pNIH7a2pV5jG9n6el6Ug00C5eZhrgFsU4W+t5RY64eHgAtrZVG5CePDVhqI9qiMOAmOL3u6A== +"@credo-ts/anoncreds@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@credo-ts/anoncreds/-/anoncreds-0.5.2.tgz#7e7f6ef12ccb38b09ba0bb578a0aaaa1c9afba2a" + integrity sha512-5MIB8UlRL4YH81Ter639L71CmYN5SmVgMY74iSIQilN0ax9FwriAwPKaM9/gEgBBK5XLKdmHGe4FT+Rs6a6xpA== dependencies: - "@credo-ts/core" "0.5.0-alpha.119+c9a985ec" + "@astronautlabs/jsonpath" "^1.1.2" + "@credo-ts/core" "0.5.2" + big-integer "^1.6.51" bn.js "^5.2.1" class-transformer "0.5.1" class-validator "0.14.1" reflect-metadata "^0.1.13" -"@credo-ts/core@0.5.0-alpha.116+e4b99a86": - version "0.5.0-alpha.116" - resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.5.0-alpha.116.tgz#31980453529698b520f8f4115db7180423761523" - integrity sha512-nlPRDzHhWwtwr0WgDoGGgkZ1Q1K5fZT0YjganJSY554PKj7jyH0OoGU6GIJ65C9xnnkbyOWXmhEvf4zX0J4CKw== +"@credo-ts/askar@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.5.2.tgz#bd58738149c53532b000aa66cd6051acab6a582d" + integrity sha512-YGUmETftn8WQ/US4btF/zbpey1kuq8f74l+4rFv9A4UzRtNZyVxEwGtnfhIphLFr+8lHYLiiQvxlPnA4lgGTYw== dependencies: - "@digitalcredentials/jsonld" "^6.0.0" - "@digitalcredentials/jsonld-signatures" "^9.4.0" - "@digitalcredentials/vc" "^6.0.1" - "@multiformats/base-x" "^4.0.1" - "@sd-jwt/core" "^0.2.0" - "@sd-jwt/decode" "^0.2.0" - "@sphereon/pex" "^3.0.1" - "@sphereon/pex-models" "^2.1.5" - "@sphereon/ssi-types" "^0.18.1" - "@stablelib/ed25519" "^1.0.2" - "@stablelib/sha256" "^1.0.1" - "@types/ws" "^8.5.4" - abort-controller "^3.0.0" - big-integer "^1.6.51" - borc "^3.0.0" - buffer "^6.0.3" + "@credo-ts/core" "0.5.2" + bn.js "^5.2.1" class-transformer "0.5.1" class-validator "0.14.1" - did-resolver "^4.1.0" - jsonpath "^1.1.1" - lru_map "^0.4.1" - luxon "^3.3.0" - make-error "^1.3.6" - object-inspect "^1.10.3" - query-string "^7.0.1" - reflect-metadata "^0.1.13" - rxjs "^7.2.0" + rxjs "^7.8.0" tsyringe "^4.8.0" - uuid "^9.0.0" - varint "^6.0.0" - web-did-resolver "^2.0.21" -"@credo-ts/core@0.5.0-alpha.119+c9a985ec", "@credo-ts/core@^0.5.0-alpha.116": - version "0.5.0-alpha.119" - resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.5.0-alpha.119.tgz#270783ef7c27b9f0601cf4b426336f20bd26e5de" - integrity sha512-ur3NGdxrMrXRNJZamsUltu43qh0LY+0Cu7PyXas95hGvGupAFXn7Lg6RaF7TlVUosmkdvyXxN7+yEEUyRCIn/w== +"@credo-ts/core@0.5.2", "@credo-ts/core@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.5.2.tgz#641d9cba5160968927654d74365e7a23f8f8c6ba" + integrity sha512-95NxwAqOeSGApp3LaVSYbzIhY0+5yeMlZKom0cfKwOXn7Xyeg5tIUkPlaOUevmhrPp3293VgykSv1ykSsxYHEw== dependencies: "@digitalcredentials/jsonld" "^6.0.0" "@digitalcredentials/jsonld-signatures" "^9.4.0" "@digitalcredentials/vc" "^6.0.1" "@multiformats/base-x" "^4.0.1" - "@sd-jwt/core" "^0.2.0" - "@sd-jwt/decode" "^0.2.0" - "@sphereon/pex" "^3.0.1" - "@sphereon/pex-models" "^2.1.5" - "@sphereon/ssi-types" "^0.18.1" + "@sd-jwt/core" "^0.6.1" + "@sd-jwt/decode" "^0.6.1" + "@sd-jwt/types" "^0.6.1" + "@sd-jwt/utils" "^0.6.1" + "@sphereon/pex" "^3.3.2" + "@sphereon/pex-models" "^2.2.4" + "@sphereon/ssi-types" "^0.23.0" "@stablelib/ed25519" "^1.0.2" "@stablelib/sha256" "^1.0.1" "@types/ws" "^8.5.4" @@ -608,20 +587,20 @@ object-inspect "^1.10.3" query-string "^7.0.1" reflect-metadata "^0.1.13" - rxjs "^7.2.0" + rxjs "^7.8.0" tsyringe "^4.8.0" uuid "^9.0.0" varint "^6.0.0" web-did-resolver "^2.0.21" -"@credo-ts/node@0.5.0-alpha.116": - version "0.5.0-alpha.116" - resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.5.0-alpha.116.tgz#f71c56bcc588d7569aca1fc40d87f99b50915228" - integrity sha512-NQGrs6UAyeb4we13aIQcKKt97CYOs2IpgVEb+ZAwcTjAY8klmxPQA9U9JvyL2TTnbVXf152qzH/YwwsfCA3SKA== +"@credo-ts/node@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.5.2.tgz#6eb37cda0bb40d85524f87de672f5c7717a9773f" + integrity sha512-MbSuXYs+Iex7JXvK7A3lUfn9zSjF0aPsEKjyzI/ZpZbQrOuBrpQh+1MFSvEVz853rYkdbXHzWU4OiELklC7oQg== dependencies: - "@2060.io/ffi-napi" "^4.0.8" + "@2060.io/ffi-napi" "^4.0.9" "@2060.io/ref-napi" "^3.0.6" - "@credo-ts/core" "0.5.0-alpha.116+e4b99a86" + "@credo-ts/core" "0.5.2" "@types/express" "^4.17.15" express "^4.17.1" ws "^8.13.0" @@ -821,10 +800,30 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@hyperledger/anoncreds-shared@^0.2.0-dev.9": - version "0.2.0-dev.10" - resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.2.0-dev.10.tgz#49208950a0aff96742fda7f7a7ecd8b1784ecff4" - integrity sha512-jbbsgiYjjEceOgD9iVXCLMILgpyDZrhXfs/ZXOnfr8xk9ZPeB3Xp7ZqpyNSTPJkNaORM9eC/ni56A1dLbGeBIg== +"@hyperledger/anoncreds-shared@^0.2.1": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@hyperledger/anoncreds-shared/-/anoncreds-shared-0.2.2.tgz#492995d076448d682a828312bbba58314e943c4a" + integrity sha512-dfYpqbAkqtHJkRkuGmWdJruHfLegLUIbu/dSAWnz5dMRKd8ad8rEnQkwRnockQZ/pc7QDr8kxfG6bT2YDGZeMw== + +"@hyperledger/aries-askar-nodejs@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-nodejs/-/aries-askar-nodejs-0.2.1.tgz#3473786a4d758ebf39a6b855386a9fa3577033d5" + integrity sha512-RSBa+onshUSIJlVyGBzndZtcw2KPb8mgnYIio9z0RquKgGitufc0ymNiL2kLKWNjk2gET20jAUHijhlE4ssk5A== + dependencies: + "@2060.io/ffi-napi" "^4.0.9" + "@2060.io/ref-napi" "^3.0.6" + "@hyperledger/aries-askar-shared" "0.2.1" + "@mapbox/node-pre-gyp" "^1.0.10" + node-cache "^5.1.2" + ref-array-di "^1.2.2" + ref-struct-di "^1.1.1" + +"@hyperledger/aries-askar-shared@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@hyperledger/aries-askar-shared/-/aries-askar-shared-0.2.1.tgz#0c01abe47fd53dd1629ee41af51c9d9d42f7f86f" + integrity sha512-7d8tiqq27dxFl7+0Cf2I40IzzDoRU9aEolyPyvfdLGbco6NAtWB4CV8AzgY11EZ7/ou4RirJxfP9hBjgYBo1Ag== + dependencies: + buffer "^6.0.3" "@iarna/toml@2.2.5": version "2.2.5" @@ -1082,6 +1081,21 @@ dependencies: call-bind "^1.0.2" +"@mapbox/node-pre-gyp@^1.0.10": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" + integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ== + dependencies: + detect-libc "^2.0.0" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.7" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -1251,44 +1265,45 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@sd-jwt/core@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.2.0.tgz#e06736ff4920570660fce4e040fe40e900c7fcfa" - integrity sha512-KxsJm/NAvKkbqOXaIq7Pndn70++bm8QNzzBh1KOwhlRub7LVrqeEkie/wrI/sAH+S+5exG0HTbY95F86nHiq7Q== +"@sd-jwt/core@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.6.1.tgz#d28be10d0f4b672636fcf7ad71737cb08e5dae96" + integrity sha512-egFTb23o6BGWF93vnjopN02rSiC1HOOnkk9BI8Kao3jz9ipZAHdO6wF7gwfZm5Nlol/Kd1/KSLhbOUPYt++FjA== dependencies: - "@sd-jwt/decode" "0.2.0" - "@sd-jwt/present" "0.2.0" - "@sd-jwt/types" "0.2.0" - "@sd-jwt/utils" "0.2.0" + "@sd-jwt/decode" "0.6.1" + "@sd-jwt/present" "0.6.1" + "@sd-jwt/types" "0.6.1" + "@sd-jwt/utils" "0.6.1" -"@sd-jwt/decode@0.2.0", "@sd-jwt/decode@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.2.0.tgz#44211418fd0884a160f8223feedfe04ae52398c4" - integrity sha512-nmiZN3SQ4ApapEu+rS1h/YAkDIq3exgN7swSCsEkrxSEwnBSbXtISIY/sv+EmwnehF1rcKbivHfHNxOWYtlxvg== +"@sd-jwt/decode@0.6.1", "@sd-jwt/decode@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.6.1.tgz#141f7782df53bab7159a75d91ed4711e1c14a7ea" + integrity sha512-QgTIoYd5zyKKLgXB4xEYJTrvumVwtsj5Dog0v0L9UH9ZvHekDaeexS247X7A4iSdzTvmZzUpGskgABOa4D8NmQ== dependencies: - "@sd-jwt/types" "0.2.0" - "@sd-jwt/utils" "0.2.0" + "@sd-jwt/types" "0.6.1" + "@sd-jwt/utils" "0.6.1" -"@sd-jwt/present@0.2.0", "@sd-jwt/present@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.2.0.tgz#01ecbd09dd21287be892b36d754a79c8629387f2" - integrity sha512-6xDBiB+UqCwW8k7O7OUJ7BgC/8zcO+AD5ZX1k4I6yjDM9vscgPulSVxT/yUH+Aov3cZ/BKvfKC0qDEZkHmP/kg== +"@sd-jwt/present@0.6.1", "@sd-jwt/present@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.6.1.tgz#82b9188becb0fa240897c397d84a54d55c7d169e" + integrity sha512-QRD3TUDLj4PqQNZ70bBxh8FLLrOE9mY8V9qiZrJSsaDOLFs2p1CtZG+v9ig62fxFYJZMf4bWKwYjz+qqGAtxCg== dependencies: - "@sd-jwt/types" "0.2.0" - "@sd-jwt/utils" "0.2.0" + "@sd-jwt/decode" "0.6.1" + "@sd-jwt/types" "0.6.1" + "@sd-jwt/utils" "0.6.1" -"@sd-jwt/types@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.2.0.tgz#3cb50392e1b76ce69453f403c71c937a6e202352" - integrity sha512-16WFRcL/maG0/JxN9UCSx07/vJ2SDbGscv9gDLmFLgJzhJcGPer41XfI6aDfVARYP430wHFixChfY/n7qC1L/Q== +"@sd-jwt/types@0.6.1", "@sd-jwt/types@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.6.1.tgz#fc4235e00cf40d35a21d6bc02e44e12d7162aa9b" + integrity sha512-LKpABZJGT77jNhOLvAHIkNNmGqXzyfwBT+6r+DN9zNzMx1CzuNR0qXk1GMUbast9iCfPkGbnEpUv/jHTBvlIvg== -"@sd-jwt/utils@0.2.0", "@sd-jwt/utils@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.2.0.tgz#ef52b744116e874f72ec01978f0631ad5a131eb7" - integrity sha512-oHCfRYVHCb5RNwdq3eHAt7P9d7TsEaSM1TTux+xl1I9PeQGLtZETnto9Gchtzn8FlTrMdVsLlcuAcK6Viwj1Qw== +"@sd-jwt/utils@0.6.1", "@sd-jwt/utils@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.6.1.tgz#33273b20c9eb1954e4eab34118158b646b574ff9" + integrity sha512-1NHZ//+GecGQJb+gSdDicnrHG0DvACUk9jTnXA5yLZhlRjgkjyfJLNsCZesYeCyVp/SiyvIC9B+JwoY4kI0TwQ== dependencies: - "@sd-jwt/types" "0.2.0" - buffer "*" + "@sd-jwt/types" "0.6.1" + js-base64 "^3.7.6" "@sindresorhus/is@^5.2.0": version "5.6.0" @@ -1319,34 +1334,43 @@ resolved "https://registry.yarnpkg.com/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz#4334bba7ee241036e580fdd99c019377630d26b4" integrity sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw== -"@sphereon/pex-models@^2.1.5", "@sphereon/pex-models@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@sphereon/pex-models/-/pex-models-2.2.0.tgz#32013fff43d4f47df03e213792a9bcc6866a1f06" - integrity sha512-dGDRdoxJj+P0TRqu0R8R0/IdIzrCya1MsnxIFbcmSW3rjPsbwXbV0EojEfxXGD5LhqsUJiuAffMtyE2dtVI/XQ== +"@sphereon/pex-models@^2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@sphereon/pex-models/-/pex-models-2.2.4.tgz#0ce28e9858b38012fe1ff7d9fd12ec503473ee66" + integrity sha512-pGlp+wplneE1+Lk3U48/2htYKTbONMeG5/x7vhO6AnPUOsnOXeJdftPrBYWVSzz/JH5GJptAc6+pAyYE1zMu4Q== -"@sphereon/pex@^3.0.1": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-3.1.0.tgz#145e0cdf47cb9a54aaac4a0ec24bb1011449e2d6" - integrity sha512-msw5dzC9SpDq28mqM6ukjYk+yVKb6kzM+KwLjecwi/hpvfFrNCaR4QYJgK0OEDdcF2ZbZTSpg278I5lJauh07A== +"@sphereon/pex@^3.3.2": + version "3.3.3" + resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-3.3.3.tgz#8712ecc3c1a2548bd5e531bb41dd54e8010c1dc5" + integrity sha512-CXwdEcMTUh2z/5AriBn3OuShEG06l2tgiIr7qDJthnkez8DQ3sZo2vr4NEQWKKAL+DeAWAI4FryQGO4KuK7yfg== dependencies: "@astronautlabs/jsonpath" "^1.1.2" - "@sd-jwt/decode" "^0.2.0" - "@sd-jwt/present" "^0.2.0" - "@sd-jwt/utils" "^0.2.0" - "@sphereon/pex-models" "^2.2.0" - "@sphereon/ssi-types" "0.18.1" + "@sd-jwt/decode" "^0.6.1" + "@sd-jwt/present" "^0.6.1" + "@sd-jwt/types" "^0.6.1" + "@sphereon/pex-models" "^2.2.4" + "@sphereon/ssi-types" "0.22.0" ajv "^8.12.0" ajv-formats "^2.1.1" jwt-decode "^3.1.2" nanoid "^3.3.7" string.prototype.matchall "^4.0.10" + uint8arrays "^3.1.1" -"@sphereon/ssi-types@0.18.1", "@sphereon/ssi-types@^0.18.1": - version "0.18.1" - resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.18.1.tgz#c00e4939149f4e441fae56af860735886a4c33a5" - integrity sha512-uM0gb1woyc0R+p+qh8tVDi15ZWmpzo9BP0iBp/yRkJar7gAfgwox/yvtEToaH9jROKnDCwL3DDQCDeNucpMkwg== +"@sphereon/ssi-types@0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.22.0.tgz#da2eed7296e8932271af0c72a66eeea20b0b5689" + integrity sha512-YPJAZlKmzNALXK8ohP3ETxj1oVzL4+M9ljj3fD5xrbacvYax1JPCVKc8BWSubGcQckKHPbgbpcS7LYEeghyT9Q== dependencies: - "@sd-jwt/decode" "^0.2.0" + "@sd-jwt/decode" "^0.6.1" + jwt-decode "^3.1.2" + +"@sphereon/ssi-types@^0.23.0": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.23.4.tgz#8d53e12b51e00376fdc0190c8244b1602f12d5ca" + integrity sha512-1lM2yfOEhpcYYBxm/12KYY4n3ZSahVf5rFqGdterQkMJMthwr20HqTjw3+VK5p7IVf+86DyBoZJyS4V9tSsoCA== + dependencies: + "@sd-jwt/decode" "^0.6.1" jwt-decode "^3.1.2" "@stablelib/binary@^1.0.1": @@ -1610,11 +1634,6 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6" integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA== -"@types/validator@^13.1.3": - version "13.7.14" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.14.tgz#5512aef43ba353ea2fe2d0d8c7ce71c75c2ad9e6" - integrity sha512-J6OAed6rhN6zyqL9Of6ZMamhlsOEU/poBVvbHr/dKOYKTeuYYMlDkMv+b6UUV0o2i0tw73cgyv/97WTWaUl0/g== - "@types/validator@^13.11.8": version "13.11.8" resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.11.8.tgz#bb1162ec0fe6f87c95ca812f15b996fcc5e1e2dc" @@ -1736,6 +1755,11 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -1866,6 +1890,19 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -1896,6 +1933,14 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== +array-index@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-index/-/array-index-1.0.0.tgz#ec56a749ee103e4e08c790b9c353df16055b97f9" + integrity sha512-jesyNbBkLQgGZMSwA1FanaFjalb1mZUGxGeUEkSDidzgrbjBGhvizJkaItdhkt8eIHFOJC7nDsrXk+BaehTdRw== + dependencies: + debug "^2.2.0" + es6-symbol "^3.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -2231,14 +2276,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@*, 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" @@ -2247,6 +2284,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" + bundle-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" @@ -2361,6 +2406,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + ci-info@^3.2.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" @@ -2376,15 +2426,6 @@ class-transformer@0.5.1: resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336" integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw== -class-validator@0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.13.1.tgz#381b2001ee6b9e05afd133671fbdf760da7dec67" - integrity sha512-zWIeYFhUitvAHBwNhDdCRK09hWx+P0HUwFE8US8/CxFpMVzkUK8RJl7yOIE+BVu2lxyPNgeOaFv78tLE47jBIg== - dependencies: - "@types/validator" "^13.1.3" - libphonenumber-js "^1.9.7" - validator "^13.5.2" - class-validator@0.14.1: version "0.14.1" resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.14.1.tgz#ff2411ed8134e9d76acfeb14872884448be98110" @@ -2437,6 +2478,11 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +clone@2.x: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -2476,6 +2522,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2522,6 +2573,11 @@ configstore@^6.0.0: write-file-atomic "^3.0.3" xdg-basedir "^5.0.1" +console-control-strings@^1.0.0, console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== + content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -2602,11 +2658,6 @@ crypto-random-string@^4.0.0: dependencies: type-fest "^1.0.1" -crypto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" - integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== - cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -2624,6 +2675,14 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +d@1, d@^1.0.1, d@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== + dependencies: + es5-ext "^0.10.64" + type "^2.7.2" + data-uri-to-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" @@ -2648,7 +2707,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -debug@2.6.9: +debug@2.6.9, debug@^2.2.0: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2781,6 +2840,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -2796,6 +2860,11 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-libc@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2987,6 +3056,33 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.0.2, es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== + dependencies: + d "^1.0.2" + ext "^1.7.0" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3072,6 +3168,16 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + esprima@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.2.tgz#76a0fd66fcfe154fd292667dc264019750b1657b" @@ -3109,6 +3215,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -3229,6 +3343,13 @@ express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + external-editor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -3431,6 +3552,13 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3471,6 +3599,21 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -3712,6 +3855,11 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -4722,6 +4870,11 @@ jest@^27.0.4: import-local "^3.0.2" jest-cli "^27.5.1" +js-base64@^3.7.6: + version "3.7.7" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79" + integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4795,6 +4948,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + json-text-sequence@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/json-text-sequence/-/json-text-sequence-0.3.0.tgz#6603e0ee45da41f949669fd18744b97fb209e6ce" @@ -4926,11 +5084,6 @@ libphonenumber-js@^1.10.53: resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.55.tgz#ec864e369bf7babde02021d06b5f2433d7e9c78e" integrity sha512-MrTg2JFLscgmTY6/oT9vopYETlgUls/FU6OaeeamGwk4LFxjIgOUML/ZSZICgR0LPYXaonVJo40lzMvaaTJlQA== -libphonenumber-js@^1.9.7: - version "1.10.24" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.24.tgz#a1744cf29df86d5a587562ea28dde12320eb6ab6" - integrity sha512-3Dk8f5AmrcWqg+oHhmm9hwSTqpWHBdSqsHmjCJGroULFubi0+x7JEIGmRZCuL3TI8Tx39xaKqfnhsDQ4ALa/Nw== - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -5047,7 +5200,7 @@ macos-release@^3.1.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.2.0.tgz#dcee82b6a4932971b1538dbf6f3aabc4a903b613" integrity sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA== -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -5148,6 +5301,31 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -5168,6 +5346,11 @@ msrcrypto@^1.5.6: resolved "https://registry.yarnpkg.com/msrcrypto/-/msrcrypto-1.5.8.tgz#be419be4945bf134d8af52e9d43be7fa261f4a1c" integrity sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q== +multiformats@^9.4.2: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== + mute-stream@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" @@ -5200,11 +5383,32 @@ new-github-release-url@2.0.0: dependencies: type-fest "^2.5.1" +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +nock@^13.5.4: + version "13.5.4" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" + integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== + dependencies: + debug "^4.1.0" + json-stringify-safe "^5.0.1" + propagate "^2.0.0" + node-addon-api@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== +node-cache@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-cache/-/node-cache-5.1.2.tgz#f264dc2ccad0a780e76253a694e9fd0ed19c398d" + integrity sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg== + dependencies: + clone "2.x" + node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" @@ -5234,7 +5438,7 @@ node-fetch@3.3.2, node-fetch@^3.2.10: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -node-fetch@^2.6.4: +node-fetch@^2.6.4, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -5261,6 +5465,13 @@ node-releases@^2.0.8: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -5285,11 +5496,26 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + nwsapi@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + object-inspect@^1.10.3, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" @@ -5636,6 +5862,11 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +propagate@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -5799,7 +6030,15 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -ref-struct-di@^1.1.0: +ref-array-di@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ref-array-di/-/ref-array-di-1.2.2.tgz#ceee9d667d9c424b5a91bb813457cc916fb1f64d" + integrity sha512-jhCmhqWa7kvCVrWhR/d7RemkppqPUdxEil1CtTtm7FkZV8LcHHCK3Or9GinUiFP5WY3k0djUkMvhBhx49Jb2iA== + dependencies: + array-index "^1.0.0" + debug "^3.1.0" + +ref-struct-di@^1.1.0, ref-struct-di@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ref-struct-di/-/ref-struct-di-1.1.1.tgz#5827b1d3b32372058f177547093db1fe1602dc10" integrity sha512-2Xyn/0Qgz89VT+++WP0sTosdm9oeowLP23wRJYhG4BFdMUrLj3jhwHZNEytYNYgtPKLNTP3KJX4HEgBvM1/Y2g== @@ -5956,7 +6195,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -5982,14 +6221,7 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.2.0: - version "7.8.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" - integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== - dependencies: - tslib "^2.1.0" - -rxjs@^7.8.1: +rxjs@^7.8.0, rxjs@^7.8.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -6099,6 +6331,11 @@ serve-static@1.15.0: parseurl "~1.3.3" send "0.18.0" +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + set-function-length@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" @@ -6158,7 +6395,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -6284,7 +6521,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -6443,6 +6680,18 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tar@^6.1.11: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -6628,6 +6877,11 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -6679,6 +6933,13 @@ typescript@~4.9.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +uint8arrays@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" + integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== + dependencies: + multiformats "^9.4.2" + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -6826,11 +7087,6 @@ v8-to-istanbul@^8.1.0: convert-source-map "^1.6.0" source-map "^0.7.3" -validator@^13.5.2: - version "13.9.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" - integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== - validator@^13.9.0: version "13.11.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" @@ -6976,6 +7232,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + widest-line@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-4.0.1.tgz#a0fc673aaba1ea6f0a0d35b3c2795c9a9cc2ebf2" From a7f6e22bf3f41a2784289d8e9901598d290e6e2c Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Apr 2024 23:03:17 +0200 Subject: [PATCH 2/4] remove log Signed-off-by: Timo Glastra --- test/credentialDefinition.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/credentialDefinition.test.ts b/test/credentialDefinition.test.ts index 2741182..5759cd8 100644 --- a/test/credentialDefinition.test.ts +++ b/test/credentialDefinition.test.ts @@ -18,7 +18,6 @@ describe('Credential Definition', () => { test('resolves credential definition correctly', async () => { const resourceId = calculateResourceId(credentialDefinition1) - console.log(resourceId) // did document nock('https://ca.dev.2060.io').get('/.well-known/did.json').reply(200, didDocument1) From 9d3c15fb0eb6c3ab46338b322e89db372e803e91 Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Tue, 30 Apr 2024 23:38:54 +0200 Subject: [PATCH 3/4] add extra test Signed-off-by: Timo Glastra --- ...WvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json | 9 +++ test/__fixtures__/did2.json | 68 +++++++++++++++++++ test/schema.test.ts | 43 ++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 test/__fixtures__/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json create mode 100644 test/__fixtures__/did2.json diff --git a/test/__fixtures__/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json b/test/__fixtures__/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json new file mode 100644 index 0000000..165a942 --- /dev/null +++ b/test/__fixtures__/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json @@ -0,0 +1,9 @@ +{ + "resource": { + "attrNames": ["hello"], + "name": "a", + "issuerId": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "version": "1.0" + }, + "resourceMetadata": {} +} diff --git a/test/__fixtures__/did2.json b/test/__fixtures__/did2.json new file mode 100644 index 0000000..13f8c0f --- /dev/null +++ b/test/__fixtures__/did2.json @@ -0,0 +1,68 @@ +{ + "@context": [ + "https://w3id.org/did/v1", + "https://w3id.org/security/suites/x25519-2019/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "verificationMethod": [ + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6MkvqQGA2m3YhLUDx9GKVmjiaLS4EoFxUZT6oU3BAMesCLr", + "type": "Ed25519VerificationKey2018", + "controller": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "publicKeyBase58": "HP9DZnWcD9r17TJZdvotsUnSEfXQYbK6QnZ7LtPdwyZU" + }, + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#zDnaeWfRfd58DmjUtjYZKFa7BBmAg268D65toArbv3PVuGVvn", + "type": "JsonWebKey2020", + "controller": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "publicKeyJwk": { + "kty": "EC", + "crv": "P-256", + "x": "XJjFoh8k1iHMzYa_WPCsUc6hT70KNPDMnqBK3iLtXLc", + "y": "5Jtn2iKTUzoQrK8a2-Yc7PDQcguA1mpf8JE1eWWln2A" + } + }, + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6Mkj1x8an2CxEeSyncjBXhczqY9ATRUa7JgAeo3EZtbPUuw", + "type": "Ed25519VerificationKey2018", + "controller": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "publicKeyBase58": "5Zh5zXmmch9ysHn2Vxjn9jz9Lt9dAE4KUdt7QHvaUG8Z" + }, + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6LSmSFDYb9prkcA1KZqiDPuSNeXQUymiUn4J8Xsx3oDn2Wh", + "type": "JsonWebKey2020", + "controller": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747", + "publicKeyJwk": { "kty": "OKP", "crv": "X25519", "x": "kQNR1agw-aHsBHA1P4iMPPOnPjJs3QKPIrYNQantLGY" } + } + ], + "service": [ + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#didcomm", + "serviceEndpoint": "https://l9ifxc8ial1o.share.zrok.io/didcomm", + "type": "did-communication", + "priority": 0, + "recipientKeys": [ + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6LSmSFDYb9prkcA1KZqiDPuSNeXQUymiUn4J8Xsx3oDn2Wh" + ], + "routingKeys": [], + "accept": ["didcomm/aip2;env=rfc19"] + }, + { + "id": "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#anoncreds", + "serviceEndpoint": "https://nnu4z2pauw49.share.zrok.io/paradym-public-metadata/440ef8ba-36f6-4362-bbac-391dc47e2747/anoncreds", + "type": "AnonCredsRegistry" + } + ], + "authentication": [ + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6MkvqQGA2m3YhLUDx9GKVmjiaLS4EoFxUZT6oU3BAMesCLr", + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#zDnaeWfRfd58DmjUtjYZKFa7BBmAg268D65toArbv3PVuGVvn" + ], + "assertionMethod": [ + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6MkvqQGA2m3YhLUDx9GKVmjiaLS4EoFxUZT6oU3BAMesCLr", + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#zDnaeWfRfd58DmjUtjYZKFa7BBmAg268D65toArbv3PVuGVvn" + ], + "keyAgreement": [ + "did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747#z6LSmSFDYb9prkcA1KZqiDPuSNeXQUymiUn4J8Xsx3oDn2Wh" + ] +} diff --git a/test/schema.test.ts b/test/schema.test.ts index 5e4087f..7a3864b 100644 --- a/test/schema.test.ts +++ b/test/schema.test.ts @@ -1,6 +1,8 @@ import { DidWebAnonCredsRegistry } from '../src/anoncreds' import didDocument1 from './__fixtures__/did1.json' +import didDocument2 from './__fixtures__/did2.json' import schema1 from './__fixtures__/schema1.json' +import schemaGtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG from './__fixtures__/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.json' import nock, { cleanAll, enableNetConnect } from 'nock' import { agent } from './agent' import { calculateResourceId } from '../src/anoncreds/utils' @@ -68,4 +70,45 @@ describe('Schema', () => { schemaMetadata: {}, }) }) + + test('register and resole did document with nested path', async () => { + const registry = new DidWebAnonCredsRegistry() + + const result = await registry.registerSchema(agent.context, { + options: {}, + schema: schemaGtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.resource, + }) + + expect(result).toMatchObject({ + schemaState: { + state: 'finished', + schemaId: + 'did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747?service=anoncreds&relativeRef=/schema/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG', + }, + }) + + // did document + nock('https://nnu4z2pauw49.share.zrok.io') + .get('/paradym-public-metadata/440ef8ba-36f6-4362-bbac-391dc47e2747/did.json') + .reply(200, didDocument2) + + // Get schema + .get( + `/paradym-public-metadata/440ef8ba-36f6-4362-bbac-391dc47e2747/anoncreds/schema/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG` + ) + .reply(200, schemaGtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG) + + const schemaResponse = await registry.getSchema( + agent.context, + 'did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747?service=anoncreds&relativeRef=/schema/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG' + ) + + expect(schemaResponse).toEqual({ + resolutionMetadata: {}, + schema: schemaGtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG.resource, + schemaId: + 'did:web:nnu4z2pauw49.share.zrok.io:paradym-public-metadata:440ef8ba-36f6-4362-bbac-391dc47e2747?service=anoncreds&relativeRef=/schema/GtDjznsWvUNPFaLvaBjayZ5UUtM2RCjVDtgDVqbyDkTG', + schemaMetadata: {}, + }) + }) }) From 0d4cbc48f36178432476f6acd632121c4af9f5bf Mon Sep 17 00:00:00 2001 From: Ariel Gentile Date: Wed, 1 May 2024 10:42:38 -0300 Subject: [PATCH 4/4] style: fix prettier errors Signed-off-by: Ariel Gentile --- test/__fixtures__/credentialDefinition1.json | 2 +- test/__fixtures__/revocationRegistryDefinition1.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/__fixtures__/credentialDefinition1.json b/test/__fixtures__/credentialDefinition1.json index 58c60b4..82cf32d 100644 --- a/test/__fixtures__/credentialDefinition1.json +++ b/test/__fixtures__/credentialDefinition1.json @@ -22,4 +22,4 @@ "z": "632...005" } } -} \ No newline at end of file +} diff --git a/test/__fixtures__/revocationRegistryDefinition1.json b/test/__fixtures__/revocationRegistryDefinition1.json index ed5769c..b299871 100644 --- a/test/__fixtures__/revocationRegistryDefinition1.json +++ b/test/__fixtures__/revocationRegistryDefinition1.json @@ -13,4 +13,4 @@ "tailsLocation": "https://my.revocations.tails/tailsfile.txt", "tailsHash": "91zvq2cFmBZmHCcLqFyzv7bfehHH5rMhdAG5wTjqy2PE" } -} \ No newline at end of file +}