From adba83d8df176288083969f2c3f975bbfc1acd9c Mon Sep 17 00:00:00 2001
From: Karim Stekelenburg
Date: Mon, 9 Jan 2023 06:28:27 +0100
Subject: [PATCH 001/139] feat: add anoncreds package (#1118)
Signed-off-by: Karim Stekelenburg
---
packages/anoncreds/README.md | 35 ++++++
packages/anoncreds/jest.config.ts | 14 +++
packages/anoncreds/package.json | 34 ++++++
packages/anoncreds/src/index.ts | 2 +
packages/anoncreds/src/models/exchange.ts | 110 ++++++++++++++++++
packages/anoncreds/src/models/index.ts | 3 +
packages/anoncreds/src/models/internal.ts | 31 +++++
packages/anoncreds/src/models/registry.ts | 38 ++++++
.../src/services/AnonCredsHolderService.ts | 40 +++++++
.../services/AnonCredsHolderServiceOptions.ts | 80 +++++++++++++
.../src/services/AnonCredsIssuerService.ts | 29 +++++
.../services/AnonCredsIssuerServiceOptions.ts | 44 +++++++
.../src/services/AnonCredsRegistry.ts | 41 +++++++
.../src/services/AnonCredsRegistryOptions.ts | 47 ++++++++
.../src/services/AnonCredsVerifierService.ts | 7 ++
.../AnonCredsVerifierServiceOptions.ts | 31 +++++
packages/anoncreds/src/services/index.ts | 8 ++
packages/anoncreds/tsconfig.build.json | 7 ++
packages/anoncreds/tsconfig.json | 6 +
19 files changed, 607 insertions(+)
create mode 100644 packages/anoncreds/README.md
create mode 100644 packages/anoncreds/jest.config.ts
create mode 100644 packages/anoncreds/package.json
create mode 100644 packages/anoncreds/src/index.ts
create mode 100644 packages/anoncreds/src/models/exchange.ts
create mode 100644 packages/anoncreds/src/models/index.ts
create mode 100644 packages/anoncreds/src/models/internal.ts
create mode 100644 packages/anoncreds/src/models/registry.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsHolderService.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsIssuerService.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsRegistry.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsVerifierService.ts
create mode 100644 packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
create mode 100644 packages/anoncreds/src/services/index.ts
create mode 100644 packages/anoncreds/tsconfig.build.json
create mode 100644 packages/anoncreds/tsconfig.json
diff --git a/packages/anoncreds/README.md b/packages/anoncreds/README.md
new file mode 100644
index 0000000000..5bf5e5fbb0
--- /dev/null
+++ b/packages/anoncreds/README.md
@@ -0,0 +1,35 @@
+
+
+
+
+Aries Framework JavaScript AnonCreds Interfaces
+
+
+
+
+
+
+
+
+### Installation
+
+### Quick start
+
+### Example of usage
diff --git a/packages/anoncreds/jest.config.ts b/packages/anoncreds/jest.config.ts
new file mode 100644
index 0000000000..c7c5196637
--- /dev/null
+++ b/packages/anoncreds/jest.config.ts
@@ -0,0 +1,14 @@
+import type { Config } from '@jest/types'
+
+import base from '../../jest.config.base'
+
+import packageJson from './package.json'
+
+const config: Config.InitialOptions = {
+ ...base,
+ name: packageJson.name,
+ displayName: packageJson.name,
+ // setupFilesAfterEnv: ['./tests/setup.ts'],
+}
+
+export default config
diff --git a/packages/anoncreds/package.json b/packages/anoncreds/package.json
new file mode 100644
index 0000000000..29946c1b20
--- /dev/null
+++ b/packages/anoncreds/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "@aries-framework/anoncreds",
+ "main": "build/index",
+ "types": "build/index",
+ "version": "0.2.5",
+ "files": [
+ "build"
+ ],
+ "private": true,
+ "license": "Apache-2.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "homepage": "https://github.com/hyperledger/aries-framework-javascript/tree/main/packages/anoncreds",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/hyperledger/aries-framework-javascript",
+ "directory": "packages/anoncreds"
+ },
+ "scripts": {
+ "build": "yarn run clean && yarn run compile",
+ "clean": "rimraf -rf ./build",
+ "compile": "tsc -p tsconfig.build.json",
+ "prepublishOnly": "yarn run build",
+ "test": "jest"
+ },
+ "dependencies": {
+ "@aries-framework/core": "*"
+ },
+ "peerDependencies": {},
+ "devDependencies": {
+ "typescript": "~4.3.0"
+ }
+}
diff --git a/packages/anoncreds/src/index.ts b/packages/anoncreds/src/index.ts
new file mode 100644
index 0000000000..83fdeb7877
--- /dev/null
+++ b/packages/anoncreds/src/index.ts
@@ -0,0 +1,2 @@
+export * from './models'
+export * from './services'
diff --git a/packages/anoncreds/src/models/exchange.ts b/packages/anoncreds/src/models/exchange.ts
new file mode 100644
index 0000000000..420c26a158
--- /dev/null
+++ b/packages/anoncreds/src/models/exchange.ts
@@ -0,0 +1,110 @@
+// TODO: Maybe we can make this a bit more specific?
+export type WalletQuery = Record
+
+export interface ReferentWalletQuery {
+ [key: string]: WalletQuery
+}
+
+export interface NonRevokedInterval {
+ from?: number
+ to?: number
+}
+
+export interface AnonCredsCredentialOffer {
+ schema_id: string
+ cred_def_id: string
+ nonce: string
+ key_correctness_proof: Record
+}
+
+export interface AnonCredsCredentialRequest {
+ // TODO: Why is this needed? It is just used as context in Ursa, can be any string. Should we remove it?
+ // Should we not make it did related?
+ prover_did: string
+ cred_def_id: string
+ blinded_ms: Record
+ blinded_ms_correctness_proof: Record
+ nonce: string
+}
+
+export interface CredValue {
+ raw: string
+ encoded: string // Raw value as number in string
+}
+
+export interface AnonCredsCredential {
+ schema_id: string
+ cred_def_id: string
+ rev_reg_id?: string
+ values: Record
+ signature: unknown
+ signature_correctness_proof: unknown
+}
+
+export interface AnonCredsProof {
+ requested_proof: {
+ revealed_attrs: Record<
+ string,
+ {
+ sub_proof_index: number
+ raw: string
+ encoded: string
+ }
+ >
+ revealed_attr_groups: Record<
+ string,
+ {
+ sub_proof_index: number
+ values: {
+ [key: string]: {
+ raw: string
+ encoded: string
+ }
+ }
+ }
+ >
+ unrevealed_attrs: Record<
+ string,
+ {
+ sub_proof_index: number
+ }
+ >
+ self_attested_attrs: Record
+
+ requested_predicates: Record
+ }
+ proof: any
+ identifiers: Array<{
+ schema_id: string
+ cred_def_id: string
+ rev_reg_id?: string
+ timestamp?: number
+ }>
+}
+
+export interface AnonCredsProofRequest {
+ name: string
+ version: string
+ nonce: string
+ requested_attributes: Record<
+ string,
+ {
+ name?: string
+ names?: string
+ restrictions?: WalletQuery[]
+ non_revoked?: NonRevokedInterval
+ }
+ >
+ requested_predicates: Record<
+ string,
+ {
+ name: string
+ p_type: '>=' | '>' | '<=' | '<'
+ p_value: number
+ restrictions?: WalletQuery[]
+ non_revoked?: NonRevokedInterval
+ }
+ >
+ non_revoked?: NonRevokedInterval
+ ver?: '1.0' | '2.0'
+}
diff --git a/packages/anoncreds/src/models/index.ts b/packages/anoncreds/src/models/index.ts
new file mode 100644
index 0000000000..6dd1a6e3bb
--- /dev/null
+++ b/packages/anoncreds/src/models/index.ts
@@ -0,0 +1,3 @@
+export * from './internal'
+export * from './exchange'
+export * from './registry'
diff --git a/packages/anoncreds/src/models/internal.ts b/packages/anoncreds/src/models/internal.ts
new file mode 100644
index 0000000000..f0b64d614c
--- /dev/null
+++ b/packages/anoncreds/src/models/internal.ts
@@ -0,0 +1,31 @@
+export interface CredentialInfo {
+ referent: string
+ attributes: {
+ [key: string]: string
+ }
+ schemaId: string
+ credentialDefinitionId: string
+ revocationRegistryId?: number | undefined
+ credentialRevocationId?: string | undefined
+}
+
+export interface RequestedAttribute {
+ credentialId: string
+ timestamp?: number
+ revealed: boolean
+ credentialInfo?: CredentialInfo
+ revoked?: boolean
+}
+
+export interface RequestedPredicate {
+ credentialId: string
+ timestamp?: number
+ credentialInfo?: CredentialInfo
+ revoked?: boolean
+}
+
+export interface RequestedCredentials {
+ requestedAttributes?: Record
+ requestedPredicates?: Record
+ selfAttestedAttributes: Record
+}
diff --git a/packages/anoncreds/src/models/registry.ts b/packages/anoncreds/src/models/registry.ts
new file mode 100644
index 0000000000..98268e1e84
--- /dev/null
+++ b/packages/anoncreds/src/models/registry.ts
@@ -0,0 +1,38 @@
+export interface AnonCredsSchema {
+ name: string
+ version: string
+ attrNames: string[]
+}
+
+export interface AnonCredsCredentialDefinition {
+ schemaId: string
+ type: 'CL'
+ tag: string
+ // TODO: work out in more detail
+ value: {
+ primary: Record
+ revocation?: unknown
+ }
+}
+
+export interface AnonCredsRevocationRegistryDefinition {
+ type: 'CL_ACCUM'
+ credDefId: string
+ tag: string
+ publicKeys: {
+ accumKey: {
+ z: string
+ }
+ }
+ maxCredNum: number
+ tailsLocation: string
+ tailsHash: string
+}
+
+export interface AnonCredsRevocationList {
+ // TODO: this is a new property, but do we keep abbreviation or not?
+ revRegId: string
+ revocationList: number[]
+ currentAccumulator: string
+ timestamp: number
+}
diff --git a/packages/anoncreds/src/services/AnonCredsHolderService.ts b/packages/anoncreds/src/services/AnonCredsHolderService.ts
new file mode 100644
index 0000000000..62c7a49aa4
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsHolderService.ts
@@ -0,0 +1,40 @@
+import type { CredentialInfo } from '../models'
+import type { AnonCredsProof } from '../models/exchange'
+import type {
+ CreateCredentialRequestOptions,
+ CreateCredentialRequestReturn,
+ CreateProofOptions,
+ GetCredentialOptions,
+ StoreCredentialOptions,
+ GetCredentialsForProofRequestOptions,
+ GetCredentialsForProofRequestReturn,
+} from './AnonCredsHolderServiceOptions'
+import type { AgentContext } from '@aries-framework/core'
+
+export interface AnonCredsHolderService {
+ createProof(
+ agentContext: AgentContext,
+ options: CreateProofOptions,
+ metadata?: Record
+ ): Promise
+ storeCredential(
+ agentContext: AgentContext,
+ options: StoreCredentialOptions,
+ metadata?: Record
+ ): Promise
+
+ // TODO: indy has different return types for the credential
+ getCredential(agentContext: AgentContext, options: GetCredentialOptions): Promise
+
+ createCredentialRequest(
+ agentContext: AgentContext,
+ options: CreateCredentialRequestOptions,
+ metadata?: Record
+ ): Promise
+
+ deleteCredential(agentContext: AgentContext, credentialId: string): Promise
+ getCredentialsForProofRequest(
+ agentContext: AgentContext,
+ options: GetCredentialsForProofRequestOptions
+ ): Promise
+}
diff --git a/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
new file mode 100644
index 0000000000..86cb8bbcf9
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
@@ -0,0 +1,80 @@
+import type { CredentialInfo, RequestedCredentials } from '../models'
+import type {
+ AnonCredsCredential,
+ AnonCredsCredentialOffer,
+ AnonCredsCredentialRequest,
+ AnonCredsProofRequest,
+ NonRevokedInterval,
+ ReferentWalletQuery,
+} from '../models/exchange'
+import type {
+ AnonCredsCredentialDefinition,
+ AnonCredsRevocationList,
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsSchema,
+} from '../models/registry'
+
+export interface AttributeInfo {
+ name?: string
+ names?: string[]
+}
+
+export interface CreateProofOptions {
+ proofRequest: AnonCredsProofRequest
+ requestedCredentials: RequestedCredentials
+ schemas: {
+ [schemaId: string]: AnonCredsSchema
+ }
+ credentialDefinitions: {
+ [credentialDefinitionId: string]: AnonCredsCredentialDefinition
+ }
+ revocationStates: {
+ [revocationRegistryDefinitionId: string]: {
+ definition: AnonCredsRevocationRegistryDefinition
+ revocationLists: {
+ [timestamp: string]: AnonCredsRevocationList
+ }
+ }
+ }
+}
+
+export interface StoreCredentialOptions {
+ // TODO: what is in credential request metadata?
+ credentialRequestMetadata: Record
+ credential: AnonCredsCredential
+ credentialDefinition: AnonCredsCredentialDefinition
+ credentialDefinitionId: string
+ credentialId?: string
+ revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition
+ revocationRegistryDefinitionId: string
+}
+
+export interface GetCredentialOptions {
+ credentialId: string
+}
+
+export interface GetCredentialsForProofRequestOptions {
+ proofRequest: AnonCredsProofRequest
+ attributeReferent: string
+ start?: number
+ limit?: number
+ extraQuery?: ReferentWalletQuery
+}
+
+export interface GetCredentialsForProofRequestReturn {
+ credentialInfo: CredentialInfo
+ interval?: NonRevokedInterval
+}
+
+export interface CreateCredentialRequestOptions {
+ // TODO: Why is this needed? It is just used as context in Ursa, can be any string. Should we remove it?
+ // Should we not make it did related? (related to comment in AnonCredsCredentialRequest)
+ holderDid: string
+ credentialOffer: AnonCredsCredentialOffer
+ credentialDefinition: AnonCredsCredentialDefinition
+}
+
+export interface CreateCredentialRequestReturn {
+ credentialRequest: AnonCredsCredentialRequest
+ credentialRequestMetadata: Record
+}
diff --git a/packages/anoncreds/src/services/AnonCredsIssuerService.ts b/packages/anoncreds/src/services/AnonCredsIssuerService.ts
new file mode 100644
index 0000000000..f3fb8c128f
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsIssuerService.ts
@@ -0,0 +1,29 @@
+import type { AnonCredsCredentialOffer } from '../models/exchange'
+import type { AnonCredsCredentialDefinition, AnonCredsSchema } from '../models/registry'
+import type {
+ CreateSchemaOptions,
+ CreateCredentialDefinitionOptions,
+ CreateCredentialOfferOptions,
+ CreateCredentialReturn,
+ CreateCredentialOptions,
+} from './AnonCredsIssuerServiceOptions'
+import type { AgentContext } from '@aries-framework/core'
+
+export interface AnonCredsIssuerService {
+ createSchema(agentContext: AgentContext, options: CreateSchemaOptions): Promise
+
+ // This should store the private part of the credential definition as in the indy-sdk
+ // we don't have access to the private part of the credential definition
+ createCredentialDefinition(
+ agentContext: AgentContext,
+ options: CreateCredentialDefinitionOptions,
+ metadata?: Record
+ ): Promise
+
+ createCredentialOffer(
+ agentContext: AgentContext,
+ options: CreateCredentialOfferOptions
+ ): Promise
+
+ createCredential(agentContext: AgentContext, options: CreateCredentialOptions): Promise
+}
diff --git a/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
new file mode 100644
index 0000000000..27f5450d2f
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
@@ -0,0 +1,44 @@
+import type {
+ AnonCredsCredential,
+ AnonCredsCredentialOffer,
+ AnonCredsCredentialRequest,
+ CredValue,
+} from '../models/exchange'
+import type { AnonCredsSchema } from '../models/registry'
+
+export interface CreateSchemaOptions {
+ issuerId: string
+ name: string
+ version: string
+ attrNames: string[]
+}
+
+export interface CreateCredentialDefinitionOptions {
+ issuerId: string
+ tag: string // TODO: this was initially defined as optional, is that the case?
+ supportRevocation?: boolean
+
+ // If schema doesn't include the id, we need to add it as a separate input parameter
+ schema: {
+ value: AnonCredsSchema
+ id: string
+ }
+}
+
+export interface CreateCredentialOfferOptions {
+ credentialDefinitionId: string
+}
+
+export interface CreateCredentialOptions {
+ credentialOffer: AnonCredsCredentialOffer
+ credentialRequest: AnonCredsCredentialRequest
+ credentialValues: Record
+ revocationRegistryId?: string
+ // TODO: should this just be the tails file instead of a path?
+ tailsFilePath?: string
+}
+
+export interface CreateCredentialReturn {
+ credential: AnonCredsCredential
+ credentialRevocationId?: string
+}
diff --git a/packages/anoncreds/src/services/AnonCredsRegistry.ts b/packages/anoncreds/src/services/AnonCredsRegistry.ts
new file mode 100644
index 0000000000..ead8f8aa70
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsRegistry.ts
@@ -0,0 +1,41 @@
+import type {
+ AnonCredsCredentialDefinition,
+ AnonCredsRevocationList,
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsSchema,
+} from '../models/registry'
+import type {
+ RegisterCredentialDefinitionOptions,
+ RegisterCredentialDefinitionReturn,
+ RegisterRevocationListOptions,
+ RegisterRevocationListReturn,
+ RegisterRevocationRegistryDefinitionOptions,
+ RegisterRevocationRegistryDefinitionReturn,
+ RegisterSchemaOptions,
+ RegisterSchemaReturn,
+} from './AnonCredsRegistryOptions'
+import type { AgentContext } from '@aries-framework/core'
+
+// This service can be registered multiple times in a single AFJ instance.
+// TODO: should all methods have interfaces as input for consistency?
+export interface AnonCredsRegistry {
+ getSchema(agentContext: AgentContext, schemaId: string): Promise
+ registerSchema(options: RegisterSchemaOptions): Promise
+
+ getCredentialDefinition(credentialDefinitionId: string): Promise
+ registerCredentialDefinition(
+ options: RegisterCredentialDefinitionOptions
+ ): Promise
+
+ getRevocationRegistryDefinition(
+ revocationRegistryDefinitionId: string
+ ): Promise
+ registerRevocationRegistryDefinition(
+ options: RegisterRevocationRegistryDefinitionOptions
+ ): Promise
+
+ // TODO: The name of this data model is still tbd.
+ getRevocationList(revocationRegistryId: string, timestamp: string): Promise
+
+ registerRevocationList(options: RegisterRevocationListOptions): Promise
+}
diff --git a/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts b/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
new file mode 100644
index 0000000000..206d56fc4d
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
@@ -0,0 +1,47 @@
+import type {
+ AnonCredsCredentialDefinition,
+ AnonCredsRevocationList,
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsSchema,
+} from '../models/registry'
+import type { AgentContext } from '@aries-framework/core'
+
+export interface RegisterSchemaOptions {
+ agentContext: AgentContext
+ schema: AnonCredsSchema
+
+ // Identifier of issuer that will create the credential definition.
+ issuerId: string
+}
+export interface RegisterSchemaReturn {
+ schemaId: string
+}
+
+export interface RegisterCredentialDefinitionOptions {
+ credentialDefinition: AnonCredsCredentialDefinition
+
+ // Identifier of issuer that will create the credential definition.
+ issuerId: string
+}
+
+export interface RegisterCredentialDefinitionReturn {
+ credentialDefinitionId: string
+}
+
+export interface RegisterRevocationRegistryDefinitionOptions {
+ revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition
+}
+
+export interface RegisterRevocationRegistryDefinitionReturn {
+ revocationRegistryDefinitionId: string
+}
+
+export interface RegisterRevocationListOptions {
+ // Timestamp is often calculated by the ledger, otherwise method should just take current time
+ // Return type does include the timestamp.
+ revocationList: Omit
+}
+
+export interface RegisterRevocationListReturn {
+ timestamp: string
+}
diff --git a/packages/anoncreds/src/services/AnonCredsVerifierService.ts b/packages/anoncreds/src/services/AnonCredsVerifierService.ts
new file mode 100644
index 0000000000..ec68021817
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsVerifierService.ts
@@ -0,0 +1,7 @@
+import type { VerifyProofOptions } from './AnonCredsVerifierServiceOptions'
+
+export interface AnonCredsVerifierService {
+ // TODO: do we want to extend the return type with more info besides a boolean.
+ // If the value is false it would be nice to have some extra contexts about why it failed
+ verifyProof(options: VerifyProofOptions): Promise
+}
diff --git a/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
new file mode 100644
index 0000000000..c67470fd55
--- /dev/null
+++ b/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
@@ -0,0 +1,31 @@
+import type { AnonCredsProof, AnonCredsProofRequest } from '../models/exchange'
+import type {
+ AnonCredsCredentialDefinition,
+ AnonCredsRevocationList,
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsSchema,
+} from '../models/registry'
+
+export interface VerifyProofOptions {
+ proofRequest: AnonCredsProofRequest
+ proof: AnonCredsProof
+ schemas: {
+ [schemaId: string]: AnonCredsSchema
+ }
+ credentialDefinitions: {
+ [credentialDefinitionId: string]: AnonCredsCredentialDefinition
+ }
+ revocationStates: {
+ [revocationRegistryDefinitionId: string]: {
+ definition: AnonCredsRevocationRegistryDefinition
+ // NOTE: the verifier only needs the accumulator, not the whole state of the revocation registry
+ // Requiring this to be the full state means we need to retrieve the full state from the ledger
+ // as a verifier. This is just following the data models from the AnonCreds spec, but for e.g. indy
+ // this means we need to retrieve _ALL_ deltas from the ledger to verify a proof. While currently we
+ // only need to fetch the registry.
+ revocationLists: {
+ [timestamp: string]: AnonCredsRevocationList
+ }
+ }
+ }
+}
diff --git a/packages/anoncreds/src/services/index.ts b/packages/anoncreds/src/services/index.ts
new file mode 100644
index 0000000000..1a612359ed
--- /dev/null
+++ b/packages/anoncreds/src/services/index.ts
@@ -0,0 +1,8 @@
+export * from './AnonCredsHolderService'
+export * from './AnonCredsHolderServiceOptions'
+export * from './AnonCredsIssuerService'
+export * from './AnonCredsIssuerServiceOptions'
+export * from './AnonCredsRegistry'
+export * from './AnonCredsRegistryOptions'
+export * from './AnonCredsVerifierService'
+export * from './AnonCredsVerifierServiceOptions'
diff --git a/packages/anoncreds/tsconfig.build.json b/packages/anoncreds/tsconfig.build.json
new file mode 100644
index 0000000000..2b75d0adab
--- /dev/null
+++ b/packages/anoncreds/tsconfig.build.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../tsconfig.build.json",
+ "compilerOptions": {
+ "outDir": "./build"
+ },
+ "include": ["src/**/*"]
+}
diff --git a/packages/anoncreds/tsconfig.json b/packages/anoncreds/tsconfig.json
new file mode 100644
index 0000000000..46efe6f721
--- /dev/null
+++ b/packages/anoncreds/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "types": ["jest"]
+ }
+}
From 2f6ae143313b49e71265dc87e5bfd8caa4942127 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 10 Jan 2023 04:33:49 +0100
Subject: [PATCH 002/139] build(deps): bump luxon from 1.28.0 to 1.28.1 (#1196)
Bumps [luxon](https://github.com/moment/luxon) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/moment/luxon/releases)
- [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md)
- [Commits](moment/luxon@1.28.0...1.28.1)
---
updated-dependencies:
- dependency-name: luxon
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
---
yarn.lock | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index 3bd2eab136..e542fe1654 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7402,9 +7402,9 @@ lru_map@^0.4.1:
integrity sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg==
luxon@^1.27.0:
- version "1.28.0"
- resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.0.tgz#e7f96daad3938c06a62de0fb027115d251251fbf"
- integrity sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==
+ version "1.28.1"
+ resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.1.tgz#528cdf3624a54506d710290a2341aa8e6e6c61b0"
+ integrity sha512-gYHAa180mKrNIUJCbwpmD0aTu9kV0dREDrwNnuyFAsO1Wt0EVYSZelPnJlbj9HplzXX/YWXHFTL45kvZ53M0pw==
make-dir@^2.0.0, make-dir@^2.1.0:
version "2.1.0"
From 59d1982f5cbfbea82199320fead61038e445d49c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 10 Jan 2023 04:07:44 +0000
Subject: [PATCH 003/139] build(deps): bump json5 from 1.0.1 to 1.0.2 (#1191)
---
yarn.lock | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index e542fe1654..d28283327d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7082,9 +7082,9 @@ json5@2.x, json5@^2.2.1:
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
json5@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
- integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
+ integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
dependencies:
minimist "^1.2.0"
@@ -7888,9 +7888,9 @@ minimist-options@4.1.0:
kind-of "^6.0.3"
minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
- version "1.2.6"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
- integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
+ integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
minipass-collect@^1.0.2:
version "1.0.2"
From fd006f262a91f901e7f8a9c6e6882ea178230005 Mon Sep 17 00:00:00 2001
From: Kim Ebert
Date: Tue, 10 Jan 2023 03:55:48 -0700
Subject: [PATCH 004/139] feat: adding trust ping events and trust ping command
(#1182)
Signed-off-by: Kim Ebert
---
.../src/modules/connections/ConnectionsApi.ts | 40 ++++++++++++++++
.../modules/connections/TrustPingEvents.ts | 24 ++++++++++
.../core/src/modules/connections/index.ts | 1 +
.../connections/services/TrustPingService.ts | 30 +++++++++++-
packages/core/tests/connections.test.ts | 21 ++++++++-
packages/core/tests/helpers.ts | 46 +++++++++++++++++++
6 files changed, 159 insertions(+), 3 deletions(-)
create mode 100644 packages/core/src/modules/connections/TrustPingEvents.ts
diff --git a/packages/core/src/modules/connections/ConnectionsApi.ts b/packages/core/src/modules/connections/ConnectionsApi.ts
index b437c46b4e..da895de772 100644
--- a/packages/core/src/modules/connections/ConnectionsApi.ts
+++ b/packages/core/src/modules/connections/ConnectionsApi.ts
@@ -32,6 +32,11 @@ import { HandshakeProtocol } from './models'
import { ConnectionService } from './services/ConnectionService'
import { TrustPingService } from './services/TrustPingService'
+export interface SendPingOptions {
+ responseRequested?: boolean
+ withReturnRouting?: boolean
+}
+
@injectable()
export class ConnectionsApi {
/**
@@ -227,6 +232,41 @@ export class ConnectionsApi {
return connectionRecord
}
+ /**
+ * Send a trust ping to an established connection
+ *
+ * @param connectionId the id of the connection for which to accept the response
+ * @param responseRequested do we want a response to our ping
+ * @param withReturnRouting do we want a response at the time of posting
+ * @returns TurstPingMessage
+ */
+ public async sendPing(
+ connectionId: string,
+ { responseRequested = true, withReturnRouting = undefined }: SendPingOptions
+ ) {
+ const connection = await this.getById(connectionId)
+
+ const { message } = await this.connectionService.createTrustPing(this.agentContext, connection, {
+ responseRequested: responseRequested,
+ })
+
+ if (withReturnRouting === true) {
+ message.setReturnRouting(ReturnRouteTypes.all)
+ }
+
+ // Disable return routing as we don't want to receive a response for this message over the same channel
+ // This has led to long timeouts as not all clients actually close an http socket if there is no response message
+ if (withReturnRouting === false) {
+ message.setReturnRouting(ReturnRouteTypes.none)
+ }
+
+ await this.messageSender.sendMessage(
+ new OutboundMessageContext(message, { agentContext: this.agentContext, connection })
+ )
+
+ return message
+ }
+
public async returnWhenIsConnected(connectionId: string, options?: { timeoutMs: number }): Promise {
return this.connectionService.returnWhenIsConnected(this.agentContext, connectionId, options?.timeoutMs)
}
diff --git a/packages/core/src/modules/connections/TrustPingEvents.ts b/packages/core/src/modules/connections/TrustPingEvents.ts
new file mode 100644
index 0000000000..55200e6c5b
--- /dev/null
+++ b/packages/core/src/modules/connections/TrustPingEvents.ts
@@ -0,0 +1,24 @@
+import type { BaseEvent } from '../../agent/Events'
+import type { TrustPingMessage, TrustPingResponseMessage } from './messages'
+import type { ConnectionRecord } from './repository/ConnectionRecord'
+
+export enum TrustPingEventTypes {
+ TrustPingReceivedEvent = 'TrustPingReceivedEvent',
+ TrustPingResponseReceivedEvent = 'TrustPingResponseReceivedEvent',
+}
+
+export interface TrustPingReceivedEvent extends BaseEvent {
+ type: typeof TrustPingEventTypes.TrustPingReceivedEvent
+ payload: {
+ connectionRecord: ConnectionRecord
+ message: TrustPingMessage
+ }
+}
+
+export interface TrustPingResponseReceivedEvent extends BaseEvent {
+ type: typeof TrustPingEventTypes.TrustPingResponseReceivedEvent
+ payload: {
+ connectionRecord: ConnectionRecord
+ message: TrustPingResponseMessage
+ }
+}
diff --git a/packages/core/src/modules/connections/index.ts b/packages/core/src/modules/connections/index.ts
index 52fe834617..e9dd5862d9 100644
--- a/packages/core/src/modules/connections/index.ts
+++ b/packages/core/src/modules/connections/index.ts
@@ -3,6 +3,7 @@ export * from './models'
export * from './repository'
export * from './services'
export * from './ConnectionEvents'
+export * from './TrustPingEvents'
export * from './ConnectionsApi'
export * from './DidExchangeProtocol'
export * from './ConnectionsModuleConfig'
diff --git a/packages/core/src/modules/connections/services/TrustPingService.ts b/packages/core/src/modules/connections/services/TrustPingService.ts
index 17032e089e..5d4b10eb20 100644
--- a/packages/core/src/modules/connections/services/TrustPingService.ts
+++ b/packages/core/src/modules/connections/services/TrustPingService.ts
@@ -1,14 +1,31 @@
import type { InboundMessageContext } from '../../../agent/models/InboundMessageContext'
+import type { TrustPingReceivedEvent, TrustPingResponseReceivedEvent } from '../TrustPingEvents'
import type { TrustPingMessage } from '../messages'
import type { ConnectionRecord } from '../repository/ConnectionRecord'
+import { EventEmitter } from '../../../agent/EventEmitter'
import { OutboundMessageContext } from '../../../agent/models'
import { injectable } from '../../../plugins'
+import { TrustPingEventTypes } from '../TrustPingEvents'
import { TrustPingResponseMessage } from '../messages'
@injectable()
export class TrustPingService {
+ private eventEmitter: EventEmitter
+
+ public constructor(eventEmitter: EventEmitter) {
+ this.eventEmitter = eventEmitter
+ }
+
public processPing({ message, agentContext }: InboundMessageContext, connection: ConnectionRecord) {
+ this.eventEmitter.emit(agentContext, {
+ type: TrustPingEventTypes.TrustPingReceivedEvent,
+ payload: {
+ connectionRecord: connection,
+ message: message,
+ },
+ })
+
if (message.responseRequested) {
const response = new TrustPingResponseMessage({
threadId: message.id,
@@ -18,8 +35,17 @@ export class TrustPingService {
}
}
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
public processPingResponse(inboundMessage: InboundMessageContext) {
- // TODO: handle ping response message
+ const { agentContext, message } = inboundMessage
+
+ const connection = inboundMessage.assertReadyConnection()
+
+ this.eventEmitter.emit(agentContext, {
+ type: TrustPingEventTypes.TrustPingResponseReceivedEvent,
+ payload: {
+ connectionRecord: connection,
+ message: message,
+ },
+ })
}
}
diff --git a/packages/core/tests/connections.test.ts b/packages/core/tests/connections.test.ts
index 598a6d8fe0..24c03ad907 100644
--- a/packages/core/tests/connections.test.ts
+++ b/packages/core/tests/connections.test.ts
@@ -18,7 +18,7 @@ import { Agent } from '../src/agent/Agent'
import { didKeyToVerkey } from '../src/modules/dids/helpers'
import { OutOfBandState } from '../src/modules/oob/domain/OutOfBandState'
-import { getAgentOptions } from './helpers'
+import { getAgentOptions, waitForTrustPingResponseReceivedEvent } from './helpers'
describe('connections', () => {
let faberAgent: Agent
@@ -85,6 +85,25 @@ describe('connections', () => {
await mediatorAgent.wallet.delete()
})
+ it('one agent should be able to send and receive a ping', async () => {
+ const faberOutOfBandRecord = await faberAgent.oob.createInvitation({
+ handshakeProtocols: [HandshakeProtocol.Connections],
+ multiUseInvitation: true,
+ })
+
+ const invitation = faberOutOfBandRecord.outOfBandInvitation
+ const invitationUrl = invitation.toUrl({ domain: 'https://example.com' })
+
+ // Receive invitation with alice agent
+ let { connectionRecord: aliceFaberConnection } = await aliceAgent.oob.receiveInvitationFromUrl(invitationUrl)
+ aliceFaberConnection = await aliceAgent.connections.returnWhenIsConnected(aliceFaberConnection!.id)
+ expect(aliceFaberConnection.state).toBe(DidExchangeState.Completed)
+
+ const ping = await aliceAgent.connections.sendPing(aliceFaberConnection.id, {})
+
+ await waitForTrustPingResponseReceivedEvent(aliceAgent, { threadId: ping.threadId })
+ })
+
it('one should be able to make multiple connections using a multi use invite', async () => {
const faberOutOfBandRecord = await faberAgent.oob.createInvitation({
handshakeProtocols: [HandshakeProtocol.Connections],
diff --git a/packages/core/tests/helpers.ts b/packages/core/tests/helpers.ts
index 70864471ff..7354fbe5a4 100644
--- a/packages/core/tests/helpers.ts
+++ b/packages/core/tests/helpers.ts
@@ -8,6 +8,7 @@ import type {
ConnectionRecordProps,
CredentialDefinitionTemplate,
CredentialStateChangedEvent,
+ TrustPingResponseReceivedEvent,
InitConfig,
InjectionToken,
ProofStateChangedEvent,
@@ -45,6 +46,7 @@ import {
ConnectionRecord,
CredentialEventTypes,
CredentialState,
+ TrustPingEventTypes,
DependencyManager,
DidExchangeRole,
DidExchangeState,
@@ -240,6 +242,50 @@ export function waitForProofExchangeRecordSubject(
)
}
+export async function waitForTrustPingResponseReceivedEvent(
+ agent: Agent,
+ options: {
+ threadId?: string
+ parentThreadId?: string
+ state?: ProofState
+ previousState?: ProofState | null
+ timeoutMs?: number
+ }
+) {
+ const observable = agent.events.observable(
+ TrustPingEventTypes.TrustPingResponseReceivedEvent
+ )
+
+ return waitForTrustPingResponseReceivedEventSubject(observable, options)
+}
+
+export function waitForTrustPingResponseReceivedEventSubject(
+ subject: ReplaySubject | Observable,
+ {
+ threadId,
+ timeoutMs = 10000,
+ }: {
+ threadId?: string
+ timeoutMs?: number
+ }
+) {
+ const observable = subject instanceof ReplaySubject ? subject.asObservable() : subject
+ return firstValueFrom(
+ observable.pipe(
+ filter((e) => threadId === undefined || e.payload.message.threadId === threadId),
+ timeout(timeoutMs),
+ catchError(() => {
+ throw new Error(
+ `TrustPingResponseReceivedEvent event not emitted within specified timeout: {
+ threadId: ${threadId},
+}`
+ )
+ }),
+ map((e) => e.payload.message)
+ )
+ )
+}
+
export function waitForCredentialRecordSubject(
subject: ReplaySubject | Observable,
{
From da7abdebeb6d5d9de5281a095d1f67e1c3e08e5b Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Wed, 11 Jan 2023 00:54:57 +0800
Subject: [PATCH 005/139] chore: rename plugin to module (#1201)
Signed-off-by: Timo Glastra
---
packages/action-menu/README.md | 8 ++++----
packages/question-answer/README.md | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/packages/action-menu/README.md b/packages/action-menu/README.md
index ffd98caf55..c47c6a4ac7 100644
--- a/packages/action-menu/README.md
+++ b/packages/action-menu/README.md
@@ -6,7 +6,7 @@
height="250px"
/>
-Aries Framework JavaScript Action Menu Plugin
+Aries Framework JavaScript Action Menu Module
-Action Menu plugin for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript.git). Implements [Aries RFC 0509](https://github.com/hyperledger/aries-rfcs/blob/1795d5c2d36f664f88f5e8045042ace8e573808c/features/0509-action-menu/README.md).
+Action Menu module for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript.git). Implements [Aries RFC 0509](https://github.com/hyperledger/aries-rfcs/blob/1795d5c2d36f664f88f5e8045042ace8e573808c/features/0509-action-menu/README.md).
### Installation
@@ -38,7 +38,7 @@ Make sure you have set up the correct version of Aries Framework JavaScript acco
npm info "@aries-framework/action-menu" peerDependencies
```
-Then add the action-menu plugin to your project.
+Then add the action-menu module to your project.
```sh
yarn add @aries-framework/action-menu
@@ -46,7 +46,7 @@ yarn add @aries-framework/action-menu
### Quick start
-In order for this plugin to work, we have to inject it into the agent to access agent functionality. See the example for more information.
+In order for this module to work, we have to inject it into the agent to access agent functionality. See the example for more information.
### Example of usage
diff --git a/packages/question-answer/README.md b/packages/question-answer/README.md
index 00ebca6637..33d1b17750 100644
--- a/packages/question-answer/README.md
+++ b/packages/question-answer/README.md
@@ -6,7 +6,7 @@
height="250px"
/>
-Aries Framework JavaScript Question Answer Plugin
+Aries Framework JavaScript Question Answer Module
-Question Answer plugin for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript.git). Implements [Aries RFC 0113](https://github.com/hyperledger/aries-rfcs/blob/1795d5c2d36f664f88f5e8045042ace8e573808c/features/0113-question-answer/README.md).
+Question Answer module for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript.git). Implements [Aries RFC 0113](https://github.com/hyperledger/aries-rfcs/blob/1795d5c2d36f664f88f5e8045042ace8e573808c/features/0113-question-answer/README.md).
### Installation
@@ -38,7 +38,7 @@ Make sure you have set up the correct version of Aries Framework JavaScript acco
npm info "@aries-framework/question-answer" peerDependencies
```
-Then add the question-answer plugin to your project.
+Then add the question-answer module to your project.
```sh
yarn add @aries-framework/question-answer
@@ -46,7 +46,7 @@ yarn add @aries-framework/question-answer
### Quick start
-In order for this plugin to work, we have to inject it into the agent to access agent functionality. See the example for more information.
+In order for this module to work, we have to inject it into the agent to access agent functionality. See the example for more information.
### Example of usage
From 9933b35a6aa4524caef8a885e71b742cd0d7186b Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Wed, 11 Jan 2023 18:33:45 +0800
Subject: [PATCH 006/139] feat(indy-sdk): add indy-sdk package (#1200)
Co-authored-by: Karim Stekelenburg
Signed-off-by: Timo Glastra
---
packages/action-menu/package.json | 7 +-
packages/anoncreds/package.json | 6 +-
packages/anoncreds/src/models/exchange.ts | 2 +-
packages/anoncreds/src/models/internal.ts | 6 +-
packages/anoncreds/src/models/registry.ts | 5 +-
.../src/services/AnonCredsHolderService.ts | 11 +-
.../services/AnonCredsHolderServiceOptions.ts | 14 +-
.../services/AnonCredsIssuerServiceOptions.ts | 9 +-
.../src/services/AnonCredsRegistry.ts | 41 -
.../src/services/AnonCredsRegistryOptions.ts | 47 --
.../AnonCredsVerifierServiceOptions.ts | 2 +-
packages/anoncreds/src/services/index.ts | 3 +-
.../services/registry/AnonCredsRegistry.ts | 48 ++
.../registry/CredentialDefinitionOptions.ts | 45 ++
.../registry/RevocationListOptions.ts | 18 +
.../RevocationRegistryDefinitionOptions.ts | 18 +
.../src/services/registry/SchemaOptions.ts | 46 ++
.../anoncreds/src/services/registry/base.ts | 19 +
.../anoncreds/src/services/registry/index.ts | 6 +
packages/core/package.json | 2 +-
packages/core/src/index.ts | 5 +-
.../IndyCredentialFormatService.test.ts | 6 +-
...v2.ldproof.credentials-auto-accept.test.ts | 25 +-
.../indy/services/IndyRevocationService.ts | 4 +-
.../indy/services/IndyVerifierService.ts | 16 +-
.../ledger/__tests__/LedgerApi.test.ts | 6 +-
.../core/src/modules/ledger/error/index.ts | 3 +
.../modules/routing/__tests__/pickup.test.ts | 34 +-
.../modules/vc/__tests__/documentLoader.ts | 30 +-
packages/core/src/utils/validators.ts | 2 +-
packages/core/tests/helpers.ts | 52 +-
packages/indy-sdk/README.md | 31 +
packages/indy-sdk/jest.config.ts | 14 +
packages/indy-sdk/package.json | 40 +
packages/indy-sdk/src/IndySdkModule.ts | 17 +
packages/indy-sdk/src/IndySdkModuleConfig.ts | 45 ++
packages/indy-sdk/src/anoncreds/index.ts | 4 +
.../services/IndySdkAnonCredsRegistry.ts | 514 ++++++++++++
.../services/IndySdkHolderService.ts | 327 ++++++++
.../services/IndySdkIssuerService.ts | 129 +++
.../services/IndySdkIssuerServiceMetadata.ts | 3 +
.../services/IndySdkRevocationService.ts | 177 ++++
.../services/IndySdkUtilitiesService.ts | 65 ++
.../services/IndySdkVerifierService.ts | 86 ++
.../utils/__tests__/identifiers.test.ts | 48 ++
.../utils/__tests__/transform.test.ts | 114 +++
.../src/anoncreds/utils/identifiers.ts | 41 +
.../indy-sdk/src/anoncreds/utils/transform.ts | 153 ++++
.../src/dids/IndySdkSovDidRegistrar.ts | 265 ++++++
.../src/dids/IndySdkSovDidResolver.ts | 95 +++
packages/indy-sdk/src/dids/didSovUtil.ts | 132 +++
packages/indy-sdk/src/dids/index.ts | 7 +
packages/indy-sdk/src/error/IndySdkError.ts | 11 +
packages/indy-sdk/src/error/index.ts | 2 +
packages/indy-sdk/src/error/indyError.ts | 100 +++
packages/indy-sdk/src/index.ts | 26 +
packages/indy-sdk/src/ledger/IndySdkPool.ts | 208 +++++
.../indy-sdk/src/ledger/IndySdkPoolService.ts | 338 ++++++++
.../__tests__/IndySdkPoolService.test.ts | 444 ++++++++++
.../src/ledger/__tests__/util.test.ts | 45 ++
.../src/ledger/error/IndySdkPoolError.ts | 7 +
.../error/IndySdkPoolNotConfiguredError.ts | 7 +
.../ledger/error/IndySdkPoolNotFoundError.ts | 7 +
packages/indy-sdk/src/ledger/error/index.ts | 3 +
packages/indy-sdk/src/ledger/index.ts | 2 +
packages/indy-sdk/src/ledger/util.ts | 9 +
.../src/storage/IndySdkStorageService.ts | 324 ++++++++
.../__tests__/IndySdkStorageService.test.ts | 297 +++++++
packages/indy-sdk/src/storage/index.ts | 1 +
packages/indy-sdk/src/types.ts | 6 +
.../indy-sdk/src/utils/__tests__/did.test.ts | 73 ++
.../indy-sdk/src/utils/assertIndySdkWallet.ts | 13 +
packages/indy-sdk/src/utils/did.ts | 89 ++
packages/indy-sdk/src/utils/promises.ts | 44 +
packages/indy-sdk/src/wallet/IndySdkWallet.ts | 686 ++++++++++++++++
.../wallet/__tests__/IndySdkWallet.test.ts | 125 +++
packages/indy-sdk/src/wallet/index.ts | 1 +
packages/indy-sdk/tsconfig.build.json | 7 +
packages/indy-sdk/tsconfig.json | 6 +
packages/question-answer/package.json | 6 +-
packages/react-native/package.json | 2 +-
tests/transport/SubjectOutboundTransport.ts | 2 +-
yarn.lock | 761 +++++++++---------
83 files changed, 5940 insertions(+), 557 deletions(-)
delete mode 100644 packages/anoncreds/src/services/AnonCredsRegistry.ts
delete mode 100644 packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
create mode 100644 packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
create mode 100644 packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
create mode 100644 packages/anoncreds/src/services/registry/RevocationListOptions.ts
create mode 100644 packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
create mode 100644 packages/anoncreds/src/services/registry/SchemaOptions.ts
create mode 100644 packages/anoncreds/src/services/registry/base.ts
create mode 100644 packages/anoncreds/src/services/registry/index.ts
create mode 100644 packages/core/src/modules/ledger/error/index.ts
create mode 100644 packages/indy-sdk/README.md
create mode 100644 packages/indy-sdk/jest.config.ts
create mode 100644 packages/indy-sdk/package.json
create mode 100644 packages/indy-sdk/src/IndySdkModule.ts
create mode 100644 packages/indy-sdk/src/IndySdkModuleConfig.ts
create mode 100644 packages/indy-sdk/src/anoncreds/index.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkIssuerService.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkIssuerServiceMetadata.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkRevocationService.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkUtilitiesService.ts
create mode 100644 packages/indy-sdk/src/anoncreds/services/IndySdkVerifierService.ts
create mode 100644 packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
create mode 100644 packages/indy-sdk/src/anoncreds/utils/__tests__/transform.test.ts
create mode 100644 packages/indy-sdk/src/anoncreds/utils/identifiers.ts
create mode 100644 packages/indy-sdk/src/anoncreds/utils/transform.ts
create mode 100644 packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
create mode 100644 packages/indy-sdk/src/dids/IndySdkSovDidResolver.ts
create mode 100644 packages/indy-sdk/src/dids/didSovUtil.ts
create mode 100644 packages/indy-sdk/src/dids/index.ts
create mode 100644 packages/indy-sdk/src/error/IndySdkError.ts
create mode 100644 packages/indy-sdk/src/error/index.ts
create mode 100644 packages/indy-sdk/src/error/indyError.ts
create mode 100644 packages/indy-sdk/src/index.ts
create mode 100644 packages/indy-sdk/src/ledger/IndySdkPool.ts
create mode 100644 packages/indy-sdk/src/ledger/IndySdkPoolService.ts
create mode 100644 packages/indy-sdk/src/ledger/__tests__/IndySdkPoolService.test.ts
create mode 100644 packages/indy-sdk/src/ledger/__tests__/util.test.ts
create mode 100644 packages/indy-sdk/src/ledger/error/IndySdkPoolError.ts
create mode 100644 packages/indy-sdk/src/ledger/error/IndySdkPoolNotConfiguredError.ts
create mode 100644 packages/indy-sdk/src/ledger/error/IndySdkPoolNotFoundError.ts
create mode 100644 packages/indy-sdk/src/ledger/error/index.ts
create mode 100644 packages/indy-sdk/src/ledger/index.ts
create mode 100644 packages/indy-sdk/src/ledger/util.ts
create mode 100644 packages/indy-sdk/src/storage/IndySdkStorageService.ts
create mode 100644 packages/indy-sdk/src/storage/__tests__/IndySdkStorageService.test.ts
create mode 100644 packages/indy-sdk/src/storage/index.ts
create mode 100644 packages/indy-sdk/src/types.ts
create mode 100644 packages/indy-sdk/src/utils/__tests__/did.test.ts
create mode 100644 packages/indy-sdk/src/utils/assertIndySdkWallet.ts
create mode 100644 packages/indy-sdk/src/utils/did.ts
create mode 100644 packages/indy-sdk/src/utils/promises.ts
create mode 100644 packages/indy-sdk/src/wallet/IndySdkWallet.ts
create mode 100644 packages/indy-sdk/src/wallet/__tests__/IndySdkWallet.test.ts
create mode 100644 packages/indy-sdk/src/wallet/index.ts
create mode 100644 packages/indy-sdk/tsconfig.build.json
create mode 100644 packages/indy-sdk/tsconfig.json
diff --git a/packages/action-menu/package.json b/packages/action-menu/package.json
index cedf2db5ef..7537700f4c 100644
--- a/packages/action-menu/package.json
+++ b/packages/action-menu/package.json
@@ -26,13 +26,10 @@
"dependencies": {
"class-transformer": "0.5.1",
"class-validator": "0.13.1",
- "rxjs": "^7.2.0"
- },
- "peerDependencies": {
- "@aries-framework/core": "0.2.5"
+ "rxjs": "^7.2.0",
+ "@aries-framework/core": "0.3.2"
},
"devDependencies": {
- "@aries-framework/node": "0.3.2",
"reflect-metadata": "^0.1.13",
"rimraf": "~3.0.2",
"typescript": "~4.3.0"
diff --git a/packages/anoncreds/package.json b/packages/anoncreds/package.json
index 29946c1b20..25033d94a2 100644
--- a/packages/anoncreds/package.json
+++ b/packages/anoncreds/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/anoncreds",
"main": "build/index",
"types": "build/index",
- "version": "0.2.5",
+ "version": "0.3.2",
"files": [
"build"
],
@@ -25,10 +25,10 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "*"
+ "@aries-framework/core": "0.3.2"
},
- "peerDependencies": {},
"devDependencies": {
+ "rimraf": "~3.0.2",
"typescript": "~4.3.0"
}
}
diff --git a/packages/anoncreds/src/models/exchange.ts b/packages/anoncreds/src/models/exchange.ts
index 420c26a158..bd30979a86 100644
--- a/packages/anoncreds/src/models/exchange.ts
+++ b/packages/anoncreds/src/models/exchange.ts
@@ -90,7 +90,7 @@ export interface AnonCredsProofRequest {
string,
{
name?: string
- names?: string
+ names?: string[]
restrictions?: WalletQuery[]
non_revoked?: NonRevokedInterval
}
diff --git a/packages/anoncreds/src/models/internal.ts b/packages/anoncreds/src/models/internal.ts
index f0b64d614c..c838dcf865 100644
--- a/packages/anoncreds/src/models/internal.ts
+++ b/packages/anoncreds/src/models/internal.ts
@@ -5,7 +5,7 @@ export interface CredentialInfo {
}
schemaId: string
credentialDefinitionId: string
- revocationRegistryId?: number | undefined
+ revocationRegistryId?: string | undefined
credentialRevocationId?: string | undefined
}
@@ -13,14 +13,14 @@ export interface RequestedAttribute {
credentialId: string
timestamp?: number
revealed: boolean
- credentialInfo?: CredentialInfo
+ credentialInfo: CredentialInfo
revoked?: boolean
}
export interface RequestedPredicate {
credentialId: string
timestamp?: number
- credentialInfo?: CredentialInfo
+ credentialInfo: CredentialInfo
revoked?: boolean
}
diff --git a/packages/anoncreds/src/models/registry.ts b/packages/anoncreds/src/models/registry.ts
index 98268e1e84..1e5e6d7879 100644
--- a/packages/anoncreds/src/models/registry.ts
+++ b/packages/anoncreds/src/models/registry.ts
@@ -1,10 +1,12 @@
export interface AnonCredsSchema {
+ issuerId: string
name: string
version: string
attrNames: string[]
}
export interface AnonCredsCredentialDefinition {
+ issuerId: string
schemaId: string
type: 'CL'
tag: string
@@ -16,6 +18,7 @@ export interface AnonCredsCredentialDefinition {
}
export interface AnonCredsRevocationRegistryDefinition {
+ issuerId: string
type: 'CL_ACCUM'
credDefId: string
tag: string
@@ -30,7 +33,7 @@ export interface AnonCredsRevocationRegistryDefinition {
}
export interface AnonCredsRevocationList {
- // TODO: this is a new property, but do we keep abbreviation or not?
+ issuerId: string
revRegId: string
revocationList: number[]
currentAccumulator: string
diff --git a/packages/anoncreds/src/services/AnonCredsHolderService.ts b/packages/anoncreds/src/services/AnonCredsHolderService.ts
index 62c7a49aa4..3e287bde00 100644
--- a/packages/anoncreds/src/services/AnonCredsHolderService.ts
+++ b/packages/anoncreds/src/services/AnonCredsHolderService.ts
@@ -12,11 +12,7 @@ import type {
import type { AgentContext } from '@aries-framework/core'
export interface AnonCredsHolderService {
- createProof(
- agentContext: AgentContext,
- options: CreateProofOptions,
- metadata?: Record
- ): Promise
+ createProof(agentContext: AgentContext, options: CreateProofOptions): Promise
storeCredential(
agentContext: AgentContext,
options: StoreCredentialOptions,
@@ -28,13 +24,12 @@ export interface AnonCredsHolderService {
createCredentialRequest(
agentContext: AgentContext,
- options: CreateCredentialRequestOptions,
- metadata?: Record
+ options: CreateCredentialRequestOptions
): Promise
deleteCredential(agentContext: AgentContext, credentialId: string): Promise
getCredentialsForProofRequest(
agentContext: AgentContext,
options: GetCredentialsForProofRequestOptions
- ): Promise
+ ): Promise
}
diff --git a/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
index 86cb8bbcf9..3de66df703 100644
--- a/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
+++ b/packages/anoncreds/src/services/AnonCredsHolderServiceOptions.ts
@@ -28,8 +28,10 @@ export interface CreateProofOptions {
credentialDefinitions: {
[credentialDefinitionId: string]: AnonCredsCredentialDefinition
}
- revocationStates: {
+ revocationRegistries: {
[revocationRegistryDefinitionId: string]: {
+ // tails file MUST already be downloaded on a higher level and stored
+ tailsFilePath: string
definition: AnonCredsRevocationRegistryDefinition
revocationLists: {
[timestamp: string]: AnonCredsRevocationList
@@ -45,8 +47,10 @@ export interface StoreCredentialOptions {
credentialDefinition: AnonCredsCredentialDefinition
credentialDefinitionId: string
credentialId?: string
- revocationRegistryDefinition?: AnonCredsRevocationRegistryDefinition
- revocationRegistryDefinitionId: string
+ revocationRegistry?: {
+ id: string
+ definition: AnonCredsRevocationRegistryDefinition
+ }
}
export interface GetCredentialOptions {
@@ -61,10 +65,10 @@ export interface GetCredentialsForProofRequestOptions {
extraQuery?: ReferentWalletQuery
}
-export interface GetCredentialsForProofRequestReturn {
+export type GetCredentialsForProofRequestReturn = Array<{
credentialInfo: CredentialInfo
interval?: NonRevokedInterval
-}
+}>
export interface CreateCredentialRequestOptions {
// TODO: Why is this needed? It is just used as context in Ursa, can be any string. Should we remove it?
diff --git a/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
index 27f5450d2f..e3bb8dcdfb 100644
--- a/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
+++ b/packages/anoncreds/src/services/AnonCredsIssuerServiceOptions.ts
@@ -15,14 +15,11 @@ export interface CreateSchemaOptions {
export interface CreateCredentialDefinitionOptions {
issuerId: string
- tag: string // TODO: this was initially defined as optional, is that the case?
+ tag: string
supportRevocation?: boolean
- // If schema doesn't include the id, we need to add it as a separate input parameter
- schema: {
- value: AnonCredsSchema
- id: string
- }
+ schemaId: string
+ schema: AnonCredsSchema
}
export interface CreateCredentialOfferOptions {
diff --git a/packages/anoncreds/src/services/AnonCredsRegistry.ts b/packages/anoncreds/src/services/AnonCredsRegistry.ts
deleted file mode 100644
index ead8f8aa70..0000000000
--- a/packages/anoncreds/src/services/AnonCredsRegistry.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import type {
- AnonCredsCredentialDefinition,
- AnonCredsRevocationList,
- AnonCredsRevocationRegistryDefinition,
- AnonCredsSchema,
-} from '../models/registry'
-import type {
- RegisterCredentialDefinitionOptions,
- RegisterCredentialDefinitionReturn,
- RegisterRevocationListOptions,
- RegisterRevocationListReturn,
- RegisterRevocationRegistryDefinitionOptions,
- RegisterRevocationRegistryDefinitionReturn,
- RegisterSchemaOptions,
- RegisterSchemaReturn,
-} from './AnonCredsRegistryOptions'
-import type { AgentContext } from '@aries-framework/core'
-
-// This service can be registered multiple times in a single AFJ instance.
-// TODO: should all methods have interfaces as input for consistency?
-export interface AnonCredsRegistry {
- getSchema(agentContext: AgentContext, schemaId: string): Promise
- registerSchema(options: RegisterSchemaOptions): Promise
-
- getCredentialDefinition(credentialDefinitionId: string): Promise
- registerCredentialDefinition(
- options: RegisterCredentialDefinitionOptions
- ): Promise
-
- getRevocationRegistryDefinition(
- revocationRegistryDefinitionId: string
- ): Promise
- registerRevocationRegistryDefinition(
- options: RegisterRevocationRegistryDefinitionOptions
- ): Promise
-
- // TODO: The name of this data model is still tbd.
- getRevocationList(revocationRegistryId: string, timestamp: string): Promise
-
- registerRevocationList(options: RegisterRevocationListOptions): Promise
-}
diff --git a/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts b/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
deleted file mode 100644
index 206d56fc4d..0000000000
--- a/packages/anoncreds/src/services/AnonCredsRegistryOptions.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import type {
- AnonCredsCredentialDefinition,
- AnonCredsRevocationList,
- AnonCredsRevocationRegistryDefinition,
- AnonCredsSchema,
-} from '../models/registry'
-import type { AgentContext } from '@aries-framework/core'
-
-export interface RegisterSchemaOptions {
- agentContext: AgentContext
- schema: AnonCredsSchema
-
- // Identifier of issuer that will create the credential definition.
- issuerId: string
-}
-export interface RegisterSchemaReturn {
- schemaId: string
-}
-
-export interface RegisterCredentialDefinitionOptions {
- credentialDefinition: AnonCredsCredentialDefinition
-
- // Identifier of issuer that will create the credential definition.
- issuerId: string
-}
-
-export interface RegisterCredentialDefinitionReturn {
- credentialDefinitionId: string
-}
-
-export interface RegisterRevocationRegistryDefinitionOptions {
- revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition
-}
-
-export interface RegisterRevocationRegistryDefinitionReturn {
- revocationRegistryDefinitionId: string
-}
-
-export interface RegisterRevocationListOptions {
- // Timestamp is often calculated by the ledger, otherwise method should just take current time
- // Return type does include the timestamp.
- revocationList: Omit
-}
-
-export interface RegisterRevocationListReturn {
- timestamp: string
-}
diff --git a/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts b/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
index c67470fd55..f3ecb3b70c 100644
--- a/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
+++ b/packages/anoncreds/src/services/AnonCredsVerifierServiceOptions.ts
@@ -24,7 +24,7 @@ export interface VerifyProofOptions {
// this means we need to retrieve _ALL_ deltas from the ledger to verify a proof. While currently we
// only need to fetch the registry.
revocationLists: {
- [timestamp: string]: AnonCredsRevocationList
+ [timestamp: number]: AnonCredsRevocationList
}
}
}
diff --git a/packages/anoncreds/src/services/index.ts b/packages/anoncreds/src/services/index.ts
index 1a612359ed..fe7b176754 100644
--- a/packages/anoncreds/src/services/index.ts
+++ b/packages/anoncreds/src/services/index.ts
@@ -2,7 +2,6 @@ export * from './AnonCredsHolderService'
export * from './AnonCredsHolderServiceOptions'
export * from './AnonCredsIssuerService'
export * from './AnonCredsIssuerServiceOptions'
-export * from './AnonCredsRegistry'
-export * from './AnonCredsRegistryOptions'
+export * from './registry'
export * from './AnonCredsVerifierService'
export * from './AnonCredsVerifierServiceOptions'
diff --git a/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts b/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
new file mode 100644
index 0000000000..966a1afb95
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
@@ -0,0 +1,48 @@
+import type {
+ GetCredentialDefinitionReturn,
+ RegisterCredentialDefinitionOptions,
+ RegisterCredentialDefinitionReturn,
+} from './CredentialDefinitionOptions'
+import type { GetRevocationListReturn } from './RevocationListOptions'
+import type { GetRevocationRegistryDefinitionReturn } from './RevocationRegistryDefinitionOptions'
+import type { GetSchemaReturn, RegisterSchemaOptions, RegisterSchemaReturn } from './SchemaOptions'
+import type { AgentContext } from '@aries-framework/core'
+
+// This service can be registered multiple times in a single AFJ instance.
+export interface AnonCredsRegistry {
+ getSchema(agentContext: AgentContext, schemaId: string): Promise
+ registerSchema(agentContext: AgentContext, options: RegisterSchemaOptions): Promise
+
+ getCredentialDefinition(
+ agentContext: AgentContext,
+ credentialDefinitionId: string
+ ): Promise
+ registerCredentialDefinition(
+ agentContext: AgentContext,
+ options: RegisterCredentialDefinitionOptions
+ ): Promise
+
+ getRevocationRegistryDefinition(
+ agentContext: AgentContext,
+ revocationRegistryDefinitionId: string
+ ): Promise
+
+ // TODO: issuance of revocable credentials
+ // registerRevocationRegistryDefinition(
+ // agentContext: AgentContext,
+ // options: RegisterRevocationRegistryDefinitionOptions
+ // ): Promise
+
+ // TODO: The name of this data model is still tbd.
+ getRevocationList(
+ agentContext: AgentContext,
+ revocationRegistryId: string,
+ timestamp: number
+ ): Promise
+
+ // TODO: issuance of revocable credentials
+ // registerRevocationList(
+ // agentContext: AgentContext,
+ // options: RegisterRevocationListOptions
+ // ): Promise
+}
diff --git a/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts b/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
new file mode 100644
index 0000000000..e2f7e14298
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
@@ -0,0 +1,45 @@
+import type { AnonCredsCredentialDefinition } from '../../models/registry'
+import type {
+ AnonCredsResolutionMetadata,
+ Extensible,
+ AnonCredsOperationStateFailed,
+ AnonCredsOperationStateFinished,
+ AnonCredsOperationState,
+} from './base'
+
+export interface GetCredentialDefinitionReturn {
+ credentialDefinition: AnonCredsCredentialDefinition | null
+ credentialDefinitionId: string
+ resolutionMetadata: AnonCredsResolutionMetadata
+ credentialDefinitionMetadata: Extensible
+}
+
+export interface RegisterCredentialDefinitionOptions {
+ credentialDefinition: AnonCredsCredentialDefinition
+ options: Extensible
+}
+
+export interface RegisterCredentialDefinitionReturnStateFailed extends AnonCredsOperationStateFailed {
+ credentialDefinition: AnonCredsCredentialDefinition
+ credentialDefinitionId?: string
+}
+
+export interface RegisterCredentialDefinitionReturnStateFinished extends AnonCredsOperationStateFinished {
+ credentialDefinition: AnonCredsCredentialDefinition
+ credentialDefinitionId?: string
+}
+
+export interface RegisterCredentialDefinitionReturnState extends AnonCredsOperationState {
+ credentialDefinition: AnonCredsCredentialDefinition
+ credentialDefinitionId?: string
+}
+
+export interface RegisterCredentialDefinitionReturn {
+ jobId?: string
+ credentialDefinitionState:
+ | RegisterCredentialDefinitionReturnState
+ | RegisterCredentialDefinitionReturnStateFinished
+ | RegisterCredentialDefinitionReturnStateFailed
+ credentialDefinitionMetadata: Extensible
+ registrationMetadata: AnonCredsResolutionMetadata
+}
diff --git a/packages/anoncreds/src/services/registry/RevocationListOptions.ts b/packages/anoncreds/src/services/registry/RevocationListOptions.ts
new file mode 100644
index 0000000000..aea0c5d5b9
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/RevocationListOptions.ts
@@ -0,0 +1,18 @@
+import type { AnonCredsRevocationList } from '../../models/registry'
+import type { AnonCredsResolutionMetadata, Extensible } from './base'
+
+export interface GetRevocationListReturn {
+ revocationList: AnonCredsRevocationList | null
+ resolutionMetadata: AnonCredsResolutionMetadata
+ revocationListMetadata: Extensible
+}
+
+// TODO: Support for issuance of revocable credentials
+// export interface RegisterRevocationListOptions {
+// // Timestamp is often calculated by the ledger, otherwise method should just take current time
+// // Return type does include the timestamp.
+// revocationList: Omit
+// }
+// export interface RegisterRevocationListReturn {
+// timestamp: string
+// }
diff --git a/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts b/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
new file mode 100644
index 0000000000..5e63f79995
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
@@ -0,0 +1,18 @@
+import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'
+import type { AnonCredsResolutionMetadata, Extensible } from './base'
+
+export interface GetRevocationRegistryDefinitionReturn {
+ revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition | null
+ revocationRegistryDefinitionId: string
+ resolutionMetadata: AnonCredsResolutionMetadata
+ revocationRegistryDefinitionMetadata: Extensible
+}
+
+// TODO: Support for issuance of revocable credentials
+// export interface RegisterRevocationRegistryDefinitionOptions {
+// revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition
+// }
+
+// export interface RegisterRevocationRegistryDefinitionReturn {
+// revocationRegistryDefinitionId: string
+// }
diff --git a/packages/anoncreds/src/services/registry/SchemaOptions.ts b/packages/anoncreds/src/services/registry/SchemaOptions.ts
new file mode 100644
index 0000000000..f4d706223a
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/SchemaOptions.ts
@@ -0,0 +1,46 @@
+import type { AnonCredsSchema } from '../../models/registry'
+import type {
+ AnonCredsResolutionMetadata,
+ Extensible,
+ AnonCredsOperationStateFailed,
+ AnonCredsOperationStateFinished,
+ AnonCredsOperationState,
+} from './base'
+
+// Get Schema
+export interface GetSchemaReturn {
+ schema: AnonCredsSchema | null
+ schemaId: string
+ // Can contain e.g. the ledger transaction request/response
+ resolutionMetadata: AnonCredsResolutionMetadata
+ // Can contain additional fields
+ schemaMetadata: Extensible
+}
+
+//
+export interface RegisterSchemaOptions {
+ schema: AnonCredsSchema
+ options: Extensible
+}
+
+export interface RegisterSchemaReturnStateFailed extends AnonCredsOperationStateFailed {
+ schema: AnonCredsSchema
+ schemaId?: string
+}
+
+export interface RegisterSchemaReturnStateFinished extends AnonCredsOperationStateFinished {
+ schema: AnonCredsSchema
+ schemaId: string
+}
+
+export interface RegisterSchemaReturnState extends AnonCredsOperationState {
+ schema: AnonCredsSchema
+ schemaId?: string
+}
+
+export interface RegisterSchemaReturn {
+ jobId?: string
+ schemaState: RegisterSchemaReturnState | RegisterSchemaReturnStateFinished | RegisterSchemaReturnStateFailed
+ schemaMetadata: Extensible
+ registrationMetadata: Extensible
+}
diff --git a/packages/anoncreds/src/services/registry/base.ts b/packages/anoncreds/src/services/registry/base.ts
new file mode 100644
index 0000000000..af9b52ee43
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/base.ts
@@ -0,0 +1,19 @@
+export type Extensible = Record
+
+export interface AnonCredsOperationState {
+ state: 'action' | 'wait'
+}
+
+export interface AnonCredsOperationStateFinished {
+ state: 'finished'
+}
+
+export interface AnonCredsOperationStateFailed {
+ state: 'failed'
+ reason: string
+}
+
+export interface AnonCredsResolutionMetadata extends Extensible {
+ error?: 'invalid' | 'notFound' | 'unsupportedAnonCredsMethod' | string
+ message?: string
+}
diff --git a/packages/anoncreds/src/services/registry/index.ts b/packages/anoncreds/src/services/registry/index.ts
new file mode 100644
index 0000000000..5d36ce3dd9
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/index.ts
@@ -0,0 +1,6 @@
+export * from './AnonCredsRegistry'
+export * from './CredentialDefinitionOptions'
+export * from './SchemaOptions'
+export * from './RevocationRegistryDefinitionOptions'
+export * from './RevocationListOptions'
+export { AnonCredsResolutionMetadata } from './base'
diff --git a/packages/core/package.json b/packages/core/package.json
index 3325039d25..cd0e119a36 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -30,7 +30,7 @@
"@stablelib/ed25519": "^1.0.2",
"@stablelib/random": "^1.0.1",
"@stablelib/sha256": "^1.0.1",
- "@types/indy-sdk": "^1.16.21",
+ "@types/indy-sdk": "1.16.24",
"@types/node-fetch": "^2.5.10",
"@types/ws": "^7.4.6",
"abort-controller": "^3.0.0",
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index f551cb8d59..5b2eaf1762 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -24,6 +24,8 @@ export type {
JsonArray,
JsonObject,
JsonValue,
+ WalletConfigRekey,
+ WalletExportImportConfig,
} from './types'
export { DidCommMimeType, KeyDerivationMethod } from './types'
export type { FileSystem } from './storage/FileSystem'
@@ -31,7 +33,7 @@ export * from './storage/BaseRecord'
export { InMemoryMessageRepository } from './storage/InMemoryMessageRepository'
export { Repository } from './storage/Repository'
export * from './storage/RepositoryEvents'
-export { StorageService, Query } from './storage/StorageService'
+export { StorageService, Query, BaseRecordConstructor } from './storage/StorageService'
export * from './storage/migration'
export { getDirFromFilePath } from './utils/path'
export { InjectionSymbols } from './constants'
@@ -63,6 +65,7 @@ export { parseMessageType, IsValidMessageType } from './utils/messageType'
export type { Constructor } from './utils/mixins'
export * from './agent/Events'
export * from './crypto/'
+export { PersistedLruCache, CacheRepository } from './cache'
import { parseInvitationUrl } from './utils/parseInvitation'
import { uuid } from './utils/uuid'
diff --git a/packages/core/src/modules/credentials/formats/__tests__/IndyCredentialFormatService.test.ts b/packages/core/src/modules/credentials/formats/__tests__/IndyCredentialFormatService.test.ts
index ebc32c4785..90b6db58c0 100644
--- a/packages/core/src/modules/credentials/formats/__tests__/IndyCredentialFormatService.test.ts
+++ b/packages/core/src/modules/credentials/formats/__tests__/IndyCredentialFormatService.test.ts
@@ -67,7 +67,11 @@ const revDef: RevocRegDef = {
maxCredNum: 33,
tailsHash: 'd',
tailsLocation: 'x',
- publicKeys: ['x'],
+ publicKeys: {
+ accumKey: {
+ z: 'x',
+ },
+ },
},
ver: 't',
}
diff --git a/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.credentials-auto-accept.test.ts b/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.credentials-auto-accept.test.ts
index 3870b22bb3..a9bf76f0f5 100644
--- a/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.credentials-auto-accept.test.ts
+++ b/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.credentials-auto-accept.test.ts
@@ -310,7 +310,17 @@ describe('credentials', () => {
const aliceExchangeCredentialRecord = await aliceAgent.credentials.negotiateOffer({
credentialRecordId: aliceCredentialRecord.id,
credentialFormats: {
- jsonld: signCredentialOptions,
+ // Send a different object
+ jsonld: {
+ ...signCredentialOptions,
+ credential: {
+ ...signCredentialOptions.credential,
+ credentialSubject: {
+ ...signCredentialOptions.credential.credentialSubject,
+ name: 'Different Property',
+ },
+ },
+ },
},
comment: 'v2 propose credential test',
})
@@ -328,6 +338,7 @@ describe('credentials', () => {
aliceCredentialRecord = await aliceAgent.credentials.getById(aliceCredentialRecord.id)
aliceCredentialRecord.assertState(CredentialState.ProposalSent)
})
+
test('Alice starts with V2 credential proposal to Faber, both have autoAcceptCredential on `contentApproved` and attributes did change', async () => {
testLogger.test('Alice sends credential proposal to Faber')
const aliceCredentialExchangeRecord = await aliceAgent.credentials.proposeCredential({
@@ -348,7 +359,17 @@ describe('credentials', () => {
await faberAgent.credentials.negotiateProposal({
credentialRecordId: faberCredentialRecord.id,
credentialFormats: {
- jsonld: signCredentialOptions,
+ // Send a different object
+ jsonld: {
+ ...signCredentialOptions,
+ credential: {
+ ...signCredentialOptions.credential,
+ credentialSubject: {
+ ...signCredentialOptions.credential.credentialSubject,
+ name: 'Different Property',
+ },
+ },
+ },
},
})
diff --git a/packages/core/src/modules/indy/services/IndyRevocationService.ts b/packages/core/src/modules/indy/services/IndyRevocationService.ts
index 52c666d3ca..4dd89c2e4d 100644
--- a/packages/core/src/modules/indy/services/IndyRevocationService.ts
+++ b/packages/core/src/modules/indy/services/IndyRevocationService.ts
@@ -1,7 +1,7 @@
import type { AgentContext } from '../../../agent'
import type { IndyRevocationInterval } from '../../credentials'
import type { RequestedCredentials } from '../../proofs/formats/indy/models/RequestedCredentials'
-import type { default as Indy } from 'indy-sdk'
+import type { default as Indy, RevState, RevStates } from 'indy-sdk'
import { AgentDependencies } from '../../../agent/AgentDependencies'
import { InjectionSymbols } from '../../../constants'
@@ -48,7 +48,7 @@ export class IndyRevocationService {
proofRequest,
requestedCredentials,
})
- const revocationStates: Indy.RevStates = {}
+ const revocationStates: RevStates = {}
const referentCredentials = []
//Retrieve information for referents and push to single array
diff --git a/packages/core/src/modules/indy/services/IndyVerifierService.ts b/packages/core/src/modules/indy/services/IndyVerifierService.ts
index b6cc387c31..c6ad15bb77 100644
--- a/packages/core/src/modules/indy/services/IndyVerifierService.ts
+++ b/packages/core/src/modules/indy/services/IndyVerifierService.ts
@@ -26,7 +26,7 @@ export class IndyVerifierService {
{ proofRequest, proof, schemas, credentialDefinitions }: VerifyProofOptions
): Promise {
try {
- const { revocationRegistryDefinitions, revocationRegistryStates } = await this.getRevocationRegistries(
+ const { revocationRegistryDefinitions, revocationRegistries } = await this.getRevocationRegistries(
agentContext,
proof
)
@@ -37,7 +37,7 @@ export class IndyVerifierService {
schemas,
credentialDefinitions,
revocationRegistryDefinitions,
- revocationRegistryStates
+ revocationRegistries
)
} catch (error) {
throw isIndyError(error) ? new IndySdkError(error) : error
@@ -46,7 +46,7 @@ export class IndyVerifierService {
private async getRevocationRegistries(agentContext: AgentContext, proof: Indy.IndyProof) {
const revocationRegistryDefinitions: Indy.RevocRegDefs = {}
- const revocationRegistryStates: Indy.RevStates = Object.create(null)
+ const revocationRegistries: Indy.RevRegs = Object.create(null)
for (const identifier of proof.identifiers) {
const revocationRegistryId = identifier.rev_reg_id
const timestamp = identifier.timestamp
@@ -61,19 +61,19 @@ export class IndyVerifierService {
}
//Fetch Revocation Registry by Timestamp if not already fetched
- if (revocationRegistryId && timestamp && !revocationRegistryStates[revocationRegistryId]?.[timestamp]) {
- if (!revocationRegistryStates[revocationRegistryId]) {
- revocationRegistryStates[revocationRegistryId] = Object.create(null)
+ if (revocationRegistryId && timestamp && !revocationRegistries[revocationRegistryId]?.[timestamp]) {
+ if (!revocationRegistries[revocationRegistryId]) {
+ revocationRegistries[revocationRegistryId] = Object.create(null)
}
const { revocationRegistry } = await this.ledgerService.getRevocationRegistry(
agentContext,
revocationRegistryId,
timestamp
)
- revocationRegistryStates[revocationRegistryId][timestamp] = revocationRegistry
+ revocationRegistries[revocationRegistryId][timestamp] = revocationRegistry
}
}
- return { revocationRegistryDefinitions, revocationRegistryStates }
+ return { revocationRegistryDefinitions, revocationRegistries }
}
}
diff --git a/packages/core/src/modules/ledger/__tests__/LedgerApi.test.ts b/packages/core/src/modules/ledger/__tests__/LedgerApi.test.ts
index 5ca80f5fcd..cf7b35bbc5 100644
--- a/packages/core/src/modules/ledger/__tests__/LedgerApi.test.ts
+++ b/packages/core/src/modules/ledger/__tests__/LedgerApi.test.ts
@@ -77,7 +77,11 @@ const revocRegDef: Indy.RevocRegDef = {
maxCredNum: 3,
tailsHash: 'abcde',
tailsLocation: 'xyz',
- publicKeys: ['abcde', 'fghijk'],
+ publicKeys: {
+ accumKey: {
+ z: 'z',
+ },
+ },
},
ver: 'abcde',
}
diff --git a/packages/core/src/modules/ledger/error/index.ts b/packages/core/src/modules/ledger/error/index.ts
new file mode 100644
index 0000000000..79c42fc2b6
--- /dev/null
+++ b/packages/core/src/modules/ledger/error/index.ts
@@ -0,0 +1,3 @@
+export * from './LedgerError'
+export * from './LedgerNotConfiguredError'
+export * from './LedgerNotFoundError'
diff --git a/packages/core/src/modules/routing/__tests__/pickup.test.ts b/packages/core/src/modules/routing/__tests__/pickup.test.ts
index 69d43e8c46..8b33fcacf2 100644
--- a/packages/core/src/modules/routing/__tests__/pickup.test.ts
+++ b/packages/core/src/modules/routing/__tests__/pickup.test.ts
@@ -5,7 +5,7 @@ import { Subject } from 'rxjs'
import { SubjectInboundTransport } from '../../../../../../tests/transport/SubjectInboundTransport'
import { SubjectOutboundTransport } from '../../../../../../tests/transport/SubjectOutboundTransport'
-import { getAgentOptions, waitForBasicMessage } from '../../../../tests/helpers'
+import { getAgentOptions, waitForBasicMessage, waitForTrustPingReceivedEvent } from '../../../../tests/helpers'
import { Agent } from '../../../agent/Agent'
import { HandshakeProtocol } from '../../connections'
import { MediatorPickupStrategy } from '../MediatorPickupStrategy'
@@ -16,7 +16,7 @@ const recipientOptions = getAgentOptions('Mediation: Recipient Pickup', {
})
const mediatorOptions = getAgentOptions('Mediation: Mediator Pickup', {
autoAcceptConnections: true,
- endpoints: ['rxjs:mediator'],
+ endpoints: ['wss://mediator'],
indyLedgers: [],
})
@@ -25,17 +25,17 @@ describe('E2E Pick Up protocol', () => {
let mediatorAgent: Agent
afterEach(async () => {
- await recipientAgent?.shutdown()
- await recipientAgent?.wallet.delete()
- await mediatorAgent?.shutdown()
- await mediatorAgent?.wallet.delete()
+ await recipientAgent.shutdown()
+ await recipientAgent.wallet.delete()
+ await mediatorAgent.shutdown()
+ await mediatorAgent.wallet.delete()
})
test('E2E Pick Up V1 protocol', async () => {
const mediatorMessages = new Subject()
const subjectMap = {
- 'rxjs:mediator': mediatorMessages,
+ 'wss://mediator': mediatorMessages,
}
// Initialize mediatorReceived message
@@ -74,7 +74,7 @@ describe('E2E Pick Up protocol', () => {
const message = 'hello pickup V1'
await mediatorAgent.basicMessages.sendMessage(mediatorRecipientConnection.id, message)
- await recipientAgent.mediationRecipient.pickupMessages(recipientMediatorConnection)
+ await recipientAgent.mediationRecipient.pickupMessages(recipientMediatorConnection, MediatorPickupStrategy.PickUpV1)
const basicMessage = await waitForBasicMessage(recipientAgent, {
content: message,
@@ -86,8 +86,12 @@ describe('E2E Pick Up protocol', () => {
test('E2E Pick Up V2 protocol', async () => {
const mediatorMessages = new Subject()
+ // FIXME: we harcoded that pickup of messages MUST be using ws(s) scheme when doing implicit pickup
+ // For liver delivery we need a duplex transport. however that means we can't test it with the subject transport. Using wss here to 'hack' this. We should
+ // extend the API to allow custom schemes (or maybe add a `supportsDuplex` transport / `supportMultiReturnMessages`)
+ // For pickup v2 pickup message (which we're testing here) we could just as well use `http` as it is just request/response.
const subjectMap = {
- 'rxjs:mediator': mediatorMessages,
+ 'wss://mediator': mediatorMessages,
}
// Initialize mediatorReceived message
@@ -124,14 +128,20 @@ describe('E2E Pick Up protocol', () => {
mediatorRecipientConnection = await mediatorAgent.connections.returnWhenIsConnected(mediatorRecipientConnection!.id)
const message = 'hello pickup V2'
- await mediatorAgent.basicMessages.sendMessage(mediatorRecipientConnection.id, message)
- await recipientAgent.mediationRecipient.pickupMessages(recipientMediatorConnection, MediatorPickupStrategy.PickUpV2)
+ await mediatorAgent.basicMessages.sendMessage(mediatorRecipientConnection.id, message)
- const basicMessage = await waitForBasicMessage(recipientAgent, {
+ const basicMessagePromise = waitForBasicMessage(recipientAgent, {
content: message,
})
+ const trustPingPromise = waitForTrustPingReceivedEvent(mediatorAgent, {})
+ await recipientAgent.mediationRecipient.pickupMessages(recipientMediatorConnection, MediatorPickupStrategy.PickUpV2)
+ const basicMessage = await basicMessagePromise
expect(basicMessage.content).toBe(message)
+
+ // Wait for trust ping to be received and stop message pickup
+ await trustPingPromise
+ await recipientAgent.mediationRecipient.stopMessagePickup()
})
})
diff --git a/packages/core/src/modules/vc/__tests__/documentLoader.ts b/packages/core/src/modules/vc/__tests__/documentLoader.ts
index 29c47d7d91..544ae02972 100644
--- a/packages/core/src/modules/vc/__tests__/documentLoader.ts
+++ b/packages/core/src/modules/vc/__tests__/documentLoader.ts
@@ -32,35 +32,45 @@ export const DOCUMENTS = {
[DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV['id']]: DID_z6MkvePyWAApUVeDboZhNbckaWHnqtD6pCETd6xoqGbcpEBV,
[DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa[
'id'
- ]]: DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa,
+ ]]:
+ DID_zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa,
[DID_EXAMPLE_48939859['id']]: DID_EXAMPLE_48939859,
[DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh[
'id'
- ]]: DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh,
+ ]]:
+ DID_zUC73JKGpX1WG4CWbFM15ni3faANPet6m8WJ6vaF5xyFsM3MeoBVNgQ6jjVPCcUnTAnJy6RVKqsUXa4AvdRKwV5hhQhwhMWFT9so9jrPekKmqpikTjYBXa3RYWqRpCWHY4u4hxh,
[DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn[
'id'
- ]]: DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn,
+ ]]:
+ DID_zUC73YqdRJ3t8bZsFUoxYFPNVruHzn4o7u78GSrMXVSkcb3xAYtUxRD2kSt2bDcmQpRjKfygwLJ1HEGfkosSN7gr4acjGkXLbLRXREueknFN4AU19m8BxEgWnLM84CAvsw6bhYn,
[DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ[
'id'
- ]]: DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ,
+ ]]:
+ DID_zUC76qMTDAaupy19pEk8JKH5LJwPwmscNQn24SYpqrgqEoYWPFgCSm4CnTfupADRfbB6CxdwYhVaTFjT4fmPvMh7gWY87LauhaLmNpPamCv4LAepcRfBDndSdtCpZKSTELMjzGJ,
[DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox[
'id'
- ]]: DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox,
+ ]]:
+ DID_zUC7DMETzdZM6woUjvs2fieEyFTbHABXwBvLYPBs4NDWKut4H41h8V3KTqGNRUziXLYqa1sFYYw9Zjpt6pFUf7hra4Q1zXMA9JjXcXxDpxuDNpUKEpiDPSYYUztVchUJHQJJhox,
[DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F[
'id'
- ]]: DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F,
+ ]]:
+ DID_zUC7F9Jt6YzVW9fGhwYjVrjdS8Xzg7oQc2CeDcVNgEcEAaJXAtPz3eXu2sewq4xtwRK3DAhQRYwwoYiT3nNzLCPsrKoP72UGZKhh4cNuZD7RkmwzAa1Bye4C5a9DcyYBGKZrE5F,
[DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4[
'id'
- ]]: DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4,
+ ]]:
+ DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4,
[DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4[
'id'
- ]]: DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4,
+ ]]:
+ DID_zUC7H7TxvhWmvfptpu2zSwo5EZ1kr3MPNsjovaD2ipbuzj6zi1vk4FHTiunCJrFvUYV77Mk3QcWUUAHojPZdU8oG476cvMK2ozP1gVq63x5ovj6e4oQ9qg9eF4YjPhWJs6FPuT4,
[DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD[
'id'
- ]]: DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD,
+ ]]:
+ DID_zUC72to2eJiFMrt8a89LoaEPHC76QcfAxQdFys3nFGCmDKAmLbdE4ByyQ54kh42XgECCyZfVKe3m41Kk35nzrBKYbk6s9K7EjyLJcGGPkA7N15tDNBQJaY7cHD4RRaTwF6qXpmD,
[DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN[
'id'
- ]]: DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN,
+ ]]:
+ DID_zUC74VEqqhEHQcgv4zagSPkqFJxuNWuoBPKjJuHETEUeHLoSqWt92viSsmaWjy82y2cgguc8e9hsGBifnVK67pQ4gve3m6iSboDkmJjxVEb1d6mRAx5fpMAejooNzNqqbTMVeUN,
[DID_SOV_QqEfJxe752NCmWqR5TssZ5['id']]: DID_SOV_QqEfJxe752NCmWqR5TssZ5,
SECURITY_CONTEXT_V1_URL: SECURITY_V1,
SECURITY_CONTEXT_V2_URL: SECURITY_V2,
diff --git a/packages/core/src/utils/validators.ts b/packages/core/src/utils/validators.ts
index 8e7240b5f2..57b1a1ec17 100644
--- a/packages/core/src/utils/validators.ts
+++ b/packages/core/src/utils/validators.ts
@@ -69,7 +69,7 @@ export const UriValidator = /\w+:(\/?\/?)[^\s]+/
export function IsUri(validationOptions?: ValidationOptions): PropertyDecorator {
return ValidateBy(
{
- name: 'isInstanceOrArrayOfInstances',
+ name: 'isUri',
validator: {
validate: (value): boolean => {
return UriValidator.test(value)
diff --git a/packages/core/tests/helpers.ts b/packages/core/tests/helpers.ts
index 7354fbe5a4..9e57c21943 100644
--- a/packages/core/tests/helpers.ts
+++ b/packages/core/tests/helpers.ts
@@ -8,7 +8,6 @@ import type {
ConnectionRecordProps,
CredentialDefinitionTemplate,
CredentialStateChangedEvent,
- TrustPingResponseReceivedEvent,
InitConfig,
InjectionToken,
ProofStateChangedEvent,
@@ -16,6 +15,7 @@ import type {
Wallet,
} from '../src'
import type { AgentModulesInput, EmptyModuleMap } from '../src/agent/AgentModules'
+import type { TrustPingReceivedEvent, TrustPingResponseReceivedEvent } from '../src/modules/connections/TrustPingEvents'
import type { IndyOfferCredentialFormat } from '../src/modules/credentials/formats/indy/IndyCredentialFormat'
import type { ProofAttributeInfo, ProofPredicateInfo } from '../src/modules/proofs/formats/indy/models'
import type { AutoAcceptProof } from '../src/modules/proofs/models/ProofAutoAcceptType'
@@ -73,6 +73,7 @@ import {
PresentationPreviewPredicate,
} from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview'
import { customDocumentLoader } from '../src/modules/vc/__tests__/documentLoader'
+import { KeyDerivationMethod } from '../src/types'
import { LinkedAttachment } from '../src/utils/LinkedAttachment'
import { uuid } from '../src/utils/uuid'
@@ -96,7 +97,8 @@ export function getAgentOptions {
throw new Error(
- `ProofStateChangedEvent event not emitted within specified timeout: {
+ `ProofStateChangedEvent event not emitted within specified timeout: ${timeoutMs}
previousState: ${previousState},
threadId: ${threadId},
parentThreadId: ${parentThreadId},
@@ -242,13 +244,49 @@ export function waitForProofExchangeRecordSubject(
)
}
+export async function waitForTrustPingReceivedEvent(
+ agent: Agent,
+ options: {
+ threadId?: string
+ timeoutMs?: number
+ }
+) {
+ const observable = agent.events.observable(TrustPingEventTypes.TrustPingReceivedEvent)
+
+ return waitForTrustPingReceivedEventSubject(observable, options)
+}
+
+export function waitForTrustPingReceivedEventSubject(
+ subject: ReplaySubject | Observable,
+ {
+ threadId,
+ timeoutMs = 10000,
+ }: {
+ threadId?: string
+ timeoutMs?: number
+ }
+) {
+ const observable = subject instanceof ReplaySubject ? subject.asObservable() : subject
+ return firstValueFrom(
+ observable.pipe(
+ filter((e) => threadId === undefined || e.payload.message.threadId === threadId),
+ timeout(timeoutMs),
+ catchError(() => {
+ throw new Error(
+ `TrustPingReceivedEvent event not emitted within specified timeout: ${timeoutMs}
+ threadId: ${threadId},
+}`
+ )
+ }),
+ map((e) => e.payload.message)
+ )
+ )
+}
+
export async function waitForTrustPingResponseReceivedEvent(
agent: Agent,
options: {
threadId?: string
- parentThreadId?: string
- state?: ProofState
- previousState?: ProofState | null
timeoutMs?: number
}
) {
@@ -276,7 +314,7 @@ export function waitForTrustPingResponseReceivedEventSubject(
timeout(timeoutMs),
catchError(() => {
throw new Error(
- `TrustPingResponseReceivedEvent event not emitted within specified timeout: {
+ `TrustPingResponseReceivedEvent event not emitted within specified timeout: ${timeoutMs}
threadId: ${threadId},
}`
)
diff --git a/packages/indy-sdk/README.md b/packages/indy-sdk/README.md
new file mode 100644
index 0000000000..368d25db71
--- /dev/null
+++ b/packages/indy-sdk/README.md
@@ -0,0 +1,31 @@
+
+
+
+
+Aries Framework JavaScript IndySDK Module
+
+
+
+
+
+
+
+
+IndySDK module for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript.git).
diff --git a/packages/indy-sdk/jest.config.ts b/packages/indy-sdk/jest.config.ts
new file mode 100644
index 0000000000..c7c5196637
--- /dev/null
+++ b/packages/indy-sdk/jest.config.ts
@@ -0,0 +1,14 @@
+import type { Config } from '@jest/types'
+
+import base from '../../jest.config.base'
+
+import packageJson from './package.json'
+
+const config: Config.InitialOptions = {
+ ...base,
+ name: packageJson.name,
+ displayName: packageJson.name,
+ // setupFilesAfterEnv: ['./tests/setup.ts'],
+}
+
+export default config
diff --git a/packages/indy-sdk/package.json b/packages/indy-sdk/package.json
new file mode 100644
index 0000000000..4c19732005
--- /dev/null
+++ b/packages/indy-sdk/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "@aries-framework/indy-sdk",
+ "main": "build/index",
+ "types": "build/index",
+ "version": "0.2.5",
+ "private": true,
+ "files": [
+ "build"
+ ],
+ "license": "Apache-2.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "homepage": "https://github.com/hyperledger/aries-framework-javascript/tree/main/packages/indy-sdk",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/hyperledger/aries-framework-javascript",
+ "directory": "packages/indy-sdk"
+ },
+ "scripts": {
+ "build": "yarn run clean && yarn run compile",
+ "clean": "rimraf -rf ./build",
+ "compile": "tsc -p tsconfig.build.json",
+ "prepublishOnly": "yarn run build",
+ "test": "jest"
+ },
+ "dependencies": {
+ "@aries-framework/anoncreds": "0.3.2",
+ "@aries-framework/core": "0.3.2",
+ "@types/indy-sdk": "1.16.24",
+ "class-transformer": "^0.5.1",
+ "class-validator": "^0.14.0",
+ "rxjs": "^7.2.0",
+ "tsyringe": "^4.7.0"
+ },
+ "devDependencies": {
+ "rimraf": "~3.0.2",
+ "typescript": "~4.3.0"
+ }
+}
diff --git a/packages/indy-sdk/src/IndySdkModule.ts b/packages/indy-sdk/src/IndySdkModule.ts
new file mode 100644
index 0000000000..ea3baa5a9a
--- /dev/null
+++ b/packages/indy-sdk/src/IndySdkModule.ts
@@ -0,0 +1,17 @@
+import type { IndySdkModuleConfigOptions } from './IndySdkModuleConfig'
+import type { DependencyManager, Module } from '@aries-framework/core'
+
+import { IndySdkModuleConfig } from './IndySdkModuleConfig'
+import { IndySdkSymbol } from './types'
+
+export class IndySdkModule implements Module {
+ public readonly config: IndySdkModuleConfig
+
+ public constructor(config: IndySdkModuleConfigOptions) {
+ this.config = new IndySdkModuleConfig(config)
+ }
+
+ public register(dependencyManager: DependencyManager) {
+ dependencyManager.registerInstance(IndySdkSymbol, this.config.indySdk)
+ }
+}
diff --git a/packages/indy-sdk/src/IndySdkModuleConfig.ts b/packages/indy-sdk/src/IndySdkModuleConfig.ts
new file mode 100644
index 0000000000..a01bf813b3
--- /dev/null
+++ b/packages/indy-sdk/src/IndySdkModuleConfig.ts
@@ -0,0 +1,45 @@
+import type * as IndySdk from 'indy-sdk'
+
+/**
+ * IndySdkModuleConfigOptions defines the interface for the options of the IndySdkModuleConfig class.
+ */
+export interface IndySdkModuleConfigOptions {
+ /**
+ * Implementation of the IndySdk interface according to the @types/indy-sdk package.
+ *
+ *
+ * ## Node.JS
+ *
+ * ```ts
+ * import * as indySdk from 'indy-sdk'
+ *
+ * const indySdkModule = new IndySdkModule({
+ * indySdk
+ * })
+ * ```
+ *
+ * ## React Native
+ *
+ * ```ts
+ * import * as indySdk from 'indy-sdk-react-native'
+ *
+ * const indySdkModule = new IndySdkModule({
+ * indySdk
+ * })
+ * ```
+ */
+ indySdk: typeof IndySdk
+}
+
+export class IndySdkModuleConfig {
+ private options: IndySdkModuleConfigOptions
+
+ public constructor(options: IndySdkModuleConfigOptions) {
+ this.options = options
+ }
+
+ /** See {@link IndySdkModuleConfigOptions.resolvers} */
+ public get indySdk() {
+ return this.options.indySdk
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/index.ts b/packages/indy-sdk/src/anoncreds/index.ts
new file mode 100644
index 0000000000..adba521ce0
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/index.ts
@@ -0,0 +1,4 @@
+export { IndySdkAnonCredsRegistry } from './services/IndySdkAnonCredsRegistry'
+export { IndySdkHolderService } from './services/IndySdkHolderService'
+export { IndySdkIssuerService } from './services/IndySdkIssuerService'
+export { IndySdkVerifierService } from './services/IndySdkVerifierService'
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
new file mode 100644
index 0000000000..3b5c6a08ce
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
@@ -0,0 +1,514 @@
+import type {
+ AnonCredsRegistry,
+ GetCredentialDefinitionReturn,
+ GetRevocationListReturn,
+ GetRevocationRegistryDefinitionReturn,
+ GetSchemaReturn,
+ RegisterCredentialDefinitionOptions,
+ RegisterCredentialDefinitionReturn,
+ RegisterSchemaOptions,
+ RegisterSchemaReturn,
+} from '@aries-framework/anoncreds'
+import type { AgentContext } from '@aries-framework/core'
+import type { Schema as IndySdkSchema } from 'indy-sdk'
+
+import { inject } from '@aries-framework/core'
+
+import { IndySdkError, isIndyError } from '../../error'
+import { IndySdkPoolService } from '../../ledger'
+import { IndySdk, IndySdkSymbol } from '../../types'
+import {
+ didFromCredentialDefinitionId,
+ didFromRevocationRegistryDefinitionId,
+ didFromSchemaId,
+ getLegacyCredentialDefinitionId,
+ getLegacySchemaId,
+} from '../utils/identifiers'
+import {
+ anonCredsRevocationListFromIndySdk,
+ anonCredsRevocationRegistryDefinitionFromIndySdk,
+} from '../utils/transform'
+
+/**
+ * TODO: validation of the identifiers. The Indy SDK classes only support the legacy (unqualified) identifiers.
+ */
+export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
+ private indySdk: IndySdk
+ private indySdkPoolService: IndySdkPoolService
+
+ public constructor(@inject(IndySdkSymbol) indySdk: IndySdk, indySdkPoolService: IndySdkPoolService) {
+ this.indySdk = indySdk
+ this.indySdkPoolService = indySdkPoolService
+ }
+
+ public async getSchema(agentContext: AgentContext, schemaId: string): Promise {
+ try {
+ const did = didFromSchemaId(schemaId)
+ const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+ agentContext.config.logger.debug(`Getting schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`)
+
+ const request = await this.indySdk.buildGetSchemaRequest(null, schemaId)
+
+ agentContext.config.logger.trace(
+ `Submitting get schema request for schema '${schemaId}' to ledger '${pool.didIndyNamespace}'`
+ )
+ const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+
+ agentContext.config.logger.trace(`Got un-parsed schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`, {
+ response,
+ })
+
+ const [, schema] = await this.indySdk.parseGetSchemaResponse(response)
+ agentContext.config.logger.debug(`Got schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`, {
+ schema,
+ })
+
+ const issuerId = didFromSchemaId(schema.id)
+
+ return {
+ schema: {
+ attrNames: schema.attrNames,
+ name: schema.name,
+ version: schema.version,
+ issuerId: issuerId,
+ },
+ schemaId: schema.id,
+ resolutionMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ // NOTE: the seqNo is required by the indy-sdk even though not present in AnonCreds v1.
+ // For this reason we return it in the metadata.
+ indyLedgerSeqNo: schema.seqNo,
+ },
+ schemaMetadata: {},
+ }
+ } catch (error) {
+ agentContext.config.logger.error(`Error retrieving schema '${schemaId}'`, {
+ error,
+ schemaId,
+ })
+
+ return {
+ schema: null,
+ schemaId,
+ resolutionMetadata: {
+ error: 'notFound',
+ message: `unable to resolve credential definition: ${error.message}`,
+ },
+ schemaMetadata: {},
+ }
+ }
+ }
+
+ public async registerSchema(
+ agentContext: AgentContext,
+ options: IndySdkRegisterSchemaOptions
+ ): Promise {
+ // Make sure didIndyNamespace is passed
+ if (!options.options.didIndyNamespace) {
+ return {
+ schemaMetadata: {},
+ registrationMetadata: {},
+ schemaState: {
+ reason: 'no didIndyNamespace defined in the options. didIndyNamespace is required when using the Indy SDK',
+ schema: options.schema,
+ state: 'failed',
+ },
+ }
+ }
+
+ try {
+ const pool = this.indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
+ agentContext.config.logger.debug(
+ `Register schema on ledger '${pool.didIndyNamespace}' with did '${options.schema.issuerId}'`,
+ options.schema
+ )
+
+ const schema = {
+ attrNames: options.schema.attrNames,
+ name: options.schema.name,
+ version: options.schema.version,
+ id: getLegacySchemaId(options.schema.issuerId, options.schema.name, options.schema.version),
+ ver: '1.0',
+ // Casted as because the type expect a seqNo, but that's not actually required for the input of
+ // buildSchemaRequest (seqNo is not yet known)
+ } as IndySdkSchema
+
+ const request = await this.indySdk.buildSchemaRequest(options.schema.issuerId, schema)
+
+ const response = await this.indySdkPoolService.submitWriteRequest(
+ agentContext,
+ pool,
+ request,
+ options.schema.issuerId
+ )
+ agentContext.config.logger.debug(`Registered schema '${schema.id}' on ledger '${pool.didIndyNamespace}'`, {
+ response,
+ schema,
+ })
+
+ return {
+ schemaState: {
+ state: 'finished',
+ schema: {
+ attrNames: schema.attrNames,
+ issuerId: options.schema.issuerId,
+ name: schema.name,
+ version: schema.version,
+ },
+ schemaId: schema.id,
+ },
+ registrationMetadata: {
+ // NOTE: the seqNo is required by the indy-sdk even though not present in AnonCreds v1.
+ // For this reason we return it in the metadata.
+ indyLedgerSeqNo: schema.seqNo,
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ schemaMetadata: {},
+ }
+ } catch (error) {
+ agentContext.config.logger.error(`Error registering schema for did '${options.schema.issuerId}'`, {
+ error,
+ did: options.schema.issuerId,
+ schema: options.schema,
+ })
+
+ return {
+ schemaMetadata: {},
+ registrationMetadata: {},
+ schemaState: {
+ state: 'failed',
+ schema: options.schema,
+ reason: `unknownError: ${error.message}`,
+ },
+ }
+ }
+ }
+
+ public async getCredentialDefinition(
+ agentContext: AgentContext,
+ credentialDefinitionId: string
+ ): Promise {
+ try {
+ const did = didFromCredentialDefinitionId(credentialDefinitionId)
+ const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+
+ agentContext.config.logger.debug(
+ `Using ledger '${pool.didIndyNamespace}' to retrieve credential definition '${credentialDefinitionId}'`
+ )
+ const request = await this.indySdk.buildGetCredDefRequest(null, credentialDefinitionId)
+
+ agentContext.config.logger.trace(
+ `Submitting get credential definition request for credential definition '${credentialDefinitionId}' to ledger '${pool.didIndyNamespace}'`
+ )
+
+ const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ agentContext.config.logger.trace(
+ `Got un-parsed credential definition '${credentialDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
+ {
+ response,
+ }
+ )
+
+ const [, credentialDefinition] = await this.indySdk.parseGetCredDefResponse(response)
+ agentContext.config.logger.debug(
+ `Got credential definition '${credentialDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
+ {
+ credentialDefinition,
+ }
+ )
+
+ return {
+ credentialDefinitionId: credentialDefinition.id,
+ credentialDefinition: {
+ issuerId: didFromCredentialDefinitionId(credentialDefinition.id),
+ schemaId: credentialDefinition.schemaId,
+ tag: credentialDefinition.tag,
+ type: 'CL',
+ value: credentialDefinition.value,
+ },
+ credentialDefinitionMetadata: {},
+ resolutionMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ }
+ } catch (error) {
+ agentContext.config.logger.error(`Error retrieving credential definition '${credentialDefinitionId}'`, {
+ error,
+ credentialDefinitionId,
+ })
+
+ return {
+ credentialDefinitionId,
+ credentialDefinition: null,
+ credentialDefinitionMetadata: {},
+ resolutionMetadata: {
+ error: 'notFound',
+ message: `unable to resolve credential definition: ${error.message}`,
+ },
+ }
+ }
+ }
+
+ public async registerCredentialDefinition(
+ agentContext: AgentContext,
+ options: IndySdkRegisterCredentialDefinitionOptions
+ ): Promise {
+ // Make sure didIndyNamespace is passed
+ if (!options.options.didIndyNamespace) {
+ return {
+ credentialDefinitionMetadata: {},
+ registrationMetadata: {},
+ credentialDefinitionState: {
+ reason: 'no didIndyNamespace defined in the options. didIndyNamespace is required when using the Indy SDK',
+ credentialDefinition: options.credentialDefinition,
+ state: 'failed',
+ },
+ }
+ }
+
+ try {
+ const pool = this.indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
+ agentContext.config.logger.debug(
+ `Registering credential definition on ledger '${pool.didIndyNamespace}' with did '${options.credentialDefinition.issuerId}'`,
+ options.credentialDefinition
+ )
+
+ // TODO: this will bypass caching if done on a higher level.
+ const { schema, resolutionMetadata } = await this.getSchema(agentContext, options.credentialDefinition.schemaId)
+
+ if (!schema || !resolutionMetadata.indyLedgerSeqNo || typeof resolutionMetadata.indyLedgerSeqNo !== 'number') {
+ return {
+ registrationMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ credentialDefinitionMetadata: {},
+ credentialDefinitionState: {
+ credentialDefinition: options.credentialDefinition,
+ state: 'failed',
+ reason: `error resolving schema with id ${options.credentialDefinition.schemaId}: ${resolutionMetadata.error} ${resolutionMetadata.message}`,
+ },
+ }
+ }
+
+ const credentialDefinitionId = getLegacyCredentialDefinitionId(
+ options.credentialDefinition.issuerId,
+ resolutionMetadata.indyLedgerSeqNo,
+ options.credentialDefinition.tag
+ )
+
+ const request = await this.indySdk.buildCredDefRequest(options.credentialDefinition.issuerId, {
+ id: credentialDefinitionId,
+ schemaId: options.credentialDefinition.schemaId,
+ tag: options.credentialDefinition.tag,
+ type: options.credentialDefinition.type,
+ value: options.credentialDefinition.value,
+ ver: '1.0',
+ })
+
+ const response = await this.indySdkPoolService.submitWriteRequest(
+ agentContext,
+ pool,
+ request,
+ options.credentialDefinition.issuerId
+ )
+
+ agentContext.config.logger.debug(
+ `Registered credential definition '${credentialDefinitionId}' on ledger '${pool.didIndyNamespace}'`,
+ {
+ response,
+ credentialDefinition: options.credentialDefinition,
+ }
+ )
+
+ return {
+ credentialDefinitionMetadata: {},
+ credentialDefinitionState: {
+ credentialDefinition: options.credentialDefinition,
+ credentialDefinitionId,
+ state: 'finished',
+ },
+ registrationMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ }
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error registering credential definition for schema '${options.credentialDefinition.schemaId}'`,
+ {
+ error,
+ did: options.credentialDefinition.issuerId,
+ credentialDefinition: options.credentialDefinition,
+ }
+ )
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async getRevocationRegistryDefinition(
+ agentContext: AgentContext,
+ revocationRegistryDefinitionId: string
+ ): Promise {
+ try {
+ const did = didFromRevocationRegistryDefinitionId(revocationRegistryDefinitionId)
+ const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+
+ agentContext.config.logger.debug(
+ `Using ledger '${pool.didIndyNamespace}' to retrieve revocation registry definition '${revocationRegistryDefinitionId}'`
+ )
+ const request = await this.indySdk.buildGetRevocRegDefRequest(null, revocationRegistryDefinitionId)
+
+ agentContext.config.logger.trace(
+ `Submitting get revocation registry definition request for revocation registry definition '${revocationRegistryDefinitionId}' to ledger`
+ )
+ const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ agentContext.config.logger.trace(
+ `Got un-parsed revocation registry definition '${revocationRegistryDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
+ {
+ response,
+ }
+ )
+
+ const [, revocationRegistryDefinition] = await this.indySdk.parseGetRevocRegDefResponse(response)
+
+ agentContext.config.logger.debug(
+ `Got revocation registry definition '${revocationRegistryDefinitionId}' from ledger`,
+ {
+ revocationRegistryDefinition,
+ }
+ )
+
+ return {
+ resolutionMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ revocationRegistryDefinition: anonCredsRevocationRegistryDefinitionFromIndySdk(revocationRegistryDefinition),
+ revocationRegistryDefinitionId,
+ revocationRegistryDefinitionMetadata: {
+ issuanceType: revocationRegistryDefinition.value.issuanceType,
+ },
+ }
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error retrieving revocation registry definition '${revocationRegistryDefinitionId}' from ledger`,
+ {
+ error,
+ revocationRegistryDefinitionId: revocationRegistryDefinitionId,
+ }
+ )
+
+ return {
+ resolutionMetadata: {
+ error: 'notFound',
+ message: `unable to resolve revocation registry definition: ${error.message}`,
+ },
+ revocationRegistryDefinition: null,
+ revocationRegistryDefinitionId,
+ revocationRegistryDefinitionMetadata: {},
+ }
+ }
+ }
+
+ public async getRevocationList(
+ agentContext: AgentContext,
+ revocationRegistryId: string,
+ timestamp: number
+ ): Promise {
+ try {
+ const did = didFromRevocationRegistryDefinitionId(revocationRegistryId)
+ const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+
+ agentContext.config.logger.debug(
+ `Using ledger '${pool.id}' to retrieve revocation registry deltas with revocation registry definition id '${revocationRegistryId}' until ${timestamp}`
+ )
+
+ // TODO: implement caching for returned deltas
+ const request = await this.indySdk.buildGetRevocRegDeltaRequest(null, revocationRegistryId, 0, timestamp)
+
+ agentContext.config.logger.trace(
+ `Submitting get revocation registry delta request for revocation registry '${revocationRegistryId}' to ledger`
+ )
+
+ const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ agentContext.config.logger.trace(
+ `Got revocation registry delta unparsed-response '${revocationRegistryId}' from ledger`,
+ {
+ response,
+ }
+ )
+
+ const [, revocationRegistryDelta, deltaTimestamp] = await this.indySdk.parseGetRevocRegDeltaResponse(response)
+
+ agentContext.config.logger.debug(
+ `Got revocation registry deltas '${revocationRegistryId}' until timestamp ${timestamp} from ledger`,
+ {
+ revocationRegistryDelta,
+ deltaTimestamp,
+ }
+ )
+
+ const { resolutionMetadata, revocationRegistryDefinition, revocationRegistryDefinitionMetadata } =
+ await this.getRevocationRegistryDefinition(agentContext, revocationRegistryId)
+
+ if (
+ !revocationRegistryDefinition ||
+ !revocationRegistryDefinitionMetadata.issuanceType ||
+ typeof revocationRegistryDefinitionMetadata.issuanceType !== 'string'
+ ) {
+ return {
+ resolutionMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ error: `error resolving revocation registry definition with id ${revocationRegistryId}: ${resolutionMetadata.error} ${resolutionMetadata.message}`,
+ },
+ revocationListMetadata: {},
+ revocationList: null,
+ }
+ }
+
+ const isIssuanceByDefault = revocationRegistryDefinitionMetadata.issuanceType === 'ISSUANCE_BY_DEFAULT'
+
+ return {
+ resolutionMetadata: {
+ didIndyNamespace: pool.didIndyNamespace,
+ },
+ revocationList: anonCredsRevocationListFromIndySdk(
+ revocationRegistryId,
+ revocationRegistryDefinition,
+ revocationRegistryDelta,
+ deltaTimestamp,
+ isIssuanceByDefault
+ ),
+ revocationListMetadata: {},
+ }
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error retrieving revocation registry delta '${revocationRegistryId}' from ledger, potentially revocation interval ends before revocation registry creation?"`,
+ {
+ error,
+ revocationRegistryId: revocationRegistryId,
+ }
+ )
+
+ return {
+ resolutionMetadata: {
+ error: 'notFound',
+ message: `Error retrieving revocation registry delta '${revocationRegistryId}' from ledger, potentially revocation interval ends before revocation registry creation: ${error.message}`,
+ },
+ revocationList: null,
+ revocationListMetadata: {},
+ }
+ }
+ }
+}
+
+export interface IndySdkRegisterSchemaOptions extends RegisterSchemaOptions {
+ options: {
+ didIndyNamespace: string
+ }
+}
+
+export interface IndySdkRegisterCredentialDefinitionOptions extends RegisterCredentialDefinitionOptions {
+ options: {
+ didIndyNamespace: string
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
new file mode 100644
index 0000000000..88179381a9
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
@@ -0,0 +1,327 @@
+import type {
+ AnonCredsHolderService,
+ AnonCredsProof,
+ CreateCredentialRequestOptions,
+ CreateCredentialRequestReturn,
+ CreateProofOptions,
+ CredentialInfo,
+ GetCredentialOptions,
+ StoreCredentialOptions,
+ GetCredentialsForProofRequestOptions,
+ GetCredentialsForProofRequestReturn,
+ RequestedCredentials,
+} from '@aries-framework/anoncreds'
+import type { AgentContext } from '@aries-framework/core'
+import type {
+ Cred,
+ CredentialDefs,
+ IndyRequestedCredentials,
+ RevStates,
+ Schemas,
+ IndyCredential as IndySdkCredential,
+} from 'indy-sdk'
+
+import { inject } from '@aries-framework/core'
+
+import { IndySdkError, isIndyError } from '../../error'
+import { IndySdk, IndySdkSymbol } from '../../types'
+import { assertIndySdkWallet } from '../../utils/assertIndySdkWallet'
+import { getIndySeqNoFromUnqualifiedCredentialDefinitionId } from '../utils/identifiers'
+import {
+ indySdkCredentialDefinitionFromAnonCreds,
+ indySdkRevocationRegistryDefinitionFromAnonCreds,
+ indySdkSchemaFromAnonCreds,
+} from '../utils/transform'
+
+import { IndySdkRevocationService } from './IndySdkRevocationService'
+
+export class IndySdkHolderService implements AnonCredsHolderService {
+ private indySdk: IndySdk
+ private indyRevocationService: IndySdkRevocationService
+
+ public constructor(indyRevocationService: IndySdkRevocationService, @inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ this.indyRevocationService = indyRevocationService
+ }
+
+ public async createProof(agentContext: AgentContext, options: CreateProofOptions): Promise {
+ const { credentialDefinitions, proofRequest, requestedCredentials, schemas } = options
+
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ agentContext.config.logger.debug('Creating Indy Proof')
+ const indyRevocationStates: RevStates = await this.indyRevocationService.createRevocationState(
+ agentContext,
+ proofRequest,
+ requestedCredentials,
+ options.revocationRegistries
+ )
+
+ // The AnonCredsSchema doesn't contain the seqNo anymore. However, the indy credential definition id
+ // does contain the seqNo, so we can extract it from the credential definition id.
+ const seqNoMap: { [schemaId: string]: number } = {}
+
+ // Convert AnonCreds credential definitions to Indy credential definitions
+ const indyCredentialDefinitions: CredentialDefs = {}
+ for (const credentialDefinitionId in credentialDefinitions) {
+ const credentialDefinition = credentialDefinitions[credentialDefinitionId]
+ indyCredentialDefinitions[credentialDefinitionId] = indySdkCredentialDefinitionFromAnonCreds(
+ credentialDefinitionId,
+ credentialDefinition
+ )
+
+ // Get the seqNo for the schemas so we can use it when transforming the schemas
+ const schemaSeqNo = getIndySeqNoFromUnqualifiedCredentialDefinitionId(credentialDefinitionId)
+ seqNoMap[credentialDefinition.schemaId] = schemaSeqNo
+ }
+
+ // Convert AnonCreds schemas to Indy schemas
+ const indySchemas: Schemas = {}
+ for (const schemaId in schemas) {
+ const schema = schemas[schemaId]
+ indySchemas[schemaId] = indySdkSchemaFromAnonCreds(schemaId, schema, seqNoMap[schemaId])
+ }
+
+ const indyProof = await this.indySdk.proverCreateProof(
+ agentContext.wallet.handle,
+ proofRequest,
+ this.parseRequestedCredentials(requestedCredentials),
+ agentContext.wallet.masterSecretId,
+ indySchemas,
+ indyCredentialDefinitions,
+ indyRevocationStates
+ )
+
+ agentContext.config.logger.trace('Created Indy Proof', {
+ indyProof,
+ })
+
+ return indyProof
+ } catch (error) {
+ agentContext.config.logger.error(`Error creating Indy Proof`, {
+ error,
+ proofRequest,
+ requestedCredentials,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async storeCredential(agentContext: AgentContext, options: StoreCredentialOptions): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ const indyRevocationRegistryDefinition = options.revocationRegistry
+ ? indySdkRevocationRegistryDefinitionFromAnonCreds(
+ options.revocationRegistry.id,
+ options.revocationRegistry.definition
+ )
+ : null
+
+ try {
+ return await this.indySdk.proverStoreCredential(
+ agentContext.wallet.handle,
+ options.credentialId ?? null,
+ options.credentialRequestMetadata,
+ options.credential,
+ indySdkCredentialDefinitionFromAnonCreds(options.credentialDefinitionId, options.credentialDefinition),
+ indyRevocationRegistryDefinition
+ )
+ } catch (error) {
+ agentContext.config.logger.error(`Error storing Indy Credential '${options.credentialId}'`, {
+ error,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async getCredential(agentContext: AgentContext, options: GetCredentialOptions): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ const result = await this.indySdk.proverGetCredential(agentContext.wallet.handle, options.credentialId)
+
+ return {
+ credentialDefinitionId: result.cred_def_id,
+ attributes: result.attrs,
+ referent: result.referent,
+ schemaId: result.schema_id,
+ credentialRevocationId: result.cred_rev_id,
+ revocationRegistryId: result.rev_reg_id,
+ }
+ } catch (error) {
+ agentContext.config.logger.error(`Error getting Indy Credential '${options.credentialId}'`, {
+ error,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async createCredentialRequest(
+ agentContext: AgentContext,
+ options: CreateCredentialRequestOptions
+ ): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ const result = await this.indySdk.proverCreateCredentialReq(
+ agentContext.wallet.handle,
+ options.holderDid,
+ options.credentialOffer,
+ // NOTE: Is it safe to use the cred_def_id from the offer? I think so. You can't create a request
+ // for a cred def that is not in the offer
+ indySdkCredentialDefinitionFromAnonCreds(options.credentialOffer.cred_def_id, options.credentialDefinition),
+ // FIXME: we need to remove the masterSecret from the wallet, as it is AnonCreds specific
+ // Issue: https://github.com/hyperledger/aries-framework-javascript/issues/1198
+ agentContext.wallet.masterSecretId
+ )
+
+ return {
+ credentialRequest: result[0],
+ credentialRequestMetadata: result[1],
+ }
+ } catch (error) {
+ agentContext.config.logger.error(`Error creating Indy Credential Request`, {
+ error,
+ credentialOffer: options.credentialOffer,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async deleteCredential(agentContext: AgentContext, credentialId: string): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ return await this.indySdk.proverDeleteCredential(agentContext.wallet.handle, credentialId)
+ } catch (error) {
+ agentContext.config.logger.error(`Error deleting Indy Credential from Wallet`, {
+ error,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async getCredentialsForProofRequest(
+ agentContext: AgentContext,
+ options: GetCredentialsForProofRequestOptions
+ ): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ // Open indy credential search
+ const searchHandle = await this.indySdk.proverSearchCredentialsForProofReq(
+ agentContext.wallet.handle,
+ options.proofRequest,
+ options.extraQuery ?? null
+ )
+
+ const start = options.start ?? 0
+
+ try {
+ // Make sure database cursors start at 'start' (bit ugly, but no way around in indy)
+ if (start > 0) {
+ await this.fetchCredentialsForReferent(agentContext, searchHandle, options.attributeReferent, start)
+ }
+
+ // Fetch the credentials
+ const credentials = await this.fetchCredentialsForReferent(
+ agentContext,
+ searchHandle,
+ options.attributeReferent,
+ options.limit
+ )
+
+ // TODO: sort the credentials (irrevocable first)
+ return credentials.map((credential) => ({
+ credentialInfo: {
+ credentialDefinitionId: credential.cred_info.cred_def_id,
+ referent: credential.cred_info.referent,
+ attributes: credential.cred_info.attrs,
+ schemaId: credential.cred_info.schema_id,
+ revocationRegistryId: credential.cred_info.rev_reg_id,
+ credentialRevocationId: credential.cred_info.cred_rev_id,
+ },
+ interval: credential.interval,
+ }))
+ } finally {
+ // Always close search
+ await this.indySdk.proverCloseCredentialsSearchForProofReq(searchHandle)
+ }
+ } catch (error) {
+ if (isIndyError(error)) {
+ throw new IndySdkError(error)
+ }
+
+ throw error
+ }
+ }
+
+ private async fetchCredentialsForReferent(
+ agentContext: AgentContext,
+ searchHandle: number,
+ referent: string,
+ limit?: number
+ ) {
+ try {
+ let credentials: IndySdkCredential[] = []
+
+ // Allow max of 256 per fetch operation
+ const chunk = limit ? Math.min(256, limit) : 256
+
+ // Loop while limit not reached (or no limit specified)
+ while (!limit || credentials.length < limit) {
+ // Retrieve credentials
+ const credentialsJson = await this.indySdk.proverFetchCredentialsForProofReq(searchHandle, referent, chunk)
+ credentials = [...credentials, ...credentialsJson]
+
+ // If the number of credentials returned is less than chunk
+ // It means we reached the end of the iterator (no more credentials)
+ if (credentialsJson.length < chunk) {
+ return credentials
+ }
+ }
+
+ return credentials
+ } catch (error) {
+ agentContext.config.logger.error(`Error Fetching Indy Credentials For Referent`, {
+ error,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /**
+ * Converts a public api form of {@link RequestedCredentials} interface into a format {@link Indy.IndyRequestedCredentials} that Indy SDK expects.
+ **/
+ private parseRequestedCredentials(requestedCredentials: RequestedCredentials): IndyRequestedCredentials {
+ const indyRequestedCredentials: IndyRequestedCredentials = {
+ requested_attributes: {},
+ requested_predicates: {},
+ self_attested_attributes: {},
+ }
+
+ for (const groupName in requestedCredentials.requestedAttributes) {
+ indyRequestedCredentials.requested_attributes[groupName] = {
+ cred_id: requestedCredentials.requestedAttributes[groupName].credentialId,
+ revealed: requestedCredentials.requestedAttributes[groupName].revealed,
+ timestamp: requestedCredentials.requestedAttributes[groupName].timestamp,
+ }
+ }
+
+ for (const groupName in requestedCredentials.requestedPredicates) {
+ indyRequestedCredentials.requested_predicates[groupName] = {
+ cred_id: requestedCredentials.requestedPredicates[groupName].credentialId,
+ timestamp: requestedCredentials.requestedPredicates[groupName].timestamp,
+ }
+ }
+
+ return indyRequestedCredentials
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerService.ts
new file mode 100644
index 0000000000..f877be4f75
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerService.ts
@@ -0,0 +1,129 @@
+import type { CreateCredentialDefinitionMetadata } from './IndySdkIssuerServiceMetadata'
+import type { IndySdkUtilitiesService } from './IndySdkUtilitiesService'
+import type {
+ AnonCredsIssuerService,
+ CreateCredentialDefinitionOptions,
+ CreateCredentialOfferOptions,
+ CreateCredentialOptions,
+ CreateCredentialReturn,
+ CreateSchemaOptions,
+ AnonCredsCredentialOffer,
+ AnonCredsSchema,
+ AnonCredsCredentialDefinition,
+} from '@aries-framework/anoncreds'
+import type { AgentContext } from '@aries-framework/core'
+
+import { AriesFrameworkError, inject } from '@aries-framework/core'
+
+import { IndySdkError, isIndyError } from '../../error'
+import { IndySdk, IndySdkSymbol } from '../../types'
+import { assertIndySdkWallet } from '../../utils/assertIndySdkWallet'
+import { indySdkSchemaFromAnonCreds } from '../utils/transform'
+
+export class IndySdkIssuerService implements AnonCredsIssuerService {
+ private indySdk: IndySdk
+ private IndySdkUtilitiesService: IndySdkUtilitiesService
+
+ public constructor(IndySdkUtilitiesService: IndySdkUtilitiesService, @inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ this.IndySdkUtilitiesService = IndySdkUtilitiesService
+ }
+
+ public async createSchema(agentContext: AgentContext, options: CreateSchemaOptions): Promise {
+ const { issuerId, name, version, attrNames } = options
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ const [, schema] = await this.indySdk.issuerCreateSchema(issuerId, name, version, attrNames)
+
+ return {
+ issuerId,
+ attrNames: schema.attrNames,
+ name: schema.name,
+ version: schema.version,
+ }
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async createCredentialDefinition(
+ agentContext: AgentContext,
+ options: CreateCredentialDefinitionOptions,
+ metadata?: CreateCredentialDefinitionMetadata
+ ): Promise {
+ const { tag, supportRevocation, schema, issuerId, schemaId } = options
+
+ if (!metadata)
+ throw new AriesFrameworkError('The metadata parameter is required when using Indy, but received undefined.')
+
+ try {
+ assertIndySdkWallet(agentContext.wallet)
+ const [, credentialDefinition] = await this.indySdk.issuerCreateAndStoreCredentialDef(
+ agentContext.wallet.handle,
+ issuerId,
+ indySdkSchemaFromAnonCreds(schemaId, schema, metadata.indyLedgerSchemaSeqNo),
+ tag,
+ 'CL',
+ {
+ support_revocation: supportRevocation,
+ }
+ )
+
+ return {
+ issuerId,
+ tag: credentialDefinition.tag,
+ schemaId: credentialDefinition.schemaId,
+ type: 'CL',
+ value: credentialDefinition.value,
+ }
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async createCredentialOffer(
+ agentContext: AgentContext,
+ options: CreateCredentialOfferOptions
+ ): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+ try {
+ return await this.indySdk.issuerCreateCredentialOffer(agentContext.wallet.handle, options.credentialDefinitionId)
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async createCredential(
+ agentContext: AgentContext,
+ options: CreateCredentialOptions
+ ): Promise {
+ const { tailsFilePath, credentialOffer, credentialRequest, credentialValues, revocationRegistryId } = options
+
+ assertIndySdkWallet(agentContext.wallet)
+ try {
+ // Indy SDK requires tailsReaderHandle. Use null if no tailsFilePath is present
+ const tailsReaderHandle = tailsFilePath ? await this.IndySdkUtilitiesService.createTailsReader(tailsFilePath) : 0
+
+ if (revocationRegistryId || tailsFilePath) {
+ throw new AriesFrameworkError('Revocation not supported yet')
+ }
+
+ const [credential, credentialRevocationId] = await this.indySdk.issuerCreateCredential(
+ agentContext.wallet.handle,
+ credentialOffer,
+ credentialRequest,
+ credentialValues,
+ revocationRegistryId ?? null,
+ tailsReaderHandle
+ )
+
+ return {
+ credential,
+ credentialRevocationId,
+ }
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerServiceMetadata.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerServiceMetadata.ts
new file mode 100644
index 0000000000..bb02f17967
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkIssuerServiceMetadata.ts
@@ -0,0 +1,3 @@
+export type CreateCredentialDefinitionMetadata = {
+ indyLedgerSchemaSeqNo: number
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkRevocationService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkRevocationService.ts
new file mode 100644
index 0000000000..0ed637a6ee
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkRevocationService.ts
@@ -0,0 +1,177 @@
+import type {
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsRevocationList,
+ AnonCredsProofRequest,
+ RequestedCredentials,
+ CredentialInfo,
+ NonRevokedInterval,
+} from '@aries-framework/anoncreds'
+import type { AgentContext } from '@aries-framework/core'
+import type { RevStates } from 'indy-sdk'
+
+import { AriesFrameworkError, inject, injectable } from '@aries-framework/core'
+
+import { IndySdkError, isIndyError } from '../../error'
+import { IndySdk, IndySdkSymbol } from '../../types'
+import {
+ indySdkRevocationDeltaFromAnonCreds,
+ indySdkRevocationRegistryDefinitionFromAnonCreds,
+} from '../utils/transform'
+
+import { IndySdkUtilitiesService } from './IndySdkUtilitiesService'
+
+enum RequestReferentType {
+ Attribute = 'attribute',
+ Predicate = 'predicate',
+ SelfAttestedAttribute = 'self-attested-attribute',
+}
+
+/**
+ * Internal class that handles revocation related logic for the Indy SDK
+ *
+ * @internal
+ */
+@injectable()
+export class IndySdkRevocationService {
+ private indySdk: IndySdk
+ private indySdkUtilitiesService: IndySdkUtilitiesService
+
+ public constructor(indyUtilitiesService: IndySdkUtilitiesService, @inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ this.indySdkUtilitiesService = indyUtilitiesService
+ }
+
+ /**
+ * Creates the revocation state for the requested credentials in a format that the Indy SDK expects.
+ */
+ public async createRevocationState(
+ agentContext: AgentContext,
+ proofRequest: AnonCredsProofRequest,
+ requestedCredentials: RequestedCredentials,
+ revocationRegistries: {
+ [revocationRegistryDefinitionId: string]: {
+ // Tails is already downloaded
+ tailsFilePath: string
+ definition: AnonCredsRevocationRegistryDefinition
+ revocationLists: {
+ [timestamp: string]: AnonCredsRevocationList
+ }
+ }
+ }
+ ): Promise {
+ try {
+ agentContext.config.logger.debug(`Creating Revocation State(s) for proof request`, {
+ proofRequest,
+ requestedCredentials,
+ })
+ const indyRevocationStates: RevStates = {}
+ const referentCredentials: Array<{
+ type: RequestReferentType
+ referent: string
+ credentialInfo: CredentialInfo
+ referentRevocationInterval: NonRevokedInterval | undefined
+ }> = []
+
+ //Retrieve information for referents and push to single array
+ for (const [referent, requestedCredential] of Object.entries(requestedCredentials.requestedAttributes ?? {})) {
+ referentCredentials.push({
+ referent,
+ credentialInfo: requestedCredential.credentialInfo,
+ type: RequestReferentType.Attribute,
+ referentRevocationInterval: proofRequest.requested_attributes[referent].non_revoked,
+ })
+ }
+ for (const [referent, requestedCredential] of Object.entries(requestedCredentials.requestedPredicates ?? {})) {
+ referentCredentials.push({
+ referent,
+ credentialInfo: requestedCredential.credentialInfo,
+ type: RequestReferentType.Predicate,
+ referentRevocationInterval: proofRequest.requested_predicates[referent].non_revoked,
+ })
+ }
+
+ for (const { referent, credentialInfo, type, referentRevocationInterval } of referentCredentials) {
+ // Prefer referent-specific revocation interval over global revocation interval
+ const requestRevocationInterval = referentRevocationInterval ?? proofRequest.non_revoked
+ const credentialRevocationId = credentialInfo.credentialRevocationId
+ const revocationRegistryId = credentialInfo.revocationRegistryId
+
+ // If revocation interval is present and the credential is revocable then create revocation state
+ if (requestRevocationInterval && credentialRevocationId && revocationRegistryId) {
+ agentContext.config.logger.trace(
+ `Presentation is requesting proof of non revocation for ${type} referent '${referent}', creating revocation state for credential`,
+ {
+ requestRevocationInterval,
+ credentialRevocationId,
+ revocationRegistryId,
+ }
+ )
+
+ this.assertRevocationInterval(requestRevocationInterval)
+
+ const { definition, revocationLists, tailsFilePath } = revocationRegistries[revocationRegistryId]
+ // NOTE: we assume that the revocationLists have been added based on timestamps of the `to` query. On a higher level it means we'll find the
+ // most accurate revocation list for a given timestamp. It doesn't have to be that the revocationList is from the `to` timestamp however.
+ const revocationList = revocationLists[requestRevocationInterval.to]
+
+ const tails = await this.indySdkUtilitiesService.createTailsReader(tailsFilePath)
+
+ const revocationState = await this.indySdk.createRevocationState(
+ tails,
+ indySdkRevocationRegistryDefinitionFromAnonCreds(revocationRegistryId, definition),
+ indySdkRevocationDeltaFromAnonCreds(revocationList),
+ revocationList.timestamp,
+ credentialRevocationId
+ )
+ const timestamp = revocationState.timestamp
+
+ if (!indyRevocationStates[revocationRegistryId]) {
+ indyRevocationStates[revocationRegistryId] = {}
+ }
+ indyRevocationStates[revocationRegistryId][timestamp] = revocationState
+ }
+ }
+
+ agentContext.config.logger.debug(`Created Revocation States for Proof Request`, {
+ indyRevocationStates,
+ })
+
+ return indyRevocationStates
+ } catch (error) {
+ agentContext.config.logger.error(`Error creating Indy Revocation State for Proof Request`, {
+ error,
+ proofRequest,
+ requestedCredentials,
+ })
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ // TODO: Add Test
+ // TODO: we should do this verification on a higher level I think?
+ // Check revocation interval in accordance with https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0441-present-proof-best-practices/README.md#semantics-of-non-revocation-interval-endpoints
+ private assertRevocationInterval(
+ revocationInterval: NonRevokedInterval
+ ): asserts revocationInterval is BestPracticeNonRevokedInterval {
+ if (!revocationInterval.to) {
+ throw new AriesFrameworkError(`Presentation requests proof of non-revocation with no 'to' value specified`)
+ }
+
+ if (
+ (revocationInterval.from || revocationInterval.from === 0) &&
+ revocationInterval.to !== revocationInterval.from
+ ) {
+ throw new AriesFrameworkError(
+ `Presentation requests proof of non-revocation with an interval from: '${revocationInterval.from}' that does not match the interval to: '${revocationInterval.to}', as specified in Aries RFC 0441`
+ )
+ }
+ }
+}
+
+// This sets the `to` value to be required. We do this check in the `assertRevocationInterval` method,
+// and it makes it easier to work with the object in TS
+interface BestPracticeNonRevokedInterval {
+ from?: number
+ to: number
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkUtilitiesService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkUtilitiesService.ts
new file mode 100644
index 0000000000..1ac0dec33e
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkUtilitiesService.ts
@@ -0,0 +1,65 @@
+import type { BlobReaderHandle } from 'indy-sdk'
+
+import {
+ AriesFrameworkError,
+ FileSystem,
+ getDirFromFilePath,
+ IndySdkError,
+ InjectionSymbols,
+ Logger,
+} from '@aries-framework/core'
+import { inject, injectable } from 'tsyringe'
+
+import { isIndyError } from '../../error'
+import { IndySdk, IndySdkSymbol } from '../../types'
+
+@injectable()
+export class IndySdkUtilitiesService {
+ private indySdk: IndySdk
+ private logger: Logger
+ private fileSystem: FileSystem
+
+ public constructor(
+ @inject(InjectionSymbols.Logger) logger: Logger,
+ @inject(InjectionSymbols.FileSystem) fileSystem: FileSystem,
+ @inject(IndySdkSymbol) indySdk: IndySdk
+ ) {
+ this.indySdk = indySdk
+ this.logger = logger
+ this.fileSystem = fileSystem
+ }
+
+ /**
+ * Get a handler for the blob storage tails file reader.
+ *
+ * @param tailsFilePath The path of the tails file
+ * @returns The blob storage reader handle
+ */
+ public async createTailsReader(tailsFilePath: string): Promise {
+ try {
+ this.logger.debug(`Opening tails reader at path ${tailsFilePath}`)
+ const tailsFileExists = await this.fileSystem.exists(tailsFilePath)
+
+ // Extract directory from path (should also work with windows paths)
+ const dirname = getDirFromFilePath(tailsFilePath)
+
+ if (!tailsFileExists) {
+ throw new AriesFrameworkError(`Tails file does not exist at path ${tailsFilePath}`)
+ }
+
+ const tailsReaderConfig = {
+ base_dir: dirname,
+ }
+
+ const tailsReader = await this.indySdk.openBlobStorageReader('default', tailsReaderConfig)
+ this.logger.debug(`Opened tails reader at path ${tailsFilePath}`)
+ return tailsReader
+ } catch (error) {
+ if (isIndyError(error)) {
+ throw new IndySdkError(error)
+ }
+
+ throw error
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkVerifierService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkVerifierService.ts
new file mode 100644
index 0000000000..d302e66c97
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkVerifierService.ts
@@ -0,0 +1,86 @@
+import type { AnonCredsVerifierService, VerifyProofOptions } from '@aries-framework/anoncreds'
+import type { CredentialDefs, Schemas, RevocRegDefs, RevRegs } from 'indy-sdk'
+
+import { inject } from '@aries-framework/core'
+
+import { IndySdkError, isIndyError } from '../../error'
+import { IndySdk, IndySdkSymbol } from '../../types'
+import { getIndySeqNoFromUnqualifiedCredentialDefinitionId } from '../utils/identifiers'
+import {
+ indySdkCredentialDefinitionFromAnonCreds,
+ indySdkRevocationRegistryDefinitionFromAnonCreds,
+ indySdkRevocationRegistryFromAnonCreds,
+ indySdkSchemaFromAnonCreds,
+} from '../utils/transform'
+
+export class IndySdkVerifierService implements AnonCredsVerifierService {
+ private indySdk: IndySdk
+
+ public constructor(@inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ }
+
+ public async verifyProof(options: VerifyProofOptions): Promise {
+ try {
+ // The AnonCredsSchema doesn't contain the seqNo anymore. However, the indy credential definition id
+ // does contain the seqNo, so we can extract it from the credential definition id.
+ const seqNoMap: { [schemaId: string]: number } = {}
+
+ // Convert AnonCreds credential definitions to Indy credential definitions
+ const indyCredentialDefinitions: CredentialDefs = {}
+ for (const credentialDefinitionId in options.credentialDefinitions) {
+ const credentialDefinition = options.credentialDefinitions[credentialDefinitionId]
+
+ indyCredentialDefinitions[credentialDefinitionId] = indySdkCredentialDefinitionFromAnonCreds(
+ credentialDefinitionId,
+ credentialDefinition
+ )
+
+ // Get the seqNo for the schemas so we can use it when transforming the schemas
+ const schemaSeqNo = getIndySeqNoFromUnqualifiedCredentialDefinitionId(credentialDefinitionId)
+ seqNoMap[credentialDefinition.schemaId] = schemaSeqNo
+ }
+
+ // Convert AnonCreds schemas to Indy schemas
+ const indySchemas: Schemas = {}
+ for (const schemaId in options.schemas) {
+ const schema = options.schemas[schemaId]
+ indySchemas[schemaId] = indySdkSchemaFromAnonCreds(schemaId, schema, seqNoMap[schemaId])
+ }
+
+ // Convert AnonCreds revocation definitions to Indy revocation definitions
+ const indyRevocationDefinitions: RevocRegDefs = {}
+ const indyRevocationRegistries: RevRegs = {}
+
+ for (const revocationRegistryDefinitionId in options.revocationStates) {
+ const { definition, revocationLists } = options.revocationStates[revocationRegistryDefinitionId]
+ indyRevocationDefinitions[revocationRegistryDefinitionId] = indySdkRevocationRegistryDefinitionFromAnonCreds(
+ revocationRegistryDefinitionId,
+ definition
+ )
+
+ // Initialize empty object for this revocation registry
+ indyRevocationRegistries[revocationRegistryDefinitionId] = {}
+
+ // Also transform the revocation lists for the specified timestamps into the revocation registry
+ // format Indy expects
+ for (const timestamp in revocationLists) {
+ const revocationList = revocationLists[timestamp]
+ indyRevocationRegistries[revocationRegistryDefinitionId][timestamp] =
+ indySdkRevocationRegistryFromAnonCreds(revocationList)
+ }
+ }
+
+ return await this.indySdk.verifierVerifyProof(
+ options.proofRequest,
+ options.proof,
+ indySchemas,
+ indyCredentialDefinitions,
+ indyRevocationDefinitions,
+ indyRevocationRegistries
+ )
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts b/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
new file mode 100644
index 0000000000..f85ec160b5
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
@@ -0,0 +1,48 @@
+import {
+ didFromSchemaId,
+ didFromCredentialDefinitionId,
+ didFromRevocationRegistryDefinitionId,
+ getIndySeqNoFromUnqualifiedCredentialDefinitionId,
+ getLegacyCredentialDefinitionId,
+ getLegacySchemaId,
+} from '../identifiers'
+
+describe('identifiers', () => {
+ it('getLegacySchemaId should return a valid schema id given a did, name, and version', () => {
+ const did = '12345'
+ const name = 'backbench'
+ const version = '420'
+
+ expect(getLegacySchemaId(did, name, version)).toEqual('12345:2:backbench:420')
+ })
+
+ it('getLegacyCredentialDefinitionId should return a valid credential definition id given a did, seqNo, and tag', () => {
+ const did = '12345'
+ const seqNo = 420
+ const tag = 'someTag'
+
+ expect(getLegacyCredentialDefinitionId(did, seqNo, tag)).toEqual('12345:3:CL:420:someTag')
+ })
+
+ it('getIndySeqNoFromUnqualifiedCredentialDefinitionId should return the seqNo from the credential definition id', () => {
+ expect(getIndySeqNoFromUnqualifiedCredentialDefinitionId('12345:3:CL:420:someTag')).toEqual(420)
+ })
+
+ it('didFromSchemaId should return the did from the schema id', () => {
+ const schemaId = '12345:2:backbench:420'
+
+ expect(didFromSchemaId(schemaId)).toEqual('12345')
+ })
+
+ it('didFromCredentialDefinitionId should return the did from the credential definition id', () => {
+ const credentialDefinitionId = '12345:3:CL:420:someTag'
+
+ expect(didFromCredentialDefinitionId(credentialDefinitionId)).toEqual('12345')
+ })
+
+ it('didFromRevocationRegistryDefinitionId should return the did from the revocation registry id', () => {
+ const revocationRegistryId = '12345:3:CL:420:someTag'
+
+ expect(didFromRevocationRegistryDefinitionId(revocationRegistryId)).toEqual('12345')
+ })
+})
diff --git a/packages/indy-sdk/src/anoncreds/utils/__tests__/transform.test.ts b/packages/indy-sdk/src/anoncreds/utils/__tests__/transform.test.ts
new file mode 100644
index 0000000000..20b16fa0ff
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/utils/__tests__/transform.test.ts
@@ -0,0 +1,114 @@
+import type { AnonCredsCredentialDefinition, AnonCredsSchema } from '../../../../../anoncreds/src'
+import type { CredDef, Schema } from 'indy-sdk'
+
+import {
+ anonCredsCredentialDefinitionFromIndySdk,
+ anonCredsSchemaFromIndySdk,
+ indySdkCredentialDefinitionFromAnonCreds,
+ indySdkSchemaFromAnonCreds,
+} from '../transform'
+
+describe('transform', () => {
+ it('anonCredsSchemaFromIndySdk should return a valid anoncreds schema', () => {
+ const schema: Schema = {
+ attrNames: ['hello'],
+ id: '12345:2:Example Schema:1.0.0',
+ name: 'Example Schema',
+ seqNo: 150,
+ ver: '1.0',
+ version: '1.0.0',
+ }
+
+ expect(anonCredsSchemaFromIndySdk(schema)).toEqual({
+ attrNames: ['hello'],
+ issuerId: '12345',
+ name: 'Example Schema',
+ version: '1.0.0',
+ })
+ })
+
+ it('indySdkSchemaFromAnonCreds should return a valid indy sdk schema', () => {
+ const schemaId = '12345:2:Example Schema:1.0.0'
+ const schema: AnonCredsSchema = {
+ attrNames: ['hello'],
+ issuerId: '12345',
+ name: 'Example Schema',
+ version: '1.0.0',
+ }
+
+ expect(indySdkSchemaFromAnonCreds(schemaId, schema, 150)).toEqual({
+ attrNames: ['hello'],
+ id: '12345:2:Example Schema:1.0.0',
+ name: 'Example Schema',
+ seqNo: 150,
+ ver: '1.0',
+ version: '1.0.0',
+ })
+ })
+
+ it('anonCredsCredentialDefinitionFromIndySdk should return a valid anoncreds credential definition', () => {
+ const credDef: CredDef = {
+ id: '12345:3:CL:420:someTag',
+ schemaId: '8910:2:Example Schema:1.0.0',
+ tag: 'someTag',
+ type: 'CL',
+ value: {
+ primary: {
+ something: 'string',
+ },
+ },
+ ver: '1.0',
+ }
+
+ expect(anonCredsCredentialDefinitionFromIndySdk(credDef)).toEqual({
+ issuerId: '12345',
+ schemaId: '8910:2:Example Schema:1.0.0',
+ tag: 'someTag',
+ type: 'CL',
+ value: {
+ primary: {
+ something: 'string',
+ },
+ },
+ })
+ })
+
+ it('indySdkCredentialDefinitionFromAnonCreds should return a valid indy sdk credential definition', () => {
+ const credentialDefinitionId = '12345:3:CL:420:someTag'
+ const credentialDefinition: AnonCredsCredentialDefinition = {
+ issuerId: '12345',
+ schemaId: '8910:2:Example Schema:1.0.0',
+ tag: 'someTag',
+ type: 'CL',
+ value: {
+ primary: {
+ something: 'string',
+ },
+ },
+ }
+
+ expect(indySdkCredentialDefinitionFromAnonCreds(credentialDefinitionId, credentialDefinition)).toEqual({
+ id: '12345:3:CL:420:someTag',
+ schemaId: '8910:2:Example Schema:1.0.0',
+ tag: 'someTag',
+ type: 'CL',
+ value: {
+ primary: {
+ something: 'string',
+ },
+ },
+ ver: '1.0',
+ })
+ })
+
+ // TODO: add tests for these models once finalized in the anoncreds spec
+ test.todo(
+ 'anonCredsRevocationRegistryDefinitionFromIndySdk should return a valid anoncreds revocation registry definition'
+ )
+ test.todo(
+ 'indySdkRevocationRegistryDefinitionFromAnonCreds should return a valid indy sdk revocation registry definition'
+ )
+ test.todo('anonCredsRevocationListFromIndySdk should return a valid anoncreds revocation list')
+ test.todo('indySdkRevocationRegistryFromAnonCreds should return a valid indy sdk revocation registry')
+ test.todo('indySdkRevocationDeltaFromAnonCreds should return a valid indy sdk revocation delta')
+})
diff --git a/packages/indy-sdk/src/anoncreds/utils/identifiers.ts b/packages/indy-sdk/src/anoncreds/utils/identifiers.ts
new file mode 100644
index 0000000000..bc59b5f8d4
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/utils/identifiers.ts
@@ -0,0 +1,41 @@
+export function getIndySeqNoFromUnqualifiedCredentialDefinitionId(unqualifiedCredentialDefinitionId: string): number {
+ // 5nDyJVP1NrcPAttP3xwMB9:3:CL:56495:npbd
+ const [, , , seqNo] = unqualifiedCredentialDefinitionId.split(':')
+
+ return Number(seqNo)
+}
+
+export function getLegacySchemaId(unqualifiedDid: string, name: string, version: string) {
+ return `${unqualifiedDid}:2:${name}:${version}`
+}
+
+export function getLegacyCredentialDefinitionId(unqualifiedDid: string, seqNo: number, tag: string) {
+ return `${unqualifiedDid}:3:CL:${seqNo}:${tag}`
+}
+
+/**
+ * Extract did from schema id
+ */
+export function didFromSchemaId(schemaId: string) {
+ const [did] = schemaId.split(':')
+
+ return did
+}
+
+/**
+ * Extract did from credential definition id
+ */
+export function didFromCredentialDefinitionId(credentialDefinitionId: string) {
+ const [did] = credentialDefinitionId.split(':')
+
+ return did
+}
+
+/**
+ * Extract did from revocation registry definition id
+ */
+export function didFromRevocationRegistryDefinitionId(revocationRegistryId: string) {
+ const [did] = revocationRegistryId.split(':')
+
+ return did
+}
diff --git a/packages/indy-sdk/src/anoncreds/utils/transform.ts b/packages/indy-sdk/src/anoncreds/utils/transform.ts
new file mode 100644
index 0000000000..a5ad8afd60
--- /dev/null
+++ b/packages/indy-sdk/src/anoncreds/utils/transform.ts
@@ -0,0 +1,153 @@
+import type {
+ AnonCredsCredentialDefinition,
+ AnonCredsRevocationList,
+ AnonCredsRevocationRegistryDefinition,
+ AnonCredsSchema,
+} from '@aries-framework/anoncreds'
+import type { CredDef, RevocReg, RevocRegDef, RevocRegDelta, Schema } from 'indy-sdk'
+
+import { didFromCredentialDefinitionId, didFromRevocationRegistryDefinitionId, didFromSchemaId } from './identifiers'
+
+export function anonCredsSchemaFromIndySdk(schema: Schema): AnonCredsSchema {
+ const issuerId = didFromSchemaId(schema.id)
+ return {
+ issuerId,
+ name: schema.name,
+ version: schema.version,
+ attrNames: schema.attrNames,
+ }
+}
+
+export function indySdkSchemaFromAnonCreds(schemaId: string, schema: AnonCredsSchema, indyLedgerSeqNo: number): Schema {
+ return {
+ id: schemaId,
+ attrNames: schema.attrNames,
+ name: schema.name,
+ version: schema.version,
+ ver: '1.0',
+ seqNo: indyLedgerSeqNo,
+ }
+}
+
+export function anonCredsCredentialDefinitionFromIndySdk(credentialDefinition: CredDef): AnonCredsCredentialDefinition {
+ const issuerId = didFromCredentialDefinitionId(credentialDefinition.id)
+
+ return {
+ issuerId,
+ schemaId: credentialDefinition.schemaId,
+ tag: credentialDefinition.tag,
+ type: 'CL',
+ value: credentialDefinition.value,
+ }
+}
+
+export function indySdkCredentialDefinitionFromAnonCreds(
+ credentialDefinitionId: string,
+ credentialDefinition: AnonCredsCredentialDefinition
+): CredDef {
+ return {
+ id: credentialDefinitionId,
+ schemaId: credentialDefinition.schemaId,
+ tag: credentialDefinition.tag,
+ type: credentialDefinition.type,
+ value: credentialDefinition.value,
+ ver: '1.0',
+ }
+}
+
+export function anonCredsRevocationRegistryDefinitionFromIndySdk(
+ revocationRegistryDefinition: RevocRegDef
+): AnonCredsRevocationRegistryDefinition {
+ const issuerId = didFromRevocationRegistryDefinitionId(revocationRegistryDefinition.id)
+
+ return {
+ issuerId,
+ credDefId: revocationRegistryDefinition.credDefId,
+ maxCredNum: revocationRegistryDefinition.value.maxCredNum,
+ publicKeys: revocationRegistryDefinition.value.publicKeys,
+ tag: revocationRegistryDefinition.tag,
+ tailsHash: revocationRegistryDefinition.value.tailsHash,
+ tailsLocation: revocationRegistryDefinition.value.tailsLocation,
+ type: 'CL_ACCUM',
+ }
+}
+
+export function indySdkRevocationRegistryDefinitionFromAnonCreds(
+ revocationRegistryDefinitionId: string,
+ revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition
+): RevocRegDef {
+ return {
+ id: revocationRegistryDefinitionId,
+ credDefId: revocationRegistryDefinition.credDefId,
+ revocDefType: revocationRegistryDefinition.type,
+ tag: revocationRegistryDefinition.tag,
+ value: {
+ issuanceType: 'ISSUANCE_BY_DEFAULT', // NOTE: we always use ISSUANCE_BY_DEFAULT when passing to the indy-sdk. It doesn't matter, as we have the revocation List with the full state
+ maxCredNum: revocationRegistryDefinition.maxCredNum,
+ publicKeys: revocationRegistryDefinition.publicKeys,
+ tailsHash: revocationRegistryDefinition.tailsHash,
+ tailsLocation: revocationRegistryDefinition.tailsLocation,
+ },
+ ver: '1.0',
+ }
+}
+
+export function anonCredsRevocationListFromIndySdk(
+ revocationRegistryDefinitionId: string,
+ revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition,
+ delta: RevocRegDelta,
+ timestamp: number,
+ isIssuanceByDefault: boolean
+): AnonCredsRevocationList {
+ // 0 means unrevoked, 1 means revoked
+ const defaultState = isIssuanceByDefault ? 0 : 1
+
+ // Fill with default value
+ const revocationList = new Array(revocationRegistryDefinition.maxCredNum).fill(defaultState)
+
+ // Set all `issuer` indexes to 0 (not revoked)
+ for (const issued of delta.value.issued ?? []) {
+ revocationList[issued] = 0
+ }
+
+ // Set all `revoked` indexes to 1 (revoked)
+ for (const revoked of delta.value.revoked ?? []) {
+ revocationList[revoked] = 1
+ }
+
+ return {
+ issuerId: revocationRegistryDefinition.issuerId,
+ currentAccumulator: delta.value.accum,
+ revRegId: revocationRegistryDefinitionId,
+ revocationList,
+ timestamp,
+ }
+}
+
+export function indySdkRevocationRegistryFromAnonCreds(revocationList: AnonCredsRevocationList): RevocReg {
+ return {
+ ver: '1.0',
+ value: {
+ accum: revocationList.currentAccumulator,
+ },
+ }
+}
+
+export function indySdkRevocationDeltaFromAnonCreds(revocationList: AnonCredsRevocationList): RevocRegDelta {
+ // Get all indices from the revocationList that are revoked (so have value '1')
+ const revokedIndices = revocationList.revocationList.reduce(
+ (revoked, current, index) => (current === 1 ? [...revoked, index] : revoked),
+ []
+ )
+
+ return {
+ value: {
+ accum: revocationList.currentAccumulator,
+ issued: [],
+ revoked: revokedIndices,
+ // NOTE: I don't think this is used?
+ prevAccum: '',
+ },
+ ver: '1.0',
+ }
+}
diff --git a/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts b/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
new file mode 100644
index 0000000000..9f94c7326c
--- /dev/null
+++ b/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
@@ -0,0 +1,265 @@
+import type { IndySdkPool } from '../ledger'
+import type { IndyEndpointAttrib } from './didSovUtil'
+import type {
+ AgentContext,
+ DidRegistrar,
+ DidCreateOptions,
+ DidCreateResult,
+ DidDeactivateResult,
+ DidUpdateResult,
+ Key,
+} from '@aries-framework/core'
+import type { NymRole } from 'indy-sdk'
+
+import { inject, injectable, DidDocumentRole, DidRecord, DidRepository } from '@aries-framework/core'
+
+import { IndySdkError } from '../error'
+import { isIndyError } from '../error/indyError'
+import { IndySdkPoolService } from '../ledger'
+import { IndySdk, IndySdkSymbol } from '../types'
+import { assertIndySdkWallet } from '../utils/assertIndySdkWallet'
+
+import { addServicesFromEndpointsAttrib, sovDidDocumentFromDid } from './didSovUtil'
+
+@injectable()
+export class IndySdkSovDidRegistrar implements DidRegistrar {
+ public readonly supportedMethods = ['sov']
+ private didRepository: DidRepository
+ private indySdk: IndySdk
+ private indySdkPoolService: IndySdkPoolService
+
+ public constructor(
+ didRepository: DidRepository,
+ indySdkPoolService: IndySdkPoolService,
+ @inject(IndySdkSymbol) indySdk: IndySdk
+ ) {
+ this.didRepository = didRepository
+ this.indySdk = indySdk
+ this.indySdkPoolService = indySdkPoolService
+ }
+
+ public async create(agentContext: AgentContext, options: IndySdkSovDidCreateOptions): Promise {
+ const { alias, role, submitterDid, indyNamespace } = options.options
+ const seed = options.secret?.seed
+
+ if (seed && (typeof seed !== 'string' || seed.length !== 32)) {
+ return {
+ didDocumentMetadata: {},
+ didRegistrationMetadata: {},
+ didState: {
+ state: 'failed',
+ reason: 'Invalid seed provided',
+ },
+ }
+ }
+
+ if (!submitterDid.startsWith('did:sov:')) {
+ return {
+ didDocumentMetadata: {},
+ didRegistrationMetadata: {},
+ didState: {
+ state: 'failed',
+ reason: 'Submitter did must be a valid did:sov did',
+ },
+ }
+ }
+
+ try {
+ // NOTE: we need to use the createAndStoreMyDid method from indy to create the did
+ // If we just create a key and handle the creating of the did ourselves, indy will throw a
+ // WalletItemNotFound when it needs to sign ledger transactions using this did. This means we need
+ // to rely directly on the indy SDK, as we don't want to expose a createDid method just for.
+ assertIndySdkWallet(agentContext.wallet)
+ const [unqualifiedIndyDid, verkey] = await this.indySdk.createAndStoreMyDid(agentContext.wallet.handle, {
+ seed,
+ })
+
+ const qualifiedSovDid = `did:sov:${unqualifiedIndyDid}`
+ const unqualifiedSubmitterDid = submitterDid.replace('did:sov:', '')
+
+ // TODO: it should be possible to pass the pool used for writing to the indy ledger service.
+ // The easiest way to do this would be to make the submitterDid a fully qualified did, including the indy namespace.
+ const pool = this.indySdkPoolService.getPoolForNamespace(indyNamespace)
+ await this.registerPublicDid(agentContext, unqualifiedSubmitterDid, unqualifiedIndyDid, verkey, alias, pool, role)
+
+ // Create did document
+ const didDocumentBuilder = sovDidDocumentFromDid(qualifiedSovDid, verkey)
+
+ // Add services if endpoints object was passed.
+ if (options.options.endpoints) {
+ await this.setEndpointsForDid(agentContext, unqualifiedIndyDid, options.options.endpoints, pool)
+ addServicesFromEndpointsAttrib(
+ didDocumentBuilder,
+ qualifiedSovDid,
+ options.options.endpoints,
+ `${qualifiedSovDid}#key-agreement-1`
+ )
+ }
+
+ // Build did document.
+ const didDocument = didDocumentBuilder.build()
+
+ const didIndyNamespace = pool.config.indyNamespace
+ const qualifiedIndyDid = `did:indy:${didIndyNamespace}:${unqualifiedIndyDid}`
+
+ // Save the did so we know we created it and can issue with it
+ const didRecord = new DidRecord({
+ id: qualifiedSovDid,
+ did: qualifiedSovDid,
+ role: DidDocumentRole.Created,
+ tags: {
+ recipientKeyFingerprints: didDocument.recipientKeys.map((key: Key) => key.fingerprint),
+ qualifiedIndyDid,
+ },
+ })
+ await this.didRepository.save(agentContext, didRecord)
+
+ return {
+ didDocumentMetadata: {
+ qualifiedIndyDid,
+ },
+ didRegistrationMetadata: {
+ didIndyNamespace,
+ },
+ didState: {
+ state: 'finished',
+ did: qualifiedSovDid,
+ didDocument,
+ secret: {
+ // FIXME: the uni-registrar creates the seed in the registrar method
+ // if it doesn't exist so the seed can always be returned. Currently
+ // we can only return it if the seed was passed in by the user. Once
+ // we have a secure method for generating seeds we should use the same
+ // approach
+ seed: options.secret?.seed,
+ },
+ },
+ }
+ } catch (error) {
+ return {
+ didDocumentMetadata: {},
+ didRegistrationMetadata: {},
+ didState: {
+ state: 'failed',
+ reason: `unknownError: ${error.message}`,
+ },
+ }
+ }
+ }
+
+ public async update(): Promise {
+ return {
+ didDocumentMetadata: {},
+ didRegistrationMetadata: {},
+ didState: {
+ state: 'failed',
+ reason: `notImplemented: updating did:sov not implemented yet`,
+ },
+ }
+ }
+
+ public async deactivate(): Promise {
+ return {
+ didDocumentMetadata: {},
+ didRegistrationMetadata: {},
+ didState: {
+ state: 'failed',
+ reason: `notImplemented: deactivating did:sov not implemented yet`,
+ },
+ }
+ }
+
+ public async registerPublicDid(
+ agentContext: AgentContext,
+ submitterDid: string,
+ targetDid: string,
+ verkey: string,
+ alias: string,
+ pool: IndySdkPool,
+ role?: NymRole
+ ) {
+ try {
+ agentContext.config.logger.debug(`Register public did '${targetDid}' on ledger '${pool.didIndyNamespace}'`)
+
+ const request = await this.indySdk.buildNymRequest(submitterDid, targetDid, verkey, alias, role || null)
+
+ const response = await this.indySdkPoolService.submitWriteRequest(agentContext, pool, request, submitterDid)
+
+ agentContext.config.logger.debug(`Registered public did '${targetDid}' on ledger '${pool.didIndyNamespace}'`, {
+ response,
+ })
+
+ return targetDid
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error registering public did '${targetDid}' on ledger '${pool.didIndyNamespace}'`,
+ {
+ error,
+ submitterDid,
+ targetDid,
+ verkey,
+ alias,
+ role,
+ pool: pool.didIndyNamespace,
+ }
+ )
+
+ throw error
+ }
+ }
+
+ public async setEndpointsForDid(
+ agentContext: AgentContext,
+ did: string,
+ endpoints: IndyEndpointAttrib,
+ pool: IndySdkPool
+ ): Promise {
+ try {
+ agentContext.config.logger.debug(`Set endpoints for did '${did}' on ledger '${pool.didIndyNamespace}'`, endpoints)
+
+ const request = await this.indySdk.buildAttribRequest(did, did, null, { endpoint: endpoints }, null)
+
+ const response = await this.indySdkPoolService.submitWriteRequest(agentContext, pool, request, did)
+ agentContext.config.logger.debug(
+ `Successfully set endpoints for did '${did}' on ledger '${pool.didIndyNamespace}'`,
+ {
+ response,
+ endpoints,
+ }
+ )
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error setting endpoints for did '${did}' on ledger '${pool.didIndyNamespace}'`,
+ {
+ error,
+ did,
+ endpoints,
+ }
+ )
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+}
+
+export interface IndySdkSovDidCreateOptions extends DidCreateOptions {
+ method: 'sov'
+ did?: undefined
+ // As did:sov is so limited, we require everything needed to construct the did document to be passed
+ // through the options object. Once we support did:indy we can allow the didDocument property.
+ didDocument?: never
+ options: {
+ alias: string
+ role?: NymRole
+ endpoints?: IndyEndpointAttrib
+ indyNamespace?: string
+ submitterDid: string
+ }
+ secret?: {
+ seed?: string
+ }
+}
+
+// Update and Deactivate not supported for did:sov
+export type IndySdkSovDidUpdateOptions = never
+export type IndySdkSovDidDeactivateOptions = never
diff --git a/packages/indy-sdk/src/dids/IndySdkSovDidResolver.ts b/packages/indy-sdk/src/dids/IndySdkSovDidResolver.ts
new file mode 100644
index 0000000000..c4d584568c
--- /dev/null
+++ b/packages/indy-sdk/src/dids/IndySdkSovDidResolver.ts
@@ -0,0 +1,95 @@
+import type { IndyEndpointAttrib } from './didSovUtil'
+import type { DidResolutionResult, ParsedDid, DidResolver, AgentContext } from '@aries-framework/core'
+
+import { inject, injectable } from '@aries-framework/core'
+
+import { isIndyError, IndySdkError } from '../error'
+import { IndySdkPoolService } from '../ledger/IndySdkPoolService'
+import { IndySdkSymbol, IndySdk } from '../types'
+
+import { addServicesFromEndpointsAttrib, sovDidDocumentFromDid } from './didSovUtil'
+
+@injectable()
+export class IndySdkSovDidResolver implements DidResolver {
+ private indySdk: IndySdk
+ private indySdkPoolService: IndySdkPoolService
+
+ public constructor(indyPoolService: IndySdkPoolService, @inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ this.indySdkPoolService = indyPoolService
+ }
+
+ public readonly supportedMethods = ['sov']
+
+ public async resolve(agentContext: AgentContext, did: string, parsed: ParsedDid): Promise {
+ const didDocumentMetadata = {}
+
+ try {
+ const nym = await this.getPublicDid(agentContext, parsed.id)
+ const endpoints = await this.getEndpointsForDid(agentContext, parsed.id)
+
+ const keyAgreementId = `${parsed.did}#key-agreement-1`
+ const builder = sovDidDocumentFromDid(parsed.did, nym.verkey)
+ addServicesFromEndpointsAttrib(builder, parsed.did, endpoints, keyAgreementId)
+
+ return {
+ didDocument: builder.build(),
+ didDocumentMetadata,
+ didResolutionMetadata: { contentType: 'application/did+ld+json' },
+ }
+ } catch (error) {
+ return {
+ didDocument: null,
+ didDocumentMetadata,
+ didResolutionMetadata: {
+ error: 'notFound',
+ message: `resolver_error: Unable to resolve did '${did}': ${error}`,
+ },
+ }
+ }
+ }
+
+ private async getPublicDid(agentContext: AgentContext, did: string) {
+ // Getting the pool for a did also retrieves the DID. We can just use that
+ const { did: didResponse } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+
+ return didResponse
+ }
+
+ private async getEndpointsForDid(agentContext: AgentContext, did: string) {
+ const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+
+ try {
+ agentContext.config.logger.debug(`Get endpoints for did '${did}' from ledger '${pool.didIndyNamespace}'`)
+
+ const request = await this.indySdk.buildGetAttribRequest(null, did, 'endpoint', null, null)
+
+ agentContext.config.logger.debug(
+ `Submitting get endpoint ATTRIB request for did '${did}' to ledger '${pool.didIndyNamespace}'`
+ )
+ const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+
+ if (!response.result.data) return {}
+
+ const endpoints = JSON.parse(response.result.data as string)?.endpoint as IndyEndpointAttrib
+ agentContext.config.logger.debug(
+ `Got endpoints '${JSON.stringify(endpoints)}' for did '${did}' from ledger '${pool.didIndyNamespace}'`,
+ {
+ response,
+ endpoints,
+ }
+ )
+
+ return endpoints ?? {}
+ } catch (error) {
+ agentContext.config.logger.error(
+ `Error retrieving endpoints for did '${did}' from ledger '${pool.didIndyNamespace}'`,
+ {
+ error,
+ }
+ )
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/dids/didSovUtil.ts b/packages/indy-sdk/src/dids/didSovUtil.ts
new file mode 100644
index 0000000000..b5af6ee3f0
--- /dev/null
+++ b/packages/indy-sdk/src/dids/didSovUtil.ts
@@ -0,0 +1,132 @@
+import {
+ TypedArrayEncoder,
+ DidDocumentService,
+ DidDocumentBuilder,
+ DidCommV1Service,
+ DidCommV2Service,
+ convertPublicKeyToX25519,
+} from '@aries-framework/core'
+
+import { getFullVerkey } from '../utils/did'
+
+export interface IndyEndpointAttrib {
+ endpoint?: string
+ types?: Array<'endpoint' | 'did-communication' | 'DIDComm'>
+ routingKeys?: string[]
+ [key: string]: unknown
+}
+
+export function sovDidDocumentFromDid(fullDid: string, verkey: string) {
+ const verificationMethodId = `${fullDid}#key-1`
+ const keyAgreementId = `${fullDid}#key-agreement-1`
+
+ const publicKeyBase58 = getFullVerkey(fullDid, verkey)
+ const publicKeyX25519 = TypedArrayEncoder.toBase58(
+ convertPublicKeyToX25519(TypedArrayEncoder.fromBase58(publicKeyBase58))
+ )
+
+ const builder = new DidDocumentBuilder(fullDid)
+ .addContext('https://w3id.org/security/suites/ed25519-2018/v1')
+ .addContext('https://w3id.org/security/suites/x25519-2019/v1')
+ .addVerificationMethod({
+ controller: fullDid,
+ id: verificationMethodId,
+ publicKeyBase58: publicKeyBase58,
+ type: 'Ed25519VerificationKey2018',
+ })
+ .addVerificationMethod({
+ controller: fullDid,
+ id: keyAgreementId,
+ publicKeyBase58: publicKeyX25519,
+ type: 'X25519KeyAgreementKey2019',
+ })
+ .addAuthentication(verificationMethodId)
+ .addAssertionMethod(verificationMethodId)
+ .addKeyAgreement(keyAgreementId)
+
+ return builder
+}
+
+// Process Indy Attrib Endpoint Types according to: https://sovrin-foundation.github.io/sovrin/spec/did-method-spec-template.html > Read (Resolve) > DID Service Endpoint
+function processEndpointTypes(types?: string[]) {
+ const expectedTypes = ['endpoint', 'did-communication', 'DIDComm']
+ const defaultTypes = ['endpoint', 'did-communication']
+
+ // Return default types if types "is NOT present [or] empty"
+ if (!types || types.length <= 0) {
+ return defaultTypes
+ }
+
+ // Return default types if types "contain any other values"
+ for (const type of types) {
+ if (!expectedTypes.includes(type)) {
+ return defaultTypes
+ }
+ }
+
+ // Return provided types
+ return types
+}
+
+export function addServicesFromEndpointsAttrib(
+ builder: DidDocumentBuilder,
+ did: string,
+ endpoints: IndyEndpointAttrib,
+ keyAgreementId: string
+) {
+ const { endpoint, routingKeys, types, ...otherEndpoints } = endpoints
+
+ if (endpoint) {
+ const processedTypes = processEndpointTypes(types)
+
+ // If 'endpoint' included in types, add id to the services array
+ if (processedTypes.includes('endpoint')) {
+ builder.addService(
+ new DidDocumentService({
+ id: `${did}#endpoint`,
+ serviceEndpoint: endpoint,
+ type: 'endpoint',
+ })
+ )
+ }
+
+ // If 'did-communication' included in types, add DIDComm v1 entry
+ if (processedTypes.includes('did-communication')) {
+ builder.addService(
+ new DidCommV1Service({
+ id: `${did}#did-communication`,
+ serviceEndpoint: endpoint,
+ priority: 0,
+ routingKeys: routingKeys ?? [],
+ recipientKeys: [keyAgreementId],
+ accept: ['didcomm/aip2;env=rfc19'],
+ })
+ )
+
+ // If 'DIDComm' included in types, add DIDComm v2 entry
+ if (processedTypes.includes('DIDComm')) {
+ builder
+ .addService(
+ new DidCommV2Service({
+ id: `${did}#didcomm-1`,
+ serviceEndpoint: endpoint,
+ routingKeys: routingKeys ?? [],
+ accept: ['didcomm/v2'],
+ })
+ )
+ .addContext('https://didcomm.org/messaging/contexts/v2')
+ }
+ }
+ }
+
+ // Add other endpoint types
+ for (const [type, endpoint] of Object.entries(otherEndpoints)) {
+ builder.addService(
+ new DidDocumentService({
+ id: `${did}#${type}`,
+ serviceEndpoint: endpoint as string,
+ type,
+ })
+ )
+ }
+}
diff --git a/packages/indy-sdk/src/dids/index.ts b/packages/indy-sdk/src/dids/index.ts
new file mode 100644
index 0000000000..68eabe204d
--- /dev/null
+++ b/packages/indy-sdk/src/dids/index.ts
@@ -0,0 +1,7 @@
+export {
+ IndySdkSovDidRegistrar,
+ IndySdkSovDidCreateOptions,
+ IndySdkSovDidDeactivateOptions,
+ IndySdkSovDidUpdateOptions,
+} from './IndySdkSovDidRegistrar'
+export { IndySdkSovDidResolver } from './IndySdkSovDidResolver'
diff --git a/packages/indy-sdk/src/error/IndySdkError.ts b/packages/indy-sdk/src/error/IndySdkError.ts
new file mode 100644
index 0000000000..4b67802a9a
--- /dev/null
+++ b/packages/indy-sdk/src/error/IndySdkError.ts
@@ -0,0 +1,11 @@
+import type { IndyError } from './indyError'
+
+import { AriesFrameworkError } from '@aries-framework/core'
+
+export class IndySdkError extends AriesFrameworkError {
+ public constructor(indyError: IndyError, message?: string) {
+ const base = `${indyError.name}(${indyError.indyName}): ${indyError.message}`
+
+ super(message ? `${message}: ${base}` : base, { cause: indyError })
+ }
+}
diff --git a/packages/indy-sdk/src/error/index.ts b/packages/indy-sdk/src/error/index.ts
new file mode 100644
index 0000000000..5829a46d0a
--- /dev/null
+++ b/packages/indy-sdk/src/error/index.ts
@@ -0,0 +1,2 @@
+export * from './IndySdkError'
+export * from './indyError'
diff --git a/packages/indy-sdk/src/error/indyError.ts b/packages/indy-sdk/src/error/indyError.ts
new file mode 100644
index 0000000000..5d67cfdbf1
--- /dev/null
+++ b/packages/indy-sdk/src/error/indyError.ts
@@ -0,0 +1,100 @@
+import { AriesFrameworkError } from '@aries-framework/core'
+
+export const indyErrors = {
+ 100: 'CommonInvalidParam1',
+ 101: 'CommonInvalidParam2',
+ 102: 'CommonInvalidParam3',
+ 103: 'CommonInvalidParam4',
+ 104: 'CommonInvalidParam5',
+ 105: 'CommonInvalidParam6',
+ 106: 'CommonInvalidParam7',
+ 107: 'CommonInvalidParam8',
+ 108: 'CommonInvalidParam9',
+ 109: 'CommonInvalidParam10',
+ 110: 'CommonInvalidParam11',
+ 111: 'CommonInvalidParam12',
+ 112: 'CommonInvalidState',
+ 113: 'CommonInvalidStructure',
+ 114: 'CommonIOError',
+ 115: 'CommonInvalidParam13',
+ 116: 'CommonInvalidParam14',
+ 200: 'WalletInvalidHandle',
+ 201: 'WalletUnknownTypeError',
+ 202: 'WalletTypeAlreadyRegisteredError',
+ 203: 'WalletAlreadyExistsError',
+ 204: 'WalletNotFoundError',
+ 205: 'WalletIncompatiblePoolError',
+ 206: 'WalletAlreadyOpenedError',
+ 207: 'WalletAccessFailed',
+ 208: 'WalletInputError',
+ 209: 'WalletDecodingError',
+ 210: 'WalletStorageError',
+ 211: 'WalletEncryptionError',
+ 212: 'WalletItemNotFound',
+ 213: 'WalletItemAlreadyExists',
+ 214: 'WalletQueryError',
+ 300: 'PoolLedgerNotCreatedError',
+ 301: 'PoolLedgerInvalidPoolHandle',
+ 302: 'PoolLedgerTerminated',
+ 303: 'LedgerNoConsensusError',
+ 304: 'LedgerInvalidTransaction',
+ 305: 'LedgerSecurityError',
+ 306: 'PoolLedgerConfigAlreadyExistsError',
+ 307: 'PoolLedgerTimeout',
+ 308: 'PoolIncompatibleProtocolVersion',
+ 309: 'LedgerNotFound',
+ 400: 'AnoncredsRevocationRegistryFullError',
+ 401: 'AnoncredsInvalidUserRevocId',
+ 404: 'AnoncredsMasterSecretDuplicateNameError',
+ 405: 'AnoncredsProofRejected',
+ 406: 'AnoncredsCredentialRevoked',
+ 407: 'AnoncredsCredDefAlreadyExistsError',
+ 500: 'UnknownCryptoTypeError',
+ 600: 'DidAlreadyExistsError',
+ 700: 'PaymentUnknownMethodError',
+ 701: 'PaymentIncompatibleMethodsError',
+ 702: 'PaymentInsufficientFundsError',
+ 703: 'PaymentSourceDoesNotExistError',
+ 704: 'PaymentOperationNotSupportedError',
+ 705: 'PaymentExtraFundsError',
+ 706: 'TransactionNotAllowedError',
+} as const
+
+type IndyErrorValues = typeof indyErrors[keyof typeof indyErrors]
+
+export interface IndyError {
+ name: 'IndyError'
+ message: string
+ indyName?: string
+}
+
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export function isIndyError(error: any, errorName?: IndyErrorValues): error is IndyError {
+ if (typeof error !== 'object' || error === null) return false
+
+ const indyError = error.name === 'IndyError'
+
+ // if no specific indy error name is passed
+ // or the error is no indy error
+ // we can already return
+ if (!indyError || !errorName) return indyError
+
+ // NodeJS Wrapper is missing some type names. When a type is missing it will
+ // only have the error code as string in the message field
+ // Until that is fixed we take that into account to make AFJ work with rn-indy-sdk
+ // See: https://github.com/AbsaOSS/rn-indy-sdk/pull/24
+ // See: https://github.com/hyperledger/indy-sdk/pull/2283
+ if (!error.indyName) {
+ const errorCode = Number(error.message)
+ if (!isNaN(errorCode) && Object.prototype.hasOwnProperty.call(indyErrors, errorCode)) {
+ // We already check if the property is set. We can safely ignore this typescript error
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ return errorName === indyErrors[errorCode]
+ }
+
+ throw new AriesFrameworkError(`Could not determine errorName of indyError ${error.message}`)
+ }
+
+ return error.indyName === errorName
+}
diff --git a/packages/indy-sdk/src/index.ts b/packages/indy-sdk/src/index.ts
new file mode 100644
index 0000000000..ea099b7cf4
--- /dev/null
+++ b/packages/indy-sdk/src/index.ts
@@ -0,0 +1,26 @@
+// Dids
+export {
+ IndySdkSovDidRegistrar,
+ IndySdkSovDidCreateOptions,
+ IndySdkSovDidDeactivateOptions,
+ IndySdkSovDidUpdateOptions,
+ IndySdkSovDidResolver,
+} from './dids'
+
+// Wallet
+export { IndySdkWallet } from './wallet'
+
+// Storage
+export { IndySdkStorageService } from './storage'
+
+// AnonCreds
+export {
+ IndySdkAnonCredsRegistry,
+ IndySdkHolderService,
+ IndySdkIssuerService,
+ IndySdkVerifierService,
+} from './anoncreds'
+
+// Module
+export { IndySdkModule } from './IndySdkModule'
+export { IndySdkModuleConfig } from './IndySdkModuleConfig'
diff --git a/packages/indy-sdk/src/ledger/IndySdkPool.ts b/packages/indy-sdk/src/ledger/IndySdkPool.ts
new file mode 100644
index 0000000000..a24a1c7ba5
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/IndySdkPool.ts
@@ -0,0 +1,208 @@
+import type { IndySdk } from '../types'
+import type { FileSystem, Logger } from '@aries-framework/core'
+import type { LedgerReadReplyResponse, LedgerRequest, LedgerWriteReplyResponse } from 'indy-sdk'
+import type { Subject } from 'rxjs'
+
+import { AriesFrameworkError } from '@aries-framework/core'
+
+import { isIndyError, IndySdkError } from '../error'
+
+import { IndySdkPoolError } from './error'
+import { isLedgerRejectResponse, isLedgerReqnackResponse } from './util'
+
+export interface TransactionAuthorAgreement {
+ version: `${number}.${number}` | `${number}`
+ acceptanceMechanism: string
+}
+
+export interface IndySdkPoolConfig {
+ genesisPath?: string
+ genesisTransactions?: string
+ id: string
+ isProduction: boolean
+ indyNamespace: string
+ transactionAuthorAgreement?: TransactionAuthorAgreement
+}
+
+export class IndySdkPool {
+ private indySdk: IndySdk
+ private logger: Logger
+ private fileSystem: FileSystem
+ private poolConfig: IndySdkPoolConfig
+ private _poolHandle?: number
+ private poolConnected?: Promise
+ public authorAgreement?: AuthorAgreement | null
+
+ public constructor(
+ poolConfig: IndySdkPoolConfig,
+ indySdk: IndySdk,
+ logger: Logger,
+ stop$: Subject,
+ fileSystem: FileSystem
+ ) {
+ this.indySdk = indySdk
+ this.fileSystem = fileSystem
+ this.poolConfig = poolConfig
+ this.logger = logger
+
+ // Listen to stop$ (shutdown) and close pool
+ stop$.subscribe(async () => {
+ if (this._poolHandle) {
+ await this.close()
+ }
+ })
+ }
+
+ public get didIndyNamespace(): string {
+ return this.didIndyNamespace
+ }
+
+ public get id() {
+ return this.poolConfig.id
+ }
+
+ public get config() {
+ return this.poolConfig
+ }
+
+ public async close() {
+ const poolHandle = this._poolHandle
+
+ if (!poolHandle) {
+ return
+ }
+
+ this._poolHandle = undefined
+ this.poolConnected = undefined
+
+ await this.indySdk.closePoolLedger(poolHandle)
+ }
+
+ public async delete() {
+ // Close the pool if currently open
+ if (this._poolHandle) {
+ await this.close()
+ }
+
+ await this.indySdk.deletePoolLedgerConfig(this.poolConfig.id)
+ }
+
+ public async connect() {
+ if (!this.poolConnected) {
+ // Save the promise of connectToLedger to determine if we are done connecting
+ this.poolConnected = this.connectToLedger()
+ this.poolConnected.catch((error) => {
+ // Set poolConnected to undefined so we can retry connection upon failure
+ this.poolConnected = undefined
+ this.logger.error('Connection to pool: ' + this.poolConfig.genesisPath + ' failed.', { error })
+ })
+ return this.poolConnected
+ } else {
+ throw new AriesFrameworkError('Cannot attempt connection to ledger, already connecting.')
+ }
+ }
+
+ private async connectToLedger() {
+ const poolName = this.poolConfig.id
+ const genesisPath = await this.getGenesisPath()
+
+ if (!genesisPath) {
+ throw new AriesFrameworkError('Cannot connect to ledger without genesis file')
+ }
+
+ this.logger.debug(`Connecting to ledger pool '${poolName}'`, { genesisPath })
+ await this.indySdk.setProtocolVersion(2)
+
+ try {
+ this._poolHandle = await this.indySdk.openPoolLedger(poolName)
+ return this._poolHandle
+ } catch (error) {
+ if (!isIndyError(error, 'PoolLedgerNotCreatedError')) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ this.logger.debug(`Pool '${poolName}' does not exist yet, creating.`, {
+ indyError: 'PoolLedgerNotCreatedError',
+ })
+ try {
+ await this.indySdk.createPoolLedgerConfig(poolName, { genesis_txn: genesisPath })
+ this._poolHandle = await this.indySdk.openPoolLedger(poolName)
+ return this._poolHandle
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async submitRequest(request: LedgerRequest) {
+ return this.indySdk.submitRequest(await this.getPoolHandle(), request)
+ }
+
+ public async submitReadRequest(request: LedgerRequest) {
+ const response = await this.submitRequest(request)
+
+ if (isLedgerRejectResponse(response) || isLedgerReqnackResponse(response)) {
+ throw new IndySdkPoolError(`Ledger '${this.id}' rejected read transaction request: ${response.reason}`)
+ }
+
+ return response as LedgerReadReplyResponse
+ }
+
+ public async submitWriteRequest(request: LedgerRequest) {
+ const response = await this.submitRequest(request)
+
+ if (isLedgerRejectResponse(response) || isLedgerReqnackResponse(response)) {
+ throw new IndySdkPoolError(`Ledger '${this.id}' rejected write transaction request: ${response.reason}`)
+ }
+
+ return response as LedgerWriteReplyResponse
+ }
+
+ private async getPoolHandle() {
+ if (this.poolConnected) {
+ // If we have tried to already connect to pool wait for it
+ try {
+ await this.poolConnected
+ } catch (error) {
+ this.logger.error('Connection to pool: ' + this.poolConfig.genesisPath + ' failed.', { error })
+ }
+ }
+
+ if (!this._poolHandle) {
+ return this.connect()
+ }
+
+ return this._poolHandle
+ }
+
+ private async getGenesisPath() {
+ // If the path is already provided return it
+ if (this.poolConfig.genesisPath) return this.poolConfig.genesisPath
+
+ // Determine the genesisPath
+ const genesisPath = this.fileSystem.basePath + `/afj/genesis-${this.poolConfig.id}.txn`
+ // Store genesis data if provided
+ if (this.poolConfig.genesisTransactions) {
+ await this.fileSystem.write(genesisPath, this.poolConfig.genesisTransactions)
+ this.poolConfig.genesisPath = genesisPath
+ return genesisPath
+ }
+
+ // No genesisPath
+ return null
+ }
+}
+
+export interface AuthorAgreement {
+ digest: string
+ version: string
+ text: string
+ ratification_ts: number
+ acceptanceMechanisms: AcceptanceMechanisms
+}
+
+export interface AcceptanceMechanisms {
+ aml: Record
+ amlContext: string
+ version: string
+}
diff --git a/packages/indy-sdk/src/ledger/IndySdkPoolService.ts b/packages/indy-sdk/src/ledger/IndySdkPoolService.ts
new file mode 100644
index 0000000000..773b7db2cc
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/IndySdkPoolService.ts
@@ -0,0 +1,338 @@
+import type { AcceptanceMechanisms, AuthorAgreement, IndySdkPoolConfig } from './IndySdkPool'
+import type { AgentContext } from '@aries-framework/core'
+import type { GetNymResponse, LedgerReadReplyResponse, LedgerRequest, LedgerWriteReplyResponse } from 'indy-sdk'
+
+import {
+ InjectionSymbols,
+ Logger,
+ injectable,
+ inject,
+ FileSystem,
+ CacheRepository,
+ PersistedLruCache,
+} from '@aries-framework/core'
+import { Subject } from 'rxjs'
+
+import { IndySdkError, isIndyError } from '../error'
+import { IndySdk } from '../types'
+import { assertIndySdkWallet } from '../utils/assertIndySdkWallet'
+import { isSelfCertifiedDid } from '../utils/did'
+import { allSettled, onlyFulfilled, onlyRejected } from '../utils/promises'
+
+import { IndySdkPool } from './IndySdkPool'
+import { IndySdkPoolError, IndySdkPoolNotConfiguredError, IndySdkPoolNotFoundError } from './error'
+
+export const INDY_SDK_DID_POOL_CACHE_ID = 'INDY_SDK_DID_POOL_CACHE'
+export const INDY_SDK_DID_POOL_CACHE_LIMIT = 500
+export interface CachedDidResponse {
+ nymResponse: GetNymResponse
+ poolId: string
+}
+
+@injectable()
+export class IndySdkPoolService {
+ public pools: IndySdkPool[] = []
+ private logger: Logger
+ private indySdk: IndySdk
+ private stop$: Subject
+ private fileSystem: FileSystem
+ private didCache: PersistedLruCache
+
+ public constructor(
+ cacheRepository: CacheRepository,
+ indySdk: IndySdk,
+ @inject(InjectionSymbols.Logger) logger: Logger,
+ @inject(InjectionSymbols.Stop$) stop$: Subject,
+ @inject(InjectionSymbols.FileSystem) fileSystem: FileSystem
+ ) {
+ this.logger = logger
+ this.indySdk = indySdk
+ this.fileSystem = fileSystem
+ this.stop$ = stop$
+
+ this.didCache = new PersistedLruCache(INDY_SDK_DID_POOL_CACHE_ID, INDY_SDK_DID_POOL_CACHE_LIMIT, cacheRepository)
+ }
+
+ public setPools(poolConfigs: IndySdkPoolConfig[]) {
+ this.pools = poolConfigs.map(
+ (poolConfig) => new IndySdkPool(poolConfig, this.indySdk, this.logger, this.stop$, this.fileSystem)
+ )
+ }
+
+ /**
+ * Create connections to all ledger pools
+ */
+ public async connectToPools() {
+ const handleArray: number[] = []
+ // Sequentially connect to pools so we don't use up too many resources connecting in parallel
+ for (const pool of this.pools) {
+ this.logger.debug(`Connecting to pool: ${pool.id}`)
+ const poolHandle = await pool.connect()
+ this.logger.debug(`Finished connection to pool: ${pool.id}`)
+ handleArray.push(poolHandle)
+ }
+ return handleArray
+ }
+
+ /**
+ * Get the most appropriate pool for the given did. The algorithm is based on the approach as described in this document:
+ * https://docs.google.com/document/d/109C_eMsuZnTnYe2OAd02jAts1vC4axwEKIq7_4dnNVA/edit
+ */
+ public async getPoolForDid(
+ agentContext: AgentContext,
+ did: string
+ ): Promise<{ pool: IndySdkPool; did: GetNymResponse }> {
+ const pools = this.pools
+
+ if (pools.length === 0) {
+ throw new IndySdkPoolNotConfiguredError(
+ "No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
+ )
+ }
+
+ const cachedNymResponse = await this.didCache.get(agentContext, did)
+ const pool = this.pools.find((pool) => pool.id === cachedNymResponse?.poolId)
+
+ // If we have the nym response with associated pool in the cache, we'll use that
+ if (cachedNymResponse && pool) {
+ this.logger.trace(`Found ledger id '${pool.id}' for did '${did}' in cache`)
+ return { did: cachedNymResponse.nymResponse, pool }
+ }
+
+ const { successful, rejected } = await this.getSettledDidResponsesFromPools(did, pools)
+
+ if (successful.length === 0) {
+ const allNotFound = rejected.every((e) => e.reason instanceof IndySdkPoolNotFoundError)
+ const rejectedOtherThanNotFound = rejected.filter((e) => !(e.reason instanceof IndySdkPoolNotFoundError))
+
+ // All ledgers returned response that the did was not found
+ if (allNotFound) {
+ throw new IndySdkPoolNotFoundError(`Did '${did}' not found on any of the ledgers (total ${this.pools.length}).`)
+ }
+
+ // one or more of the ledgers returned an unknown error
+ throw new IndySdkPoolError(
+ `Unknown error retrieving did '${did}' from '${rejectedOtherThanNotFound.length}' of '${pools.length}' ledgers`,
+ { cause: rejectedOtherThanNotFound[0].reason }
+ )
+ }
+
+ // If there are self certified DIDs we always prefer it over non self certified DIDs
+ // We take the first self certifying DID as we take the order in the
+ // indyLedgers config as the order of preference of ledgers
+ let value = successful.find((response) =>
+ isSelfCertifiedDid(response.value.did.did, response.value.did.verkey)
+ )?.value
+
+ if (!value) {
+ // Split between production and nonProduction ledgers. If there is at least one
+ // successful response from a production ledger, only keep production ledgers
+ // otherwise we only keep the non production ledgers.
+ const production = successful.filter((s) => s.value.pool.config.isProduction)
+ const nonProduction = successful.filter((s) => !s.value.pool.config.isProduction)
+ const productionOrNonProduction = production.length >= 1 ? production : nonProduction
+
+ // We take the first value as we take the order in the indyLedgers config as
+ // the order of preference of ledgers
+ value = productionOrNonProduction[0].value
+ }
+
+ await this.didCache.set(agentContext, did, {
+ nymResponse: value.did,
+ poolId: value.pool.id,
+ })
+ return { pool: value.pool, did: value.did }
+ }
+
+ private async getSettledDidResponsesFromPools(did: string, pools: IndySdkPool[]) {
+ this.logger.trace(`Retrieving did '${did}' from ${pools.length} ledgers`)
+ const didResponses = await allSettled(pools.map((pool) => this.getDidFromPool(did, pool)))
+
+ const successful = onlyFulfilled(didResponses)
+ this.logger.trace(`Retrieved ${successful.length} responses from ledgers for did '${did}'`)
+
+ const rejected = onlyRejected(didResponses)
+
+ return {
+ rejected,
+ successful,
+ }
+ }
+
+ /**
+ * Get the most appropriate pool for the given indyNamespace
+ */
+ public getPoolForNamespace(indyNamespace?: string) {
+ if (this.pools.length === 0) {
+ throw new IndySdkPoolNotConfiguredError(
+ "No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
+ )
+ }
+
+ if (!indyNamespace) {
+ this.logger.warn('Not passing the indyNamespace is deprecated and will be removed in the future version.')
+ return this.pools[0]
+ }
+
+ const pool = this.pools.find((pool) => pool.didIndyNamespace === indyNamespace)
+
+ if (!pool) {
+ throw new IndySdkPoolNotFoundError(`No ledgers found for IndyNamespace '${indyNamespace}'.`)
+ }
+
+ return pool
+ }
+
+ public async submitWriteRequest(
+ agentContext: AgentContext,
+ pool: IndySdkPool,
+ request: LedgerRequest,
+ signDid: string
+ ): Promise {
+ try {
+ const requestWithTaa = await this.appendTaa(pool, request)
+ const signedRequestWithTaa = await this.signRequest(agentContext, signDid, requestWithTaa)
+
+ const response = await pool.submitWriteRequest(signedRequestWithTaa)
+
+ return response
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async submitReadRequest(pool: IndySdkPool, request: LedgerRequest): Promise {
+ try {
+ const response = await pool.submitReadRequest(request)
+
+ return response
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async signRequest(agentContext: AgentContext, did: string, request: LedgerRequest): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ return this.indySdk.signRequest(agentContext.wallet.handle, did, request)
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async appendTaa(pool: IndySdkPool, request: LedgerRequest) {
+ try {
+ const authorAgreement = await this.getTransactionAuthorAgreement(pool)
+ const taa = pool.config.transactionAuthorAgreement
+
+ // If ledger does not have TAA, we can just send request
+ if (authorAgreement == null) {
+ return request
+ }
+ // Ledger has taa but user has not specified which one to use
+ if (!taa) {
+ throw new IndySdkPoolError(
+ `Please, specify a transaction author agreement with version and acceptance mechanism. ${JSON.stringify(
+ authorAgreement
+ )}`
+ )
+ }
+
+ // Throw an error if the pool doesn't have the specified version and acceptance mechanism
+ if (
+ authorAgreement.version !== taa.version ||
+ !(taa.acceptanceMechanism in authorAgreement.acceptanceMechanisms.aml)
+ ) {
+ // Throw an error with a helpful message
+ const errMessage = `Unable to satisfy matching TAA with mechanism ${JSON.stringify(
+ taa.acceptanceMechanism
+ )} and version ${JSON.stringify(taa.version)} in pool.\n Found ${JSON.stringify(
+ Object.keys(authorAgreement.acceptanceMechanisms.aml)
+ )} and version ${authorAgreement.version} in pool.`
+ throw new IndySdkPoolError(errMessage)
+ }
+
+ const requestWithTaa = await this.indySdk.appendTxnAuthorAgreementAcceptanceToRequest(
+ request,
+ authorAgreement.text,
+ taa.version,
+ authorAgreement.digest,
+ taa.acceptanceMechanism,
+ // Current time since epoch
+ // We can't use ratification_ts, as it must be greater than 1499906902
+ Math.floor(new Date().getTime() / 1000)
+ )
+
+ return requestWithTaa
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async getTransactionAuthorAgreement(pool: IndySdkPool): Promise {
+ try {
+ // TODO Replace this condition with memoization
+ if (pool.authorAgreement !== undefined) {
+ return pool.authorAgreement
+ }
+
+ const taaRequest = await this.indySdk.buildGetTxnAuthorAgreementRequest(null)
+ const taaResponse = await this.submitReadRequest(pool, taaRequest)
+ const acceptanceMechanismRequest = await this.indySdk.buildGetAcceptanceMechanismsRequest(null)
+ const acceptanceMechanismResponse = await this.submitReadRequest(pool, acceptanceMechanismRequest)
+
+ // TAA can be null
+ if (taaResponse.result.data == null) {
+ pool.authorAgreement = null
+ return null
+ }
+
+ // If TAA is not null, we can be sure AcceptanceMechanisms is also not null
+ const authorAgreement = taaResponse.result.data as AuthorAgreement
+ const acceptanceMechanisms = acceptanceMechanismResponse.result.data as AcceptanceMechanisms
+ pool.authorAgreement = {
+ ...authorAgreement,
+ acceptanceMechanisms,
+ }
+ return pool.authorAgreement
+ } catch (error) {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async getDidFromPool(did: string, pool: IndySdkPool): Promise {
+ try {
+ this.logger.trace(`Get public did '${did}' from ledger '${pool.id}'`)
+ const request = await this.indySdk.buildGetNymRequest(null, did)
+
+ this.logger.trace(`Submitting get did request for did '${did}' to ledger '${pool.id}'`)
+ const response = await pool.submitReadRequest(request)
+
+ const result = await this.indySdk.parseGetNymResponse(response)
+ this.logger.trace(`Retrieved did '${did}' from ledger '${pool.id}'`, result)
+
+ return {
+ did: result,
+ pool,
+ response,
+ }
+ } catch (error) {
+ this.logger.trace(`Error retrieving did '${did}' from ledger '${pool.id}'`, {
+ error,
+ did,
+ })
+ if (isIndyError(error, 'LedgerNotFound')) {
+ throw new IndySdkPoolNotFoundError(`Did '${did}' not found on ledger ${pool.id}`)
+ } else {
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+ }
+}
+
+export interface PublicDidRequest {
+ did: GetNymResponse
+ pool: IndySdkPool
+ response: LedgerReadReplyResponse
+}
diff --git a/packages/indy-sdk/src/ledger/__tests__/IndySdkPoolService.test.ts b/packages/indy-sdk/src/ledger/__tests__/IndySdkPoolService.test.ts
new file mode 100644
index 0000000000..74debe2656
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/__tests__/IndySdkPoolService.test.ts
@@ -0,0 +1,444 @@
+import type { IndySdkPoolConfig } from '../IndySdkPool'
+import type { CachedDidResponse } from '../IndySdkPoolService'
+import type { AgentContext } from '@aries-framework/core'
+
+import { SigningProviderRegistry, AriesFrameworkError } from '@aries-framework/core'
+import { Subject } from 'rxjs'
+
+import { CacheRecord } from '../../../../core/src/cache'
+import { CacheRepository } from '../../../../core/src/cache/CacheRepository'
+import { getDidResponsesForDid } from '../../../../core/src/modules/ledger/__tests__/didResponses'
+import { agentDependencies, getAgentConfig, getAgentContext, mockFunction } from '../../../../core/tests/helpers'
+import { NodeFileSystem } from '../../../../node/src/NodeFileSystem'
+import { IndySdkWallet } from '../../wallet/IndySdkWallet'
+import { INDY_SDK_DID_POOL_CACHE_ID, IndySdkPoolService } from '../IndySdkPoolService'
+import { IndySdkPoolError, IndySdkPoolNotConfiguredError, IndySdkPoolNotFoundError } from '../error'
+
+jest.mock('../../../../core/src/cache/CacheRepository')
+const CacheRepositoryMock = CacheRepository as jest.Mock
+
+const pools: IndySdkPoolConfig[] = [
+ {
+ id: 'sovrinMain',
+ indyNamespace: 'sovrin',
+ isProduction: true,
+ genesisTransactions: 'xxx',
+ transactionAuthorAgreement: { version: '1', acceptanceMechanism: 'accept' },
+ },
+ {
+ id: 'sovrinBuilder',
+ indyNamespace: 'sovrin:builder',
+ isProduction: false,
+ genesisTransactions: 'xxx',
+ transactionAuthorAgreement: { version: '1', acceptanceMechanism: 'accept' },
+ },
+ {
+ id: 'sovringStaging',
+ indyNamespace: 'sovrin:staging',
+ isProduction: false,
+ genesisTransactions: 'xxx',
+ transactionAuthorAgreement: { version: '1', acceptanceMechanism: 'accept' },
+ },
+ {
+ id: 'indicioMain',
+ indyNamespace: 'indicio',
+ isProduction: true,
+ genesisTransactions: 'xxx',
+ transactionAuthorAgreement: { version: '1', acceptanceMechanism: 'accept' },
+ },
+ {
+ id: 'bcovrinTest',
+ indyNamespace: 'bcovrin:test',
+ isProduction: false,
+ genesisTransactions: 'xxx',
+ transactionAuthorAgreement: { version: '1', acceptanceMechanism: 'accept' },
+ },
+]
+
+describe('IndySdkPoolService', () => {
+ const config = getAgentConfig('IndySdkPoolServiceTest', {
+ indyLedgers: pools,
+ })
+ let agentContext: AgentContext
+ let wallet: IndySdkWallet
+ let poolService: IndySdkPoolService
+ let cacheRepository: CacheRepository
+
+ beforeAll(async () => {
+ wallet = new IndySdkWallet(config.agentDependencies.indy, config.logger, new SigningProviderRegistry([]))
+ agentContext = getAgentContext()
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ await wallet.createAndOpen(config.walletConfig!)
+ })
+
+ afterAll(async () => {
+ await wallet.delete()
+ })
+
+ beforeEach(async () => {
+ cacheRepository = new CacheRepositoryMock()
+ mockFunction(cacheRepository.findById).mockResolvedValue(null)
+
+ poolService = new IndySdkPoolService(
+ cacheRepository,
+ agentDependencies.indy,
+ config.logger,
+ new Subject(),
+ new NodeFileSystem()
+ )
+
+ poolService.setPools(pools)
+ })
+
+ describe('getPoolForDid', () => {
+ it('should throw a IndySdkPoolNotConfiguredError error if no pools are configured on the pool service', async () => {
+ poolService.setPools([])
+
+ expect(poolService.getPoolForDid(agentContext, 'some-did')).rejects.toThrow(IndySdkPoolNotConfiguredError)
+ })
+
+ it('should throw a IndySdkPoolError if all ledger requests throw an error other than NotFoundError', async () => {
+ const did = 'Y5bj4SjCiTM9PgeheKAiXx'
+
+ poolService.pools.forEach((pool) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(() => Promise.reject(new AriesFrameworkError('Something went wrong')))
+ })
+
+ expect(poolService.getPoolForDid(agentContext, did)).rejects.toThrowError(IndySdkPoolError)
+ })
+
+ it('should throw a IndySdkPoolNotFoundError if all pools did not find the did on the ledger', async () => {
+ const did = 'Y5bj4SjCiTM9PgeheKAiXx'
+ // Not found on any of the ledgers
+ const responses = getDidResponsesForDid(did, pools, {})
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ expect(poolService.getPoolForDid(agentContext, did)).rejects.toThrowError(IndySdkPoolNotFoundError)
+ })
+
+ it('should return the pool if the did was only found on one ledger', async () => {
+ const did = 'TL1EaPFCZ8Si5aUrqScBDt'
+ // Only found on one ledger
+ const responses = getDidResponsesForDid(did, pools, {
+ sovrinMain: '~43X4NhAFqREffK7eWdKgFH',
+ })
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('sovrinMain')
+ })
+
+ it('should return the first pool with a self certifying DID if at least one did is self certifying ', async () => {
+ const did = 'did:sov:q7ATwTYbQDgiigVijUAej'
+ // Found on one production and one non production ledger
+ const responses = getDidResponsesForDid(did, pools, {
+ indicioMain: '~43X4NhAFqREffK7eWdKgFH',
+ bcovrinTest: '43X4NhAFqREffK7eWdKgFH43X4NhAFqREffK7eWdKgFH',
+ sovrinBuilder: '~43X4NhAFqREffK7eWdKgFH',
+ })
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('sovrinBuilder')
+ })
+
+ it('should return the production pool if the did was found on one production and one non production ledger and both DIDs are not self certifying', async () => {
+ const did = 'V6ty6ttM3EjuCtosH6sGtW'
+ // Found on one production and one non production ledger
+ const responses = getDidResponsesForDid(did, pools, {
+ indicioMain: '43X4NhAFqREffK7eWdKgFH43X4NhAFqREffK7eWdKgFH',
+ sovrinBuilder: '43X4NhAFqREffK7eWdKgFH43X4NhAFqREffK7eWdKgFH',
+ })
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('indicioMain')
+ })
+
+ it('should return the pool with the self certified did if the did was found on two production ledgers where one did is self certified', async () => {
+ const did = 'VsKV7grR1BUE29mG2Fm2kX'
+ // Found on two production ledgers. Sovrin is self certified
+ const responses = getDidResponsesForDid(did, pools, {
+ sovrinMain: '~43X4NhAFqREffK7eWdKgFH',
+ indicioMain: 'kqa2HyagzfMAq42H5f9u3UMwnSBPQx2QfrSyXbUPxMn',
+ })
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('sovrinMain')
+ })
+
+ it('should return the first pool with a self certified did if the did was found on three non production ledgers where two DIDs are self certified', async () => {
+ const did = 'HEi9QViXNThGQaDsQ3ptcw'
+ // Found on two non production ledgers. Sovrin is self certified
+ const responses = getDidResponsesForDid(did, pools, {
+ sovrinBuilder: '~M9kv2Ez61cur7X39DXWh8W',
+ sovrinStaging: '~M9kv2Ez61cur7X39DXWh8W',
+ bcovrinTest: '3SeuRm3uYuQDYmHeuMLu1xNHozNTtzS3kbZRFMMCWrX4',
+ })
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('sovrinBuilder')
+ })
+
+ it('should return the pool from the cache if the did was found in the cache', async () => {
+ const did = 'HEi9QViXNThGQaDsQ3ptcw'
+
+ const expectedPool = pools[3]
+
+ const didResponse: CachedDidResponse = {
+ nymResponse: {
+ did,
+ role: 'ENDORSER',
+ verkey: '~M9kv2Ez61cur7X39DXWh8W',
+ },
+ poolId: expectedPool.id,
+ }
+
+ const cachedEntries = [
+ {
+ key: did,
+ value: didResponse,
+ },
+ ]
+
+ mockFunction(cacheRepository.findById).mockResolvedValue(
+ new CacheRecord({
+ id: INDY_SDK_DID_POOL_CACHE_ID,
+ entries: cachedEntries,
+ })
+ )
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe(pool.id)
+ })
+
+ it('should set the poolId in the cache if the did was not found in the cache, but resolved later on', async () => {
+ const did = 'HEi9QViXNThGQaDsQ3ptcw'
+ // Found on one ledger
+ const responses = getDidResponsesForDid(did, pools, {
+ sovrinBuilder: '~M9kv2Ez61cur7X39DXWh8W',
+ })
+
+ mockFunction(cacheRepository.findById).mockResolvedValue(
+ new CacheRecord({
+ id: INDY_SDK_DID_POOL_CACHE_ID,
+ entries: [],
+ })
+ )
+
+ const spy = mockFunction(cacheRepository.update).mockResolvedValue()
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'submitReadRequest')
+ spy.mockImplementationOnce(responses[index])
+ })
+
+ const { pool } = await poolService.getPoolForDid(agentContext, did)
+
+ expect(pool.config.id).toBe('sovrinBuilder')
+ expect(pool.config.indyNamespace).toBe('sovrin:builder')
+
+ const cacheRecord = spy.mock.calls[0][1]
+ expect(cacheRecord.entries.length).toBe(1)
+ expect(cacheRecord.entries[0].key).toBe(did)
+ expect(cacheRecord.entries[0].value).toEqual({
+ nymResponse: {
+ did,
+ verkey: '~M9kv2Ez61cur7X39DXWh8W',
+ role: '0',
+ },
+ poolId: 'sovrinBuilder',
+ })
+ })
+ })
+
+ describe('getPoolForNamespace', () => {
+ it('should throw a IndySdkPoolNotConfiguredError error if no pools are configured on the pool service', async () => {
+ poolService.setPools([])
+
+ expect(() => poolService.getPoolForNamespace()).toThrow(IndySdkPoolNotConfiguredError)
+ })
+
+ it('should return the first pool if indyNamespace is not provided', async () => {
+ const expectedPool = pools[0]
+
+ expect(poolService.getPoolForNamespace().id).toEqual(expectedPool.id)
+ })
+
+ it('should throw a IndySdkPoolNotFoundError error if any of the pools did not have the provided indyNamespace', async () => {
+ const indyNameSpace = 'test'
+ const responses = pools.map((pool) => pool.indyNamespace)
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'didIndyNamespace', 'get')
+ spy.mockReturnValueOnce(responses[index])
+ })
+
+ expect(() => poolService.getPoolForNamespace(indyNameSpace)).toThrow(IndySdkPoolNotFoundError)
+ })
+
+ it('should return the first pool that indyNamespace matches', async () => {
+ const expectedPool = pools[3]
+ const indyNameSpace = 'indicio'
+ const responses = pools.map((pool) => pool.indyNamespace)
+
+ poolService.pools.forEach((pool, index) => {
+ const spy = jest.spyOn(pool, 'didIndyNamespace', 'get')
+ spy.mockReturnValueOnce(responses[index])
+ })
+
+ const pool = poolService.getPoolForNamespace(indyNameSpace)
+
+ expect(pool.id).toEqual(expectedPool.id)
+ })
+ })
+
+ describe('submitWriteRequest', () => {
+ it('should throw an error if the config version does not match', async () => {
+ const pool = poolService.getPoolForNamespace()
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ jest.spyOn(poolService, 'getTransactionAuthorAgreement').mockResolvedValue({
+ digest: 'abcde',
+ version: '2.0',
+ text: 'jhsdhbv',
+ ratification_ts: 12345678,
+ acceptanceMechanisms: {
+ aml: { accept: 'accept' },
+ amlContext: 'accept',
+ version: '3',
+ },
+ } as never)
+ await expect(
+ poolService.submitWriteRequest(
+ agentContext,
+ pool,
+ {
+ reqId: 1668174449192969000,
+ identifier: 'BBPoJqRKatdcfLEAFL7exC',
+ operation: {
+ type: '1',
+ dest: 'N8NQHLtCKfPmWMgCSdfa7h',
+ verkey: 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf',
+ alias: 'Heinz57',
+ },
+ protocolVersion: 2,
+ },
+ 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf'
+ )
+ ).rejects.toThrowError(
+ 'Unable to satisfy matching TAA with mechanism "accept" and version "1" in pool.\n Found ["accept"] and version 2.0 in pool.'
+ )
+ })
+
+ it('should throw an error if the config acceptance mechanism does not match', async () => {
+ const pool = poolService.getPoolForNamespace()
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ jest.spyOn(poolService, 'getTransactionAuthorAgreement').mockResolvedValue({
+ digest: 'abcde',
+ version: '1.0',
+ text: 'jhsdhbv',
+ ratification_ts: 12345678,
+ acceptanceMechanisms: {
+ aml: { decline: 'accept' },
+ amlContext: 'accept',
+ version: '1',
+ },
+ } as never)
+ await expect(
+ poolService.submitWriteRequest(
+ agentContext,
+ pool,
+ {
+ reqId: 1668174449192969000,
+ identifier: 'BBPoJqRKatdcfLEAFL7exC',
+ operation: {
+ type: '1',
+ dest: 'N8NQHLtCKfPmWMgCSdfa7h',
+ verkey: 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf',
+ alias: 'Heinz57',
+ },
+ protocolVersion: 2,
+ },
+ 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf'
+ )
+ ).rejects.toThrowError(
+ 'Unable to satisfy matching TAA with mechanism "accept" and version "1" in pool.\n Found ["decline"] and version 1.0 in pool.'
+ )
+ })
+
+ it('should throw an error if no config is present', async () => {
+ const pool = poolService.getPoolForNamespace()
+ pool.authorAgreement = undefined
+ pool.config.transactionAuthorAgreement = undefined
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ jest.spyOn(poolService, 'getTransactionAuthorAgreement').mockResolvedValue({
+ digest: 'abcde',
+ version: '1.0',
+ text: 'jhsdhbv',
+ ratification_ts: 12345678,
+ acceptanceMechanisms: {
+ aml: { accept: 'accept' },
+ amlContext: 'accept',
+ version: '3',
+ },
+ } as never)
+ await expect(
+ poolService.submitWriteRequest(
+ agentContext,
+ pool,
+ {
+ reqId: 1668174449192969000,
+ identifier: 'BBPoJqRKatdcfLEAFL7exC',
+ operation: {
+ type: '1',
+ dest: 'N8NQHLtCKfPmWMgCSdfa7h',
+ verkey: 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf',
+ alias: 'Heinz57',
+ },
+ protocolVersion: 2,
+ },
+ 'GAb4NUvpBcHVCvtP45vTVa5Bp74vFg3iXzdp1Gbd68Wf'
+ )
+ ).rejects.toThrowError(/Please, specify a transaction author agreement with version and acceptance mechanism/)
+ })
+ })
+})
diff --git a/packages/indy-sdk/src/ledger/__tests__/util.test.ts b/packages/indy-sdk/src/ledger/__tests__/util.test.ts
new file mode 100644
index 0000000000..38976758ae
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/__tests__/util.test.ts
@@ -0,0 +1,45 @@
+import type { LedgerRejectResponse, LedgerReqnackResponse } from 'indy-sdk'
+
+import * as LedgerUtil from '../util'
+
+describe('LedgerUtils', () => {
+ // IsLedgerRejectResponse
+ it('Should return true if the response op is: REJECT', () => {
+ const ledgerResponse: LedgerRejectResponse = {
+ op: 'REJECT',
+ reqId: 1,
+ reason: 'Why not',
+ identifier: '123456',
+ }
+ expect(LedgerUtil.isLedgerRejectResponse(ledgerResponse)).toEqual(true)
+ })
+ it('Should return false if the response op is not: REJECT', () => {
+ const ledgerResponse: LedgerReqnackResponse = {
+ op: 'REQNACK',
+ reqId: 1,
+ reason: 'Why not',
+ identifier: '123456',
+ }
+ expect(LedgerUtil.isLedgerRejectResponse(ledgerResponse)).toEqual(false)
+ })
+
+ // isLedgerReqnackResponse
+ it('Should return true if the response op is: REQNACK', () => {
+ const ledgerResponse: LedgerReqnackResponse = {
+ op: 'REQNACK',
+ reqId: 1,
+ reason: 'Why not',
+ identifier: '123456',
+ }
+ expect(LedgerUtil.isLedgerReqnackResponse(ledgerResponse)).toEqual(true)
+ })
+ it('Should return false if the response op is NOT: REQNACK', () => {
+ const ledgerResponse: LedgerRejectResponse = {
+ op: 'REJECT',
+ reqId: 1,
+ reason: 'Why not',
+ identifier: '123456',
+ }
+ expect(LedgerUtil.isLedgerReqnackResponse(ledgerResponse)).toEqual(false)
+ })
+})
diff --git a/packages/indy-sdk/src/ledger/error/IndySdkPoolError.ts b/packages/indy-sdk/src/ledger/error/IndySdkPoolError.ts
new file mode 100644
index 0000000000..fa6679d789
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/error/IndySdkPoolError.ts
@@ -0,0 +1,7 @@
+import { AriesFrameworkError } from '@aries-framework/core'
+
+export class IndySdkPoolError extends AriesFrameworkError {
+ public constructor(message: string, { cause }: { cause?: Error } = {}) {
+ super(message, { cause })
+ }
+}
diff --git a/packages/indy-sdk/src/ledger/error/IndySdkPoolNotConfiguredError.ts b/packages/indy-sdk/src/ledger/error/IndySdkPoolNotConfiguredError.ts
new file mode 100644
index 0000000000..91cd3c7199
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/error/IndySdkPoolNotConfiguredError.ts
@@ -0,0 +1,7 @@
+import { IndySdkPoolError } from './IndySdkPoolError'
+
+export class IndySdkPoolNotConfiguredError extends IndySdkPoolError {
+ public constructor(message: string, { cause }: { cause?: Error } = {}) {
+ super(message, { cause })
+ }
+}
diff --git a/packages/indy-sdk/src/ledger/error/IndySdkPoolNotFoundError.ts b/packages/indy-sdk/src/ledger/error/IndySdkPoolNotFoundError.ts
new file mode 100644
index 0000000000..4977428cba
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/error/IndySdkPoolNotFoundError.ts
@@ -0,0 +1,7 @@
+import { IndySdkPoolError } from './IndySdkPoolError'
+
+export class IndySdkPoolNotFoundError extends IndySdkPoolError {
+ public constructor(message: string, { cause }: { cause?: Error } = {}) {
+ super(message, { cause })
+ }
+}
diff --git a/packages/indy-sdk/src/ledger/error/index.ts b/packages/indy-sdk/src/ledger/error/index.ts
new file mode 100644
index 0000000000..e2554abbdf
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/error/index.ts
@@ -0,0 +1,3 @@
+export * from './IndySdkPoolError'
+export * from './IndySdkPoolNotConfiguredError'
+export * from './IndySdkPoolNotFoundError'
diff --git a/packages/indy-sdk/src/ledger/index.ts b/packages/indy-sdk/src/ledger/index.ts
new file mode 100644
index 0000000000..fe016abcec
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/index.ts
@@ -0,0 +1,2 @@
+export * from './IndySdkPool'
+export * from './IndySdkPoolService'
diff --git a/packages/indy-sdk/src/ledger/util.ts b/packages/indy-sdk/src/ledger/util.ts
new file mode 100644
index 0000000000..d7b5fc2076
--- /dev/null
+++ b/packages/indy-sdk/src/ledger/util.ts
@@ -0,0 +1,9 @@
+import type { LedgerResponse, LedgerRejectResponse, LedgerReqnackResponse } from 'indy-sdk'
+
+export function isLedgerRejectResponse(response: LedgerResponse): response is LedgerRejectResponse {
+ return response.op === 'REJECT'
+}
+
+export function isLedgerReqnackResponse(response: LedgerResponse): response is LedgerReqnackResponse {
+ return response.op === 'REQNACK'
+}
diff --git a/packages/indy-sdk/src/storage/IndySdkStorageService.ts b/packages/indy-sdk/src/storage/IndySdkStorageService.ts
new file mode 100644
index 0000000000..48f3022154
--- /dev/null
+++ b/packages/indy-sdk/src/storage/IndySdkStorageService.ts
@@ -0,0 +1,324 @@
+import type { IndySdkWallet } from '../wallet/IndySdkWallet'
+import type {
+ BaseRecordConstructor,
+ AgentContext,
+ BaseRecord,
+ TagsBase,
+ Query,
+ StorageService,
+} from '@aries-framework/core'
+import type { WalletQuery, WalletRecord, WalletSearchOptions } from 'indy-sdk'
+
+import { RecordDuplicateError, RecordNotFoundError, injectable, inject, JsonTransformer } from '@aries-framework/core'
+
+import { isIndyError, IndySdkError } from '../error'
+import { IndySdk, IndySdkSymbol } from '../types'
+import { assertIndySdkWallet } from '../utils/assertIndySdkWallet'
+
+@injectable()
+export class IndySdkStorageService implements StorageService {
+ private indySdk: IndySdk
+
+ private static DEFAULT_QUERY_OPTIONS = {
+ retrieveType: true,
+ retrieveTags: true,
+ }
+
+ public constructor(@inject(IndySdkSymbol) indySdk: IndySdk) {
+ this.indySdk = indySdk
+ }
+
+ private transformToRecordTagValues(tags: { [key: number]: string | undefined }): TagsBase {
+ const transformedTags: TagsBase = {}
+
+ for (const [key, value] of Object.entries(tags)) {
+ // If the value is a boolean string ('1' or '0')
+ // use the boolean val
+ if (value === '1' && key?.includes(':')) {
+ const [tagName, tagValue] = key.split(':')
+
+ const transformedValue = transformedTags[tagName]
+
+ if (Array.isArray(transformedValue)) {
+ transformedTags[tagName] = [...transformedValue, tagValue]
+ } else {
+ transformedTags[tagName] = [tagValue]
+ }
+ }
+ // Transform '1' and '0' to boolean
+ else if (value === '1' || value === '0') {
+ transformedTags[key] = value === '1'
+ }
+ // If 1 or 0 is prefixed with 'n__' we need to remove it. This is to prevent
+ // casting the value to a boolean
+ else if (value === 'n__1' || value === 'n__0') {
+ transformedTags[key] = value === 'n__1' ? '1' : '0'
+ }
+ // Otherwise just use the value
+ else {
+ transformedTags[key] = value
+ }
+ }
+
+ return transformedTags
+ }
+
+ private transformFromRecordTagValues(tags: TagsBase): { [key: string]: string | undefined } {
+ const transformedTags: { [key: string]: string | undefined } = {}
+
+ for (const [key, value] of Object.entries(tags)) {
+ // If the value is of type null we use the value undefined
+ // Indy doesn't support null as a value
+ if (value === null) {
+ transformedTags[key] = undefined
+ }
+ // If the value is a boolean use the indy
+ // '1' or '0' syntax
+ else if (typeof value === 'boolean') {
+ transformedTags[key] = value ? '1' : '0'
+ }
+ // If the value is 1 or 0, we need to add something to the value, otherwise
+ // the next time we deserialize the tag values it will be converted to boolean
+ else if (value === '1' || value === '0') {
+ transformedTags[key] = `n__${value}`
+ }
+ // If the value is an array we create a tag for each array
+ // item ("tagName:arrayItem" = "1")
+ else if (Array.isArray(value)) {
+ value.forEach((item) => {
+ const tagName = `${key}:${item}`
+ transformedTags[tagName] = '1'
+ })
+ }
+ // Otherwise just use the value
+ else {
+ transformedTags[key] = value
+ }
+ }
+
+ return transformedTags
+ }
+
+ /**
+ * Transforms the search query into a wallet query compatible with indy WQL.
+ *
+ * The format used by AFJ is almost the same as the indy query, with the exception of
+ * the encoding of values, however this is handled by the {@link IndyStorageService.transformToRecordTagValues}
+ * method.
+ */
+ private indyQueryFromSearchQuery(query: Query): Record {
+ // eslint-disable-next-line prefer-const
+ let { $and, $or, $not, ...tags } = query
+
+ $and = ($and as Query[] | undefined)?.map((q) => this.indyQueryFromSearchQuery(q))
+ $or = ($or as Query[] | undefined)?.map((q) => this.indyQueryFromSearchQuery(q))
+ $not = $not ? this.indyQueryFromSearchQuery($not as Query) : undefined
+
+ const indyQuery = {
+ ...this.transformFromRecordTagValues(tags as unknown as TagsBase),
+ $and,
+ $or,
+ $not,
+ }
+
+ return indyQuery
+ }
+
+ private recordToInstance(record: WalletRecord, recordClass: BaseRecordConstructor): T {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ const instance = JsonTransformer.deserialize(record.value!, recordClass)
+ instance.id = record.id
+
+ const tags = record.tags ? this.transformToRecordTagValues(record.tags) : {}
+ instance.replaceTags(tags)
+
+ return instance
+ }
+
+ /** @inheritDoc */
+ public async save(agentContext: AgentContext, record: T) {
+ assertIndySdkWallet(agentContext.wallet)
+
+ const value = JsonTransformer.serialize(record)
+ const tags = this.transformFromRecordTagValues(record.getTags()) as Record
+
+ try {
+ await this.indySdk.addWalletRecord(agentContext.wallet.handle, record.type, record.id, value, tags)
+ } catch (error) {
+ // Record already exists
+ if (isIndyError(error, 'WalletItemAlreadyExists')) {
+ throw new RecordDuplicateError(`Record with id ${record.id} already exists`, { recordType: record.type })
+ }
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /** @inheritDoc */
+ public async update(agentContext: AgentContext, record: T): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ const value = JsonTransformer.serialize(record)
+ const tags = this.transformFromRecordTagValues(record.getTags()) as Record
+
+ try {
+ await this.indySdk.updateWalletRecordValue(agentContext.wallet.handle, record.type, record.id, value)
+ await this.indySdk.updateWalletRecordTags(agentContext.wallet.handle, record.type, record.id, tags)
+ } catch (error) {
+ // Record does not exist
+ if (isIndyError(error, 'WalletItemNotFound')) {
+ throw new RecordNotFoundError(`record with id ${record.id} not found.`, {
+ recordType: record.type,
+ cause: error,
+ })
+ }
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /** @inheritDoc */
+ public async delete(agentContext: AgentContext, record: T) {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ await this.indySdk.deleteWalletRecord(agentContext.wallet.handle, record.type, record.id)
+ } catch (error) {
+ // Record does not exist
+ if (isIndyError(error, 'WalletItemNotFound')) {
+ throw new RecordNotFoundError(`record with id ${record.id} not found.`, {
+ recordType: record.type,
+ cause: error,
+ })
+ }
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /** @inheritDoc */
+ public async deleteById(
+ agentContext: AgentContext,
+ recordClass: BaseRecordConstructor,
+ id: string
+ ): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ await this.indySdk.deleteWalletRecord(agentContext.wallet.handle, recordClass.type, id)
+ } catch (error) {
+ if (isIndyError(error, 'WalletItemNotFound')) {
+ throw new RecordNotFoundError(`record with id ${id} not found.`, {
+ recordType: recordClass.type,
+ cause: error,
+ })
+ }
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /** @inheritDoc */
+ public async getById(agentContext: AgentContext, recordClass: BaseRecordConstructor, id: string): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ try {
+ const record = await this.indySdk.getWalletRecord(
+ agentContext.wallet.handle,
+ recordClass.type,
+ id,
+ IndySdkStorageService.DEFAULT_QUERY_OPTIONS
+ )
+ return this.recordToInstance(record, recordClass)
+ } catch (error) {
+ if (isIndyError(error, 'WalletItemNotFound')) {
+ throw new RecordNotFoundError(`record with id ${id} not found.`, {
+ recordType: recordClass.type,
+ cause: error,
+ })
+ }
+
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ /** @inheritDoc */
+ public async getAll(agentContext: AgentContext, recordClass: BaseRecordConstructor): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ const recordIterator = this.search(
+ agentContext.wallet,
+ recordClass.type,
+ {},
+ IndySdkStorageService.DEFAULT_QUERY_OPTIONS
+ )
+ const records = []
+ for await (const record of recordIterator) {
+ records.push(this.recordToInstance(record, recordClass))
+ }
+ return records
+ }
+
+ /** @inheritDoc */
+ public async findByQuery(
+ agentContext: AgentContext,
+ recordClass: BaseRecordConstructor,
+ query: Query
+ ): Promise {
+ assertIndySdkWallet(agentContext.wallet)
+
+ const indyQuery = this.indyQueryFromSearchQuery(query)
+
+ const recordIterator = this.search(
+ agentContext.wallet,
+ recordClass.type,
+ indyQuery,
+ IndySdkStorageService.DEFAULT_QUERY_OPTIONS
+ )
+ const records = []
+ for await (const record of recordIterator) {
+ records.push(this.recordToInstance(record, recordClass))
+ }
+ return records
+ }
+
+ private async *search(
+ wallet: IndySdkWallet,
+ type: string,
+ query: WalletQuery,
+ { limit = Infinity, ...options }: WalletSearchOptions & { limit?: number }
+ ) {
+ try {
+ const searchHandle = await this.indySdk.openWalletSearch(wallet.handle, type, query, options)
+
+ let records: WalletRecord[] = []
+
+ // Allow max of 256 per fetch operation
+ const chunk = limit ? Math.min(256, limit) : 256
+
+ // Loop while limit not reached (or no limit specified)
+ while (!limit || records.length < limit) {
+ // Retrieve records
+ const recordsJson = await this.indySdk.fetchWalletSearchNextRecords(wallet.handle, searchHandle, chunk)
+
+ if (recordsJson.records) {
+ records = [...records, ...recordsJson.records]
+
+ for (const record of recordsJson.records) {
+ yield record
+ }
+ }
+
+ // If the number of records returned is less than chunk
+ // It means we reached the end of the iterator (no more records)
+ if (!records.length || !recordsJson.records || recordsJson.records.length < chunk) {
+ await this.indySdk.closeWalletSearch(searchHandle)
+
+ return
+ }
+ }
+ } catch (error) {
+ throw new IndySdkError(error, `Searching '${type}' records for query '${JSON.stringify(query)}' failed`)
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/storage/__tests__/IndySdkStorageService.test.ts b/packages/indy-sdk/src/storage/__tests__/IndySdkStorageService.test.ts
new file mode 100644
index 0000000000..7a8855c9d5
--- /dev/null
+++ b/packages/indy-sdk/src/storage/__tests__/IndySdkStorageService.test.ts
@@ -0,0 +1,297 @@
+import type { IndySdk } from '../../types'
+import type { AgentContext, TagsBase } from '@aries-framework/core'
+
+import { SigningProviderRegistry, RecordDuplicateError, RecordNotFoundError } from '@aries-framework/core'
+
+import { TestRecord } from '../../../../core/src/storage/__tests__/TestRecord'
+import { agentDependencies, getAgentConfig, getAgentContext } from '../../../../core/tests/helpers'
+import { IndySdkWallet } from '../../wallet/IndySdkWallet'
+import { IndySdkStorageService } from '../IndySdkStorageService'
+
+describe('IndySdkStorageService', () => {
+ let wallet: IndySdkWallet
+ let indy: IndySdk
+ let storageService: IndySdkStorageService
+ let agentContext: AgentContext
+
+ beforeEach(async () => {
+ indy = agentDependencies.indy
+ const agentConfig = getAgentConfig('IndySdkStorageServiceTest')
+ wallet = new IndySdkWallet(indy, agentConfig.logger, new SigningProviderRegistry([]))
+ agentContext = getAgentContext({
+ wallet,
+ agentConfig,
+ })
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ await wallet.createAndOpen(agentConfig.walletConfig!)
+ storageService = new IndySdkStorageService(indy)
+ })
+
+ afterEach(async () => {
+ await wallet.delete()
+ })
+
+ const insertRecord = async ({ id, tags }: { id?: string; tags?: TagsBase }) => {
+ const props = {
+ id,
+ foo: 'bar',
+ tags: tags ?? { myTag: 'foobar' },
+ }
+ const record = new TestRecord(props)
+ await storageService.save(agentContext, record)
+ return record
+ }
+
+ describe('tag transformation', () => {
+ it('should correctly transform tag values to string before storing', async () => {
+ const record = await insertRecord({
+ id: 'test-id',
+ tags: {
+ someBoolean: true,
+ someOtherBoolean: false,
+ someStringValue: 'string',
+ anArrayValue: ['foo', 'bar'],
+ // booleans are stored as '1' and '0' so we store the string values '1' and '0' as 'n__1' and 'n__0'
+ someStringNumberValue: '1',
+ anotherStringNumberValue: '0',
+ },
+ })
+
+ const retrieveRecord = await indy.getWalletRecord(wallet.handle, record.type, record.id, {
+ retrieveType: true,
+ retrieveTags: true,
+ })
+
+ expect(retrieveRecord.tags).toEqual({
+ someBoolean: '1',
+ someOtherBoolean: '0',
+ someStringValue: 'string',
+ 'anArrayValue:foo': '1',
+ 'anArrayValue:bar': '1',
+ someStringNumberValue: 'n__1',
+ anotherStringNumberValue: 'n__0',
+ })
+ })
+
+ it('should correctly transform tag values from string after retrieving', async () => {
+ await indy.addWalletRecord(wallet.handle, TestRecord.type, 'some-id', '{}', {
+ someBoolean: '1',
+ someOtherBoolean: '0',
+ someStringValue: 'string',
+ 'anArrayValue:foo': '1',
+ 'anArrayValue:bar': '1',
+ // booleans are stored as '1' and '0' so we store the string values '1' and '0' as 'n__1' and 'n__0'
+ someStringNumberValue: 'n__1',
+ anotherStringNumberValue: 'n__0',
+ })
+
+ const record = await storageService.getById(agentContext, TestRecord, 'some-id')
+
+ expect(record.getTags()).toEqual({
+ someBoolean: true,
+ someOtherBoolean: false,
+ someStringValue: 'string',
+ anArrayValue: expect.arrayContaining(['bar', 'foo']),
+ someStringNumberValue: '1',
+ anotherStringNumberValue: '0',
+ })
+ })
+ })
+
+ describe('save()', () => {
+ it('should throw RecordDuplicateError if a record with the id already exists', async () => {
+ const record = await insertRecord({ id: 'test-id' })
+
+ return expect(() => storageService.save(agentContext, record)).rejects.toThrowError(RecordDuplicateError)
+ })
+
+ it('should save the record', async () => {
+ const record = await insertRecord({ id: 'test-id' })
+ const found = await storageService.getById(agentContext, TestRecord, 'test-id')
+
+ expect(record).toEqual(found)
+ })
+ })
+
+ describe('getById()', () => {
+ it('should throw RecordNotFoundError if the record does not exist', async () => {
+ return expect(() => storageService.getById(agentContext, TestRecord, 'does-not-exist')).rejects.toThrowError(
+ RecordNotFoundError
+ )
+ })
+
+ it('should return the record by id', async () => {
+ const record = await insertRecord({ id: 'test-id' })
+ const found = await storageService.getById(agentContext, TestRecord, 'test-id')
+
+ expect(found).toEqual(record)
+ })
+ })
+
+ describe('update()', () => {
+ it('should throw RecordNotFoundError if the record does not exist', async () => {
+ const record = new TestRecord({
+ id: 'test-id',
+ foo: 'test',
+ tags: { some: 'tag' },
+ })
+
+ return expect(() => storageService.update(agentContext, record)).rejects.toThrowError(RecordNotFoundError)
+ })
+
+ it('should update the record', async () => {
+ const record = await insertRecord({ id: 'test-id' })
+
+ record.replaceTags({ ...record.getTags(), foo: 'bar' })
+ record.foo = 'foobaz'
+ await storageService.update(agentContext, record)
+
+ const retrievedRecord = await storageService.getById(agentContext, TestRecord, record.id)
+ expect(retrievedRecord).toEqual(record)
+ })
+ })
+
+ describe('delete()', () => {
+ it('should throw RecordNotFoundError if the record does not exist', async () => {
+ const record = new TestRecord({
+ id: 'test-id',
+ foo: 'test',
+ tags: { some: 'tag' },
+ })
+
+ return expect(() => storageService.delete(agentContext, record)).rejects.toThrowError(RecordNotFoundError)
+ })
+
+ it('should delete the record', async () => {
+ const record = await insertRecord({ id: 'test-id' })
+ await storageService.delete(agentContext, record)
+
+ return expect(() => storageService.getById(agentContext, TestRecord, record.id)).rejects.toThrowError(
+ RecordNotFoundError
+ )
+ })
+ })
+
+ describe('getAll()', () => {
+ it('should retrieve all records', async () => {
+ const createdRecords = await Promise.all(
+ Array(5)
+ .fill(undefined)
+ .map((_, index) => insertRecord({ id: `record-${index}` }))
+ )
+
+ const records = await storageService.getAll(agentContext, TestRecord)
+
+ expect(records).toEqual(expect.arrayContaining(createdRecords))
+ })
+ })
+
+ describe('findByQuery()', () => {
+ it('should retrieve all records that match the query', async () => {
+ const expectedRecord = await insertRecord({ tags: { myTag: 'foobar' } })
+ await insertRecord({ tags: { myTag: 'notfoobar' } })
+
+ const records = await storageService.findByQuery(agentContext, TestRecord, { myTag: 'foobar' })
+
+ expect(records.length).toBe(1)
+ expect(records[0]).toEqual(expectedRecord)
+ })
+
+ it('finds records using $and statements', async () => {
+ const expectedRecord = await insertRecord({ tags: { myTag: 'foo', anotherTag: 'bar' } })
+ await insertRecord({ tags: { myTag: 'notfoobar' } })
+
+ const records = await storageService.findByQuery(agentContext, TestRecord, {
+ $and: [{ myTag: 'foo' }, { anotherTag: 'bar' }],
+ })
+
+ expect(records.length).toBe(1)
+ expect(records[0]).toEqual(expectedRecord)
+ })
+
+ it('finds records using $or statements', async () => {
+ const expectedRecord = await insertRecord({ tags: { myTag: 'foo' } })
+ const expectedRecord2 = await insertRecord({ tags: { anotherTag: 'bar' } })
+ await insertRecord({ tags: { myTag: 'notfoobar' } })
+
+ const records = await storageService.findByQuery(agentContext, TestRecord, {
+ $or: [{ myTag: 'foo' }, { anotherTag: 'bar' }],
+ })
+
+ expect(records.length).toBe(2)
+ expect(records).toEqual(expect.arrayContaining([expectedRecord, expectedRecord2]))
+ })
+
+ it('finds records using $not statements', async () => {
+ const expectedRecord = await insertRecord({ tags: { myTag: 'foo' } })
+ const expectedRecord2 = await insertRecord({ tags: { anotherTag: 'bar' } })
+ await insertRecord({ tags: { myTag: 'notfoobar' } })
+
+ const records = await storageService.findByQuery(agentContext, TestRecord, {
+ $not: { myTag: 'notfoobar' },
+ })
+
+ expect(records.length).toBe(2)
+ expect(records).toEqual(expect.arrayContaining([expectedRecord, expectedRecord2]))
+ })
+
+ it('correctly transforms an advanced query into a valid WQL query', async () => {
+ const indySpy = jest.fn()
+ const storageServiceWithoutIndy = new IndySdkStorageService({
+ openWalletSearch: indySpy,
+ fetchWalletSearchNextRecords: jest.fn(() => ({ records: undefined })),
+ closeWalletSearch: jest.fn(),
+ } as unknown as IndySdk)
+
+ await storageServiceWithoutIndy.findByQuery(agentContext, TestRecord, {
+ $and: [
+ {
+ $or: [{ myTag: true }, { myTag: false }],
+ },
+ {
+ $and: [{ theNumber: '0' }, { theNumber: '1' }],
+ },
+ ],
+ $or: [
+ {
+ aValue: ['foo', 'bar'],
+ },
+ ],
+ $not: { myTag: 'notfoobar' },
+ })
+
+ const expectedQuery = {
+ $and: [
+ {
+ $and: undefined,
+ $not: undefined,
+ $or: [
+ { myTag: '1', $and: undefined, $or: undefined, $not: undefined },
+ { myTag: '0', $and: undefined, $or: undefined, $not: undefined },
+ ],
+ },
+ {
+ $or: undefined,
+ $not: undefined,
+ $and: [
+ { theNumber: 'n__0', $and: undefined, $or: undefined, $not: undefined },
+ { theNumber: 'n__1', $and: undefined, $or: undefined, $not: undefined },
+ ],
+ },
+ ],
+ $or: [
+ {
+ 'aValue:foo': '1',
+ 'aValue:bar': '1',
+ $and: undefined,
+ $or: undefined,
+ $not: undefined,
+ },
+ ],
+ $not: { myTag: 'notfoobar', $and: undefined, $or: undefined, $not: undefined },
+ }
+
+ expect(indySpy).toBeCalledWith(expect.anything(), expect.anything(), expectedQuery, expect.anything())
+ })
+ })
+})
diff --git a/packages/indy-sdk/src/storage/index.ts b/packages/indy-sdk/src/storage/index.ts
new file mode 100644
index 0000000000..ff59756cfa
--- /dev/null
+++ b/packages/indy-sdk/src/storage/index.ts
@@ -0,0 +1 @@
+export * from './IndySdkStorageService'
diff --git a/packages/indy-sdk/src/types.ts b/packages/indy-sdk/src/types.ts
new file mode 100644
index 0000000000..f6ac41c161
--- /dev/null
+++ b/packages/indy-sdk/src/types.ts
@@ -0,0 +1,6 @@
+import type { default as _IndySdk } from 'indy-sdk'
+
+type IndySdk = typeof _IndySdk
+
+export const IndySdkSymbol = Symbol('IndySdk')
+export type { IndySdk }
diff --git a/packages/indy-sdk/src/utils/__tests__/did.test.ts b/packages/indy-sdk/src/utils/__tests__/did.test.ts
new file mode 100644
index 0000000000..45344136d9
--- /dev/null
+++ b/packages/indy-sdk/src/utils/__tests__/did.test.ts
@@ -0,0 +1,73 @@
+import { isAbbreviatedVerkey, isFullVerkey, isSelfCertifiedDid } from '../did'
+
+const validAbbreviatedVerkeys = [
+ '~PKAYz8Ev4yoQgr2LaMAWFx',
+ '~Soy1augaQrQYtNZRRHsikB',
+ '~BUF7uxYTxZ6qYdZ4G9e1Gi',
+ '~DbZ4gkBqhFRVsT5P7BJqyZ',
+ '~4zmNTdG78iYyMAQdEQLrf8',
+]
+
+const invalidAbbreviatedVerkeys = [
+ '6YnVN5Qdb6mqimTRQcQmSXrHXKdTEdRn5YHZReezUTvt',
+ '8jG2Bim1HNSybCTdKBRppP4PCQSSijx1pBnreqsdo8JG',
+ 'ABUF7uxYTxZ6qYdZ4G9e1Gi',
+ '~Db3IgkBqhFRVsT5P7BJqyZ',
+ '~4zmNTlG78iYyMAQdEQLrf8',
+]
+
+const validFullVerkeys = [
+ '6YnVN5Qdb6mqimTRQcQmSXrHXKdTEdRn5YHZReezUTvt',
+ '8jG2Bim1HNSybCTdKBRppP4PCQSSijx1pBnreqsdo8JG',
+ '9wMLhw9SSxtTUyosrndMbvWY4TtDbVvRnMtzG2NysniP',
+ '6m2XT39vivJ7tLSxNPM8siMnhYCZcdMxbkTcJDSzAQTu',
+ 'CAgL85iEecPNQMmxQ1hgbqczwq7SAerQ8RbWTRtC7SoK',
+ 'MqXmB7cTsTXqyxDPBbrgu5EPqw61kouK1qjMvnoPa96',
+]
+
+const invalidFullVerkeys = [
+ '~PKAYz8Ev4yoQgr2LaMAWFx',
+ '~Soy1augaQrQYtNZRRHsikB',
+ '6YnVN5Qdb6mqimTRQcQmSXrHXKdTEdRn5YHZReezUTvta',
+ '6m2XT39vIvJ7tLSxNPM8siMnhYCZcdMxbkTcJDSzAQTu',
+ 'CAgL85iEecPNQMlxQ1hgbqczwq7SAerQ8RbWTRtC7SoK',
+]
+
+describe('Utils | Did', () => {
+ describe('isSelfCertifiedDid()', () => {
+ test('returns true if the verkey is abbreviated', () => {
+ expect(isSelfCertifiedDid('PW8ZHpNupeWXbmpPWog6Ki', '~QQ5jiH1dgXPAnvHdJvazn9')).toBe(true)
+ })
+
+ test('returns true if the verkey is not abbreviated and the did is generated from the verkey', () => {
+ expect(isSelfCertifiedDid('Y8q4Aq6gRAcmB6jjKk3Z7t', 'HyEoPRNvC7q4jj5joUo8AWYtxbNccbEnTAeuMYkpmNS2')).toBe(true)
+ })
+
+ test('returns false if the verkey is not abbreviated and the did is not generated from the verkey', () => {
+ expect(isSelfCertifiedDid('Y8q4Aq6gRAcmB6jjKk3Z7t', 'AcU7DnRqoXGYATD6VqsRq4eHuz55gdM3uzFBEhFd6rGh')).toBe(false)
+ })
+ })
+
+ describe('isAbbreviatedVerkey()', () => {
+ test.each(validAbbreviatedVerkeys)('returns true when valid abbreviated verkey "%s" is passed in', (verkey) => {
+ expect(isAbbreviatedVerkey(verkey)).toBe(true)
+ })
+
+ test.each(invalidAbbreviatedVerkeys)(
+ 'returns false when invalid abbreviated verkey "%s" is passed in',
+ (verkey) => {
+ expect(isAbbreviatedVerkey(verkey)).toBe(false)
+ }
+ )
+ })
+
+ describe('isFullVerkey()', () => {
+ test.each(validFullVerkeys)('returns true when valid full verkey "%s" is passed in', (verkey) => {
+ expect(isFullVerkey(verkey)).toBe(true)
+ })
+
+ test.each(invalidFullVerkeys)('returns false when invalid full verkey "%s" is passed in', (verkey) => {
+ expect(isFullVerkey(verkey)).toBe(false)
+ })
+ })
+})
diff --git a/packages/indy-sdk/src/utils/assertIndySdkWallet.ts b/packages/indy-sdk/src/utils/assertIndySdkWallet.ts
new file mode 100644
index 0000000000..0b1914555f
--- /dev/null
+++ b/packages/indy-sdk/src/utils/assertIndySdkWallet.ts
@@ -0,0 +1,13 @@
+import type { Wallet } from '@aries-framework/core'
+
+import { AriesFrameworkError } from '@aries-framework/core'
+
+import { IndySdkWallet } from '../wallet/IndySdkWallet'
+
+export function assertIndySdkWallet(wallet: Wallet): asserts wallet is IndySdkWallet {
+ if (!(wallet instanceof IndySdkWallet)) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const walletClassName = (wallet as any).constructor?.name ?? 'unknown'
+ throw new AriesFrameworkError(`Expected wallet to be instance of IndySdkWallet, found ${walletClassName}`)
+ }
+}
diff --git a/packages/indy-sdk/src/utils/did.ts b/packages/indy-sdk/src/utils/did.ts
new file mode 100644
index 0000000000..90b465a0f6
--- /dev/null
+++ b/packages/indy-sdk/src/utils/did.ts
@@ -0,0 +1,89 @@
+/**
+ * Based on DidUtils implementation in Aries Framework .NET
+ * @see: https://github.com/hyperledger/aries-framework-dotnet/blob/f90eaf9db8548f6fc831abea917e906201755763/src/Hyperledger.Aries/Utils/DidUtils.cs
+ *
+ * Some context about full verkeys versus abbreviated verkeys:
+ * A standard verkey is 32 bytes, and by default in Indy the DID is chosen as the first 16 bytes of that key, before base58 encoding.
+ * An abbreviated verkey replaces the first 16 bytes of the verkey with ~ when it matches the DID.
+ *
+ * When a full verkey is used to register on the ledger, this is stored as a full verkey on the ledger and also returned from the ledger as a full verkey.
+ * The same applies to an abbreviated verkey. If an abbreviated verkey is used to register on the ledger, this is stored as an abbreviated verkey on the ledger and also returned from the ledger as an abbreviated verkey.
+ *
+ * For this reason we need some methods to check whether verkeys are full or abbreviated, so we can align this with `indy.abbreviateVerkey`
+ *
+ * Aries Framework .NET also abbreviates verkey before sending to ledger:
+ * https://github.com/hyperledger/aries-framework-dotnet/blob/f90eaf9db8548f6fc831abea917e906201755763/src/Hyperledger.Aries/Ledger/DefaultLedgerService.cs#L139-L147
+ */
+
+import { Buffer, TypedArrayEncoder } from '@aries-framework/core'
+
+export const FULL_VERKEY_REGEX = /^[1-9A-HJ-NP-Za-km-z]{43,44}$/
+export const ABBREVIATED_VERKEY_REGEX = /^~[1-9A-HJ-NP-Za-km-z]{21,22}$/
+
+/**
+ * Check whether the did is a self certifying did. If the verkey is abbreviated this method
+ * will always return true. Make sure that the verkey you pass in this method belongs to the
+ * did passed in
+ *
+ * @return Boolean indicating whether the did is self certifying
+ */
+export function isSelfCertifiedDid(did: string, verkey: string): boolean {
+ // If the verkey is Abbreviated, it means the full verkey
+ // is the did + the verkey
+ if (isAbbreviatedVerkey(verkey)) {
+ return true
+ }
+
+ const didFromVerkey = indyDidFromPublicKeyBase58(verkey)
+
+ if (didFromVerkey === did) {
+ return true
+ }
+
+ return false
+}
+
+export function indyDidFromPublicKeyBase58(publicKeyBase58: string): string {
+ const buffer = TypedArrayEncoder.fromBase58(publicKeyBase58)
+
+ const did = TypedArrayEncoder.toBase58(buffer.slice(0, 16))
+
+ return did
+}
+
+export function getFullVerkey(did: string, verkey: string) {
+ if (isFullVerkey(verkey)) return verkey
+
+ // Did could have did:xxx prefix, only take the last item after :
+ const id = did.split(':').pop() ?? did
+ // Verkey is prefixed with ~ if abbreviated
+ const verkeyWithoutTilde = verkey.slice(1)
+
+ // Create base58 encoded public key (32 bytes)
+ return TypedArrayEncoder.toBase58(
+ Buffer.concat([
+ // Take did identifier (16 bytes)
+ TypedArrayEncoder.fromBase58(id),
+ // Concat the abbreviated verkey (16 bytes)
+ TypedArrayEncoder.fromBase58(verkeyWithoutTilde),
+ ])
+ )
+}
+
+/**
+ * Check a base58 encoded string against a regex expression to determine if it is a full valid verkey
+ * @param verkey Base58 encoded string representation of a verkey
+ * @return Boolean indicating if the string is a valid verkey
+ */
+export function isFullVerkey(verkey: string): boolean {
+ return FULL_VERKEY_REGEX.test(verkey)
+}
+
+/**
+ * Check a base58 encoded string against a regex expression to determine if it is a valid abbreviated verkey
+ * @param verkey Base58 encoded string representation of an abbreviated verkey
+ * @returns Boolean indicating if the string is a valid abbreviated verkey
+ */
+export function isAbbreviatedVerkey(verkey: string): boolean {
+ return ABBREVIATED_VERKEY_REGEX.test(verkey)
+}
diff --git a/packages/indy-sdk/src/utils/promises.ts b/packages/indy-sdk/src/utils/promises.ts
new file mode 100644
index 0000000000..0e843d73b5
--- /dev/null
+++ b/packages/indy-sdk/src/utils/promises.ts
@@ -0,0 +1,44 @@
+// This file polyfills the allSettled method introduced in ESNext
+
+export type AllSettledFulfilled = {
+ status: 'fulfilled'
+ value: T
+}
+
+export type AllSettledRejected = {
+ status: 'rejected'
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ reason: any
+}
+
+export function allSettled(promises: Promise[]) {
+ return Promise.all(
+ promises.map((p) =>
+ p
+ .then(
+ (value) =>
+ ({
+ status: 'fulfilled',
+ value,
+ } as AllSettledFulfilled)
+ )
+ .catch(
+ (reason) =>
+ ({
+ status: 'rejected',
+ reason,
+ } as AllSettledRejected)
+ )
+ )
+ )
+}
+
+export function onlyFulfilled(entries: Array | AllSettledRejected>) {
+ // We filter for only the rejected values, so we can safely cast the type
+ return entries.filter((e) => e.status === 'fulfilled') as AllSettledFulfilled[]
+}
+
+export function onlyRejected(entries: Array | AllSettledRejected>) {
+ // We filter for only the rejected values, so we can safely cast the type
+ return entries.filter((e) => e.status === 'rejected') as AllSettledRejected[]
+}
diff --git a/packages/indy-sdk/src/wallet/IndySdkWallet.ts b/packages/indy-sdk/src/wallet/IndySdkWallet.ts
new file mode 100644
index 0000000000..9230ed5f28
--- /dev/null
+++ b/packages/indy-sdk/src/wallet/IndySdkWallet.ts
@@ -0,0 +1,686 @@
+import type {
+ EncryptedMessage,
+ KeyDerivationMethod,
+ WalletConfig,
+ Buffer,
+ WalletCreateKeyOptions,
+ DidConfig,
+ DidInfo,
+ WalletSignOptions,
+ UnpackedMessageContext,
+ WalletVerifyOptions,
+ Wallet,
+ KeyPair,
+ WalletExportImportConfig,
+ WalletConfigRekey,
+} from '@aries-framework/core'
+import type { WalletStorageConfig, WalletConfig as IndySdkWalletConfig, OpenWalletCredentials } from 'indy-sdk'
+
+const isError = (error: unknown): error is Error => error instanceof Error
+
+import {
+ AriesFrameworkError,
+ RecordDuplicateError,
+ RecordNotFoundError,
+ Logger,
+ JsonEncoder,
+ WalletDuplicateError,
+ WalletError,
+ WalletNotFoundError,
+ WalletInvalidKeyError,
+ InjectionSymbols,
+ KeyType,
+ Key,
+ SigningProviderRegistry,
+ TypedArrayEncoder,
+} from '@aries-framework/core'
+import { inject, injectable } from 'tsyringe'
+
+import { isIndyError, IndySdkError } from '../error'
+import { IndySdk, IndySdkSymbol } from '../types'
+
+@injectable()
+export class IndySdkWallet implements Wallet {
+ private walletConfig?: WalletConfig
+ private walletHandle?: number
+
+ private logger: Logger
+ private signingKeyProviderRegistry: SigningProviderRegistry
+ private publicDidInfo: DidInfo | undefined
+ private indySdk: IndySdk
+
+ public constructor(
+ @inject(IndySdkSymbol) indySdk: IndySdk,
+ @inject(InjectionSymbols.Logger) logger: Logger,
+ signingKeyProviderRegistry: SigningProviderRegistry
+ ) {
+ this.logger = logger
+ this.signingKeyProviderRegistry = signingKeyProviderRegistry
+ this.indySdk = indySdk
+ }
+
+ public get isProvisioned() {
+ return this.walletConfig !== undefined
+ }
+
+ public get isInitialized() {
+ return this.walletHandle !== undefined
+ }
+
+ public get publicDid() {
+ return this.publicDidInfo
+ }
+
+ public get handle() {
+ if (!this.walletHandle) {
+ throw new AriesFrameworkError(
+ 'Wallet has not been initialized yet. Make sure to await agent.initialize() before using the agent.'
+ )
+ }
+
+ return this.walletHandle
+ }
+
+ public get masterSecretId() {
+ if (!this.isInitialized || !(this.walletConfig?.id || this.walletConfig?.masterSecretId)) {
+ throw new AriesFrameworkError(
+ 'Wallet has not been initialized yet. Make sure to await agent.initialize() before using the agent.'
+ )
+ }
+
+ return this.walletConfig?.masterSecretId ?? this.walletConfig.id
+ }
+
+ /**
+ * Dispose method is called when an agent context is disposed.
+ */
+ public async dispose() {
+ if (this.isInitialized) {
+ await this.close()
+ }
+ }
+
+ private walletStorageConfig(walletConfig: WalletConfig): IndySdkWalletConfig {
+ const walletStorageConfig: IndySdkWalletConfig = {
+ id: walletConfig.id,
+ storage_type: walletConfig.storage?.type,
+ }
+
+ if (walletConfig.storage?.config) {
+ walletStorageConfig.storage_config = walletConfig.storage?.config as WalletStorageConfig
+ }
+
+ return walletStorageConfig
+ }
+
+ private walletCredentials(
+ walletConfig: WalletConfig,
+ rekey?: string,
+ rekeyDerivation?: KeyDerivationMethod
+ ): OpenWalletCredentials {
+ const walletCredentials: OpenWalletCredentials = {
+ key: walletConfig.key,
+ key_derivation_method: walletConfig.keyDerivationMethod,
+ }
+ if (rekey) {
+ walletCredentials.rekey = rekey
+ }
+ if (rekeyDerivation) {
+ walletCredentials.rekey_derivation_method = rekeyDerivation
+ }
+ if (walletConfig.storage?.credentials) {
+ walletCredentials.storage_credentials = walletConfig.storage?.credentials as Record
+ }
+
+ return walletCredentials
+ }
+
+ /**
+ * @throws {WalletDuplicateError} if the wallet already exists
+ * @throws {WalletError} if another error occurs
+ */
+ public async create(walletConfig: WalletConfig): Promise {
+ await this.createAndOpen(walletConfig)
+ await this.close()
+ }
+
+ /**
+ * @throws {WalletDuplicateError} if the wallet already exists
+ * @throws {WalletError} if another error occurs
+ */
+ public async createAndOpen(walletConfig: WalletConfig): Promise {
+ this.logger.debug(`Creating wallet '${walletConfig.id}' using SQLite storage`)
+
+ try {
+ await this.indySdk.createWallet(this.walletStorageConfig(walletConfig), this.walletCredentials(walletConfig))
+ this.walletConfig = walletConfig
+
+ // We usually want to create master secret only once, therefore, we can to do so when creating a wallet.
+ await this.open(walletConfig)
+
+ // We need to open wallet before creating master secret because we need wallet handle here.
+ await this.createMasterSecret(this.handle, this.masterSecretId)
+ } catch (error) {
+ // If an error ocurred while creating the master secret, we should close the wallet
+ if (this.isInitialized) await this.close()
+
+ if (isIndyError(error, 'WalletAlreadyExistsError')) {
+ const errorMessage = `Wallet '${walletConfig.id}' already exists`
+ this.logger.debug(errorMessage)
+
+ throw new WalletDuplicateError(errorMessage, {
+ walletType: 'IndySdkWallet',
+ cause: error,
+ })
+ } else {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error creating wallet '${walletConfig.id}'`
+ this.logger.error(errorMessage, {
+ error,
+ errorMessage: error.message,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+
+ this.logger.debug(`Successfully created wallet '${walletConfig.id}'`)
+ }
+
+ /**
+ * @throws {WalletNotFoundError} if the wallet does not exist
+ * @throws {WalletError} if another error occurs
+ */
+ public async open(walletConfig: WalletConfig): Promise {
+ await this._open(walletConfig)
+ }
+
+ /**
+ * @throws {WalletNotFoundError} if the wallet does not exist
+ * @throws {WalletError} if another error occurs
+ */
+ public async rotateKey(walletConfig: WalletConfigRekey): Promise {
+ if (!walletConfig.rekey) {
+ throw new WalletError('Wallet rekey undefined!. Please specify the new wallet key')
+ }
+ await this._open(
+ {
+ id: walletConfig.id,
+ key: walletConfig.key,
+ keyDerivationMethod: walletConfig.keyDerivationMethod,
+ },
+ walletConfig.rekey,
+ walletConfig.rekeyDerivationMethod
+ )
+ }
+
+ /**
+ * @throws {WalletNotFoundError} if the wallet does not exist
+ * @throws {WalletError} if another error occurs
+ */
+ private async _open(
+ walletConfig: WalletConfig,
+ rekey?: string,
+ rekeyDerivation?: KeyDerivationMethod
+ ): Promise {
+ if (this.walletHandle) {
+ throw new WalletError(
+ 'Wallet instance already opened. Close the currently opened wallet before re-opening the wallet'
+ )
+ }
+
+ try {
+ this.walletHandle = await this.indySdk.openWallet(
+ this.walletStorageConfig(walletConfig),
+ this.walletCredentials(walletConfig, rekey, rekeyDerivation)
+ )
+ if (rekey) {
+ this.walletConfig = { ...walletConfig, key: rekey, keyDerivationMethod: rekeyDerivation }
+ } else {
+ this.walletConfig = walletConfig
+ }
+ } catch (error) {
+ if (isIndyError(error, 'WalletNotFoundError')) {
+ const errorMessage = `Wallet '${walletConfig.id}' not found`
+ this.logger.debug(errorMessage)
+
+ throw new WalletNotFoundError(errorMessage, {
+ walletType: 'IndySdkWallet',
+ cause: error,
+ })
+ } else if (isIndyError(error, 'WalletAccessFailed')) {
+ const errorMessage = `Incorrect key for wallet '${walletConfig.id}'`
+ this.logger.debug(errorMessage)
+ throw new WalletInvalidKeyError(errorMessage, {
+ walletType: 'IndySdkWallet',
+ cause: error,
+ })
+ } else {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error opening wallet '${walletConfig.id}': ${error.message}`
+ this.logger.error(errorMessage, {
+ error,
+ errorMessage: error.message,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+
+ this.logger.debug(`Wallet '${walletConfig.id}' opened with handle '${this.handle}'`)
+ }
+
+ /**
+ * @throws {WalletNotFoundError} if the wallet does not exist
+ * @throws {WalletError} if another error occurs
+ */
+ public async delete(): Promise {
+ if (!this.walletConfig) {
+ throw new WalletError(
+ 'Can not delete wallet that does not have wallet config set. Make sure to call create wallet before deleting the wallet'
+ )
+ }
+
+ this.logger.info(`Deleting wallet '${this.walletConfig.id}'`)
+
+ if (this.walletHandle) {
+ await this.close()
+ }
+
+ try {
+ await this.indySdk.deleteWallet(
+ this.walletStorageConfig(this.walletConfig),
+ this.walletCredentials(this.walletConfig)
+ )
+ } catch (error) {
+ if (isIndyError(error, 'WalletNotFoundError')) {
+ const errorMessage = `Error deleting wallet: wallet '${this.walletConfig.id}' not found`
+ this.logger.debug(errorMessage)
+
+ throw new WalletNotFoundError(errorMessage, {
+ walletType: 'IndySdkWallet',
+ cause: error,
+ })
+ } else {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error deleting wallet '${this.walletConfig.id}': ${error.message}`
+ this.logger.error(errorMessage, {
+ error,
+ errorMessage: error.message,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+ }
+
+ public async export(exportConfig: WalletExportImportConfig) {
+ try {
+ this.logger.debug(`Exporting wallet ${this.walletConfig?.id} to path ${exportConfig.path}`)
+ await this.indySdk.exportWallet(this.handle, exportConfig)
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error exporting wallet: ${error.message}`
+ this.logger.error(errorMessage, {
+ error,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+
+ public async import(walletConfig: WalletConfig, importConfig: WalletExportImportConfig) {
+ try {
+ this.logger.debug(`Importing wallet ${walletConfig.id} from path ${importConfig.path}`)
+ await this.indySdk.importWallet(
+ { id: walletConfig.id },
+ { key: walletConfig.key, key_derivation_method: walletConfig.keyDerivationMethod },
+ importConfig
+ )
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error importing wallet': ${error.message}`
+ this.logger.error(errorMessage, {
+ error,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+
+ /**
+ * @throws {WalletError} if the wallet is already closed or another error occurs
+ */
+ public async close(): Promise {
+ this.logger.debug(`Closing wallet ${this.walletConfig?.id}`)
+ if (!this.walletHandle) {
+ throw new WalletError('Wallet is in invalid state, you are trying to close wallet that has no `walletHandle`.')
+ }
+
+ try {
+ await this.indySdk.closeWallet(this.walletHandle)
+ this.walletHandle = undefined
+ this.publicDidInfo = undefined
+ } catch (error) {
+ if (isIndyError(error, 'WalletInvalidHandle')) {
+ const errorMessage = `Error closing wallet: wallet already closed`
+ this.logger.debug(errorMessage)
+
+ throw new WalletError(errorMessage, {
+ cause: error,
+ })
+ } else {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ const errorMessage = `Error closing wallet': ${error.message}`
+ this.logger.error(errorMessage, {
+ error,
+ errorMessage: error.message,
+ })
+
+ throw new WalletError(errorMessage, { cause: error })
+ }
+ }
+ }
+
+ /**
+ * Create master secret with specified id in currently opened wallet.
+ *
+ * If a master secret by this id already exists in the current wallet, the method
+ * will return without doing anything.
+ *
+ * @throws {WalletError} if an error occurs
+ */
+ private async createMasterSecret(walletHandle: number, masterSecretId: string): Promise {
+ this.logger.debug(`Creating master secret with id '${masterSecretId}' in wallet with handle '${walletHandle}'`)
+
+ try {
+ await this.indySdk.proverCreateMasterSecret(walletHandle, masterSecretId)
+
+ return masterSecretId
+ } catch (error) {
+ if (isIndyError(error, 'AnoncredsMasterSecretDuplicateNameError')) {
+ // master secret id is the same as the master secret id passed in the create function
+ // so if it already exists we can just assign it.
+ this.logger.debug(
+ `Master secret with id '${masterSecretId}' already exists in wallet with handle '${walletHandle}'`,
+ {
+ indyError: 'AnoncredsMasterSecretDuplicateNameError',
+ }
+ )
+
+ return masterSecretId
+ } else {
+ if (!isIndyError(error)) {
+ throw new AriesFrameworkError('Attempted to throw Indy error, but it was not an Indy error')
+ }
+
+ this.logger.error(`Error creating master secret with id ${masterSecretId}`, {
+ indyError: error.indyName,
+ error,
+ })
+
+ throw new WalletError(
+ `Error creating master secret with id ${masterSecretId} in wallet with handle '${walletHandle}'`,
+ { cause: error }
+ )
+ }
+ }
+ }
+
+ public async initPublicDid(didConfig: DidConfig) {
+ const { did, verkey } = await this.createDid(didConfig)
+ this.publicDidInfo = {
+ did,
+ verkey,
+ }
+ }
+
+ public async createDid(didConfig?: DidConfig): Promise {
+ try {
+ const [did, verkey] = await this.indySdk.createAndStoreMyDid(this.handle, didConfig || {})
+
+ return { did, verkey }
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError('Error creating Did', { cause: error })
+ }
+ }
+
+ /**
+ * Create a key with an optional seed and keyType.
+ * The keypair is also automatically stored in the wallet afterwards
+ *
+ * Bls12381g1g2 and X25519 are not supported.
+ *
+ * @param seed string The seed for creating a key
+ * @param keyType KeyType the type of key that should be created
+ *
+ * @returns a Key instance with a publicKeyBase58
+ *
+ * @throws {WalletError} When an unsupported keytype is requested
+ * @throws {WalletError} When the key could not be created
+ */
+ public async createKey({ seed, keyType }: WalletCreateKeyOptions): Promise {
+ try {
+ // Ed25519 is supported natively in Indy wallet
+ if (keyType === KeyType.Ed25519) {
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ //@ts-ignore
+ const verkey = await this.indySdk.createKey(this.handle, { seed, crypto_type: 'ed25519' })
+ return Key.fromPublicKeyBase58(verkey, keyType)
+ }
+
+ // Check if there is a signing key provider for the specified key type.
+ if (this.signingKeyProviderRegistry.hasProviderForKeyType(keyType)) {
+ const signingKeyProvider = this.signingKeyProviderRegistry.getProviderForKeyType(keyType)
+
+ const keyPair = await signingKeyProvider.createKeyPair({ seed })
+ await this.storeKeyPair(keyPair)
+ return Key.fromPublicKeyBase58(keyPair.publicKeyBase58, keyType)
+ }
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError(`Error creating key with key type '${keyType}': ${error.message}`, { cause: error })
+ }
+
+ throw new WalletError(`Unsupported key type: '${keyType}' for wallet IndySdkWallet`)
+ }
+
+ /**
+ * sign a Buffer with an instance of a Key class
+ *
+ * Bls12381g1g2, Bls12381g1 and X25519 are not supported.
+ *
+ * @param data Buffer The data that needs to be signed
+ * @param key Key The key that is used to sign the data
+ *
+ * @returns A signature for the data
+ */
+ public async sign({ data, key }: WalletSignOptions): Promise {
+ try {
+ // Ed25519 is supported natively in Indy wallet
+ if (key.keyType === KeyType.Ed25519) {
+ // Checks to see if it is an not an Array of messages, but just a single one
+ if (!TypedArrayEncoder.isTypedArray(data)) {
+ throw new WalletError(`${KeyType.Ed25519} does not support multiple singing of multiple messages`)
+ }
+ return await this.indySdk.cryptoSign(this.handle, key.publicKeyBase58, data as Buffer)
+ }
+
+ // Check if there is a signing key provider for the specified key type.
+ if (this.signingKeyProviderRegistry.hasProviderForKeyType(key.keyType)) {
+ const signingKeyProvider = this.signingKeyProviderRegistry.getProviderForKeyType(key.keyType)
+
+ const keyPair = await this.retrieveKeyPair(key.publicKeyBase58)
+ const signed = await signingKeyProvider.sign({
+ data,
+ privateKeyBase58: keyPair.privateKeyBase58,
+ publicKeyBase58: key.publicKeyBase58,
+ })
+
+ return signed
+ }
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError(`Error signing data with verkey ${key.publicKeyBase58}`, { cause: error })
+ }
+ throw new WalletError(`Unsupported keyType: ${key.keyType}`)
+ }
+
+ /**
+ * Verify the signature with the data and the used key
+ *
+ * Bls12381g1g2, Bls12381g1 and X25519 are not supported.
+ *
+ * @param data Buffer The data that has to be confirmed to be signed
+ * @param key Key The key that was used in the signing process
+ * @param signature Buffer The signature that was created by the signing process
+ *
+ * @returns A boolean whether the signature was created with the supplied data and key
+ *
+ * @throws {WalletError} When it could not do the verification
+ * @throws {WalletError} When an unsupported keytype is used
+ */
+ public async verify({ data, key, signature }: WalletVerifyOptions): Promise {
+ try {
+ // Ed25519 is supported natively in Indy wallet
+ if (key.keyType === KeyType.Ed25519) {
+ // Checks to see if it is an not an Array of messages, but just a single one
+ if (!TypedArrayEncoder.isTypedArray(data)) {
+ throw new WalletError(`${KeyType.Ed25519} does not support multiple singing of multiple messages`)
+ }
+ return await this.indySdk.cryptoVerify(key.publicKeyBase58, data as Buffer, signature)
+ }
+
+ // Check if there is a signing key provider for the specified key type.
+ if (this.signingKeyProviderRegistry.hasProviderForKeyType(key.keyType)) {
+ const signingKeyProvider = this.signingKeyProviderRegistry.getProviderForKeyType(key.keyType)
+
+ const signed = await signingKeyProvider.verify({
+ data,
+ signature,
+ publicKeyBase58: key.publicKeyBase58,
+ })
+
+ return signed
+ }
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError(`Error verifying signature of data signed with verkey ${key.publicKeyBase58}`, {
+ cause: error,
+ })
+ }
+ throw new WalletError(`Unsupported keyType: ${key.keyType}`)
+ }
+
+ public async pack(
+ payload: Record,
+ recipientKeys: string[],
+ senderVerkey?: string
+ ): Promise {
+ try {
+ const messageRaw = JsonEncoder.toBuffer(payload)
+ const packedMessage = await this.indySdk.packMessage(this.handle, messageRaw, recipientKeys, senderVerkey ?? null)
+ return JsonEncoder.fromBuffer(packedMessage)
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError('Error packing message', { cause: error })
+ }
+ }
+
+ public async unpack(messagePackage: EncryptedMessage): Promise {
+ try {
+ const unpackedMessageBuffer = await this.indySdk.unpackMessage(this.handle, JsonEncoder.toBuffer(messagePackage))
+ const unpackedMessage = JsonEncoder.fromBuffer(unpackedMessageBuffer)
+ return {
+ senderKey: unpackedMessage.sender_verkey,
+ recipientKey: unpackedMessage.recipient_verkey,
+ plaintextMessage: JsonEncoder.fromString(unpackedMessage.message),
+ }
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError('Error unpacking message', { cause: error })
+ }
+ }
+
+ public async generateNonce(): Promise {
+ try {
+ return await this.indySdk.generateNonce()
+ } catch (error) {
+ if (!isError(error)) {
+ throw new AriesFrameworkError('Attempted to throw error, but it was not of type Error', { cause: error })
+ }
+ throw new WalletError('Error generating nonce', { cause: error })
+ }
+ }
+
+ private async retrieveKeyPair(publicKeyBase58: string): Promise {
+ try {
+ const { value } = await this.indySdk.getWalletRecord(this.handle, 'KeyPairRecord', `key-${publicKeyBase58}`, {})
+ if (value) {
+ return JsonEncoder.fromString(value) as KeyPair
+ } else {
+ throw new WalletError(`No content found for record with public key: ${publicKeyBase58}`)
+ }
+ } catch (error) {
+ if (isIndyError(error, 'WalletItemNotFound')) {
+ throw new RecordNotFoundError(`KeyPairRecord not found for public key: ${publicKeyBase58}.`, {
+ recordType: 'KeyPairRecord',
+ cause: error,
+ })
+ }
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ private async storeKeyPair(keyPair: KeyPair): Promise {
+ try {
+ await this.indySdk.addWalletRecord(
+ this.handle,
+ 'KeyPairRecord',
+ `key-${keyPair.publicKeyBase58}`,
+ JSON.stringify(keyPair),
+ {
+ keyType: keyPair.keyType,
+ }
+ )
+ } catch (error) {
+ if (isIndyError(error, 'WalletItemAlreadyExists')) {
+ throw new RecordDuplicateError(`Record already exists`, { recordType: 'KeyPairRecord' })
+ }
+ throw isIndyError(error) ? new IndySdkError(error) : error
+ }
+ }
+
+ public async generateWalletKey() {
+ try {
+ return await this.indySdk.generateWalletKey()
+ } catch (error) {
+ throw new WalletError('Error generating wallet key', { cause: error })
+ }
+ }
+}
diff --git a/packages/indy-sdk/src/wallet/__tests__/IndySdkWallet.test.ts b/packages/indy-sdk/src/wallet/__tests__/IndySdkWallet.test.ts
new file mode 100644
index 0000000000..4b7f822f0e
--- /dev/null
+++ b/packages/indy-sdk/src/wallet/__tests__/IndySdkWallet.test.ts
@@ -0,0 +1,125 @@
+import type { WalletConfig } from '@aries-framework/core'
+
+import {
+ KeyType,
+ WalletError,
+ SigningProviderRegistry,
+ TypedArrayEncoder,
+ KeyDerivationMethod,
+} from '@aries-framework/core'
+
+import testLogger from '../../../../core/tests/logger'
+import { agentDependencies } from '../../../../node/src'
+import { IndySdkWallet } from '../IndySdkWallet'
+
+// use raw key derivation method to speed up wallet creating / opening / closing between tests
+const walletConfig: WalletConfig = {
+ id: 'Wallet: IndySdkWalletTest',
+ // generated using indy.generateWalletKey
+ key: 'CwNJroKHTSSj3XvE7ZAnuKiTn2C4QkFvxEqfm5rzhNrb',
+ keyDerivationMethod: KeyDerivationMethod.Raw,
+}
+
+const walletConfigWithMasterSecretId: WalletConfig = {
+ id: 'Wallet: WalletTestWithMasterSecretId',
+ // generated using indy.generateWalletKey
+ key: 'CwNJroKHTSSj3XvE7ZAnuKiTn2C4QkFvxEqfm5rzhNrb',
+ keyDerivationMethod: KeyDerivationMethod.Raw,
+ masterSecretId: 'customMasterSecretId',
+}
+
+describe('IndySdkWallet', () => {
+ let indySdkWallet: IndySdkWallet
+
+ const seed = 'sample-seed'
+ const message = TypedArrayEncoder.fromString('sample-message')
+
+ beforeEach(async () => {
+ indySdkWallet = new IndySdkWallet(agentDependencies.indy, testLogger, new SigningProviderRegistry([]))
+ await indySdkWallet.createAndOpen(walletConfig)
+ })
+
+ afterEach(async () => {
+ await indySdkWallet.delete()
+ })
+
+ test('Get the public DID', async () => {
+ await indySdkWallet.initPublicDid({ seed: '000000000000000000000000Trustee9' })
+ expect(indySdkWallet.publicDid).toMatchObject({
+ did: expect.any(String),
+ verkey: expect.any(String),
+ })
+ })
+
+ test('Get the Master Secret', () => {
+ expect(indySdkWallet.masterSecretId).toEqual('Wallet: IndySdkWalletTest')
+ })
+
+ test('Get the wallet handle', () => {
+ expect(indySdkWallet.handle).toEqual(expect.any(Number))
+ })
+
+ test('Initializes a public did', async () => {
+ await indySdkWallet.initPublicDid({ seed: '00000000000000000000000Forward01' })
+
+ expect(indySdkWallet.publicDid).toEqual({
+ did: 'DtWRdd6C5dN5vpcN6XRAvu',
+ verkey: '82RBSn3heLgXzZd74UsMC8Q8YRfEEhQoAM7LUqE6bevJ',
+ })
+ })
+
+ test('Generate Nonce', async () => {
+ await expect(indySdkWallet.generateNonce()).resolves.toEqual(expect.any(String))
+ })
+
+ test('Create ed25519 keypair', async () => {
+ await expect(
+ indySdkWallet.createKey({ seed: '2103de41b4ae37e8e28586d84a342b67', keyType: KeyType.Ed25519 })
+ ).resolves.toMatchObject({
+ keyType: KeyType.Ed25519,
+ })
+ })
+
+ test('Fail to create x25519 keypair', async () => {
+ await expect(indySdkWallet.createKey({ seed, keyType: KeyType.X25519 })).rejects.toThrowError(WalletError)
+ })
+
+ test('Create a signature with a ed25519 keypair', async () => {
+ const ed25519Key = await indySdkWallet.createKey({ keyType: KeyType.Ed25519 })
+ const signature = await indySdkWallet.sign({
+ data: message,
+ key: ed25519Key,
+ })
+ expect(signature.length).toStrictEqual(64)
+ })
+
+ test('Verify a signed message with a ed25519 publicKey', async () => {
+ const ed25519Key = await indySdkWallet.createKey({ keyType: KeyType.Ed25519 })
+ const signature = await indySdkWallet.sign({
+ data: message,
+ key: ed25519Key,
+ })
+ await expect(indySdkWallet.verify({ key: ed25519Key, data: message, signature })).resolves.toStrictEqual(true)
+ })
+
+ test('masterSecretId is equal to wallet ID by default', async () => {
+ expect(indySdkWallet.masterSecretId).toEqual(walletConfig.id)
+ })
+})
+
+describe('IndySdkWallet with custom Master Secret Id', () => {
+ let indySdkWallet: IndySdkWallet
+
+ beforeEach(async () => {
+ indySdkWallet = new IndySdkWallet(agentDependencies.indy, testLogger, new SigningProviderRegistry([]))
+ await indySdkWallet.createAndOpen(walletConfigWithMasterSecretId)
+ })
+
+ afterEach(async () => {
+ await indySdkWallet.delete()
+ })
+
+ test('masterSecretId is set by config', async () => {
+ expect(indySdkWallet.masterSecretId).toEqual(walletConfigWithMasterSecretId.masterSecretId)
+ })
+})
diff --git a/packages/indy-sdk/src/wallet/index.ts b/packages/indy-sdk/src/wallet/index.ts
new file mode 100644
index 0000000000..b327ed63bf
--- /dev/null
+++ b/packages/indy-sdk/src/wallet/index.ts
@@ -0,0 +1 @@
+export { IndySdkWallet } from './IndySdkWallet'
diff --git a/packages/indy-sdk/tsconfig.build.json b/packages/indy-sdk/tsconfig.build.json
new file mode 100644
index 0000000000..2b75d0adab
--- /dev/null
+++ b/packages/indy-sdk/tsconfig.build.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../tsconfig.build.json",
+ "compilerOptions": {
+ "outDir": "./build"
+ },
+ "include": ["src/**/*"]
+}
diff --git a/packages/indy-sdk/tsconfig.json b/packages/indy-sdk/tsconfig.json
new file mode 100644
index 0000000000..46efe6f721
--- /dev/null
+++ b/packages/indy-sdk/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "types": ["jest"]
+ }
+}
diff --git a/packages/question-answer/package.json b/packages/question-answer/package.json
index 8be53f94cc..01a769bea8 100644
--- a/packages/question-answer/package.json
+++ b/packages/question-answer/package.json
@@ -26,10 +26,8 @@
"dependencies": {
"class-transformer": "0.5.1",
"class-validator": "0.13.1",
- "rxjs": "^7.2.0"
- },
- "peerDependencies": {
- "@aries-framework/core": "0.2.5"
+ "rxjs": "^7.2.0",
+ "@aries-framework/core": "0.3.2"
},
"devDependencies": {
"@aries-framework/node": "0.3.2",
diff --git a/packages/react-native/package.json b/packages/react-native/package.json
index dfef41e5d2..dab91dd4ec 100644
--- a/packages/react-native/package.json
+++ b/packages/react-native/package.json
@@ -29,7 +29,7 @@
"events": "^3.3.0"
},
"devDependencies": {
- "@types/indy-sdk-react-native": "npm:@types/indy-sdk@^1.16.21",
+ "@types/indy-sdk-react-native": "npm:@types/indy-sdk@1.16.24",
"@types/react-native": "^0.64.10",
"indy-sdk-react-native": "^0.3.0",
"react": "17.0.1",
diff --git a/tests/transport/SubjectOutboundTransport.ts b/tests/transport/SubjectOutboundTransport.ts
index 7a7adfaa8e..16868df737 100644
--- a/tests/transport/SubjectOutboundTransport.ts
+++ b/tests/transport/SubjectOutboundTransport.ts
@@ -11,7 +11,7 @@ export class SubjectOutboundTransport implements OutboundTransport {
private agent!: Agent
private stop$!: Subject
- public supportedSchemes = ['rxjs']
+ public supportedSchemes = ['rxjs', 'wss']
public constructor(subjectMap: { [key: string]: Subject | undefined }) {
this.subjectMap = subjectMap
diff --git a/yarn.lock b/yarn.lock
index d28283327d..eb7826abc9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -29,38 +29,38 @@
dependencies:
"@babel/highlight" "^7.18.6"
-"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8", "@babel/compat-data@^7.19.1":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.1.tgz#72d647b4ff6a4f82878d184613353af1dd0290f9"
- integrity sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==
+"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0", "@babel/compat-data@^7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30"
+ integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==
"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.1.tgz#c8fa615c5e88e272564ace3d42fbc8b17bfeb22b"
- integrity sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92"
+ integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.19.0"
- "@babel/helper-compilation-targets" "^7.19.1"
- "@babel/helper-module-transforms" "^7.19.0"
- "@babel/helpers" "^7.19.0"
- "@babel/parser" "^7.19.1"
+ "@babel/generator" "^7.20.2"
+ "@babel/helper-compilation-targets" "^7.20.0"
+ "@babel/helper-module-transforms" "^7.20.2"
+ "@babel/helpers" "^7.20.1"
+ "@babel/parser" "^7.20.2"
"@babel/template" "^7.18.10"
- "@babel/traverse" "^7.19.1"
- "@babel/types" "^7.19.0"
+ "@babel/traverse" "^7.20.1"
+ "@babel/types" "^7.20.2"
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.19.0", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a"
- integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==
+"@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2":
+ version "7.20.4"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8"
+ integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==
dependencies:
- "@babel/types" "^7.19.0"
+ "@babel/types" "^7.20.2"
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"
@@ -79,27 +79,27 @@
"@babel/helper-explode-assignable-expression" "^7.18.6"
"@babel/types" "^7.18.9"
-"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.19.0", "@babel/helper-compilation-targets@^7.19.1":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz#7f630911d83b408b76fe584831c98e5395d7a17c"
- integrity sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==
+"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0":
+ version "7.20.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a"
+ integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==
dependencies:
- "@babel/compat-data" "^7.19.1"
+ "@babel/compat-data" "^7.20.0"
"@babel/helper-validator-option" "^7.18.6"
browserslist "^4.21.3"
semver "^6.3.0"
-"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.19.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b"
- integrity sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==
+"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.2":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz#3c08a5b5417c7f07b5cf3dfb6dc79cbec682e8c2"
+ integrity sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-member-expression-to-functions" "^7.18.9"
"@babel/helper-optimise-call-expression" "^7.18.6"
- "@babel/helper-replace-supers" "^7.18.9"
+ "@babel/helper-replace-supers" "^7.19.1"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/helper-create-regexp-features-plugin@^7.18.6":
@@ -163,19 +163,19 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30"
- integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==
+"@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.2":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712"
+ integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==
dependencies:
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-module-imports" "^7.18.6"
- "@babel/helper-simple-access" "^7.18.6"
+ "@babel/helper-simple-access" "^7.20.2"
"@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/helper-validator-identifier" "^7.18.6"
+ "@babel/helper-validator-identifier" "^7.19.1"
"@babel/template" "^7.18.10"
- "@babel/traverse" "^7.19.0"
- "@babel/types" "^7.19.0"
+ "@babel/traverse" "^7.20.1"
+ "@babel/types" "^7.20.2"
"@babel/helper-optimise-call-expression@^7.18.6":
version "7.18.6"
@@ -184,12 +184,12 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.8.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf"
- integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629"
+ integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==
-"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.18.9":
+"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.19.1":
version "7.19.1"
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78"
integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==
@@ -200,19 +200,19 @@
"@babel/traverse" "^7.19.1"
"@babel/types" "^7.19.0"
-"@babel/helper-simple-access@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea"
- integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==
+"@babel/helper-simple-access@^7.19.4", "@babel/helper-simple-access@^7.20.2":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9"
+ integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==
dependencies:
- "@babel/types" "^7.18.6"
+ "@babel/types" "^7.20.2"
"@babel/helper-skip-transparent-expression-wrappers@^7.18.9":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818"
- integrity sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==
+ version "7.20.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684"
+ integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==
dependencies:
- "@babel/types" "^7.18.9"
+ "@babel/types" "^7.20.0"
"@babel/helper-split-export-declaration@^7.18.6":
version "7.18.6"
@@ -221,12 +221,12 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-string-parser@^7.18.10":
- version "7.18.10"
- resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56"
- integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==
+"@babel/helper-string-parser@^7.19.4":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63"
+ integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
-"@babel/helper-validator-identifier@^7.18.6":
+"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
version "7.19.1"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
@@ -236,14 +236,14 @@
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"
integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==
-"@babel/helpers@^7.19.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18"
- integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==
+"@babel/helpers@^7.20.1":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9"
+ integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==
dependencies:
"@babel/template" "^7.18.10"
- "@babel/traverse" "^7.19.0"
- "@babel/types" "^7.19.0"
+ "@babel/traverse" "^7.20.1"
+ "@babel/types" "^7.20.0"
"@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6":
version "7.18.6"
@@ -254,10 +254,10 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.19.1":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.1.tgz#6f6d6c2e621aad19a92544cc217ed13f1aac5b4c"
- integrity sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==
+"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2":
+ version "7.20.3"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2"
+ integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==
"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0":
version "7.18.6"
@@ -284,15 +284,15 @@
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"
"@babel/plugin-proposal-object-rest-spread@^7.0.0":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz#f9434f6beb2c8cae9dfcf97d2a5941bbbf9ad4e7"
- integrity sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz#a556f59d555f06961df1e572bb5eca864c84022d"
+ integrity sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==
dependencies:
- "@babel/compat-data" "^7.18.8"
- "@babel/helper-compilation-targets" "^7.18.9"
- "@babel/helper-plugin-utils" "^7.18.9"
+ "@babel/compat-data" "^7.20.1"
+ "@babel/helper-compilation-targets" "^7.20.0"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-syntax-object-rest-spread" "^7.8.3"
- "@babel/plugin-transform-parameters" "^7.18.8"
+ "@babel/plugin-transform-parameters" "^7.20.1"
"@babel/plugin-proposal-optional-catch-binding@^7.0.0":
version "7.18.6"
@@ -423,12 +423,12 @@
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-syntax-typescript@^7.18.6", "@babel/plugin-syntax-typescript@^7.7.2":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285"
- integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==
+"@babel/plugin-syntax-typescript@^7.20.0", "@babel/plugin-syntax-typescript@^7.7.2":
+ version "7.20.0"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7"
+ integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
+ "@babel/helper-plugin-utils" "^7.19.0"
"@babel/plugin-transform-arrow-functions@^7.0.0":
version "7.18.6"
@@ -445,24 +445,24 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-block-scoping@^7.0.0":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz#f9b7e018ac3f373c81452d6ada8bd5a18928926d"
- integrity sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz#f59b1767e6385c663fd0bce655db6ca9c8b236ed"
+ integrity sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-transform-classes@^7.0.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.19.0.tgz#0e61ec257fba409c41372175e7c1e606dc79bb20"
- integrity sha512-YfeEE9kCjqTS9IitkgfJuxjcEtLUHMqa8yUJ6zdz8vR7hKuo6mOy2C05P0F1tdMmDCeuyidKnlrw/iTppHcr2A==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz#c0033cf1916ccf78202d04be4281d161f6709bb2"
+ integrity sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
- "@babel/helper-compilation-targets" "^7.19.0"
+ "@babel/helper-compilation-targets" "^7.20.0"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-optimise-call-expression" "^7.18.6"
- "@babel/helper-plugin-utils" "^7.19.0"
- "@babel/helper-replace-supers" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/helper-replace-supers" "^7.19.1"
"@babel/helper-split-export-declaration" "^7.18.6"
globals "^11.1.0"
@@ -474,11 +474,11 @@
"@babel/helper-plugin-utils" "^7.18.9"
"@babel/plugin-transform-destructuring@^7.0.0":
- version "7.18.13"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz#9e03bc4a94475d62b7f4114938e6c5c33372cbf5"
- integrity sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz#c23741cfa44ddd35f5e53896e88c75331b8b2792"
+ integrity sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-transform-exponentiation-operator@^7.0.0":
version "7.18.6"
@@ -527,14 +527,13 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883"
- integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==
+ version "7.19.6"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz#25b32feef24df8038fc1ec56038917eacb0b730c"
+ integrity sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==
dependencies:
- "@babel/helper-module-transforms" "^7.18.6"
- "@babel/helper-plugin-utils" "^7.18.6"
- "@babel/helper-simple-access" "^7.18.6"
- babel-plugin-dynamic-import-node "^2.3.3"
+ "@babel/helper-module-transforms" "^7.19.6"
+ "@babel/helper-plugin-utils" "^7.19.0"
+ "@babel/helper-simple-access" "^7.19.4"
"@babel/plugin-transform-object-assign@^7.0.0":
version "7.18.6"
@@ -551,12 +550,12 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/helper-replace-supers" "^7.18.6"
-"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.18.8":
- version "7.18.8"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a"
- integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==
+"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.1":
+ version "7.20.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz#7b3468d70c3c5b62e46be0a47b6045d8590fb748"
+ integrity sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-transform-property-literals@^7.0.0":
version "7.18.6"
@@ -580,11 +579,11 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-react-jsx-source@^7.0.0":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.18.6.tgz#06e9ae8a14d2bc19ce6e3c447d842032a50598fc"
- integrity sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==
+ version "7.19.6"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.19.6.tgz#88578ae8331e5887e8ce28e4c9dc83fb29da0b86"
+ integrity sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
+ "@babel/helper-plugin-utils" "^7.19.0"
"@babel/plugin-transform-react-jsx@^7.0.0":
version "7.19.0"
@@ -606,9 +605,9 @@
regenerator-transform "^0.15.0"
"@babel/plugin-transform-runtime@^7.0.0":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.1.tgz#a3df2d7312eea624c7889a2dcd37fd1dfd25b2c6"
- integrity sha512-2nJjTUFIzBMP/f/miLxEK9vxwW/KUXsdvN4sR//TmuDhe6yU2h57WmIOE12Gng3MDP/xpjUV/ToZRdcf8Yj4fA==
+ version "7.19.6"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.6.tgz#9d2a9dbf4e12644d6f46e5e75bfbf02b5d6e9194"
+ integrity sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==
dependencies:
"@babel/helper-module-imports" "^7.18.6"
"@babel/helper-plugin-utils" "^7.19.0"
@@ -647,13 +646,13 @@
"@babel/helper-plugin-utils" "^7.18.9"
"@babel/plugin-transform-typescript@^7.18.6", "@babel/plugin-transform-typescript@^7.5.0":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.1.tgz#adcf180a041dcbd29257ad31b0c65d4de531ce8d"
- integrity sha512-+ILcOU+6mWLlvCwnL920m2Ow3wWx3Wo8n2t5aROQmV55GZt+hOiLvBaa3DNzRjSEHa1aauRs4/YLmkCfFkhhRQ==
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.2.tgz#91515527b376fc122ba83b13d70b01af8fe98f3f"
+ integrity sha512-jvS+ngBfrnTUBfOQq8NfGnSbF9BrqlR6hjJ2yVxMkmO5nL/cdifNbI30EfjRlN4g5wYWNnMPyj5Sa6R1pbLeag==
dependencies:
- "@babel/helper-create-class-features-plugin" "^7.19.0"
- "@babel/helper-plugin-utils" "^7.19.0"
- "@babel/plugin-syntax-typescript" "^7.18.6"
+ "@babel/helper-create-class-features-plugin" "^7.20.2"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/plugin-syntax-typescript" "^7.20.0"
"@babel/plugin-transform-unicode-regex@^7.0.0":
version "7.18.6"
@@ -693,11 +692,11 @@
source-map-support "^0.5.16"
"@babel/runtime@^7.8.4":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"
- integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9"
+ integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==
dependencies:
- regenerator-runtime "^0.13.4"
+ regenerator-runtime "^0.13.10"
"@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.3.3":
version "7.18.10"
@@ -708,29 +707,29 @@
"@babel/parser" "^7.18.10"
"@babel/types" "^7.18.10"
-"@babel/traverse@^7.0.0", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.7.2":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.1.tgz#0fafe100a8c2a603b4718b1d9bf2568d1d193347"
- integrity sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==
+"@babel/traverse@^7.0.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1", "@babel/traverse@^7.7.2":
+ version "7.20.1"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8"
+ integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==
dependencies:
"@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.19.0"
+ "@babel/generator" "^7.20.1"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/parser" "^7.19.1"
- "@babel/types" "^7.19.0"
+ "@babel/parser" "^7.20.1"
+ "@babel/types" "^7.20.0"
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.19.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600"
- integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==
+"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
+ version "7.20.2"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842"
+ integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==
dependencies:
- "@babel/helper-string-parser" "^7.18.10"
- "@babel/helper-validator-identifier" "^7.18.6"
+ "@babel/helper-string-parser" "^7.19.4"
+ "@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"
"@bcoe/v8-coverage@^0.2.3":
@@ -1075,7 +1074,7 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
-"@jridgewell/resolve-uri@^3.0.3":
+"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
@@ -1085,7 +1084,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
-"@jridgewell/sourcemap-codec@^1.4.10":
+"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.14"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
@@ -1099,12 +1098,12 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping@^0.3.9":
- version "0.3.15"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774"
- integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==
+ version "0.3.17"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985"
+ integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==
dependencies:
- "@jridgewell/resolve-uri" "^3.0.3"
- "@jridgewell/sourcemap-codec" "^1.4.10"
+ "@jridgewell/resolve-uri" "3.1.0"
+ "@jridgewell/sourcemap-codec" "1.4.14"
"@lerna/add@4.0.0":
version "4.0.0"
@@ -2032,10 +2031,10 @@
dependencies:
"@octokit/openapi-types" "^12.11.0"
-"@peculiar/asn1-schema@^2.1.6":
- 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==
+"@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0":
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777"
+ integrity sha512-6GptMYDMyWBHTUKndHaDsRZUO/XMSgIns2krxcm2L7SEExRHwawFvSwNBhqNPR9HJwv3MruAiF1bhN0we6j6GQ==
dependencies:
asn1js "^3.0.5"
pvtsutils "^1.3.2"
@@ -2049,14 +2048,14 @@
tslib "^2.0.0"
"@peculiar/webcrypto@^1.0.22":
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.0.tgz#f941bd95285a0f8a3d2af39ccda5197b80cd32bf"
- integrity sha512-U58N44b2m3OuTgpmKgf0LPDOmP3bhwNz01vAnj1mBwxBASRhptWYK+M3zG+HBkDqGQM+bFsoIihTW8MdmPXEqg==
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.1.tgz#821493bd5ad0f05939bd5f53b28536f68158360a"
+ integrity sha512-eK4C6WTNYxoI7JOabMoZICiyqRRtJB220bh0Mbj5RwRycleZf9BPyZoxsTvpP0FpmVS2aS13NKOuh5/tN3sIRw==
dependencies:
- "@peculiar/asn1-schema" "^2.1.6"
+ "@peculiar/asn1-schema" "^2.3.0"
"@peculiar/json-schema" "^1.1.12"
pvtsutils "^1.3.2"
- tslib "^2.4.0"
+ tslib "^2.4.1"
webcrypto-core "^1.7.4"
"@react-native-community/cli-debugger-ui@^5.0.1":
@@ -2216,9 +2215,9 @@
integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==
"@sinonjs/commons@^1.7.0":
- version "1.8.3"
- resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d"
- integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==
+ version "1.8.5"
+ resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.5.tgz#e280c94c95f206dcfd5aca00a43f2156b758c764"
+ integrity sha512-rTpCA0wG1wUxglBSFdMMY0oTrKYvgf4fNgv/sXbfCVAdf+FnPBdKJR/7XbpTCwbCrvCbdPYnlWaUUYz4V2fPDA==
dependencies:
type-detect "4.0.8"
@@ -2325,9 +2324,9 @@
integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==
"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14":
- version "7.1.19"
- resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460"
- integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==
+ version "7.1.20"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359"
+ integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==
dependencies:
"@babel/parser" "^7.1.0"
"@babel/types" "^7.0.0"
@@ -2442,17 +2441,17 @@
dependencies:
"@types/node" "*"
-"@types/indy-sdk-react-native@npm:@types/indy-sdk@^1.16.21", "@types/indy-sdk@^1.16.21":
- version "1.16.21"
- resolved "https://registry.yarnpkg.com/@types/indy-sdk/-/indy-sdk-1.16.21.tgz#bb6178e2a515115b1bf225fb78506a3017d08aa8"
- integrity sha512-SIu1iOa77lkxkGlW09OinFwebe7U5oDYwI70NnPoe9nbDr63i0FozITWEyIdC1BloKvZRXne6nM4i9zy6E3n6g==
+"@types/indy-sdk-react-native@npm:@types/indy-sdk@1.16.24", "@types/indy-sdk@1.16.24":
+ version "1.16.24"
+ resolved "https://registry.yarnpkg.com/@types/indy-sdk/-/indy-sdk-1.16.24.tgz#1b8e33e8fd2a095a29cb06b76146ed14d1477cdd"
+ integrity sha512-5YliU8lqahihz46MPpiu1ZWNkG2c/lm9SI+Fp3DUV2HrGbuAPxI8dYg2CP6avuD5kfCYr6Y5+TaqeOH/aID0FQ==
dependencies:
buffer "^6.0.0"
"@types/inquirer@^8.1.3":
- version "8.2.3"
- resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.3.tgz#985515d04879a0d0c1f5f49ec375767410ba9dab"
- integrity sha512-ZlBqD+8WIVNy3KIVkl+Qne6bGLW2erwN0GJXY9Ri/9EMbyupee3xw3H0Mmv5kJoLyNpfd/oHlwKxO0DUDH7yWA==
+ version "8.2.5"
+ resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.5.tgz#c508423bcc11126db278170ab07347783ac2300c"
+ integrity sha512-QXlzybid60YtAwfgG3cpykptRYUx2KomzNutMlWsQC64J/WG/gQSl+P4w7A21sGN0VIxRVava4rgnT7FQmFCdg==
dependencies:
"@types/through" "*"
@@ -2562,16 +2561,16 @@
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==
"@types/react-native@^0.64.10":
- version "0.64.27"
- resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.64.27.tgz#f16e0b713c733c2476e7b16c92bf767f0675c560"
- integrity sha512-vOEGMQGKNp6B1UfofKvCit2AxwByI6cbSa71E2uuxuvFr7FATVlykDbUS/Yht1HJhnbP5qlNOYw4ocUvDGjwbA==
+ version "0.64.29"
+ resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.64.29.tgz#521544f12f01192e38cdaa376817eceb0c4104db"
+ integrity sha512-nCa4rcAlilTWL7wEUwTnxo6HjxQvFjVeDPK9taglDvId06pw/eOUu2NozfpwY91o8K7UdZn8VUoDRaGt2i8LBA==
dependencies:
"@types/react" "^17"
"@types/react@^17":
- version "17.0.50"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.50.tgz#39abb4f7098f546cfcd6b51207c90c4295ee81fc"
- integrity sha512-ZCBHzpDb5skMnc1zFXAXnL3l1FAdi+xZvwxK+PkglMmBrwjpp9nKaWuEvrGnSifCJmBFGxZOOFuwC6KH/s0NuA==
+ version "17.0.52"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b"
+ integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
@@ -2621,15 +2620,15 @@
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc"
integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==
-"@types/validator@^13.1.3":
- version "13.7.7"
- resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.7.tgz#e87cf34dd08522d21acf30130fd8941f433b81b5"
- integrity sha512-jiEw2kTUJ8Jsh4A1K4b5Pkjj9Xz6FktLLOQ36ZVLRkmxFbpTvAV2VRoKMojz8UlZxNg/2dZqzpigH4JYn1bkQg==
+"@types/validator@^13.1.3", "@types/validator@^13.7.10":
+ version "13.7.10"
+ resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.10.tgz#f9763dc0933f8324920afa9c0790308eedf55ca7"
+ integrity sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==
"@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==
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/@types/varint/-/varint-6.0.1.tgz#018d424627c7951d370d73816e97e143dc99523b"
+ integrity sha512-fQdOiZpDMBvaEdl12P1x7xlTPRAtd7qUUtVaWgkCy8DC//wCv19nqFFtrnR3y/ac6VFY0UUvYuQqfKzZTSE26w==
dependencies:
"@types/node" "*"
@@ -2811,9 +2810,9 @@ acorn@^7.1.1, acorn@^7.4.0:
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.2.4, acorn@^8.4.1:
- version "8.8.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8"
- integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==
+ version "8.8.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73"
+ integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==
add-stream@^1.0.0:
version "1.0.0"
@@ -2855,9 +2854,9 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4:
uri-js "^4.2.2"
ajv@^8.0.1:
- version "8.11.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f"
- integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==
+ version "8.11.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.2.tgz#aecb20b50607acf2569b6382167b65a96008bb78"
+ integrity sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
@@ -2933,9 +2932,9 @@ anymatch@^2.0.0:
normalize-path "^2.1.1"
anymatch@^3.0.3:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
- integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
@@ -3037,20 +3036,20 @@ array-ify@^1.0.0:
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
array-includes@^3.1.4:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb"
- integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==
+ version "3.1.6"
+ resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f"
+ integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
- es-abstract "^1.19.5"
- get-intrinsic "^1.1.1"
+ es-abstract "^1.20.4"
+ get-intrinsic "^1.1.3"
is-string "^1.0.7"
array-map@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662"
- integrity sha512-123XMszMB01QKVptpDQ7x1m1pP5NmJIG1kbl0JSPPRezvwQChxAN0Gvzo7rvR1IZ2tOL2tmiy7kY/KKgnpVVpg==
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.1.tgz#d1bf3cc8813a7daaa335e5c8eb21d9d06230c1a7"
+ integrity sha512-sxHIeJTGEsRC8/hYkZzdJNNPZ41EXHVys7pqMw1iwE/Kx8/hto0UbDuGQsSJ0ujPovj9qUZl6EOY/EiZ2g3d9Q==
array-reduce@~0.0.0:
version "0.0.0"
@@ -3068,23 +3067,23 @@ array-unique@^0.3.2:
integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==
array.prototype.flat@^1.2.5:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b"
- integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2"
+ integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
es-shim-unscopables "^1.0.0"
-array.prototype.reduce@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.4.tgz#8167e80089f78bff70a99e20bd4201d4663b0a6f"
- integrity sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw==
+array.prototype.reduce@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac"
+ integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
es-array-method-boxes-properly "^1.0.0"
is-string "^1.0.7"
@@ -3228,13 +3227,6 @@ babel-jest@^27.5.1:
graceful-fs "^4.2.9"
slash "^3.0.0"
-babel-plugin-dynamic-import-node@^2.3.3:
- version "2.3.3"
- resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3"
- integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==
- dependencies:
- object.assign "^4.1.0"
-
babel-plugin-istanbul@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"
@@ -3387,9 +3379,9 @@ bcrypt-pbkdf@^1.0.0:
tweetnacl "^0.14.3"
before-after-hook@^2.2.0:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e"
- integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c"
+ integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==
big-integer@1.6.x:
version "1.6.51"
@@ -3413,10 +3405,10 @@ bn.js@^5.2.0:
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70"
integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==
-body-parser@1.20.0:
- version "1.20.0"
- resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5"
- integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==
+body-parser@1.20.1:
+ version "1.20.1"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
+ integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
dependencies:
bytes "3.1.2"
content-type "~1.0.4"
@@ -3426,7 +3418,7 @@ body-parser@1.20.0:
http-errors "2.0.0"
iconv-lite "0.4.24"
on-finished "2.4.1"
- qs "6.10.3"
+ qs "6.11.0"
raw-body "2.5.1"
type-is "~1.6.18"
unpipe "1.0.0"
@@ -3654,9 +3646,9 @@ camelcase@^6.0.0, camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001400:
- version "1.0.30001412"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz#30f67d55a865da43e0aeec003f073ea8764d5d7c"
- integrity sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==
+ version "1.0.30001434"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz#ec1ec1cfb0a93a34a0600d37903853030520a4e5"
+ integrity sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==
canonicalize@^1.0.1:
version "1.0.8"
@@ -3726,16 +3718,16 @@ ci-info@^2.0.0:
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
ci-info@^3.2.0:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.4.0.tgz#b28484fd436cbc267900364f096c9dc185efb251"
- integrity sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef"
+ integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==
cjs-module-lexer@^1.0.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
-class-transformer@0.5.1:
+class-transformer@0.5.1, class-transformer@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/class-transformer/-/class-transformer-0.5.1.tgz#24147d5dffd2a6cea930a3250a677addf96ab336"
integrity sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==
@@ -3759,6 +3751,15 @@ class-validator@0.13.1:
libphonenumber-js "^1.9.7"
validator "^13.5.2"
+class-validator@^0.14.0:
+ version "0.14.0"
+ resolved "https://registry.yarnpkg.com/class-validator/-/class-validator-0.14.0.tgz#40ed0ecf3c83b2a8a6a320f4edb607be0f0df159"
+ integrity sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==
+ dependencies:
+ "@types/validator" "^13.7.10"
+ libphonenumber-js "^1.10.14"
+ validator "^13.7.0"
+
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -4146,11 +4147,9 @@ conventional-recommended-bump@^6.1.0:
q "^1.5.1"
convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369"
- integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==
- dependencies:
- safe-buffer "~5.1.1"
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
+ integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
cookie-signature@1.0.6:
version "1.0.6"
@@ -4168,9 +4167,9 @@ copy-descriptor@^0.1.0:
integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==
core-js-compat@^3.25.1:
- version "3.25.3"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.25.3.tgz#d6a442a03f4eade4555d4e640e6a06151dd95d38"
- integrity sha512-xVtYpJQ5grszDHEUU9O7XbjjcZ0ccX3LgQsyqSvTnjX97ZqEgn9F5srmrwwwMtbKzDllyFPL+O+2OFMl1lU4TQ==
+ version "3.26.1"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df"
+ integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A==
dependencies:
browserslist "^4.21.4"
@@ -4203,9 +4202,9 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0:
parse-json "^4.0.0"
cosmiconfig@^7.0.0:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
- integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6"
+ integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==
dependencies:
"@types/parse-json" "^4.0.0"
import-fresh "^3.2.1"
@@ -4304,9 +4303,9 @@ dateformat@^3.0.0:
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dayjs@^1.8.15:
- version "1.11.5"
- resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93"
- integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb"
+ integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
version "2.6.9"
@@ -4335,9 +4334,9 @@ debuglog@^1.0.1:
integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==
decamelize-keys@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
- integrity sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8"
+ integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==
dependencies:
decamelize "^1.1.0"
map-obj "^1.0.0"
@@ -4348,9 +4347,9 @@ decamelize@^1.1.0, decamelize@^1.2.0:
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
decimal.js@^10.2.1:
- version "10.4.1"
- resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.1.tgz#be75eeac4a2281aace80c1a8753587c27ef053e7"
- integrity sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw==
+ version "10.4.2"
+ resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.2.tgz#0341651d1d997d86065a2ce3a441fbd0d8e8b98e"
+ integrity sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==
decode-uri-component@^0.2.0:
version "0.2.2"
@@ -4383,9 +4382,9 @@ deepmerge@^4.2.2:
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
defaults@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
- integrity sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a"
+ integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==
dependencies:
clone "^1.0.2"
@@ -4493,9 +4492,9 @@ did-resolver@^3.1.3:
integrity sha512-Eeo2F524VM5N3W4GwglZrnul2y6TLTwMQP3In62JdG34NZoqihYyOZLk+5wUW8sSgvIYIcJM8Dlt3xsdKZZ3tg==
did-resolver@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.0.0.tgz#fc8f657b4cd7f44c2921051fb046599fbe7d4b31"
- integrity sha512-/roxrDr9EnAmLs+s9T+8+gcpilMo+IkeytcsGO7dcxvTmVJ+0Rt60HtV8o0UXHhGBo0Q+paMH/0ffXz1rqGFYg==
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/did-resolver/-/did-resolver-4.0.1.tgz#11bb3f19ed1c8f53f4af4702912fa9f7852fc305"
+ integrity sha512-eHs2VLKhcANmh08S87PKvOauIAmSOd7nb7AlhNxcvOyDAIGQY1UfbiqI1VOW5IDKvOO6aEWY+5edOt1qrCp1Eg==
diff-sequences@^26.6.2:
version "26.6.2"
@@ -4578,9 +4577,9 @@ ee-first@1.1.1:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.4.251:
- version "1.4.262"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.262.tgz#25715dfbae4c2e0640517cba184715241ecd8e63"
- integrity sha512-Ckn5haqmGh/xS8IbcgK3dnwAVnhDyo/WQnklWn6yaMucYTq7NNxwlGE8ElzEOnonzRLzUCo2Ot3vUb2GYUF2Hw==
+ version "1.4.284"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592"
+ integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==
emittery@^0.8.1:
version "0.8.1"
@@ -4655,10 +4654,10 @@ errorhandler@^1.5.0:
accepts "~1.3.7"
escape-html "~1.0.3"
-es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1:
- version "1.20.3"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.3.tgz#90b143ff7aedc8b3d189bcfac7f1e3e3f81e9da1"
- integrity sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==
+es-abstract@^1.19.0, es-abstract@^1.20.4:
+ version "1.20.4"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861"
+ integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==
dependencies:
call-bind "^1.0.2"
es-to-primitive "^1.2.1"
@@ -4670,7 +4669,7 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19
has-property-descriptors "^1.0.0"
has-symbols "^1.0.3"
internal-slot "^1.0.3"
- is-callable "^1.2.6"
+ is-callable "^1.2.7"
is-negative-zero "^2.0.2"
is-regex "^1.1.4"
is-shared-array-buffer "^1.0.2"
@@ -5014,20 +5013,20 @@ expo-modules-autolinking@^0.0.3:
fs-extra "^9.1.0"
expo-random@*:
- version "12.3.0"
- resolved "https://registry.yarnpkg.com/expo-random/-/expo-random-12.3.0.tgz#4a45bcb14e285a4a9161e4a5dc82ff6c3fc2ac0c"
- integrity sha512-q+AsTfGNT+Q+fb2sRrYtRkI3g5tV4H0kuYXM186aueILGO/vLn/YYFa7xFZj1IZ8LJZg2h96JDPDpsqHfRG2mQ==
+ version "13.0.0"
+ resolved "https://registry.yarnpkg.com/expo-random/-/expo-random-13.0.0.tgz#fc9c1496ac9f7555563d86de0db25966739c028f"
+ integrity sha512-aGb0vtUmFFuW0TF1rdOgsz89zEVD/RXUPUnnZy5+i3jJeQ2PerJ4uo72/EuWqHpCBNto8/qT+aCzFinmQDeTAA==
dependencies:
base64-js "^1.3.0"
express@^4.17.1:
- version "4.18.1"
- resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf"
- integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==
+ version "4.18.2"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
+ integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
dependencies:
accepts "~1.3.8"
array-flatten "1.1.1"
- body-parser "1.20.0"
+ body-parser "1.20.1"
content-disposition "0.5.4"
content-type "~1.0.4"
cookie "0.5.0"
@@ -5046,7 +5045,7 @@ express@^4.17.1:
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.7"
- qs "6.10.3"
+ qs "6.11.0"
range-parser "~1.2.1"
safe-buffer "5.2.1"
send "0.18.0"
@@ -5314,9 +5313,9 @@ flatted@^3.1.0:
integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==
flow-parser@0.*:
- version "0.187.1"
- resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.187.1.tgz#52b2c7ebd7544b75bda0676380138bc5b3de3177"
- integrity sha512-ZvlTeakTTMmYGukt4EIQtLEp4ie45W+jK325uukGgiqFg2Rl7TdpOJQbOLUN2xMeGS+WvXaK0uIJ3coPGDXFGQ==
+ version "0.193.0"
+ resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.193.0.tgz#8d705fc2d6b378a24bae189014f6f0320d040c4f"
+ integrity sha512-x7ZoArE1UO3Nk2rkq/KK/Tkp714QDMVzEsxIyK2+p7Alx+88LY7KgqmeQZuiAG8TCHucmYuHefbk3KsVFVjouA==
flow-parser@^0.121.0:
version "0.121.0"
@@ -5652,9 +5651,9 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globals@^13.6.0, globals@^13.9.0:
- version "13.17.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4"
- integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==
+ version "13.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.18.0.tgz#fb224daeeb2bb7d254cd2c640f003528b8d0c1dc"
+ integrity sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==
dependencies:
type-fest "^0.20.2"
@@ -6103,7 +6102,7 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.2.6:
+is-callable@^1.1.4, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
@@ -6116,9 +6115,9 @@ is-ci@^2.0.0:
ci-info "^2.0.0"
is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0:
- 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==
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
+ integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
dependencies:
has "^1.0.3"
@@ -6404,9 +6403,9 @@ istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0:
integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==
istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz#31d18bdd127f825dd02ea7bfdfd906f8ab840e9f"
- integrity sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d"
+ integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==
dependencies:
"@babel/core" "^7.12.3"
"@babel/parser" "^7.14.7"
@@ -6701,9 +6700,9 @@ jest-mock@^27.5.1:
"@types/node" "*"
jest-pnp-resolver@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c"
- integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
+ integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
jest-regex-util@^26.0.0:
version "26.0.0"
@@ -6933,9 +6932,9 @@ jetifier@^1.6.2:
integrity sha512-3Zi16h6L5tXDRQJTb221cnRoVG9/9OvreLdLU2/ZjRv/GILL+2Cemt0IKvkowwkDpvouAU1DQPOJ7qaiHeIdrw==
joi@^17.2.1:
- version "17.6.1"
- resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.1.tgz#e77422f277091711599634ac39a409e599d7bdaa"
- integrity sha512-Hl7/iBklIX345OCM1TiFSCZRVaAOLDGlWCp0Df2vWYgBgjkezaR7Kvm3joBciBHQjZj5sxXs859r6eqsRSlG8w==
+ version "17.7.0"
+ resolved "https://registry.yarnpkg.com/joi/-/joi-17.7.0.tgz#591a33b1fe1aca2bc27f290bcad9b9c1c570a6b3"
+ integrity sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg==
dependencies:
"@hapi/hoek" "^9.0.0"
"@hapi/topo" "^5.0.0"
@@ -7112,9 +7111,9 @@ jsonfile@^6.0.1:
graceful-fs "^4.1.6"
jsonify@~0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
- integrity sha512-trvBk1ki43VZptdBI5rIlG4YOzyeH/WefQt5rj1grasPn4iiZWKet8nkgc4GlsAylaztn0qZfUYOiTsASJFdNA==
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978"
+ integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==
jsonparse@^1.2.0, jsonparse@^1.3.1:
version "1.3.1"
@@ -7246,10 +7245,15 @@ libnpmpublish@^4.0.0:
semver "^7.1.3"
ssri "^8.0.1"
+libphonenumber-js@^1.10.14:
+ version "1.10.17"
+ resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.17.tgz#7efcfa3068fc076bc59a43a08a723ccd95308474"
+ integrity sha512-UQrNzsusSn5qaojdpWqporWRdpx6AGeb+egj64NrpYuyKHvnSH9jMp/1Dy3b/WnMyJA5zgV1yw//jC6J0dCXkw==
+
libphonenumber-js@^1.9.7:
- version "1.10.13"
- resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.13.tgz#0b5833c7fdbf671140530d83531c6753f7e0ea3c"
- integrity sha512-b74iyWmwb4GprAUPjPkJ11GTC7KX4Pd3onpJfKxYyY8y9Rbb4ERY47LvCMEDM09WD3thiLDMXtkfDK/AX+zT7Q==
+ version "1.10.14"
+ resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.14.tgz#e29da7f539751f724ac54017a098e3c7ca23de94"
+ integrity sha512-McGS7GV/WjJ2KjfOGhJU1oJn29RYeo7Q+RpANRbUNMQ9gj5XArpbjurSuyYPTejFwbaUojstQ4XyWCrAzGOUXw==
lines-and-columns@^1.1.6:
version "1.2.4"
@@ -7948,9 +7952,9 @@ minipass@^2.6.0, minipass@^2.9.0:
yallist "^3.0.0"
minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3:
- version "3.3.4"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae"
- integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==
+ 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"
@@ -8040,9 +8044,9 @@ mute-stream@0.0.8, mute-stream@~0.0.4:
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
nan@^2.11.1:
- version "2.16.0"
- resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916"
- integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==
+ version "2.17.0"
+ resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
+ integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
nanomatch@^1.2.9:
version "1.2.13"
@@ -8496,7 +8500,7 @@ object-visit@^1.0.0:
dependencies:
isobject "^3.0.0"
-object.assign@^4.1.0, object.assign@^4.1.4:
+object.assign@^4.1.4:
version "4.1.4"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f"
integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==
@@ -8507,14 +8511,14 @@ object.assign@^4.1.0, object.assign@^4.1.4:
object-keys "^1.1.1"
object.getownpropertydescriptors@^2.0.3:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.4.tgz#7965e6437a57278b587383831a9b829455a4bc37"
- integrity sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ==
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.5.tgz#db5a9002489b64eef903df81d6623c07e5b4b4d3"
+ integrity sha512-yDNzckpM6ntyQiGTik1fKV1DcVDRS+w8bvpWNCBanvH5LfRX9O8WTHqQzG4RZwRAM4I0oU7TV11Lj5v0g20ibw==
dependencies:
- array.prototype.reduce "^1.0.4"
+ array.prototype.reduce "^1.0.5"
call-bind "^1.0.2"
define-properties "^1.1.4"
- es-abstract "^1.20.1"
+ es-abstract "^1.20.4"
object.pick@^1.3.0:
version "1.3.0"
@@ -8524,13 +8528,13 @@ object.pick@^1.3.0:
isobject "^3.0.1"
object.values@^1.1.5:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac"
- integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d"
+ integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.1"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
on-finished@2.4.1:
version "2.4.1"
@@ -8963,9 +8967,9 @@ prettier-linter-helpers@^1.0.0:
fast-diff "^1.1.2"
prettier@^2.3.1:
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
- integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
+ integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==
pretty-format@^26.0.0, pretty-format@^26.5.2, pretty-format@^26.6.2:
version "26.6.2"
@@ -9010,9 +9014,9 @@ promise-retry@^2.0.1:
retry "^0.12.0"
promise@^8.0.3:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/promise/-/promise-8.2.0.tgz#a1f6280ab67457fbfc8aad2b198c9497e9e5c806"
- integrity sha512-+CMAlLHqwRYwBMXKCP+o8ns7DN+xHDUiI+0nArsiJ9y+kJVPLFxEaSw6Ha9s9H0tftxg2Yzl25wqj9G7m5wLZg==
+ version "8.3.0"
+ resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a"
+ integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==
dependencies:
asap "~2.0.6"
@@ -9098,14 +9102,7 @@ q@^1.5.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==
-qs@6.10.3:
- version "6.10.3"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e"
- integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==
- dependencies:
- side-channel "^1.0.4"
-
-qs@^6.9.4:
+qs@6.11.0, qs@^6.9.4:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
@@ -9178,9 +9175,9 @@ rc@^1.2.8:
strip-json-comments "~2.0.1"
react-devtools-core@^4.6.0:
- version "4.26.0"
- resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.26.0.tgz#d3d0f59d62ccf1ac03017a7e92f0fe71455019cc"
- integrity sha512-OO0Q+vXtHYCXvRQ6elLiOUph3MjsCpuYktGTLnBpizYm46f8tAPuJKihGkwsceitHSJNpzNIjJaYHgX96CyTUQ==
+ version "4.26.1"
+ resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.26.1.tgz#2893fea58089be64c5356d5bd0eebda8d1bbf317"
+ integrity sha512-r1csa5n9nABVpSdAadwTG7K+SfgRJPc/Hdx89BkV5IlA1mEGgGi3ir630ST5D/xYlJQaY3VE75YGADgpNW7HIw==
dependencies:
shell-quote "^1.6.1"
ws "^7"
@@ -9468,15 +9465,15 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
-regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4:
- version "0.13.9"
- resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
- integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==
+regenerator-runtime@^0.13.10, regenerator-runtime@^0.13.2:
+ version "0.13.11"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
+ integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
regenerator-transform@^0.15.0:
- version "0.15.0"
- resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.0.tgz#cbd9ead5d77fae1a48d957cf889ad0586adb6537"
- integrity sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==
+ version "0.15.1"
+ resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56"
+ integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==
dependencies:
"@babel/runtime" "^7.8.4"
@@ -9503,16 +9500,16 @@ regexpp@^3.1.0:
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
regexpu-core@^5.1.0:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.1.tgz#a69c26f324c1e962e9ffd0b88b055caba8089139"
- integrity sha512-HrnlNtpvqP1Xkb28tMhBUO2EbyUHdQlsnlAhzWcwHy8WJR53UWr7/MAvqrsQKMbV4qdpv03oTMG8iIhfsPFktQ==
+ version "5.2.2"
+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc"
+ integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw==
dependencies:
regenerate "^1.4.2"
regenerate-unicode-properties "^10.1.0"
regjsgen "^0.7.1"
regjsparser "^0.9.1"
unicode-match-property-ecmascript "^2.0.0"
- unicode-match-property-value-ecmascript "^2.0.0"
+ unicode-match-property-value-ecmascript "^2.1.0"
regjsgen@^0.7.1:
version "0.7.1"
@@ -9793,9 +9790,9 @@ scheduler@^0.20.1:
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
- version "7.3.7"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
- integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
+ version "7.3.8"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
+ integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
dependencies:
lru-cache "^6.0.0"
@@ -9907,9 +9904,9 @@ shell-quote@1.6.1:
jsonify "~0.0.0"
shell-quote@^1.6.1:
- version "1.7.3"
- resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123"
- integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==
+ version "1.7.4"
+ resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.4.tgz#33fe15dee71ab2a81fcbd3a52106c5cfb9fb75d8"
+ integrity sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw==
shelljs@^0.8.4:
version "0.8.5"
@@ -10030,9 +10027,9 @@ socks-proxy-agent@^6.0.0:
socks "^2.6.2"
socks@^2.3.3, socks@^2.6.2:
- version "2.7.0"
- resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.0.tgz#f9225acdb841e874dca25f870e9130990f3913d0"
- integrity sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55"
+ integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==
dependencies:
ip "^2.0.0"
smart-buffer "^4.2.0"
@@ -10170,9 +10167,9 @@ ssri@^8.0.0, ssri@^8.0.1:
minipass "^3.1.1"
stack-utils@^2.0.3:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5"
- integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
+ integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
dependencies:
escape-string-regexp "^2.0.0"
@@ -10248,22 +10245,22 @@ string-width@^1.0.1:
strip-ansi "^6.0.1"
string.prototype.trimend@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0"
- integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"
+ integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
- es-abstract "^1.19.5"
+ es-abstract "^1.20.4"
string.prototype.trimstart@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef"
- integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4"
+ integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==
dependencies:
call-bind "^1.0.2"
define-properties "^1.1.4"
- es-abstract "^1.19.5"
+ es-abstract "^1.20.4"
string_decoder@^1.1.1:
version "1.3.0"
@@ -10401,9 +10398,9 @@ table-layout@^1.0.2:
wordwrapjs "^4.0.0"
table@^6.0.9:
- version "6.8.0"
- resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca"
- integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==
+ version "6.8.1"
+ resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf"
+ integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==
dependencies:
ajv "^8.0.1"
lodash.truncate "^4.4.2"
@@ -10425,9 +10422,9 @@ tar@^4.4.12, tar@^4.4.13:
yallist "^3.1.1"
tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2:
- version "6.1.11"
- resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
- integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
+ version "6.1.12"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6"
+ integrity sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
@@ -10671,10 +10668,10 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
- integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
+ integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==
tslog@^3.2.0:
version "3.3.4"
@@ -10807,9 +10804,9 @@ uglify-es@^3.1.9:
source-map "~0.6.1"
uglify-js@^3.1.4:
- version "3.17.2"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.2.tgz#f55f668b9a64b213977ae688703b6bbb7ca861c6"
- integrity sha512-bbxglRjsGQMchfvXZNusUcYgiB9Hx2K4AHYXQy2DITZ9Rd+JzhX7+hoocE5Winr7z2oHvPsekkBwXtigvxevXg==
+ version "3.17.4"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c"
+ integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==
uid-number@0.0.6:
version "0.0.6"
@@ -10849,10 +10846,10 @@ unicode-match-property-ecmascript@^2.0.0:
unicode-canonical-property-names-ecmascript "^2.0.0"
unicode-property-aliases-ecmascript "^2.0.0"
-unicode-match-property-value-ecmascript@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714"
- integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==
+unicode-match-property-value-ecmascript@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0"
+ integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==
unicode-property-aliases-ecmascript@^2.0.0:
version "2.1.0"
@@ -10922,9 +10919,9 @@ upath@^2.0.1:
integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==
update-browserslist-db@^1.0.9:
- version "1.0.9"
- resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18"
- integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3"
+ integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==
dependencies:
escalade "^3.1.1"
picocolors "^1.0.0"
@@ -11032,7 +11029,7 @@ validate-npm-package-name@^3.0.0:
dependencies:
builtins "^1.0.3"
-validator@^13.5.2:
+validator@^13.5.2, validator@^13.7.0:
version "13.7.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857"
integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==
@@ -11090,9 +11087,9 @@ wcwidth@^1.0.0, wcwidth@^1.0.1:
defaults "^1.0.3"
web-did-resolver@^2.0.8:
- version "2.0.20"
- resolved "https://registry.yarnpkg.com/web-did-resolver/-/web-did-resolver-2.0.20.tgz#22e053b0f8bc1f4ab03da05989ce934852b7623f"
- integrity sha512-qGcrm01B+ytCZUYhxH0mGOk0Ldf67kXUXLsNth6F3sx3fhUKNSIE8D+MnMFRugQm7j87mDHqUTDLmW9c90g3nw==
+ version "2.0.21"
+ resolved "https://registry.yarnpkg.com/web-did-resolver/-/web-did-resolver-2.0.21.tgz#065797dee3e37cd9f19261d04a90144fe576e5df"
+ integrity sha512-vKYz0s9spYfYrKhrF88F44lkofS1yj6TCF40+i077a7boru2BNROl5VZEIVL9jJRUDsNzvmVSKkq3kS8kZnB2Q==
dependencies:
cross-fetch "^3.1.5"
did-resolver "^4.0.0"
From c34a3df580114a87a7d276213594f0d2339ba243 Mon Sep 17 00:00:00 2001
From: Karim Stekelenburg
Date: Thu, 12 Jan 2023 05:26:34 +0100
Subject: [PATCH 007/139] docs: update readme packages (#1206)
* docs: update readme packages
Signed-off-by: Karim Stekelenburg
Co-authored-by: Ariel Gentile
---
README.md | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 074c7a0127..314db5a4d6 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ Some features are not yet supported, but are on our roadmap. Check [the roadmap]
- ✅ Smart Auto Acceptance of Connections, Credentials and Proofs
- 🚧 Receiving and Verifying revocable Indy Credentials
- 🚧 W3C Linked Data VCs, BBS+ Signatures
-- 🚧 Multi Tenancy
+- ✅ Multi Tenancy
- ❌ Browser
### Packages
@@ -101,6 +101,29 @@ Some features are not yet supported, but are on our roadmap. Check [the roadmap]
+
+ @aries-framework/action-menu |
+
+
+
+
+ |
+
+ @aries-framework/question-answer |
+
+
+
+
+ |
+
+
+ @aries-framework/tenants |
+
+
+
+
+ |
+
## Getting Started
From 8a04d1b8e84f2198e1663aa9232ae59f53459ea5 Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Thu, 12 Jan 2023 18:01:19 +0800
Subject: [PATCH 008/139] chore: remove husky pre-push hook (#1209)
Signed-off-by: Timo Glastra
Signed-off-by: Timo Glastra
---
.husky/pre-push | 1 -
package.json | 2 --
yarn.lock | 5 -----
3 files changed, 8 deletions(-)
delete mode 100755 .husky/pre-push
diff --git a/.husky/pre-push b/.husky/pre-push
deleted file mode 100755
index b969aaaf8d..0000000000
--- a/.husky/pre-push
+++ /dev/null
@@ -1 +0,0 @@
-yarn validate
\ No newline at end of file
diff --git a/package.json b/package.json
index 139ef64ae7..636ee9f284 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,6 @@
"test": "jest",
"lint": "eslint --ignore-path .gitignore .",
"validate": "yarn lint && yarn check-types && yarn check-format",
- "prepare": "husky install",
"run-mediator": "ts-node ./samples/mediator.ts",
"next-version-bump": "ts-node ./scripts/get-next-bump.ts"
},
@@ -48,7 +47,6 @@
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"express": "^4.17.1",
- "husky": "^7.0.1",
"indy-sdk": "^1.16.0-dev-1636",
"jest": "^27.0.4",
"lerna": "^4.0.0",
diff --git a/yarn.lock b/yarn.lock
index eb7826abc9..dfd89ae3dc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5871,11 +5871,6 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
-husky@^7.0.1:
- version "7.0.4"
- resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
- integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
-
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
From 86647e7f55c9a362f6ab500538c4de2112e42206 Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Thu, 12 Jan 2023 19:05:19 +0800
Subject: [PATCH 009/139] feat(anoncreds): add anoncreds registry service
(#1204)
Signed-off-by: Timo Glastra
---
packages/anoncreds/src/AnonCredsModule.ts | 23 +++++
.../anoncreds/src/AnonCredsModuleConfig.ts | 28 ++++++
.../src/__tests__/AnonCredsModule.test.ts | 28 ++++++
.../__tests__/AnonCredsModuleConfig.test.ts | 15 ++++
.../anoncreds/src/error/AnonCredsError.ts | 7 ++
packages/anoncreds/src/error/index.ts | 1 +
packages/anoncreds/src/index.ts | 3 +
.../services/registry/AnonCredsRegistry.ts | 6 +-
.../registry/AnonCredsRegistryService.ts | 28 ++++++
.../AnonCredsRegistryService.test.ts | 38 ++++++++
packages/indy-sdk/src/IndySdkModuleConfig.ts | 2 +-
.../services/IndySdkAnonCredsRegistry.ts | 86 +++++++++++--------
.../services/IndySdkHolderService.ts | 1 -
.../utils/__tests__/identifiers.test.ts | 17 ++++
.../src/anoncreds/utils/identifiers.ts | 11 +++
15 files changed, 254 insertions(+), 40 deletions(-)
create mode 100644 packages/anoncreds/src/AnonCredsModule.ts
create mode 100644 packages/anoncreds/src/AnonCredsModuleConfig.ts
create mode 100644 packages/anoncreds/src/__tests__/AnonCredsModule.test.ts
create mode 100644 packages/anoncreds/src/__tests__/AnonCredsModuleConfig.test.ts
create mode 100644 packages/anoncreds/src/error/AnonCredsError.ts
create mode 100644 packages/anoncreds/src/error/index.ts
create mode 100644 packages/anoncreds/src/services/registry/AnonCredsRegistryService.ts
create mode 100644 packages/anoncreds/src/services/registry/__tests__/AnonCredsRegistryService.test.ts
diff --git a/packages/anoncreds/src/AnonCredsModule.ts b/packages/anoncreds/src/AnonCredsModule.ts
new file mode 100644
index 0000000000..0da6e242f7
--- /dev/null
+++ b/packages/anoncreds/src/AnonCredsModule.ts
@@ -0,0 +1,23 @@
+import type { AnonCredsModuleConfigOptions } from './AnonCredsModuleConfig'
+import type { DependencyManager, Module } from '@aries-framework/core'
+
+import { AnonCredsModuleConfig } from './AnonCredsModuleConfig'
+import { AnonCredsRegistryService } from './services/registry/AnonCredsRegistryService'
+
+/**
+ * @public
+ */
+export class AnonCredsModule implements Module {
+ public readonly config: AnonCredsModuleConfig
+
+ public constructor(config: AnonCredsModuleConfigOptions) {
+ this.config = new AnonCredsModuleConfig(config)
+ }
+
+ public register(dependencyManager: DependencyManager) {
+ // Config
+ dependencyManager.registerInstance(AnonCredsModuleConfig, this.config)
+
+ dependencyManager.registerSingleton(AnonCredsRegistryService)
+ }
+}
diff --git a/packages/anoncreds/src/AnonCredsModuleConfig.ts b/packages/anoncreds/src/AnonCredsModuleConfig.ts
new file mode 100644
index 0000000000..9f7b971aab
--- /dev/null
+++ b/packages/anoncreds/src/AnonCredsModuleConfig.ts
@@ -0,0 +1,28 @@
+import type { AnonCredsRegistry } from './services'
+
+/**
+ * @public
+ * AnonCredsModuleConfigOptions defines the interface for the options of the AnonCredsModuleConfig class.
+ */
+export interface AnonCredsModuleConfigOptions {
+ /**
+ * A list of AnonCreds registries to make available to the AnonCreds module.
+ */
+ registries: [AnonCredsRegistry, ...AnonCredsRegistry[]]
+}
+
+/**
+ * @public
+ */
+export class AnonCredsModuleConfig {
+ private options: AnonCredsModuleConfigOptions
+
+ public constructor(options: AnonCredsModuleConfigOptions) {
+ this.options = options
+ }
+
+ /** See {@link AnonCredsModuleConfigOptions.registries} */
+ public get registries() {
+ return this.options.registries
+ }
+}
diff --git a/packages/anoncreds/src/__tests__/AnonCredsModule.test.ts b/packages/anoncreds/src/__tests__/AnonCredsModule.test.ts
new file mode 100644
index 0000000000..90aa51ce66
--- /dev/null
+++ b/packages/anoncreds/src/__tests__/AnonCredsModule.test.ts
@@ -0,0 +1,28 @@
+import type { AnonCredsRegistry } from '../services'
+import type { DependencyManager } from '@aries-framework/core'
+
+import { AnonCredsModule } from '../AnonCredsModule'
+import { AnonCredsModuleConfig } from '../AnonCredsModuleConfig'
+import { AnonCredsRegistryService } from '../services/registry/AnonCredsRegistryService'
+
+const dependencyManager = {
+ registerInstance: jest.fn(),
+ registerSingleton: jest.fn(),
+} as unknown as DependencyManager
+
+const registry = {} as AnonCredsRegistry
+
+describe('AnonCredsModule', () => {
+ test('registers dependencies on the dependency manager', () => {
+ const anonCredsModule = new AnonCredsModule({
+ registries: [registry],
+ })
+ anonCredsModule.register(dependencyManager)
+
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledWith(AnonCredsRegistryService)
+
+ expect(dependencyManager.registerInstance).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerInstance).toHaveBeenCalledWith(AnonCredsModuleConfig, anonCredsModule.config)
+ })
+})
diff --git a/packages/anoncreds/src/__tests__/AnonCredsModuleConfig.test.ts b/packages/anoncreds/src/__tests__/AnonCredsModuleConfig.test.ts
new file mode 100644
index 0000000000..beaca8bf53
--- /dev/null
+++ b/packages/anoncreds/src/__tests__/AnonCredsModuleConfig.test.ts
@@ -0,0 +1,15 @@
+import type { AnonCredsRegistry } from '../services'
+
+import { AnonCredsModuleConfig } from '../AnonCredsModuleConfig'
+
+describe('AnonCredsModuleConfig', () => {
+ test('sets values', () => {
+ const registry = {} as AnonCredsRegistry
+
+ const config = new AnonCredsModuleConfig({
+ registries: [registry],
+ })
+
+ expect(config.registries).toEqual([registry])
+ })
+})
diff --git a/packages/anoncreds/src/error/AnonCredsError.ts b/packages/anoncreds/src/error/AnonCredsError.ts
new file mode 100644
index 0000000000..eb6d250a4a
--- /dev/null
+++ b/packages/anoncreds/src/error/AnonCredsError.ts
@@ -0,0 +1,7 @@
+import { AriesFrameworkError } from '@aries-framework/core'
+
+export class AnonCredsError extends AriesFrameworkError {
+ public constructor(message: string, { cause }: { cause?: Error } = {}) {
+ super(message, { cause })
+ }
+}
diff --git a/packages/anoncreds/src/error/index.ts b/packages/anoncreds/src/error/index.ts
new file mode 100644
index 0000000000..d9786950bf
--- /dev/null
+++ b/packages/anoncreds/src/error/index.ts
@@ -0,0 +1 @@
+export * from './AnonCredsError'
diff --git a/packages/anoncreds/src/index.ts b/packages/anoncreds/src/index.ts
index 83fdeb7877..759e343c2c 100644
--- a/packages/anoncreds/src/index.ts
+++ b/packages/anoncreds/src/index.ts
@@ -1,2 +1,5 @@
export * from './models'
export * from './services'
+export * from './error'
+export { AnonCredsModule } from './AnonCredsModule'
+export { AnonCredsModuleConfig, AnonCredsModuleConfigOptions } from './AnonCredsModuleConfig'
diff --git a/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts b/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
index 966a1afb95..e3061043dd 100644
--- a/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
+++ b/packages/anoncreds/src/services/registry/AnonCredsRegistry.ts
@@ -8,8 +8,12 @@ import type { GetRevocationRegistryDefinitionReturn } from './RevocationRegistry
import type { GetSchemaReturn, RegisterSchemaOptions, RegisterSchemaReturn } from './SchemaOptions'
import type { AgentContext } from '@aries-framework/core'
-// This service can be registered multiple times in a single AFJ instance.
+/**
+ * @public
+ */
export interface AnonCredsRegistry {
+ supportedIdentifier: RegExp
+
getSchema(agentContext: AgentContext, schemaId: string): Promise
registerSchema(agentContext: AgentContext, options: RegisterSchemaOptions): Promise
diff --git a/packages/anoncreds/src/services/registry/AnonCredsRegistryService.ts b/packages/anoncreds/src/services/registry/AnonCredsRegistryService.ts
new file mode 100644
index 0000000000..8ee8eb4b50
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/AnonCredsRegistryService.ts
@@ -0,0 +1,28 @@
+import type { AnonCredsRegistry } from '.'
+import type { AgentContext } from '@aries-framework/core'
+
+import { injectable } from '@aries-framework/core'
+
+import { AnonCredsModuleConfig } from '../../AnonCredsModuleConfig'
+import { AnonCredsError } from '../../error'
+
+/**
+ * @internal
+ * The AnonCreds registry service manages multiple {@link AnonCredsRegistry} instances
+ * and returns the correct registry based on a given identifier
+ */
+@injectable()
+export class AnonCredsRegistryService {
+ public async getRegistryForIdentifier(agentContext: AgentContext, identifier: string): Promise {
+ const registries = agentContext.dependencyManager.resolve(AnonCredsModuleConfig).registries
+
+ // TODO: should we check if multiple are registered?
+ const registry = registries.find((registry) => registry.supportedIdentifier.test(identifier))
+
+ if (!registry) {
+ throw new AnonCredsError(`No AnonCredsRegistry registered for identifier '${registry}'`)
+ }
+
+ return registry
+ }
+}
diff --git a/packages/anoncreds/src/services/registry/__tests__/AnonCredsRegistryService.test.ts b/packages/anoncreds/src/services/registry/__tests__/AnonCredsRegistryService.test.ts
new file mode 100644
index 0000000000..096626f805
--- /dev/null
+++ b/packages/anoncreds/src/services/registry/__tests__/AnonCredsRegistryService.test.ts
@@ -0,0 +1,38 @@
+import type { AnonCredsRegistry } from '../AnonCredsRegistry'
+
+import { getAgentContext } from '../../../../../core/tests/helpers'
+import { AnonCredsModuleConfig } from '../../../AnonCredsModuleConfig'
+import { AnonCredsError } from '../../../error'
+import { AnonCredsRegistryService } from '../AnonCredsRegistryService'
+
+const registryOne = {
+ supportedIdentifier: /a/,
+} as AnonCredsRegistry
+
+const registryTwo = {
+ supportedIdentifier: /b/,
+} as AnonCredsRegistry
+
+const agentContext = getAgentContext({
+ registerInstances: [
+ [
+ AnonCredsModuleConfig,
+ new AnonCredsModuleConfig({
+ registries: [registryOne, registryTwo],
+ }),
+ ],
+ ],
+})
+
+const anonCredsRegistryService = new AnonCredsRegistryService()
+
+describe('AnonCredsRegistryService', () => {
+ test('returns the registry for an identifier based on the supportedMethods regex', async () => {
+ await expect(anonCredsRegistryService.getRegistryForIdentifier(agentContext, 'a')).resolves.toEqual(registryOne)
+ await expect(anonCredsRegistryService.getRegistryForIdentifier(agentContext, 'b')).resolves.toEqual(registryTwo)
+ })
+
+ test('throws AnonCredsError if no registry is found for the given identifier', async () => {
+ await expect(anonCredsRegistryService.getRegistryForIdentifier(agentContext, 'c')).rejects.toThrow(AnonCredsError)
+ })
+})
diff --git a/packages/indy-sdk/src/IndySdkModuleConfig.ts b/packages/indy-sdk/src/IndySdkModuleConfig.ts
index a01bf813b3..e5b16142ee 100644
--- a/packages/indy-sdk/src/IndySdkModuleConfig.ts
+++ b/packages/indy-sdk/src/IndySdkModuleConfig.ts
@@ -38,7 +38,7 @@ export class IndySdkModuleConfig {
this.options = options
}
- /** See {@link IndySdkModuleConfigOptions.resolvers} */
+ /** See {@link IndySdkModuleConfigOptions.indySdk} */
public get indySdk() {
return this.options.indySdk
}
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
index 3b5c6a08ce..95b08fa88b 100644
--- a/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkAnonCredsRegistry.ts
@@ -1,3 +1,4 @@
+import type { IndySdk } from '../../types'
import type {
AnonCredsRegistry,
GetCredentialDefinitionReturn,
@@ -12,17 +13,16 @@ import type {
import type { AgentContext } from '@aries-framework/core'
import type { Schema as IndySdkSchema } from 'indy-sdk'
-import { inject } from '@aries-framework/core'
-
import { IndySdkError, isIndyError } from '../../error'
import { IndySdkPoolService } from '../../ledger'
-import { IndySdk, IndySdkSymbol } from '../../types'
+import { IndySdkSymbol } from '../../types'
import {
didFromCredentialDefinitionId,
didFromRevocationRegistryDefinitionId,
didFromSchemaId,
getLegacyCredentialDefinitionId,
getLegacySchemaId,
+ indySdkAnonCredsRegistryIdentifierRegex,
} from '../utils/identifiers'
import {
anonCredsRevocationListFromIndySdk,
@@ -33,32 +33,34 @@ import {
* TODO: validation of the identifiers. The Indy SDK classes only support the legacy (unqualified) identifiers.
*/
export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
- private indySdk: IndySdk
- private indySdkPoolService: IndySdkPoolService
-
- public constructor(@inject(IndySdkSymbol) indySdk: IndySdk, indySdkPoolService: IndySdkPoolService) {
- this.indySdk = indySdk
- this.indySdkPoolService = indySdkPoolService
- }
+ /**
+ * This class only supports resolving and registering objects with legacy indy identifiers.
+ * It needs to include support for the schema, credential definition, revocation registry as well
+ * as the issuer id (which is needed when registering objects).
+ */
+ public readonly supportedIdentifier = indySdkAnonCredsRegistryIdentifierRegex
public async getSchema(agentContext: AgentContext, schemaId: string): Promise {
try {
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
const did = didFromSchemaId(schemaId)
- const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+ const { pool } = await indySdkPoolService.getPoolForDid(agentContext, did)
agentContext.config.logger.debug(`Getting schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`)
- const request = await this.indySdk.buildGetSchemaRequest(null, schemaId)
+ const request = await indySdk.buildGetSchemaRequest(null, schemaId)
agentContext.config.logger.trace(
`Submitting get schema request for schema '${schemaId}' to ledger '${pool.didIndyNamespace}'`
)
- const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ const response = await indySdkPoolService.submitReadRequest(pool, request)
agentContext.config.logger.trace(`Got un-parsed schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`, {
response,
})
- const [, schema] = await this.indySdk.parseGetSchemaResponse(response)
+ const [, schema] = await indySdk.parseGetSchemaResponse(response)
agentContext.config.logger.debug(`Got schema '${schemaId}' from ledger '${pool.didIndyNamespace}'`, {
schema,
})
@@ -117,7 +119,10 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
}
try {
- const pool = this.indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
+ const pool = indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
agentContext.config.logger.debug(
`Register schema on ledger '${pool.didIndyNamespace}' with did '${options.schema.issuerId}'`,
options.schema
@@ -133,14 +138,9 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
// buildSchemaRequest (seqNo is not yet known)
} as IndySdkSchema
- const request = await this.indySdk.buildSchemaRequest(options.schema.issuerId, schema)
+ const request = await indySdk.buildSchemaRequest(options.schema.issuerId, schema)
- const response = await this.indySdkPoolService.submitWriteRequest(
- agentContext,
- pool,
- request,
- options.schema.issuerId
- )
+ const response = await indySdkPoolService.submitWriteRequest(agentContext, pool, request, options.schema.issuerId)
agentContext.config.logger.debug(`Registered schema '${schema.id}' on ledger '${pool.didIndyNamespace}'`, {
response,
schema,
@@ -189,19 +189,22 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
credentialDefinitionId: string
): Promise {
try {
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
const did = didFromCredentialDefinitionId(credentialDefinitionId)
- const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+ const { pool } = await indySdkPoolService.getPoolForDid(agentContext, did)
agentContext.config.logger.debug(
`Using ledger '${pool.didIndyNamespace}' to retrieve credential definition '${credentialDefinitionId}'`
)
- const request = await this.indySdk.buildGetCredDefRequest(null, credentialDefinitionId)
+ const request = await indySdk.buildGetCredDefRequest(null, credentialDefinitionId)
agentContext.config.logger.trace(
`Submitting get credential definition request for credential definition '${credentialDefinitionId}' to ledger '${pool.didIndyNamespace}'`
)
- const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ const response = await indySdkPoolService.submitReadRequest(pool, request)
agentContext.config.logger.trace(
`Got un-parsed credential definition '${credentialDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
{
@@ -209,7 +212,7 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
}
)
- const [, credentialDefinition] = await this.indySdk.parseGetCredDefResponse(response)
+ const [, credentialDefinition] = await indySdk.parseGetCredDefResponse(response)
agentContext.config.logger.debug(
`Got credential definition '${credentialDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
{
@@ -267,7 +270,10 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
}
try {
- const pool = this.indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
+ const pool = indySdkPoolService.getPoolForNamespace(options.options.didIndyNamespace)
agentContext.config.logger.debug(
`Registering credential definition on ledger '${pool.didIndyNamespace}' with did '${options.credentialDefinition.issuerId}'`,
options.credentialDefinition
@@ -296,7 +302,7 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
options.credentialDefinition.tag
)
- const request = await this.indySdk.buildCredDefRequest(options.credentialDefinition.issuerId, {
+ const request = await indySdk.buildCredDefRequest(options.credentialDefinition.issuerId, {
id: credentialDefinitionId,
schemaId: options.credentialDefinition.schemaId,
tag: options.credentialDefinition.tag,
@@ -305,7 +311,7 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
ver: '1.0',
})
- const response = await this.indySdkPoolService.submitWriteRequest(
+ const response = await indySdkPoolService.submitWriteRequest(
agentContext,
pool,
request,
@@ -350,18 +356,21 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
revocationRegistryDefinitionId: string
): Promise {
try {
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
const did = didFromRevocationRegistryDefinitionId(revocationRegistryDefinitionId)
- const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+ const { pool } = await indySdkPoolService.getPoolForDid(agentContext, did)
agentContext.config.logger.debug(
`Using ledger '${pool.didIndyNamespace}' to retrieve revocation registry definition '${revocationRegistryDefinitionId}'`
)
- const request = await this.indySdk.buildGetRevocRegDefRequest(null, revocationRegistryDefinitionId)
+ const request = await indySdk.buildGetRevocRegDefRequest(null, revocationRegistryDefinitionId)
agentContext.config.logger.trace(
`Submitting get revocation registry definition request for revocation registry definition '${revocationRegistryDefinitionId}' to ledger`
)
- const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ const response = await indySdkPoolService.submitReadRequest(pool, request)
agentContext.config.logger.trace(
`Got un-parsed revocation registry definition '${revocationRegistryDefinitionId}' from ledger '${pool.didIndyNamespace}'`,
{
@@ -369,7 +378,7 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
}
)
- const [, revocationRegistryDefinition] = await this.indySdk.parseGetRevocRegDefResponse(response)
+ const [, revocationRegistryDefinition] = await indySdk.parseGetRevocRegDefResponse(response)
agentContext.config.logger.debug(
`Got revocation registry definition '${revocationRegistryDefinitionId}' from ledger`,
@@ -415,21 +424,24 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
timestamp: number
): Promise {
try {
+ const indySdkPoolService = agentContext.dependencyManager.resolve(IndySdkPoolService)
+ const indySdk = agentContext.dependencyManager.resolve(IndySdkSymbol)
+
const did = didFromRevocationRegistryDefinitionId(revocationRegistryId)
- const { pool } = await this.indySdkPoolService.getPoolForDid(agentContext, did)
+ const { pool } = await indySdkPoolService.getPoolForDid(agentContext, did)
agentContext.config.logger.debug(
`Using ledger '${pool.id}' to retrieve revocation registry deltas with revocation registry definition id '${revocationRegistryId}' until ${timestamp}`
)
// TODO: implement caching for returned deltas
- const request = await this.indySdk.buildGetRevocRegDeltaRequest(null, revocationRegistryId, 0, timestamp)
+ const request = await indySdk.buildGetRevocRegDeltaRequest(null, revocationRegistryId, 0, timestamp)
agentContext.config.logger.trace(
`Submitting get revocation registry delta request for revocation registry '${revocationRegistryId}' to ledger`
)
- const response = await this.indySdkPoolService.submitReadRequest(pool, request)
+ const response = await indySdkPoolService.submitReadRequest(pool, request)
agentContext.config.logger.trace(
`Got revocation registry delta unparsed-response '${revocationRegistryId}' from ledger`,
{
@@ -437,7 +449,7 @@ export class IndySdkAnonCredsRegistry implements AnonCredsRegistry {
}
)
- const [, revocationRegistryDelta, deltaTimestamp] = await this.indySdk.parseGetRevocRegDeltaResponse(response)
+ const [, revocationRegistryDelta, deltaTimestamp] = await indySdk.parseGetRevocRegDeltaResponse(response)
agentContext.config.logger.debug(
`Got revocation registry deltas '${revocationRegistryId}' until timestamp ${timestamp} from ledger`,
diff --git a/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts b/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
index 88179381a9..49b619332d 100644
--- a/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
+++ b/packages/indy-sdk/src/anoncreds/services/IndySdkHolderService.ts
@@ -13,7 +13,6 @@ import type {
} from '@aries-framework/anoncreds'
import type { AgentContext } from '@aries-framework/core'
import type {
- Cred,
CredentialDefs,
IndyRequestedCredentials,
RevStates,
diff --git a/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts b/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
index f85ec160b5..76454b615a 100644
--- a/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
+++ b/packages/indy-sdk/src/anoncreds/utils/__tests__/identifiers.test.ts
@@ -5,9 +5,26 @@ import {
getIndySeqNoFromUnqualifiedCredentialDefinitionId,
getLegacyCredentialDefinitionId,
getLegacySchemaId,
+ indySdkAnonCredsRegistryIdentifierRegex,
} from '../identifiers'
describe('identifiers', () => {
+ it('matches against a legacy indy did, schema id, credential definition id and revocation registry id', () => {
+ const did = '7Tqg6BwSSWapxgUDm9KKgg'
+ const schemaId = 'BQ42WeE24jFHeyGg8x9XAz:2:Medical Bill:1.0'
+ const credentialDefinitionId = 'N7baRMcyvPwWc8v85CtZ6e:3:CL:100669:SCH Employee ID'
+ const revocationRegistryId =
+ 'N7baRMcyvPwWc8v85CtZ6e:4:N7baRMcyvPwWc8v85CtZ6e:3:CL:100669:SCH Employee ID:CL_ACCUM:1-1024'
+
+ const anotherId = 'some:id'
+
+ expect(indySdkAnonCredsRegistryIdentifierRegex.test(did)).toEqual(true)
+ expect(indySdkAnonCredsRegistryIdentifierRegex.test(schemaId)).toEqual(true)
+ expect(indySdkAnonCredsRegistryIdentifierRegex.test(credentialDefinitionId)).toEqual(true)
+ expect(indySdkAnonCredsRegistryIdentifierRegex.test(revocationRegistryId)).toEqual(true)
+ expect(indySdkAnonCredsRegistryIdentifierRegex.test(anotherId)).toEqual(false)
+ })
+
it('getLegacySchemaId should return a valid schema id given a did, name, and version', () => {
const did = '12345'
const name = 'backbench'
diff --git a/packages/indy-sdk/src/anoncreds/utils/identifiers.ts b/packages/indy-sdk/src/anoncreds/utils/identifiers.ts
index bc59b5f8d4..62d2650602 100644
--- a/packages/indy-sdk/src/anoncreds/utils/identifiers.ts
+++ b/packages/indy-sdk/src/anoncreds/utils/identifiers.ts
@@ -1,3 +1,14 @@
+export const legacyIndyIssuerIdRegex = /^[a-zA-Z0-9]{21,22}$/
+export const legacyIndySchemaIdRegex = /^[a-zA-Z0-9]{21,22}:2:.+:[0-9.]+$/
+export const legacyIndyCredentialDefinitionIdRegex =
+ /^[a-zA-Z0-9]{21,22}:3:CL:(([1-9][0-9]*)|([a-zA-Z0-9]{21,22}:2:.+:[0-9.]+)):(.+)?$/
+export const legacyIndyRevocationRegistryIdRegex =
+ /^[a-zA-Z0-9]{21,22}:4:[a-zA-Z0-9]{21,22}:3:CL:(([1-9][0-9]*)|([a-zA-Z0-9]{21,22}:2:.+:[0-9.]+))(:.+)?:CL_ACCUM:(.+$)/
+
+export const indySdkAnonCredsRegistryIdentifierRegex = new RegExp(
+ `${legacyIndyIssuerIdRegex.source}|${legacyIndySchemaIdRegex.source}|${legacyIndyCredentialDefinitionIdRegex.source}|${legacyIndyRevocationRegistryIdRegex.source}`
+)
+
export function getIndySeqNoFromUnqualifiedCredentialDefinitionId(unqualifiedCredentialDefinitionId: string): number {
// 5nDyJVP1NrcPAttP3xwMB9:3:CL:56495:npbd
const [, , , seqNo] = unqualifiedCredentialDefinitionId.split(':')
From b6f89f943dc4417626f868ac9f43a3d890ab62c6 Mon Sep 17 00:00:00 2001
From: Karim Stekelenburg
Date: Thu, 12 Jan 2023 14:59:39 +0100
Subject: [PATCH 010/139] feat: add minimal oidc-client package (#1197)
Work funded by the Government of Ontario.
* feat: add openid4vc-client package
Signed-off-by: Karim Stekelenburg
Co-authored-by: Timo Glastra
---
packages/openid4vc-client/README.md | 37 ++++++++++++++++++
packages/openid4vc-client/jest.config.ts | 14 +++++++
packages/openid4vc-client/package.json | 39 +++++++++++++++++++
.../src/OpenId4VcClientApi.ts | 17 ++++++++
.../src/OpenId4VcClientApiOptions.ts | 0
.../src/OpenId4VcClientModule.ts | 22 +++++++++++
.../src/OpenId4VcClientService.ts | 10 +++++
.../__tests__/OpenId4VcClientModule.test.ts | 24 ++++++++++++
packages/openid4vc-client/src/index.ts | 3 ++
packages/openid4vc-client/tests/setup.ts | 3 ++
packages/openid4vc-client/tsconfig.build.json | 7 ++++
packages/openid4vc-client/tsconfig.json | 6 +++
yarn.lock | 34 ++++++++++++++++
13 files changed, 216 insertions(+)
create mode 100644 packages/openid4vc-client/README.md
create mode 100644 packages/openid4vc-client/jest.config.ts
create mode 100644 packages/openid4vc-client/package.json
create mode 100644 packages/openid4vc-client/src/OpenId4VcClientApi.ts
create mode 100644 packages/openid4vc-client/src/OpenId4VcClientApiOptions.ts
create mode 100644 packages/openid4vc-client/src/OpenId4VcClientModule.ts
create mode 100644 packages/openid4vc-client/src/OpenId4VcClientService.ts
create mode 100644 packages/openid4vc-client/src/__tests__/OpenId4VcClientModule.test.ts
create mode 100644 packages/openid4vc-client/src/index.ts
create mode 100644 packages/openid4vc-client/tests/setup.ts
create mode 100644 packages/openid4vc-client/tsconfig.build.json
create mode 100644 packages/openid4vc-client/tsconfig.json
diff --git a/packages/openid4vc-client/README.md b/packages/openid4vc-client/README.md
new file mode 100644
index 0000000000..e89f6cab7a
--- /dev/null
+++ b/packages/openid4vc-client/README.md
@@ -0,0 +1,37 @@
+
+
+
+
+Aries Framework JavaScript Open ID Connect For Verifiable Credentials Client Module
+
+
+
+
+
+
+
+
+Open ID Connect For Verifiable Credentials Client Module for [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript).
+
+### Installation
+
+### Quick start
+
+### Example of usage
diff --git a/packages/openid4vc-client/jest.config.ts b/packages/openid4vc-client/jest.config.ts
new file mode 100644
index 0000000000..55c67d70a6
--- /dev/null
+++ b/packages/openid4vc-client/jest.config.ts
@@ -0,0 +1,14 @@
+import type { Config } from '@jest/types'
+
+import base from '../../jest.config.base'
+
+import packageJson from './package.json'
+
+const config: Config.InitialOptions = {
+ ...base,
+ name: packageJson.name,
+ displayName: packageJson.name,
+ setupFilesAfterEnv: ['./tests/setup.ts'],
+}
+
+export default config
diff --git a/packages/openid4vc-client/package.json b/packages/openid4vc-client/package.json
new file mode 100644
index 0000000000..ee4b727356
--- /dev/null
+++ b/packages/openid4vc-client/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@aries-framework/openid4vc-client",
+ "main": "build/index",
+ "types": "build/index",
+ "version": "0.3.2",
+ "files": [
+ "build"
+ ],
+ "license": "Apache-2.0",
+ "publishConfig": {
+ "access": "public"
+ },
+ "homepage": "https://github.com/hyperledger/aries-framework-javascript/tree/main/packages/openid4vc-client",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/hyperledger/aries-framework-javascript",
+ "directory": "packages/openid4vc-client"
+ },
+ "scripts": {
+ "build": "yarn run clean && yarn run compile",
+ "clean": "rimraf -rf ./build",
+ "compile": "tsc -p tsconfig.build.json",
+ "prepublishOnly": "yarn run build",
+ "test": "jest"
+ },
+ "dependencies": {
+ "@aries-framework/core": "0.3.2",
+ "@sphereon/openid4vci-client": "^0.3.6",
+ "class-transformer": "0.5.1",
+ "class-validator": "0.13.1"
+ },
+ "peerDependencies": {},
+ "devDependencies": {
+ "@aries-framework/node": "0.3.2",
+ "reflect-metadata": "^0.1.13",
+ "rimraf": "~3.0.2",
+ "typescript": "~4.3.0"
+ }
+}
diff --git a/packages/openid4vc-client/src/OpenId4VcClientApi.ts b/packages/openid4vc-client/src/OpenId4VcClientApi.ts
new file mode 100644
index 0000000000..ccf2cb84f3
--- /dev/null
+++ b/packages/openid4vc-client/src/OpenId4VcClientApi.ts
@@ -0,0 +1,17 @@
+import { AgentContext, injectable } from '@aries-framework/core'
+
+import { OpenId4VcClientService } from './OpenId4VcClientService'
+
+/**
+ * @public
+ */
+@injectable()
+export class OpenId4VcClientApi {
+ private agentContext: AgentContext
+ private openId4VcClientService: OpenId4VcClientService
+
+ public constructor(agentContext: AgentContext, openId4VcClientService: OpenId4VcClientService) {
+ this.agentContext = agentContext
+ this.openId4VcClientService = openId4VcClientService
+ }
+}
diff --git a/packages/openid4vc-client/src/OpenId4VcClientApiOptions.ts b/packages/openid4vc-client/src/OpenId4VcClientApiOptions.ts
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/packages/openid4vc-client/src/OpenId4VcClientModule.ts b/packages/openid4vc-client/src/OpenId4VcClientModule.ts
new file mode 100644
index 0000000000..fe941949cf
--- /dev/null
+++ b/packages/openid4vc-client/src/OpenId4VcClientModule.ts
@@ -0,0 +1,22 @@
+import type { DependencyManager, Module } from '@aries-framework/core'
+
+import { OpenId4VcClientApi } from './OpenId4VcClientApi'
+import { OpenId4VcClientService } from './OpenId4VcClientService'
+
+/**
+ * @public
+ */
+export class OpenId4VcClientModule implements Module {
+ public readonly api = OpenId4VcClientApi
+
+ /**
+ * Registers the dependencies of the question answer module on the dependency manager.
+ */
+ public register(dependencyManager: DependencyManager) {
+ // Api
+ dependencyManager.registerContextScoped(OpenId4VcClientApi)
+
+ // Services
+ dependencyManager.registerSingleton(OpenId4VcClientService)
+ }
+}
diff --git a/packages/openid4vc-client/src/OpenId4VcClientService.ts b/packages/openid4vc-client/src/OpenId4VcClientService.ts
new file mode 100644
index 0000000000..9c54e9b81c
--- /dev/null
+++ b/packages/openid4vc-client/src/OpenId4VcClientService.ts
@@ -0,0 +1,10 @@
+import { injectable, W3cCredentialService } from '@aries-framework/core'
+
+@injectable()
+export class OpenId4VcClientService {
+ private w3cCredentialService: W3cCredentialService
+
+ public constructor(w3cCredentialService: W3cCredentialService) {
+ this.w3cCredentialService = w3cCredentialService
+ }
+}
diff --git a/packages/openid4vc-client/src/__tests__/OpenId4VcClientModule.test.ts b/packages/openid4vc-client/src/__tests__/OpenId4VcClientModule.test.ts
new file mode 100644
index 0000000000..b02fa08ffc
--- /dev/null
+++ b/packages/openid4vc-client/src/__tests__/OpenId4VcClientModule.test.ts
@@ -0,0 +1,24 @@
+import type { DependencyManager } from '@aries-framework/core'
+
+import { OpenId4VcClientApi } from '../OpenId4VcClientApi'
+import { OpenId4VcClientModule } from '../OpenId4VcClientModule'
+import { OpenId4VcClientService } from '../OpenId4VcClientService'
+
+const dependencyManager = {
+ registerInstance: jest.fn(),
+ registerSingleton: jest.fn(),
+ registerContextScoped: jest.fn(),
+} as unknown as DependencyManager
+
+describe('OpenId4VcClientModule', () => {
+ test('registers dependencies on the dependency manager', () => {
+ const openId4VcClientModule = new OpenId4VcClientModule()
+ openId4VcClientModule.register(dependencyManager)
+
+ expect(dependencyManager.registerContextScoped).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerContextScoped).toHaveBeenCalledWith(OpenId4VcClientApi)
+
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledWith(OpenId4VcClientService)
+ })
+})
diff --git a/packages/openid4vc-client/src/index.ts b/packages/openid4vc-client/src/index.ts
new file mode 100644
index 0000000000..3200b8fa6d
--- /dev/null
+++ b/packages/openid4vc-client/src/index.ts
@@ -0,0 +1,3 @@
+export * from './OpenId4VcClientModule'
+export * from './OpenId4VcClientApi'
+export * from './OpenId4VcClientService'
diff --git a/packages/openid4vc-client/tests/setup.ts b/packages/openid4vc-client/tests/setup.ts
new file mode 100644
index 0000000000..4955aeb601
--- /dev/null
+++ b/packages/openid4vc-client/tests/setup.ts
@@ -0,0 +1,3 @@
+import 'reflect-metadata'
+
+jest.setTimeout(20000)
diff --git a/packages/openid4vc-client/tsconfig.build.json b/packages/openid4vc-client/tsconfig.build.json
new file mode 100644
index 0000000000..2b75d0adab
--- /dev/null
+++ b/packages/openid4vc-client/tsconfig.build.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../tsconfig.build.json",
+ "compilerOptions": {
+ "outDir": "./build"
+ },
+ "include": ["src/**/*"]
+}
diff --git a/packages/openid4vc-client/tsconfig.json b/packages/openid4vc-client/tsconfig.json
new file mode 100644
index 0000000000..46efe6f721
--- /dev/null
+++ b/packages/openid4vc-client/tsconfig.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "types": ["jest"]
+ }
+}
diff --git a/yarn.lock b/yarn.lock
index dfd89ae3dc..5fb0819bd7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2233,6 +2233,23 @@
resolved "https://registry.yarnpkg.com/@sovpro/delimited-stream/-/delimited-stream-1.1.0.tgz#4334bba7ee241036e580fdd99c019377630d26b4"
integrity sha512-kQpk267uxB19X3X2T1mvNMjyvIEonpNSHrMlK5ZaBU6aZxw7wPbpgKJOjHN3+/GPVpXgAV9soVT2oyHpLkLtyw==
+"@sphereon/openid4vci-client@^0.3.6":
+ version "0.3.6"
+ resolved "https://registry.yarnpkg.com/@sphereon/openid4vci-client/-/openid4vci-client-0.3.6.tgz#70bd76bb888b458274007170e2bb7e784849cbbe"
+ integrity sha512-C336F3VPMu1LSQAv1rn1KkXOVC3JxbrUzMzOBFlJfSKfnSxfqTqGSK0NTJLnAwGNOEAQ1M4Q/2KIXbDIaTU4Ww==
+ dependencies:
+ "@sphereon/ssi-types" "^0.8.1-next.123"
+ cross-fetch "^3.1.5"
+ debug "^4.3.4"
+ uint8arrays "^3.1.1"
+
+"@sphereon/ssi-types@^0.8.1-next.123":
+ version "0.8.1-unstable.145"
+ resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.8.1-unstable.145.tgz#418cf00ebb077ccb9644e652bc4e7fb0eb23b645"
+ integrity sha512-ixT8z5bwDWKJaMQTsUeRs7vMg5fz68BRJhxn10Tkeg68nJUEUHck44QJOhog0MmjNJKw2k6U/IqIS0oOdxTSHQ==
+ dependencies:
+ jwt-decode "^3.1.2"
+
"@stablelib/binary@^1.0.0", "@stablelib/binary@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@stablelib/binary/-/binary-1.0.1.tgz#c5900b94368baf00f811da5bdb1610963dfddf7f"
@@ -7125,6 +7142,11 @@ jsprim@^1.2.2:
json-schema "0.4.0"
verror "1.10.0"
+jwt-decode@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59"
+ integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==
+
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -8022,6 +8044,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==
+
multimatch@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6"
@@ -10808,6 +10835,13 @@ uid-number@0.0.6:
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
integrity sha512-c461FXIljswCuscZn67xq9PpszkPT6RjheWFQTgCyabJrTUozElanb0YEqv2UGgk247YpcJkFBuSGNvBlpXM9w==
+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"
+
ultron@1.0.x:
version "1.0.2"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"
From c697716bf1837b9fef307f60ff97f01d3d926728 Mon Sep 17 00:00:00 2001
From: Karim Stekelenburg
Date: Thu, 12 Jan 2023 16:13:02 +0100
Subject: [PATCH 011/139] fix(openid4vc-client): set package to private (#1210)
Signed-off-by: Karim Stekelenburg
---
packages/openid4vc-client/package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/openid4vc-client/package.json b/packages/openid4vc-client/package.json
index ee4b727356..cac010d054 100644
--- a/packages/openid4vc-client/package.json
+++ b/packages/openid4vc-client/package.json
@@ -6,6 +6,7 @@
"files": [
"build"
],
+ "private": true,
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
From 409d36c7e3623845f4718802b884bb40867806e1 Mon Sep 17 00:00:00 2001
From: Grammatopoulos Athanasios Vasileios
Date: Tue, 17 Jan 2023 15:33:01 +0200
Subject: [PATCH 012/139] docs: corrected some mistakes on demo documentation
(#1215)
Signed-off-by: Grammatopoulos Athanasios Vasileios
---
demo/README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/demo/README.md b/demo/README.md
index 7f4d71df0d..93f14ee99f 100644
--- a/demo/README.md
+++ b/demo/README.md
@@ -17,7 +17,7 @@ Alice, a former student of Faber College, connects with the College, is issued a
In order to use Aries Framework JavaScript some platform specific dependencies and setup is required. See our guides below to quickly set up you project with Aries Framework JavaScript for NodeJS, React Native and Electron.
-- [NodeJS](https:/aries.js.org/guides/getting-started/prerequisites/nodejs)
+- [NodeJS](https://aries.js.org/guides/getting-started/installation/nodejs)
### Run the demo
@@ -57,8 +57,8 @@ yarn faber
To set up a connection:
-- Select 'setup connection' in both Agents
-- Alice will print a invitation link which you then copy and paste to Faber
+- Select 'receive connection invitation' in Alice and 'create connection invitation' in Faber
+- Faber will print a invitation link which you then copy and paste to Alice
- You have now set up a connection!
To offer a credential:
@@ -66,7 +66,7 @@ To offer a credential:
- Select 'offer credential' in Faber
- Faber will start with registering a schema and the credential definition accordingly
- You have now send a credential offer to Alice!
-- Go to Alice to accept the incoming credential offer
+- Go to Alice to accept the incoming credential offer by selecting 'yes'.
To request a proof:
From 087980f1adf3ee0bc434ca9782243a62c6124444 Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Tue, 17 Jan 2023 23:48:40 +0800
Subject: [PATCH 013/139] fix: fix typing issues with typescript 4.9 (#1214)
Fixes https://github.com/hyperledger/aries-framework-javascript/issues/1205
Signed-off-by: Timo Glastra
---
package.json | 14 +-
packages/action-menu/package.json | 6 +-
.../src/services/ActionMenuService.ts | 4 +-
.../action-menu/tests/action-menu.e2e.test.ts | 4 +-
packages/anoncreds/package.json | 6 +-
.../src/services/AnonCredsHolderService.ts | 4 +-
.../src/services/AnonCredsIssuerService.ts | 4 +-
.../registry/CredentialDefinitionOptions.ts | 2 +-
.../registry/RevocationListOptions.ts | 2 +-
.../RevocationRegistryDefinitionOptions.ts | 2 +-
.../src/services/registry/SchemaOptions.ts | 2 +-
packages/bbs-signatures/package.json | 6 +-
packages/core/package.json | 6 +-
packages/core/src/agent/Agent.ts | 6 +-
packages/core/src/agent/AgentConfig.ts | 2 +-
packages/core/src/agent/AgentModules.ts | 2 +-
packages/core/src/agent/BaseAgent.ts | 6 +-
packages/core/src/agent/EnvelopeService.ts | 2 +-
packages/core/src/agent/Events.ts | 2 +-
.../core/src/agent/MessageHandlerRegistry.ts | 2 +-
packages/core/src/agent/MessageReceiver.ts | 6 +-
packages/core/src/agent/MessageSender.ts | 10 +-
packages/core/src/agent/TransportService.ts | 4 +-
.../core/src/agent/context/AgentContext.ts | 2 +-
packages/core/src/cache/PersistedLruCache.ts | 2 +-
packages/core/src/crypto/JwsService.ts | 2 +-
packages/core/src/crypto/WalletKeyPair.ts | 2 +-
.../SigningProviderRegistry.ts | 2 +-
.../service/ServiceDecoratorExtension.ts | 2 +-
.../basic-messages/BasicMessageEvents.ts | 2 +-
.../basic-messages/BasicMessagesApi.ts | 2 +-
.../modules/connections/ConnectionEvents.ts | 2 +-
.../src/modules/connections/ConnectionsApi.ts | 4 +-
.../modules/connections/ConnectionsModule.ts | 2 +-
.../connections/DidExchangeProtocol.ts | 4 +-
.../connections/DidExchangeStateMachine.ts | 2 +-
.../modules/connections/TrustPingEvents.ts | 2 +-
.../errors/ConnectionProblemReportError.ts | 2 +-
.../errors/DidExchangeProblemReportError.ts | 2 +-
.../modules/connections/models/did/DidDoc.ts | 2 +-
.../did/authentication/Authentication.ts | 2 +-
.../repository/ConnectionRecord.ts | 2 +-
.../modules/credentials/CredentialEvents.ts | 2 +-
.../credentials/CredentialProtocolOptions.ts | 37 +-
.../src/modules/credentials/CredentialsApi.ts | 30 +-
.../credentials/CredentialsApiOptions.ts | 16 +-
.../modules/credentials/CredentialsModule.ts | 4 +-
.../errors/CredentialProblemReportError.ts | 2 +-
.../formats/CredentialFormatService.ts | 4 +-
.../formats/CredentialFormatServiceOptions.ts | 4 +-
.../formats/indy/IndyCredentialFormat.ts | 2 +-
.../indy/IndyCredentialFormatService.ts | 2 +-
.../jsonld/JsonLdCredentialFormatService.ts | 12 +-
.../protocol/BaseCredentialProtocol.ts | 65 +-
...ldproof.connectionless-credentials.test.ts | 4 +-
.../repository/CredentialExchangeRecord.ts | 2 +-
packages/core/src/modules/dids/DidsModule.ts | 2 +-
.../dids/__tests__/dids-registrar.e2e.test.ts | 3 +-
.../dids/domain/key-type/bls12381g1.ts | 2 +-
.../dids/domain/key-type/bls12381g2.ts | 2 +-
.../modules/dids/domain/key-type/ed25519.ts | 2 +-
.../modules/dids/domain/key-type/x25519.ts | 2 +-
.../src/modules/dids/repository/DidRecord.ts | 2 +-
.../discover-features/DiscoverFeaturesApi.ts | 4 +-
.../DiscoverFeaturesApiOptions.ts | 2 +-
.../DiscoverFeaturesModule.ts | 2 +-
.../services/DiscoverFeaturesService.ts | 10 +-
.../generic-records/GenericRecordsApi.ts | 2 +-
.../indy/services/IndyRevocationService.ts | 2 +-
.../core/src/modules/ledger/LedgerModule.ts | 2 +-
packages/core/src/modules/oob/OutOfBandApi.ts | 2 +-
.../core/src/modules/oob/OutOfBandService.ts | 4 +-
.../src/modules/oob/domain/OutOfBandEvents.ts | 2 +-
.../core/src/modules/proofs/ProofEvents.ts | 2 +-
.../proofs/ProofResponseCoordinator.ts | 2 +-
.../core/src/modules/proofs/ProofService.ts | 50 +-
packages/core/src/modules/proofs/ProofsApi.ts | 12 +-
.../core/src/modules/proofs/ProofsModule.ts | 2 +-
.../proofs/__tests__/V1ProofService.test.ts | 2 +-
.../proofs/formats/ProofFormatService.ts | 42 +-
.../formats/ProofFormatServiceOptions.ts | 4 +-
.../proofs/formats/indy/IndyProofFormat.ts | 6 +-
.../formats/indy/IndyProofFormatService.ts | 4 +-
.../indy/IndyProofFormatsServiceOptions.ts | 6 +-
.../models/ProofFormatServiceOptions.ts | 2 +-
.../proofs/models/ProofServiceOptions.ts | 4 +-
.../modules/proofs/models/SharedOptions.ts | 2 +-
.../proofs/protocol/v2/V2ProofService.ts | 2 +-
.../core/src/modules/routing/MediatorApi.ts | 2 +-
.../src/modules/routing/MediatorModule.ts | 2 +-
.../core/src/modules/routing/RecipientApi.ts | 4 +-
.../src/modules/routing/RecipientModule.ts | 2 +-
.../core/src/modules/routing/RoutingEvents.ts | 4 +-
.../pickup/v1/MessagePickupService.ts | 2 +-
.../pickup/v2/V2MessagePickupService.ts | 2 +-
.../services/MediationRecipientService.ts | 2 +-
.../src/modules/vc/W3cCredentialService.ts | 6 +-
packages/core/src/modules/vc/W3cVcModule.ts | 2 +-
.../vc/__tests__/W3cCredentialService.test.ts | 2 +-
packages/core/src/modules/vc/jsonldUtil.ts | 2 +-
.../modules/vc/libraries/documentLoader.ts | 2 +-
.../vc/models/W3cCredentialServiceOptions.ts | 6 +-
.../vc/models/credential/W3cCredential.ts | 2 +-
.../credential/W3cVerifiableCredential.ts | 2 +-
.../credential/W3cVerifyCredentialResult.ts | 2 +-
.../presentation/W3cVerifiablePresentation.ts | 2 +-
packages/core/src/plugins/Module.ts | 2 +-
.../src/storage/InMemoryMessageRepository.ts | 2 +-
.../core/src/storage/IndyStorageService.ts | 7 +-
packages/core/src/storage/Repository.ts | 4 +-
packages/core/src/storage/RepositoryEvents.ts | 2 +-
packages/core/src/storage/StorageService.ts | 2 +-
.../storage/didcomm/DidCommMessageRecord.ts | 2 +-
.../didcomm/DidCommMessageRepository.ts | 2 +-
.../storage/migration/StorageUpdateService.ts | 2 +-
.../src/storage/migration/UpdateAssistant.ts | 2 +-
.../core/src/storage/migration/updates.ts | 4 +-
.../migration/updates/0.1-0.2/mediation.ts | 2 +-
.../src/transport/HttpOutboundTransport.ts | 2 +-
.../core/src/transport/WsOutboundTransport.ts | 4 +-
packages/core/src/types.ts | 1 -
packages/core/src/utils/attachment.ts | 2 +-
packages/core/src/utils/indyError.ts | 2 +-
packages/core/src/utils/messageType.ts | 2 +-
packages/core/src/wallet/IndyWallet.ts | 18 +-
packages/core/src/wallet/WalletApi.ts | 2 +-
packages/core/tests/oob.test.ts | 21 +-
packages/indy-sdk/package.json | 6 +-
.../src/dids/IndySdkSovDidRegistrar.ts | 2 +-
packages/indy-sdk/src/error/indyError.ts | 2 +-
packages/node/package.json | 10 +-
packages/openid4vc-client/package.json | 6 +-
packages/question-answer/package.json | 6 +-
.../tests/question-answer.e2e.test.ts | 4 +-
packages/react-native/package.json | 6 +-
packages/tenants/package.json | 6 +-
tests/e2e-subject.test.ts | 3 +-
tsconfig.build.json | 4 +-
yarn.lock | 1012 ++++++++++-------
139 files changed, 982 insertions(+), 741 deletions(-)
diff --git a/package.json b/package.json
index 636ee9f284..24f487b9a2 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"test": "jest",
"lint": "eslint --ignore-path .gitignore .",
"validate": "yarn lint && yarn check-types && yarn check-format",
+ "prepare": "husky install",
"run-mediator": "ts-node ./samples/mediator.ts",
"next-version-bump": "ts-node ./scripts/get-next-bump.ts"
},
@@ -31,12 +32,12 @@
"@types/eslint": "^7.2.13",
"@types/express": "^4.17.13",
"@types/jest": "^26.0.23",
- "@types/node": "^15.14.4",
+ "@types/node": "^16.11.7",
"@types/uuid": "^8.3.1",
"@types/varint": "^6.0.0",
"@types/ws": "^7.4.6",
- "@typescript-eslint/eslint-plugin": "^4.26.1",
- "@typescript-eslint/parser": "^4.26.1",
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
+ "@typescript-eslint/parser": "^5.48.1",
"conventional-changelog-conventionalcommits": "^5.0.0",
"conventional-recommended-bump": "^6.1.0",
"cors": "^2.8.5",
@@ -47,6 +48,7 @@
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"express": "^4.17.1",
+ "husky": "^7.0.1",
"indy-sdk": "^1.16.0-dev-1636",
"jest": "^27.0.4",
"lerna": "^4.0.0",
@@ -54,13 +56,13 @@
"rxjs": "^7.2.0",
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
- "tsconfig-paths": "^3.9.0",
+ "tsconfig-paths": "^4.1.2",
"tsyringe": "^4.7.0",
- "typescript": "~4.3.0",
+ "typescript": "~4.9.4",
"ws": "^7.4.6"
},
"resolutions": {
- "@types/node": "^15.14.4"
+ "@types/node": "^16.11.7"
},
"engines": {
"node": ">= 14"
diff --git a/packages/action-menu/package.json b/packages/action-menu/package.json
index 7537700f4c..e4b54a744a 100644
--- a/packages/action-menu/package.json
+++ b/packages/action-menu/package.json
@@ -18,7 +18,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -31,7 +31,7 @@
},
"devDependencies": {
"reflect-metadata": "^0.1.13",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/action-menu/src/services/ActionMenuService.ts b/packages/action-menu/src/services/ActionMenuService.ts
index 89c27f54a4..8282bc60bf 100644
--- a/packages/action-menu/src/services/ActionMenuService.ts
+++ b/packages/action-menu/src/services/ActionMenuService.ts
@@ -1,5 +1,3 @@
-import type { ActionMenuStateChangedEvent } from '../ActionMenuEvents'
-import type { ActionMenuProblemReportMessage } from '../messages'
import type {
ClearMenuOptions,
CreateMenuOptions,
@@ -7,6 +5,8 @@ import type {
CreateRequestOptions,
FindMenuOptions,
} from './ActionMenuServiceOptions'
+import type { ActionMenuStateChangedEvent } from '../ActionMenuEvents'
+import type { ActionMenuProblemReportMessage } from '../messages'
import type { AgentContext, InboundMessageContext, Logger, Query } from '@aries-framework/core'
import { AgentConfig, EventEmitter, AriesFrameworkError, injectable, JsonTransformer } from '@aries-framework/core'
diff --git a/packages/action-menu/tests/action-menu.e2e.test.ts b/packages/action-menu/tests/action-menu.e2e.test.ts
index b15524fd93..553d7e0c20 100644
--- a/packages/action-menu/tests/action-menu.e2e.test.ts
+++ b/packages/action-menu/tests/action-menu.e2e.test.ts
@@ -9,8 +9,6 @@ import { SubjectOutboundTransport } from '../../../tests/transport/SubjectOutbou
import { getAgentOptions, makeConnection } from '../../core/tests/helpers'
import testLogger from '../../core/tests/logger'
-import { waitForActionMenuRecord } from './helpers'
-
import {
ActionMenu,
ActionMenuModule,
@@ -19,6 +17,8 @@ import {
ActionMenuState,
} from '@aries-framework/action-menu'
+import { waitForActionMenuRecord } from './helpers'
+
const faberAgentOptions = getAgentOptions(
'Faber Action Menu',
{
diff --git a/packages/anoncreds/package.json b/packages/anoncreds/package.json
index 25033d94a2..473c115b01 100644
--- a/packages/anoncreds/package.json
+++ b/packages/anoncreds/package.json
@@ -19,7 +19,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -28,7 +28,7 @@
"@aries-framework/core": "0.3.2"
},
"devDependencies": {
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/anoncreds/src/services/AnonCredsHolderService.ts b/packages/anoncreds/src/services/AnonCredsHolderService.ts
index 3e287bde00..4991dbca1f 100644
--- a/packages/anoncreds/src/services/AnonCredsHolderService.ts
+++ b/packages/anoncreds/src/services/AnonCredsHolderService.ts
@@ -1,5 +1,3 @@
-import type { CredentialInfo } from '../models'
-import type { AnonCredsProof } from '../models/exchange'
import type {
CreateCredentialRequestOptions,
CreateCredentialRequestReturn,
@@ -9,6 +7,8 @@ import type {
GetCredentialsForProofRequestOptions,
GetCredentialsForProofRequestReturn,
} from './AnonCredsHolderServiceOptions'
+import type { CredentialInfo } from '../models'
+import type { AnonCredsProof } from '../models/exchange'
import type { AgentContext } from '@aries-framework/core'
export interface AnonCredsHolderService {
diff --git a/packages/anoncreds/src/services/AnonCredsIssuerService.ts b/packages/anoncreds/src/services/AnonCredsIssuerService.ts
index f3fb8c128f..0f34d300ef 100644
--- a/packages/anoncreds/src/services/AnonCredsIssuerService.ts
+++ b/packages/anoncreds/src/services/AnonCredsIssuerService.ts
@@ -1,5 +1,3 @@
-import type { AnonCredsCredentialOffer } from '../models/exchange'
-import type { AnonCredsCredentialDefinition, AnonCredsSchema } from '../models/registry'
import type {
CreateSchemaOptions,
CreateCredentialDefinitionOptions,
@@ -7,6 +5,8 @@ import type {
CreateCredentialReturn,
CreateCredentialOptions,
} from './AnonCredsIssuerServiceOptions'
+import type { AnonCredsCredentialOffer } from '../models/exchange'
+import type { AnonCredsCredentialDefinition, AnonCredsSchema } from '../models/registry'
import type { AgentContext } from '@aries-framework/core'
export interface AnonCredsIssuerService {
diff --git a/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts b/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
index e2f7e14298..142e784405 100644
--- a/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
+++ b/packages/anoncreds/src/services/registry/CredentialDefinitionOptions.ts
@@ -1,4 +1,3 @@
-import type { AnonCredsCredentialDefinition } from '../../models/registry'
import type {
AnonCredsResolutionMetadata,
Extensible,
@@ -6,6 +5,7 @@ import type {
AnonCredsOperationStateFinished,
AnonCredsOperationState,
} from './base'
+import type { AnonCredsCredentialDefinition } from '../../models/registry'
export interface GetCredentialDefinitionReturn {
credentialDefinition: AnonCredsCredentialDefinition | null
diff --git a/packages/anoncreds/src/services/registry/RevocationListOptions.ts b/packages/anoncreds/src/services/registry/RevocationListOptions.ts
index aea0c5d5b9..b6f0edea42 100644
--- a/packages/anoncreds/src/services/registry/RevocationListOptions.ts
+++ b/packages/anoncreds/src/services/registry/RevocationListOptions.ts
@@ -1,5 +1,5 @@
-import type { AnonCredsRevocationList } from '../../models/registry'
import type { AnonCredsResolutionMetadata, Extensible } from './base'
+import type { AnonCredsRevocationList } from '../../models/registry'
export interface GetRevocationListReturn {
revocationList: AnonCredsRevocationList | null
diff --git a/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts b/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
index 5e63f79995..6d45377114 100644
--- a/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
+++ b/packages/anoncreds/src/services/registry/RevocationRegistryDefinitionOptions.ts
@@ -1,5 +1,5 @@
-import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'
import type { AnonCredsResolutionMetadata, Extensible } from './base'
+import type { AnonCredsRevocationRegistryDefinition } from '../../models/registry'
export interface GetRevocationRegistryDefinitionReturn {
revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition | null
diff --git a/packages/anoncreds/src/services/registry/SchemaOptions.ts b/packages/anoncreds/src/services/registry/SchemaOptions.ts
index f4d706223a..c436859060 100644
--- a/packages/anoncreds/src/services/registry/SchemaOptions.ts
+++ b/packages/anoncreds/src/services/registry/SchemaOptions.ts
@@ -1,4 +1,3 @@
-import type { AnonCredsSchema } from '../../models/registry'
import type {
AnonCredsResolutionMetadata,
Extensible,
@@ -6,6 +5,7 @@ import type {
AnonCredsOperationStateFinished,
AnonCredsOperationState,
} from './base'
+import type { AnonCredsSchema } from '../../models/registry'
// Get Schema
export interface GetSchemaReturn {
diff --git a/packages/bbs-signatures/package.json b/packages/bbs-signatures/package.json
index 353048460f..96f1e6cdde 100644
--- a/packages/bbs-signatures/package.json
+++ b/packages/bbs-signatures/package.json
@@ -19,7 +19,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -36,8 +36,8 @@
"devDependencies": {
"@aries-framework/node": "*",
"reflect-metadata": "^0.1.13",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
},
"peerDependenciesMeta": {
"@animo-id/react-native-bbs-signatures": {
diff --git a/packages/core/package.json b/packages/core/package.json
index cd0e119a36..971091140e 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -18,7 +18,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build"
},
@@ -60,8 +60,8 @@
"@types/uuid": "^8.3.0",
"@types/varint": "^6.0.0",
"node-fetch": "^2.0",
- "rimraf": "~3.0.2",
+ "rimraf": "^4.0.7",
"tslog": "^3.2.0",
- "typescript": "~4.3.0"
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/core/src/agent/Agent.ts b/packages/core/src/agent/Agent.ts
index c4c5609387..a3a6b11ab1 100644
--- a/packages/core/src/agent/Agent.ts
+++ b/packages/core/src/agent/Agent.ts
@@ -1,9 +1,9 @@
-import type { InboundTransport } from '../transport/InboundTransport'
-import type { OutboundTransport } from '../transport/OutboundTransport'
-import type { InitConfig } from '../types'
import type { AgentDependencies } from './AgentDependencies'
import type { AgentModulesInput } from './AgentModules'
import type { AgentMessageReceivedEvent } from './Events'
+import type { InboundTransport } from '../transport/InboundTransport'
+import type { OutboundTransport } from '../transport/OutboundTransport'
+import type { InitConfig } from '../types'
import type { Subscription } from 'rxjs'
import { Subject } from 'rxjs'
diff --git a/packages/core/src/agent/AgentConfig.ts b/packages/core/src/agent/AgentConfig.ts
index cceef0e271..28ad67488a 100644
--- a/packages/core/src/agent/AgentConfig.ts
+++ b/packages/core/src/agent/AgentConfig.ts
@@ -1,6 +1,6 @@
+import type { AgentDependencies } from './AgentDependencies'
import type { Logger } from '../logger'
import type { InitConfig } from '../types'
-import type { AgentDependencies } from './AgentDependencies'
import { DID_COMM_TRANSPORT_QUEUE } from '../constants'
import { AriesFrameworkError } from '../error'
diff --git a/packages/core/src/agent/AgentModules.ts b/packages/core/src/agent/AgentModules.ts
index ce59b48daa..4bb5cc4067 100644
--- a/packages/core/src/agent/AgentModules.ts
+++ b/packages/core/src/agent/AgentModules.ts
@@ -1,7 +1,7 @@
+import type { AgentConfig } from './AgentConfig'
import type { Module, DependencyManager, ApiModule } from '../plugins'
import type { IsAny } from '../types'
import type { Constructor } from '../utils/mixins'
-import type { AgentConfig } from './AgentConfig'
import { BasicMessagesModule } from '../modules/basic-messages'
import { ConnectionsModule } from '../modules/connections'
diff --git a/packages/core/src/agent/BaseAgent.ts b/packages/core/src/agent/BaseAgent.ts
index b0abda3209..606b586a67 100644
--- a/packages/core/src/agent/BaseAgent.ts
+++ b/packages/core/src/agent/BaseAgent.ts
@@ -1,9 +1,9 @@
-import type { Logger } from '../logger'
-import type { CredentialsModule } from '../modules/credentials'
-import type { DependencyManager } from '../plugins'
import type { AgentConfig } from './AgentConfig'
import type { AgentApi, EmptyModuleMap, ModulesMap, WithoutDefaultModules, CustomOrDefaultApi } from './AgentModules'
import type { TransportSession } from './TransportService'
+import type { Logger } from '../logger'
+import type { CredentialsModule } from '../modules/credentials'
+import type { DependencyManager } from '../plugins'
import { AriesFrameworkError } from '../error'
import { BasicMessagesApi } from '../modules/basic-messages'
diff --git a/packages/core/src/agent/EnvelopeService.ts b/packages/core/src/agent/EnvelopeService.ts
index cd50b22fc0..df72e3d983 100644
--- a/packages/core/src/agent/EnvelopeService.ts
+++ b/packages/core/src/agent/EnvelopeService.ts
@@ -1,6 +1,6 @@
-import type { EncryptedMessage, PlaintextMessage } from '../types'
import type { AgentMessage } from './AgentMessage'
import type { AgentContext } from './context'
+import type { EncryptedMessage, PlaintextMessage } from '../types'
import { InjectionSymbols } from '../constants'
import { Key, KeyType } from '../crypto'
diff --git a/packages/core/src/agent/Events.ts b/packages/core/src/agent/Events.ts
index 4e7bb4b076..0eecc21fe4 100644
--- a/packages/core/src/agent/Events.ts
+++ b/packages/core/src/agent/Events.ts
@@ -1,6 +1,6 @@
-import type { ConnectionRecord } from '../modules/connections'
import type { AgentMessage } from './AgentMessage'
import type { OutboundMessageContext, OutboundMessageSendStatus } from './models'
+import type { ConnectionRecord } from '../modules/connections'
import type { Observable } from 'rxjs'
import { filter } from 'rxjs'
diff --git a/packages/core/src/agent/MessageHandlerRegistry.ts b/packages/core/src/agent/MessageHandlerRegistry.ts
index 3942c43c55..574a9331f3 100644
--- a/packages/core/src/agent/MessageHandlerRegistry.ts
+++ b/packages/core/src/agent/MessageHandlerRegistry.ts
@@ -39,7 +39,7 @@ export class MessageHandlerRegistry {
*/
public get supportedMessageTypes() {
return this.messageHandlers
- .reduce((all, cur) => [...all, ...cur.supportedMessages], [])
+ .reduce<(typeof AgentMessage)[]>((all, cur) => [...all, ...cur.supportedMessages], [])
.map((m) => m.type)
}
diff --git a/packages/core/src/agent/MessageReceiver.ts b/packages/core/src/agent/MessageReceiver.ts
index a87b42b7e2..befabec616 100644
--- a/packages/core/src/agent/MessageReceiver.ts
+++ b/packages/core/src/agent/MessageReceiver.ts
@@ -1,10 +1,10 @@
-import type { ConnectionRecord } from '../modules/connections'
-import type { InboundTransport } from '../transport'
-import type { EncryptedMessage, PlaintextMessage } from '../types'
import type { AgentMessage } from './AgentMessage'
import type { DecryptedMessageContext } from './EnvelopeService'
import type { TransportSession } from './TransportService'
import type { AgentContext } from './context'
+import type { ConnectionRecord } from '../modules/connections'
+import type { InboundTransport } from '../transport'
+import type { EncryptedMessage, PlaintextMessage } from '../types'
import { InjectionSymbols } from '../constants'
import { AriesFrameworkError } from '../error'
diff --git a/packages/core/src/agent/MessageSender.ts b/packages/core/src/agent/MessageSender.ts
index ac9ac731a2..04aad34d38 100644
--- a/packages/core/src/agent/MessageSender.ts
+++ b/packages/core/src/agent/MessageSender.ts
@@ -1,14 +1,14 @@
+import type { AgentMessage } from './AgentMessage'
+import type { EnvelopeKeys } from './EnvelopeService'
+import type { AgentMessageSentEvent } from './Events'
+import type { TransportSession } from './TransportService'
+import type { AgentContext } from './context'
import type { ConnectionRecord } from '../modules/connections'
import type { ResolvedDidCommService } from '../modules/didcomm'
import type { DidDocument } from '../modules/dids'
import type { OutOfBandRecord } from '../modules/oob/repository'
import type { OutboundTransport } from '../transport/OutboundTransport'
import type { OutboundPackage, EncryptedMessage } from '../types'
-import type { AgentMessage } from './AgentMessage'
-import type { EnvelopeKeys } from './EnvelopeService'
-import type { AgentMessageSentEvent } from './Events'
-import type { TransportSession } from './TransportService'
-import type { AgentContext } from './context'
import { DID_COMM_TRANSPORT_QUEUE, InjectionSymbols } from '../constants'
import { ReturnRouteTypes } from '../decorators/transport/TransportDecorator'
diff --git a/packages/core/src/agent/TransportService.ts b/packages/core/src/agent/TransportService.ts
index 55a9708ae0..0eda25500c 100644
--- a/packages/core/src/agent/TransportService.ts
+++ b/packages/core/src/agent/TransportService.ts
@@ -1,8 +1,8 @@
+import type { AgentMessage } from './AgentMessage'
+import type { EnvelopeKeys } from './EnvelopeService'
import type { ConnectionRecord } from '../modules/connections/repository'
import type { DidDocument } from '../modules/dids'
import type { EncryptedMessage } from '../types'
-import type { AgentMessage } from './AgentMessage'
-import type { EnvelopeKeys } from './EnvelopeService'
import { DID_COMM_TRANSPORT_QUEUE } from '../constants'
import { injectable } from '../plugins'
diff --git a/packages/core/src/agent/context/AgentContext.ts b/packages/core/src/agent/context/AgentContext.ts
index 714a5933a5..73a857d518 100644
--- a/packages/core/src/agent/context/AgentContext.ts
+++ b/packages/core/src/agent/context/AgentContext.ts
@@ -1,6 +1,6 @@
+import type { AgentContextProvider } from './AgentContextProvider'
import type { DependencyManager } from '../../plugins'
import type { Wallet } from '../../wallet'
-import type { AgentContextProvider } from './AgentContextProvider'
import { InjectionSymbols } from '../../constants'
import { AgentConfig } from '../AgentConfig'
diff --git a/packages/core/src/cache/PersistedLruCache.ts b/packages/core/src/cache/PersistedLruCache.ts
index ab00e0d14e..bb94c41bee 100644
--- a/packages/core/src/cache/PersistedLruCache.ts
+++ b/packages/core/src/cache/PersistedLruCache.ts
@@ -1,5 +1,5 @@
-import type { AgentContext } from '../agent'
import type { CacheRepository } from './CacheRepository'
+import type { AgentContext } from '../agent'
import { LRUMap } from 'lru_map'
diff --git a/packages/core/src/crypto/JwsService.ts b/packages/core/src/crypto/JwsService.ts
index 29a7f390e0..ffad03c128 100644
--- a/packages/core/src/crypto/JwsService.ts
+++ b/packages/core/src/crypto/JwsService.ts
@@ -1,6 +1,6 @@
+import type { Jws, JwsGeneralFormat } from './JwsTypes'
import type { AgentContext } from '../agent'
import type { Buffer } from '../utils'
-import type { Jws, JwsGeneralFormat } from './JwsTypes'
import { AriesFrameworkError } from '../error'
import { injectable } from '../plugins'
diff --git a/packages/core/src/crypto/WalletKeyPair.ts b/packages/core/src/crypto/WalletKeyPair.ts
index f5008112db..7df8cbb6ad 100644
--- a/packages/core/src/crypto/WalletKeyPair.ts
+++ b/packages/core/src/crypto/WalletKeyPair.ts
@@ -1,6 +1,6 @@
+import type { Key } from './Key'
import type { LdKeyPairOptions } from '../modules/vc/models/LdKeyPair'
import type { Wallet } from '../wallet'
-import type { Key } from './Key'
import { VerificationMethod } from '../modules/dids'
import { getKeyDidMappingByVerificationMethod } from '../modules/dids/domain/key-type/keyDidMapping'
diff --git a/packages/core/src/crypto/signing-provider/SigningProviderRegistry.ts b/packages/core/src/crypto/signing-provider/SigningProviderRegistry.ts
index 8a33483d2d..db71348ef6 100644
--- a/packages/core/src/crypto/signing-provider/SigningProviderRegistry.ts
+++ b/packages/core/src/crypto/signing-provider/SigningProviderRegistry.ts
@@ -1,5 +1,5 @@
-import type { KeyType } from '..'
import type { SigningProvider } from './SigningProvider'
+import type { KeyType } from '../KeyType'
import { AriesFrameworkError } from '../../error'
import { injectable, injectAll } from '../../plugins'
diff --git a/packages/core/src/decorators/service/ServiceDecoratorExtension.ts b/packages/core/src/decorators/service/ServiceDecoratorExtension.ts
index ecf2f9a044..776e8f702f 100644
--- a/packages/core/src/decorators/service/ServiceDecoratorExtension.ts
+++ b/packages/core/src/decorators/service/ServiceDecoratorExtension.ts
@@ -1,5 +1,5 @@
-import type { BaseMessageConstructor } from '../../agent/BaseMessage'
import type { ServiceDecoratorOptions } from './ServiceDecorator'
+import type { BaseMessageConstructor } from '../../agent/BaseMessage'
import { Expose, Type } from 'class-transformer'
import { IsOptional, ValidateNested } from 'class-validator'
diff --git a/packages/core/src/modules/basic-messages/BasicMessageEvents.ts b/packages/core/src/modules/basic-messages/BasicMessageEvents.ts
index 7c25f5b9c4..f05873f5de 100644
--- a/packages/core/src/modules/basic-messages/BasicMessageEvents.ts
+++ b/packages/core/src/modules/basic-messages/BasicMessageEvents.ts
@@ -1,6 +1,6 @@
-import type { BaseEvent } from '../../agent/Events'
import type { BasicMessage } from './messages'
import type { BasicMessageRecord } from './repository'
+import type { BaseEvent } from '../../agent/Events'
export enum BasicMessageEventTypes {
BasicMessageStateChanged = 'BasicMessageStateChanged',
diff --git a/packages/core/src/modules/basic-messages/BasicMessagesApi.ts b/packages/core/src/modules/basic-messages/BasicMessagesApi.ts
index 816340429d..938f6b8407 100644
--- a/packages/core/src/modules/basic-messages/BasicMessagesApi.ts
+++ b/packages/core/src/modules/basic-messages/BasicMessagesApi.ts
@@ -1,5 +1,5 @@
-import type { Query } from '../../storage/StorageService'
import type { BasicMessageRecord } from './repository/BasicMessageRecord'
+import type { Query } from '../../storage/StorageService'
import { AgentContext } from '../../agent'
import { Dispatcher } from '../../agent/Dispatcher'
diff --git a/packages/core/src/modules/connections/ConnectionEvents.ts b/packages/core/src/modules/connections/ConnectionEvents.ts
index 327a897dda..c9f1064bab 100644
--- a/packages/core/src/modules/connections/ConnectionEvents.ts
+++ b/packages/core/src/modules/connections/ConnectionEvents.ts
@@ -1,6 +1,6 @@
-import type { BaseEvent } from '../../agent/Events'
import type { DidExchangeState } from './models'
import type { ConnectionRecord } from './repository/ConnectionRecord'
+import type { BaseEvent } from '../../agent/Events'
export enum ConnectionEventTypes {
ConnectionStateChanged = 'ConnectionStateChanged',
diff --git a/packages/core/src/modules/connections/ConnectionsApi.ts b/packages/core/src/modules/connections/ConnectionsApi.ts
index da895de772..9777bc903a 100644
--- a/packages/core/src/modules/connections/ConnectionsApi.ts
+++ b/packages/core/src/modules/connections/ConnectionsApi.ts
@@ -1,8 +1,8 @@
-import type { Query } from '../../storage/StorageService'
-import type { OutOfBandRecord } from '../oob/repository'
import type { ConnectionType } from './models'
import type { ConnectionRecord } from './repository/ConnectionRecord'
import type { Routing } from './services'
+import type { Query } from '../../storage/StorageService'
+import type { OutOfBandRecord } from '../oob/repository'
import { AgentContext } from '../../agent'
import { Dispatcher } from '../../agent/Dispatcher'
diff --git a/packages/core/src/modules/connections/ConnectionsModule.ts b/packages/core/src/modules/connections/ConnectionsModule.ts
index b589f202ce..537f7695a7 100644
--- a/packages/core/src/modules/connections/ConnectionsModule.ts
+++ b/packages/core/src/modules/connections/ConnectionsModule.ts
@@ -1,6 +1,6 @@
+import type { ConnectionsModuleConfigOptions } from './ConnectionsModuleConfig'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { DependencyManager, Module } from '../../plugins'
-import type { ConnectionsModuleConfigOptions } from './ConnectionsModuleConfig'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/connections/DidExchangeProtocol.ts b/packages/core/src/modules/connections/DidExchangeProtocol.ts
index 23965bbebc..c577a260f7 100644
--- a/packages/core/src/modules/connections/DidExchangeProtocol.ts
+++ b/packages/core/src/modules/connections/DidExchangeProtocol.ts
@@ -1,11 +1,11 @@
+import type { ConnectionRecord } from './repository'
+import type { Routing } from './services/ConnectionService'
import type { AgentContext } from '../../agent'
import type { InboundMessageContext } from '../../agent/models/InboundMessageContext'
import type { ParsedMessageType } from '../../utils/messageType'
import type { ResolvedDidCommService } from '../didcomm'
import type { PeerDidCreateOptions } from '../dids'
import type { OutOfBandRecord } from '../oob/repository'
-import type { ConnectionRecord } from './repository'
-import type { Routing } from './services/ConnectionService'
import { InjectionSymbols } from '../../constants'
import { Key, KeyType } from '../../crypto'
diff --git a/packages/core/src/modules/connections/DidExchangeStateMachine.ts b/packages/core/src/modules/connections/DidExchangeStateMachine.ts
index 3f32f4e48d..be73793ab3 100644
--- a/packages/core/src/modules/connections/DidExchangeStateMachine.ts
+++ b/packages/core/src/modules/connections/DidExchangeStateMachine.ts
@@ -1,5 +1,5 @@
-import type { ParsedMessageType } from '../../utils/messageType'
import type { ConnectionRecord } from './repository'
+import type { ParsedMessageType } from '../../utils/messageType'
import { AriesFrameworkError } from '../../error'
import { canHandleMessageType } from '../../utils/messageType'
diff --git a/packages/core/src/modules/connections/TrustPingEvents.ts b/packages/core/src/modules/connections/TrustPingEvents.ts
index 55200e6c5b..2b0fcf66c9 100644
--- a/packages/core/src/modules/connections/TrustPingEvents.ts
+++ b/packages/core/src/modules/connections/TrustPingEvents.ts
@@ -1,6 +1,6 @@
-import type { BaseEvent } from '../../agent/Events'
import type { TrustPingMessage, TrustPingResponseMessage } from './messages'
import type { ConnectionRecord } from './repository/ConnectionRecord'
+import type { BaseEvent } from '../../agent/Events'
export enum TrustPingEventTypes {
TrustPingReceivedEvent = 'TrustPingReceivedEvent',
diff --git a/packages/core/src/modules/connections/errors/ConnectionProblemReportError.ts b/packages/core/src/modules/connections/errors/ConnectionProblemReportError.ts
index 764be043f9..f96f98261d 100644
--- a/packages/core/src/modules/connections/errors/ConnectionProblemReportError.ts
+++ b/packages/core/src/modules/connections/errors/ConnectionProblemReportError.ts
@@ -1,5 +1,5 @@
-import type { ProblemReportErrorOptions } from '../../problem-reports'
import type { ConnectionProblemReportReason } from './ConnectionProblemReportReason'
+import type { ProblemReportErrorOptions } from '../../problem-reports'
import { ProblemReportError } from '../../problem-reports'
import { ConnectionProblemReportMessage } from '../messages'
diff --git a/packages/core/src/modules/connections/errors/DidExchangeProblemReportError.ts b/packages/core/src/modules/connections/errors/DidExchangeProblemReportError.ts
index 17bf72ad9b..6e8d9a9925 100644
--- a/packages/core/src/modules/connections/errors/DidExchangeProblemReportError.ts
+++ b/packages/core/src/modules/connections/errors/DidExchangeProblemReportError.ts
@@ -1,5 +1,5 @@
-import type { ProblemReportErrorOptions } from '../../problem-reports'
import type { DidExchangeProblemReportReason } from './DidExchangeProblemReportReason'
+import type { ProblemReportErrorOptions } from '../../problem-reports'
import { ProblemReportError } from '../../problem-reports'
import { DidExchangeProblemReportMessage } from '../messages'
diff --git a/packages/core/src/modules/connections/models/did/DidDoc.ts b/packages/core/src/modules/connections/models/did/DidDoc.ts
index 896d314221..4d86fa7e19 100644
--- a/packages/core/src/modules/connections/models/did/DidDoc.ts
+++ b/packages/core/src/modules/connections/models/did/DidDoc.ts
@@ -1,6 +1,6 @@
-import type { DidDocumentService } from '../../../dids/domain/service'
import type { Authentication } from './authentication'
import type { PublicKey } from './publicKey'
+import type { DidDocumentService } from '../../../dids/domain/service'
import { Expose } from 'class-transformer'
import { Equals, IsArray, IsString, ValidateNested } from 'class-validator'
diff --git a/packages/core/src/modules/connections/models/did/authentication/Authentication.ts b/packages/core/src/modules/connections/models/did/authentication/Authentication.ts
index 76c2cef823..41ff0bc5d5 100644
--- a/packages/core/src/modules/connections/models/did/authentication/Authentication.ts
+++ b/packages/core/src/modules/connections/models/did/authentication/Authentication.ts
@@ -1,5 +1,5 @@
import type { PublicKey } from '../publicKey/PublicKey'
export abstract class Authentication {
- abstract publicKey: PublicKey
+ public abstract publicKey: PublicKey
}
diff --git a/packages/core/src/modules/connections/repository/ConnectionRecord.ts b/packages/core/src/modules/connections/repository/ConnectionRecord.ts
index 382b0f0eac..f05106e5c9 100644
--- a/packages/core/src/modules/connections/repository/ConnectionRecord.ts
+++ b/packages/core/src/modules/connections/repository/ConnectionRecord.ts
@@ -1,7 +1,7 @@
+import type { ConnectionMetadata } from './ConnectionMetadataTypes'
import type { TagsBase } from '../../../storage/BaseRecord'
import type { HandshakeProtocol } from '../models'
import type { ConnectionType } from '../models/ConnectionType'
-import type { ConnectionMetadata } from './ConnectionMetadataTypes'
import { AriesFrameworkError } from '../../../error'
import { BaseRecord } from '../../../storage/BaseRecord'
diff --git a/packages/core/src/modules/credentials/CredentialEvents.ts b/packages/core/src/modules/credentials/CredentialEvents.ts
index d9324d2bfe..2a60193d51 100644
--- a/packages/core/src/modules/credentials/CredentialEvents.ts
+++ b/packages/core/src/modules/credentials/CredentialEvents.ts
@@ -1,6 +1,6 @@
-import type { BaseEvent } from '../../agent/Events'
import type { CredentialState } from './models/CredentialState'
import type { CredentialExchangeRecord } from './repository/CredentialExchangeRecord'
+import type { BaseEvent } from '../../agent/Events'
export enum CredentialEventTypes {
CredentialStateChanged = 'CredentialStateChanged',
diff --git a/packages/core/src/modules/credentials/CredentialProtocolOptions.ts b/packages/core/src/modules/credentials/CredentialProtocolOptions.ts
index a26a0e6861..5b934bdb0c 100644
--- a/packages/core/src/modules/credentials/CredentialProtocolOptions.ts
+++ b/packages/core/src/modules/credentials/CredentialProtocolOptions.ts
@@ -1,6 +1,3 @@
-import type { AgentMessage } from '../../agent/AgentMessage'
-import type { FlatArray } from '../../types'
-import type { ConnectionRecord } from '../connections/repository/ConnectionRecord'
import type {
CredentialFormat,
CredentialFormatPayload,
@@ -11,6 +8,8 @@ import type { CredentialPreviewAttributeOptions } from './models'
import type { AutoAcceptCredential } from './models/CredentialAutoAcceptType'
import type { CredentialProtocol } from './protocol/CredentialProtocol'
import type { CredentialExchangeRecord } from './repository/CredentialExchangeRecord'
+import type { AgentMessage } from '../../agent/AgentMessage'
+import type { ConnectionRecord } from '../connections/repository/ConnectionRecord'
/**
* Get the format data payload for a specific message from a list of CredentialFormat interfaces and a message
@@ -42,14 +41,15 @@ export type FormatDataMessagePayload<
}
/**
- * Infer an array of {@link CredentialFormatService} types based on a {@link CredentialProtocol}.
+ * Infer the {@link CredentialFormat} types based on an array of {@link CredentialProtocol} types.
*
- * It does this by extracting the `CredentialFormatServices` generic from the `CredentialProtocol`.
+ * It does this by extracting the `CredentialFormatServices` generic from the `CredentialProtocol`, and
+ * then extracting the `CredentialFormat` generic from each of the `CredentialFormatService` types.
*
* @example
* ```
* // TheCredentialFormatServices is now equal to [IndyCredentialFormatService]
- * type TheCredentialFormatServices = ExtractCredentialFormatServices
+ * type TheCredentialFormatServices = CredentialFormatsFromProtocols<[V1CredentialProtocol]>
* ```
*
* Because the `V1CredentialProtocol` is defined as follows:
@@ -58,27 +58,14 @@ export type FormatDataMessagePayload<
* }
* ```
*/
-export type ExtractCredentialFormatServices = Type extends CredentialProtocol
- ? CredentialFormatServices
+export type CredentialFormatsFromProtocols = Type[number] extends CredentialProtocol<
+ infer CredentialFormatServices
+>
+ ? CredentialFormatServices extends CredentialFormatService[]
+ ? ExtractCredentialFormats
+ : never
: never
-/**
- * Infer an array of {@link CredentialFormat} types based on an array of {@link CredentialProtocol} types.
- *
- * This is based on {@link ExtractCredentialFormatServices}, but allows to handle arrays.
- */
-export type CFsFromCPs = _CFsFromCPs extends CredentialFormat[]
- ? _CFsFromCPs
- : []
-
-/**
- * Utility type for {@link ExtractCredentialFormatServicesFromCredentialProtocols} to reduce duplication.
- * Should not be used directly.
- */
-type _CFsFromCPs = FlatArray<{
- [CP in keyof CPs]: ExtractCredentialFormats>
-}>[]
-
/**
* Get format data return value. Each key holds a mapping of credential format key to format data.
*
diff --git a/packages/core/src/modules/credentials/CredentialsApi.ts b/packages/core/src/modules/credentials/CredentialsApi.ts
index 10520e4c2e..e69fe6c6a5 100644
--- a/packages/core/src/modules/credentials/CredentialsApi.ts
+++ b/packages/core/src/modules/credentials/CredentialsApi.ts
@@ -1,6 +1,4 @@
-import type { AgentMessage } from '../../agent/AgentMessage'
-import type { Query } from '../../storage/StorageService'
-import type { CFsFromCPs, DeleteCredentialOptions } from './CredentialProtocolOptions'
+import type { CredentialFormatsFromProtocols, DeleteCredentialOptions } from './CredentialProtocolOptions'
import type {
AcceptCredentialOptions,
AcceptCredentialOfferOptions,
@@ -21,6 +19,8 @@ import type {
} from './CredentialsApiOptions'
import type { CredentialProtocol } from './protocol/CredentialProtocol'
import type { CredentialExchangeRecord } from './repository/CredentialExchangeRecord'
+import type { AgentMessage } from '../../agent/AgentMessage'
+import type { Query } from '../../storage/StorageService'
import { AgentContext } from '../../agent'
import { MessageSender } from '../../agent/MessageSender'
@@ -77,7 +77,7 @@ export interface CredentialsApi {
findById(credentialRecordId: string): Promise
deleteById(credentialRecordId: string, options?: DeleteCredentialOptions): Promise
update(credentialRecord: CredentialExchangeRecord): Promise
- getFormatData(credentialRecordId: string): Promise>>
+ getFormatData(credentialRecordId: string): Promise>>
// DidComm Message Records
findProposalMessage(credentialExchangeId: string): Promise>
@@ -134,12 +134,12 @@ export class CredentialsApi implements Credent
) as CredentialProtocolMap
}
- private getProtocol>(protocolVersion: PVT) {
+ private getProtocol>(protocolVersion: PVT): CredentialProtocol {
if (!this.credentialProtocolMap[protocolVersion]) {
throw new AriesFrameworkError(`No credential protocol registered for protocol version ${protocolVersion}`)
}
- return this.credentialProtocolMap[protocolVersion]
+ return this.credentialProtocolMap[protocolVersion] as CredentialProtocol
}
/**
@@ -593,7 +593,9 @@ export class CredentialsApi implements Credent
return credentialRecord
}
- public async getFormatData(credentialRecordId: string): Promise>> {
+ public async getFormatData(
+ credentialRecordId: string
+ ): Promise>> {
const credentialRecord = await this.getById(credentialRecordId)
const service = this.getProtocol(credentialRecord.protocolVersion)
@@ -664,25 +666,31 @@ export class CredentialsApi implements Credent
public async findProposalMessage(credentialExchangeId: string): Promise> {
const service = await this.getServiceForCredentialExchangeId(credentialExchangeId)
- return service.findProposalMessage(this.agentContext, credentialExchangeId)
+ return service.findProposalMessage(
+ this.agentContext,
+ credentialExchangeId
+ ) as FindCredentialProposalMessageReturn
}
public async findOfferMessage(credentialExchangeId: string): Promise> {
const service = await this.getServiceForCredentialExchangeId(credentialExchangeId)
- return service.findOfferMessage(this.agentContext, credentialExchangeId)
+ return service.findOfferMessage(this.agentContext, credentialExchangeId) as FindCredentialOfferMessageReturn
}
public async findRequestMessage(credentialExchangeId: string): Promise> {
const service = await this.getServiceForCredentialExchangeId(credentialExchangeId)
- return service.findRequestMessage(this.agentContext, credentialExchangeId)
+ return service.findRequestMessage(
+ this.agentContext,
+ credentialExchangeId
+ ) as FindCredentialRequestMessageReturn
}
public async findCredentialMessage(credentialExchangeId: string): Promise> {
const service = await this.getServiceForCredentialExchangeId(credentialExchangeId)
- return service.findCredentialMessage(this.agentContext, credentialExchangeId)
+ return service.findCredentialMessage(this.agentContext, credentialExchangeId) as FindCredentialMessageReturn
}
private async getServiceForCredentialExchangeId(credentialExchangeId: string) {
diff --git a/packages/core/src/modules/credentials/CredentialsApiOptions.ts b/packages/core/src/modules/credentials/CredentialsApiOptions.ts
index 7eb6c7488f..24fb0a86d1 100644
--- a/packages/core/src/modules/credentials/CredentialsApiOptions.ts
+++ b/packages/core/src/modules/credentials/CredentialsApiOptions.ts
@@ -1,4 +1,4 @@
-import type { CFsFromCPs, GetFormatDataReturn } from './CredentialProtocolOptions'
+import type { CredentialFormatsFromProtocols, GetFormatDataReturn } from './CredentialProtocolOptions'
import type { CredentialFormatPayload } from './formats'
import type { AutoAcceptCredential } from './models/CredentialAutoAcceptType'
import type { CredentialProtocol } from './protocol/CredentialProtocol'
@@ -53,7 +53,7 @@ interface BaseOptions {
export interface ProposeCredentialOptions extends BaseOptions {
connectionId: string
protocolVersion: CredentialProtocolVersionType
- credentialFormats: CredentialFormatPayload, 'createProposal'>
+ credentialFormats: CredentialFormatPayload, 'createProposal'>
}
/**
@@ -64,7 +64,7 @@ export interface ProposeCredentialOptions
extends BaseOptions {
credentialRecordId: string
- credentialFormats?: CredentialFormatPayload, 'acceptProposal'>
+ credentialFormats?: CredentialFormatPayload, 'acceptProposal'>
}
/**
@@ -73,7 +73,7 @@ export interface AcceptCredentialProposalOptions
extends BaseOptions {
credentialRecordId: string
- credentialFormats: CredentialFormatPayload, 'createOffer'>
+ credentialFormats: CredentialFormatPayload, 'createOffer'>
}
/**
@@ -81,7 +81,7 @@ export interface NegotiateCredentialProposalOptions extends BaseOptions {
protocolVersion: CredentialProtocolVersionType
- credentialFormats: CredentialFormatPayload, 'createOffer'>
+ credentialFormats: CredentialFormatPayload, 'createOffer'>
}
/**
@@ -101,7 +101,7 @@ export interface OfferCredentialOptions
extends BaseOptions {
credentialRecordId: string
- credentialFormats?: CredentialFormatPayload, 'acceptOffer'>
+ credentialFormats?: CredentialFormatPayload, 'acceptOffer'>
}
/**
@@ -110,7 +110,7 @@ export interface AcceptCredentialOfferOptions
extends BaseOptions {
credentialRecordId: string
- credentialFormats: CredentialFormatPayload, 'createProposal'>
+ credentialFormats: CredentialFormatPayload, 'createProposal'>
}
/**
@@ -121,7 +121,7 @@ export interface NegotiateCredentialOfferOptions
extends BaseOptions {
credentialRecordId: string
- credentialFormats?: CredentialFormatPayload, 'acceptRequest'>
+ credentialFormats?: CredentialFormatPayload, 'acceptRequest'>
autoAcceptCredential?: AutoAcceptCredential
comment?: string
}
diff --git a/packages/core/src/modules/credentials/CredentialsModule.ts b/packages/core/src/modules/credentials/CredentialsModule.ts
index a581f5e551..b141f63f8a 100644
--- a/packages/core/src/modules/credentials/CredentialsModule.ts
+++ b/packages/core/src/modules/credentials/CredentialsModule.ts
@@ -1,9 +1,9 @@
+import type { CredentialsModuleConfigOptions } from './CredentialsModuleConfig'
+import type { CredentialProtocol } from './protocol/CredentialProtocol'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { ApiModule, DependencyManager } from '../../plugins'
import type { Constructor } from '../../utils/mixins'
import type { Optional } from '../../utils/type'
-import type { CredentialsModuleConfigOptions } from './CredentialsModuleConfig'
-import type { CredentialProtocol } from './protocol/CredentialProtocol'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/credentials/errors/CredentialProblemReportError.ts b/packages/core/src/modules/credentials/errors/CredentialProblemReportError.ts
index ffbe633004..41a5ed808b 100644
--- a/packages/core/src/modules/credentials/errors/CredentialProblemReportError.ts
+++ b/packages/core/src/modules/credentials/errors/CredentialProblemReportError.ts
@@ -1,5 +1,5 @@
-import type { ProblemReportErrorOptions } from '../../problem-reports'
import type { CredentialProblemReportReason } from './CredentialProblemReportReason'
+import type { ProblemReportErrorOptions } from '../../problem-reports'
import { V1CredentialProblemReportMessage } from '../protocol/v1/messages'
diff --git a/packages/core/src/modules/credentials/formats/CredentialFormatService.ts b/packages/core/src/modules/credentials/formats/CredentialFormatService.ts
index 4e8e1e4102..20d98623d3 100644
--- a/packages/core/src/modules/credentials/formats/CredentialFormatService.ts
+++ b/packages/core/src/modules/credentials/formats/CredentialFormatService.ts
@@ -1,5 +1,3 @@
-import type { AgentContext } from '../../../agent'
-import type { Attachment } from '../../../decorators/attachment/Attachment'
import type { CredentialFormat } from './CredentialFormat'
import type {
FormatCreateProposalOptions,
@@ -18,6 +16,8 @@ import type {
FormatAutoRespondRequestOptions,
FormatProcessCredentialOptions,
} from './CredentialFormatServiceOptions'
+import type { AgentContext } from '../../../agent'
+import type { Attachment } from '../../../decorators/attachment/Attachment'
export interface CredentialFormatService {
formatKey: CF['formatKey']
diff --git a/packages/core/src/modules/credentials/formats/CredentialFormatServiceOptions.ts b/packages/core/src/modules/credentials/formats/CredentialFormatServiceOptions.ts
index eb2430498f..2f494da4ae 100644
--- a/packages/core/src/modules/credentials/formats/CredentialFormatServiceOptions.ts
+++ b/packages/core/src/modules/credentials/formats/CredentialFormatServiceOptions.ts
@@ -1,9 +1,9 @@
+import type { CredentialFormat, CredentialFormatPayload } from './CredentialFormat'
+import type { CredentialFormatService } from './CredentialFormatService'
import type { Attachment } from '../../../decorators/attachment/Attachment'
import type { CredentialFormatSpec } from '../models/CredentialFormatSpec'
import type { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'
import type { CredentialExchangeRecord } from '../repository/CredentialExchangeRecord'
-import type { CredentialFormat, CredentialFormatPayload } from './CredentialFormat'
-import type { CredentialFormatService } from './CredentialFormatService'
/**
* Infer the {@link CredentialFormat} based on a {@link CredentialFormatService}.
diff --git a/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormat.ts b/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormat.ts
index 9f15c1152f..eeee56e5d9 100644
--- a/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormat.ts
+++ b/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormat.ts
@@ -1,7 +1,7 @@
+import type { IndyCredProposeOptions } from './models/IndyCredPropose'
import type { LinkedAttachment } from '../../../../utils/LinkedAttachment'
import type { CredentialPreviewAttributeOptions } from '../../models'
import type { CredentialFormat } from '../CredentialFormat'
-import type { IndyCredProposeOptions } from './models/IndyCredPropose'
import type { Cred, CredOffer, CredReq } from 'indy-sdk'
/**
diff --git a/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormatService.ts b/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormatService.ts
index cf14a6c4db..aca8aec43a 100644
--- a/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormatService.ts
+++ b/packages/core/src/modules/credentials/formats/indy/IndyCredentialFormatService.ts
@@ -1,3 +1,4 @@
+import type { IndyCredentialFormat } from './IndyCredentialFormat'
import type { AgentContext } from '../../../../agent'
import type { LinkedAttachment } from '../../../../utils/LinkedAttachment'
import type { CredentialPreviewAttributeOptions } from '../../models/CredentialPreviewAttribute'
@@ -19,7 +20,6 @@ import type {
FormatProcessOptions,
FormatProcessCredentialOptions,
} from '../CredentialFormatServiceOptions'
-import type { IndyCredentialFormat } from './IndyCredentialFormat'
import type * as Indy from 'indy-sdk'
import { KeyType } from '../../../../crypto'
diff --git a/packages/core/src/modules/credentials/formats/jsonld/JsonLdCredentialFormatService.ts b/packages/core/src/modules/credentials/formats/jsonld/JsonLdCredentialFormatService.ts
index a5df1d86e6..36f88eb4db 100644
--- a/packages/core/src/modules/credentials/formats/jsonld/JsonLdCredentialFormatService.ts
+++ b/packages/core/src/modules/credentials/formats/jsonld/JsonLdCredentialFormatService.ts
@@ -1,3 +1,9 @@
+import type {
+ JsonLdCredentialFormat,
+ JsonCredential,
+ JsonLdFormatDataCredentialDetail,
+ JsonLdFormatDataVerifiableCredential,
+} from './JsonLdCredentialFormat'
import type { AgentContext } from '../../../../agent'
import type { CredentialFormatService } from '../CredentialFormatService'
import type {
@@ -17,12 +23,6 @@ import type {
FormatProcessOptions,
FormatAutoRespondCredentialOptions,
} from '../CredentialFormatServiceOptions'
-import type {
- JsonLdCredentialFormat,
- JsonCredential,
- JsonLdFormatDataCredentialDetail,
- JsonLdFormatDataVerifiableCredential,
-} from './JsonLdCredentialFormat'
import { Attachment, AttachmentData } from '../../../../decorators/attachment/Attachment'
import { AriesFrameworkError } from '../../../../error'
diff --git a/packages/core/src/modules/credentials/protocol/BaseCredentialProtocol.ts b/packages/core/src/modules/credentials/protocol/BaseCredentialProtocol.ts
index d6a7682c8b..d4a10f4ebc 100644
--- a/packages/core/src/modules/credentials/protocol/BaseCredentialProtocol.ts
+++ b/packages/core/src/modules/credentials/protocol/BaseCredentialProtocol.ts
@@ -1,3 +1,4 @@
+import type { CredentialProtocol } from './CredentialProtocol'
import type { AgentContext } from '../../../agent'
import type { AgentMessage } from '../../../agent/AgentMessage'
import type { FeatureRegistry } from '../../../agent/FeatureRegistry'
@@ -23,7 +24,6 @@ import type {
} from '../CredentialProtocolOptions'
import type { CredentialFormatService, ExtractCredentialFormats } from '../formats'
import type { CredentialExchangeRecord } from '../repository'
-import type { CredentialProtocol } from './CredentialProtocol'
import { EventEmitter } from '../../../agent/EventEmitter'
import { DidCommMessageRepository } from '../../../storage'
@@ -39,74 +39,93 @@ import { CredentialRepository } from '../repository'
export abstract class BaseCredentialProtocol
implements CredentialProtocol
{
- abstract readonly version: string
+ public abstract readonly version: string
protected abstract getFormatServiceForRecordType(credentialRecordType: string): CFs[number]
// methods for proposal
- abstract createProposal(
+ public abstract createProposal(
agentContext: AgentContext,
options: CreateProposalOptions
): Promise>
- abstract processProposal(messageContext: InboundMessageContext): Promise
- abstract acceptProposal(
+ public abstract processProposal(
+ messageContext: InboundMessageContext
+ ): Promise
+ public abstract acceptProposal(
agentContext: AgentContext,
options: AcceptProposalOptions
): Promise>
- abstract negotiateProposal(
+ public abstract negotiateProposal(
agentContext: AgentContext,
options: NegotiateProposalOptions
): Promise>
// methods for offer
- abstract createOffer(
+ public abstract createOffer(
agentContext: AgentContext,
options: CreateOfferOptions
): Promise>
- abstract processOffer(messageContext: InboundMessageContext): Promise
- abstract acceptOffer(
+ public abstract processOffer(messageContext: InboundMessageContext): Promise
+ public abstract acceptOffer(
agentContext: AgentContext,
options: AcceptOfferOptions
): Promise>
- abstract negotiateOffer(
+ public abstract negotiateOffer(
agentContext: AgentContext,
options: NegotiateOfferOptions
): Promise>
// methods for request
- abstract createRequest(
+ public abstract createRequest(
agentContext: AgentContext,
options: CreateRequestOptions
): Promise>
- abstract processRequest(messageContext: InboundMessageContext): Promise
- abstract acceptRequest(
+ public abstract processRequest(messageContext: InboundMessageContext): Promise
+ public abstract acceptRequest(
agentContext: AgentContext,
options: AcceptRequestOptions
): Promise>
// methods for issue
- abstract processCredential(messageContext: InboundMessageContext): Promise
- abstract acceptCredential(
+ public abstract processCredential(
+ messageContext: InboundMessageContext
+ ): Promise
+ public abstract acceptCredential(
agentContext: AgentContext,
options: AcceptCredentialOptions
): Promise>
// methods for ack
- abstract processAck(messageContext: InboundMessageContext): Promise
+ public abstract processAck(messageContext: InboundMessageContext): Promise
// methods for problem-report
- abstract createProblemReport(agentContext: AgentContext, options: CreateProblemReportOptions): ProblemReportMessage
+ public abstract createProblemReport(
+ agentContext: AgentContext,
+ options: CreateProblemReportOptions
+ ): ProblemReportMessage
- abstract findProposalMessage(agentContext: AgentContext, credentialExchangeId: string): Promise
- abstract findOfferMessage(agentContext: AgentContext, credentialExchangeId: string): Promise
- abstract findRequestMessage(agentContext: AgentContext, credentialExchangeId: string): Promise
- abstract findCredentialMessage(agentContext: AgentContext, credentialExchangeId: string): Promise
- abstract getFormatData(
+ public abstract findProposalMessage(
+ agentContext: AgentContext,
+ credentialExchangeId: string
+ ): Promise
+ public abstract findOfferMessage(
+ agentContext: AgentContext,
+ credentialExchangeId: string
+ ): Promise
+ public abstract findRequestMessage(
+ agentContext: AgentContext,
+ credentialExchangeId: string
+ ): Promise
+ public abstract findCredentialMessage(
+ agentContext: AgentContext,
+ credentialExchangeId: string
+ ): Promise
+ public abstract getFormatData(
agentContext: AgentContext,
credentialExchangeId: string
): Promise>>
- abstract register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry): void
+ public abstract register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry): void
/**
* Decline a credential offer
diff --git a/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.connectionless-credentials.test.ts b/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.connectionless-credentials.test.ts
index e8085a05f2..c7780cf414 100644
--- a/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.connectionless-credentials.test.ts
+++ b/packages/core/src/modules/credentials/protocol/v2/__tests__/v2.ldproof.connectionless-credentials.test.ts
@@ -58,8 +58,8 @@ let wallet
let signCredentialOptions: JsonLdCredentialDetailFormat
describe('credentials', () => {
- let faberAgent: Agent
- let aliceAgent: Agent
+ let faberAgent: Agent<(typeof faberAgentOptions)['modules']>
+ let aliceAgent: Agent<(typeof aliceAgentOptions)['modules']>
let faberReplay: ReplaySubject
let aliceReplay: ReplaySubject
const seed = 'testseed000000000000000000000001'
diff --git a/packages/core/src/modules/credentials/repository/CredentialExchangeRecord.ts b/packages/core/src/modules/credentials/repository/CredentialExchangeRecord.ts
index 304fc67487..290865b83a 100644
--- a/packages/core/src/modules/credentials/repository/CredentialExchangeRecord.ts
+++ b/packages/core/src/modules/credentials/repository/CredentialExchangeRecord.ts
@@ -1,8 +1,8 @@
+import type { CredentialMetadata } from './CredentialMetadataTypes'
import type { TagsBase } from '../../../storage/BaseRecord'
import type { AutoAcceptCredential } from '../models/CredentialAutoAcceptType'
import type { CredentialState } from '../models/CredentialState'
import type { RevocationNotification } from '../models/RevocationNotification'
-import type { CredentialMetadata } from './CredentialMetadataTypes'
import { Type } from 'class-transformer'
diff --git a/packages/core/src/modules/dids/DidsModule.ts b/packages/core/src/modules/dids/DidsModule.ts
index cf438e3ae8..a82dabeb8f 100644
--- a/packages/core/src/modules/dids/DidsModule.ts
+++ b/packages/core/src/modules/dids/DidsModule.ts
@@ -1,5 +1,5 @@
-import type { DependencyManager, Module } from '../../plugins'
import type { DidsModuleConfigOptions } from './DidsModuleConfig'
+import type { DependencyManager, Module } from '../../plugins'
import { DidsApi } from './DidsApi'
import { DidsModuleConfig } from './DidsModuleConfig'
diff --git a/packages/core/src/modules/dids/__tests__/dids-registrar.e2e.test.ts b/packages/core/src/modules/dids/__tests__/dids-registrar.e2e.test.ts
index 7dd78ca824..f6d6763a4f 100644
--- a/packages/core/src/modules/dids/__tests__/dids-registrar.e2e.test.ts
+++ b/packages/core/src/modules/dids/__tests__/dids-registrar.e2e.test.ts
@@ -10,10 +10,11 @@ import { Agent } from '../../../agent/Agent'
import { KeyType } from '../../../crypto'
import { TypedArrayEncoder } from '../../../utils'
import { indyDidFromPublicKeyBase58 } from '../../../utils/did'
-import { PeerDidNumAlgo } from '../methods/peer/didPeer'
import { InjectionSymbols, JsonTransformer } from '@aries-framework/core'
+import { PeerDidNumAlgo } from '../methods/peer/didPeer'
+
const agentOptions = getAgentOptions('Faber Dids Registrar', {
indyLedgers: [
{
diff --git a/packages/core/src/modules/dids/domain/key-type/bls12381g1.ts b/packages/core/src/modules/dids/domain/key-type/bls12381g1.ts
index 6ac241f5d9..aee5774210 100644
--- a/packages/core/src/modules/dids/domain/key-type/bls12381g1.ts
+++ b/packages/core/src/modules/dids/domain/key-type/bls12381g1.ts
@@ -1,5 +1,5 @@
-import type { VerificationMethod } from '../verificationMethod'
import type { KeyDidMapping } from './keyDidMapping'
+import type { VerificationMethod } from '../verificationMethod'
import { KeyType } from '../../../../crypto'
import { Key } from '../../../../crypto/Key'
diff --git a/packages/core/src/modules/dids/domain/key-type/bls12381g2.ts b/packages/core/src/modules/dids/domain/key-type/bls12381g2.ts
index f7cc4b2a6f..e980f9d142 100644
--- a/packages/core/src/modules/dids/domain/key-type/bls12381g2.ts
+++ b/packages/core/src/modules/dids/domain/key-type/bls12381g2.ts
@@ -1,5 +1,5 @@
-import type { VerificationMethod } from '../verificationMethod'
import type { KeyDidMapping } from './keyDidMapping'
+import type { VerificationMethod } from '../verificationMethod'
import { KeyType } from '../../../../crypto'
import { Key } from '../../../../crypto/Key'
diff --git a/packages/core/src/modules/dids/domain/key-type/ed25519.ts b/packages/core/src/modules/dids/domain/key-type/ed25519.ts
index 4098d230b5..5058accff3 100644
--- a/packages/core/src/modules/dids/domain/key-type/ed25519.ts
+++ b/packages/core/src/modules/dids/domain/key-type/ed25519.ts
@@ -1,5 +1,5 @@
-import type { VerificationMethod } from '../verificationMethod'
import type { KeyDidMapping } from './keyDidMapping'
+import type { VerificationMethod } from '../verificationMethod'
import { convertPublicKeyToX25519 } from '@stablelib/ed25519'
diff --git a/packages/core/src/modules/dids/domain/key-type/x25519.ts b/packages/core/src/modules/dids/domain/key-type/x25519.ts
index 5ce7ff0683..399029928e 100644
--- a/packages/core/src/modules/dids/domain/key-type/x25519.ts
+++ b/packages/core/src/modules/dids/domain/key-type/x25519.ts
@@ -1,5 +1,5 @@
-import type { VerificationMethod } from '../verificationMethod'
import type { KeyDidMapping } from './keyDidMapping'
+import type { VerificationMethod } from '../verificationMethod'
import { KeyType } from '../../../../crypto'
import { Key } from '../../../../crypto/Key'
diff --git a/packages/core/src/modules/dids/repository/DidRecord.ts b/packages/core/src/modules/dids/repository/DidRecord.ts
index 752088323b..b36f3f03d0 100644
--- a/packages/core/src/modules/dids/repository/DidRecord.ts
+++ b/packages/core/src/modules/dids/repository/DidRecord.ts
@@ -1,5 +1,5 @@
-import type { TagsBase } from '../../../storage/BaseRecord'
import type { DidRecordMetadata } from './didRecordMetadataTypes'
+import type { TagsBase } from '../../../storage/BaseRecord'
import { Type } from 'class-transformer'
import { IsEnum, ValidateNested } from 'class-validator'
diff --git a/packages/core/src/modules/discover-features/DiscoverFeaturesApi.ts b/packages/core/src/modules/discover-features/DiscoverFeaturesApi.ts
index 94e376f08d..3d074f9d18 100644
--- a/packages/core/src/modules/discover-features/DiscoverFeaturesApi.ts
+++ b/packages/core/src/modules/discover-features/DiscoverFeaturesApi.ts
@@ -1,4 +1,3 @@
-import type { Feature } from '../../agent/models'
import type {
DiscloseFeaturesOptions,
QueryFeaturesOptions,
@@ -6,6 +5,7 @@ import type {
} from './DiscoverFeaturesApiOptions'
import type { DiscoverFeaturesDisclosureReceivedEvent } from './DiscoverFeaturesEvents'
import type { DiscoverFeaturesService } from './services'
+import type { Feature } from '../../agent/models'
import { firstValueFrom, of, ReplaySubject, Subject } from 'rxjs'
import { catchError, filter, map, takeUntil, timeout } from 'rxjs/operators'
@@ -80,7 +80,7 @@ export class DiscoverFeaturesApi<
throw new AriesFrameworkError(`No discover features service registered for protocol version ${protocolVersion}`)
}
- return this.serviceMap[protocolVersion]
+ return this.serviceMap[protocolVersion] as DiscoverFeaturesService
}
/**
diff --git a/packages/core/src/modules/discover-features/DiscoverFeaturesApiOptions.ts b/packages/core/src/modules/discover-features/DiscoverFeaturesApiOptions.ts
index 7cdcc18cb4..11bdf538b7 100644
--- a/packages/core/src/modules/discover-features/DiscoverFeaturesApiOptions.ts
+++ b/packages/core/src/modules/discover-features/DiscoverFeaturesApiOptions.ts
@@ -1,5 +1,5 @@
-import type { FeatureQueryOptions } from '../../agent/models'
import type { DiscoverFeaturesService } from './services'
+import type { FeatureQueryOptions } from '../../agent/models'
/**
* Get the supported protocol versions based on the provided discover features services.
diff --git a/packages/core/src/modules/discover-features/DiscoverFeaturesModule.ts b/packages/core/src/modules/discover-features/DiscoverFeaturesModule.ts
index 79caa885f9..bd97e12ec4 100644
--- a/packages/core/src/modules/discover-features/DiscoverFeaturesModule.ts
+++ b/packages/core/src/modules/discover-features/DiscoverFeaturesModule.ts
@@ -1,6 +1,6 @@
+import type { DiscoverFeaturesModuleConfigOptions } from './DiscoverFeaturesModuleConfig'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { DependencyManager, Module } from '../../plugins'
-import type { DiscoverFeaturesModuleConfigOptions } from './DiscoverFeaturesModuleConfig'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/discover-features/services/DiscoverFeaturesService.ts b/packages/core/src/modules/discover-features/services/DiscoverFeaturesService.ts
index 0720c8747a..fb5cd56a1e 100644
--- a/packages/core/src/modules/discover-features/services/DiscoverFeaturesService.ts
+++ b/packages/core/src/modules/discover-features/services/DiscoverFeaturesService.ts
@@ -32,15 +32,15 @@ export abstract class DiscoverFeaturesService {
this.discoverFeaturesModuleConfig = discoverFeaturesModuleConfig
}
- abstract readonly version: string
+ public abstract readonly version: string
- abstract createQuery(options: CreateQueryOptions): Promise>
- abstract processQuery(
+ public abstract createQuery(options: CreateQueryOptions): Promise>
+ public abstract processQuery(
messageContext: InboundMessageContext
): Promise | void>
- abstract createDisclosure(
+ public abstract createDisclosure(
options: CreateDisclosureOptions
): Promise>
- abstract processDisclosure(messageContext: InboundMessageContext): Promise
+ public abstract processDisclosure(messageContext: InboundMessageContext): Promise
}
diff --git a/packages/core/src/modules/generic-records/GenericRecordsApi.ts b/packages/core/src/modules/generic-records/GenericRecordsApi.ts
index 56efe6667e..a995d7b4c5 100644
--- a/packages/core/src/modules/generic-records/GenericRecordsApi.ts
+++ b/packages/core/src/modules/generic-records/GenericRecordsApi.ts
@@ -1,5 +1,5 @@
-import type { Query } from '../../storage/StorageService'
import type { GenericRecord, SaveGenericRecordOption } from './repository/GenericRecord'
+import type { Query } from '../../storage/StorageService'
import { AgentContext } from '../../agent'
import { InjectionSymbols } from '../../constants'
diff --git a/packages/core/src/modules/indy/services/IndyRevocationService.ts b/packages/core/src/modules/indy/services/IndyRevocationService.ts
index 4dd89c2e4d..c1caf5b297 100644
--- a/packages/core/src/modules/indy/services/IndyRevocationService.ts
+++ b/packages/core/src/modules/indy/services/IndyRevocationService.ts
@@ -1,7 +1,7 @@
import type { AgentContext } from '../../../agent'
import type { IndyRevocationInterval } from '../../credentials'
import type { RequestedCredentials } from '../../proofs/formats/indy/models/RequestedCredentials'
-import type { default as Indy, RevState, RevStates } from 'indy-sdk'
+import type { default as Indy, RevStates } from 'indy-sdk'
import { AgentDependencies } from '../../../agent/AgentDependencies'
import { InjectionSymbols } from '../../../constants'
diff --git a/packages/core/src/modules/ledger/LedgerModule.ts b/packages/core/src/modules/ledger/LedgerModule.ts
index 8bb9a3de82..4090d146ab 100644
--- a/packages/core/src/modules/ledger/LedgerModule.ts
+++ b/packages/core/src/modules/ledger/LedgerModule.ts
@@ -1,5 +1,5 @@
-import type { DependencyManager, Module } from '../../plugins'
import type { LedgerModuleConfigOptions } from './LedgerModuleConfig'
+import type { DependencyManager, Module } from '../../plugins'
import { AnonCredsCredentialDefinitionRepository } from '../indy/repository/AnonCredsCredentialDefinitionRepository'
import { AnonCredsSchemaRepository } from '../indy/repository/AnonCredsSchemaRepository'
diff --git a/packages/core/src/modules/oob/OutOfBandApi.ts b/packages/core/src/modules/oob/OutOfBandApi.ts
index 5936baac7f..aee58655da 100644
--- a/packages/core/src/modules/oob/OutOfBandApi.ts
+++ b/packages/core/src/modules/oob/OutOfBandApi.ts
@@ -1,10 +1,10 @@
+import type { HandshakeReusedEvent } from './domain/OutOfBandEvents'
import type { AgentMessage } from '../../agent/AgentMessage'
import type { AgentMessageReceivedEvent } from '../../agent/Events'
import type { Attachment } from '../../decorators/attachment/Attachment'
import type { Query } from '../../storage/StorageService'
import type { PlaintextMessage } from '../../types'
import type { ConnectionInvitationMessage, ConnectionRecord, Routing } from '../connections'
-import type { HandshakeReusedEvent } from './domain/OutOfBandEvents'
import { catchError, EmptyError, first, firstValueFrom, map, of, timeout } from 'rxjs'
diff --git a/packages/core/src/modules/oob/OutOfBandService.ts b/packages/core/src/modules/oob/OutOfBandService.ts
index f1a77c9bd5..377e8867c2 100644
--- a/packages/core/src/modules/oob/OutOfBandService.ts
+++ b/packages/core/src/modules/oob/OutOfBandService.ts
@@ -1,10 +1,10 @@
+import type { HandshakeReusedEvent, OutOfBandStateChangedEvent } from './domain/OutOfBandEvents'
+import type { OutOfBandRecord } from './repository'
import type { AgentContext } from '../../agent'
import type { InboundMessageContext } from '../../agent/models/InboundMessageContext'
import type { Key } from '../../crypto'
import type { Query } from '../../storage/StorageService'
import type { ConnectionRecord } from '../connections'
-import type { HandshakeReusedEvent, OutOfBandStateChangedEvent } from './domain/OutOfBandEvents'
-import type { OutOfBandRecord } from './repository'
import { EventEmitter } from '../../agent/EventEmitter'
import { AriesFrameworkError } from '../../error'
diff --git a/packages/core/src/modules/oob/domain/OutOfBandEvents.ts b/packages/core/src/modules/oob/domain/OutOfBandEvents.ts
index a3936cc784..15561062b5 100644
--- a/packages/core/src/modules/oob/domain/OutOfBandEvents.ts
+++ b/packages/core/src/modules/oob/domain/OutOfBandEvents.ts
@@ -1,7 +1,7 @@
+import type { OutOfBandState } from './OutOfBandState'
import type { BaseEvent } from '../../../agent/Events'
import type { ConnectionRecord } from '../../connections'
import type { OutOfBandRecord } from '../repository'
-import type { OutOfBandState } from './OutOfBandState'
export enum OutOfBandEventTypes {
OutOfBandStateChanged = 'OutOfBandStateChanged',
diff --git a/packages/core/src/modules/proofs/ProofEvents.ts b/packages/core/src/modules/proofs/ProofEvents.ts
index 20394c56a9..86b0e7673c 100644
--- a/packages/core/src/modules/proofs/ProofEvents.ts
+++ b/packages/core/src/modules/proofs/ProofEvents.ts
@@ -1,6 +1,6 @@
-import type { BaseEvent } from '../../agent/Events'
import type { ProofState } from './models/ProofState'
import type { ProofExchangeRecord } from './repository'
+import type { BaseEvent } from '../../agent/Events'
export enum ProofEventTypes {
ProofStateChanged = 'ProofStateChanged',
diff --git a/packages/core/src/modules/proofs/ProofResponseCoordinator.ts b/packages/core/src/modules/proofs/ProofResponseCoordinator.ts
index 77c9a04fd5..db625f71e0 100644
--- a/packages/core/src/modules/proofs/ProofResponseCoordinator.ts
+++ b/packages/core/src/modules/proofs/ProofResponseCoordinator.ts
@@ -1,5 +1,5 @@
-import type { AgentContext } from '../../agent/context/AgentContext'
import type { ProofExchangeRecord } from './repository'
+import type { AgentContext } from '../../agent/context/AgentContext'
import { injectable } from '../../plugins'
diff --git a/packages/core/src/modules/proofs/ProofService.ts b/packages/core/src/modules/proofs/ProofService.ts
index dca7cea41f..2fcbe509b1 100644
--- a/packages/core/src/modules/proofs/ProofService.ts
+++ b/packages/core/src/modules/proofs/ProofService.ts
@@ -1,14 +1,3 @@
-import type { AgentConfig } from '../../agent/AgentConfig'
-import type { AgentMessage } from '../../agent/AgentMessage'
-import type { Dispatcher } from '../../agent/Dispatcher'
-import type { EventEmitter } from '../../agent/EventEmitter'
-import type { AgentContext } from '../../agent/context/AgentContext'
-import type { InboundMessageContext } from '../../agent/models/InboundMessageContext'
-import type { Logger } from '../../logger'
-import type { DidCommMessageRepository, DidCommMessageRole } from '../../storage'
-import type { Wallet } from '../../wallet/Wallet'
-import type { ConnectionService } from '../connections/services'
-import type { MediationRecipientService, RoutingService } from '../routing'
import type { ProofStateChangedEvent } from './ProofEvents'
import type { ProofResponseCoordinator } from './ProofResponseCoordinator'
import type { ProofFormat } from './formats/ProofFormat'
@@ -30,6 +19,17 @@ import type {
} from './models/ProofServiceOptions'
import type { ProofState } from './models/ProofState'
import type { ProofExchangeRecord, ProofRepository } from './repository'
+import type { AgentConfig } from '../../agent/AgentConfig'
+import type { AgentMessage } from '../../agent/AgentMessage'
+import type { Dispatcher } from '../../agent/Dispatcher'
+import type { EventEmitter } from '../../agent/EventEmitter'
+import type { AgentContext } from '../../agent/context/AgentContext'
+import type { InboundMessageContext } from '../../agent/models/InboundMessageContext'
+import type { Logger } from '../../logger'
+import type { DidCommMessageRepository, DidCommMessageRole } from '../../storage'
+import type { Wallet } from '../../wallet/Wallet'
+import type { ConnectionService } from '../connections/services'
+import type { MediationRecipientService, RoutingService } from '../routing'
import { JsonTransformer } from '../../utils/JsonTransformer'
@@ -58,7 +58,7 @@ export abstract class ProofService {
this.wallet = wallet
this.logger = agentConfig.logger
}
- abstract readonly version: string
+ public abstract readonly version: string
public emitStateChangedEvent(
agentContext: AgentContext,
@@ -104,7 +104,7 @@ export abstract class ProofService {
* 5. Store proposal message
* 6. Return proposal message + proof record
*/
- abstract createProposal(
+ public abstract createProposal(
agentContext: AgentContext,
options: CreateProposalOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
@@ -119,7 +119,7 @@ export abstract class ProofService {
* 5. Create or update proposal message
* 6. Return proposal message + proof record
*/
- abstract createProposalAsResponse(
+ public abstract createProposalAsResponse(
agentContext: AgentContext,
options: CreateProposalAsResponseOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
@@ -142,40 +142,42 @@ export abstract class ProofService {
* 4. Loop through all format services to process proposal message
* 5. Save & return record
*/
- abstract processProposal(messageContext: InboundMessageContext): Promise
+ public abstract processProposal(messageContext: InboundMessageContext): Promise
- abstract createRequest(
+ public abstract createRequest(
agentContext: AgentContext,
options: CreateRequestOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
- abstract createRequestAsResponse(
+ public abstract createRequestAsResponse(
agentContext: AgentContext,
options: CreateRequestAsResponseOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
- abstract processRequest(messageContext: InboundMessageContext): Promise
+ public abstract processRequest(messageContext: InboundMessageContext): Promise
- abstract createPresentation(
+ public abstract createPresentation(
agentContext: AgentContext,
options: CreatePresentationOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
- abstract processPresentation(messageContext: InboundMessageContext): Promise
+ public abstract processPresentation(messageContext: InboundMessageContext): Promise
- abstract createAck(
+ public abstract createAck(
agentContext: AgentContext,
options: CreateAckOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
- abstract processAck(messageContext: InboundMessageContext): Promise
+ public abstract processAck(messageContext: InboundMessageContext): Promise
- abstract createProblemReport(
+ public abstract createProblemReport(
agentContext: AgentContext,
options: CreateProblemReportOptions
): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }>
- abstract processProblemReport(messageContext: InboundMessageContext): Promise
+ public abstract processProblemReport(
+ messageContext: InboundMessageContext
+ ): Promise
public abstract shouldAutoRespondToProposal(
agentContext: AgentContext,
diff --git a/packages/core/src/modules/proofs/ProofsApi.ts b/packages/core/src/modules/proofs/ProofsApi.ts
index af54ebe234..38f5e642bd 100644
--- a/packages/core/src/modules/proofs/ProofsApi.ts
+++ b/packages/core/src/modules/proofs/ProofsApi.ts
@@ -1,5 +1,3 @@
-import type { AgentMessage } from '../../agent/AgentMessage'
-import type { Query } from '../../storage/StorageService'
import type { ProofService } from './ProofService'
import type {
AcceptProofPresentationOptions,
@@ -33,6 +31,8 @@ import type {
CreateProposalAsResponseOptions,
} from './models/ProofServiceOptions'
import type { ProofExchangeRecord } from './repository/ProofExchangeRecord'
+import type { AgentMessage } from '../../agent/AgentMessage'
+import type { Query } from '../../storage/StorageService'
import { inject, injectable } from 'tsyringe'
@@ -158,7 +158,7 @@ export class ProofsApi<
throw new AriesFrameworkError(`No proof service registered for protocol version ${protocolVersion}`)
}
- return this.serviceMap[protocolVersion]
+ return this.serviceMap[protocolVersion] as ProofService
}
/**
@@ -728,19 +728,19 @@ export class ProofsApi<
public async findProposalMessage(proofRecordId: string): Promise> {
const record = await this.getById(proofRecordId)
const service = this.getService(record.protocolVersion)
- return service.findProposalMessage(this.agentContext, proofRecordId)
+ return service.findProposalMessage(this.agentContext, proofRecordId) as FindProofProposalMessageReturn
}
public async findRequestMessage(proofRecordId: string): Promise> {
const record = await this.getById(proofRecordId)
const service = this.getService(record.protocolVersion)
- return service.findRequestMessage(this.agentContext, proofRecordId)
+ return service.findRequestMessage(this.agentContext, proofRecordId) as FindProofRequestMessageReturn
}
public async findPresentationMessage(proofRecordId: string): Promise> {
const record = await this.getById(proofRecordId)
const service = this.getService(record.protocolVersion)
- return service.findPresentationMessage(this.agentContext, proofRecordId)
+ return service.findPresentationMessage(this.agentContext, proofRecordId) as FindProofPresentationMessageReturn
}
private registerMessageHandlers(dispatcher: Dispatcher, mediationRecipientService: MediationRecipientService) {
diff --git a/packages/core/src/modules/proofs/ProofsModule.ts b/packages/core/src/modules/proofs/ProofsModule.ts
index 05136c95a0..339ecd0c41 100644
--- a/packages/core/src/modules/proofs/ProofsModule.ts
+++ b/packages/core/src/modules/proofs/ProofsModule.ts
@@ -1,6 +1,6 @@
+import type { ProofsModuleConfigOptions } from './ProofsModuleConfig'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { DependencyManager, Module } from '../../plugins'
-import type { ProofsModuleConfigOptions } from './ProofsModuleConfig'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts b/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts
index 180a1b8a34..3da57e27c1 100644
--- a/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts
+++ b/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts
@@ -1,8 +1,8 @@
+import type { CustomProofTags } from './../repository/ProofExchangeRecord'
import type { AgentContext } from '../../../agent'
import type { Wallet } from '../../../wallet/Wallet'
import type { CredentialRepository } from '../../credentials/repository'
import type { ProofStateChangedEvent } from '../ProofEvents'
-import type { CustomProofTags } from './../repository/ProofExchangeRecord'
import { Subject } from 'rxjs'
diff --git a/packages/core/src/modules/proofs/formats/ProofFormatService.ts b/packages/core/src/modules/proofs/formats/ProofFormatService.ts
index 1ce367cf33..931d4c886f 100644
--- a/packages/core/src/modules/proofs/formats/ProofFormatService.ts
+++ b/packages/core/src/modules/proofs/formats/ProofFormatService.ts
@@ -1,12 +1,3 @@
-import type { AgentContext } from '../../../agent'
-import type { AgentConfig } from '../../../agent/AgentConfig'
-import type { DidCommMessageRepository } from '../../../storage'
-import type {
- CreateRequestAsResponseOptions,
- FormatRequestedCredentialReturn,
- FormatRetrievedCredentialOptions,
-} from '../models/ProofServiceOptions'
-import type { ProofRequestFormats } from '../models/SharedOptions'
import type { ProofFormat } from './ProofFormat'
import type { IndyProofFormat } from './indy/IndyProofFormat'
import type { GetRequestedCredentialsFormat } from './indy/IndyProofFormatsServiceOptions'
@@ -20,6 +11,15 @@ import type {
ProcessProposalOptions,
ProcessRequestOptions,
} from './models/ProofFormatServiceOptions'
+import type { AgentContext } from '../../../agent'
+import type { AgentConfig } from '../../../agent/AgentConfig'
+import type { DidCommMessageRepository } from '../../../storage'
+import type {
+ CreateRequestAsResponseOptions,
+ FormatRequestedCredentialReturn,
+ FormatRetrievedCredentialOptions,
+} from '../models/ProofServiceOptions'
+import type { ProofRequestFormats } from '../models/SharedOptions'
/**
* This abstract class is the base class for any proof format
@@ -33,29 +33,31 @@ export abstract class ProofFormatService {
protected didCommMessageRepository: DidCommMessageRepository
protected agentConfig: AgentConfig
- abstract readonly formatKey: PF['formatKey']
+ public abstract readonly formatKey: PF['formatKey']
public constructor(didCommMessageRepository: DidCommMessageRepository, agentConfig: AgentConfig) {
this.didCommMessageRepository = didCommMessageRepository
this.agentConfig = agentConfig
}
- abstract createProposal(options: FormatCreateProofProposalOptions): Promise
+ public abstract createProposal(options: FormatCreateProofProposalOptions): Promise
- abstract processProposal(options: ProcessProposalOptions): Promise
+ public abstract processProposal(options: ProcessProposalOptions): Promise
- abstract createRequest(options: CreateRequestOptions): Promise
+ public abstract createRequest(options: CreateRequestOptions): Promise
- abstract processRequest(options: ProcessRequestOptions): Promise
+ public abstract processRequest(options: ProcessRequestOptions): Promise
- abstract createPresentation(
+ public abstract createPresentation(
agentContext: AgentContext,
options: FormatCreatePresentationOptions
): Promise
- abstract processPresentation(agentContext: AgentContext, options: ProcessPresentationOptions): Promise
+ public abstract processPresentation(agentContext: AgentContext, options: ProcessPresentationOptions): Promise
- abstract createProofRequestFromProposal(options: CreatePresentationFormatsOptions): Promise
+ public abstract createProofRequestFromProposal(
+ options: CreatePresentationFormatsOptions
+ ): Promise
public abstract getRequestedCredentialsForProofRequest(
agentContext: AgentContext,
@@ -66,14 +68,14 @@ export abstract class ProofFormatService {
options: FormatRetrievedCredentialOptions<[PF]>
): Promise>
- abstract proposalAndRequestAreEqual(
+ public abstract proposalAndRequestAreEqual(
proposalAttachments: ProofAttachmentFormat[],
requestAttachments: ProofAttachmentFormat[]
): boolean
- abstract supportsFormat(formatIdentifier: string): boolean
+ public abstract supportsFormat(formatIdentifier: string): boolean
- abstract createRequestAsResponse(
+ public abstract createRequestAsResponse(
options: CreateRequestAsResponseOptions<[IndyProofFormat]>
): Promise
}
diff --git a/packages/core/src/modules/proofs/formats/ProofFormatServiceOptions.ts b/packages/core/src/modules/proofs/formats/ProofFormatServiceOptions.ts
index 0fcd3d405c..25731e43c8 100644
--- a/packages/core/src/modules/proofs/formats/ProofFormatServiceOptions.ts
+++ b/packages/core/src/modules/proofs/formats/ProofFormatServiceOptions.ts
@@ -1,7 +1,7 @@
-import type { Attachment } from '../../../decorators/attachment/Attachment'
-import type { ProofFormatSpec } from '../models/ProofFormatSpec'
import type { ProofFormat } from './ProofFormat'
import type { ProofFormatService } from './ProofFormatService'
+import type { Attachment } from '../../../decorators/attachment/Attachment'
+import type { ProofFormatSpec } from '../models/ProofFormatSpec'
/**
* Get the service map for usage in the proofs module. Will return a type mapping of protocol version to service.
diff --git a/packages/core/src/modules/proofs/formats/indy/IndyProofFormat.ts b/packages/core/src/modules/proofs/formats/indy/IndyProofFormat.ts
index 8d6769be1e..ae58b2db75 100644
--- a/packages/core/src/modules/proofs/formats/indy/IndyProofFormat.ts
+++ b/packages/core/src/modules/proofs/formats/indy/IndyProofFormat.ts
@@ -1,9 +1,9 @@
-import type { PresentationPreviewAttribute, PresentationPreviewPredicate } from '../../protocol/v1'
-import type { ProofFormat } from '../ProofFormat'
-import type { IndyRequestProofFormat } from '../indy/IndyProofFormatsServiceOptions'
import type { RequestedAttribute } from './models/RequestedAttribute'
import type { IndyRequestedCredentialsOptions } from './models/RequestedCredentials'
import type { RequestedPredicate } from './models/RequestedPredicate'
+import type { PresentationPreviewAttribute, PresentationPreviewPredicate } from '../../protocol/v1'
+import type { ProofFormat } from '../ProofFormat'
+import type { IndyRequestProofFormat } from '../indy/IndyProofFormatsServiceOptions'
import type { IndyProof, IndyProofRequest } from 'indy-sdk'
export interface IndyProposeProofFormat {
diff --git a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatService.ts b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatService.ts
index 1aec763e65..ecdb78f358 100644
--- a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatService.ts
+++ b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatService.ts
@@ -1,3 +1,5 @@
+import type { IndyProofFormat, IndyProposeProofFormat } from './IndyProofFormat'
+import type { GetRequestedCredentialsFormat } from './IndyProofFormatsServiceOptions'
import type { AgentContext } from '../../../../agent'
import type { Logger } from '../../../../logger'
import type {
@@ -20,8 +22,6 @@ import type {
ProcessRequestOptions,
VerifyProofOptions,
} from '../models/ProofFormatServiceOptions'
-import type { IndyProofFormat, IndyProposeProofFormat } from './IndyProofFormat'
-import type { GetRequestedCredentialsFormat } from './IndyProofFormatsServiceOptions'
import type { CredDef, IndyProof, Schema } from 'indy-sdk'
import { Lifecycle, scoped } from 'tsyringe'
diff --git a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts
index b1ff554453..bb78139bb7 100644
--- a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts
+++ b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts
@@ -1,11 +1,11 @@
+import type { IndyRequestedCredentialsFormat } from './IndyProofFormat'
+import type { ProofAttributeInfo } from '.././indy/models/ProofAttributeInfo'
+import type { ProofPredicateInfo } from '.././indy/models/ProofPredicateInfo'
import type { Attachment } from '../../../../decorators/attachment/Attachment'
import type { IndyRevocationInterval } from '../../../credentials'
import type { GetRequestedCredentialsConfig } from '../../models/GetRequestedCredentialsConfig'
import type { PresentationPreview } from '../../protocol/v1/models/V1PresentationPreview'
import type { ProofExchangeRecord } from '../../repository/ProofExchangeRecord'
-import type { ProofAttributeInfo } from '.././indy/models/ProofAttributeInfo'
-import type { ProofPredicateInfo } from '.././indy/models/ProofPredicateInfo'
-import type { IndyRequestedCredentialsFormat } from './IndyProofFormat'
export type IndyPresentationProofFormat = IndyRequestedCredentialsFormat
diff --git a/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts b/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts
index 2538aaf1b4..8859c48b64 100644
--- a/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts
+++ b/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts
@@ -1,9 +1,9 @@
+import type { ProofAttachmentFormat } from './ProofAttachmentFormat'
import type { Attachment } from '../../../../decorators/attachment/Attachment'
import type { ProposeProofFormats } from '../../models/SharedOptions'
import type { ProofExchangeRecord } from '../../repository'
import type { ProofFormat, ProofFormatPayload } from '../ProofFormat'
import type { ProofRequestOptions } from '../indy/models/ProofRequest'
-import type { ProofAttachmentFormat } from './ProofAttachmentFormat'
export interface CreateRequestAttachmentOptions {
id?: string
diff --git a/packages/core/src/modules/proofs/models/ProofServiceOptions.ts b/packages/core/src/modules/proofs/models/ProofServiceOptions.ts
index 3c7e7e47af..1a978404eb 100644
--- a/packages/core/src/modules/proofs/models/ProofServiceOptions.ts
+++ b/packages/core/src/modules/proofs/models/ProofServiceOptions.ts
@@ -1,8 +1,8 @@
+import type { GetRequestedCredentialsConfig } from './GetRequestedCredentialsConfig'
+import type { AutoAcceptProof } from './ProofAutoAcceptType'
import type { ConnectionRecord } from '../../connections'
import type { ProofFormat, ProofFormatPayload } from '../formats/ProofFormat'
import type { ProofExchangeRecord } from '../repository'
-import type { GetRequestedCredentialsConfig } from './GetRequestedCredentialsConfig'
-import type { AutoAcceptProof } from './ProofAutoAcceptType'
export type FormatDataMessagePayload<
CFs extends ProofFormat[] = ProofFormat[],
diff --git a/packages/core/src/modules/proofs/models/SharedOptions.ts b/packages/core/src/modules/proofs/models/SharedOptions.ts
index e479dea456..18fe5ef7f3 100644
--- a/packages/core/src/modules/proofs/models/SharedOptions.ts
+++ b/packages/core/src/modules/proofs/models/SharedOptions.ts
@@ -1,9 +1,9 @@
+import type { GetRequestedCredentialsConfig } from './GetRequestedCredentialsConfig'
import type { IndyProposeProofFormat } from '../formats/indy/IndyProofFormat'
import type { IndyRequestProofFormat, IndyVerifyProofFormat } from '../formats/indy/IndyProofFormatsServiceOptions'
import type { ProofRequest } from '../formats/indy/models/ProofRequest'
import type { IndyRequestedCredentialsOptions } from '../formats/indy/models/RequestedCredentials'
import type { RetrievedCredentials } from '../formats/indy/models/RetrievedCredentials'
-import type { GetRequestedCredentialsConfig } from './GetRequestedCredentialsConfig'
export interface ProposeProofFormats {
// If you want to propose an indy proof without attributes or
diff --git a/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts b/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts
index 1596e55e03..cfe6ae8e43 100644
--- a/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts
+++ b/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts
@@ -340,7 +340,7 @@ export class V2ProofService extends P
for (const attachmentFormat of requestAttachments) {
const service = this.getFormatServiceForFormat(attachmentFormat.format)
- service?.processRequest({
+ await service?.processRequest({
requestAttachment: attachmentFormat,
})
}
diff --git a/packages/core/src/modules/routing/MediatorApi.ts b/packages/core/src/modules/routing/MediatorApi.ts
index bc366e0015..78a1cbd849 100644
--- a/packages/core/src/modules/routing/MediatorApi.ts
+++ b/packages/core/src/modules/routing/MediatorApi.ts
@@ -1,5 +1,5 @@
-import type { EncryptedMessage } from '../../types'
import type { MediationRecord } from './repository'
+import type { EncryptedMessage } from '../../types'
import { AgentContext } from '../../agent'
import { Dispatcher } from '../../agent/Dispatcher'
diff --git a/packages/core/src/modules/routing/MediatorModule.ts b/packages/core/src/modules/routing/MediatorModule.ts
index db81da0f1a..fa4ef31f13 100644
--- a/packages/core/src/modules/routing/MediatorModule.ts
+++ b/packages/core/src/modules/routing/MediatorModule.ts
@@ -1,6 +1,6 @@
+import type { MediatorModuleConfigOptions } from './MediatorModuleConfig'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { DependencyManager, Module } from '../../plugins'
-import type { MediatorModuleConfigOptions } from './MediatorModuleConfig'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/routing/RecipientApi.ts b/packages/core/src/modules/routing/RecipientApi.ts
index 49c09365eb..e74ee664ca 100644
--- a/packages/core/src/modules/routing/RecipientApi.ts
+++ b/packages/core/src/modules/routing/RecipientApi.ts
@@ -1,8 +1,8 @@
-import type { OutboundWebSocketClosedEvent, OutboundWebSocketOpenedEvent } from '../../transport'
-import type { ConnectionRecord } from '../connections'
import type { MediationStateChangedEvent } from './RoutingEvents'
import type { MediationRecord } from './repository'
import type { GetRoutingOptions } from './services/RoutingService'
+import type { OutboundWebSocketClosedEvent, OutboundWebSocketOpenedEvent } from '../../transport'
+import type { ConnectionRecord } from '../connections'
import { firstValueFrom, interval, merge, ReplaySubject, Subject, timer } from 'rxjs'
import { delayWhen, filter, first, takeUntil, tap, throttleTime, timeout } from 'rxjs/operators'
diff --git a/packages/core/src/modules/routing/RecipientModule.ts b/packages/core/src/modules/routing/RecipientModule.ts
index 7f160cdb4a..8ba9364a9d 100644
--- a/packages/core/src/modules/routing/RecipientModule.ts
+++ b/packages/core/src/modules/routing/RecipientModule.ts
@@ -1,6 +1,6 @@
+import type { RecipientModuleConfigOptions } from './RecipientModuleConfig'
import type { FeatureRegistry } from '../../agent/FeatureRegistry'
import type { DependencyManager, Module } from '../../plugins'
-import type { RecipientModuleConfigOptions } from './RecipientModuleConfig'
import { Protocol } from '../../agent/models'
diff --git a/packages/core/src/modules/routing/RoutingEvents.ts b/packages/core/src/modules/routing/RoutingEvents.ts
index f7aa892ebf..86a151abff 100644
--- a/packages/core/src/modules/routing/RoutingEvents.ts
+++ b/packages/core/src/modules/routing/RoutingEvents.ts
@@ -1,8 +1,8 @@
-import type { BaseEvent } from '../../agent/Events'
-import type { Routing } from '../connections'
import type { KeylistUpdate } from './messages/KeylistUpdateMessage'
import type { MediationState } from './models/MediationState'
import type { MediationRecord } from './repository/MediationRecord'
+import type { BaseEvent } from '../../agent/Events'
+import type { Routing } from '../connections'
export enum RoutingEventTypes {
MediationStateChanged = 'MediationStateChanged',
diff --git a/packages/core/src/modules/routing/protocol/pickup/v1/MessagePickupService.ts b/packages/core/src/modules/routing/protocol/pickup/v1/MessagePickupService.ts
index 7c6624af68..9211359eb0 100644
--- a/packages/core/src/modules/routing/protocol/pickup/v1/MessagePickupService.ts
+++ b/packages/core/src/modules/routing/protocol/pickup/v1/MessagePickupService.ts
@@ -1,6 +1,6 @@
+import type { BatchPickupMessage } from './messages'
import type { InboundMessageContext } from '../../../../../agent/models/InboundMessageContext'
import type { EncryptedMessage } from '../../../../../types'
-import type { BatchPickupMessage } from './messages'
import { Dispatcher } from '../../../../../agent/Dispatcher'
import { EventEmitter } from '../../../../../agent/EventEmitter'
diff --git a/packages/core/src/modules/routing/protocol/pickup/v2/V2MessagePickupService.ts b/packages/core/src/modules/routing/protocol/pickup/v2/V2MessagePickupService.ts
index 77d23c2e69..147467f10d 100644
--- a/packages/core/src/modules/routing/protocol/pickup/v2/V2MessagePickupService.ts
+++ b/packages/core/src/modules/routing/protocol/pickup/v2/V2MessagePickupService.ts
@@ -1,6 +1,6 @@
+import type { DeliveryRequestMessage, MessagesReceivedMessage, StatusRequestMessage } from './messages'
import type { InboundMessageContext } from '../../../../../agent/models/InboundMessageContext'
import type { EncryptedMessage } from '../../../../../types'
-import type { DeliveryRequestMessage, MessagesReceivedMessage, StatusRequestMessage } from './messages'
import { Dispatcher } from '../../../../../agent/Dispatcher'
import { OutboundMessageContext } from '../../../../../agent/models'
diff --git a/packages/core/src/modules/routing/services/MediationRecipientService.ts b/packages/core/src/modules/routing/services/MediationRecipientService.ts
index c2ff4acba6..aac33420d6 100644
--- a/packages/core/src/modules/routing/services/MediationRecipientService.ts
+++ b/packages/core/src/modules/routing/services/MediationRecipientService.ts
@@ -1,3 +1,4 @@
+import type { GetRoutingOptions, RemoveRoutingOptions } from './RoutingService'
import type { AgentContext } from '../../../agent'
import type { AgentMessage } from '../../../agent/AgentMessage'
import type { AgentMessageReceivedEvent } from '../../../agent/Events'
@@ -9,7 +10,6 @@ import type { Routing } from '../../connections/services/ConnectionService'
import type { MediationStateChangedEvent, KeylistUpdatedEvent } from '../RoutingEvents'
import type { MediationDenyMessage } from '../messages'
import type { StatusMessage, MessageDeliveryMessage } from '../protocol'
-import type { GetRoutingOptions, RemoveRoutingOptions } from './RoutingService'
import { firstValueFrom, ReplaySubject } from 'rxjs'
import { filter, first, timeout } from 'rxjs/operators'
diff --git a/packages/core/src/modules/vc/W3cCredentialService.ts b/packages/core/src/modules/vc/W3cCredentialService.ts
index 46ac773401..e841a7162d 100644
--- a/packages/core/src/modules/vc/W3cCredentialService.ts
+++ b/packages/core/src/modules/vc/W3cCredentialService.ts
@@ -1,6 +1,3 @@
-import type { AgentContext } from '../../agent/context'
-import type { Key } from '../../crypto/Key'
-import type { Query } from '../../storage/StorageService'
import type { W3cVerifyCredentialResult } from './models'
import type {
CreatePresentationOptions,
@@ -12,6 +9,9 @@ import type {
VerifyPresentationOptions,
} from './models/W3cCredentialServiceOptions'
import type { VerifyPresentationResult } from './models/presentation/VerifyPresentationResult'
+import type { AgentContext } from '../../agent/context'
+import type { Key } from '../../crypto/Key'
+import type { Query } from '../../storage/StorageService'
import { createWalletKeyPairClass } from '../../crypto/WalletKeyPair'
import { AriesFrameworkError } from '../../error'
diff --git a/packages/core/src/modules/vc/W3cVcModule.ts b/packages/core/src/modules/vc/W3cVcModule.ts
index 96231aa168..a793da49f4 100644
--- a/packages/core/src/modules/vc/W3cVcModule.ts
+++ b/packages/core/src/modules/vc/W3cVcModule.ts
@@ -1,5 +1,5 @@
-import type { DependencyManager, Module } from '../../plugins'
import type { W3cVcModuleConfigOptions } from './W3cVcModuleConfig'
+import type { DependencyManager, Module } from '../../plugins'
import { KeyType } from '../../crypto'
import {
diff --git a/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts b/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts
index 2ab30fe7e5..c339fbfb4e 100644
--- a/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts
+++ b/packages/core/src/modules/vc/__tests__/W3cCredentialService.test.ts
@@ -310,7 +310,7 @@ describe('W3cCredentialService', () => {
describe('Credential Storage', () => {
let w3cCredentialRecord: W3cCredentialRecord
- let w3cCredentialRepositoryDeleteMock: jest.MockedFunction
+ let w3cCredentialRepositoryDeleteMock: jest.MockedFunction<(typeof w3cCredentialRepository)['delete']>
beforeEach(async () => {
const credential = JsonTransformer.fromJSON(
diff --git a/packages/core/src/modules/vc/jsonldUtil.ts b/packages/core/src/modules/vc/jsonldUtil.ts
index 761e22726f..b4500c3ba1 100644
--- a/packages/core/src/modules/vc/jsonldUtil.ts
+++ b/packages/core/src/modules/vc/jsonldUtil.ts
@@ -1,6 +1,6 @@
+import type { GetProofsOptions, GetProofsResult, GetTypeOptions } from './models'
import type { JsonObject, JsonValue } from '../../types'
import type { SingleOrArray } from '../../utils/type'
-import type { GetProofsOptions, GetProofsResult, GetTypeOptions } from './models'
import { SECURITY_CONTEXT_URL } from './constants'
import jsonld from './libraries/jsonld'
diff --git a/packages/core/src/modules/vc/libraries/documentLoader.ts b/packages/core/src/modules/vc/libraries/documentLoader.ts
index d8679884d8..50fcde95d0 100644
--- a/packages/core/src/modules/vc/libraries/documentLoader.ts
+++ b/packages/core/src/modules/vc/libraries/documentLoader.ts
@@ -1,5 +1,5 @@
-import type { AgentContext } from '../../../agent/context/AgentContext'
import type { DocumentLoader } from './jsonld'
+import type { AgentContext } from '../../../agent/context/AgentContext'
import { AriesFrameworkError } from '../../../error/AriesFrameworkError'
import { DidResolverService } from '../../dids'
diff --git a/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts b/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts
index c15302a7a8..042550fd8e 100644
--- a/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts
+++ b/packages/core/src/modules/vc/models/W3cCredentialServiceOptions.ts
@@ -1,10 +1,10 @@
-import type { JsonObject } from '../../../types'
-import type { SingleOrArray } from '../../../utils/type'
-import type { ProofPurpose } from '../proof-purposes/ProofPurpose'
import type { W3cCredential } from './credential/W3cCredential'
import type { W3cVerifiableCredential } from './credential/W3cVerifiableCredential'
import type { W3cPresentation } from './presentation/W3cPresentation'
import type { W3cVerifiablePresentation } from './presentation/W3cVerifiablePresentation'
+import type { JsonObject } from '../../../types'
+import type { SingleOrArray } from '../../../utils/type'
+import type { ProofPurpose } from '../proof-purposes/ProofPurpose'
export interface SignCredentialOptions {
credential: W3cCredential
diff --git a/packages/core/src/modules/vc/models/credential/W3cCredential.ts b/packages/core/src/modules/vc/models/credential/W3cCredential.ts
index beed50d700..ca5a1398bc 100644
--- a/packages/core/src/modules/vc/models/credential/W3cCredential.ts
+++ b/packages/core/src/modules/vc/models/credential/W3cCredential.ts
@@ -1,6 +1,6 @@
-import type { JsonObject } from '../../../../types'
import type { CredentialSubjectOptions } from './CredentialSubject'
import type { IssuerOptions } from './Issuer'
+import type { JsonObject } from '../../../../types'
import type { ValidationOptions } from 'class-validator'
import { Expose, Type } from 'class-transformer'
diff --git a/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts b/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts
index 4fbce4e41e..67c09e1ac2 100644
--- a/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts
+++ b/packages/core/src/modules/vc/models/credential/W3cVerifiableCredential.ts
@@ -1,5 +1,5 @@
-import type { LinkedDataProofOptions } from '../LinkedDataProof'
import type { W3cCredentialOptions } from './W3cCredential'
+import type { LinkedDataProofOptions } from '../LinkedDataProof'
import { instanceToPlain, plainToInstance, Transform, TransformationType } from 'class-transformer'
diff --git a/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts b/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts
index 9f8880467a..aaecf7c931 100644
--- a/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts
+++ b/packages/core/src/modules/vc/models/credential/W3cVerifyCredentialResult.ts
@@ -1,5 +1,5 @@
-import type { JsonObject } from '../../../../types'
import type { W3cVerifiableCredential } from './W3cVerifiableCredential'
+import type { JsonObject } from '../../../../types'
export interface VerifyCredentialResult {
credential: W3cVerifiableCredential
diff --git a/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts b/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts
index fa1fd6001a..67a106ee59 100644
--- a/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts
+++ b/packages/core/src/modules/vc/models/presentation/W3cVerifiablePresentation.ts
@@ -1,5 +1,5 @@
-import type { LinkedDataProofOptions } from '../LinkedDataProof'
import type { W3cPresentationOptions } from './W3cPresentation'
+import type { LinkedDataProofOptions } from '../LinkedDataProof'
import { SingleOrArray } from '../../../../utils/type'
import { IsInstanceOrArrayOfInstances } from '../../../../utils/validators'
diff --git a/packages/core/src/plugins/Module.ts b/packages/core/src/plugins/Module.ts
index 8170b159de..93196d71cf 100644
--- a/packages/core/src/plugins/Module.ts
+++ b/packages/core/src/plugins/Module.ts
@@ -1,6 +1,6 @@
+import type { DependencyManager } from './DependencyManager'
import type { FeatureRegistry } from '../agent/FeatureRegistry'
import type { Constructor } from '../utils/mixins'
-import type { DependencyManager } from './DependencyManager'
export interface Module {
api?: Constructor
diff --git a/packages/core/src/storage/InMemoryMessageRepository.ts b/packages/core/src/storage/InMemoryMessageRepository.ts
index a1f01b6515..cf98440a7d 100644
--- a/packages/core/src/storage/InMemoryMessageRepository.ts
+++ b/packages/core/src/storage/InMemoryMessageRepository.ts
@@ -1,5 +1,5 @@
-import type { EncryptedMessage } from '../types'
import type { MessageRepository } from './MessageRepository'
+import type { EncryptedMessage } from '../types'
import { InjectionSymbols } from '../constants'
import { Logger } from '../logger'
diff --git a/packages/core/src/storage/IndyStorageService.ts b/packages/core/src/storage/IndyStorageService.ts
index a66cb579fd..452ef555c1 100644
--- a/packages/core/src/storage/IndyStorageService.ts
+++ b/packages/core/src/storage/IndyStorageService.ts
@@ -1,7 +1,7 @@
-import type { AgentContext } from '../agent'
-import type { IndyWallet } from '../wallet/IndyWallet'
import type { BaseRecord, TagsBase } from './BaseRecord'
import type { BaseRecordConstructor, Query, StorageService } from './StorageService'
+import type { AgentContext } from '../agent'
+import type { IndyWallet } from '../wallet/IndyWallet'
import type { default as Indy, WalletQuery, WalletRecord, WalletSearchOptions } from 'indy-sdk'
import { AgentDependencies } from '../agent/AgentDependencies'
@@ -14,7 +14,8 @@ import { isBoolean } from '../utils/type'
import { assertIndyWallet } from '../wallet/util/assertIndyWallet'
@injectable()
-export class IndyStorageService implements StorageService {
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export class IndyStorageService> implements StorageService {
private indy: typeof Indy
private static DEFAULT_QUERY_OPTIONS = {
diff --git a/packages/core/src/storage/Repository.ts b/packages/core/src/storage/Repository.ts
index 674d2e3e7a..30cc980d7a 100644
--- a/packages/core/src/storage/Repository.ts
+++ b/packages/core/src/storage/Repository.ts
@@ -1,8 +1,8 @@
-import type { AgentContext } from '../agent'
-import type { EventEmitter } from '../agent/EventEmitter'
import type { BaseRecord } from './BaseRecord'
import type { RecordSavedEvent, RecordUpdatedEvent, RecordDeletedEvent } from './RepositoryEvents'
import type { BaseRecordConstructor, Query, StorageService } from './StorageService'
+import type { AgentContext } from '../agent'
+import type { EventEmitter } from '../agent/EventEmitter'
import { RecordDuplicateError, RecordNotFoundError } from '../error'
import { JsonTransformer } from '../utils/JsonTransformer'
diff --git a/packages/core/src/storage/RepositoryEvents.ts b/packages/core/src/storage/RepositoryEvents.ts
index cf9a0d3157..3e3b1e2952 100644
--- a/packages/core/src/storage/RepositoryEvents.ts
+++ b/packages/core/src/storage/RepositoryEvents.ts
@@ -1,5 +1,5 @@
-import type { BaseEvent } from '../agent/Events'
import type { BaseRecord } from './BaseRecord'
+import type { BaseEvent } from '../agent/Events'
export enum RepositoryEventTypes {
RecordSaved = 'RecordSaved',
diff --git a/packages/core/src/storage/StorageService.ts b/packages/core/src/storage/StorageService.ts
index 6ea701df56..180af06bd4 100644
--- a/packages/core/src/storage/StorageService.ts
+++ b/packages/core/src/storage/StorageService.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
+import type { BaseRecord, TagsBase } from './BaseRecord'
import type { AgentContext } from '../agent'
import type { Constructor } from '../utils/mixins'
-import type { BaseRecord, TagsBase } from './BaseRecord'
// https://stackoverflow.com/questions/51954558/how-can-i-remove-a-wider-type-from-a-union-type-without-removing-its-subtypes-in/51955852#51955852
export type SimpleQuery = Partial> & TagsBase
diff --git a/packages/core/src/storage/didcomm/DidCommMessageRecord.ts b/packages/core/src/storage/didcomm/DidCommMessageRecord.ts
index e7c28a84a8..9f234bb15b 100644
--- a/packages/core/src/storage/didcomm/DidCommMessageRecord.ts
+++ b/packages/core/src/storage/didcomm/DidCommMessageRecord.ts
@@ -1,6 +1,6 @@
+import type { DidCommMessageRole } from './DidCommMessageRole'
import type { ConstructableAgentMessage } from '../../agent/AgentMessage'
import type { JsonObject } from '../../types'
-import type { DidCommMessageRole } from './DidCommMessageRole'
import { AriesFrameworkError } from '../../error'
import { JsonTransformer } from '../../utils/JsonTransformer'
diff --git a/packages/core/src/storage/didcomm/DidCommMessageRepository.ts b/packages/core/src/storage/didcomm/DidCommMessageRepository.ts
index db2db2d04f..cffa511e3a 100644
--- a/packages/core/src/storage/didcomm/DidCommMessageRepository.ts
+++ b/packages/core/src/storage/didcomm/DidCommMessageRepository.ts
@@ -1,7 +1,7 @@
+import type { DidCommMessageRole } from './DidCommMessageRole'
import type { AgentContext } from '../../agent'
import type { AgentMessage, ConstructableAgentMessage } from '../../agent/AgentMessage'
import type { JsonObject } from '../../types'
-import type { DidCommMessageRole } from './DidCommMessageRole'
import { EventEmitter } from '../../agent/EventEmitter'
import { InjectionSymbols } from '../../constants'
diff --git a/packages/core/src/storage/migration/StorageUpdateService.ts b/packages/core/src/storage/migration/StorageUpdateService.ts
index eef16af7ff..b5b196406d 100644
--- a/packages/core/src/storage/migration/StorageUpdateService.ts
+++ b/packages/core/src/storage/migration/StorageUpdateService.ts
@@ -1,6 +1,6 @@
+import type { UpdateToVersion } from './updates'
import type { AgentContext } from '../../agent'
import type { VersionString } from '../../utils/version'
-import type { UpdateToVersion } from './updates'
import { InjectionSymbols } from '../../constants'
import { Logger } from '../../logger'
diff --git a/packages/core/src/storage/migration/UpdateAssistant.ts b/packages/core/src/storage/migration/UpdateAssistant.ts
index 756da0e093..ad34a75a28 100644
--- a/packages/core/src/storage/migration/UpdateAssistant.ts
+++ b/packages/core/src/storage/migration/UpdateAssistant.ts
@@ -1,6 +1,6 @@
+import type { UpdateConfig, UpdateToVersion } from './updates'
import type { BaseAgent } from '../../agent/BaseAgent'
import type { FileSystem } from '../FileSystem'
-import type { UpdateConfig, UpdateToVersion } from './updates'
import { InjectionSymbols } from '../../constants'
import { AriesFrameworkError } from '../../error'
diff --git a/packages/core/src/storage/migration/updates.ts b/packages/core/src/storage/migration/updates.ts
index 08c890fdd0..294975e0f4 100644
--- a/packages/core/src/storage/migration/updates.ts
+++ b/packages/core/src/storage/migration/updates.ts
@@ -1,6 +1,6 @@
+import type { V0_1ToV0_2UpdateConfig } from './updates/0.1-0.2'
import type { BaseAgent } from '../../agent/BaseAgent'
import type { VersionString } from '../../utils/version'
-import type { V0_1ToV0_2UpdateConfig } from './updates/0.1-0.2'
import { updateV0_1ToV0_2 } from './updates/0.1-0.2'
import { updateV0_2ToV0_3 } from './updates/0.2-0.3'
@@ -49,4 +49,4 @@ export const CURRENT_FRAMEWORK_STORAGE_VERSION = supportedUpdates[supportedUpdat
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type LastItem = T extends readonly [...infer _, infer U] ? U : T[0] | undefined
-export type UpdateToVersion = typeof supportedUpdates[number]['toVersion']
+export type UpdateToVersion = (typeof supportedUpdates)[number]['toVersion']
diff --git a/packages/core/src/storage/migration/updates/0.1-0.2/mediation.ts b/packages/core/src/storage/migration/updates/0.1-0.2/mediation.ts
index 7d41c3366d..c131646507 100644
--- a/packages/core/src/storage/migration/updates/0.1-0.2/mediation.ts
+++ b/packages/core/src/storage/migration/updates/0.1-0.2/mediation.ts
@@ -1,6 +1,6 @@
+import type { V0_1ToV0_2UpdateConfig } from './index'
import type { BaseAgent } from '../../../../agent/BaseAgent'
import type { MediationRecord } from '../../../../modules/routing'
-import type { V0_1ToV0_2UpdateConfig } from './index'
import { MediationRepository, MediationRole } from '../../../../modules/routing'
diff --git a/packages/core/src/transport/HttpOutboundTransport.ts b/packages/core/src/transport/HttpOutboundTransport.ts
index a9ff5c28d6..8ff21d71da 100644
--- a/packages/core/src/transport/HttpOutboundTransport.ts
+++ b/packages/core/src/transport/HttpOutboundTransport.ts
@@ -1,8 +1,8 @@
+import type { OutboundTransport } from './OutboundTransport'
import type { Agent } from '../agent/Agent'
import type { AgentMessageReceivedEvent } from '../agent/Events'
import type { Logger } from '../logger'
import type { OutboundPackage } from '../types'
-import type { OutboundTransport } from './OutboundTransport'
import type fetch from 'node-fetch'
import { AbortController } from 'abort-controller'
diff --git a/packages/core/src/transport/WsOutboundTransport.ts b/packages/core/src/transport/WsOutboundTransport.ts
index 8e97107141..1c248036da 100644
--- a/packages/core/src/transport/WsOutboundTransport.ts
+++ b/packages/core/src/transport/WsOutboundTransport.ts
@@ -1,9 +1,9 @@
+import type { OutboundTransport } from './OutboundTransport'
+import type { OutboundWebSocketClosedEvent, OutboundWebSocketOpenedEvent } from './TransportEventTypes'
import type { Agent } from '../agent/Agent'
import type { AgentMessageReceivedEvent } from '../agent/Events'
import type { Logger } from '../logger'
import type { OutboundPackage } from '../types'
-import type { OutboundTransport } from './OutboundTransport'
-import type { OutboundWebSocketClosedEvent, OutboundWebSocketOpenedEvent } from './TransportEventTypes'
import type WebSocket from 'ws'
import { AgentEventTypes } from '../agent/Events'
diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts
index 36450e0c3c..d2f5a21c8f 100644
--- a/packages/core/src/types.ts
+++ b/packages/core/src/types.ts
@@ -176,7 +176,6 @@ export interface JsonObject {
[property: string]: JsonValue
}
-// Flatten an array of arrays
/**
* Flatten an array of arrays
* @example
diff --git a/packages/core/src/utils/attachment.ts b/packages/core/src/utils/attachment.ts
index 5831e7a37c..a50441abb5 100644
--- a/packages/core/src/utils/attachment.ts
+++ b/packages/core/src/utils/attachment.ts
@@ -1,5 +1,5 @@
-import type { Attachment } from '../decorators/attachment/Attachment'
import type { BaseName } from './MultiBaseEncoder'
+import type { Attachment } from '../decorators/attachment/Attachment'
import { AriesFrameworkError } from '../error/AriesFrameworkError'
diff --git a/packages/core/src/utils/indyError.ts b/packages/core/src/utils/indyError.ts
index c46ebef13e..0472ac0f04 100644
--- a/packages/core/src/utils/indyError.ts
+++ b/packages/core/src/utils/indyError.ts
@@ -60,7 +60,7 @@ export const indyErrors = {
706: 'TransactionNotAllowedError',
} as const
-type IndyErrorValues = typeof indyErrors[keyof typeof indyErrors]
+type IndyErrorValues = (typeof indyErrors)[keyof typeof indyErrors]
export interface IndyError {
name: 'IndyError'
diff --git a/packages/core/src/utils/messageType.ts b/packages/core/src/utils/messageType.ts
index acac87978e..7d7232d330 100644
--- a/packages/core/src/utils/messageType.ts
+++ b/packages/core/src/utils/messageType.ts
@@ -1,5 +1,5 @@
-import type { PlaintextMessage } from '../types'
import type { VersionString } from './version'
+import type { PlaintextMessage } from '../types'
import type { ValidationOptions, ValidationArguments } from 'class-validator'
import { ValidateBy, buildMessage } from 'class-validator'
diff --git a/packages/core/src/wallet/IndyWallet.ts b/packages/core/src/wallet/IndyWallet.ts
index 3e279ff2aa..0bef6447d6 100644
--- a/packages/core/src/wallet/IndyWallet.ts
+++ b/packages/core/src/wallet/IndyWallet.ts
@@ -1,12 +1,3 @@
-import type { KeyPair } from '../crypto/signing-provider/SigningProvider'
-import type {
- EncryptedMessage,
- KeyDerivationMethod,
- WalletConfig,
- WalletConfigRekey,
- WalletExportImportConfig,
-} from '../types'
-import type { Buffer } from '../utils/buffer'
import type {
WalletCreateKeyOptions,
DidConfig,
@@ -16,6 +7,15 @@ import type {
WalletVerifyOptions,
Wallet,
} from './Wallet'
+import type { KeyPair } from '../crypto/signing-provider/SigningProvider'
+import type {
+ EncryptedMessage,
+ KeyDerivationMethod,
+ WalletConfig,
+ WalletConfigRekey,
+ WalletExportImportConfig,
+} from '../types'
+import type { Buffer } from '../utils/buffer'
import type { default as Indy, WalletStorageConfig } from 'indy-sdk'
import { inject, injectable } from 'tsyringe'
diff --git a/packages/core/src/wallet/WalletApi.ts b/packages/core/src/wallet/WalletApi.ts
index 548df623cf..144e9722c3 100644
--- a/packages/core/src/wallet/WalletApi.ts
+++ b/packages/core/src/wallet/WalletApi.ts
@@ -1,5 +1,5 @@
-import type { WalletConfig, WalletConfigRekey, WalletExportImportConfig } from '../types'
import type { Wallet } from './Wallet'
+import type { WalletConfig, WalletConfigRekey, WalletExportImportConfig } from '../types'
import { AgentContext } from '../agent'
import { InjectionSymbols } from '../constants'
diff --git a/packages/core/tests/oob.test.ts b/packages/core/tests/oob.test.ts
index 96f7715bd6..4df883e972 100644
--- a/packages/core/tests/oob.test.ts
+++ b/packages/core/tests/oob.test.ts
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import type { SubjectMessage } from '../../../tests/transport/SubjectInboundTransport'
-import type { CreateOfferOptions, V1CredentialProtocol } from '../src/modules/credentials'
+import type { CreateOfferOptions, DefaultCredentialProtocols } from '../src/modules/credentials'
import type { AgentMessage, AgentMessageReceivedEvent } from '@aries-framework/core'
import { Subject } from 'rxjs'
@@ -10,6 +10,15 @@ import { SubjectOutboundTransport } from '../../../tests/transport/SubjectOutbou
import { Agent } from '../src/agent/Agent'
import { Key } from '../src/crypto'
import { DidExchangeState, HandshakeProtocol } from '../src/modules/connections'
+
+import {
+ AgentEventTypes,
+ AriesFrameworkError,
+ AutoAcceptCredential,
+ CredentialState,
+ V1CredentialPreview,
+} from '@aries-framework/core'
+
import { OutOfBandDidCommService } from '../src/modules/oob/domain/OutOfBandDidCommService'
import { OutOfBandEventTypes } from '../src/modules/oob/domain/OutOfBandEvents'
import { OutOfBandRole } from '../src/modules/oob/domain/OutOfBandRole'
@@ -21,14 +30,6 @@ import { JsonEncoder } from '../src/utils'
import { TestMessage } from './TestMessage'
import { getAgentOptions, prepareForIssuance, waitForCredentialRecord } from './helpers'
-import {
- AgentEventTypes,
- AriesFrameworkError,
- AutoAcceptCredential,
- CredentialState,
- V1CredentialPreview,
-} from '@aries-framework/core'
-
const faberAgentOptions = getAgentOptions('Faber Agent OOB', {
endpoints: ['rxjs:faber'],
})
@@ -57,7 +58,7 @@ describe('out of band', () => {
let faberAgent: Agent
let aliceAgent: Agent
- let credentialTemplate: CreateOfferOptions<[V1CredentialProtocol]>
+ let credentialTemplate: CreateOfferOptions
beforeAll(async () => {
const faberMessages = new Subject()
diff --git a/packages/indy-sdk/package.json b/packages/indy-sdk/package.json
index 4c19732005..02dec486ae 100644
--- a/packages/indy-sdk/package.json
+++ b/packages/indy-sdk/package.json
@@ -19,7 +19,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -34,7 +34,7 @@
"tsyringe": "^4.7.0"
},
"devDependencies": {
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts b/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
index 9f94c7326c..8553af9295 100644
--- a/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
+++ b/packages/indy-sdk/src/dids/IndySdkSovDidRegistrar.ts
@@ -1,5 +1,5 @@
-import type { IndySdkPool } from '../ledger'
import type { IndyEndpointAttrib } from './didSovUtil'
+import type { IndySdkPool } from '../ledger'
import type {
AgentContext,
DidRegistrar,
diff --git a/packages/indy-sdk/src/error/indyError.ts b/packages/indy-sdk/src/error/indyError.ts
index 5d67cfdbf1..c5d23f6093 100644
--- a/packages/indy-sdk/src/error/indyError.ts
+++ b/packages/indy-sdk/src/error/indyError.ts
@@ -60,7 +60,7 @@ export const indyErrors = {
706: 'TransactionNotAllowedError',
} as const
-type IndyErrorValues = typeof indyErrors[keyof typeof indyErrors]
+type IndyErrorValues = (typeof indyErrors)[keyof typeof indyErrors]
export interface IndyError {
name: 'IndyError'
diff --git a/packages/node/package.json b/packages/node/package.json
index 540489b8b6..09f32cc942 100644
--- a/packages/node/package.json
+++ b/packages/node/package.json
@@ -22,13 +22,14 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
},
"dependencies": {
"@aries-framework/core": "0.3.2",
+ "@types/express": "^4.17.15",
"express": "^4.17.1",
"ffi-napi": "^4.0.3",
"indy-sdk": "^1.16.0-dev-1636",
@@ -37,13 +38,12 @@
"ws": "^7.5.3"
},
"devDependencies": {
- "@types/express": "^4.17.13",
"@types/ffi-napi": "^4.0.5",
- "@types/node": "^15.14.4",
+ "@types/node": "^16.11.7",
"@types/node-fetch": "^2.5.10",
"@types/ref-napi": "^3.0.4",
"@types/ws": "^7.4.6",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/openid4vc-client/package.json b/packages/openid4vc-client/package.json
index cac010d054..7b251a86b3 100644
--- a/packages/openid4vc-client/package.json
+++ b/packages/openid4vc-client/package.json
@@ -19,7 +19,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -34,7 +34,7 @@
"devDependencies": {
"@aries-framework/node": "0.3.2",
"reflect-metadata": "^0.1.13",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/question-answer/package.json b/packages/question-answer/package.json
index 01a769bea8..547a9a3f2c 100644
--- a/packages/question-answer/package.json
+++ b/packages/question-answer/package.json
@@ -18,7 +18,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -32,7 +32,7 @@
"devDependencies": {
"@aries-framework/node": "0.3.2",
"reflect-metadata": "^0.1.13",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/packages/question-answer/tests/question-answer.e2e.test.ts b/packages/question-answer/tests/question-answer.e2e.test.ts
index e8d6d5a0c3..c2c35d8c2b 100644
--- a/packages/question-answer/tests/question-answer.e2e.test.ts
+++ b/packages/question-answer/tests/question-answer.e2e.test.ts
@@ -9,10 +9,10 @@ import { SubjectOutboundTransport } from '../../../tests/transport/SubjectOutbou
import { getAgentOptions, makeConnection } from '../../core/tests/helpers'
import testLogger from '../../core/tests/logger'
-import { waitForQuestionAnswerRecord } from './helpers'
-
import { QuestionAnswerModule, QuestionAnswerRole, QuestionAnswerState } from '@aries-framework/question-answer'
+import { waitForQuestionAnswerRecord } from './helpers'
+
const bobAgentOptions = getAgentOptions(
'Bob Question Answer',
{
diff --git a/packages/react-native/package.json b/packages/react-native/package.json
index dab91dd4ec..e2b1b02691 100644
--- a/packages/react-native/package.json
+++ b/packages/react-native/package.json
@@ -18,7 +18,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -36,8 +36,8 @@
"react-native": "0.64.2",
"react-native-fs": "^2.18.0",
"react-native-get-random-values": "^1.7.0",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
},
"peerDependencies": {
"indy-sdk-react-native": "^0.3.0",
diff --git a/packages/tenants/package.json b/packages/tenants/package.json
index 191baf900f..2c4ad8faa9 100644
--- a/packages/tenants/package.json
+++ b/packages/tenants/package.json
@@ -18,7 +18,7 @@
},
"scripts": {
"build": "yarn run clean && yarn run compile",
- "clean": "rimraf -rf ./build",
+ "clean": "rimraf ./build",
"compile": "tsc -p tsconfig.build.json",
"prepublishOnly": "yarn run build",
"test": "jest"
@@ -30,7 +30,7 @@
"devDependencies": {
"@aries-framework/node": "0.3.2",
"reflect-metadata": "^0.1.13",
- "rimraf": "~3.0.2",
- "typescript": "~4.3.0"
+ "rimraf": "^4.0.7",
+ "typescript": "~4.9.4"
}
}
diff --git a/tests/e2e-subject.test.ts b/tests/e2e-subject.test.ts
index 1b6cdb09cc..6f550435fc 100644
--- a/tests/e2e-subject.test.ts
+++ b/tests/e2e-subject.test.ts
@@ -6,10 +6,11 @@ import { getAgentOptions } from '../packages/core/tests/helpers'
import { e2eTest } from './e2e-test'
import { SubjectInboundTransport } from './transport/SubjectInboundTransport'
-import { SubjectOutboundTransport } from './transport/SubjectOutboundTransport'
import { Agent, AutoAcceptCredential, MediatorPickupStrategy } from '@aries-framework/core'
+import { SubjectOutboundTransport } from './transport/SubjectOutboundTransport'
+
const recipientAgentOptions = getAgentOptions('E2E Subject Recipient', {
autoAcceptCredentials: AutoAcceptCredential.ContentApproved,
mediatorPickupStrategy: MediatorPickupStrategy.PickUpV1,
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 3ff691c0e8..45d3c20c52 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -12,7 +12,9 @@
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"experimentalDecorators": true,
- "emitDecoratorMetadata": true
+ "emitDecoratorMetadata": true,
+ // TODO: we should update code to assume errors are of type 'unknown'
+ "useUnknownInCatchVariables": false
},
"exclude": ["node_modules", "build", "**/*.test.ts", "**/__tests__/*.ts", "**/__mocks__/*.ts", "**/build/**"]
}
diff --git a/yarn.lock b/yarn.lock
index 5fb0819bd7..359ab25c51 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10,6 +10,50 @@
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"
+"@aries-framework/core@file:packages/core":
+ version "0.3.2"
+ dependencies:
+ "@digitalcredentials/jsonld" "^5.2.1"
+ "@digitalcredentials/jsonld-signatures" "^9.3.1"
+ "@digitalcredentials/vc" "^1.1.2"
+ "@multiformats/base-x" "^4.0.1"
+ "@stablelib/ed25519" "^1.0.2"
+ "@stablelib/random" "^1.0.1"
+ "@stablelib/sha256" "^1.0.1"
+ "@types/indy-sdk" "1.16.24"
+ "@types/node-fetch" "^2.5.10"
+ "@types/ws" "^7.4.6"
+ abort-controller "^3.0.0"
+ bn.js "^5.2.0"
+ borc "^3.0.0"
+ buffer "^6.0.3"
+ class-transformer "0.5.1"
+ class-validator "0.13.1"
+ did-resolver "^3.1.3"
+ lru_map "^0.4.1"
+ luxon "^1.27.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"
+ tsyringe "^4.7.0"
+ uuid "^8.3.2"
+ varint "^6.0.0"
+ web-did-resolver "^2.0.8"
+
+"@aries-framework/node@file:packages/node":
+ version "0.3.2"
+ dependencies:
+ "@aries-framework/core" "0.3.2"
+ "@types/express" "^4.17.15"
+ express "^4.17.1"
+ ffi-napi "^4.0.3"
+ indy-sdk "^1.16.0-dev-1636"
+ node-fetch "^2.6.1"
+ ref-napi "^3.0.3"
+ ws "^7.5.3"
+
"@azure/core-asynciterator-polyfill@^1.0.0":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz#0dd3849fb8d97f062a39db0e5cadc9ffaf861fec"
@@ -29,38 +73,38 @@
dependencies:
"@babel/highlight" "^7.18.6"
-"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0", "@babel/compat-data@^7.20.1":
- version "7.20.1"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.1.tgz#f2e6ef7790d8c8dbf03d379502dcc246dcce0b30"
- integrity sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==
+"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5":
+ version "7.20.10"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec"
+ integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==
"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92"
- integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==
+ version "7.20.12"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d"
+ integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.20.2"
- "@babel/helper-compilation-targets" "^7.20.0"
- "@babel/helper-module-transforms" "^7.20.2"
- "@babel/helpers" "^7.20.1"
- "@babel/parser" "^7.20.2"
- "@babel/template" "^7.18.10"
- "@babel/traverse" "^7.20.1"
- "@babel/types" "^7.20.2"
+ "@babel/generator" "^7.20.7"
+ "@babel/helper-compilation-targets" "^7.20.7"
+ "@babel/helper-module-transforms" "^7.20.11"
+ "@babel/helpers" "^7.20.7"
+ "@babel/parser" "^7.20.7"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.20.12"
+ "@babel/types" "^7.20.7"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
- json5 "^2.2.1"
+ json5 "^2.2.2"
semver "^6.3.0"
-"@babel/generator@^7.20.1", "@babel/generator@^7.20.2", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2":
- version "7.20.4"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.4.tgz#4d9f8f0c30be75fd90a0562099a26e5839602ab8"
- integrity sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==
+"@babel/generator@^7.20.7", "@babel/generator@^7.5.0", "@babel/generator@^7.7.2":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a"
+ integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==
dependencies:
- "@babel/types" "^7.20.2"
+ "@babel/types" "^7.20.7"
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"
@@ -79,36 +123,38 @@
"@babel/helper-explode-assignable-expression" "^7.18.6"
"@babel/types" "^7.18.9"
-"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0":
- version "7.20.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a"
- integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==
+"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb"
+ integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==
dependencies:
- "@babel/compat-data" "^7.20.0"
+ "@babel/compat-data" "^7.20.5"
"@babel/helper-validator-option" "^7.18.6"
browserslist "^4.21.3"
+ lru-cache "^5.1.1"
semver "^6.3.0"
-"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.2":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz#3c08a5b5417c7f07b5cf3dfb6dc79cbec682e8c2"
- integrity sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==
+"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.7":
+ version "7.20.12"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz#4349b928e79be05ed2d1643b20b99bb87c503819"
+ integrity sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
- "@babel/helper-member-expression-to-functions" "^7.18.9"
+ "@babel/helper-member-expression-to-functions" "^7.20.7"
"@babel/helper-optimise-call-expression" "^7.18.6"
- "@babel/helper-replace-supers" "^7.19.1"
+ "@babel/helper-replace-supers" "^7.20.7"
+ "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/helper-create-regexp-features-plugin@^7.18.6":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz#7976aca61c0984202baca73d84e2337a5424a41b"
- integrity sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==
+ version "7.20.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz#5ea79b59962a09ec2acf20a963a01ab4d076ccca"
+ integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
- regexpu-core "^5.1.0"
+ regexpu-core "^5.2.1"
"@babel/helper-define-polyfill-provider@^0.3.3":
version "0.3.3"
@@ -149,12 +195,12 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-member-expression-to-functions@^7.18.9":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815"
- integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==
+"@babel/helper-member-expression-to-functions@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz#a6f26e919582275a93c3aa6594756d71b0bb7f05"
+ integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==
dependencies:
- "@babel/types" "^7.18.9"
+ "@babel/types" "^7.20.7"
"@babel/helper-module-imports@^7.18.6":
version "7.18.6"
@@ -163,19 +209,19 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-module-transforms@^7.19.6", "@babel/helper-module-transforms@^7.20.2":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz#ac53da669501edd37e658602a21ba14c08748712"
- integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==
+"@babel/helper-module-transforms@^7.20.11":
+ version "7.20.11"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0"
+ integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==
dependencies:
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-module-imports" "^7.18.6"
"@babel/helper-simple-access" "^7.20.2"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/helper-validator-identifier" "^7.19.1"
- "@babel/template" "^7.18.10"
- "@babel/traverse" "^7.20.1"
- "@babel/types" "^7.20.2"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.20.10"
+ "@babel/types" "^7.20.7"
"@babel/helper-optimise-call-expression@^7.18.6":
version "7.18.6"
@@ -189,25 +235,26 @@
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629"
integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==
-"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.19.1":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78"
- integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==
+"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331"
+ integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==
dependencies:
"@babel/helper-environment-visitor" "^7.18.9"
- "@babel/helper-member-expression-to-functions" "^7.18.9"
+ "@babel/helper-member-expression-to-functions" "^7.20.7"
"@babel/helper-optimise-call-expression" "^7.18.6"
- "@babel/traverse" "^7.19.1"
- "@babel/types" "^7.19.0"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.20.7"
+ "@babel/types" "^7.20.7"
-"@babel/helper-simple-access@^7.19.4", "@babel/helper-simple-access@^7.20.2":
+"@babel/helper-simple-access@^7.20.2":
version "7.20.2"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9"
integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==
dependencies:
"@babel/types" "^7.20.2"
-"@babel/helper-skip-transparent-expression-wrappers@^7.18.9":
+"@babel/helper-skip-transparent-expression-wrappers@^7.20.0":
version "7.20.0"
resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684"
integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==
@@ -236,14 +283,14 @@
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"
integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==
-"@babel/helpers@^7.20.1":
- version "7.20.1"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.1.tgz#2ab7a0fcb0a03b5bf76629196ed63c2d7311f4c9"
- integrity sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==
+"@babel/helpers@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce"
+ integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==
dependencies:
- "@babel/template" "^7.18.10"
- "@babel/traverse" "^7.20.1"
- "@babel/types" "^7.20.0"
+ "@babel/template" "^7.20.7"
+ "@babel/traverse" "^7.20.7"
+ "@babel/types" "^7.20.7"
"@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6":
version "7.18.6"
@@ -254,10 +301,10 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2":
- version "7.20.3"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2"
- integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==
+"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b"
+ integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==
"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0":
version "7.18.6"
@@ -284,15 +331,15 @@
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"
"@babel/plugin-proposal-object-rest-spread@^7.0.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz#a556f59d555f06961df1e572bb5eca864c84022d"
- integrity sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a"
+ integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==
dependencies:
- "@babel/compat-data" "^7.20.1"
- "@babel/helper-compilation-targets" "^7.20.0"
+ "@babel/compat-data" "^7.20.5"
+ "@babel/helper-compilation-targets" "^7.20.7"
"@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-syntax-object-rest-spread" "^7.8.3"
- "@babel/plugin-transform-parameters" "^7.20.1"
+ "@babel/plugin-transform-parameters" "^7.20.7"
"@babel/plugin-proposal-optional-catch-binding@^7.0.0":
version "7.18.6"
@@ -303,12 +350,12 @@
"@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.1.0":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993"
- integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz#49f2b372519ab31728cc14115bb0998b15bfda55"
+ integrity sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.9"
- "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0"
"@babel/plugin-syntax-optional-chaining" "^7.8.3"
"@babel/plugin-syntax-async-generators@^7.8.4":
@@ -431,11 +478,11 @@
"@babel/helper-plugin-utils" "^7.19.0"
"@babel/plugin-transform-arrow-functions@^7.0.0":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe"
- integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551"
+ integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-transform-block-scoped-functions@^7.0.0":
version "7.18.6"
@@ -445,38 +492,39 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-block-scoping@^7.0.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz#f59b1767e6385c663fd0bce655db6ca9c8b236ed"
- integrity sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==
+ version "7.20.11"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.11.tgz#9f5a3424bd112a3f32fe0cf9364fbb155cff262a"
+ integrity sha512-tA4N427a7fjf1P0/2I4ScsHGc5jcHPbb30xMbaTke2gxDuWpUfXDuX1FEymJwKk4tuGUvGcejAR6HdZVqmmPyw==
dependencies:
"@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-transform-classes@^7.0.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz#c0033cf1916ccf78202d04be4281d161f6709bb2"
- integrity sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz#f438216f094f6bb31dc266ebfab8ff05aecad073"
+ integrity sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
- "@babel/helper-compilation-targets" "^7.20.0"
+ "@babel/helper-compilation-targets" "^7.20.7"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-optimise-call-expression" "^7.18.6"
"@babel/helper-plugin-utils" "^7.20.2"
- "@babel/helper-replace-supers" "^7.19.1"
+ "@babel/helper-replace-supers" "^7.20.7"
"@babel/helper-split-export-declaration" "^7.18.6"
globals "^11.1.0"
"@babel/plugin-transform-computed-properties@^7.0.0":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz#2357a8224d402dad623caf6259b611e56aec746e"
- integrity sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa"
+ integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/template" "^7.20.7"
"@babel/plugin-transform-destructuring@^7.0.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz#c23741cfa44ddd35f5e53896e88c75331b8b2792"
- integrity sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz#8bda578f71620c7de7c93af590154ba331415454"
+ integrity sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==
dependencies:
"@babel/helper-plugin-utils" "^7.20.2"
@@ -527,13 +575,13 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0":
- version "7.19.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz#25b32feef24df8038fc1ec56038917eacb0b730c"
- integrity sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==
+ version "7.20.11"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz#8cb23010869bf7669fd4b3098598b6b2be6dc607"
+ integrity sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw==
dependencies:
- "@babel/helper-module-transforms" "^7.19.6"
- "@babel/helper-plugin-utils" "^7.19.0"
- "@babel/helper-simple-access" "^7.19.4"
+ "@babel/helper-module-transforms" "^7.20.11"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/helper-simple-access" "^7.20.2"
"@babel/plugin-transform-object-assign@^7.0.0":
version "7.18.6"
@@ -550,10 +598,10 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/helper-replace-supers" "^7.18.6"
-"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.1":
- version "7.20.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz#7b3468d70c3c5b62e46be0a47b6045d8590fb748"
- integrity sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==
+"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.7":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz#0ee349e9d1bc96e78e3b37a7af423a4078a7083f"
+ integrity sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==
dependencies:
"@babel/helper-plugin-utils" "^7.20.2"
@@ -586,23 +634,23 @@
"@babel/helper-plugin-utils" "^7.19.0"
"@babel/plugin-transform-react-jsx@^7.0.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9"
- integrity sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.20.7.tgz#025d85a1935fd7e19dfdcb1b1d4df34d4da484f7"
+ integrity sha512-Tfq7qqD+tRj3EoDhY00nn2uP2hsRxgYGi5mLQ5TimKav0a9Lrpd4deE+fcLXU8zFYRjlKPHZhpCvfEA6qnBxqQ==
dependencies:
"@babel/helper-annotate-as-pure" "^7.18.6"
"@babel/helper-module-imports" "^7.18.6"
- "@babel/helper-plugin-utils" "^7.19.0"
+ "@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-syntax-jsx" "^7.18.6"
- "@babel/types" "^7.19.0"
+ "@babel/types" "^7.20.7"
"@babel/plugin-transform-regenerator@^7.0.0":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73"
- integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==
+ version "7.20.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d"
+ integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==
dependencies:
- "@babel/helper-plugin-utils" "^7.18.6"
- regenerator-transform "^0.15.0"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ regenerator-transform "^0.15.1"
"@babel/plugin-transform-runtime@^7.0.0":
version "7.19.6"
@@ -624,12 +672,12 @@
"@babel/helper-plugin-utils" "^7.18.6"
"@babel/plugin-transform-spread@^7.0.0":
- version "7.19.0"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz#dd60b4620c2fec806d60cfaae364ec2188d593b6"
- integrity sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e"
+ integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==
dependencies:
- "@babel/helper-plugin-utils" "^7.19.0"
- "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9"
+ "@babel/helper-plugin-utils" "^7.20.2"
+ "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0"
"@babel/plugin-transform-sticky-regex@^7.0.0":
version "7.18.6"
@@ -646,11 +694,11 @@
"@babel/helper-plugin-utils" "^7.18.9"
"@babel/plugin-transform-typescript@^7.18.6", "@babel/plugin-transform-typescript@^7.5.0":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.2.tgz#91515527b376fc122ba83b13d70b01af8fe98f3f"
- integrity sha512-jvS+ngBfrnTUBfOQq8NfGnSbF9BrqlR6hjJ2yVxMkmO5nL/cdifNbI30EfjRlN4g5wYWNnMPyj5Sa6R1pbLeag==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.7.tgz#673f49499cd810ae32a1ea5f3f8fab370987e055"
+ integrity sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw==
dependencies:
- "@babel/helper-create-class-features-plugin" "^7.20.2"
+ "@babel/helper-create-class-features-plugin" "^7.20.7"
"@babel/helper-plugin-utils" "^7.20.2"
"@babel/plugin-syntax-typescript" "^7.20.0"
@@ -692,41 +740,41 @@
source-map-support "^0.5.16"
"@babel/runtime@^7.8.4":
- version "7.20.1"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9"
- integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd"
+ integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==
dependencies:
- regenerator-runtime "^0.13.10"
+ regenerator-runtime "^0.13.11"
-"@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.3.3":
- version "7.18.10"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
- integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==
+"@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8"
+ integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==
dependencies:
"@babel/code-frame" "^7.18.6"
- "@babel/parser" "^7.18.10"
- "@babel/types" "^7.18.10"
+ "@babel/parser" "^7.20.7"
+ "@babel/types" "^7.20.7"
-"@babel/traverse@^7.0.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1", "@babel/traverse@^7.7.2":
- version "7.20.1"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8"
- integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==
+"@babel/traverse@^7.0.0", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2":
+ version "7.20.12"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.12.tgz#7f0f787b3a67ca4475adef1f56cb94f6abd4a4b5"
+ integrity sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==
dependencies:
"@babel/code-frame" "^7.18.6"
- "@babel/generator" "^7.20.1"
+ "@babel/generator" "^7.20.7"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/parser" "^7.20.1"
- "@babel/types" "^7.20.0"
+ "@babel/parser" "^7.20.7"
+ "@babel/types" "^7.20.7"
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.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842"
- integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==
+"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
+ version "7.20.7"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f"
+ integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==
dependencies:
"@babel/helper-string-parser" "^7.19.4"
"@babel/helper-validator-identifier" "^7.19.1"
@@ -2205,9 +2253,9 @@
"@hapi/hoek" "^9.0.0"
"@sideway/formula@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c"
- integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f"
+ integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==
"@sideway/pinpoint@^2.0.0":
version "2.0.0"
@@ -2215,9 +2263,9 @@
integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==
"@sinonjs/commons@^1.7.0":
- version "1.8.5"
- resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.5.tgz#e280c94c95f206dcfd5aca00a43f2156b758c764"
- integrity sha512-rTpCA0wG1wUxglBSFdMMY0oTrKYvgf4fNgv/sXbfCVAdf+FnPBdKJR/7XbpTCwbCrvCbdPYnlWaUUYz4V2fPDA==
+ version "1.8.6"
+ resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9"
+ integrity sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==
dependencies:
type-detect "4.0.8"
@@ -2367,9 +2415,9 @@
"@babel/types" "^7.0.0"
"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309"
- integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==
+ version "7.18.3"
+ resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.3.tgz#dfc508a85781e5698d5b33443416b6268c4b3e8d"
+ integrity sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==
dependencies:
"@babel/types" "^7.3.0"
@@ -2396,9 +2444,11 @@
"@types/node" "*"
"@types/cors@^2.8.10":
- version "2.8.12"
- resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080"
- integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==
+ version "2.8.13"
+ resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94"
+ integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==
+ dependencies:
+ "@types/node" "*"
"@types/eslint@^7.2.13":
version "7.29.0"
@@ -2418,29 +2468,29 @@
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
-"@types/express-serve-static-core@^4.17.18":
- version "4.17.31"
- resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz#a1139efeab4e7323834bb0226e62ac019f474b2f"
- integrity sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==
+"@types/express-serve-static-core@^4.17.31":
+ version "4.17.32"
+ resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.32.tgz#93dda387f5516af616d8d3f05f2c4c79d81e1b82"
+ integrity sha512-aI5h/VOkxOF2Z1saPy0Zsxs5avets/iaiAJYznQFm5By/pamU31xWKL//epiF4OfUA2qTOc9PV6tCUjhO8wlZA==
dependencies:
"@types/node" "*"
"@types/qs" "*"
"@types/range-parser" "*"
-"@types/express@^4.17.13":
- version "4.17.14"
- resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.14.tgz#143ea0557249bc1b3b54f15db4c81c3d4eb3569c"
- integrity sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==
+"@types/express@^4.17.13", "@types/express@^4.17.15":
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.15.tgz#9290e983ec8b054b65a5abccb610411953d417ff"
+ integrity sha512-Yv0k4bXGOH+8a+7bELd2PqHQsuiANB+A8a4gnQrkRWzrkKlb6KHaVvyXhqs04sVW/OWlbPyYxRgYlIXLfrufMQ==
dependencies:
"@types/body-parser" "*"
- "@types/express-serve-static-core" "^4.17.18"
+ "@types/express-serve-static-core" "^4.17.31"
"@types/qs" "*"
"@types/serve-static" "*"
"@types/ffi-napi@^4.0.5":
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/@types/ffi-napi/-/ffi-napi-4.0.6.tgz#cd1c65cc9e701de664e640ccb17a2e823a674d44"
- integrity sha512-yrBtqeVD1aeVo271jXVEo3iAtbzSGVGRssJv9W9JlUfg5Z5FgHJx2MV88GRwVATu/XWg6zyenW/cb1MNAuOtaQ==
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/@types/ffi-napi/-/ffi-napi-4.0.7.tgz#b3a9beeae160c74adca801ca1c9defb1ec0a1a32"
+ integrity sha512-2CvLfgxCUUSj7qVab6/uFLyVpgVd2gEV4H/TQEHHn6kZTV8iTesz9uo0bckhwzsh71atutOv8P3JmvRX2ZvpZg==
dependencies:
"@types/node" "*"
"@types/ref-napi" "*"
@@ -2452,9 +2502,9 @@
integrity sha512-0sMBeFoqdGgdXoR/hgKYSWMpFufSpToosNsI2VgmkPqZJgeEXsXNu2hGr0FN401dBro2tNO5y2D6uw3UxVaxbg==
"@types/graceful-fs@^4.1.2":
- version "4.1.5"
- resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15"
- integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==
+ version "4.1.6"
+ resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae"
+ integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==
dependencies:
"@types/node" "*"
@@ -2499,7 +2549,7 @@
jest-diff "^26.0.0"
pretty-format "^26.0.0"
-"@types/json-schema@*", "@types/json-schema@^7.0.7":
+"@types/json-schema@*", "@types/json-schema@^7.0.9":
version "7.0.11"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==
@@ -2537,10 +2587,10 @@
"@types/node" "*"
form-data "^3.0.0"
-"@types/node@*", "@types/node@^15.14.4":
- version "15.14.9"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.9.tgz#bc43c990c3c9be7281868bbc7b8fdd6e2b57adfa"
- integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==
+"@types/node@*", "@types/node@^16.11.7":
+ version "16.18.11"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.11.tgz#cbb15c12ca7c16c85a72b6bdc4d4b01151bb3cae"
+ integrity sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==
"@types/normalize-package-data@^2.4.0":
version "2.4.1"
@@ -2558,9 +2608,9 @@
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
"@types/prettier@^2.1.5":
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.1.tgz#dfd20e2dc35f027cdd6c1908e80a5ddc7499670e"
- integrity sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==
+ version "2.7.2"
+ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0"
+ integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==
"@types/prop-types@*":
version "15.7.5"
@@ -2594,16 +2644,16 @@
csstype "^3.0.2"
"@types/ref-napi@*", "@types/ref-napi@^3.0.4":
- version "3.0.5"
- resolved "https://registry.yarnpkg.com/@types/ref-napi/-/ref-napi-3.0.5.tgz#8db441d381737af5c353d7dd89c7593b5f2080c8"
- integrity sha512-u+L/RdwTuJes3pDypOVR/MtcqzoULu8Z8yulP6Tw5z7eXV1ba1llizNVFtI/m2iPfDy/dPPt+3ar1QCgonTzsw==
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/@types/ref-napi/-/ref-napi-3.0.6.tgz#56f95b10e7698dced16e05b2bd10b6a46cf90f20"
+ integrity sha512-yLbSiZkLQB9Bv6m46+c4Gdv5Xmw34ehdUagQCfc88FvqHLamaGpYInHbFQ3+sawFonAQ0GDysQIEdZmSOmMh3A==
dependencies:
"@types/node" "*"
"@types/ref-struct-di@*":
- version "1.1.7"
- resolved "https://registry.yarnpkg.com/@types/ref-struct-di/-/ref-struct-di-1.1.7.tgz#85e0149858a81a14f12f15ff31a6dffa42bab2d3"
- integrity sha512-nnHR26qrCnQqxwHTv+rqzu/hGgDZl45TUs4bO6ZjpuC8/M2JoXFxk63xrWmAmqsLe55oxOgAWssyr3YHAMY89g==
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/@types/ref-struct-di/-/ref-struct-di-1.1.8.tgz#df8cbf7b9bbbc03f476dcbe1958f92bf443f17d9"
+ integrity sha512-t5jwtHlEH6c3rgBRtMQTAtysROr1gWt/ZfcytolK+45dag747fUdgmZy/iQs5q41jinMnr62nxwI0Q8GkdK9TA==
dependencies:
"@types/ref-napi" "*"
@@ -2612,6 +2662,11 @@
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
+"@types/semver@^7.3.12":
+ version "7.3.13"
+ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
+ integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==
+
"@types/serve-static@*":
version "1.15.0"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.0.tgz#c7930ff61afb334e121a9da780aac0d9b8f34155"
@@ -2662,88 +2717,101 @@
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==
"@types/yargs@^15.0.0":
- version "15.0.14"
- resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06"
- integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==
+ version "15.0.15"
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.15.tgz#e609a2b1ef9e05d90489c2f5f45bbfb2be092158"
+ integrity sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==
dependencies:
"@types/yargs-parser" "*"
"@types/yargs@^16.0.0":
- version "16.0.4"
- resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977"
- integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==
+ version "16.0.5"
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.5.tgz#12cc86393985735a283e387936398c2f9e5f88e3"
+ integrity sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@^4.26.1":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276"
- integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==
+"@typescript-eslint/eslint-plugin@^5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.1.tgz#deee67e399f2cb6b4608c935777110e509d8018c"
+ integrity sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==
dependencies:
- "@typescript-eslint/experimental-utils" "4.33.0"
- "@typescript-eslint/scope-manager" "4.33.0"
- debug "^4.3.1"
- functional-red-black-tree "^1.0.1"
- ignore "^5.1.8"
- regexpp "^3.1.0"
- semver "^7.3.5"
+ "@typescript-eslint/scope-manager" "5.48.1"
+ "@typescript-eslint/type-utils" "5.48.1"
+ "@typescript-eslint/utils" "5.48.1"
+ debug "^4.3.4"
+ ignore "^5.2.0"
+ natural-compare-lite "^1.4.0"
+ regexpp "^3.2.0"
+ semver "^7.3.7"
tsutils "^3.21.0"
-"@typescript-eslint/experimental-utils@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd"
- integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==
+"@typescript-eslint/parser@^5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.1.tgz#d0125792dab7e232035434ab8ef0658154db2f10"
+ integrity sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==
dependencies:
- "@types/json-schema" "^7.0.7"
- "@typescript-eslint/scope-manager" "4.33.0"
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/typescript-estree" "4.33.0"
- eslint-scope "^5.1.1"
- eslint-utils "^3.0.0"
+ "@typescript-eslint/scope-manager" "5.48.1"
+ "@typescript-eslint/types" "5.48.1"
+ "@typescript-eslint/typescript-estree" "5.48.1"
+ debug "^4.3.4"
-"@typescript-eslint/parser@^4.26.1":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899"
- integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==
- dependencies:
- "@typescript-eslint/scope-manager" "4.33.0"
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/typescript-estree" "4.33.0"
- debug "^4.3.1"
-
-"@typescript-eslint/scope-manager@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3"
- integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==
- dependencies:
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/visitor-keys" "4.33.0"
-
-"@typescript-eslint/types@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72"
- integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==
-
-"@typescript-eslint/typescript-estree@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609"
- integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==
- dependencies:
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/visitor-keys" "4.33.0"
- debug "^4.3.1"
- globby "^11.0.3"
- is-glob "^4.0.1"
- semver "^7.3.5"
+"@typescript-eslint/scope-manager@5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.1.tgz#39c71e4de639f5fe08b988005beaaf6d79f9d64d"
+ integrity sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ==
+ dependencies:
+ "@typescript-eslint/types" "5.48.1"
+ "@typescript-eslint/visitor-keys" "5.48.1"
+
+"@typescript-eslint/type-utils@5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.48.1.tgz#5d94ac0c269a81a91ad77c03407cea2caf481412"
+ integrity sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==
+ dependencies:
+ "@typescript-eslint/typescript-estree" "5.48.1"
+ "@typescript-eslint/utils" "5.48.1"
+ debug "^4.3.4"
tsutils "^3.21.0"
-"@typescript-eslint/visitor-keys@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd"
- integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==
+"@typescript-eslint/types@5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.1.tgz#efd1913a9aaf67caf8a6e6779fd53e14e8587e14"
+ integrity sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg==
+
+"@typescript-eslint/typescript-estree@5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.1.tgz#9efa8ee2aa471c6ab62e649f6e64d8d121bc2056"
+ integrity sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==
dependencies:
- "@typescript-eslint/types" "4.33.0"
- eslint-visitor-keys "^2.0.0"
+ "@typescript-eslint/types" "5.48.1"
+ "@typescript-eslint/visitor-keys" "5.48.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.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.48.1.tgz#20f2f4e88e9e2a0961cbebcb47a1f0f7da7ba7f9"
+ integrity sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==
+ dependencies:
+ "@types/json-schema" "^7.0.9"
+ "@types/semver" "^7.3.12"
+ "@typescript-eslint/scope-manager" "5.48.1"
+ "@typescript-eslint/types" "5.48.1"
+ "@typescript-eslint/typescript-estree" "5.48.1"
+ eslint-scope "^5.1.1"
+ eslint-utils "^3.0.0"
+ semver "^7.3.7"
+
+"@typescript-eslint/visitor-keys@5.48.1":
+ version "5.48.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.1.tgz#79fd4fb9996023ef86849bf6f904f33eb6c8fccb"
+ integrity sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA==
+ dependencies:
+ "@typescript-eslint/types" "5.48.1"
+ eslint-visitor-keys "^3.3.0"
"@unimodules/core@*":
version "7.1.2"
@@ -2871,9 +2939,9 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4:
uri-js "^4.2.2"
ajv@^8.0.1:
- version "8.11.2"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.2.tgz#aecb20b50607acf2569b6382167b65a96008bb78"
- integrity sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==
+ version "8.12.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
+ integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
dependencies:
fast-deep-equal "^3.1.1"
json-schema-traverse "^1.0.0"
@@ -3052,7 +3120,7 @@ array-ify@^1.0.0:
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
-array-includes@^3.1.4:
+array-includes@^3.1.6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f"
integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==
@@ -3083,7 +3151,7 @@ array-unique@^0.3.2:
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==
-array.prototype.flat@^1.2.5:
+array.prototype.flat@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2"
integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==
@@ -3093,6 +3161,16 @@ array.prototype.flat@^1.2.5:
es-abstract "^1.20.4"
es-shim-unscopables "^1.0.0"
+array.prototype.flatmap@^1.3.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183"
+ integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+ es-shim-unscopables "^1.0.0"
+
array.prototype.reduce@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac"
@@ -3201,15 +3279,20 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
+available-typed-arrays@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
+ integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
+
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==
aws4@^1.8.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
- integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
+ version "1.12.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3"
+ integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==
b64-lite@^1.3.1, b64-lite@^1.4.0:
version "1.4.0"
@@ -3406,9 +3489,9 @@ big-integer@1.6.x:
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
bignumber.js@^9.0.0:
- version "9.1.0"
- resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62"
- integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==
+ version "9.1.1"
+ resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6"
+ integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==
bindings@^1.3.1:
version "1.5.0"
@@ -3663,9 +3746,9 @@ camelcase@^6.0.0, camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001400:
- version "1.0.30001434"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz#ec1ec1cfb0a93a34a0600d37903853030520a4e5"
- integrity sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==
+ version "1.0.30001445"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001445.tgz#cf2d4eb93f2bcdf0310de9dd6d18be271bc0b447"
+ integrity sha512-8sdQIdMztYmzfTMO6KfLny878Ln9c2M0fc7EH60IjlP4Dc4PiCy7K2Vl3ITmWgOyPgVQKa5x+UP/KqFsxj4mBg==
canonicalize@^1.0.1:
version "1.0.8"
@@ -3735,9 +3818,9 @@ ci-info@^2.0.0:
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
ci-info@^3.2.0:
- version "3.7.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.0.tgz#6d01b3696c59915b6ce057e4aa4adfc2fa25f5ef"
- integrity sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.1.tgz#708a6cdae38915d597afdf3b145f2f8e1ff55f3f"
+ integrity sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==
cjs-module-lexer@^1.0.0:
version "1.2.2"
@@ -4184,9 +4267,9 @@ copy-descriptor@^0.1.0:
integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==
core-js-compat@^3.25.1:
- version "3.26.1"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.26.1.tgz#0e710b09ebf689d719545ac36e49041850f943df"
- integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A==
+ version "3.27.1"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.27.1.tgz#b5695eb25c602d72b1d30cbfba3cb7e5e4cf0a67"
+ integrity sha512-Dg91JFeCDA17FKnneN7oCMz4BkQ4TcffkgHP4OWwp9yx3pi7ubqMDXXSacfNak1PQqjc95skyt+YBLHQJnkJwA==
dependencies:
browserslist "^4.21.4"
@@ -4320,18 +4403,18 @@ dateformat@^3.0.0:
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dayjs@^1.8.15:
- version "1.11.6"
- resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb"
- integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==
+ version "1.11.7"
+ resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2"
+ integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==
-debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
+debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
-debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4:
+debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -4364,11 +4447,11 @@ decamelize@^1.1.0, decamelize@^1.2.0:
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
decimal.js@^10.2.1:
- version "10.4.2"
- resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.2.tgz#0341651d1d997d86065a2ce3a441fbd0d8e8b98e"
- integrity sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA==
+ version "10.4.3"
+ resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
+ integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==
-decode-uri-component@^0.2.0:
+decode-uri-component@^0.2.0, decode-uri-component@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
@@ -4672,40 +4755,58 @@ errorhandler@^1.5.0:
escape-html "~1.0.3"
es-abstract@^1.19.0, es-abstract@^1.20.4:
- version "1.20.4"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861"
- integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==
+ version "1.21.1"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6"
+ integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==
dependencies:
+ available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
+ es-set-tostringtag "^2.0.1"
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
function.prototype.name "^1.1.5"
get-intrinsic "^1.1.3"
get-symbol-description "^1.0.0"
+ globalthis "^1.0.3"
+ gopd "^1.0.1"
has "^1.0.3"
has-property-descriptors "^1.0.0"
+ has-proto "^1.0.1"
has-symbols "^1.0.3"
- internal-slot "^1.0.3"
+ internal-slot "^1.0.4"
+ is-array-buffer "^3.0.1"
is-callable "^1.2.7"
is-negative-zero "^2.0.2"
is-regex "^1.1.4"
is-shared-array-buffer "^1.0.2"
is-string "^1.0.7"
+ is-typed-array "^1.1.10"
is-weakref "^1.0.2"
object-inspect "^1.12.2"
object-keys "^1.1.1"
object.assign "^4.1.4"
regexp.prototype.flags "^1.4.3"
safe-regex-test "^1.0.0"
- string.prototype.trimend "^1.0.5"
- string.prototype.trimstart "^1.0.5"
+ string.prototype.trimend "^1.0.6"
+ string.prototype.trimstart "^1.0.6"
+ typed-array-length "^1.0.4"
unbox-primitive "^1.0.2"
+ which-typed-array "^1.1.9"
es-array-method-boxes-properly@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e"
integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==
+es-set-tostringtag@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8"
+ integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==
+ dependencies:
+ get-intrinsic "^1.1.3"
+ has "^1.0.3"
+ has-tostringtag "^1.0.0"
+
es-shim-unscopables@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241"
@@ -4760,17 +4861,18 @@ escodegen@^2.0.0:
source-map "~0.6.1"
eslint-config-prettier@^8.3.0:
- version "8.5.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1"
- integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==
+ version "8.6.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207"
+ integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==
-eslint-import-resolver-node@^0.3.6:
- version "0.3.6"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
- integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==
+eslint-import-resolver-node@^0.3.7:
+ version "0.3.7"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7"
+ integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==
dependencies:
debug "^3.2.7"
- resolve "^1.20.0"
+ is-core-module "^2.11.0"
+ resolve "^1.22.1"
eslint-import-resolver-typescript@^2.4.0:
version "2.7.1"
@@ -4783,7 +4885,7 @@ eslint-import-resolver-typescript@^2.4.0:
resolve "^1.22.0"
tsconfig-paths "^3.14.1"
-eslint-module-utils@^2.7.3:
+eslint-module-utils@^2.7.4:
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==
@@ -4791,22 +4893,24 @@ eslint-module-utils@^2.7.3:
debug "^3.2.7"
eslint-plugin-import@^2.23.4:
- version "2.26.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b"
- integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==
+ version "2.27.4"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.4.tgz#319c2f6f6580e1678d674a258ee5e981c10cc25b"
+ integrity sha512-Z1jVt1EGKia1X9CnBCkpAOhWy8FgQ7OmJ/IblEkT82yrFU/xJaxwujaTzLWqigewwynRQ9mmHfX9MtAfhxm0sA==
dependencies:
- array-includes "^3.1.4"
- array.prototype.flat "^1.2.5"
- debug "^2.6.9"
+ array-includes "^3.1.6"
+ array.prototype.flat "^1.3.1"
+ array.prototype.flatmap "^1.3.0"
+ debug "^3.2.7"
doctrine "^2.1.0"
- eslint-import-resolver-node "^0.3.6"
- eslint-module-utils "^2.7.3"
+ eslint-import-resolver-node "^0.3.7"
+ eslint-module-utils "^2.7.4"
has "^1.0.3"
- is-core-module "^2.8.1"
+ is-core-module "^2.11.0"
is-glob "^4.0.3"
minimatch "^3.1.2"
- object.values "^1.1.5"
- resolve "^1.22.0"
+ object.values "^1.1.6"
+ resolve "^1.22.1"
+ semver "^6.3.0"
tsconfig-paths "^3.14.1"
eslint-plugin-prettier@^3.4.0:
@@ -4848,6 +4952,11 @@ 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==
+eslint-visitor-keys@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
+ integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
+
eslint@^7.28.0:
version "7.32.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"
@@ -5168,9 +5277,9 @@ fast-text-encoding@^1.0.3:
integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==
fastq@^1.6.0:
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c"
- integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
+ integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==
dependencies:
reusify "^1.0.4"
@@ -5330,15 +5439,22 @@ flatted@^3.1.0:
integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==
flow-parser@0.*:
- version "0.193.0"
- resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.193.0.tgz#8d705fc2d6b378a24bae189014f6f0320d040c4f"
- integrity sha512-x7ZoArE1UO3Nk2rkq/KK/Tkp714QDMVzEsxIyK2+p7Alx+88LY7KgqmeQZuiAG8TCHucmYuHefbk3KsVFVjouA==
+ version "0.197.0"
+ resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.197.0.tgz#9a581ef7c0b1c3377b195cec0bbad794b88be67b"
+ integrity sha512-yhwkJPxH1JBg0aJunk/jVRy5p3UhVZBGkzL1hq/GK+GaBh6bKr2YKkv6gDuiufaw+i3pKWQgOLtD++1cvrgXLA==
flow-parser@^0.121.0:
version "0.121.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.121.0.tgz#9f9898eaec91a9f7c323e9e992d81ab5c58e618f"
integrity sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg==
+for-each@^0.3.3:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
+ integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
+ dependencies:
+ is-callable "^1.1.3"
+
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -5514,7 +5630,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
-get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3:
+get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385"
integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==
@@ -5668,13 +5784,20 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globals@^13.6.0, globals@^13.9.0:
- version "13.18.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-13.18.0.tgz#fb224daeeb2bb7d254cd2c640f003528b8d0c1dc"
- integrity sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==
+ version "13.19.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8"
+ integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==
dependencies:
type-fest "^0.20.2"
-globby@^11.0.2, globby@^11.0.3:
+globalthis@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
+ integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==
+ dependencies:
+ define-properties "^1.1.3"
+
+globby@^11.0.2, globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
@@ -5686,6 +5809,13 @@ globby@^11.0.2, globby@^11.0.3:
merge2 "^1.4.1"
slash "^3.0.0"
+gopd@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
+ integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
+ dependencies:
+ get-intrinsic "^1.1.3"
+
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.10"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
@@ -5743,6 +5873,11 @@ has-property-descriptors@^1.0.0:
dependencies:
get-intrinsic "^1.1.1"
+has-proto@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0"
+ integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==
+
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"
@@ -5888,6 +6023,11 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
+husky@^7.0.1:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
+ integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
+
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -5919,10 +6059,10 @@ ignore@^4.0.6:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
-ignore@^5.1.8, ignore@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
- integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
+ignore@^5.2.0:
+ version "5.2.4"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
+ integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
image-size@^0.6.0:
version "0.6.3"
@@ -6039,12 +6179,12 @@ inquirer@^7.3.3:
strip-ansi "^6.0.0"
through "^2.3.6"
-internal-slot@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c"
- integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==
+internal-slot@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3"
+ integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==
dependencies:
- get-intrinsic "^1.1.0"
+ get-intrinsic "^1.1.3"
has "^1.0.3"
side-channel "^1.0.4"
@@ -6089,6 +6229,15 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
+is-array-buffer@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a"
+ integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==
+ dependencies:
+ call-bind "^1.0.2"
+ get-intrinsic "^1.1.3"
+ is-typed-array "^1.1.10"
+
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -6114,7 +6263,7 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.2.7:
+is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
@@ -6126,7 +6275,7 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"
-is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0:
+is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
@@ -6337,6 +6486,17 @@ is-text-path@^1.0.1:
dependencies:
text-extensions "^1.0.0"
+is-typed-array@^1.1.10, is-typed-array@^1.1.9:
+ version "1.1.10"
+ resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"
+ integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ gopd "^1.0.1"
+ has-tostringtag "^1.0.0"
+
is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -7087,10 +7247,10 @@ json-text-sequence@~0.3.0:
dependencies:
"@sovpro/delimited-stream" "^1.1.0"
-json5@2.x, json5@^2.2.1:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
- integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
+json5@2.x, json5@^2.2.2:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
+ integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
json5@^1.0.1:
version "1.0.2"
@@ -7262,15 +7422,10 @@ libnpmpublish@^4.0.0:
semver "^7.1.3"
ssri "^8.0.1"
-libphonenumber-js@^1.10.14:
- version "1.10.17"
- resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.17.tgz#7efcfa3068fc076bc59a43a08a723ccd95308474"
- integrity sha512-UQrNzsusSn5qaojdpWqporWRdpx6AGeb+egj64NrpYuyKHvnSH9jMp/1Dy3b/WnMyJA5zgV1yw//jC6J0dCXkw==
-
-libphonenumber-js@^1.9.7:
- version "1.10.14"
- resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.14.tgz#e29da7f539751f724ac54017a098e3c7ca23de94"
- integrity sha512-McGS7GV/WjJ2KjfOGhJU1oJn29RYeo7Q+RpANRbUNMQ9gj5XArpbjurSuyYPTejFwbaUojstQ4XyWCrAzGOUXw==
+libphonenumber-js@^1.10.14, libphonenumber-js@^1.9.7:
+ version "1.10.18"
+ resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.18.tgz#657c419071c8a02c638c0e80d9ee1232f152f280"
+ integrity sha512-NS4ZEgNhwbcPz1gfSXCGFnQm0xEiyTSPRthIuWytDzOiEG9xnZ2FbLyfJC4tI2BMAAXpoWbNxHYH75pa3Dq9og==
lines-and-columns@^1.1.6:
version "1.2.4"
@@ -7410,6 +7565,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
+lru-cache@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
+ dependencies:
+ yallist "^3.0.2"
+
lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
@@ -7975,6 +8137,13 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3:
dependencies:
yallist "^4.0.0"
+minipass@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.0.0.tgz#7cebb0f9fa7d56f0c5b17853cbe28838a8dbbd3b"
+ integrity sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==
+ dependencies:
+ yallist "^4.0.0"
+
minizlib@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
@@ -8087,6 +8256,11 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"
+natural-compare-lite@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
+ integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
+
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -8173,7 +8347,7 @@ node-dir@^0.1.17:
dependencies:
minimatch "^3.0.2"
-node-fetch@2.6.7, node-fetch@^2.0, node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
+node-fetch@2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
@@ -8188,10 +8362,17 @@ node-fetch@3.0.0-beta.9:
data-uri-to-buffer "^3.0.1"
fetch-blob "^2.1.1"
+node-fetch@^2.0, node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
+ version "2.6.8"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.8.tgz#a68d30b162bc1d8fd71a367e81b997e1f4d4937e"
+ integrity sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==
+ dependencies:
+ whatwg-url "^5.0.0"
+
node-gyp-build@^4.2.1:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40"
- integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055"
+ integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==
node-gyp@^5.0.2:
version "5.1.1"
@@ -8264,9 +8445,9 @@ node-pre-gyp@0.17.0:
tar "^4.4.13"
node-releases@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
- integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
+ version "2.0.8"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.8.tgz#0f349cdc8fcfa39a92ac0be9bc48b7706292b9ae"
+ integrity sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==
node-stream-zip@^1.9.1:
version "1.15.0"
@@ -8506,9 +8687,9 @@ object-copy@^0.1.0:
kind-of "^3.0.3"
object-inspect@^1.10.3, object-inspect@^1.12.2, object-inspect@^1.9.0:
- version "1.12.2"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
- integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
+ version "1.12.3"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9"
+ integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==
object-keys@^1.1.1:
version "1.1.1"
@@ -8549,7 +8730,7 @@ object.pick@^1.3.0:
dependencies:
isobject "^3.0.1"
-object.values@^1.1.5:
+object.values@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d"
integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==
@@ -8989,9 +9170,9 @@ prettier-linter-helpers@^1.0.0:
fast-diff "^1.1.2"
prettier@^2.3.1:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
- integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==
+ version "2.8.3"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632"
+ integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==
pretty-format@^26.0.0, pretty-format@^26.5.2, pretty-format@^26.6.2:
version "26.6.2"
@@ -9103,9 +9284,9 @@ pump@^3.0.0:
once "^1.3.1"
punycode@^2.1.0, punycode@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
- integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.2.0.tgz#2092cc57cd2582c38e4e7e8bb869dc8d3148bc74"
+ integrity sha512-LN6QV1IJ9ZhxWTNdktaPClrNfp8xdSAYS0Zk2ddX7XsXZAxckMHPCBcHRo0cTcEIgYPRiGEkmji3Idkh2yFtYw==
pvtsutils@^1.3.2:
version "1.3.2"
@@ -9147,11 +9328,11 @@ query-string@^6.13.8:
strict-uri-encode "^2.0.0"
query-string@^7.0.1:
- version "7.1.1"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.1.tgz#754620669db978625a90f635f12617c271a088e1"
- integrity sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328"
+ integrity sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==
dependencies:
- decode-uri-component "^0.2.0"
+ decode-uri-component "^0.2.2"
filter-obj "^1.1.0"
split-on-first "^1.0.0"
strict-uri-encode "^2.0.0"
@@ -9197,9 +9378,9 @@ rc@^1.2.8:
strip-json-comments "~2.0.1"
react-devtools-core@^4.6.0:
- version "4.26.1"
- resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.26.1.tgz#2893fea58089be64c5356d5bd0eebda8d1bbf317"
- integrity sha512-r1csa5n9nABVpSdAadwTG7K+SfgRJPc/Hdx89BkV5IlA1mEGgGi3ir630ST5D/xYlJQaY3VE75YGADgpNW7HIw==
+ version "4.27.1"
+ resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.27.1.tgz#167aa174383c65786cbb7e965a5b39c702f0a2d3"
+ integrity sha512-qXhcxxDWiFmFAOq48jts9YQYe1+wVoUXzJTlY4jbaATzyio6dd6CUGu3dXBhREeVgpZ+y4kg6vFJzIOZh6vY2w==
dependencies:
shell-quote "^1.6.1"
ws "^7"
@@ -9487,12 +9668,12 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
-regenerator-runtime@^0.13.10, regenerator-runtime@^0.13.2:
+regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2:
version "0.13.11"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
-regenerator-transform@^0.15.0:
+regenerator-transform@^0.15.1:
version "0.15.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56"
integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==
@@ -9516,12 +9697,12 @@ regexp.prototype.flags@^1.4.3:
define-properties "^1.1.3"
functions-have-names "^1.2.2"
-regexpp@^3.1.0:
+regexpp@^3.1.0, regexpp@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
-regexpu-core@^5.1.0:
+regexpu-core@^5.2.1:
version "5.2.2"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc"
integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw==
@@ -9634,11 +9815,11 @@ resolve-url@^0.2.1:
integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==
resolve.exports@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9"
- integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999"
+ integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==
-resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0:
+resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
@@ -9690,13 +9871,18 @@ rimraf@^2.5.4, rimraf@^2.6.3, rimraf@^2.7.1:
dependencies:
glob "^7.1.3"
-rimraf@^3.0.0, rimraf@^3.0.2, rimraf@~3.0.2:
+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==
dependencies:
glob "^7.1.3"
+rimraf@^4.0.7:
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.0.7.tgz#f438c7d6a2d5e5cca1d81e3904a48ac7b053a542"
+ integrity sha512-CUEDDrZvc0swDgVdXGiv3FcYYQMpJxjvSGt85Amj6yU+MCVWurrLCeLiJDdJPHCzNJnwuebBEdcO//eP11Xa7w==
+
rimraf@~2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
@@ -9734,9 +9920,9 @@ rxjs@^6.6.0:
tslib "^1.9.0"
rxjs@^7.2.0:
- version "7.5.7"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39"
- integrity sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==
+ 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"
@@ -9811,7 +9997,7 @@ scheduler@^0.20.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
+semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7:
version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
@@ -10266,7 +10452,7 @@ string-width@^1.0.1:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
-string.prototype.trimend@^1.0.5:
+string.prototype.trimend@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"
integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==
@@ -10275,7 +10461,7 @@ string.prototype.trimend@^1.0.5:
define-properties "^1.1.4"
es-abstract "^1.20.4"
-string.prototype.trimstart@^1.0.5:
+string.prototype.trimstart@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4"
integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==
@@ -10444,13 +10630,13 @@ tar@^4.4.12, tar@^4.4.13:
yallist "^3.1.1"
tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2:
- version "6.1.12"
- resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6"
- integrity sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==
+ version "6.1.13"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.13.tgz#46e22529000f612180601a6fe0680e7da508847b"
+ integrity sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
- minipass "^3.0.0"
+ minipass "^4.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
@@ -10519,9 +10705,9 @@ throat@^5.0.0:
integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==
throat@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375"
- integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe"
+ integrity sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==
through2@^2.0.0, through2@^2.0.1:
version "2.0.5"
@@ -10675,7 +10861,7 @@ ts-typed-json@^0.3.2:
resolved "https://registry.yarnpkg.com/ts-typed-json/-/ts-typed-json-0.3.2.tgz#f4f20f45950bae0a383857f7b0a94187eca1b56a"
integrity sha512-Tdu3BWzaer7R5RvBIJcg9r8HrTZgpJmsX+1meXMJzYypbkj8NK2oJN0yvm4Dp/Iv6tzFa/L5jKRmEVTga6K3nA==
-tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0:
+tsconfig-paths@^3.14.1:
version "3.14.1"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"
integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==
@@ -10685,6 +10871,15 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0:
minimist "^1.2.6"
strip-bom "^3.0.0"
+tsconfig-paths@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz#4819f861eef82e6da52fb4af1e8c930a39ed979a"
+ integrity sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw==
+ dependencies:
+ json5 "^2.2.2"
+ minimist "^1.2.6"
+ strip-bom "^3.0.0"
+
tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -10790,6 +10985,15 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
+typed-array-length@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb"
+ integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==
+ dependencies:
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ is-typed-array "^1.1.9"
+
typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
@@ -10802,10 +11006,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==
-typescript@~4.3.0:
- version "4.3.5"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
- integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
+typescript@~4.9.4:
+ version "4.9.4"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
+ integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
typical@^4.0.0:
version "4.0.0"
@@ -11204,6 +11408,18 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==
+which-typed-array@^1.1.9:
+ version "1.1.9"
+ resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"
+ integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ gopd "^1.0.1"
+ has-tostringtag "^1.0.0"
+ is-typed-array "^1.1.10"
+
which@^1.2.9, which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@@ -11383,7 +11599,7 @@ y18n@^5.0.5:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
-yallist@^3.0.0, yallist@^3.1.1:
+yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
From 4a572fedd7508aeba3e91f4d1d98b9a177941648 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 18 Jan 2023 18:21:40 +0000
Subject: [PATCH 014/139] chore(release): v0.3.3 (#1217)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
CHANGELOG.md | 15 +++++++++
lerna.json | 2 +-
packages/action-menu/CHANGELOG.md | 10 ++++++
packages/action-menu/package.json | 6 ++--
packages/anoncreds/package.json | 4 +--
packages/core/CHANGELOG.md | 11 +++++++
packages/core/package.json | 2 +-
packages/indy-sdk/package.json | 6 ++--
packages/node/CHANGELOG.md | 6 ++++
packages/node/package.json | 4 +--
packages/openid4vc-client/package.json | 6 ++--
packages/question-answer/CHANGELOG.md | 10 ++++++
packages/question-answer/package.json | 8 ++---
packages/react-native/CHANGELOG.md | 10 ++++++
packages/react-native/package.json | 4 +--
packages/tenants/CHANGELOG.md | 6 ++++
packages/tenants/package.json | 6 ++--
yarn.lock | 44 --------------------------
18 files changed, 92 insertions(+), 68 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 50748153df..0d2a624f28 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+- **openid4vc-client:** set package to private ([#1210](https://github.com/hyperledger/aries-framework-javascript/issues/1210)) ([c697716](https://github.com/hyperledger/aries-framework-javascript/commit/c697716bf1837b9fef307f60ff97f01d3d926728))
+
+### Features
+
+- add anoncreds package ([#1118](https://github.com/hyperledger/aries-framework-javascript/issues/1118)) ([adba83d](https://github.com/hyperledger/aries-framework-javascript/commit/adba83d8df176288083969f2c3f975bbfc1acd9c))
+- add minimal oidc-client package ([#1197](https://github.com/hyperledger/aries-framework-javascript/issues/1197)) ([b6f89f9](https://github.com/hyperledger/aries-framework-javascript/commit/b6f89f943dc4417626f868ac9f43a3d890ab62c6))
+- adding trust ping events and trust ping command ([#1182](https://github.com/hyperledger/aries-framework-javascript/issues/1182)) ([fd006f2](https://github.com/hyperledger/aries-framework-javascript/commit/fd006f262a91f901e7f8a9c6e6882ea178230005))
+- **anoncreds:** add anoncreds registry service ([#1204](https://github.com/hyperledger/aries-framework-javascript/issues/1204)) ([86647e7](https://github.com/hyperledger/aries-framework-javascript/commit/86647e7f55c9a362f6ab500538c4de2112e42206))
+- **indy-sdk:** add indy-sdk package ([#1200](https://github.com/hyperledger/aries-framework-javascript/issues/1200)) ([9933b35](https://github.com/hyperledger/aries-framework-javascript/commit/9933b35a6aa4524caef8a885e71b742cd0d7186b))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
### Bug Fixes
diff --git a/lerna.json b/lerna.json
index 56d3a038a2..b8106b0a8a 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
- "version": "0.3.2",
+ "version": "0.3.3",
"useWorkspaces": true,
"npmClient": "yarn",
"command": {
diff --git a/packages/action-menu/CHANGELOG.md b/packages/action-menu/CHANGELOG.md
index c3167eb95d..a18e55cd11 100644
--- a/packages/action-menu/CHANGELOG.md
+++ b/packages/action-menu/CHANGELOG.md
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
+### Features
+
+- **indy-sdk:** add indy-sdk package ([#1200](https://github.com/hyperledger/aries-framework-javascript/issues/1200)) ([9933b35](https://github.com/hyperledger/aries-framework-javascript/commit/9933b35a6aa4524caef8a885e71b742cd0d7186b))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
**Note:** Version bump only for package @aries-framework/action-menu
diff --git a/packages/action-menu/package.json b/packages/action-menu/package.json
index e4b54a744a..9ee1173bdc 100644
--- a/packages/action-menu/package.json
+++ b/packages/action-menu/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/action-menu",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -24,10 +24,10 @@
"test": "jest"
},
"dependencies": {
+ "@aries-framework/core": "0.3.3",
"class-transformer": "0.5.1",
"class-validator": "0.13.1",
- "rxjs": "^7.2.0",
- "@aries-framework/core": "0.3.2"
+ "rxjs": "^7.2.0"
},
"devDependencies": {
"reflect-metadata": "^0.1.13",
diff --git a/packages/anoncreds/package.json b/packages/anoncreds/package.json
index 473c115b01..7947fe5642 100644
--- a/packages/anoncreds/package.json
+++ b/packages/anoncreds/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/anoncreds",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -25,7 +25,7 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "0.3.2"
+ "@aries-framework/core": "0.3.3"
},
"devDependencies": {
"rimraf": "^4.0.7",
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index 341ff76014..8f07830b5f 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
+### Features
+
+- adding trust ping events and trust ping command ([#1182](https://github.com/hyperledger/aries-framework-javascript/issues/1182)) ([fd006f2](https://github.com/hyperledger/aries-framework-javascript/commit/fd006f262a91f901e7f8a9c6e6882ea178230005))
+- **indy-sdk:** add indy-sdk package ([#1200](https://github.com/hyperledger/aries-framework-javascript/issues/1200)) ([9933b35](https://github.com/hyperledger/aries-framework-javascript/commit/9933b35a6aa4524caef8a885e71b742cd0d7186b))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
### Bug Fixes
diff --git a/packages/core/package.json b/packages/core/package.json
index 971091140e..8a54af7192 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/core",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
diff --git a/packages/indy-sdk/package.json b/packages/indy-sdk/package.json
index 02dec486ae..e29cfe6020 100644
--- a/packages/indy-sdk/package.json
+++ b/packages/indy-sdk/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/indy-sdk",
"main": "build/index",
"types": "build/index",
- "version": "0.2.5",
+ "version": "0.3.3",
"private": true,
"files": [
"build"
@@ -25,8 +25,8 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/anoncreds": "0.3.2",
- "@aries-framework/core": "0.3.2",
+ "@aries-framework/anoncreds": "0.3.3",
+ "@aries-framework/core": "0.3.3",
"@types/indy-sdk": "1.16.24",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md
index a3f6e278ce..32ecc62fb0 100644
--- a/packages/node/CHANGELOG.md
+++ b/packages/node/CHANGELOG.md
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
**Note:** Version bump only for package @aries-framework/node
diff --git a/packages/node/package.json b/packages/node/package.json
index 09f32cc942..665472421c 100644
--- a/packages/node/package.json
+++ b/packages/node/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/node",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build",
"bin"
@@ -28,7 +28,7 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "0.3.2",
+ "@aries-framework/core": "0.3.3",
"@types/express": "^4.17.15",
"express": "^4.17.1",
"ffi-napi": "^4.0.3",
diff --git a/packages/openid4vc-client/package.json b/packages/openid4vc-client/package.json
index 7b251a86b3..3f7a671015 100644
--- a/packages/openid4vc-client/package.json
+++ b/packages/openid4vc-client/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/openid4vc-client",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -25,14 +25,14 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "0.3.2",
+ "@aries-framework/core": "0.3.3",
"@sphereon/openid4vci-client": "^0.3.6",
"class-transformer": "0.5.1",
"class-validator": "0.13.1"
},
"peerDependencies": {},
"devDependencies": {
- "@aries-framework/node": "0.3.2",
+ "@aries-framework/node": "0.3.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.0.7",
"typescript": "~4.9.4"
diff --git a/packages/question-answer/CHANGELOG.md b/packages/question-answer/CHANGELOG.md
index 216388c0ea..dc3f65cf84 100644
--- a/packages/question-answer/CHANGELOG.md
+++ b/packages/question-answer/CHANGELOG.md
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
+### Features
+
+- **indy-sdk:** add indy-sdk package ([#1200](https://github.com/hyperledger/aries-framework-javascript/issues/1200)) ([9933b35](https://github.com/hyperledger/aries-framework-javascript/commit/9933b35a6aa4524caef8a885e71b742cd0d7186b))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
**Note:** Version bump only for package @aries-framework/question-answer
diff --git a/packages/question-answer/package.json b/packages/question-answer/package.json
index 547a9a3f2c..1640e283cd 100644
--- a/packages/question-answer/package.json
+++ b/packages/question-answer/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/question-answer",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -24,13 +24,13 @@
"test": "jest"
},
"dependencies": {
+ "@aries-framework/core": "0.3.3",
"class-transformer": "0.5.1",
"class-validator": "0.13.1",
- "rxjs": "^7.2.0",
- "@aries-framework/core": "0.3.2"
+ "rxjs": "^7.2.0"
},
"devDependencies": {
- "@aries-framework/node": "0.3.2",
+ "@aries-framework/node": "0.3.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.0.7",
"typescript": "~4.9.4"
diff --git a/packages/react-native/CHANGELOG.md b/packages/react-native/CHANGELOG.md
index 092f793c6d..c0ff907f14 100644
--- a/packages/react-native/CHANGELOG.md
+++ b/packages/react-native/CHANGELOG.md
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
+### Features
+
+- **indy-sdk:** add indy-sdk package ([#1200](https://github.com/hyperledger/aries-framework-javascript/issues/1200)) ([9933b35](https://github.com/hyperledger/aries-framework-javascript/commit/9933b35a6aa4524caef8a885e71b742cd0d7186b))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
**Note:** Version bump only for package @aries-framework/react-native
diff --git a/packages/react-native/package.json b/packages/react-native/package.json
index e2b1b02691..5eee471421 100644
--- a/packages/react-native/package.json
+++ b/packages/react-native/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/react-native",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -24,7 +24,7 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "0.3.2",
+ "@aries-framework/core": "0.3.3",
"@azure/core-asynciterator-polyfill": "^1.0.0",
"events": "^3.3.0"
},
diff --git a/packages/tenants/CHANGELOG.md b/packages/tenants/CHANGELOG.md
index a73651ba84..d3f33ffa92 100644
--- a/packages/tenants/CHANGELOG.md
+++ b/packages/tenants/CHANGELOG.md
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.3.3](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.2...v0.3.3) (2023-01-18)
+
+### Bug Fixes
+
+- fix typing issues with typescript 4.9 ([#1214](https://github.com/hyperledger/aries-framework-javascript/issues/1214)) ([087980f](https://github.com/hyperledger/aries-framework-javascript/commit/087980f1adf3ee0bc434ca9782243a62c6124444))
+
## [0.3.2](https://github.com/hyperledger/aries-framework-javascript/compare/v0.3.1...v0.3.2) (2023-01-04)
### Bug Fixes
diff --git a/packages/tenants/package.json b/packages/tenants/package.json
index 2c4ad8faa9..13f1f22438 100644
--- a/packages/tenants/package.json
+++ b/packages/tenants/package.json
@@ -2,7 +2,7 @@
"name": "@aries-framework/tenants",
"main": "build/index",
"types": "build/index",
- "version": "0.3.2",
+ "version": "0.3.3",
"files": [
"build"
],
@@ -24,11 +24,11 @@
"test": "jest"
},
"dependencies": {
- "@aries-framework/core": "0.3.2",
+ "@aries-framework/core": "0.3.3",
"async-mutex": "^0.3.2"
},
"devDependencies": {
- "@aries-framework/node": "0.3.2",
+ "@aries-framework/node": "0.3.3",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.0.7",
"typescript": "~4.9.4"
diff --git a/yarn.lock b/yarn.lock
index 359ab25c51..c79dff1e1c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10,50 +10,6 @@
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"
-"@aries-framework/core@file:packages/core":
- version "0.3.2"
- dependencies:
- "@digitalcredentials/jsonld" "^5.2.1"
- "@digitalcredentials/jsonld-signatures" "^9.3.1"
- "@digitalcredentials/vc" "^1.1.2"
- "@multiformats/base-x" "^4.0.1"
- "@stablelib/ed25519" "^1.0.2"
- "@stablelib/random" "^1.0.1"
- "@stablelib/sha256" "^1.0.1"
- "@types/indy-sdk" "1.16.24"
- "@types/node-fetch" "^2.5.10"
- "@types/ws" "^7.4.6"
- abort-controller "^3.0.0"
- bn.js "^5.2.0"
- borc "^3.0.0"
- buffer "^6.0.3"
- class-transformer "0.5.1"
- class-validator "0.13.1"
- did-resolver "^3.1.3"
- lru_map "^0.4.1"
- luxon "^1.27.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"
- tsyringe "^4.7.0"
- uuid "^8.3.2"
- varint "^6.0.0"
- web-did-resolver "^2.0.8"
-
-"@aries-framework/node@file:packages/node":
- version "0.3.2"
- dependencies:
- "@aries-framework/core" "0.3.2"
- "@types/express" "^4.17.15"
- express "^4.17.1"
- ffi-napi "^4.0.3"
- indy-sdk "^1.16.0-dev-1636"
- node-fetch "^2.6.1"
- ref-napi "^3.0.3"
- ws "^7.5.3"
-
"@azure/core-asynciterator-polyfill@^1.0.0":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.2.tgz#0dd3849fb8d97f062a39db0e5cadc9ffaf861fec"
From 25b2bcf81648100b572784e4489a288cc9da0557 Mon Sep 17 00:00:00 2001
From: Timo Glastra
Date: Sat, 21 Jan 2023 03:20:49 +0800
Subject: [PATCH 015/139] feat(cache): add caching interface (#1229)
Signed-off-by: Timo Glastra
---
packages/core/src/agent/Agent.ts | 2 -
packages/core/src/agent/AgentModules.ts | 2 +
.../src/agent/__tests__/AgentModules.test.ts | 4 +
packages/core/src/cache/CacheRecord.ts | 41 -----
packages/core/src/cache/CacheRepository.ts | 17 --
packages/core/src/cache/PersistedLruCache.ts | 75 ---------
.../cache/__tests__/PersistedLruCache.test.ts | 73 --------
packages/core/src/cache/index.ts | 3 -
packages/core/src/index.ts | 2 +-
packages/core/src/modules/cache/Cache.ts | 7 +
.../core/src/modules/cache/CacheModule.ts | 34 ++++
.../src/modules/cache/CacheModuleConfig.ts | 29 ++++
.../src/modules/cache/InMemoryLruCache.ts | 71 ++++++++
.../cache/__tests__/CacheModule.test.ts | 42 +++++
.../cache/__tests__/CacheModuleConfig.test.ts | 14 ++
.../cache/__tests__/InMemoryLruCache.test.ts | 43 +++++
packages/core/src/modules/cache/index.ts | 10 ++
.../SingleContextLruCacheRecord.ts | 41 +++++
.../SingleContextLruCacheRepository.ts | 17 ++
.../SingleContextStorageLruCache.ts | 158 ++++++++++++++++++
.../SingleContextStorageLruCache.test.ts | 91 ++++++++++
.../cache/singleContextLruCache/index.ts | 1 +
.../ledger/__tests__/IndyPoolService.test.ts | 59 ++-----
.../ledger/services/IndyPoolService.ts | 15 +-
packages/indy-sdk/jest.config.ts | 2 +-
.../indy-sdk/src/ledger/IndySdkPoolService.ts | 21 +--
.../__tests__/IndySdkPoolService.test.ts | 60 ++-----
packages/indy-sdk/tests/setup.ts | 1 +
28 files changed, 607 insertions(+), 328 deletions(-)
delete mode 100644 packages/core/src/cache/CacheRecord.ts
delete mode 100644 packages/core/src/cache/CacheRepository.ts
delete mode 100644 packages/core/src/cache/PersistedLruCache.ts
delete mode 100644 packages/core/src/cache/__tests__/PersistedLruCache.test.ts
delete mode 100644 packages/core/src/cache/index.ts
create mode 100644 packages/core/src/modules/cache/Cache.ts
create mode 100644 packages/core/src/modules/cache/CacheModule.ts
create mode 100644 packages/core/src/modules/cache/CacheModuleConfig.ts
create mode 100644 packages/core/src/modules/cache/InMemoryLruCache.ts
create mode 100644 packages/core/src/modules/cache/__tests__/CacheModule.test.ts
create mode 100644 packages/core/src/modules/cache/__tests__/CacheModuleConfig.test.ts
create mode 100644 packages/core/src/modules/cache/__tests__/InMemoryLruCache.test.ts
create mode 100644 packages/core/src/modules/cache/index.ts
create mode 100644 packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.ts
create mode 100644 packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRepository.ts
create mode 100644 packages/core/src/modules/cache/singleContextLruCache/SingleContextStorageLruCache.ts
create mode 100644 packages/core/src/modules/cache/singleContextLruCache/__tests__/SingleContextStorageLruCache.test.ts
create mode 100644 packages/core/src/modules/cache/singleContextLruCache/index.ts
create mode 100644 packages/indy-sdk/tests/setup.ts
diff --git a/packages/core/src/agent/Agent.ts b/packages/core/src/agent/Agent.ts
index a3a6b11ab1..2909c3536d 100644
--- a/packages/core/src/agent/Agent.ts
+++ b/packages/core/src/agent/Agent.ts
@@ -9,7 +9,6 @@ import type { Subscription } from 'rxjs'
import { Subject } from 'rxjs'
import { concatMap, takeUntil } from 'rxjs/operators'
-import { CacheRepository } from '../cache'
import { InjectionSymbols } from '../constants'
import { SigningProviderToken } from '../crypto'
import { JwsService } from '../crypto/JwsService'
@@ -59,7 +58,6 @@ export class Agent extends BaseAge
dependencyManager.registerSingleton(EnvelopeService)
dependencyManager.registerSingleton(FeatureRegistry)
dependencyManager.registerSingleton(JwsService)
- dependencyManager.registerSingleton(CacheRepository)
dependencyManager.registerSingleton(DidCommMessageRepository)
dependencyManager.registerSingleton(StorageVersionRepository)
dependencyManager.registerSingleton(StorageUpdateService)
diff --git a/packages/core/src/agent/AgentModules.ts b/packages/core/src/agent/AgentModules.ts
index 4bb5cc4067..3f9512bdba 100644
--- a/packages/core/src/agent/AgentModules.ts
+++ b/packages/core/src/agent/AgentModules.ts
@@ -4,6 +4,7 @@ import type { IsAny } from '../types'
import type { Constructor } from '../utils/mixins'
import { BasicMessagesModule } from '../modules/basic-messages'
+import { CacheModule } from '../modules/cache'
import { ConnectionsModule } from '../modules/connections'
import { CredentialsModule } from '../modules/credentials'
import { DidsModule } from '../modules/dids'
@@ -157,6 +158,7 @@ function getDefaultAgentModules(agentConfig: AgentConfig) {
oob: () => new OutOfBandModule(),
indy: () => new IndyModule(),
w3cVc: () => new W3cVcModule(),
+ cache: () => new CacheModule(),
} as const
}
diff --git a/packages/core/src/agent/__tests__/AgentModules.test.ts b/packages/core/src/agent/__tests__/AgentModules.test.ts
index cfb88ab7b0..60755c487e 100644
--- a/packages/core/src/agent/__tests__/AgentModules.test.ts
+++ b/packages/core/src/agent/__tests__/AgentModules.test.ts
@@ -2,6 +2,7 @@ import type { Module } from '../../plugins'
import { getAgentConfig } from '../../../tests/helpers'
import { BasicMessagesModule } from '../../modules/basic-messages'
+import { CacheModule } from '../../modules/cache'
import { ConnectionsModule } from '../../modules/connections'
import { CredentialsModule } from '../../modules/credentials'
import { DidsModule } from '../../modules/dids'
@@ -72,6 +73,7 @@ describe('AgentModules', () => {
oob: expect.any(OutOfBandModule),
indy: expect.any(IndyModule),
w3cVc: expect.any(W3cVcModule),
+ cache: expect.any(CacheModule),
})
})
@@ -96,6 +98,7 @@ describe('AgentModules', () => {
oob: expect.any(OutOfBandModule),
indy: expect.any(IndyModule),
w3cVc: expect.any(W3cVcModule),
+ cache: expect.any(CacheModule),
myModule,
})
})
@@ -123,6 +126,7 @@ describe('AgentModules', () => {
oob: expect.any(OutOfBandModule),
indy: expect.any(IndyModule),
w3cVc: expect.any(W3cVcModule),
+ cache: expect.any(CacheModule),
myModule,
})
})
diff --git a/packages/core/src/cache/CacheRecord.ts b/packages/core/src/cache/CacheRecord.ts
deleted file mode 100644
index 26388d1706..0000000000
--- a/packages/core/src/cache/CacheRecord.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import type { RecordTags, TagsBase } from '../storage/BaseRecord'
-
-import { BaseRecord } from '../storage/BaseRecord'
-import { uuid } from '../utils/uuid'
-
-export type CustomCacheTags = TagsBase
-export type DefaultCacheTags = TagsBase
-
-export type CacheTags = RecordTags
-
-export interface CacheStorageProps {
- id?: string
- createdAt?: Date
- tags?: CustomCacheTags
-
- entries: Array<{ key: string; value: unknown }>
-}
-
-export class CacheRecord extends BaseRecord {
- public entries!: Array<{ key: string; value: unknown }>
-
- public static readonly type = 'CacheRecord'
- public readonly type = CacheRecord.type
-
- public constructor(props: CacheStorageProps) {
- super()
-
- if (props) {
- this.id = props.id ?? uuid()
- this.createdAt = props.createdAt ?? new Date()
- this.entries = props.entries
- this._tags = props.tags ?? {}
- }
- }
-
- public getTags() {
- return {
- ...this._tags,
- }
- }
-}
diff --git a/packages/core/src/cache/CacheRepository.ts b/packages/core/src/cache/CacheRepository.ts
deleted file mode 100644
index 3adb2e4fd2..0000000000
--- a/packages/core/src/cache/CacheRepository.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { EventEmitter } from '../agent/EventEmitter'
-import { InjectionSymbols } from '../constants'
-import { inject, injectable } from '../plugins'
-import { Repository } from '../storage/Repository'
-import { StorageService } from '../storage/StorageService'
-
-import { CacheRecord } from './CacheRecord'
-
-@injectable()
-export class CacheRepository extends Repository {
- public constructor(
- @inject(InjectionSymbols.StorageService) storageService: StorageService,
- eventEmitter: EventEmitter
- ) {
- super(CacheRecord, storageService, eventEmitter)
- }
-}
diff --git a/packages/core/src/cache/PersistedLruCache.ts b/packages/core/src/cache/PersistedLruCache.ts
deleted file mode 100644
index bb94c41bee..0000000000
--- a/packages/core/src/cache/PersistedLruCache.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import type { CacheRepository } from './CacheRepository'
-import type { AgentContext } from '../agent'
-
-import { LRUMap } from 'lru_map'
-
-import { CacheRecord } from './CacheRecord'
-
-export class PersistedLruCache {
- private cacheId: string
- private limit: number
- private _cache?: LRUMap
- private cacheRepository: CacheRepository
-
- public constructor(cacheId: string, limit: number, cacheRepository: CacheRepository) {
- this.cacheId = cacheId
- this.limit = limit
- this.cacheRepository = cacheRepository
- }
-
- public async get(agentContext: AgentContext, key: string) {
- const cache = await this.getCache(agentContext)
-
- return cache.get(key)
- }
-
- public async set(agentContext: AgentContext, key: string, value: CacheValue) {
- const cache = await this.getCache(agentContext)
-
- cache.set(key, value)
- await this.persistCache(agentContext)
- }
-
- private async getCache(agentContext: AgentContext) {
- if (!this._cache) {
- const cacheRecord = await this.fetchCacheRecord(agentContext)
- this._cache = this.lruFromRecord(cacheRecord)
- }
-
- return this._cache
- }
-
- private lruFromRecord(cacheRecord: CacheRecord) {
- return new LRUMap(
- this.limit,
- cacheRecord.entries.map((e) => [e.key, e.value as CacheValue])
- )
- }
-
- private async fetchCacheRecord(agentContext: AgentContext) {
- let cacheRecord = await this.cacheRepository.findById(agentContext, this.cacheId)
-
- if (!cacheRecord) {
- cacheRecord = new CacheRecord({
- id: this.cacheId,
- entries: [],
- })
-
- await this.cacheRepository.save(agentContext, cacheRecord)
- }
-
- return cacheRecord
- }
-
- private async persistCache(agentContext: AgentContext) {
- const cache = await this.getCache(agentContext)
-
- await this.cacheRepository.update(
- agentContext,
- new CacheRecord({
- entries: cache.toJSON(),
- id: this.cacheId,
- })
- )
- }
-}
diff --git a/packages/core/src/cache/__tests__/PersistedLruCache.test.ts b/packages/core/src/cache/__tests__/PersistedLruCache.test.ts
deleted file mode 100644
index c7b893108d..0000000000
--- a/packages/core/src/cache/__tests__/PersistedLruCache.test.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { getAgentContext, mockFunction } from '../../../tests/helpers'
-import { CacheRecord } from '../CacheRecord'
-import { CacheRepository } from '../CacheRepository'
-import { PersistedLruCache } from '../PersistedLruCache'
-
-jest.mock('../CacheRepository')
-const CacheRepositoryMock = CacheRepository as jest.Mock
-
-const agentContext = getAgentContext()
-
-describe('PersistedLruCache', () => {
- let cacheRepository: CacheRepository
- let cache: PersistedLruCache
-
- beforeEach(() => {
- cacheRepository = new CacheRepositoryMock()
- mockFunction(cacheRepository.findById).mockResolvedValue(null)
-
- cache = new PersistedLruCache('cacheId', 2, cacheRepository)
- })
-
- it('should return the value from the persisted record', async () => {
- const findMock = mockFunction(cacheRepository.findById).mockResolvedValue(
- new CacheRecord({
- id: 'cacheId',
- entries: [
- {
- key: 'test',
- value: 'somevalue',
- },
- ],
- })
- )
-
- expect(await cache.get(agentContext, 'doesnotexist')).toBeUndefined()
- expect(await cache.get(agentContext, 'test')).toBe('somevalue')
- expect(findMock).toHaveBeenCalledWith(agentContext, 'cacheId')
- })
-
- it('should set the value in the persisted record', async () => {
- const updateMock = mockFunction(cacheRepository.update).mockResolvedValue()
-
- await cache.set(agentContext, 'test', 'somevalue')
- const [[, cacheRecord]] = updateMock.mock.calls
-
- expect(cacheRecord.entries.length).toBe(1)
- expect(cacheRecord.entries[0].key).toBe('test')
- expect(cacheRecord.entries[0].value).toBe('somevalue')
-
- expect(await cache.get(agentContext, 'test')).toBe('somevalue')
- })
-
- it('should remove least recently used entries if entries are added that exceed the limit', async () => {
- // Set first value in cache, resolves fine
- await cache.set(agentContext, 'one', 'valueone')
- expect(await cache.get(agentContext, 'one')).toBe('valueone')
-
- // Set two more entries in the cache. Third item
- // exceeds limit, so first item gets removed
- await cache.set(agentContext, 'two', 'valuetwo')
- await cache.set(agentContext, 'three', 'valuethree')
- expect(await cache.get(agentContext, 'one')).toBeUndefined()
- expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
- expect(await cache.get(agentContext, 'three')).toBe('valuethree')
-
- // Get two from the cache, meaning three will be removed first now
- // because it is not recently used
- await cache.get(agentContext, 'two')
- await cache.set(agentContext, 'four', 'valuefour')
- expect(await cache.get(agentContext, 'three')).toBeUndefined()
- expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
- })
-})
diff --git a/packages/core/src/cache/index.ts b/packages/core/src/cache/index.ts
deleted file mode 100644
index dab23e81d6..0000000000
--- a/packages/core/src/cache/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './PersistedLruCache'
-export * from './CacheRecord'
-export * from './CacheRepository'
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 5b2eaf1762..e2b1665a2a 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -57,6 +57,7 @@ export * from './modules/routing'
export * from './modules/oob'
export * from './modules/dids'
export * from './modules/vc'
+export * from './modules/cache'
export { JsonEncoder, JsonTransformer, isJsonObject, isValidJweStructure, TypedArrayEncoder, Buffer } from './utils'
export * from './logger'
export * from './error'
@@ -65,7 +66,6 @@ export { parseMessageType, IsValidMessageType } from './utils/messageType'
export type { Constructor } from './utils/mixins'
export * from './agent/Events'
export * from './crypto/'
-export { PersistedLruCache, CacheRepository } from './cache'
import { parseInvitationUrl } from './utils/parseInvitation'
import { uuid } from './utils/uuid'
diff --git a/packages/core/src/modules/cache/Cache.ts b/packages/core/src/modules/cache/Cache.ts
new file mode 100644
index 0000000000..546e03925d
--- /dev/null
+++ b/packages/core/src/modules/cache/Cache.ts
@@ -0,0 +1,7 @@
+import type { AgentContext } from '../../agent/context'
+
+export interface Cache {
+ get(agentContext: AgentContext, key: string): Promise
+ set(agentContext: AgentContext, key: string, value: CacheValue, expiresInSeconds?: number): Promise
+ remove(agentContext: AgentContext, key: string): Promise
+}
diff --git a/packages/core/src/modules/cache/CacheModule.ts b/packages/core/src/modules/cache/CacheModule.ts
new file mode 100644
index 0000000000..c4d2ba0e5c
--- /dev/null
+++ b/packages/core/src/modules/cache/CacheModule.ts
@@ -0,0 +1,34 @@
+import type { CacheModuleConfigOptions } from './CacheModuleConfig'
+import type { DependencyManager, Module } from '../../plugins'
+import type { Optional } from '../../utils'
+
+import { CacheModuleConfig } from './CacheModuleConfig'
+import { SingleContextLruCacheRepository } from './singleContextLruCache/SingleContextLruCacheRepository'
+import { SingleContextStorageLruCache } from './singleContextLruCache/SingleContextStorageLruCache'
+
+// CacheModuleOptions makes the credentialProtocols property optional from the config, as it will set it when not provided.
+export type CacheModuleOptions = Optional
+
+export class CacheModule implements Module {
+ public readonly config: CacheModuleConfig
+
+ public constructor(config?: CacheModuleOptions) {
+ this.config = new CacheModuleConfig({
+ ...config,
+ cache:
+ config?.cache ??
+ new SingleContextStorageLruCache({
+ limit: 500,
+ }),
+ })
+ }
+
+ public register(dependencyManager: DependencyManager) {
+ dependencyManager.registerInstance(CacheModuleConfig, this.config)
+
+ // Custom handling for when we're using the SingleContextStorageLruCache
+ if (this.config.cache instanceof SingleContextStorageLruCache) {
+ dependencyManager.registerSingleton(SingleContextLruCacheRepository)
+ }
+ }
+}
diff --git a/packages/core/src/modules/cache/CacheModuleConfig.ts b/packages/core/src/modules/cache/CacheModuleConfig.ts
new file mode 100644
index 0000000000..a04b143dc8
--- /dev/null
+++ b/packages/core/src/modules/cache/CacheModuleConfig.ts
@@ -0,0 +1,29 @@
+import type { Cache } from './Cache'
+
+/**
+ * CacheModuleConfigOptions defines the interface for the options of the CacheModuleConfig class.
+ */
+export interface CacheModuleConfigOptions {
+ /**
+ * Implementation of the {@link Cache} interface.
+ *
+ * NOTE: Starting from AFJ 0.4.0 the default cache implementation will be {@link InMemoryLruCache}
+ * @default SingleContextStorageLruCache - with a limit of 500
+ *
+ *
+ */
+ cache: Cache
+}
+
+export class CacheModuleConfig {
+ private options: CacheModuleConfigOptions
+
+ public constructor(options: CacheModuleConfigOptions) {
+ this.options = options
+ }
+
+ /** See {@link CacheModuleConfigOptions.cache} */
+ public get cache() {
+ return this.options.cache
+ }
+}
diff --git a/packages/core/src/modules/cache/InMemoryLruCache.ts b/packages/core/src/modules/cache/InMemoryLruCache.ts
new file mode 100644
index 0000000000..4a56cb97c5
--- /dev/null
+++ b/packages/core/src/modules/cache/InMemoryLruCache.ts
@@ -0,0 +1,71 @@
+import type { Cache } from './Cache'
+import type { AgentContext } from '../../agent/context'
+
+import { LRUMap } from 'lru_map'
+
+export interface InMemoryLruCacheOptions {
+ /** The maximum number of entries allowed in the cache */
+ limit: number
+}
+
+/**
+ * In memory LRU cache.
+ *
+ * This cache can be used with multiple agent context instances, however all instances will share the same cache.
+ * If you need the cache to be isolated per agent context instance, make sure to use a different cache implementation.
+ */
+export class InMemoryLruCache implements Cache {
+ private readonly cache: LRUMap
+
+ public constructor({ limit }: InMemoryLruCacheOptions) {
+ this.cache = new LRUMap(limit)
+ }
+
+ public async get(agentContext: AgentContext, key: string) {
+ this.removeExpiredItems()
+ const item = this.cache.get(key)
+
+ // Does not exist
+ if (!item) return null
+
+ return item.value as CacheValue
+ }
+
+ public async set(
+ agentContext: AgentContext,
+ key: string,
+ value: CacheValue,
+ expiresInSeconds?: number
+ ): Promise {
+ this.removeExpiredItems()
+ let expiresDate = undefined
+
+ if (expiresInSeconds) {
+ expiresDate = new Date()
+ expiresDate.setSeconds(expiresDate.getSeconds() + expiresInSeconds)
+ }
+
+ this.cache.set(key, {
+ expiresAt: expiresDate?.getTime(),
+ value,
+ })
+ }
+
+ public async remove(agentContext: AgentContext, key: string): Promise {
+ this.removeExpiredItems()
+ this.cache.delete(key)
+ }
+
+ private removeExpiredItems() {
+ this.cache.forEach((value, key) => {
+ if (value.expiresAt && Date.now() > value.expiresAt) {
+ this.cache.delete(key)
+ }
+ })
+ }
+}
+
+interface CacheItem {
+ expiresAt?: number
+ value: unknown
+}
diff --git a/packages/core/src/modules/cache/__tests__/CacheModule.test.ts b/packages/core/src/modules/cache/__tests__/CacheModule.test.ts
new file mode 100644
index 0000000000..fe38e2e139
--- /dev/null
+++ b/packages/core/src/modules/cache/__tests__/CacheModule.test.ts
@@ -0,0 +1,42 @@
+import { DependencyManager } from '../../../plugins/DependencyManager'
+import { CacheModule } from '../CacheModule'
+import { CacheModuleConfig } from '../CacheModuleConfig'
+import { InMemoryLruCache } from '../InMemoryLruCache'
+import { SingleContextStorageLruCache } from '../singleContextLruCache'
+import { SingleContextLruCacheRepository } from '../singleContextLruCache/SingleContextLruCacheRepository'
+
+jest.mock('../../../plugins/DependencyManager')
+const DependencyManagerMock = DependencyManager as jest.Mock
+
+const dependencyManager = new DependencyManagerMock()
+
+describe('CacheModule', () => {
+ afterEach(() => {
+ jest.clearAllMocks()
+ })
+
+ test('registers dependencies on the dependency manager', () => {
+ const cacheModule = new CacheModule({
+ cache: new InMemoryLruCache({ limit: 1 }),
+ })
+ cacheModule.register(dependencyManager)
+
+ expect(dependencyManager.registerInstance).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerInstance).toHaveBeenCalledWith(CacheModuleConfig, cacheModule.config)
+
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledTimes(0)
+ })
+
+ test('registers cache repository on the dependency manager if the SingleContextStorageLruCache is used', () => {
+ const cacheModule = new CacheModule({
+ cache: new SingleContextStorageLruCache({ limit: 1 }),
+ })
+ cacheModule.register(dependencyManager)
+
+ expect(dependencyManager.registerInstance).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerInstance).toHaveBeenCalledWith(CacheModuleConfig, cacheModule.config)
+
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledTimes(1)
+ expect(dependencyManager.registerSingleton).toHaveBeenCalledWith(SingleContextLruCacheRepository)
+ })
+})
diff --git a/packages/core/src/modules/cache/__tests__/CacheModuleConfig.test.ts b/packages/core/src/modules/cache/__tests__/CacheModuleConfig.test.ts
new file mode 100644
index 0000000000..9cbc267122
--- /dev/null
+++ b/packages/core/src/modules/cache/__tests__/CacheModuleConfig.test.ts
@@ -0,0 +1,14 @@
+import { CacheModuleConfig } from '../CacheModuleConfig'
+import { InMemoryLruCache } from '../InMemoryLruCache'
+
+describe('CacheModuleConfig', () => {
+ test('sets values', () => {
+ const cache = new InMemoryLruCache({ limit: 1 })
+
+ const config = new CacheModuleConfig({
+ cache,
+ })
+
+ expect(config.cache).toEqual(cache)
+ })
+})
diff --git a/packages/core/src/modules/cache/__tests__/InMemoryLruCache.test.ts b/packages/core/src/modules/cache/__tests__/InMemoryLruCache.test.ts
new file mode 100644
index 0000000000..aa802575c4
--- /dev/null
+++ b/packages/core/src/modules/cache/__tests__/InMemoryLruCache.test.ts
@@ -0,0 +1,43 @@
+import { getAgentContext } from '../../../../tests/helpers'
+import { InMemoryLruCache } from '../InMemoryLruCache'
+
+const agentContext = getAgentContext()
+
+describe('InMemoryLruCache', () => {
+ let cache: InMemoryLruCache
+
+ beforeEach(() => {
+ cache = new InMemoryLruCache({ limit: 2 })
+ })
+
+ it('should set, get and remove a value', async () => {
+ expect(await cache.get(agentContext, 'item')).toBeNull()
+
+ await cache.set(agentContext, 'item', 'somevalue')
+ expect(await cache.get(agentContext, 'item')).toBe('somevalue')
+
+ await cache.remove(agentContext, 'item')
+ expect(await cache.get(agentContext, 'item')).toBeNull()
+ })
+
+ it('should remove least recently used entries if entries are added that exceed the limit', async () => {
+ // Set first value in cache, resolves fine
+ await cache.set(agentContext, 'one', 'valueone')
+ expect(await cache.get(agentContext, 'one')).toBe('valueone')
+
+ // Set two more entries in the cache. Third item
+ // exceeds limit, so first item gets removed
+ await cache.set(agentContext, 'two', 'valuetwo')
+ await cache.set(agentContext, 'three', 'valuethree')
+ expect(await cache.get(agentContext, 'one')).toBeNull()
+ expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
+ expect(await cache.get(agentContext, 'three')).toBe('valuethree')
+
+ // Get two from the cache, meaning three will be removed first now
+ // because it is not recently used
+ await cache.get(agentContext, 'two')
+ await cache.set(agentContext, 'four', 'valuefour')
+ expect(await cache.get(agentContext, 'three')).toBeNull()
+ expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
+ })
+})
diff --git a/packages/core/src/modules/cache/index.ts b/packages/core/src/modules/cache/index.ts
new file mode 100644
index 0000000000..5b5d932671
--- /dev/null
+++ b/packages/core/src/modules/cache/index.ts
@@ -0,0 +1,10 @@
+// Module
+export { CacheModule, CacheModuleOptions } from './CacheModule'
+export { CacheModuleConfig } from './CacheModuleConfig'
+
+// Cache
+export { Cache } from './Cache'
+
+// Cache Implementations
+export { InMemoryLruCache, InMemoryLruCacheOptions } from './InMemoryLruCache'
+export { SingleContextStorageLruCache, SingleContextStorageLruCacheOptions } from './singleContextLruCache'
diff --git a/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.ts b/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.ts
new file mode 100644
index 0000000000..0016ed3d8e
--- /dev/null
+++ b/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.ts
@@ -0,0 +1,41 @@
+import type { TagsBase } from '../../../storage/BaseRecord'
+
+import { BaseRecord } from '../../../storage/BaseRecord'
+import { uuid } from '../../../utils/uuid'
+
+export interface SingleContextLruCacheItem {
+ value: unknown
+ expiresAt?: number
+}
+
+export interface SingleContextLruCacheProps {
+ id?: string
+ createdAt?: Date
+ tags?: TagsBase
+
+ entries: Map
+}
+
+export class SingleContextLruCacheRecord extends BaseRecord {
+ public entries!: Map
+
+ public static readonly type = 'SingleContextLruCacheRecord'
+ public readonly type = SingleContextLruCacheRecord.type
+
+ public constructor(props: SingleContextLruCacheProps) {
+ super()
+
+ if (props) {
+ this.id = props.id ?? uuid()
+ this.createdAt = props.createdAt ?? new Date()
+ this.entries = props.entries
+ this._tags = props.tags ?? {}
+ }
+ }
+
+ public getTags() {
+ return {
+ ...this._tags,
+ }
+ }
+}
diff --git a/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRepository.ts b/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRepository.ts
new file mode 100644
index 0000000000..dab71b9761
--- /dev/null
+++ b/packages/core/src/modules/cache/singleContextLruCache/SingleContextLruCacheRepository.ts
@@ -0,0 +1,17 @@
+import { EventEmitter } from '../../../agent/EventEmitter'
+import { InjectionSymbols } from '../../../constants'
+import { inject, injectable } from '../../../plugins'
+import { Repository } from '../../../storage/Repository'
+import { StorageService } from '../../../storage/StorageService'
+
+import { SingleContextLruCacheRecord } from './SingleContextLruCacheRecord'
+
+@injectable()
+export class SingleContextLruCacheRepository extends Repository {
+ public constructor(
+ @inject(InjectionSymbols.StorageService) storageService: StorageService,
+ eventEmitter: EventEmitter
+ ) {
+ super(SingleContextLruCacheRecord, storageService, eventEmitter)
+ }
+}
diff --git a/packages/core/src/modules/cache/singleContextLruCache/SingleContextStorageLruCache.ts b/packages/core/src/modules/cache/singleContextLruCache/SingleContextStorageLruCache.ts
new file mode 100644
index 0000000000..72498db91a
--- /dev/null
+++ b/packages/core/src/modules/cache/singleContextLruCache/SingleContextStorageLruCache.ts
@@ -0,0 +1,158 @@
+import type { SingleContextLruCacheItem } from './SingleContextLruCacheRecord'
+import type { AgentContext } from '../../../agent/context'
+import type { Cache } from '../Cache'
+
+import { LRUMap } from 'lru_map'
+
+import { AriesFrameworkError } from '../../../error'
+
+import { SingleContextLruCacheRecord } from './SingleContextLruCacheRecord'
+import { SingleContextLruCacheRepository } from './SingleContextLruCacheRepository'
+
+const CONTEXT_STORAGE_LRU_CACHE_ID = 'CONTEXT_STORAGE_LRU_CACHE_ID'
+
+export interface SingleContextStorageLruCacheOptions {
+ /** The maximum number of entries allowed in the cache */
+ limit: number
+}
+
+/**
+ * Cache that leverages the storage associated with the agent context to store cache records.
+ * It will keep an in-memory cache of the records to avoid hitting the storage on every read request.
+ * Therefor this cache is meant to be used with a single instance of the agent.
+ *
+ * Due to keeping an in-memory copy of the cache, it is also not meant to be used with multiple
+ * agent context instances (meaning multi-tenancy), as they will overwrite the in-memory cache.
+ *
+ * However, this means the cache is not meant for usage with multiple instances.
+ */
+export class SingleContextStorageLruCache implements Cache {
+ private limit: number
+ private _cache?: LRUMap
+ private _contextCorrelationId?: string
+
+ public constructor({ limit }: SingleContextStorageLruCacheOptions) {
+ this.limit = limit
+ }
+
+ public async get(agentContext: AgentContext, key: string) {
+ this.assertContextCorrelationId(agentContext)
+
+ const cache = await this.getCache(agentContext)
+ this.removeExpiredItems(cache)
+
+ const item = cache.get(key)
+
+ // Does not exist
+ if (!item) return null
+
+ // Expired
+ if (item.expiresAt && Date.now() > item.expiresAt) {
+ cache.delete(key)
+ await this.persistCache(agentContext)
+ return null
+ }
+
+ return item.value as CacheValue
+ }
+
+ public async set(
+ agentContext: AgentContext,
+ key: string,
+ value: CacheValue,
+ expiresInSeconds?: number
+ ): Promise {
+ this.assertContextCorrelationId(agentContext)
+
+ let expiresDate = undefined
+
+ if (expiresInSeconds) {
+ expiresDate = new Date()
+ expiresDate.setSeconds(expiresDate.getSeconds() + expiresInSeconds)
+ }
+
+ const cache = await this.getCache(agentContext)
+ this.removeExpiredItems(cache)
+
+ cache.set(key, {
+ expiresAt: expiresDate?.getTime(),
+ value,
+ })
+ await this.persistCache(agentContext)
+ }
+
+ public async remove(agentContext: AgentContext, key: string): Promise {
+ this.assertContextCorrelationId(agentContext)
+
+ const cache = await this.getCache(agentContext)
+ this.removeExpiredItems(cache)
+ cache.delete(key)
+
+ await this.persistCache(agentContext)
+ }
+
+ private async getCache(agentContext: AgentContext) {
+ if (!this._cache) {
+ const cacheRecord = await this.fetchCacheRecord(agentContext)
+ this._cache = this.lruFromRecord(cacheRecord)
+ }
+
+ return this._cache
+ }
+
+ private lruFromRecord(cacheRecord: SingleContextLruCacheRecord) {
+ return new LRUMap(this.limit, cacheRecord.entries.entries())
+ }
+
+ private async fetchCacheRecord(agentContext: AgentContext) {
+ const cacheRepository = agentContext.dependencyManager.resolve(SingleContextLruCacheRepository)
+ let cacheRecord = await cacheRepository.findById(agentContext, CONTEXT_STORAGE_LRU_CACHE_ID)
+
+ if (!cacheRecord) {
+ cacheRecord = new SingleContextLruCacheRecord({
+ id: CONTEXT_STORAGE_LRU_CACHE_ID,
+ entries: new Map(),
+ })
+
+ await cacheRepository.save(agentContext, cacheRecord)
+ }
+
+ return cacheRecord
+ }
+
+ private removeExpiredItems(cache: LRUMap) {
+ cache.forEach((value, key) => {
+ if (value.expiresAt && Date.now() > value.expiresAt) {
+ cache.delete(key)
+ }
+ })
+ }
+
+ private async persistCache(agentContext: AgentContext) {
+ const cacheRepository = agentContext.dependencyManager.resolve(SingleContextLruCacheRepository)
+ const cache = await this.getCache(agentContext)
+
+ await cacheRepository.update(
+ agentContext,
+ new SingleContextLruCacheRecord({
+ entries: new Map(cache.toJSON().map(({ key, value }) => [key, value])),
+ id: CONTEXT_STORAGE_LRU_CACHE_ID,
+ })
+ )
+ }
+
+ /**
+ * Asserts this class is not used with multiple agent context instances.
+ */
+ private assertContextCorrelationId(agentContext: AgentContext) {
+ if (!this._contextCorrelationId) {
+ this._contextCorrelationId = agentContext.contextCorrelationId
+ }
+
+ if (this._contextCorrelationId !== agentContext.contextCorrelationId) {
+ throw new AriesFrameworkError(
+ 'SingleContextStorageLruCache can not be used with multiple agent context instances. Register a custom cache implementation in the CacheModule.'
+ )
+ }
+ }
+}
diff --git a/packages/core/src/modules/cache/singleContextLruCache/__tests__/SingleContextStorageLruCache.test.ts b/packages/core/src/modules/cache/singleContextLruCache/__tests__/SingleContextStorageLruCache.test.ts
new file mode 100644
index 0000000000..2251b9b854
--- /dev/null
+++ b/packages/core/src/modules/cache/singleContextLruCache/__tests__/SingleContextStorageLruCache.test.ts
@@ -0,0 +1,91 @@
+import { getAgentContext, mockFunction } from '../../../../../tests/helpers'
+import { SingleContextLruCacheRecord } from '../SingleContextLruCacheRecord'
+import { SingleContextLruCacheRepository } from '../SingleContextLruCacheRepository'
+import { SingleContextStorageLruCache } from '../SingleContextStorageLruCache'
+
+jest.mock('../SingleContextLruCacheRepository')
+const SingleContextLruCacheRepositoryMock =
+ SingleContextLruCacheRepository as jest.Mock
+
+const cacheRepository = new SingleContextLruCacheRepositoryMock()
+const agentContext = getAgentContext({
+ registerInstances: [[SingleContextLruCacheRepository, cacheRepository]],
+})
+
+describe('SingleContextLruCache', () => {
+ let cache: SingleContextStorageLruCache
+
+ beforeEach(() => {
+ mockFunction(cacheRepository.findById).mockResolvedValue(null)
+ cache = new SingleContextStorageLruCache({ limit: 2 })
+ })
+
+ it('should return the value from the persisted record', async () => {
+ const findMock = mockFunction(cacheRepository.findById).mockResolvedValue(
+ new SingleContextLruCacheRecord({
+ id: 'CONTEXT_STORAGE_LRU_CACHE_ID',
+ entries: new Map([
+ [
+ 'test',
+ {
+ value: 'somevalue',
+ },
+ ],
+ ]),
+ })
+ )
+
+ expect(await cache.get(agentContext, 'doesnotexist')).toBeNull()
+ expect(await cache.get(agentContext, 'test')).toBe('somevalue')
+ expect(findMock).toHaveBeenCalledWith(agentContext, 'CONTEXT_STORAGE_LRU_CACHE_ID')
+ })
+
+ it('should set the value in the persisted record', async () => {
+ const updateMock = mockFunction(cacheRepository.update).mockResolvedValue()
+
+ await cache.set(agentContext, 'test', 'somevalue')
+ const [[, cacheRecord]] = updateMock.mock.calls
+
+ expect(cacheRecord.entries.size).toBe(1)
+
+ const [[key, item]] = cacheRecord.entries.entries()
+ expect(key).toBe('test')
+ expect(item.value).toBe('somevalue')
+
+ expect(await cache.get(agentContext, 'test')).toBe('somevalue')
+ })
+
+ it('should remove least recently used entries if entries are added that exceed the limit', async () => {
+ // Set first value in cache, resolves fine
+ await cache.set(agentContext, 'one', 'valueone')
+ expect(await cache.get(agentContext, 'one')).toBe('valueone')
+
+ // Set two more entries in the cache. Third item
+ // exceeds limit, so first item gets removed
+ await cache.set(agentContext, 'two', 'valuetwo')
+ await cache.set(agentContext, 'three', 'valuethree')
+ expect(await cache.get(agentContext, 'one')).toBeNull()
+ expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
+ expect(await cache.get(agentContext, 'three')).toBe('valuethree')
+
+ // Get two from the cache, meaning three will be removed first now
+ // because it is not recently used
+ await cache.get(agentContext, 'two')
+ await cache.set(agentContext, 'four', 'valuefour')
+ expect(await cache.get(agentContext, 'three')).toBeNull()
+ expect(await cache.get(agentContext, 'two')).toBe('valuetwo')
+ })
+
+ it('should throw an error if used with multiple context correlation ids', async () => {
+ // No issue, first call with an agentContext
+ await cache.get(agentContext, 'test')
+
+ const secondAgentContext = getAgentContext({
+ contextCorrelationId: 'another',
+ })
+
+ expect(cache.get(secondAgentContext, 'test')).rejects.toThrowError(
+ 'SingleContextStorageLruCache can not be used with multiple agent context instances. Register a custom cache implementation in the CacheModule.'
+ )
+ })
+})
diff --git a/packages/core/src/modules/cache/singleContextLruCache/index.ts b/packages/core/src/modules/cache/singleContextLruCache/index.ts
new file mode 100644
index 0000000000..4d01549062
--- /dev/null
+++ b/packages/core/src/modules/cache/singleContextLruCache/index.ts
@@ -0,0 +1 @@
+export { SingleContextStorageLruCache, SingleContextStorageLruCacheOptions } from './SingleContextStorageLruCache'
diff --git a/packages/core/src/modules/ledger/__tests__/IndyPoolService.test.ts b/packages/core/src/modules/ledger/__tests__/IndyPoolService.test.ts
index 073d08686f..b34d2b6fcf 100644
--- a/packages/core/src/modules/ledger/__tests__/IndyPoolService.test.ts
+++ b/packages/core/src/modules/ledger/__tests__/IndyPoolService.test.ts
@@ -1,26 +1,23 @@
import type { AgentContext } from '../../../agent'
+import type { Cache } from '../../cache'
import type { IndyPoolConfig } from '../IndyPool'
import type { CachedDidResponse } from '../services/IndyPoolService'
import { Subject } from 'rxjs'
import { NodeFileSystem } from '../../../../../node/src/NodeFileSystem'
-import { agentDependencies, getAgentConfig, getAgentContext, mockFunction } from '../../../../tests/helpers'
-import { CacheRecord } from '../../../cache'
-import { CacheRepository } from '../../../cache/CacheRepository'
+import { agentDependencies, getAgentConfig, getAgentContext } from '../../../../tests/helpers'
import { SigningProviderRegistry } from '../../../crypto/signing-provider'
import { AriesFrameworkError } from '../../../error/AriesFrameworkError'
import { IndyWallet } from '../../../wallet/IndyWallet'
+import { CacheModuleConfig, InMemoryLruCache } from '../../cache'
import { LedgerError } from '../error/LedgerError'
import { LedgerNotConfiguredError } from '../error/LedgerNotConfiguredError'
import { LedgerNotFoundError } from '../error/LedgerNotFoundError'
-import { DID_POOL_CACHE_ID, IndyPoolService } from '../services/IndyPoolService'
+import { IndyPoolService } from '../services/IndyPoolService'
import { getDidResponsesForDid } from './didResponses'
-jest.mock('../../../cache/CacheRepository')
-const CacheRepositoryMock = CacheRepository as jest.Mock
-
const pools: IndyPoolConfig[] = [
{
id: 'sovrinMain',
@@ -66,11 +63,11 @@ describe('IndyPoolService', () => {
let agentContext: AgentContext
let wallet: IndyWallet
let poolService: IndyPoolService
- let cacheRepository: CacheRepository
+ let cache: Cache
beforeAll(async () => {
wallet = new IndyWallet(config.agentDependencies, config.logger, new SigningProviderRegistry([]))
- agentContext = getAgentContext()
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await wallet.createAndOpen(config.walletConfig!)
})
@@ -80,16 +77,11 @@ describe('IndyPoolService', () => {
})
beforeEach(async () => {
- cacheRepository = new CacheRepositoryMock()
- mockFunction(cacheRepository.findById).mockResolvedValue(null)
-
- poolService = new IndyPoolService(
- cacheRepository,
- agentDependencies,
- config.logger,
- new Subject(),
- new NodeFileSystem()
- )
+ cache = new InMemoryLruCache({ limit: 200 })
+ agentContext = getAgentContext({
+ registerInstances: [[CacheModuleConfig, new CacheModuleConfig({ cache })]],
+ })
+ poolService = new IndyPoolService(agentDependencies, config.logger, new Subject(), new NodeFileSystem())
poolService.setPools(pools)
})
@@ -242,20 +234,7 @@ describe('IndyPoolService', () => {
poolId: expectedPool.id,
}
- const cachedEntries = [
- {
- key: did,
- value: didResponse,
- },
- ]
-
- mockFunction(cacheRepository.findById).mockResolvedValue(
- new CacheRecord({
- id: DID_POOL_CACHE_ID,
- entries: cachedEntries,
- })
- )
-
+ await cache.set(agentContext, `IndySdkPoolService:${did}`, didResponse)
const { pool } = await poolService.getPoolForDid(agentContext, did)
expect(pool.config.id).toBe(pool.id)
@@ -268,15 +247,6 @@ describe('IndyPoolService', () => {
sovrinBuilder: '~M9kv2Ez61cur7X39DXWh8W',
})
- mockFunction(cacheRepository.findById).mockResolvedValue(
- new CacheRecord({
- id: DID_POOL_CACHE_ID,
- entries: [],
- })
- )
-
- const spy = mockFunction(cacheRepository.update).mockResolvedValue()
-
poolService.pools.forEach((pool, index) => {
const spy = jest.spyOn(pool, 'submitReadRequest')
spy.mockImplementationOnce(responses[index])
@@ -287,10 +257,7 @@ describe('IndyPoolService', () => {
expect(pool.config.id).toBe('sovrinBuilder')
expect(pool.config.indyNamespace).toBe('sovrin:builder')
- const cacheRecord = spy.mock.calls[0][1]
- expect(cacheRecord.entries.length).toBe(1)
- expect(cacheRecord.entries[0].key).toBe(did)
- expect(cacheRecord.entries[0].value).toEqual({
+ expect(await cache.get(agentContext, `IndySdkPoolService:${did}`)).toEqual({
nymResponse: {
did,
verkey: '~M9kv2Ez61cur7X39DXWh8W',
diff --git a/packages/core/src/modules/ledger/services/IndyPoolService.ts b/packages/core/src/modules/ledger/services/IndyPoolService.ts
index dd5095b08d..172d1febd1 100644
--- a/packages/core/src/modules/ledger/services/IndyPoolService.ts
+++ b/packages/core/src/modules/ledger/services/IndyPoolService.ts
@@ -5,7 +5,6 @@ import type { default as Indy, LedgerReadReplyResponse, LedgerRequest, LedgerWri
import { Subject } from 'rxjs'
import { AgentDependencies } from '../../../agent/AgentDependencies'
-import { CacheRepository, PersistedLruCache } from '../../../cache'
import { InjectionSymbols } from '../../../constants'
import { IndySdkError } from '../../../error/IndySdkError'
import { Logger } from '../../../logger/Logger'
@@ -15,17 +14,17 @@ import { isSelfCertifiedDid } from '../../../utils/did'
import { isIndyError } from '../../../utils/indyError'
import { allSettled, onlyFulfilled, onlyRejected } from '../../../utils/promises'
import { assertIndyWallet } from '../../../wallet/util/assertIndyWallet'
+import { CacheModuleConfig } from '../../cache'
import { IndyPool } from '../IndyPool'
import { LedgerError } from '../error/LedgerError'
import { LedgerNotConfiguredError } from '../error/LedgerNotConfiguredError'
import { LedgerNotFoundError } from '../error/LedgerNotFoundError'
-export const DID_POOL_CACHE_ID = 'DID_POOL_CACHE'
-export const DID_POOL_CACHE_LIMIT = 500
export interface CachedDidResponse {
nymResponse: Indy.GetNymResponse
poolId: string
}
+
@injectable()
export class IndyPoolService {
public pools: IndyPool[] = []
@@ -34,10 +33,8 @@ export class IndyPoolService {
private agentDependencies: AgentDependencies
private stop$: Subject
private fileSystem: FileSystem
- private didCache: PersistedLruCache