@sphereon/ssi-sdk.credential-store 0.36.1-next.11 → 0.36.1-next.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../plugin.schema.json","../src/index.ts","../src/agent/CredentialStore.ts","../src/utils/filters.ts","../src/types/ICredentialStore.ts"],"sourcesContent":["{\n \"ICredentialStore\": {\n \"components\": {\n \"schemas\": {\n \"AddCredentialArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credential\": {\n \"$ref\": \"#/components/schemas/AddDigitalCredential\"\n },\n \"opts\": {\n \"type\": \"object\",\n \"properties\": {\n \"maxTimeSkewInMS\": {\n \"type\": \"number\"\n },\n \"hasher\": {\n \"$ref\": \"#/components/schemas/HasherSync\"\n }\n },\n \"additionalProperties\": false\n }\n },\n \"required\": [\"credential\"],\n \"additionalProperties\": false\n },\n \"AddDigitalCredential\": {\n \"$ref\": \"#/components/schemas/Omit<NonPersistedDigitalCredential,(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>\"\n },\n \"Omit<NonPersistedDigitalCredential,(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>\": {\n \"$ref\": \"#/components/schemas/Pick<NonPersistedDigitalCredential,Exclude<(\\\"parentId\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"credentialRole\\\"|\\\"rawDocument\\\"|\\\"uniformDocument\\\"|\\\"credentialId\\\"|\\\"hash\\\"|\\\"kmsKeyRef\\\"|\\\"identifierMethod\\\"|\\\"issuerCorrelationType\\\"|\\\"subjectCorrelationType\\\"|\\\"rpCorrelationType\\\"|\\\"isIssuerSigned\\\"|\\\"issuerCorrelationId\\\"|\\\"subjectCorrelationId\\\"|\\\"rpCorrelationId\\\"|\\\"verifiedState\\\"|\\\"tenantId\\\"|\\\"createdAt\\\"|\\\"presentedAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validUntil\\\"|\\\"validFrom\\\"|\\\"verifiedAt\\\"|\\\"revokedAt\\\"|\\\"regulationType\\\"),(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>>\"\n },\n \"Pick<NonPersistedDigitalCredential,Exclude<(\\\"parentId\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"credentialRole\\\"|\\\"rawDocument\\\"|\\\"uniformDocument\\\"|\\\"credentialId\\\"|\\\"hash\\\"|\\\"kmsKeyRef\\\"|\\\"identifierMethod\\\"|\\\"issuerCorrelationType\\\"|\\\"subjectCorrelationType\\\"|\\\"rpCorrelationType\\\"|\\\"isIssuerSigned\\\"|\\\"issuerCorrelationId\\\"|\\\"subjectCorrelationId\\\"|\\\"rpCorrelationId\\\"|\\\"verifiedState\\\"|\\\"tenantId\\\"|\\\"createdAt\\\"|\\\"presentedAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validUntil\\\"|\\\"validFrom\\\"|\\\"verifiedAt\\\"|\\\"revokedAt\\\"|\\\"regulationType\\\"),(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>>\": {\n \"type\": \"object\",\n \"properties\": {\n \"parentId\": {\n \"type\": \"string\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n }\n },\n \"required\": [\"credentialRole\", \"rawDocument\", \"issuerCorrelationType\", \"issuerCorrelationId\"],\n \"additionalProperties\": false\n },\n \"CredentialRole\": {\n \"type\": \"string\",\n \"enum\": [\"ISSUER\", \"VERIFIER\", \"HOLDER\", \"FEDERATION_TRUST_ANCHOR\"]\n },\n \"CredentialCorrelationType\": {\n \"type\": \"string\",\n \"enum\": [\"DID\", \"X509_SAN\", \"KID\", \"URL\"]\n },\n \"CredentialStateType\": {\n \"type\": \"string\",\n \"enum\": [\"REVOKED\", \"VERIFIED\", \"EXPIRED\"]\n },\n \"RegulationType\": {\n \"type\": \"string\",\n \"enum\": [\"PID\", \"QEAA\", \"EAA\", \"NON_REGULATED\"]\n },\n \"HasherSync\": {\n \"$comment\": \"(data: string | ArrayBuffer, alg: string) => Uint8Array\",\n \"type\": \"object\",\n \"properties\": {\n \"namedArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/ArrayBuffer\"\n }\n ]\n },\n \"alg\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"data\", \"alg\"],\n \"additionalProperties\": false\n }\n }\n },\n \"ArrayBuffer\": {\n \"type\": \"object\",\n \"properties\": {\n \"byteLength\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"byteLength\"],\n \"additionalProperties\": false\n },\n \"DigitalCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": \"string\"\n },\n \"documentType\": {\n \"$ref\": \"#/components/schemas/DocumentType\"\n },\n \"documentFormat\": {\n \"$ref\": \"#/components/schemas/CredentialDocumentFormat\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"uniformDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validUntil\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validFrom\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"documentType\",\n \"documentFormat\",\n \"credentialRole\",\n \"regulationType\",\n \"rawDocument\",\n \"uniformDocument\",\n \"hash\",\n \"issuerCorrelationType\",\n \"issuerCorrelationId\",\n \"createdAt\",\n \"lastUpdatedAt\"\n ],\n \"additionalProperties\": false,\n \"description\": \"DigitalCredential\"\n },\n \"DocumentType\": {\n \"type\": \"string\",\n \"enum\": [\"VC\", \"VP\", \"P\", \"C\"]\n },\n \"CredentialDocumentFormat\": {\n \"type\": \"string\",\n \"enum\": [\"JSON_LD\", \"JWT\", \"SD_JWT\", \"MSO_MDOC\"]\n },\n \"DeleteCredentialArgs\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hash\"],\n \"additionalProperties\": false\n }\n ]\n },\n \"DeleteCredentialsArgs\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"GetCredentialsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindDigitalCredentialArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"FindDigitalCredentialArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Partial<DigitalCredential>\"\n }\n },\n \"Partial<DigitalCredential>\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": \"string\"\n },\n \"documentType\": {\n \"$ref\": \"#/components/schemas/DocumentType\"\n },\n \"documentFormat\": {\n \"$ref\": \"#/components/schemas/CredentialDocumentFormat\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"uniformDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validUntil\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validFrom\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"additionalProperties\": false\n },\n \"GetCredentialArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"GetCredentialsByClaimsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindClaimsArgs\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"FindClaimsArgs\": {\n \"$ref\": \"#/components/schemas/FindArgs-TClaimsColumns\"\n },\n \"FindArgs-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"where\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Where-TClaimsColumns\"\n },\n \"description\": \"Imposes constraints on the values of the given columns. WHERE clauses are combined using AND.\"\n },\n \"order\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Order-TClaimsColumns\"\n },\n \"description\": \"Sorts the results according to the given array of column priorities.\"\n },\n \"skip\": {\n \"type\": \"number\",\n \"description\": \"Ignores the first number of entries in a {@link IDataStoreORM } query result.\"\n },\n \"take\": {\n \"type\": \"number\",\n \"description\": \"Returns at most this number of results from a {@link IDataStoreORM } query.\"\n }\n },\n \"additionalProperties\": false\n },\n \"Where-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"column\": {\n \"$ref\": \"#/components/schemas/TClaimsColumns\"\n },\n \"value\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"not\": {\n \"type\": \"boolean\"\n },\n \"op\": {\n \"type\": \"string\",\n \"enum\": [\"LessThan\", \"LessThanOrEqual\", \"MoreThan\", \"MoreThanOrEqual\", \"Equal\", \"Like\", \"Between\", \"In\", \"Any\", \"IsNull\"]\n }\n },\n \"required\": [\"column\"],\n \"additionalProperties\": false,\n \"description\": \"Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND.\"\n },\n \"TClaimsColumns\": {\n \"type\": \"string\",\n \"enum\": [\"context\", \"credentialType\", \"type\", \"value\", \"isObj\", \"id\", \"issuer\", \"subject\", \"expirationDate\", \"issuanceDate\"]\n },\n \"Order-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"column\": {\n \"$ref\": \"#/components/schemas/TClaimsColumns\"\n },\n \"direction\": {\n \"type\": \"string\",\n \"enum\": [\"ASC\", \"DESC\"]\n }\n },\n \"required\": [\"column\", \"direction\"],\n \"additionalProperties\": false,\n \"description\": \"Represents the sort order of results from a {@link FindArgs } query.\"\n },\n \"UniqueDigitalCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"hash\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"digitalCredential\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n },\n \"originalVerifiableCredential\": {\n \"$ref\": \"#/components/schemas/OriginalVerifiableCredential\"\n },\n \"originalVerifiablePresentation\": {\n \"$ref\": \"#/components/schemas/OriginalVerifiablePresentation\"\n },\n \"originalCredential\": {\n \"$ref\": \"#/components/schemas/ICredential\"\n },\n \"originalPresentation\": {\n \"$ref\": \"#/components/schemas/IPresentation\"\n },\n \"uniformVerifiableCredential\": {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n \"uniformVerifiablePresentation\": {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n }\n },\n \"required\": [\"hash\", \"digitalCredential\"],\n \"additionalProperties\": false\n },\n \"OriginalVerifiableCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/JwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocOid4vpIssuerSigned\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocDocument\"\n }\n ]\n },\n \"W3CVerifiableCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n ],\n \"description\": \"Represents a signed Verifiable Credential (includes proof), in either JSON, compact JWT or compact SD-JWT VC format. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }\"\n },\n \"IVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"proof\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProof\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IProof\"\n }\n }\n ]\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"credentialSchema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n }\n }\n ]\n },\n \"issuer\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IIssuerId\"\n },\n {\n \"$ref\": \"#/components/schemas/IIssuer\"\n }\n ]\n },\n \"issuanceDate\": {\n \"type\": \"string\"\n },\n \"credentialSubject\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n },\n \"expirationDate\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"credentialStatus\": {\n \"$ref\": \"#/components/schemas/ICredentialStatus\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"credentialSubject\", \"issuanceDate\", \"issuer\", \"proof\", \"type\"]\n },\n \"IProof\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProofType\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"created\": {\n \"type\": \"string\"\n },\n \"proofPurpose\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProofPurpose\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"verificationMethod\": {\n \"type\": \"string\"\n },\n \"challenge\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"proofValue\": {\n \"type\": \"string\"\n },\n \"jws\": {\n \"type\": \"string\"\n },\n \"jwt\": {\n \"type\": \"string\"\n },\n \"mso_mdoc\": {\n \"type\": \"string\"\n },\n \"nonce\": {\n \"type\": \"string\"\n },\n \"requiredRevealStatements\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"type\", \"created\", \"proofPurpose\", \"verificationMethod\"]\n },\n \"IProofType\": {\n \"type\": \"string\",\n \"enum\": [\n \"Ed25519Signature2018\",\n \"Ed25519Signature2020\",\n \"EcdsaSecp256k1Signature2019\",\n \"EcdsaSecp256k1RecoverySignature2020\",\n \"JsonWebSignature2020\",\n \"RsaSignature2018\",\n \"GpgSignature2020\",\n \"JcsEd25519Signature2020\",\n \"BbsBlsSignatureProof2020\",\n \"BbsBlsBoundSignatureProof2020\",\n \"JwtProof2020\",\n \"SdJwtProof2024\",\n \"MsoMdocProof2024\"\n ]\n },\n \"IProofPurpose\": {\n \"type\": \"string\",\n \"enum\": [\n \"verificationMethod\",\n \"assertionMethod\",\n \"authentication\",\n \"keyAgreement\",\n \"contactAgreement\",\n \"capabilityInvocation\",\n \"capabilityDelegation\"\n ]\n },\n \"ICredentialContextType\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"did\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"ICredentialSchemaType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchema\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"ICredentialSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"IIssuerId\": {\n \"type\": \"string\"\n },\n \"IIssuer\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"]\n },\n \"ICredentialStatus\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\"]\n },\n \"CompactJWT\": {\n \"type\": \"string\",\n \"description\": \"Represents a Json Web Token in compact form.\"\n },\n \"JwtDecodedVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"vc\": {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n \"exp\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"nbf\": {\n \"type\": \"string\"\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"jti\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vc\", \"exp\", \"iss\", \"nbf\", \"sub\", \"jti\"]\n },\n \"SdJwtDecodedVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"compactSdJwtVc\": {\n \"type\": \"string\",\n \"description\": \"The compact sd jwt is the sd-jwt encoded as string. It is a normal JWT, with the disclosures and kb-jwt appended separated by ~\"\n },\n \"disclosures\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/SdJwtDisclosure\"\n },\n \"description\": \"The disclosures included within the SD-JWT in both encoded and decoded format. The digests are also included, and allows the disclosures to be linked against the digests in the signed payload.\"\n },\n \"signedPayload\": {\n \"$ref\": \"#/components/schemas/SdJwtSignedVerifiableCredentialPayload\",\n \"description\": \"The signed payload is the payload of the sd-jwt that is actually signed, and that includes the `_sd` and `...` digests.\"\n },\n \"decodedPayload\": {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredentialPayload\",\n \"description\": \"The decoded payload is the payload when all `_sd` and `...` digests have been replaced by the actual values from the disclosures. This format could also be seen as the 'pretty` version of the SD JWT payload.\\n\\nThis is useful for displaying the contents of the SD JWT VC to the user, or for example for querying the contents of the SD JWT VC using a PEX presentation definition path.\"\n },\n \"kbJwt\": {\n \"type\": \"object\",\n \"properties\": {\n \"header\": {\n \"$ref\": \"#/components/schemas/SdJwtVcKbJwtHeader\"\n },\n \"payload\": {\n \"$ref\": \"#/components/schemas/SdJwtVcKbJwtPayload\"\n },\n \"compact\": {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n },\n \"required\": [\"header\", \"payload\"],\n \"additionalProperties\": false,\n \"description\": \"Key binding JWT\"\n }\n },\n \"required\": [\"compactSdJwtVc\", \"disclosures\", \"signedPayload\", \"decodedPayload\"],\n \"additionalProperties\": false,\n \"description\": \"The decoded SD JWT Verifiable Credential. This representation includes multiple representations of the same SD-JWT, and allows to fully process an SD-JWT, as well as create a presentation SD-JWT (minus the KB-JWT) by removing certain disclosures from the compact SD-JWT.\\n\\nThis representation is useful as it doesn't require a hasher implementation to match the different digests in the signed SD-JWT payload, with the different disclosures.\"\n },\n \"SdJwtDisclosure\": {\n \"type\": \"object\",\n \"properties\": {\n \"encoded\": {\n \"type\": \"string\"\n },\n \"decoded\": {\n \"$ref\": \"#/components/schemas/SdJwtDecodedDisclosure\"\n },\n \"digest\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"encoded\", \"decoded\", \"digest\"],\n \"additionalProperties\": false\n },\n \"SdJwtDecodedDisclosure\": {\n \"anyOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 3,\n \"items\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n ],\n \"maxItems\": 3\n },\n {\n \"type\": \"array\",\n \"minItems\": 2,\n \"items\": [\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n ],\n \"maxItems\": 2\n }\n ]\n },\n \"JsonValue\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n }\n ]\n },\n \"SdJwtSignedVerifiableCredentialPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"vct\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"number\"\n },\n \"nbf\": {\n \"type\": \"number\"\n },\n \"exp\": {\n \"type\": \"number\"\n },\n \"cnf\": {\n \"type\": \"object\",\n \"properties\": {\n \"jwk\": {},\n \"kid\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"status\": {\n \"type\": \"object\",\n \"properties\": {\n \"idx\": {\n \"type\": \"number\"\n },\n \"uri\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"idx\", \"uri\"],\n \"additionalProperties\": false\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"_sd\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"_sd_alg\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"not\": {}\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"required\": [\"iat\", \"iss\", \"vct\"],\n \"description\": \"The signed payload of an SD-JWT. Includes fields such as `_sd`, `...` and `_sd_alg`\"\n },\n \"SdJwtJsonValue\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"_sd\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"...\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"...\"],\n \"additionalProperties\": false\n }\n ]\n }\n }\n ]\n },\n \"SdJwtDecodedVerifiableCredentialPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"vct\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"number\"\n },\n \"nbf\": {\n \"type\": \"number\"\n },\n \"exp\": {\n \"type\": \"number\"\n },\n \"cnf\": {\n \"type\": \"object\",\n \"properties\": {\n \"jwk\": {},\n \"kid\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"status\": {\n \"type\": \"object\",\n \"properties\": {\n \"idx\": {\n \"type\": \"number\"\n },\n \"uri\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"idx\", \"uri\"],\n \"additionalProperties\": false\n },\n \"sub\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vct\", \"iss\", \"iat\"],\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"description\": \"Decoded 'pretty' SD JWT Verifiable Credential. This representation has all the `_sd` properties removed, and includes the disclosures directly within the payload.\"\n },\n \"SdJwtVcKbJwtHeader\": {\n \"type\": \"object\",\n \"properties\": {\n \"typ\": {\n \"type\": \"string\",\n \"const\": \"kb+jwt\"\n },\n \"alg\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"typ\", \"alg\"]\n },\n \"SdJwtVcKbJwtPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"iat\": {\n \"type\": \"number\"\n },\n \"aud\": {\n \"type\": \"string\"\n },\n \"nonce\": {\n \"type\": \"string\"\n },\n \"sd_hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"iat\", \"aud\", \"nonce\", \"sd_hash\"],\n \"additionalProperties\": {}\n },\n \"MdocOid4vpIssuerSigned\": {\n \"type\": \"string\",\n \"description\": \"Represents a selective disclosure JWT vc in compact form.\"\n },\n \"MdocDocument\": {\n \"$ref\": \"#/components/schemas/com.sphereon.mdoc.data.device.DocumentCbor\"\n },\n \"com.sphereon.mdoc.data.device.DocumentCbor\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {}\n },\n \"OriginalVerifiablePresentation\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/W3CVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/JwtDecodedVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocOid4vpMdocVpToken\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocDeviceResponse\"\n }\n ]\n },\n \"W3CVerifiablePresentation\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n ],\n \"description\": \"Represents a signed Verifiable Presentation (includes proof), in either JSON or compact JWT format. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }\"\n },\n \"IVerifiablePresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"proof\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProof\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IProof\"\n }\n }\n ]\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n ]\n },\n \"verifiableCredential\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n }\n },\n \"presentation_submission\": {\n \"$ref\": \"#/components/schemas/PresentationSubmission\"\n },\n \"holder\": {\n \"type\": \"string\"\n },\n \"verifier\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"proof\"]\n },\n \"PresentationSubmission\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"A UUID or some other unique ID to identify this Presentation Submission\"\n },\n \"definition_id\": {\n \"type\": \"string\",\n \"description\": \"A UUID or some other unique ID to identify this Presentation Definition\"\n },\n \"descriptor_map\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Descriptor\"\n },\n \"description\": \"List of descriptors of how the claims are being mapped to presentation definition\"\n }\n },\n \"required\": [\"id\", \"definition_id\", \"descriptor_map\"],\n \"additionalProperties\": false,\n \"description\": \"It expresses how the inputs are presented as proofs to a Verifier.\"\n },\n \"Descriptor\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID to identify the descriptor from Presentation Definition Input Descriptor it coresponds to.\"\n },\n \"path\": {\n \"type\": \"string\",\n \"description\": \"The path where the verifiable credential is located in the presentation submission json\"\n },\n \"path_nested\": {\n \"$ref\": \"#/components/schemas/Descriptor\"\n },\n \"format\": {\n \"type\": \"string\",\n \"description\": \"The Proof or JWT algorith that the proof is in\"\n }\n },\n \"required\": [\"id\", \"path\", \"format\"],\n \"additionalProperties\": false,\n \"description\": \"descriptor map laying out the structure of the presentation submission.\"\n },\n \"JwtDecodedVerifiablePresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"vp\": {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n },\n \"exp\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"nbf\": {\n \"type\": \"string\"\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"jti\": {\n \"type\": \"string\"\n },\n \"aud\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vp\", \"exp\", \"iss\", \"nbf\", \"sub\", \"jti\", \"aud\", \"iat\"]\n },\n \"MdocOid4vpMdocVpToken\": {\n \"type\": \"string\"\n },\n \"MdocDeviceResponse\": {\n \"$ref\": \"#/components/schemas/com.sphereon.mdoc.data.device.DeviceResponseCbor\"\n },\n \"com.sphereon.mdoc.data.device.DeviceResponseCbor\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {}\n },\n \"ICredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"credentialSchema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n }\n }\n ]\n },\n \"issuer\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IIssuerId\"\n },\n {\n \"$ref\": \"#/components/schemas/IIssuer\"\n }\n ]\n },\n \"issuanceDate\": {\n \"type\": \"string\"\n },\n \"credentialSubject\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n },\n \"expirationDate\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"credentialStatus\": {\n \"$ref\": \"#/components/schemas/ICredentialStatus\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"type\", \"issuer\", \"issuanceDate\", \"credentialSubject\"]\n },\n \"IPresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n ]\n },\n \"verifiableCredential\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n }\n },\n \"presentation_submission\": {\n \"$ref\": \"#/components/schemas/PresentationSubmission\"\n },\n \"holder\": {\n \"type\": \"string\"\n },\n \"verifier\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\"]\n },\n \"GetCredentialsByIdOrHashArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"idOrHash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"credentialRole\", \"idOrHash\"],\n \"additionalProperties\": false\n },\n \"OptionalUniqueDigitalCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"UpdateCredentialStateArgs\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"verifiedState\"]\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hash\", \"verifiedState\"]\n }\n ]\n }\n },\n \"methods\": {\n \"crsAddCredential\": {\n \"description\": \"Add a new credential.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/AddCredentialArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n },\n \"crsDeleteCredential\": {\n \"description\": \"Delete a single credentials by primary key\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/DeleteCredentialArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"crsDeleteCredentials\": {\n \"description\": \"Delete multiple credentials records using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/DeleteCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"number\"\n }\n },\n \"crsGetCredential\": {\n \"description\": \"Get a single credentials by primary key\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n },\n \"crsGetCredentials\": {\n \"description\": \"Find one or more credentials using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n }\n },\n \"crsGetCredentialsByClaims\": {\n \"description\": \"Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByClaimsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n }\n }\n },\n \"crsGetCredentialsByClaimsCount\": {\n \"description\": \"Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByClaimsArgs\"\n },\n \"returnType\": {\n \"type\": \"number\"\n }\n },\n \"crsGetUniqueCredentialByIdOrHash\": {\n \"description\": \"Find one credential by id or hash\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByIdOrHashArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/OptionalUniqueDigitalCredential\"\n }\n },\n \"crsGetUniqueCredentials\": {\n \"description\": \"Find one or more credentials using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n }\n }\n },\n \"crsUpdateCredentialState\": {\n \"description\": \"Update credential the state of an existing credential.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/UpdateCredentialStateArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n }\n }\n }\n }\n}\n","import { Loggers } from '@sphereon/ssi-types'\n\n/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\n\nexport const logger = Loggers.DEFAULT.get('sphereon:credential-store')\n\nexport { CredentialStore, credentialStoreMethods } from './agent/CredentialStore'\nexport {\n CredentialStateType,\n CredentialCorrelationType,\n CredentialDocumentFormat,\n DocumentType,\n type DigitalCredential,\n type FindDigitalCredentialArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nexport { CredentialRole } from '@sphereon/ssi-types'\nexport * from './types/ICredentialStore'\nexport * from './types/claims'\nexport * from './utils/filters'\n","import { shaHasher as defaultHasher } from '@sphereon/ssi-sdk.core'\nimport { parseRawDocument } from '@sphereon/ssi-sdk.data-store'\nimport {\n AbstractDigitalCredentialStore,\n type DigitalCredential,\n DocumentType,\n type UpdateCredentialStateArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport { type IVerifiableCredential } from '@sphereon/ssi-types'\nimport { type IAgentPlugin } from '@veramo/core'\nimport { logger, schema } from '../index'\nimport type { TClaimsColumns } from '../types/claims'\nimport type {\n AddCredentialArgs,\n DeleteCredentialArgs,\n DeleteCredentialsArgs,\n GetCredentialArgs,\n GetCredentialsArgs,\n GetCredentialsByClaimsArgs,\n GetCredentialsByIdOrHashArgs,\n ICredentialStore,\n OptionalUniqueDigitalCredential,\n UniqueDigitalCredential,\n} from '../types/ICredentialStore'\nimport { credentialIdOrHashFilter } from '../utils/filters'\n\n// Exposing the methods here for any REST implementation\nexport const credentialStoreMethods: Array<string> = [\n 'crsAddCredential',\n 'crsUpdateCredentialState',\n 'crsGetCredential',\n 'crsGetCredentials',\n 'crsDeleteCredential',\n 'crsDeleteCredentials',\n 'crsGetUniqueCredentials',\n 'crsGetUniqueCredentialByIdOrHash',\n 'crsGetCredentialsByClaims',\n 'crsGetCredentialsByClaimsCount',\n]\n\n/**\n * {@inheritDoc ICRManager}\n */\nexport class CredentialStore implements IAgentPlugin {\n readonly schema = schema.ICredentialStore\n readonly methods: ICredentialStore = {\n crsAddCredential: this.crsAddCredential.bind(this),\n crsUpdateCredentialState: this.crsUpdateCredentialState.bind(this),\n crsGetCredential: this.crsGetCredential.bind(this),\n crsGetCredentials: this.crsGetCredentials.bind(this),\n crsGetUniqueCredentialByIdOrHash: this.crsGetUniqueCredentialByIdOrHash.bind(this),\n crsGetUniqueCredentials: this.crsGetUniqueCredentials.bind(this),\n crsDeleteCredential: this.crsDeleteCredential.bind(this),\n crsDeleteCredentials: this.crsDeleteCredentials.bind(this),\n crsGetCredentialsByClaims: this.crsGetCredentialsByClaims.bind(this),\n crsGetCredentialsByClaimsCount: this.crsGetCredentialsByClaimsCount.bind(this),\n }\n\n private readonly store: AbstractDigitalCredentialStore\n\n constructor(options: { store: AbstractDigitalCredentialStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc ICredentialStore.crsAddCredential} */\n private async crsAddCredential(args: AddCredentialArgs): Promise<DigitalCredential> {\n return await this.store.addCredential({ ...args.credential, opts: { ...args.opts, hasher: args.opts?.hasher ?? defaultHasher } })\n }\n\n /** {@inheritDoc ICredentialStore.crsUpdateCredentialState} */\n private async crsUpdateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential> {\n return await this.store.updateCredentialState(args)\n }\n\n /** {@inheritDoc ICredentialStore.crsGetCredential} */\n private async crsGetCredential(args: GetCredentialArgs): Promise<DigitalCredential> {\n const { id } = args\n\n return this.store.getCredential({ id })\n }\n\n /** {@inheritDoc ICredentialStore.crsGetCredentials} */\n private async crsGetCredentials(args: GetCredentialsArgs): Promise<Array<DigitalCredential>> {\n const { filter } = args\n const credentials = await this.store.getCredentials({ filter })\n\n return credentials.data\n }\n\n /** {@inheritDoc ICredentialStore.crsGetUniqueCredentialByIdOrHash} */\n private async crsGetUniqueCredentialByIdOrHash(args: GetCredentialsByIdOrHashArgs): Promise<OptionalUniqueDigitalCredential> {\n const credentials = await this.crsGetCredentials({ filter: credentialIdOrHashFilter(args.credentialRole, args.idOrHash) })\n if (credentials.length === 0) {\n return undefined\n } else if (credentials.length > 1) {\n logger.warning('Duplicate credentials detected in crsGetUniqueCredentialByIdOrHash', args)\n }\n\n return this.toUniqueCredentials(credentials)[0]\n }\n\n /** {@inheritDoc ICredentialStore.crsGetUniqueCredentials} */\n private async crsGetUniqueCredentials(args: GetCredentialsArgs): Promise<Array<UniqueDigitalCredential>> {\n const credentials = await this.crsGetCredentials(args)\n\n return this.toUniqueCredentials(credentials)\n }\n\n /** {@inheritDoc ICredentialStore.crsDeleteCredential} */\n private async crsDeleteCredential(args: DeleteCredentialArgs): Promise<boolean> {\n return this.store.removeCredential(args)\n }\n\n /** {@inheritDoc ICredentialStore.crsDeleteCredentials} */\n private async crsDeleteCredentials(args: DeleteCredentialsArgs): Promise<number> {\n const credentials = await this.crsGetCredentials(args)\n let count = 0\n for (const credential of credentials) {\n const result = await this.store.removeCredential({ id: credential.id })\n if (result) {\n count++\n }\n }\n\n return count\n }\n\n /**\n * Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n private async crsGetCredentialsByClaims(args: GetCredentialsByClaimsArgs): Promise<Array<UniqueDigitalCredential>> {\n const digitalCredentials = await this.crsGetUniqueCredentials({\n filter: [\n // TODO SDK-25 Implement param for documentType & support VP filtering below\n {\n documentType: DocumentType.VC,\n credentialRole: args.credentialRole,\n tenantId: args.tenantId,\n },\n {\n documentType: DocumentType.C,\n credentialRole: args.credentialRole,\n tenantId: args.tenantId,\n },\n ],\n })\n\n // This a copy of how Veramo did this. TODO Use GraphQL in the future?\n return digitalCredentials.filter((uniqueVC) => {\n if (!uniqueVC.uniformVerifiableCredential) {\n return false\n }\n\n const credential = uniqueVC.uniformVerifiableCredential\n return (\n args.filter.where?.every((whereClause) => {\n const value = this.getValueFromCredential(credential, whereClause.column)\n\n if (value === undefined) {\n return whereClause.op === 'IsNull'\n }\n\n switch (whereClause.op) {\n case 'In':\n return whereClause.value?.includes(value)\n case 'Like':\n return typeof value === 'string' && value.includes(whereClause.value?.[0] || '')\n case 'Between':\n return value >= (whereClause.value?.[0] || '') && value <= (whereClause.value?.[1] || '')\n case 'LessThan':\n return value < (whereClause.value?.[0] || '')\n case 'LessThanOrEqual':\n return value <= (whereClause.value?.[0] || '')\n case 'MoreThan':\n return value > (whereClause.value?.[0] || '')\n case 'MoreThanOrEqual':\n return value >= (whereClause.value?.[0] || '')\n case 'Any':\n return Array.isArray(value) && value.some((v) => whereClause.value?.includes(v))\n case 'IsNull':\n return value === null || value === undefined\n case 'Equal':\n default:\n return value === whereClause.value?.[0]\n }\n }) ?? true\n )\n })\n }\n\n private getValueFromCredential(credential: IVerifiableCredential, column: TClaimsColumns): any {\n switch (column) {\n case 'context':\n return credential['@context']\n case 'credentialType':\n return credential.type\n case 'type':\n return Array.isArray(credential.credentialSubject) ? credential.credentialSubject[0]?.type : credential.credentialSubject?.type\n case 'value':\n return JSON.stringify(credential.credentialSubject)\n case 'isObj':\n return typeof credential.credentialSubject === 'object'\n case 'id':\n return credential.id\n case 'issuer':\n return typeof credential.issuer === 'string' ? credential.issuer : credential.issuer.id\n case 'subject':\n return Array.isArray(credential.credentialSubject) ? credential.credentialSubject[0]?.id : credential.credentialSubject?.id\n case 'expirationDate':\n return credential.expirationDate\n case 'issuanceDate':\n return credential.issuanceDate\n default:\n return undefined\n }\n }\n\n /**\n * Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n private async crsGetCredentialsByClaimsCount(args: GetCredentialsByClaimsArgs): Promise<number> {\n const credentialsByClaims = await this.crsGetCredentialsByClaims(args)\n return credentialsByClaims.length // FIXME ?\n }\n\n private secureParse<Type>(original: string): Type {\n return parseRawDocument(original) as Type\n }\n\n private toUniqueCredentials(credentials: Array<DigitalCredential>): Array<UniqueDigitalCredential> {\n return Object.values(\n credentials.reduce(\n (accumulator, credential) => {\n const uniqueCredential: UniqueDigitalCredential = {\n hash: credential.hash,\n digitalCredential: credential,\n }\n switch (credential.documentType) {\n case DocumentType.VC:\n uniqueCredential.originalVerifiableCredential = this.secureParse(credential.rawDocument)\n uniqueCredential.uniformVerifiableCredential = this.secureParse(credential.uniformDocument)\n uniqueCredential.id = uniqueCredential.uniformVerifiableCredential?.id\n break\n case DocumentType.VP:\n uniqueCredential.originalVerifiablePresentation = this.secureParse(credential.rawDocument)\n uniqueCredential.uniformVerifiablePresentation = this.secureParse(credential.uniformDocument)\n uniqueCredential.id = uniqueCredential.uniformVerifiablePresentation?.id\n break\n case DocumentType.P:\n uniqueCredential.originalPresentation = this.secureParse(credential.rawDocument)\n uniqueCredential.id = uniqueCredential.originalPresentation?.id\n break\n case DocumentType.C:\n uniqueCredential.originalCredential = this.secureParse(credential.rawDocument)\n uniqueCredential.id = uniqueCredential.originalCredential?.id\n break\n // TODO CBOR support\n }\n accumulator[credential.hash] = uniqueCredential\n return accumulator\n },\n {} as Record<string, UniqueDigitalCredential>,\n ),\n )\n }\n}\n","import { type DigitalCredential, DocumentType, type FindDigitalCredentialArgs } from '@sphereon/ssi-sdk.data-store-types'\nimport { CredentialRole } from '@sphereon/ssi-types'\nimport { validate as uuidValidate } from 'uuid'\n\n/**\n * Creates a filter to find a digital credential by its ID or hash.\n *\n * @param credentialRole - The role to filter by (e.g., ISSUER, HOLDER).\n * @param idOrHash - The ID or hash of the credential to search for.\n * @returns A FindDigitalCredentialArgs array for filtering by ID or hash.\n */\n\nexport const credentialIdOrHashFilter = (credentialRole: CredentialRole, idOrHash: string): FindDigitalCredentialArgs => {\n const filter: FindDigitalCredentialArgs = [\n {\n hash: idOrHash,\n credentialRole,\n },\n {\n credentialId: idOrHash,\n credentialRole,\n },\n ]\n\n if (uuidValidate(idOrHash)) {\n filter.push({\n id: idOrHash,\n credentialRole,\n })\n }\n\n return filter\n}\n\n/**\n * Creates a filter for verifiable credentials with a specific role.\n *\n * @param credentialRole - The role to filter by (e.g., ISSUER, HOLDER).\n * @param withFilter - Optional additional filter criteria.\n * @returns A FindDigitalCredentialArgs array for filtering verifiable credentials by role.\n */\nexport const verifiableCredentialForRoleFilter = (\n credentialRole: CredentialRole,\n withFilter?: FindDigitalCredentialArgs,\n): FindDigitalCredentialArgs => {\n const filter = [\n {\n documentType: DocumentType.VC,\n credentialRole: credentialRole,\n },\n ]\n if (withFilter !== undefined) {\n return mergeFilter(withFilter, filter)\n }\n return filter\n}\n\n/**\n * Merges two FindDigitalCredentialArgs arrays into a single array.\n *\n * This function combines two filter arrays, merging objects at the same index\n * and adding unique objects from both arrays. When merging objects, properties\n * from filter2 overwrite those from filter1 if they exist in both.\n *\n * @param filter1 - The first FindDigitalCredentialArgs array to merge.\n * @param filter2 - The second FindDigitalCredentialArgs array to merge.\n * @returns A new FindDigitalCredentialArgs array containing the merged result.\n *\n * @example\n * const filter1 = [{ documentType: DocumentType.VC }, { credentialRole: CredentialRole.ISSUER }];\n * const filter2 = [{ documentType: DocumentType.VP }, { hash: 'abc123' }];\n * const mergedFilter = mergeFilter(filter1, filter2);\n * // Result: [{ documentType: DocumentType.VP }, { credentialRole: CredentialRole.ISSUER, hash: 'abc123' }]\n */\nexport const mergeFilter = (filter1: FindDigitalCredentialArgs, filter2: FindDigitalCredentialArgs): FindDigitalCredentialArgs => {\n const mergedFilter: FindDigitalCredentialArgs = []\n\n const mergedMap = new Map<number, Partial<DigitalCredential>>()\n\n filter1.forEach((obj, index) => {\n mergedMap.set(index, { ...obj })\n })\n\n filter2.forEach((obj, index) => {\n if (mergedMap.has(index)) {\n mergedMap.set(index, { ...mergedMap.get(index), ...obj })\n } else {\n mergedMap.set(index, { ...obj })\n }\n })\n\n mergedMap.forEach((value) => {\n mergedFilter.push(value)\n })\n\n return mergedFilter\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport {\n type DigitalCredential,\n type FindDigitalCredentialArgs,\n type NonPersistedDigitalCredential,\n type UpdateCredentialStateArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport type {\n CredentialRole,\n HasherSync,\n ICredential,\n IPresentation,\n IVerifiableCredential,\n IVerifiablePresentation,\n OriginalVerifiableCredential,\n OriginalVerifiablePresentation,\n} from '@sphereon/ssi-types'\nimport type { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport type { FindClaimsArgs } from './claims'\n\nexport type { UpdateCredentialStateArgs } // TODO create a local copy?\n\nexport interface ICredentialStore extends IPluginMethodMap {\n /**\n * Add a new credential.\n * @param args\n */\n crsAddCredential(args: AddCredentialArgs): Promise<DigitalCredential>\n\n /**\n * Update credential the state of an existing credential.\n * @param args\n */\n crsUpdateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential>\n\n /**\n * Get a single credentials by primary key\n * @param args\n */\n crsGetCredential(args: GetCredentialArgs): Promise<DigitalCredential>\n\n /**\n * Find one or more credentials using filters\n * @param args\n */\n crsGetCredentials(args: GetCredentialsArgs): Promise<Array<DigitalCredential>>\n\n /**\n * Find one or more credentials using filters\n * @param args\n */\n crsGetUniqueCredentials(args: GetCredentialsArgs): Promise<Array<UniqueDigitalCredential>>\n\n /**\n * Find one credential by id or hash\n * @param args\n */\n crsGetUniqueCredentialByIdOrHash(args: GetCredentialsByIdOrHashArgs): Promise<OptionalUniqueDigitalCredential>\n\n /**\n * Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n crsGetCredentialsByClaims(args: GetCredentialsByClaimsArgs): Promise<Array<UniqueDigitalCredential>>\n\n /**\n * Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n crsGetCredentialsByClaimsCount(args: GetCredentialsByClaimsArgs): Promise<number>\n\n /**\n * Delete a single credentials by primary key\n * @param args\n */\n crsDeleteCredential(args: DeleteCredentialArgs): Promise<boolean>\n\n /**\n * Delete multiple credentials records using filters\n * @param args\n */\n crsDeleteCredentials(args: DeleteCredentialsArgs): Promise<number>\n}\n\n/**\n *\n * @param context\n * @internal\n */\nexport function contextHasCredentialStore(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<ICredentialStore> {\n return contextHasPlugin(context, 'crsGetCredential')\n}\n\nexport type GetCredentialArgs = {\n id: string\n}\n\nexport type GetCredentialsArgs = {\n filter: FindDigitalCredentialArgs\n}\n\nexport type GetCredentialsByClaimsArgs = {\n filter: FindClaimsArgs\n credentialRole?: CredentialRole\n tenantId?: string\n}\n\nexport type GetCredentialsByIdOrHashArgs = {\n credentialRole: CredentialRole\n idOrHash: string\n}\n\nexport type DeleteCredentialArgs = { id: string } | { hash: string }\n\nexport type DeleteCredentialsArgs = GetCredentialsArgs\n\nexport type AddDigitalCredential = Omit<\n NonPersistedDigitalCredential,\n 'id' | 'documentType' | 'documentFormat' | 'uniformDocument' | 'hash' | 'createdAt' | 'lastUpdatedAt' | 'validFrom' | 'validUntil'\n>\n\nexport type AddCredentialArgs = {\n credential: AddDigitalCredential\n opts?: { maxTimeSkewInMS?: number; hasher?: HasherSync }\n}\n\nexport interface UniqueDigitalCredential {\n hash: string\n id?: string\n digitalCredential: DigitalCredential\n\n originalVerifiableCredential?: OriginalVerifiableCredential\n originalVerifiablePresentation?: OriginalVerifiablePresentation\n originalCredential?: ICredential\n originalPresentation?: IPresentation\n uniformVerifiableCredential?: IVerifiableCredential\n uniformVerifiablePresentation?: IVerifiablePresentation\n}\n\nexport type OptionalUniqueDigitalCredential = UniqueDigitalCredential | undefined\n\nexport type RequiredContext = IAgentContext<never>\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,kBAAoB;AAAA,QAClB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,m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,+BAA+B,KAAKV,YAAYlD,WAAW6D,WAAW;AACvFJ,2BAAiB5B,8BAA8B,KAAKqB,YAAYlD,WAAW8D,eAAe;AAC1FL,2BAAiBpD,KAAKoD,iBAAiB5B,6BAA6BxB;AACpE;QACF,KAAKmB,cAAauC;AAChBN,2BAAiBO,iCAAiC,KAAKd,YAAYlD,WAAW6D,WAAW;AACzFJ,2BAAiBQ,gCAAgC,KAAKf,YAAYlD,WAAW8D,eAAe;AAC5FL,2BAAiBpD,KAAKoD,iBAAiBQ,+BAA+B5D;AACtE;QACF,KAAKmB,cAAa0C;AAChBT,2BAAiBU,uBAAuB,KAAKjB,YAAYlD,WAAW6D,WAAW;AAC/EJ,2BAAiBpD,KAAKoD,iBAAiBU,sBAAsB9D;AAC7D;QACF,KAAKmB,cAAaG;AAChB8B,2BAAiBW,qBAAqB,KAAKlB,YAAYlD,WAAW6D,WAAW;AAC7EJ,2BAAiBpD,KAAKoD,iBAAiBW,oBAAoB/D;AAC3D;MAEJ;AACAmD,kBAAYxD,WAAW0D,IAAI,IAAID;AAC/B,aAAOD;IACT,GACA,CAAC,CAAA,CAAA;EAGP;AACF;;;ADhQA,SACEa,qBACAC,2BACAC,0BACAC,gBAAAA,qBAGK;AACP,SAASC,sBAAsB;;;AGnB/B,SAASC,wBAAwB;AAyF1B,SAASC,0BAA0BC,SAAwC;AAChF,SAAOC,iBAAiBD,SAAS,kBAAA;AACnC;AAFgBD;;;AHpFhB,IAAMG,SAASC;AAGR,IAAMC,SAASC,QAAQC,QAAQC,IAAI,2BAAA;","names":["Loggers","shaHasher","defaultHasher","parseRawDocument","DocumentType","DocumentType","validate","uuidValidate","credentialIdOrHashFilter","credentialRole","idOrHash","filter","hash","credentialId","uuidValidate","push","id","verifiableCredentialForRoleFilter","withFilter","documentType","DocumentType","VC","undefined","mergeFilter","filter1","filter2","mergedFilter","mergedMap","Map","forEach","obj","index","set","has","get","value","credentialStoreMethods","CredentialStore","schema","ICredentialStore","methods","crsAddCredential","bind","crsUpdateCredentialState","crsGetCredential","crsGetCredentials","crsGetUniqueCredentialByIdOrHash","crsGetUniqueCredentials","crsDeleteCredential","crsDeleteCredentials","crsGetCredentialsByClaims","crsGetCredentialsByClaimsCount","store","options","args","addCredential","credential","opts","hasher","defaultHasher","updateCredentialState","id","getCredential","filter","credentials","getCredentials","data","credentialIdOrHashFilter","credentialRole","idOrHash","length","undefined","logger","warning","toUniqueCredentials","removeCredential","count","result","digitalCredentials","documentType","DocumentType","VC","tenantId","C","uniqueVC","uniformVerifiableCredential","where","every","whereClause","value","getValueFromCredential","column","op","includes","Array","isArray","some","v","type","credentialSubject","JSON","stringify","issuer","expirationDate","issuanceDate","credentialsByClaims","secureParse","original","parseRawDocument","Object","values","reduce","accumulator","uniqueCredential","hash","digitalCredential","originalVerifiableCredential","rawDocument","uniformDocument","VP","originalVerifiablePresentation","uniformVerifiablePresentation","P","originalPresentation","originalCredential","CredentialStateType","CredentialCorrelationType","CredentialDocumentFormat","DocumentType","CredentialRole","contextHasPlugin","contextHasCredentialStore","context","contextHasPlugin","schema","require","logger","Loggers","DEFAULT","get"]}
1
+ {"version":3,"sources":["../plugin.schema.json","../src/index.ts","../src/agent/CredentialStore.ts","../src/utils/filters.ts","../src/types/ICredentialStore.ts"],"sourcesContent":["{\n \"ICredentialStore\": {\n \"components\": {\n \"schemas\": {\n \"AddCredentialArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credential\": {\n \"$ref\": \"#/components/schemas/AddDigitalCredential\"\n },\n \"opts\": {\n \"type\": \"object\",\n \"properties\": {\n \"maxTimeSkewInMS\": {\n \"type\": \"number\"\n },\n \"hasher\": {\n \"$ref\": \"#/components/schemas/HasherSync\"\n }\n },\n \"additionalProperties\": false\n }\n },\n \"required\": [\"credential\"],\n \"additionalProperties\": false\n },\n \"AddDigitalCredential\": {\n \"$ref\": \"#/components/schemas/Omit<NonPersistedDigitalCredential,(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>\"\n },\n \"Omit<NonPersistedDigitalCredential,(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>\": {\n \"$ref\": \"#/components/schemas/Pick<NonPersistedDigitalCredential,Exclude<(\\\"parentId\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"credentialRole\\\"|\\\"rawDocument\\\"|\\\"uniformDocument\\\"|\\\"credentialId\\\"|\\\"hash\\\"|\\\"kmsKeyRef\\\"|\\\"identifierMethod\\\"|\\\"issuerCorrelationType\\\"|\\\"subjectCorrelationType\\\"|\\\"rpCorrelationType\\\"|\\\"isIssuerSigned\\\"|\\\"issuerCorrelationId\\\"|\\\"subjectCorrelationId\\\"|\\\"rpCorrelationId\\\"|\\\"verifiedState\\\"|\\\"tenantId\\\"|\\\"createdAt\\\"|\\\"presentedAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validUntil\\\"|\\\"validFrom\\\"|\\\"verifiedAt\\\"|\\\"revokedAt\\\"|\\\"regulationType\\\"),(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>>\"\n },\n \"Pick<NonPersistedDigitalCredential,Exclude<(\\\"parentId\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"credentialRole\\\"|\\\"rawDocument\\\"|\\\"uniformDocument\\\"|\\\"credentialId\\\"|\\\"hash\\\"|\\\"kmsKeyRef\\\"|\\\"identifierMethod\\\"|\\\"issuerCorrelationType\\\"|\\\"subjectCorrelationType\\\"|\\\"rpCorrelationType\\\"|\\\"isIssuerSigned\\\"|\\\"issuerCorrelationId\\\"|\\\"subjectCorrelationId\\\"|\\\"rpCorrelationId\\\"|\\\"verifiedState\\\"|\\\"tenantId\\\"|\\\"createdAt\\\"|\\\"presentedAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validUntil\\\"|\\\"validFrom\\\"|\\\"verifiedAt\\\"|\\\"revokedAt\\\"|\\\"regulationType\\\"),(\\\"id\\\"|\\\"documentType\\\"|\\\"documentFormat\\\"|\\\"uniformDocument\\\"|\\\"hash\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"|\\\"validFrom\\\"|\\\"validUntil\\\")>>\": {\n \"type\": \"object\",\n \"properties\": {\n \"parentId\": {\n \"type\": \"string\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n }\n },\n \"required\": [\"credentialRole\", \"rawDocument\", \"issuerCorrelationType\", \"issuerCorrelationId\"],\n \"additionalProperties\": false\n },\n \"CredentialRole\": {\n \"type\": \"string\",\n \"enum\": [\"ISSUER\", \"VERIFIER\", \"HOLDER\", \"FEDERATION_TRUST_ANCHOR\"]\n },\n \"CredentialCorrelationType\": {\n \"type\": \"string\",\n \"enum\": [\"DID\", \"X509_SAN\", \"KID\", \"URL\"]\n },\n \"CredentialStateType\": {\n \"type\": \"string\",\n \"enum\": [\"REVOKED\", \"VERIFIED\", \"EXPIRED\"]\n },\n \"RegulationType\": {\n \"type\": \"string\",\n \"enum\": [\"PID\", \"QEAA\", \"EAA\", \"NON_REGULATED\"]\n },\n \"HasherSync\": {\n \"$comment\": \"(data: string | ArrayBuffer, alg: string) => Uint8Array\",\n \"type\": \"object\",\n \"properties\": {\n \"namedArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/ArrayBuffer\"\n }\n ]\n },\n \"alg\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"data\", \"alg\"],\n \"additionalProperties\": false\n }\n }\n },\n \"ArrayBuffer\": {\n \"type\": \"object\",\n \"properties\": {\n \"byteLength\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"byteLength\"],\n \"additionalProperties\": false\n },\n \"DigitalCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": \"string\"\n },\n \"documentType\": {\n \"$ref\": \"#/components/schemas/DocumentType\"\n },\n \"documentFormat\": {\n \"$ref\": \"#/components/schemas/CredentialDocumentFormat\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"uniformDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validUntil\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validFrom\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\n \"id\",\n \"documentType\",\n \"documentFormat\",\n \"credentialRole\",\n \"regulationType\",\n \"rawDocument\",\n \"uniformDocument\",\n \"hash\",\n \"issuerCorrelationType\",\n \"issuerCorrelationId\",\n \"createdAt\",\n \"lastUpdatedAt\"\n ],\n \"additionalProperties\": false,\n \"description\": \"DigitalCredential\"\n },\n \"DocumentType\": {\n \"type\": \"string\",\n \"enum\": [\"VC\", \"VP\", \"P\", \"C\"]\n },\n \"CredentialDocumentFormat\": {\n \"type\": \"string\",\n \"enum\": [\"JSON_LD\", \"JWT\", \"SD_JWT\", \"MSO_MDOC\"]\n },\n \"DeleteCredentialArgs\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hash\"],\n \"additionalProperties\": false\n }\n ]\n },\n \"DeleteCredentialsArgs\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"GetCredentialsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindDigitalCredentialArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"FindDigitalCredentialArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Partial<DigitalCredential>\"\n }\n },\n \"Partial<DigitalCredential>\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"parentId\": {\n \"type\": \"string\"\n },\n \"documentType\": {\n \"$ref\": \"#/components/schemas/DocumentType\"\n },\n \"documentFormat\": {\n \"$ref\": \"#/components/schemas/CredentialDocumentFormat\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"regulationType\": {\n \"$ref\": \"#/components/schemas/RegulationType\"\n },\n \"rawDocument\": {\n \"type\": \"string\"\n },\n \"uniformDocument\": {\n \"type\": \"string\"\n },\n \"credentialId\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\"\n },\n \"kmsKeyRef\": {\n \"type\": \"string\"\n },\n \"identifierMethod\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"subjectCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"rpCorrelationType\": {\n \"$ref\": \"#/components/schemas/CredentialCorrelationType\"\n },\n \"isIssuerSigned\": {\n \"type\": \"boolean\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"subjectCorrelationId\": {\n \"type\": \"string\"\n },\n \"rpCorrelationId\": {\n \"type\": \"string\"\n },\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"presentedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validUntil\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"validFrom\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"additionalProperties\": false\n },\n \"GetCredentialArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"GetCredentialsByClaimsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindClaimsArgs\"\n },\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"tenantId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"FindClaimsArgs\": {\n \"$ref\": \"#/components/schemas/FindArgs-TClaimsColumns\"\n },\n \"FindArgs-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"where\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Where-TClaimsColumns\"\n },\n \"description\": \"Imposes constraints on the values of the given columns. WHERE clauses are combined using AND.\"\n },\n \"order\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Order-TClaimsColumns\"\n },\n \"description\": \"Sorts the results according to the given array of column priorities.\"\n },\n \"skip\": {\n \"type\": \"number\",\n \"description\": \"Ignores the first number of entries in a {@link IDataStoreORM } query result.\"\n },\n \"take\": {\n \"type\": \"number\",\n \"description\": \"Returns at most this number of results from a {@link IDataStoreORM } query.\"\n }\n },\n \"additionalProperties\": false\n },\n \"Where-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"column\": {\n \"$ref\": \"#/components/schemas/TClaimsColumns\"\n },\n \"value\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"not\": {\n \"type\": \"boolean\"\n },\n \"op\": {\n \"type\": \"string\",\n \"enum\": [\"LessThan\", \"LessThanOrEqual\", \"MoreThan\", \"MoreThanOrEqual\", \"Equal\", \"Like\", \"Between\", \"In\", \"Any\", \"IsNull\"]\n }\n },\n \"required\": [\"column\"],\n \"additionalProperties\": false,\n \"description\": \"Represents a WHERE predicate for a {@link FindArgs } query. In situations where multiple WHERE predicates are present, they are combined with AND.\"\n },\n \"TClaimsColumns\": {\n \"type\": \"string\",\n \"enum\": [\"context\", \"credentialType\", \"type\", \"value\", \"isObj\", \"id\", \"issuer\", \"subject\", \"expirationDate\", \"issuanceDate\"]\n },\n \"Order-TClaimsColumns\": {\n \"type\": \"object\",\n \"properties\": {\n \"column\": {\n \"$ref\": \"#/components/schemas/TClaimsColumns\"\n },\n \"direction\": {\n \"type\": \"string\",\n \"enum\": [\"ASC\", \"DESC\"]\n }\n },\n \"required\": [\"column\", \"direction\"],\n \"additionalProperties\": false,\n \"description\": \"Represents the sort order of results from a {@link FindArgs } query.\"\n },\n \"UniqueDigitalCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"hash\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"digitalCredential\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n },\n \"originalVerifiableCredential\": {\n \"$ref\": \"#/components/schemas/OriginalVerifiableCredential\"\n },\n \"originalVerifiablePresentation\": {\n \"$ref\": \"#/components/schemas/OriginalVerifiablePresentation\"\n },\n \"originalCredential\": {\n \"$ref\": \"#/components/schemas/ICredential\"\n },\n \"originalPresentation\": {\n \"$ref\": \"#/components/schemas/IPresentation\"\n },\n \"uniformVerifiableCredential\": {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n \"uniformVerifiablePresentation\": {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n }\n },\n \"required\": [\"hash\", \"digitalCredential\"],\n \"additionalProperties\": false\n },\n \"OriginalVerifiableCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/JwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocOid4vpIssuerSigned\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocDocument\"\n }\n ]\n },\n \"W3CVerifiableCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n ],\n \"description\": \"Represents a signed Verifiable Credential (includes proof), in either JSON, compact JWT or compact SD-JWT VC format. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }\"\n },\n \"IVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"proof\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProof\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IProof\"\n }\n }\n ]\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"credentialSchema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n }\n }\n ]\n },\n \"issuer\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IIssuerId\"\n },\n {\n \"$ref\": \"#/components/schemas/IIssuer\"\n }\n ]\n },\n \"issuanceDate\": {\n \"type\": \"string\"\n },\n \"credentialSubject\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n },\n \"expirationDate\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"credentialStatus\": {\n \"$ref\": \"#/components/schemas/ICredentialStatus\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"credentialSubject\", \"issuanceDate\", \"issuer\", \"proof\", \"type\"]\n },\n \"IProof\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProofType\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"created\": {\n \"type\": \"string\"\n },\n \"proofPurpose\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProofPurpose\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"verificationMethod\": {\n \"type\": \"string\"\n },\n \"challenge\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"proofValue\": {\n \"type\": \"string\"\n },\n \"jws\": {\n \"type\": \"string\"\n },\n \"jwt\": {\n \"type\": \"string\"\n },\n \"mso_mdoc\": {\n \"type\": \"string\"\n },\n \"nonce\": {\n \"type\": \"string\"\n },\n \"requiredRevealStatements\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"type\", \"created\", \"proofPurpose\", \"verificationMethod\"]\n },\n \"IProofType\": {\n \"type\": \"string\",\n \"enum\": [\n \"Ed25519Signature2018\",\n \"Ed25519Signature2020\",\n \"EcdsaSecp256k1Signature2019\",\n \"EcdsaSecp256k1RecoverySignature2020\",\n \"JsonWebSignature2020\",\n \"RsaSignature2018\",\n \"GpgSignature2020\",\n \"JcsEd25519Signature2020\",\n \"BbsBlsSignatureProof2020\",\n \"BbsBlsBoundSignatureProof2020\",\n \"JwtProof2020\",\n \"SdJwtProof2024\",\n \"MsoMdocProof2024\"\n ]\n },\n \"IProofPurpose\": {\n \"type\": \"string\",\n \"enum\": [\n \"verificationMethod\",\n \"assertionMethod\",\n \"authentication\",\n \"keyAgreement\",\n \"contactAgreement\",\n \"capabilityInvocation\",\n \"capabilityDelegation\"\n ]\n },\n \"ICredentialContextType\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"did\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"ICredentialSchemaType\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchema\"\n },\n {\n \"type\": \"string\"\n }\n ]\n },\n \"ICredentialSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"IIssuerId\": {\n \"type\": \"string\"\n },\n \"IIssuer\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"]\n },\n \"ICredentialStatus\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\"]\n },\n \"CompactJWT\": {\n \"type\": \"string\",\n \"description\": \"Represents a Json Web Token in compact form.\"\n },\n \"JwtDecodedVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"vc\": {\n \"$ref\": \"#/components/schemas/IVerifiableCredential\"\n },\n \"exp\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"nbf\": {\n \"type\": \"string\"\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"jti\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vc\", \"exp\", \"iss\", \"nbf\", \"sub\", \"jti\"]\n },\n \"SdJwtDecodedVerifiableCredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"compactSdJwtVc\": {\n \"type\": \"string\",\n \"description\": \"The compact sd jwt is the sd-jwt encoded as string. It is a normal JWT, with the disclosures and kb-jwt appended separated by ~\"\n },\n \"disclosures\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/SdJwtDisclosure\"\n },\n \"description\": \"The disclosures included within the SD-JWT in both encoded and decoded format. The digests are also included, and allows the disclosures to be linked against the digests in the signed payload.\"\n },\n \"signedPayload\": {\n \"$ref\": \"#/components/schemas/SdJwtSignedVerifiableCredentialPayload\",\n \"description\": \"The signed payload is the payload of the sd-jwt that is actually signed, and that includes the `_sd` and `...` digests.\"\n },\n \"decodedPayload\": {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredentialPayload\",\n \"description\": \"The decoded payload is the payload when all `_sd` and `...` digests have been replaced by the actual values from the disclosures. This format could also be seen as the 'pretty` version of the SD JWT payload.\\n\\nThis is useful for displaying the contents of the SD JWT VC to the user, or for example for querying the contents of the SD JWT VC using a PEX presentation definition path.\"\n },\n \"kbJwt\": {\n \"type\": \"object\",\n \"properties\": {\n \"header\": {\n \"$ref\": \"#/components/schemas/SdJwtVcKbJwtHeader\"\n },\n \"payload\": {\n \"$ref\": \"#/components/schemas/SdJwtVcKbJwtPayload\"\n },\n \"compact\": {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n },\n \"required\": [\"header\", \"payload\"],\n \"additionalProperties\": false,\n \"description\": \"Key binding JWT\"\n }\n },\n \"required\": [\"compactSdJwtVc\", \"disclosures\", \"signedPayload\", \"decodedPayload\"],\n \"additionalProperties\": false,\n \"description\": \"The decoded SD JWT Verifiable Credential. This representation includes multiple representations of the same SD-JWT, and allows to fully process an SD-JWT, as well as create a presentation SD-JWT (minus the KB-JWT) by removing certain disclosures from the compact SD-JWT.\\n\\nThis representation is useful as it doesn't require a hasher implementation to match the different digests in the signed SD-JWT payload, with the different disclosures.\"\n },\n \"SdJwtDisclosure\": {\n \"type\": \"object\",\n \"properties\": {\n \"encoded\": {\n \"type\": \"string\"\n },\n \"decoded\": {\n \"$ref\": \"#/components/schemas/SdJwtDecodedDisclosure\"\n },\n \"digest\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"encoded\", \"decoded\", \"digest\"],\n \"additionalProperties\": false\n },\n \"SdJwtDecodedDisclosure\": {\n \"anyOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 3,\n \"items\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n ],\n \"maxItems\": 3\n },\n {\n \"type\": \"array\",\n \"minItems\": 2,\n \"items\": [\n {\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n ],\n \"maxItems\": 2\n }\n ]\n },\n \"JsonValue\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/JsonValue\"\n }\n }\n ]\n },\n \"SdJwtSignedVerifiableCredentialPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"vct\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"number\"\n },\n \"nbf\": {\n \"type\": \"number\"\n },\n \"exp\": {\n \"type\": \"number\"\n },\n \"cnf\": {\n \"type\": \"object\",\n \"properties\": {\n \"jwk\": {},\n \"kid\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"status\": {\n \"type\": \"object\",\n \"properties\": {\n \"idx\": {\n \"type\": \"number\"\n },\n \"uri\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"idx\", \"uri\"],\n \"additionalProperties\": false\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"_sd\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"_sd_alg\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"not\": {}\n },\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"required\": [\"iat\", \"iss\", \"vct\"],\n \"description\": \"The signed payload of an SD-JWT. Includes fields such as `_sd`, `...` and `_sd_alg`\"\n },\n \"SdJwtJsonValue\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"number\"\n },\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"_sd\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/SdJwtJsonValue\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"...\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"...\"],\n \"additionalProperties\": false\n }\n ]\n }\n }\n ]\n },\n \"SdJwtDecodedVerifiableCredentialPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"vct\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"number\"\n },\n \"nbf\": {\n \"type\": \"number\"\n },\n \"exp\": {\n \"type\": \"number\"\n },\n \"cnf\": {\n \"type\": \"object\",\n \"properties\": {\n \"jwk\": {},\n \"kid\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"status\": {\n \"type\": \"object\",\n \"properties\": {\n \"idx\": {\n \"type\": \"number\"\n },\n \"uri\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"idx\", \"uri\"],\n \"additionalProperties\": false\n },\n \"sub\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vct\", \"iss\", \"iat\"],\n \"additionalProperties\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/JsonValue\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"description\": \"Decoded 'pretty' SD JWT Verifiable Credential. This representation has all the `_sd` properties removed, and includes the disclosures directly within the payload.\"\n },\n \"SdJwtVcKbJwtHeader\": {\n \"type\": \"object\",\n \"properties\": {\n \"typ\": {\n \"type\": \"string\",\n \"const\": \"kb+jwt\"\n },\n \"alg\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"typ\", \"alg\"]\n },\n \"SdJwtVcKbJwtPayload\": {\n \"type\": \"object\",\n \"properties\": {\n \"iat\": {\n \"type\": \"number\"\n },\n \"aud\": {\n \"type\": \"string\"\n },\n \"nonce\": {\n \"type\": \"string\"\n },\n \"sd_hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"iat\", \"aud\", \"nonce\", \"sd_hash\"],\n \"additionalProperties\": {}\n },\n \"MdocOid4vpIssuerSigned\": {\n \"type\": \"string\",\n \"description\": \"Represents a selective disclosure JWT vc in compact form.\"\n },\n \"MdocDocument\": {\n \"$ref\": \"#/components/schemas/com.sphereon.mdoc.data.device.DocumentCbor\"\n },\n \"com.sphereon.mdoc.data.device.DocumentCbor\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {}\n },\n \"OriginalVerifiablePresentation\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/W3CVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/JwtDecodedVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/SdJwtDecodedVerifiableCredential\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocOid4vpMdocVpToken\"\n },\n {\n \"$ref\": \"#/components/schemas/MdocDeviceResponse\"\n }\n ]\n },\n \"W3CVerifiablePresentation\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n },\n {\n \"$ref\": \"#/components/schemas/CompactJWT\"\n }\n ],\n \"description\": \"Represents a signed Verifiable Presentation (includes proof), in either JSON or compact JWT format. See {@link https://www.w3.org/TR/vc-data-model/#presentations | VC data model } See {@link https://www.w3.org/TR/vc-data-model/#proof-formats | proof formats }\"\n },\n \"IVerifiablePresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"proof\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IProof\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IProof\"\n }\n }\n ]\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n ]\n },\n \"verifiableCredential\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n }\n },\n \"presentation_submission\": {\n \"$ref\": \"#/components/schemas/PresentationSubmission\"\n },\n \"holder\": {\n \"type\": \"string\"\n },\n \"verifier\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"proof\"]\n },\n \"PresentationSubmission\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"A UUID or some other unique ID to identify this Presentation Submission\"\n },\n \"definition_id\": {\n \"type\": \"string\",\n \"description\": \"A UUID or some other unique ID to identify this Presentation Definition\"\n },\n \"descriptor_map\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Descriptor\"\n },\n \"description\": \"List of descriptors of how the claims are being mapped to presentation definition\"\n }\n },\n \"required\": [\"id\", \"definition_id\", \"descriptor_map\"],\n \"additionalProperties\": false,\n \"description\": \"It expresses how the inputs are presented as proofs to a Verifier.\"\n },\n \"Descriptor\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID to identify the descriptor from Presentation Definition Input Descriptor it coresponds to.\"\n },\n \"path\": {\n \"type\": \"string\",\n \"description\": \"The path where the verifiable credential is located in the presentation submission json\"\n },\n \"path_nested\": {\n \"$ref\": \"#/components/schemas/Descriptor\"\n },\n \"format\": {\n \"type\": \"string\",\n \"description\": \"The Proof or JWT algorith that the proof is in\"\n }\n },\n \"required\": [\"id\", \"path\", \"format\"],\n \"additionalProperties\": false,\n \"description\": \"descriptor map laying out the structure of the presentation submission.\"\n },\n \"JwtDecodedVerifiablePresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"vp\": {\n \"$ref\": \"#/components/schemas/IVerifiablePresentation\"\n },\n \"exp\": {\n \"type\": \"string\"\n },\n \"iss\": {\n \"type\": \"string\"\n },\n \"nbf\": {\n \"type\": \"string\"\n },\n \"sub\": {\n \"type\": \"string\"\n },\n \"jti\": {\n \"type\": \"string\"\n },\n \"aud\": {\n \"type\": \"string\"\n },\n \"iat\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"vp\", \"exp\", \"iss\", \"nbf\", \"sub\", \"jti\", \"aud\", \"iat\"]\n },\n \"MdocOid4vpMdocVpToken\": {\n \"type\": \"string\"\n },\n \"MdocDeviceResponse\": {\n \"$ref\": \"#/components/schemas/com.sphereon.mdoc.data.device.DeviceResponseCbor\"\n },\n \"com.sphereon.mdoc.data.device.DeviceResponseCbor\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {}\n },\n \"ICredential\": {\n \"type\": \"object\",\n \"properties\": {\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"credentialSchema\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialSchemaType\"\n }\n }\n ]\n },\n \"issuer\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IIssuerId\"\n },\n {\n \"$ref\": \"#/components/schemas/IIssuer\"\n }\n ]\n },\n \"issuanceDate\": {\n \"type\": \"string\"\n },\n \"credentialSubject\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n ]\n },\n \"expirationDate\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"credentialStatus\": {\n \"$ref\": \"#/components/schemas/ICredentialStatus\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\", \"type\", \"issuer\", \"issuanceDate\", \"credentialSubject\"]\n },\n \"IPresentation\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"@context\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialContextType\"\n }\n }\n ]\n },\n \"type\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n ]\n },\n \"verifiableCredential\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/W3CVerifiableCredential\"\n }\n },\n \"presentation_submission\": {\n \"$ref\": \"#/components/schemas/PresentationSubmission\"\n },\n \"holder\": {\n \"type\": \"string\"\n },\n \"verifier\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"@context\"]\n },\n \"GetCredentialsByIdOrHashArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credentialRole\": {\n \"$ref\": \"#/components/schemas/CredentialRole\"\n },\n \"idOrHash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"credentialRole\", \"idOrHash\"],\n \"additionalProperties\": false\n },\n \"OptionalUniqueDigitalCredential\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n },\n {\n \"not\": {}\n }\n ]\n },\n \"UpdateCredentialStateArgs\": {\n \"anyOf\": [\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"verifiedState\"]\n },\n {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"verifiedState\": {\n \"$ref\": \"#/components/schemas/CredentialStateType\"\n },\n \"verifiedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"revokedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"hash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"hash\", \"verifiedState\"]\n }\n ]\n }\n },\n \"methods\": {\n \"crsAddCredential\": {\n \"description\": \"Add a new credential.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/AddCredentialArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n },\n \"crsDeleteCredential\": {\n \"description\": \"Delete a single credentials by primary key\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/DeleteCredentialArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"crsDeleteCredentials\": {\n \"description\": \"Delete multiple credentials records using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/DeleteCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"number\"\n }\n },\n \"crsGetCredential\": {\n \"description\": \"Get a single credentials by primary key\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n },\n \"crsGetCredentials\": {\n \"description\": \"Find one or more credentials using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n }\n },\n \"crsGetCredentialsByClaims\": {\n \"description\": \"Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByClaimsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n }\n }\n },\n \"crsGetCredentialsByClaimsCount\": {\n \"description\": \"Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByClaimsArgs\"\n },\n \"returnType\": {\n \"type\": \"number\"\n }\n },\n \"crsGetUniqueCredentialByIdOrHash\": {\n \"description\": \"Find one credential by id or hash\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsByIdOrHashArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/OptionalUniqueDigitalCredential\"\n }\n },\n \"crsGetUniqueCredentials\": {\n \"description\": \"Find one or more credentials using filters\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/GetCredentialsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/UniqueDigitalCredential\"\n }\n }\n },\n \"crsUpdateCredentialState\": {\n \"description\": \"Update credential the state of an existing credential.\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/UpdateCredentialStateArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/DigitalCredential\"\n }\n }\n }\n }\n }\n}\n","import { Loggers } from '@sphereon/ssi-types'\n\n/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\n\nexport const logger = Loggers.DEFAULT.get('sphereon:credential-store')\n\nexport { CredentialStore, credentialStoreMethods } from './agent/CredentialStore'\nexport {\n CredentialStateType,\n CredentialCorrelationType,\n CredentialDocumentFormat,\n DocumentType,\n type DigitalCredential,\n type FindDigitalCredentialArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nexport { CredentialRole } from '@sphereon/ssi-types'\nexport * from './types/ICredentialStore'\nexport * from './types/claims'\nexport * from './utils/filters'\n","import { shaHasher as defaultHasher } from '@sphereon/ssi-sdk.core'\nimport { parseRawDocument } from '@sphereon/ssi-sdk.data-store'\nimport {\n AbstractDigitalCredentialStore,\n type DigitalCredential,\n DocumentType,\n UpdateCredentialArgs,\n type UpdateCredentialStateArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport { type IVerifiableCredential } from '@sphereon/ssi-types'\nimport { type IAgentPlugin } from '@veramo/core'\nimport { logger, schema } from '../index'\nimport type { TClaimsColumns } from '../types/claims'\nimport type {\n AddCredentialArgs,\n DeleteCredentialArgs,\n DeleteCredentialsArgs,\n GetCredentialArgs,\n GetCredentialsArgs,\n GetCredentialsByClaimsArgs,\n GetCredentialsByIdOrHashArgs,\n ICredentialStore,\n OptionalUniqueDigitalCredential,\n UniqueDigitalCredential,\n} from '../types/ICredentialStore'\nimport { credentialIdOrHashFilter } from '../utils/filters'\n\n// Exposing the methods here for any REST implementation\nexport const credentialStoreMethods: Array<string> = [\n 'crsAddCredential',\n 'crsUpdateCredential',\n 'crsUpdateCredentialState',\n 'crsGetCredential',\n 'crsGetCredentials',\n 'crsDeleteCredential',\n 'crsDeleteCredentials',\n 'crsGetUniqueCredentials',\n 'crsGetUniqueCredentialByIdOrHash',\n 'crsGetCredentialsByClaims',\n 'crsGetCredentialsByClaimsCount',\n]\n\n/**\n * {@inheritDoc ICRManager}\n */\nexport class CredentialStore implements IAgentPlugin {\n readonly schema = schema.ICredentialStore\n readonly methods: ICredentialStore = {\n crsAddCredential: this.crsAddCredential.bind(this),\n crsUpdateCredential: this.crsUpdateCredential.bind(this),\n crsUpdateCredentialState: this.crsUpdateCredentialState.bind(this),\n crsGetCredential: this.crsGetCredential.bind(this),\n crsGetCredentials: this.crsGetCredentials.bind(this),\n crsGetUniqueCredentialByIdOrHash: this.crsGetUniqueCredentialByIdOrHash.bind(this),\n crsGetUniqueCredentials: this.crsGetUniqueCredentials.bind(this),\n crsDeleteCredential: this.crsDeleteCredential.bind(this),\n crsDeleteCredentials: this.crsDeleteCredentials.bind(this),\n crsGetCredentialsByClaims: this.crsGetCredentialsByClaims.bind(this),\n crsGetCredentialsByClaimsCount: this.crsGetCredentialsByClaimsCount.bind(this),\n }\n\n private readonly store: AbstractDigitalCredentialStore\n\n constructor(options: { store: AbstractDigitalCredentialStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc ICredentialStore.crsAddCredential} */\n private async crsAddCredential(args: AddCredentialArgs): Promise<DigitalCredential> {\n return await this.store.addCredential({ ...args.credential, opts: { ...args.opts, hasher: args.opts?.hasher ?? defaultHasher } })\n }\n\n /** {@inheritDoc ICredentialStore.crsUpdateCredential} */\n private async crsUpdateCredential(args: UpdateCredentialArgs): Promise<DigitalCredential> {\n return await this.store.updateCredential(args)\n }\n\n /** {@inheritDoc ICredentialStore.crsUpdateCredentialState} */\n private async crsUpdateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential> {\n return await this.store.updateCredentialState(args)\n }\n\n /** {@inheritDoc ICredentialStore.crsGetCredential} */\n private async crsGetCredential(args: GetCredentialArgs): Promise<DigitalCredential> {\n const { id } = args\n\n return this.store.getCredential({ id })\n }\n\n /** {@inheritDoc ICredentialStore.crsGetCredentials} */\n private async crsGetCredentials(args: GetCredentialsArgs): Promise<Array<DigitalCredential>> {\n const { filter } = args\n const credentials = await this.store.getCredentials({ filter })\n\n return credentials.data\n }\n\n /** {@inheritDoc ICredentialStore.crsGetUniqueCredentialByIdOrHash} */\n private async crsGetUniqueCredentialByIdOrHash(args: GetCredentialsByIdOrHashArgs): Promise<OptionalUniqueDigitalCredential> {\n const credentials = await this.crsGetCredentials({ filter: credentialIdOrHashFilter(args.credentialRole, args.idOrHash) })\n if (credentials.length === 0) {\n return undefined\n } else if (credentials.length > 1) {\n logger.warning('Duplicate credentials detected in crsGetUniqueCredentialByIdOrHash', args)\n }\n\n return this.toUniqueCredentials(credentials)[0]\n }\n\n /** {@inheritDoc ICredentialStore.crsGetUniqueCredentials} */\n private async crsGetUniqueCredentials(args: GetCredentialsArgs): Promise<Array<UniqueDigitalCredential>> {\n const credentials = await this.crsGetCredentials(args)\n\n return this.toUniqueCredentials(credentials)\n }\n\n /** {@inheritDoc ICredentialStore.crsDeleteCredential} */\n private async crsDeleteCredential(args: DeleteCredentialArgs): Promise<boolean> {\n return this.store.removeCredential(args)\n }\n\n /** {@inheritDoc ICredentialStore.crsDeleteCredentials} */\n private async crsDeleteCredentials(args: DeleteCredentialsArgs): Promise<number> {\n const credentials = await this.crsGetCredentials(args)\n let count = 0\n for (const credential of credentials) {\n const result = await this.store.removeCredential({ id: credential.id })\n if (result) {\n count++\n }\n }\n\n return count\n }\n\n /**\n * Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n private async crsGetCredentialsByClaims(args: GetCredentialsByClaimsArgs): Promise<Array<UniqueDigitalCredential>> {\n const digitalCredentials = await this.crsGetUniqueCredentials({\n filter: [\n // TODO SDK-25 Implement param for documentType & support VP filtering below\n {\n documentType: DocumentType.VC,\n credentialRole: args.credentialRole,\n tenantId: args.tenantId,\n },\n {\n documentType: DocumentType.C,\n credentialRole: args.credentialRole,\n tenantId: args.tenantId,\n },\n ],\n })\n\n // This a copy of how Veramo did this. TODO Use GraphQL in the future?\n return digitalCredentials.filter((uniqueVC) => {\n if (!uniqueVC.uniformVerifiableCredential) {\n return false\n }\n\n const credential = uniqueVC.uniformVerifiableCredential\n return (\n args.filter.where?.every((whereClause) => {\n const value = this.getValueFromCredential(credential, whereClause.column)\n\n if (value === undefined) {\n return whereClause.op === 'IsNull'\n }\n\n switch (whereClause.op) {\n case 'In':\n return whereClause.value?.includes(value)\n case 'Like':\n return typeof value === 'string' && value.includes(whereClause.value?.[0] || '')\n case 'Between':\n return value >= (whereClause.value?.[0] || '') && value <= (whereClause.value?.[1] || '')\n case 'LessThan':\n return value < (whereClause.value?.[0] || '')\n case 'LessThanOrEqual':\n return value <= (whereClause.value?.[0] || '')\n case 'MoreThan':\n return value > (whereClause.value?.[0] || '')\n case 'MoreThanOrEqual':\n return value >= (whereClause.value?.[0] || '')\n case 'Any':\n return Array.isArray(value) && value.some((v) => whereClause.value?.includes(v))\n case 'IsNull':\n return value === null || value === undefined\n case 'Equal':\n default:\n return value === whereClause.value?.[0]\n }\n }) ?? true\n )\n })\n }\n\n private getValueFromCredential(credential: IVerifiableCredential, column: TClaimsColumns): any {\n switch (column) {\n case 'context':\n return credential['@context']\n case 'credentialType':\n return credential.type\n case 'type':\n return Array.isArray(credential.credentialSubject) ? credential.credentialSubject[0]?.type : credential.credentialSubject?.type\n case 'value':\n return JSON.stringify(credential.credentialSubject)\n case 'isObj':\n return typeof credential.credentialSubject === 'object'\n case 'id':\n return credential.id\n case 'issuer':\n return typeof credential.issuer === 'string' ? credential.issuer : credential.issuer.id\n case 'subject':\n return Array.isArray(credential.credentialSubject) ? credential.credentialSubject[0]?.id : credential.credentialSubject?.id\n case 'expirationDate':\n return credential.expirationDate\n case 'issuanceDate':\n return credential.issuanceDate\n default:\n return undefined\n }\n }\n\n /**\n * Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n private async crsGetCredentialsByClaimsCount(args: GetCredentialsByClaimsArgs): Promise<number> {\n const credentialsByClaims = await this.crsGetCredentialsByClaims(args)\n return credentialsByClaims.length // FIXME ?\n }\n\n private secureParse<Type>(original: string): Type {\n return parseRawDocument(original) as Type\n }\n\n private toUniqueCredentials(credentials: Array<DigitalCredential>): Array<UniqueDigitalCredential> {\n return Object.values(\n credentials.reduce(\n (accumulator, credential) => {\n const uniqueCredential: UniqueDigitalCredential = {\n hash: credential.hash,\n digitalCredential: credential,\n }\n switch (credential.documentType) {\n case DocumentType.VC:\n uniqueCredential.originalVerifiableCredential = this.secureParse(credential.rawDocument)\n uniqueCredential.uniformVerifiableCredential = this.secureParse(credential.uniformDocument)\n uniqueCredential.id = uniqueCredential.uniformVerifiableCredential?.id\n break\n case DocumentType.VP:\n uniqueCredential.originalVerifiablePresentation = this.secureParse(credential.rawDocument)\n uniqueCredential.uniformVerifiablePresentation = this.secureParse(credential.uniformDocument)\n uniqueCredential.id = uniqueCredential.uniformVerifiablePresentation?.id\n break\n case DocumentType.P:\n uniqueCredential.originalPresentation = this.secureParse(credential.rawDocument)\n uniqueCredential.id = uniqueCredential.originalPresentation?.id\n break\n case DocumentType.C:\n uniqueCredential.originalCredential = this.secureParse(credential.rawDocument)\n uniqueCredential.id = uniqueCredential.originalCredential?.id\n break\n // TODO CBOR support\n }\n accumulator[credential.hash] = uniqueCredential\n return accumulator\n },\n {} as Record<string, UniqueDigitalCredential>,\n ),\n )\n }\n}\n","import { type DigitalCredential, DocumentType, type FindDigitalCredentialArgs } from '@sphereon/ssi-sdk.data-store-types'\nimport { CredentialRole } from '@sphereon/ssi-types'\nimport { validate as uuidValidate } from 'uuid'\n\n/**\n * Creates a filter to find a digital credential by its ID or hash.\n *\n * @param credentialRole - The role to filter by (e.g., ISSUER, HOLDER).\n * @param idOrHash - The ID or hash of the credential to search for.\n * @returns A FindDigitalCredentialArgs array for filtering by ID or hash.\n */\n\nexport const credentialIdOrHashFilter = (credentialRole: CredentialRole, idOrHash: string): FindDigitalCredentialArgs => {\n const filter: FindDigitalCredentialArgs = [\n {\n hash: idOrHash,\n credentialRole,\n },\n {\n credentialId: idOrHash,\n credentialRole,\n },\n ]\n\n if (uuidValidate(idOrHash)) {\n filter.push({\n id: idOrHash,\n credentialRole,\n })\n }\n\n return filter\n}\n\n/**\n * Creates a filter for verifiable credentials with a specific role.\n *\n * @param credentialRole - The role to filter by (e.g., ISSUER, HOLDER).\n * @param withFilter - Optional additional filter criteria.\n * @returns A FindDigitalCredentialArgs array for filtering verifiable credentials by role.\n */\nexport const verifiableCredentialForRoleFilter = (\n credentialRole: CredentialRole,\n withFilter?: FindDigitalCredentialArgs,\n): FindDigitalCredentialArgs => {\n const filter = [\n {\n documentType: DocumentType.VC,\n credentialRole: credentialRole,\n },\n ]\n if (withFilter !== undefined) {\n return mergeFilter(withFilter, filter)\n }\n return filter\n}\n\n/**\n * Merges two FindDigitalCredentialArgs arrays into a single array.\n *\n * This function combines two filter arrays, merging objects at the same index\n * and adding unique objects from both arrays. When merging objects, properties\n * from filter2 overwrite those from filter1 if they exist in both.\n *\n * @param filter1 - The first FindDigitalCredentialArgs array to merge.\n * @param filter2 - The second FindDigitalCredentialArgs array to merge.\n * @returns A new FindDigitalCredentialArgs array containing the merged result.\n *\n * @example\n * const filter1 = [{ documentType: DocumentType.VC }, { credentialRole: CredentialRole.ISSUER }];\n * const filter2 = [{ documentType: DocumentType.VP }, { hash: 'abc123' }];\n * const mergedFilter = mergeFilter(filter1, filter2);\n * // Result: [{ documentType: DocumentType.VP }, { credentialRole: CredentialRole.ISSUER, hash: 'abc123' }]\n */\nexport const mergeFilter = (filter1: FindDigitalCredentialArgs, filter2: FindDigitalCredentialArgs): FindDigitalCredentialArgs => {\n const mergedFilter: FindDigitalCredentialArgs = []\n\n const mergedMap = new Map<number, Partial<DigitalCredential>>()\n\n filter1.forEach((obj, index) => {\n mergedMap.set(index, { ...obj })\n })\n\n filter2.forEach((obj, index) => {\n if (mergedMap.has(index)) {\n mergedMap.set(index, { ...mergedMap.get(index), ...obj })\n } else {\n mergedMap.set(index, { ...obj })\n }\n })\n\n mergedMap.forEach((value) => {\n mergedFilter.push(value)\n })\n\n return mergedFilter\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport {\n type DigitalCredential,\n type FindDigitalCredentialArgs,\n type NonPersistedDigitalCredential,\n UpdateCredentialArgs,\n type UpdateCredentialStateArgs,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport type {\n CredentialRole,\n HasherSync,\n ICredential,\n IPresentation,\n IVerifiableCredential,\n IVerifiablePresentation,\n OriginalVerifiableCredential,\n OriginalVerifiablePresentation,\n} from '@sphereon/ssi-types'\nimport type { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport type { FindClaimsArgs } from './claims'\n\nexport type { UpdateCredentialStateArgs } // TODO create a local copy?\n\nexport interface ICredentialStore extends IPluginMethodMap {\n /**\n * Add a new credential.\n * @param args\n */\n crsAddCredential(args: AddCredentialArgs): Promise<DigitalCredential>\n\n /**\n * Update credential the state of an existing credential.\n * @param args\n */\n crsUpdateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential>\n\n /**\n * Get a single credentials by primary key\n * @param args\n */\n crsGetCredential(args: GetCredentialArgs): Promise<DigitalCredential>\n\n /**\n * Find one or more credentials using filters\n * @param args\n */\n crsGetCredentials(args: GetCredentialsArgs): Promise<Array<DigitalCredential>>\n\n /**\n * Find one or more credentials using filters\n * @param args\n */\n crsGetUniqueCredentials(args: GetCredentialsArgs): Promise<Array<UniqueDigitalCredential>>\n\n /**\n * Find one credential by id or hash\n * @param args\n */\n crsGetUniqueCredentialByIdOrHash(args: GetCredentialsByIdOrHashArgs): Promise<OptionalUniqueDigitalCredential>\n\n /**\n * Returns a list of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n crsGetCredentialsByClaims(args: GetCredentialsByClaimsArgs): Promise<Array<UniqueDigitalCredential>>\n\n /**\n * Returns a count of UniqueDigitalCredentials that match the given filter based on the claims they contain.\n * @param args\n */\n crsGetCredentialsByClaimsCount(args: GetCredentialsByClaimsArgs): Promise<number>\n\n /**\n * Update an existing credential\n * @param args\n */\n crsUpdateCredential(args: UpdateCredentialArgs): Promise<DigitalCredential>\n\n /**\n * Delete a single credentials by primary key\n * @param args\n */\n crsDeleteCredential(args: DeleteCredentialArgs): Promise<boolean>\n\n /**\n * Delete multiple credentials records using filters\n * @param args\n */\n crsDeleteCredentials(args: DeleteCredentialsArgs): Promise<number>\n}\n\n/**\n *\n * @param context\n * @internal\n */\nexport function contextHasCredentialStore(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<ICredentialStore> {\n return contextHasPlugin(context, 'crsGetCredential')\n}\n\nexport type GetCredentialArgs = {\n id: string\n}\n\nexport type GetCredentialsArgs = {\n filter: FindDigitalCredentialArgs\n}\n\nexport type GetCredentialsByClaimsArgs = {\n filter: FindClaimsArgs\n credentialRole?: CredentialRole\n tenantId?: string\n}\n\nexport type GetCredentialsByIdOrHashArgs = {\n credentialRole: CredentialRole\n idOrHash: string\n}\n\nexport type DeleteCredentialArgs = { id: string } | { hash: string }\n\nexport type DeleteCredentialsArgs = GetCredentialsArgs\n\nexport type AddDigitalCredential = Omit<\n NonPersistedDigitalCredential,\n 'id' | 'documentType' | 'documentFormat' | 'uniformDocument' | 'hash' | 'createdAt' | 'lastUpdatedAt' | 'validFrom' | 'validUntil'\n>\n\nexport type AddCredentialArgs = {\n credential: AddDigitalCredential\n opts?: { maxTimeSkewInMS?: number; hasher?: HasherSync }\n}\n\nexport interface UniqueDigitalCredential {\n hash: string\n id?: string\n digitalCredential: DigitalCredential\n\n originalVerifiableCredential?: OriginalVerifiableCredential\n originalVerifiablePresentation?: OriginalVerifiablePresentation\n originalCredential?: ICredential\n originalPresentation?: IPresentation\n uniformVerifiableCredential?: IVerifiableCredential\n uniformVerifiablePresentation?: IVerifiablePresentation\n}\n\nexport type OptionalUniqueDigitalCredential = UniqueDigitalCredential | undefined\n\nexport type RequiredContext = IAgentContext<never>\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,kBAAoB;AAAA,QAClB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,mBAAqB;AAAA,cACnB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,YAAc;AAAA,kBACZ,MAAQ;AAAA,gBACV;AAAA,gBACA,MAAQ;AAAA,kBACN,MAAQ;AAAA,kBACR,YAAc;AAAA,oBACZ,iBAAmB;AAAA,sBACjB,MAAQ;AAAA,oBACV;AAAA,oBACA,QAAU;AAAA,sBACR,MAAQ;AAAA,oBACV;AAAA,kBACF;AAAA,kBACA,sBAAwB;AAAA,gBAC1B;AAAA,cACF;AAAA,cACA,UAAY,CAAC,YAAY;AAAA,cACzB,sBAAwB;AAAA,YAC1B;AAAA,YACA,sBAAwB;AAAA,cACtB,MAAQ;AAAA,YACV;AAAA,YACA,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2BAAiBpD,KAAKoD,iBAAiBQ,+BAA+B5D;AACtE;QACF,KAAKmB,cAAa0C;AAChBT,2BAAiBU,uBAAuB,KAAKjB,YAAYnD,WAAW8D,WAAW;AAC/EJ,2BAAiBpD,KAAKoD,iBAAiBU,sBAAsB9D;AAC7D;QACF,KAAKmB,cAAaG;AAChB8B,2BAAiBW,qBAAqB,KAAKlB,YAAYnD,WAAW8D,WAAW;AAC7EJ,2BAAiBpD,KAAKoD,iBAAiBW,oBAAoB/D;AAC3D;MAEJ;AACAmD,kBAAYzD,WAAW2D,IAAI,IAAID;AAC/B,aAAOD;IACT,GACA,CAAC,CAAA,CAAA;EAGP;AACF;;;ADxQA,SACEa,qBACAC,2BACAC,0BACAC,gBAAAA,qBAGK;AACP,SAASC,sBAAsB;;;AGnB/B,SAASC,wBAAwB;AAgG1B,SAASC,0BAA0BC,SAAwC;AAChF,SAAOC,iBAAiBD,SAAS,kBAAA;AACnC;AAFgBD;;;AH3FhB,IAAMG,SAASC;AAGR,IAAMC,SAASC,QAAQC,QAAQC,IAAI,2BAAA;","names":["Loggers","shaHasher","defaultHasher","parseRawDocument","DocumentType","DocumentType","validate","uuidValidate","credentialIdOrHashFilter","credentialRole","idOrHash","filter","hash","credentialId","uuidValidate","push","id","verifiableCredentialForRoleFilter","withFilter","documentType","DocumentType","VC","undefined","mergeFilter","filter1","filter2","mergedFilter","mergedMap","Map","forEach","obj","index","set","has","get","value","credentialStoreMethods","CredentialStore","schema","ICredentialStore","methods","crsAddCredential","bind","crsUpdateCredential","crsUpdateCredentialState","crsGetCredential","crsGetCredentials","crsGetUniqueCredentialByIdOrHash","crsGetUniqueCredentials","crsDeleteCredential","crsDeleteCredentials","crsGetCredentialsByClaims","crsGetCredentialsByClaimsCount","store","options","args","addCredential","credential","opts","hasher","defaultHasher","updateCredential","updateCredentialState","id","getCredential","filter","credentials","getCredentials","data","credentialIdOrHashFilter","credentialRole","idOrHash","length","undefined","logger","warning","toUniqueCredentials","removeCredential","count","result","digitalCredentials","documentType","DocumentType","VC","tenantId","C","uniqueVC","uniformVerifiableCredential","where","every","whereClause","value","getValueFromCredential","column","op","includes","Array","isArray","some","v","type","credentialSubject","JSON","stringify","issuer","expirationDate","issuanceDate","credentialsByClaims","secureParse","original","parseRawDocument","Object","values","reduce","accumulator","uniqueCredential","hash","digitalCredential","originalVerifiableCredential","rawDocument","uniformDocument","VP","originalVerifiablePresentation","uniformVerifiablePresentation","P","originalPresentation","originalCredential","CredentialStateType","CredentialCorrelationType","CredentialDocumentFormat","DocumentType","CredentialRole","contextHasPlugin","contextHasCredentialStore","context","contextHasPlugin","schema","require","logger","Loggers","DEFAULT","get"]}