@credo-ts/core 0.6.0-pr-2392-20251010173905 → 0.6.0-pr-2457-20251016083534
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/build/agent/Agent.d.mts +1 -1
- package/build/agent/Agent.d.mts.map +1 -1
- package/build/agent/Agent.d.ts +1 -1
- package/build/agent/Agent.d.ts.map +1 -1
- package/build/agent/Agent.js +2 -2
- package/build/agent/Agent.mjs +2 -2
- package/build/agent/Agent.mjs.map +1 -1
- package/build/agent/AgentConfig.d.mts +1 -1
- package/build/agent/AgentConfig.d.mts.map +1 -1
- package/build/agent/AgentConfig.d.ts +1 -1
- package/build/agent/AgentConfig.d.ts.map +1 -1
- package/build/agent/AgentConfig.mjs.map +1 -1
- package/build/agent/AgentModules.d.mts +4 -4
- package/build/agent/AgentModules.d.mts.map +1 -1
- package/build/agent/AgentModules.d.ts +4 -4
- package/build/agent/AgentModules.d.ts.map +1 -1
- package/build/agent/AgentModules.mjs.map +1 -1
- package/build/agent/BaseAgent.d.mts +4 -4
- package/build/agent/BaseAgent.d.ts +4 -4
- package/build/agent/BaseAgent.mjs.map +1 -1
- package/build/agent/EventEmitter.d.mts +1 -1
- package/build/agent/EventEmitter.d.mts.map +1 -1
- package/build/agent/EventEmitter.d.ts +1 -1
- package/build/agent/EventEmitter.d.ts.map +1 -1
- package/build/agent/EventEmitter.mjs.map +1 -1
- package/build/agent/context/AgentContext.d.mts.map +1 -1
- package/build/agent/context/AgentContext.d.ts.map +1 -1
- package/build/agent/context/AgentContext.mjs.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.d.mts.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.d.ts.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.js +1 -1
- package/build/agent/context/DefaultAgentContextProvider.mjs +1 -1
- package/build/agent/context/DefaultAgentContextProvider.mjs.map +1 -1
- package/build/crypto/JwsService.d.mts +5 -5
- package/build/crypto/JwsService.d.mts.map +1 -1
- package/build/crypto/JwsService.d.ts +5 -5
- package/build/crypto/JwsService.d.ts.map +1 -1
- package/build/crypto/JwsService.js +3 -3
- package/build/crypto/JwsService.mjs +3 -3
- package/build/crypto/JwsService.mjs.map +1 -1
- package/build/crypto/KmsKeyPair.js +1 -5
- package/build/crypto/KmsKeyPair.mjs +1 -2
- package/build/crypto/KmsKeyPair.mjs.map +1 -1
- package/build/crypto/hashes/Hasher.d.mts +4 -2
- package/build/crypto/hashes/Hasher.d.mts.map +1 -1
- package/build/crypto/hashes/Hasher.d.ts +4 -2
- package/build/crypto/hashes/Hasher.d.ts.map +1 -1
- package/build/crypto/hashes/Hasher.js +8 -3
- package/build/crypto/hashes/Hasher.mjs +8 -3
- package/build/crypto/hashes/Hasher.mjs.map +1 -1
- package/build/crypto/hashes/IHash.d.mts +3 -1
- package/build/crypto/hashes/IHash.d.mts.map +1 -1
- package/build/crypto/hashes/IHash.d.ts +3 -1
- package/build/crypto/hashes/IHash.d.ts.map +1 -1
- package/build/crypto/hashes/Sha1.d.mts +2 -1
- package/build/crypto/hashes/Sha1.d.mts.map +1 -1
- package/build/crypto/hashes/Sha1.d.ts +2 -1
- package/build/crypto/hashes/Sha1.d.ts.map +1 -1
- package/build/crypto/hashes/Sha1.js +3 -3
- package/build/crypto/hashes/Sha1.mjs +1 -1
- package/build/crypto/hashes/Sha1.mjs.map +1 -1
- package/build/crypto/hashes/Sha256.d.mts +2 -1
- package/build/crypto/hashes/Sha256.d.mts.map +1 -1
- package/build/crypto/hashes/Sha256.d.ts +2 -1
- package/build/crypto/hashes/Sha256.d.ts.map +1 -1
- package/build/crypto/hashes/Sha256.js +3 -3
- package/build/crypto/hashes/Sha256.mjs +1 -1
- package/build/crypto/hashes/Sha256.mjs.map +1 -1
- package/build/crypto/hashes/Sha384.d.mts +10 -0
- package/build/crypto/hashes/Sha384.d.mts.map +1 -0
- package/build/crypto/hashes/Sha384.d.ts +10 -0
- package/build/crypto/hashes/Sha384.d.ts.map +1 -0
- package/build/crypto/hashes/Sha384.js +15 -0
- package/build/crypto/hashes/Sha384.mjs +14 -0
- package/build/crypto/hashes/Sha384.mjs.map +1 -0
- package/build/crypto/hashes/Sha512.d.mts +2 -1
- package/build/crypto/hashes/Sha512.d.mts.map +1 -1
- package/build/crypto/hashes/Sha512.d.ts +2 -1
- package/build/crypto/hashes/Sha512.d.ts.map +1 -1
- package/build/crypto/hashes/Sha512.js +3 -3
- package/build/crypto/hashes/Sha512.mjs +1 -1
- package/build/crypto/hashes/Sha512.mjs.map +1 -1
- package/build/crypto/hashes/index.js +1 -0
- package/build/crypto/hashes/index.mjs +1 -0
- package/build/crypto/index.js +1 -0
- package/build/crypto/index.mjs +1 -0
- package/build/crypto/jose/jwt/Jwt.d.mts.map +1 -1
- package/build/crypto/jose/jwt/Jwt.d.ts.map +1 -1
- package/build/crypto/jose/jwt/Jwt.js +1 -1
- package/build/crypto/jose/jwt/Jwt.mjs +1 -1
- package/build/crypto/jose/jwt/Jwt.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.js +1 -1
- package/build/crypto/webcrypto/CredoSubtle.mjs +1 -1
- package/build/crypto/webcrypto/CredoSubtle.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts +7 -7
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts +7 -7
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.js +6 -9
- package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs +5 -6
- package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.js +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.mjs +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.js +4 -2
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs +4 -2
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.js +4 -2
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs +4 -2
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoSha1Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoSha256Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/index.js +1 -1
- package/build/crypto/webcrypto/providers/index.mjs +1 -1
- package/build/crypto/webcrypto/types.d.mts +2 -1
- package/build/crypto/webcrypto/types.d.mts.map +1 -1
- package/build/crypto/webcrypto/types.d.ts +2 -1
- package/build/crypto/webcrypto/types.d.ts.map +1 -1
- package/build/crypto/webcrypto/types.mjs.map +1 -1
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.js +4 -4
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs +4 -4
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs.map +1 -1
- package/build/error/index.js +2 -2
- package/build/error/index.mjs +2 -2
- package/build/index.d.mts +161 -157
- package/build/index.d.mts.map +1 -1
- package/build/index.d.ts +161 -157
- package/build/index.d.ts.map +1 -1
- package/build/index.js +67 -62
- package/build/index.mjs +66 -62
- package/build/index.mjs.map +1 -1
- package/build/logger/BaseLogger.mjs.map +1 -1
- package/build/logger/ConsoleLogger.mjs.map +1 -1
- package/build/logger/Logger.mjs.map +1 -1
- package/build/modules/cache/CacheModule.mjs.map +1 -1
- package/build/modules/cache/CachedStorageService.mjs.map +1 -1
- package/build/modules/cache/InMemoryLruCache.d.mts.map +1 -1
- package/build/modules/cache/InMemoryLruCache.d.ts.map +1 -1
- package/build/modules/cache/InMemoryLruCache.js +1 -1
- package/build/modules/cache/InMemoryLruCache.mjs +1 -1
- package/build/modules/cache/InMemoryLruCache.mjs.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.mts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.ts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.mjs.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.mts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.ts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.js +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs.map +1 -1
- package/build/modules/dcql/DcqlModule.d.mts.map +1 -1
- package/build/modules/dcql/DcqlModule.d.ts.map +1 -1
- package/build/modules/dcql/DcqlModule.mjs.map +1 -1
- package/build/modules/dcql/DcqlService.d.mts.map +1 -1
- package/build/modules/dcql/DcqlService.d.ts.map +1 -1
- package/build/modules/dcql/DcqlService.js +2 -2
- package/build/modules/dcql/DcqlService.mjs +2 -2
- package/build/modules/dcql/DcqlService.mjs.map +1 -1
- package/build/modules/dcql/models/DcqlCredentialsForRequest.d.mts +3 -3
- package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +3 -3
- package/build/modules/dcql/models/index.d.mts +2 -2
- package/build/modules/dcql/models/index.d.mts.map +1 -1
- package/build/modules/dcql/models/index.d.ts +2 -2
- package/build/modules/dcql/models/index.d.ts.map +1 -1
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.mts +2 -2
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +2 -2
- package/build/modules/dids/DidsApi.d.mts +2 -2
- package/build/modules/dids/DidsApi.d.mts.map +1 -1
- package/build/modules/dids/DidsApi.d.ts +2 -2
- package/build/modules/dids/DidsApi.d.ts.map +1 -1
- package/build/modules/dids/DidsApi.js +1 -1
- package/build/modules/dids/DidsApi.mjs +1 -1
- package/build/modules/dids/DidsApi.mjs.map +1 -1
- package/build/modules/dids/DidsModule.d.mts.map +1 -1
- package/build/modules/dids/DidsModule.d.ts.map +1 -1
- package/build/modules/dids/DidsModule.mjs.map +1 -1
- package/build/modules/dids/DidsModuleConfig.js +2 -2
- package/build/modules/dids/DidsModuleConfig.mjs +2 -2
- package/build/modules/dids/domain/DidDocument.d.mts +1 -1
- package/build/modules/dids/domain/DidDocument.d.mts.map +1 -1
- package/build/modules/dids/domain/DidDocument.d.ts +1 -1
- package/build/modules/dids/domain/DidDocument.d.ts.map +1 -1
- package/build/modules/dids/domain/DidDocument.js +6 -6
- package/build/modules/dids/domain/DidDocument.mjs +6 -6
- package/build/modules/dids/domain/DidDocument.mjs.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.d.mts.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.d.ts.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.mjs.map +1 -1
- package/build/modules/dids/domain/index.js +11 -11
- package/build/modules/dids/domain/index.mjs +11 -11
- package/build/modules/dids/domain/key-type/ed25519.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidJsonWebKey.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.mts +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.mts.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.ts +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.ts.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.js +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.mjs +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/x25519.js +1 -1
- package/build/modules/dids/domain/key-type/x25519.mjs +1 -1
- package/build/modules/dids/domain/key-type/x25519.mjs.map +1 -1
- package/build/modules/dids/domain/keyDidDocument.js +1 -1
- package/build/modules/dids/domain/keyDidDocument.mjs +1 -1
- package/build/modules/dids/domain/keyDidDocument.mjs.map +1 -1
- package/build/modules/dids/domain/parse.d.mts.map +1 -1
- package/build/modules/dids/domain/parse.d.ts.map +1 -1
- package/build/modules/dids/domain/parse.mjs.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.mts +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.mts.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.ts +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.ts.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.mjs.map +1 -1
- package/build/modules/dids/domain/service/DidDocumentService.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/index.js +3 -3
- package/build/modules/dids/domain/verificationMethod/index.mjs +3 -3
- package/build/modules/dids/findMatchingEd25519Key.d.mts +1 -1
- package/build/modules/dids/findMatchingEd25519Key.d.ts +1 -1
- package/build/modules/dids/findMatchingEd25519Key.js +1 -1
- package/build/modules/dids/findMatchingEd25519Key.mjs +1 -1
- package/build/modules/dids/findMatchingEd25519Key.mjs.map +1 -1
- package/build/modules/dids/helpers.mjs.map +1 -1
- package/build/modules/dids/index.js +15 -15
- package/build/modules/dids/index.mjs +15 -15
- package/build/modules/dids/methods/index.js +5 -5
- package/build/modules/dids/methods/index.mjs +5 -5
- package/build/modules/dids/methods/jwk/DidJwk.d.mts +1 -1
- package/build/modules/dids/methods/jwk/DidJwk.d.ts +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.js +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.js +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs.map +1 -1
- package/build/modules/dids/methods/key/DidKey.d.mts +1 -1
- package/build/modules/dids/methods/key/DidKey.d.ts +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.js +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.mjs +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.mjs.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.js +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs.map +1 -1
- package/build/modules/dids/methods/peer/index.js +1 -1
- package/build/modules/dids/methods/peer/index.mjs +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo0.mjs.map +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo1.js +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo1.mjs +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.js +2 -2
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs +2 -2
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs.map +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.js +7 -8
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs +4 -4
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.d.mts.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.d.ts.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.mjs.map +1 -1
- package/build/modules/dids/repository/DidRecord.d.mts.map +1 -1
- package/build/modules/dids/repository/DidRecord.d.ts.map +1 -1
- package/build/modules/dids/repository/DidRecord.js +1 -1
- package/build/modules/dids/repository/DidRecord.mjs +1 -1
- package/build/modules/dids/repository/DidRecord.mjs.map +1 -1
- package/build/modules/dids/repository/DidRepository.d.mts +3 -3
- package/build/modules/dids/repository/DidRepository.d.mts.map +1 -1
- package/build/modules/dids/repository/DidRepository.d.ts +3 -3
- package/build/modules/dids/repository/DidRepository.d.ts.map +1 -1
- package/build/modules/dids/repository/DidRepository.js +1 -1
- package/build/modules/dids/repository/DidRepository.mjs +1 -1
- package/build/modules/dids/repository/DidRepository.mjs.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.d.mts.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.d.ts.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.mjs.map +1 -1
- package/build/modules/dids/services/DidResolverService.d.mts.map +1 -1
- package/build/modules/dids/services/DidResolverService.d.ts.map +1 -1
- package/build/modules/dids/services/DidResolverService.js +1 -1
- package/build/modules/dids/services/DidResolverService.mjs +1 -1
- package/build/modules/dids/services/DidResolverService.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts +5 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts +5 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.js +9 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs +9 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.mts +3 -3
- package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.ts +3 -3
- package/build/modules/dif-presentation-exchange/models/index.d.mts +4 -4
- package/build/modules/dif-presentation-exchange/models/index.d.ts +4 -4
- package/build/modules/dif-presentation-exchange/utils/credentialSelection.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/index.js +1 -1
- package/build/modules/dif-presentation-exchange/utils/index.mjs +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts +5 -5
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts +5 -5
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.js +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationsToCreate.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/transform.mjs.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.mts +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.mts.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.ts +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.ts.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.mjs.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.d.mts.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.d.ts.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.mjs.map +1 -1
- package/build/modules/kms/KeyManagementApi.d.mts +7 -7
- package/build/modules/kms/KeyManagementApi.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementApi.d.ts +7 -7
- package/build/modules/kms/KeyManagementApi.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementApi.js +7 -7
- package/build/modules/kms/KeyManagementApi.mjs +7 -7
- package/build/modules/kms/KeyManagementApi.mjs.map +1 -1
- package/build/modules/kms/KeyManagementModule.d.mts +2 -2
- package/build/modules/kms/KeyManagementModule.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementModule.d.ts +2 -2
- package/build/modules/kms/KeyManagementModule.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementModule.mjs.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.mts +0 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.ts +0 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.js +0 -6
- package/build/modules/kms/KeyManagementModuleConfig.mjs +0 -6
- package/build/modules/kms/KeyManagementModuleConfig.mjs.map +1 -1
- package/build/modules/kms/KeyManagementService.d.mts +6 -6
- package/build/modules/kms/KeyManagementService.d.ts +6 -6
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.mts +1 -1
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.ts +1 -1
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.js +5 -2
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs +5 -2
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs.map +1 -1
- package/build/modules/kms/index.d.mts +25 -25
- package/build/modules/kms/index.d.ts +25 -25
- package/build/modules/kms/index.js +10 -10
- package/build/modules/kms/index.mjs +10 -10
- package/build/modules/kms/index.mjs.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.d.mts +3 -4
- package/build/modules/kms/jwk/PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.d.ts +3 -4
- package/build/modules/kms/jwk/PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.js +2 -5
- package/build/modules/kms/jwk/PublicJwk.mjs +2 -5
- package/build/modules/kms/jwk/PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.mts +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.ts +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/index.js +1 -1
- package/build/modules/kms/jwk/alg/index.mjs +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.mts +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.ts +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/signing.d.mts +1 -1
- package/build/modules/kms/jwk/alg/signing.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/signing.d.ts +1 -1
- package/build/modules/kms/jwk/alg/signing.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/signing.mjs.map +1 -1
- package/build/modules/kms/jwk/assertSupported.d.mts +2 -2
- package/build/modules/kms/jwk/assertSupported.d.ts +2 -2
- package/build/modules/kms/jwk/humanDescription.d.mts.map +1 -1
- package/build/modules/kms/jwk/humanDescription.d.ts.map +1 -1
- package/build/modules/kms/jwk/humanDescription.mjs.map +1 -1
- package/build/modules/kms/jwk/index.js +8 -8
- package/build/modules/kms/jwk/index.mjs +8 -8
- package/build/modules/kms/jwk/jwkThumbprint.js +2 -2
- package/build/modules/kms/jwk/jwkThumbprint.mjs +2 -2
- package/build/modules/kms/jwk/jwkThumbprint.mjs.map +1 -1
- package/build/modules/kms/jwk/keyOps.d.mts.map +1 -1
- package/build/modules/kms/jwk/keyOps.d.ts.map +1 -1
- package/build/modules/kms/jwk/keyOps.js +1 -1
- package/build/modules/kms/jwk/keyOps.mjs +1 -1
- package/build/modules/kms/jwk/keyOps.mjs.map +1 -1
- package/build/modules/kms/jwk/knownJwk.d.mts +1 -1
- package/build/modules/kms/jwk/knownJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/knownJwk.d.ts +1 -1
- package/build/modules/kms/jwk/knownJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/knownJwk.js +1 -1
- package/build/modules/kms/jwk/knownJwk.mjs +1 -1
- package/build/modules/kms/jwk/knownJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/PublicJwk.d.mts +3 -2
- package/build/modules/kms/jwk/kty/PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/PublicJwk.d.ts +3 -2
- package/build/modules/kms/jwk/kty/PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecPublicKey.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts +3 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts +3 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.js +2 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.mjs +2 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/index.js +1 -1
- package/build/modules/kms/jwk/kty/index.mjs +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts +6 -5
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts +6 -5
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts +6 -5
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts +6 -5
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/okp/okpPublicKey.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts +8 -7
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts +8 -7
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/rsaPublicKey.mjs.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.mts +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.ts +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.d.mts +169 -168
- package/build/modules/kms/options/KmsDecryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.d.ts +169 -168
- package/build/modules/kms/options/KmsDecryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.js +13 -12
- package/build/modules/kms/options/KmsDecryptOptions.mjs +13 -12
- package/build/modules/kms/options/KmsDecryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.d.mts +123 -122
- package/build/modules/kms/options/KmsEncryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.d.ts +123 -122
- package/build/modules/kms/options/KmsEncryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.js +13 -12
- package/build/modules/kms/options/KmsEncryptOptions.mjs +13 -12
- package/build/modules/kms/options/KmsEncryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts +49 -48
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts +49 -48
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.js +3 -2
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs +3 -2
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts +25 -24
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts +25 -24
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.js +5 -4
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs +5 -4
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsOperation.d.mts +3 -3
- package/build/modules/kms/options/KmsOperation.d.ts +3 -3
- package/build/modules/kms/options/KmsOperation.mjs.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.d.mts +5 -4
- package/build/modules/kms/options/KmsSignOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.d.ts +5 -4
- package/build/modules/kms/options/KmsSignOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.js +2 -1
- package/build/modules/kms/options/KmsSignOptions.mjs +2 -1
- package/build/modules/kms/options/KmsSignOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.d.mts +7 -6
- package/build/modules/kms/options/KmsVerifyOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.d.ts +7 -6
- package/build/modules/kms/options/KmsVerifyOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.js +3 -2
- package/build/modules/kms/options/KmsVerifyOptions.mjs +3 -2
- package/build/modules/kms/options/KmsVerifyOptions.mjs.map +1 -1
- package/build/modules/mdoc/Mdoc.d.mts +1 -3
- package/build/modules/mdoc/Mdoc.d.mts.map +1 -1
- package/build/modules/mdoc/Mdoc.d.ts +1 -3
- package/build/modules/mdoc/Mdoc.d.ts.map +1 -1
- package/build/modules/mdoc/Mdoc.js +1 -7
- package/build/modules/mdoc/Mdoc.mjs +1 -7
- package/build/modules/mdoc/Mdoc.mjs.map +1 -1
- package/build/modules/mdoc/MdocApi.d.mts +1 -1
- package/build/modules/mdoc/MdocApi.d.mts.map +1 -1
- package/build/modules/mdoc/MdocApi.d.ts +1 -1
- package/build/modules/mdoc/MdocApi.d.ts.map +1 -1
- package/build/modules/mdoc/MdocApi.mjs.map +1 -1
- package/build/modules/mdoc/MdocContext.js +9 -11
- package/build/modules/mdoc/MdocContext.mjs +6 -7
- package/build/modules/mdoc/MdocContext.mjs.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.mts +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.mts.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.ts.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.mjs.map +1 -1
- package/build/modules/mdoc/MdocModule.d.mts.map +1 -1
- package/build/modules/mdoc/MdocModule.d.ts.map +1 -1
- package/build/modules/mdoc/MdocModule.mjs.map +1 -1
- package/build/modules/mdoc/MdocOptions.d.mts +4 -3
- package/build/modules/mdoc/MdocOptions.d.mts.map +1 -1
- package/build/modules/mdoc/MdocOptions.d.ts +4 -3
- package/build/modules/mdoc/MdocOptions.d.ts.map +1 -1
- package/build/modules/mdoc/MdocService.d.mts +1 -1
- package/build/modules/mdoc/MdocService.d.mts.map +1 -1
- package/build/modules/mdoc/MdocService.d.ts +1 -2
- package/build/modules/mdoc/MdocService.d.ts.map +1 -1
- package/build/modules/mdoc/MdocService.mjs.map +1 -1
- package/build/modules/mdoc/index.d.mts +3 -3
- package/build/modules/mdoc/index.d.ts +3 -3
- package/build/modules/mdoc/repository/MdocRecord.d.mts +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.mts.map +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.ts +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.ts.map +1 -1
- package/build/modules/mdoc/repository/MdocRecord.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts +2 -4
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +2 -4
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts +5 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts +5 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts +4 -5
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +4 -5
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.js +40 -48
- package/build/modules/sd-jwt-vc/SdJwtVcService.mjs +41 -49
- package/build/modules/sd-jwt-vc/SdJwtVcService.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/decodeSdJwtVc.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/disclosureFrame.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/index.js +1 -1
- package/build/modules/sd-jwt-vc/index.mjs +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.mts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.ts +1 -1
- package/build/modules/sd-jwt-vc/utils.js +1 -1
- package/build/modules/sd-jwt-vc/utils.mjs +1 -1
- package/build/modules/sd-jwt-vc/utils.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialService.d.mts +2 -2
- package/build/modules/vc/W3cCredentialService.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialService.d.ts +2 -2
- package/build/modules/vc/W3cCredentialService.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialService.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialServiceOptions.d.mts +2 -2
- package/build/modules/vc/W3cCredentialServiceOptions.d.ts +2 -2
- package/build/modules/vc/W3cCredentialsApi.d.mts +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.ts +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialsApi.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialService.d.mts +3 -3
- package/build/modules/vc/W3cV2CredentialService.d.ts +3 -3
- package/build/modules/vc/W3cV2CredentialService.js +1 -1
- package/build/modules/vc/W3cV2CredentialService.mjs +1 -1
- package/build/modules/vc/W3cV2CredentialService.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts +3 -3
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts.map +1 -1
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts +3 -3
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.mts +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.mts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.ts +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.ts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialsModule.mjs.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts +2 -2
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts +2 -2
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.js +6 -6
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs +6 -6
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs.map +1 -1
- package/build/modules/vc/data-integrity/deriveProof.d.mts +1 -1
- package/build/modules/vc/data-integrity/deriveProof.d.ts +1 -1
- package/build/modules/vc/data-integrity/deriveProof.js +1 -1
- package/build/modules/vc/data-integrity/deriveProof.mjs +1 -1
- package/build/modules/vc/data-integrity/deriveProof.mjs.map +1 -1
- package/build/modules/vc/data-integrity/index.js +8 -8
- package/build/modules/vc/data-integrity/index.mjs +8 -8
- package/build/modules/vc/data-integrity/jsonldUtil.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.js +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.mjs +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.js +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/index.js +1 -1
- package/build/modules/vc/data-integrity/libraries/index.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.js +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts +5 -4
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts +5 -4
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/LdKeyPair.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/ProofTransformer.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.js +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.js +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/index.js +2 -2
- package/build/modules/vc/data-integrity/models/index.mjs +2 -2
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.mts +1 -1
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.ts +1 -1
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.mjs.map +1 -1
- package/build/modules/vc/index.js +14 -14
- package/build/modules/vc/index.mjs +14 -14
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts +2 -2
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts +2 -2
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.js +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.mts +2 -2
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts +2 -2
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.js +4 -4
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs +4 -4
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.mts +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.ts +1 -1
- package/build/modules/vc/jwt-vc/credentialTransformer.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/index.js +1 -1
- package/build/modules/vc/jwt-vc/index.mjs +1 -1
- package/build/modules/vc/jwt-vc/presentationTransformer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.d.mts +3 -3
- package/build/modules/vc/models/credential/W3cCredential.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.d.ts +3 -3
- package/build/modules/vc/models/credential/W3cCredential.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.js +1 -1
- package/build/modules/vc/models/credential/W3cCredential.mjs +1 -1
- package/build/modules/vc/models/credential/W3cCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.d.mts +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.d.ts +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.js +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.mjs +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.js +2 -2
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs +2 -2
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.mts +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.ts +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Evidence.js +2 -2
- package/build/modules/vc/models/credential/W3cV2Evidence.mjs +2 -2
- package/build/modules/vc/models/credential/W3cV2Evidence.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Issuer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2LocalizedValue.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/index.js +1 -1
- package/build/modules/vc/models/credential/index.mjs +1 -1
- package/build/modules/vc/models/index.js +1 -1
- package/build/modules/vc/models/index.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.d.mts.map +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.d.ts.map +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cJsonPresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cJsonPresentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.d.mts +2 -2
- package/build/modules/vc/models/presentation/W3cPresentation.d.mts.map +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.d.ts +2 -2
- package/build/modules/vc/models/presentation/W3cPresentation.d.ts.map +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.mts +2 -2
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.ts +2 -2
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.js +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2Holder.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.js +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.ts +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.d.mts.map +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.d.ts.map +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.mjs.map +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.js +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.mjs +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts +2 -2
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts +2 -2
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.mts +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.ts +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.js +3 -3
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs +3 -3
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/v2-jwt-utils.js +2 -2
- package/build/modules/vc/v2-jwt-utils.mjs +2 -2
- package/build/modules/vc/v2-jwt-utils.mjs.map +1 -1
- package/build/modules/vc/validators.mjs.map +1 -1
- package/build/modules/x509/X509Api.d.mts +1 -1
- package/build/modules/x509/X509Api.d.ts +1 -1
- package/build/modules/x509/X509Api.js +1 -1
- package/build/modules/x509/X509Api.mjs +1 -1
- package/build/modules/x509/X509Certificate.d.mts +5 -5
- package/build/modules/x509/X509Certificate.d.mts.map +1 -1
- package/build/modules/x509/X509Certificate.d.ts +5 -5
- package/build/modules/x509/X509Certificate.d.ts.map +1 -1
- package/build/modules/x509/X509Certificate.js +4 -7
- package/build/modules/x509/X509Certificate.mjs +3 -6
- package/build/modules/x509/X509Certificate.mjs.map +1 -1
- package/build/modules/x509/X509Module.d.mts.map +1 -1
- package/build/modules/x509/X509Module.d.ts.map +1 -1
- package/build/modules/x509/X509Module.js +1 -1
- package/build/modules/x509/X509Module.mjs +1 -1
- package/build/modules/x509/X509Module.mjs.map +1 -1
- package/build/modules/x509/X509ModuleConfig.d.mts +2 -2
- package/build/modules/x509/X509ModuleConfig.d.ts +2 -2
- package/build/modules/x509/X509Service.d.mts +1 -1
- package/build/modules/x509/X509Service.d.mts.map +1 -1
- package/build/modules/x509/X509Service.d.ts +1 -1
- package/build/modules/x509/X509Service.d.ts.map +1 -1
- package/build/modules/x509/X509Service.js +4 -4
- package/build/modules/x509/X509Service.mjs +3 -3
- package/build/modules/x509/X509Service.mjs.map +1 -1
- package/build/modules/x509/extraction.d.mts +1 -1
- package/build/modules/x509/extraction.d.ts +1 -1
- package/build/modules/x509/index.js +3 -3
- package/build/modules/x509/index.mjs +3 -3
- package/build/modules/x509/utils/extensions.d.mts.map +1 -1
- package/build/modules/x509/utils/extensions.d.ts.map +1 -1
- package/build/modules/x509/utils/extensions.js +1 -1
- package/build/modules/x509/utils/extensions.mjs +1 -1
- package/build/modules/x509/utils/extensions.mjs.map +1 -1
- package/build/modules/x509/utils/index.js +1 -1
- package/build/modules/x509/utils/index.mjs +1 -1
- package/build/modules/x509/utils/nameConversion.d.mts.map +1 -1
- package/build/modules/x509/utils/nameConversion.d.ts.map +1 -1
- package/build/modules/x509/utils/nameConversion.mjs.map +1 -1
- package/build/plugins/DependencyManager.d.mts.map +1 -1
- package/build/plugins/DependencyManager.d.ts.map +1 -1
- package/build/plugins/DependencyManager.mjs.map +1 -1
- package/build/storage/BaseRecord.mjs.map +1 -1
- package/build/storage/Metadata.mjs.map +1 -1
- package/build/storage/Repository.d.mts.map +1 -1
- package/build/storage/Repository.d.ts.map +1 -1
- package/build/storage/Repository.js +1 -1
- package/build/storage/Repository.mjs +1 -1
- package/build/storage/Repository.mjs.map +1 -1
- package/build/storage/RepositoryEvents.mjs.map +1 -1
- package/build/storage/StorageService.d.mts +1 -1
- package/build/storage/StorageService.d.ts +1 -1
- package/build/storage/index.js +1 -1
- package/build/storage/index.mjs +1 -1
- package/build/storage/migration/StorageUpdateService.d.mts.map +1 -1
- package/build/storage/migration/StorageUpdateService.d.ts.map +1 -1
- package/build/storage/migration/StorageUpdateService.js +1 -1
- package/build/storage/migration/StorageUpdateService.mjs +1 -1
- package/build/storage/migration/StorageUpdateService.mjs.map +1 -1
- package/build/storage/migration/UpdateAssistant.d.mts +1 -1
- package/build/storage/migration/UpdateAssistant.d.mts.map +1 -1
- package/build/storage/migration/UpdateAssistant.d.ts +1 -1
- package/build/storage/migration/UpdateAssistant.d.ts.map +1 -1
- package/build/storage/migration/UpdateAssistant.js +1 -1
- package/build/storage/migration/UpdateAssistant.mjs +1 -1
- package/build/storage/migration/UpdateAssistant.mjs.map +1 -1
- package/build/storage/migration/index.js +1 -1
- package/build/storage/migration/index.mjs +1 -1
- package/build/storage/migration/isUpToDate.d.mts.map +1 -1
- package/build/storage/migration/isUpToDate.d.ts.map +1 -1
- package/build/storage/migration/isUpToDate.js +1 -1
- package/build/storage/migration/isUpToDate.mjs +1 -1
- package/build/storage/migration/isUpToDate.mjs.map +1 -1
- package/build/storage/migration/updates/0.3.1-0.4/cache.mjs.map +1 -1
- package/build/storage/migration/updates/0.4-0.5/w3cCredentialRecord.mjs.map +1 -1
- package/build/storage/migration/updates.d.mts +1 -1
- package/build/storage/migration/updates.d.mts.map +1 -1
- package/build/storage/migration/updates.d.ts +1 -1
- package/build/storage/migration/updates.d.ts.map +1 -1
- package/build/storage/migration/updates.js +4 -4
- package/build/storage/migration/updates.mjs +1 -1
- package/build/storage/migration/updates.mjs.map +1 -1
- package/build/types.d.mts +12 -1
- package/build/types.d.mts.map +1 -1
- package/build/types.d.ts +12 -1
- package/build/types.d.ts.map +1 -1
- package/build/types.mjs.map +1 -1
- package/build/utils/HashlinkEncoder.d.mts +1 -1
- package/build/utils/HashlinkEncoder.d.mts.map +1 -1
- package/build/utils/HashlinkEncoder.d.ts +1 -1
- package/build/utils/HashlinkEncoder.d.ts.map +1 -1
- package/build/utils/HashlinkEncoder.mjs.map +1 -1
- package/build/utils/JsonEncoder.d.mts +3 -2
- package/build/utils/JsonEncoder.d.mts.map +1 -1
- package/build/utils/JsonEncoder.d.ts +3 -2
- package/build/utils/JsonEncoder.d.ts.map +1 -1
- package/build/utils/JsonEncoder.js +8 -8
- package/build/utils/JsonEncoder.mjs +4 -3
- package/build/utils/JsonEncoder.mjs.map +1 -1
- package/build/utils/JsonTransformer.mjs.map +1 -1
- package/build/utils/MessageValidator.mjs.map +1 -1
- package/build/utils/MultiBaseEncoder.d.mts +4 -2
- package/build/utils/MultiBaseEncoder.d.mts.map +1 -1
- package/build/utils/MultiBaseEncoder.d.ts +4 -2
- package/build/utils/MultiBaseEncoder.d.ts.map +1 -1
- package/build/utils/MultiBaseEncoder.mjs.map +1 -1
- package/build/utils/MultiHashEncoder.d.mts +5 -5
- package/build/utils/MultiHashEncoder.d.mts.map +1 -1
- package/build/utils/MultiHashEncoder.d.ts +5 -5
- package/build/utils/MultiHashEncoder.d.ts.map +1 -1
- package/build/utils/MultiHashEncoder.js +5 -7
- package/build/utils/MultiHashEncoder.mjs +5 -4
- package/build/utils/MultiHashEncoder.mjs.map +1 -1
- package/build/utils/TypedArrayEncoder.d.mts +12 -9
- package/build/utils/TypedArrayEncoder.d.mts.map +1 -1
- package/build/utils/TypedArrayEncoder.d.ts +12 -9
- package/build/utils/TypedArrayEncoder.d.ts.map +1 -1
- package/build/utils/TypedArrayEncoder.js +22 -17
- package/build/utils/TypedArrayEncoder.mjs +7 -1
- package/build/utils/TypedArrayEncoder.mjs.map +1 -1
- package/build/utils/VarintEncoder.js +1 -4
- package/build/utils/VarintEncoder.mjs +1 -2
- package/build/utils/VarintEncoder.mjs.map +1 -1
- package/build/utils/base58.mjs.map +1 -1
- package/build/utils/buffer.d.mts +1 -1
- package/build/utils/buffer.d.ts +1 -1
- package/build/utils/buffer.mjs +1 -1
- package/build/utils/deepEquality.mjs.map +1 -1
- package/build/utils/index.js +10 -11
- package/build/utils/index.mjs +9 -9
- package/build/utils/objectEquality.mjs.map +1 -1
- package/build/utils/timestamp.d.mts +10 -2
- package/build/utils/timestamp.d.mts.map +1 -1
- package/build/utils/timestamp.d.ts +10 -2
- package/build/utils/timestamp.d.ts.map +1 -1
- package/build/utils/timestamp.js +9 -1
- package/build/utils/timestamp.mjs +8 -2
- package/build/utils/timestamp.mjs.map +1 -1
- package/build/utils/transformers.d.mts.map +1 -1
- package/build/utils/transformers.d.ts.map +1 -1
- package/build/utils/transformers.mjs.map +1 -1
- package/build/utils/validators.d.mts.map +1 -1
- package/build/utils/validators.d.ts.map +1 -1
- package/build/utils/validators.mjs.map +1 -1
- package/build/utils/zod.js +2 -0
- package/build/utils/zod.mjs +2 -1
- package/build/utils/zod.mjs.map +1 -1
- package/package.json +25 -25
- package/build/utils/buffer.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cJwtVerifiablePresentation.d.ts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"W3cJwtVerifiablePresentation.d.ts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAOiB,mCAAA;OACV;;cAGM,4BAAA;gBACU;;EALN,WAAA,CAAA,OAAA,EAQa,mCAPpB;EAGG,OAAA,iBAAA,CAAA,aAA4B,EAAA,MAAA,CAAA,EAUc,4BAVd;EAAA;;;;;;;;MA8DR,YAAA,CAAA,CAAA,EAhCJ,eAgCI;MAAA,aAAA,CAAA,CAAA,EAAA,MAAA;MAWL,OAAA,CAAA,CAAA,EAAY,CAAA,MAAA,GA3CI,UA2CJ,CAAA,EAAA;EAAK,IAAA,EAAA,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;yBA3BzB,SAAA;8BAgBa,cAJd,0BAAA,GAIc;;;;;qBAWL,WAAA,CAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cJwtVerifiablePresentation.mjs","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"W3cJwtVerifiablePresentation.mjs","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":["import { Jwt } from '../../../crypto/jose/jwt/Jwt'\nimport { CredoError } from '../../../error'\nimport type { W3cPresentation } from '../models'\nimport { ClaimFormat } from '../models'\n\nimport { getPresentationFromJwtPayload } from './presentationTransformer'\n\nexport interface W3cJwtVerifiablePresentationOptions {\n jwt: Jwt\n}\n\nexport class W3cJwtVerifiablePresentation {\n public readonly jwt: Jwt\n private _presentation: W3cPresentation\n\n public constructor(options: W3cJwtVerifiablePresentationOptions) {\n this.jwt = options.jwt\n\n this._presentation = getPresentationFromJwtPayload(this.jwt.payload)\n }\n\n public static fromSerializedJwt(serializedJwt: string) {\n const jwt = Jwt.fromSerializedJwt(serializedJwt)\n\n if (!jwt.payload.additionalClaims.nonce) {\n throw new CredoError(`JWT payload does not contain required claim 'nonce'`)\n }\n\n return new W3cJwtVerifiablePresentation({\n jwt,\n })\n }\n\n /**\n * Get the W3cPresentation from the JWT payload. This does not include the JWT wrapper,\n * and thus is not suitable for sharing. If you need a JWT, use the `serializedJwt` property.\n *\n * All properties and getters from the `W3cPresentation` interface are implemented as getters\n * on the `W3cJwtVerifiablePresentation` class itself, so you can also use this directly\n * instead of accessing the inner `presentation` property.\n */\n public get presentation(): W3cPresentation {\n return this._presentation\n }\n\n public get serializedJwt(): string {\n return this.jwt.serializedJwt\n }\n\n //\n // Below all properties from the `W3cPresentation` interface are implemented as getters\n // this is to make the interface compatible with the W3cJsonLdVerifiablePresentation interface\n // which makes using the different classes interchangeably from a user point of view.\n // This is 'easier' than extending the W3cPresentation class as it means we have to create the\n // instance based on JSON, but also add custom properties.\n //\n\n public get context() {\n return this.presentation.context\n }\n\n public get id() {\n return this.presentation.id\n }\n\n public get type() {\n return this.presentation.type\n }\n\n public get holder() {\n return this.presentation.holder\n }\n\n public get verifiableCredential() {\n return this.presentation.verifiableCredential\n }\n\n public get holderId() {\n return this.presentation.holderId\n }\n\n /**\n * The {@link ClaimFormat} of the presentation. For JWT presentations this is always `jwt_vp`.\n */\n public get claimFormat(): ClaimFormat.JwtVp {\n return ClaimFormat.JwtVp\n }\n\n /**\n * Get the encoded variant of the W3C Verifiable Presentation. For JWT presentations this is\n * a JWT string.\n */\n public get encoded() {\n return this.serializedJwt\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAa,+BAAb,MAAa,6BAA6B;CAIxC,AAAO,YAAY,SAA8C;AAC/D,OAAK,MAAM,QAAQ;AAEnB,OAAK,gBAAgB,8BAA8B,KAAK,IAAI,QAAQ;;CAGtE,OAAc,kBAAkB,eAAuB;EACrD,MAAM,MAAM,IAAI,kBAAkB,cAAc;AAEhD,MAAI,CAAC,IAAI,QAAQ,iBAAiB,MAChC,OAAM,IAAI,WAAW,sDAAsD;AAG7E,SAAO,IAAI,6BAA6B,EACtC,KACD,CAAC;;;;;;;;;;CAWJ,IAAW,eAAgC;AACzC,SAAO,KAAK;;CAGd,IAAW,gBAAwB;AACjC,SAAO,KAAK,IAAI;;CAWlB,IAAW,UAAU;AACnB,SAAO,KAAK,aAAa;;CAG3B,IAAW,KAAK;AACd,SAAO,KAAK,aAAa;;CAG3B,IAAW,OAAO;AAChB,SAAO,KAAK,aAAa;;CAG3B,IAAW,SAAS;AAClB,SAAO,KAAK,aAAa;;CAG3B,IAAW,uBAAuB;AAChC,SAAO,KAAK,aAAa;;CAG3B,IAAW,WAAW;AACpB,SAAO,KAAK,aAAa;;;;;CAM3B,IAAW,cAAiC;AAC1C,SAAO,YAAY;;;;;;CAOrB,IAAW,UAAU;AACnB,SAAO,KAAK"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { W3cV2JwtVerifiableCredential } from "./W3cV2JwtVerifiableCredential.mjs";
|
|
2
|
-
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs";
|
|
3
2
|
import { W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions } from "../W3cV2CredentialServiceOptions.mjs";
|
|
4
3
|
import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "../models/W3cV2VerifyResult.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs";
|
|
6
5
|
import { JwsService } from "../../../crypto/JwsService.mjs";
|
|
6
|
+
import { AgentContext } from "../../../agent/context/AgentContext.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { W3cV2JwtVerifiableCredential } from "./W3cV2JwtVerifiableCredential.js";
|
|
2
|
-
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.js";
|
|
3
2
|
import { W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions } from "../W3cV2CredentialServiceOptions.js";
|
|
4
3
|
import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "../models/W3cV2VerifyResult.js";
|
|
5
|
-
import {
|
|
4
|
+
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.js";
|
|
6
5
|
import { JwsService } from "../../../crypto/JwsService.js";
|
|
6
|
+
import { AgentContext } from "../../../agent/context/AgentContext.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts
|
|
9
9
|
|
|
@@ -6,9 +6,9 @@ require('../../../error/index.js');
|
|
|
6
6
|
require('../../../plugins/index.js');
|
|
7
7
|
const require_decorateMetadata = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
8
8
|
const require_decorate = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
9
|
+
const require_array = require('../../../utils/array.js');
|
|
9
10
|
const require_MessageValidator = require('../../../utils/MessageValidator.js');
|
|
10
11
|
const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
|
|
11
|
-
const require_array = require('../../../utils/array.js');
|
|
12
12
|
const require_timestamp = require('../../../utils/timestamp.js');
|
|
13
13
|
require('../../../utils/index.js');
|
|
14
14
|
const require_JwtPayload = require('../../../crypto/jose/jwt/JwtPayload.js');
|
|
@@ -16,9 +16,9 @@ const require_JwsService = require('../../../crypto/JwsService.js');
|
|
|
16
16
|
const require_keyDidMapping = require('../../dids/domain/key-type/keyDidMapping.js');
|
|
17
17
|
const require_W3cV2JwtVerifiableCredential = require('./W3cV2JwtVerifiableCredential.js');
|
|
18
18
|
require('../../../crypto/index.js');
|
|
19
|
-
const require_W3cV2JwtVerifiablePresentation = require('./W3cV2JwtVerifiablePresentation.js');
|
|
20
19
|
const require_utils = require('../../sd-jwt-vc/utils.js');
|
|
21
20
|
const require_v2_jwt_utils = require('../v2-jwt-utils.js');
|
|
21
|
+
const require_W3cV2JwtVerifiablePresentation = require('./W3cV2JwtVerifiablePresentation.js');
|
|
22
22
|
let tsyringe = require("tsyringe");
|
|
23
23
|
tsyringe = require_rolldown_runtime.__toESM(tsyringe);
|
|
24
24
|
|
|
@@ -75,7 +75,7 @@ let W3cV2JwtCredentialService = class W3cV2JwtCredentialService$1 {
|
|
|
75
75
|
}
|
|
76
76
|
const issuerVerificationMethod = await require_v2_jwt_utils.getVerificationMethodForJwt(agentContext, credential, ["assertionMethod"]);
|
|
77
77
|
const issuerPublicKey = require_keyDidMapping.getPublicJwkFromVerificationMethod(issuerVerificationMethod);
|
|
78
|
-
let signatureResult
|
|
78
|
+
let signatureResult;
|
|
79
79
|
try {
|
|
80
80
|
signatureResult = await this.jwsService.verifyJws(agentContext, {
|
|
81
81
|
jws: credential.jwt.serializedJwt,
|
|
@@ -166,7 +166,7 @@ let W3cV2JwtCredentialService = class W3cV2JwtCredentialService$1 {
|
|
|
166
166
|
}
|
|
167
167
|
const proverVerificationMethod = await require_v2_jwt_utils.getVerificationMethodForJwt(agentContext, presentation, ["authentication"]);
|
|
168
168
|
const proverPublicKey = require_keyDidMapping.getPublicJwkFromVerificationMethod(proverVerificationMethod);
|
|
169
|
-
let signatureResult
|
|
169
|
+
let signatureResult;
|
|
170
170
|
try {
|
|
171
171
|
signatureResult = await this.jwsService.verifyJws(agentContext, {
|
|
172
172
|
jws: presentation.jwt.serializedJwt,
|
|
@@ -5,9 +5,9 @@ import "../../../error/index.mjs";
|
|
|
5
5
|
import { injectable } from "../../../plugins/index.mjs";
|
|
6
6
|
import { __decorateMetadata } from "../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
7
7
|
import { __decorate } from "../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
8
|
+
import { asArray } from "../../../utils/array.mjs";
|
|
8
9
|
import { MessageValidator } from "../../../utils/MessageValidator.mjs";
|
|
9
10
|
import { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
|
|
10
|
-
import { asArray } from "../../../utils/array.mjs";
|
|
11
11
|
import { nowInSeconds } from "../../../utils/timestamp.mjs";
|
|
12
12
|
import "../../../utils/index.mjs";
|
|
13
13
|
import { JwtPayload } from "../../../crypto/jose/jwt/JwtPayload.mjs";
|
|
@@ -15,9 +15,9 @@ import { JwsService } from "../../../crypto/JwsService.mjs";
|
|
|
15
15
|
import { getPublicJwkFromVerificationMethod } from "../../dids/domain/key-type/keyDidMapping.mjs";
|
|
16
16
|
import { W3cV2JwtVerifiableCredential } from "./W3cV2JwtVerifiableCredential.mjs";
|
|
17
17
|
import "../../../crypto/index.mjs";
|
|
18
|
-
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs";
|
|
19
18
|
import { extractKeyFromHolderBinding } from "../../sd-jwt-vc/utils.mjs";
|
|
20
19
|
import { extractHolderFromPresentationCredentials, getVerificationMethodForJwt, validateAndResolveVerificationMethod } from "../v2-jwt-utils.mjs";
|
|
20
|
+
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs";
|
|
21
21
|
|
|
22
22
|
//#region src/modules/vc/jwt-vc/W3cV2JwtCredentialService.ts
|
|
23
23
|
var _ref;
|
|
@@ -72,7 +72,7 @@ let W3cV2JwtCredentialService = class W3cV2JwtCredentialService$1 {
|
|
|
72
72
|
}
|
|
73
73
|
const issuerVerificationMethod = await getVerificationMethodForJwt(agentContext, credential, ["assertionMethod"]);
|
|
74
74
|
const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod);
|
|
75
|
-
let signatureResult
|
|
75
|
+
let signatureResult;
|
|
76
76
|
try {
|
|
77
77
|
signatureResult = await this.jwsService.verifyJws(agentContext, {
|
|
78
78
|
jws: credential.jwt.serializedJwt,
|
|
@@ -163,7 +163,7 @@ let W3cV2JwtCredentialService = class W3cV2JwtCredentialService$1 {
|
|
|
163
163
|
}
|
|
164
164
|
const proverVerificationMethod = await getVerificationMethodForJwt(agentContext, presentation, ["authentication"]);
|
|
165
165
|
const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod);
|
|
166
|
-
let signatureResult
|
|
166
|
+
let signatureResult;
|
|
167
167
|
try {
|
|
168
168
|
signatureResult = await this.jwsService.verifyJws(agentContext, {
|
|
169
169
|
jws: presentation.jwt.serializedJwt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2JwtCredentialService.mjs","names":["W3cV2JwtCredentialService","validationResults: W3cV2VerifyCredentialResult","credential: W3cV2JwtVerifiableCredential","signatureResult: VerifyJwsResult | undefined","validationResults: W3cV2VerifyPresentationResult","presentation: W3cV2JwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult"],"sources":["../../../../src/modules/vc/jwt-vc/W3cV2JwtCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport { JwsService, JwtPayload } from '../../../crypto'\nimport type { VerifyJwsResult } from '../../../crypto/JwsService'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { JsonTransformer, MessageValidator, asArray, nowInSeconds } from '../../../utils'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type/keyDidMapping'\nimport { extractKeyFromHolderBinding } from '../../sd-jwt-vc/utils'\nimport type {\n W3cV2JwtSignCredentialOptions,\n W3cV2JwtSignPresentationOptions,\n W3cV2JwtVerifyCredentialOptions,\n W3cV2JwtVerifyPresentationOptions,\n} from '../W3cV2CredentialServiceOptions'\nimport type { SingleValidationResult, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from '../models'\nimport {\n extractHolderFromPresentationCredentials,\n getVerificationMethodForJwt,\n validateAndResolveVerificationMethod,\n} from '../v2-jwt-utils'\nimport { W3cV2JwtVerifiableCredential } from './W3cV2JwtVerifiableCredential'\nimport { W3cV2JwtVerifiablePresentation } from './W3cV2JwtVerifiablePresentation'\n\n/**\n * Supports signing and verifying W3C Verifiable Credentials and Presentations\n * secured with JSON Web Tokens (JWT).\n *\n * @see https://www.w3.org/TR/vc-data-model/\n * @see https://www.w3.org/TR/vc-jose-cose/#with-jose\n */\n@injectable()\nexport class W3cV2JwtCredentialService {\n private jwsService: JwsService\n\n public constructor(jwsService: JwsService) {\n this.jwsService = jwsService\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cV2JwtSignCredentialOptions\n ): Promise<W3cV2JwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // The JWT payload is simply the credential\n const jwtPayload = new JwtPayload({\n additionalClaims: JsonTransformer.toJSON(options.credential),\n })\n\n // Add iat and cnf to the payload\n jwtPayload.iat = nowInSeconds()\n jwtPayload.additionalClaims.cnf = options.holder\n ? (await extractKeyFromHolderBinding(agentContext, options.holder)).cnf\n : undefined\n\n // Validate and resolve the verification method\n const publicJwk = await validateAndResolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n // Sign the JWT\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'vc+jwt',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n return W3cV2JwtVerifiableCredential.fromCompact(jwt)\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cV2JwtVerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n const validationResults: W3cV2VerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let credential: W3cV2JwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential.\n // Otherwise, it is done by the fromCompact method below\n if (options.credential instanceof W3cV2JwtVerifiableCredential) {\n options.credential.validate()\n }\n\n credential =\n options.credential instanceof W3cV2JwtVerifiableCredential\n ? options.credential\n : W3cV2JwtVerifiableCredential.fromCompact(options.credential)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n credential.jwt.payload.validate()\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const issuerVerificationMethod = await getVerificationMethodForJwt(agentContext, credential, ['assertionMethod'])\n const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined = undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: credential.jwt.serializedJwt,\n // We have pre-fetched the key based on the issuer/signer of the credential\n jwsSigner: {\n method: 'did',\n jwk: issuerPublicKey,\n didUrl: issuerVerificationMethod.id,\n },\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.signature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature'),\n }\n } else {\n validationResults.validations.signature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.signature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the credential is signed with the 'issuer' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (credential.resolvedCredential.issuerId !== issuerVerificationMethod.controller) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError(\n `Credential is signed using verification method ${issuerVerificationMethod.id}, while the issuer of the credential is '${credential.resolvedCredential.issuerId}'`\n ),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate whether the `issuer` of the credential is also the signer\n const issuerIsSigner = signatureResult?.jwsSigners.some(\n (jwsSigner) => jwsSigner.jwk.fingerprint === issuerPublicKey.fingerprint\n )\n if (!issuerIsSigner) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError('Credential is not signed by the issuer of the credential'),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cV2JwtSignPresentationOptions\n ): Promise<W3cV2JwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // The JWT payload is simply the presentation\n const jwtPayload = new JwtPayload({\n additionalClaims: JsonTransformer.toJSON(options.presentation),\n })\n\n // Add the nonce and aud to the payload\n jwtPayload.additionalClaims.nonce = options.challenge\n jwtPayload.aud = options.domain\n\n const holder = await extractHolderFromPresentationCredentials(agentContext, options.presentation)\n\n // Sign JWT\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: holder.publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'vp+jwt',\n alg: holder.alg,\n kid: holder?.cnf?.kid,\n },\n })\n\n return W3cV2JwtVerifiablePresentation.fromCompact(jwt)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cV2JwtVerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n const validationResults: W3cV2VerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let presentation: W3cV2JwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cV2JwtVerifiablePresentation) {\n options.presentation.validate()\n }\n\n presentation =\n options.presentation instanceof W3cV2JwtVerifiablePresentation\n ? options.presentation\n : W3cV2JwtVerifiablePresentation.fromCompact(options.presentation)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n presentation.jwt.payload.validate()\n\n // Make sure challenge matches nonce\n if (options.challenge !== presentation.jwt.payload.additionalClaims.nonce) {\n throw new CredoError(`JWT payload 'nonce' does not match challenge '${options.challenge}'`)\n }\n\n const audArray = asArray(presentation.jwt.payload.aud)\n if (options.domain && !audArray.includes(options.domain)) {\n throw new CredoError(`JWT payload 'aud' does not include domain '${options.domain}'`)\n }\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const proverVerificationMethod = await getVerificationMethodForJwt(agentContext, presentation, ['authentication'])\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined = undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: presentation.jwt.serializedJwt,\n allowedJwsSignerMethods: ['did'],\n jwsSigner: {\n method: 'did',\n didUrl: proverVerificationMethod.id,\n jwk: proverPublicKey,\n },\n trustedCertificates: [],\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature on presentation'),\n }\n } else {\n validationResults.validations.presentationSignature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the presentation is signed with the 'holder' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (\n presentation.resolvedPresentation.holderId &&\n proverVerificationMethod.controller !== presentation.resolvedPresentation.holderId\n ) {\n validationResults.validations.holderIsSigner = {\n isValid: false,\n error: new CredoError(\n `Presentation is signed using verification method ${proverVerificationMethod.id}, while the holder of the presentation is '${presentation.resolvedPresentation.holderId}'`\n ),\n }\n } else {\n // If no holderId is present, this validation passes by default as there can't be\n // a mismatch between the 'holder' property and the signer of the presentation.\n validationResults.validations.holderIsSigner = {\n isValid: true,\n }\n }\n\n // To keep things simple, we only support JWT VCs in JWT VPs for now\n const credentials = asArray(presentation.resolvedPresentation.verifiableCredential)\n\n // Verify all credentials in parallel, and await the result\n validationResults.validations.credentials = await Promise.all(\n credentials.map(async (credential) => {\n if (!(credential.envelopedCredential instanceof W3cV2JwtVerifiableCredential)) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is not of format JWT. Presentations in JWT format can only contain credentials in JWT format.'\n ),\n validations: {},\n }\n }\n\n const credentialResult = await this.verifyCredential(agentContext, {\n credential: credential.envelopedCredential,\n })\n\n let credentialSubjectAuthentication: SingleValidationResult\n\n // Check whether any of the credentialSubjectIds for each credential is the same as the controller of the verificationMethod\n // This authenticates the presentation creator controls one of the credentialSubject ids.\n // NOTE: this doesn't take into account the case where the credentialSubject is no the holder. In the\n // future we can add support for other flows, but for now this is the most common use case.\n // TODO: should this be handled on a higher level? I don't really see it being handled in the jsonld lib\n // or in the did-jwt-vc lib (it seems they don't even verify the credentials itself), but we probably need some\n // more experience on the use cases before we loosen the restrictions (as it means we need to handle it on a higher layer).\n const credentialSubjectIds = credential.resolvedCredential.credentialSubjectIds\n const presentationAuthenticatesCredentialSubject = credentialSubjectIds.some(\n (subjectId) => proverVerificationMethod.controller === subjectId\n )\n\n if (credentialSubjectIds.length > 0 && !presentationAuthenticatesCredentialSubject) {\n credentialSubjectAuthentication = {\n isValid: false,\n error: new CredoError(\n 'Credential has one or more credentialSubject ids, but presentation does not authenticate credential subject'\n ),\n }\n } else {\n credentialSubjectAuthentication = {\n isValid: true,\n }\n }\n\n return {\n ...credentialResult,\n isValid: credentialResult.isValid && credentialSubjectAuthentication.isValid,\n validations: {\n ...credentialResult.validations,\n credentialSubjectAuthentication,\n },\n }\n })\n )\n\n // Deeply nested check whether all validations have passed\n validationResults.isValid = Object.values(validationResults.validations).every((v) =>\n Array.isArray(v) ? v.every((vv) => vv.isValid) : v.isValid\n )\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BO,sCAAMA,4BAA0B;CAGrC,AAAO,YAAY,YAAwB;AACzC,OAAK,aAAa;;;;;CAMpB,MAAa,eACX,cACA,SACuC;AAEvC,mBAAiB,aAAa,QAAQ,WAAW;EAGjD,MAAM,aAAa,IAAI,WAAW,EAChC,kBAAkB,gBAAgB,OAAO,QAAQ,WAAW,EAC7D,CAAC;AAGF,aAAW,MAAM,cAAc;AAC/B,aAAW,iBAAiB,MAAM,QAAQ,UACrC,MAAM,4BAA4B,cAAc,QAAQ,OAAO,EAAE,MAClE;EAGJ,MAAM,YAAY,MAAM,qCAAqC,cAAc,QAAQ,oBAAoB,CACrG,kBACD,CAA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C,QAAI,EAAE,WAAW,+BAA+B,8BAC9C,QAAO;KACL,SAAS;KACT,OAAO,IAAI,WACT,2GACD;KACD,aAAa,EAAE;KAChB;IAGH,MAAM,mBAAmB,MAAM,KAAK,iBAAiB,cAAc,EACjE,YAAY,WAAW,qBACxB,CAAC;IAEF,IAAIG;IASJ,MAAM,uBAAuB,WAAW,mBAAmB;IAC3D,MAAM,6CAA6C,qBAAqB,MACrE,cAAc,yBAAyB,eAAe,UACxD;AAED,QAAI,qBAAqB,SAAS,KAAK,CAAC,2CACtC,mCAAkC;KAChC,SAAS;KACT,OAAO,IAAI,WACT,8GACD;KACF;QAED,mCAAkC,EAChC,SAAS,MACV;AAGH,WAAO;KACL,GAAG;KACH,SAAS,iBAAiB,WAAW,gCAAgC;KACrE,aAAa;MACX,GAAG,iBAAiB;MACpB;MACD;KACF;KACD,CACH;AAGD,qBAAkB,UAAU,OAAO,OAAO,kBAAkB,YAAY,CAAC,OAAO,MAC9E,MAAM,QAAQ,EAAE,GAAG,EAAE,OAAO,OAAO,GAAG,QAAQ,GAAG,EAAE,QACpD;AAED,UAAO;WACA,OAAO;AACd,qBAAkB,QAAQ;AAC1B,UAAO;;;;wCAvXZ,YAAY"}
|
|
1
|
+
{"version":3,"file":"W3cV2JwtCredentialService.mjs","names":["W3cV2JwtCredentialService","validationResults: W3cV2VerifyCredentialResult","credential: W3cV2JwtVerifiableCredential","signatureResult: VerifyJwsResult | undefined","validationResults: W3cV2VerifyPresentationResult","presentation: W3cV2JwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult"],"sources":["../../../../src/modules/vc/jwt-vc/W3cV2JwtCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport { JwsService, JwtPayload } from '../../../crypto'\nimport type { VerifyJwsResult } from '../../../crypto/JwsService'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { asArray, JsonTransformer, MessageValidator, nowInSeconds } from '../../../utils'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type/keyDidMapping'\nimport { extractKeyFromHolderBinding } from '../../sd-jwt-vc/utils'\nimport type { SingleValidationResult, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from '../models'\nimport {\n extractHolderFromPresentationCredentials,\n getVerificationMethodForJwt,\n validateAndResolveVerificationMethod,\n} from '../v2-jwt-utils'\nimport type {\n W3cV2JwtSignCredentialOptions,\n W3cV2JwtSignPresentationOptions,\n W3cV2JwtVerifyCredentialOptions,\n W3cV2JwtVerifyPresentationOptions,\n} from '../W3cV2CredentialServiceOptions'\nimport { W3cV2JwtVerifiableCredential } from './W3cV2JwtVerifiableCredential'\nimport { W3cV2JwtVerifiablePresentation } from './W3cV2JwtVerifiablePresentation'\n\n/**\n * Supports signing and verifying W3C Verifiable Credentials and Presentations\n * secured with JSON Web Tokens (JWT).\n *\n * @see https://www.w3.org/TR/vc-data-model/\n * @see https://www.w3.org/TR/vc-jose-cose/#with-jose\n */\n@injectable()\nexport class W3cV2JwtCredentialService {\n private jwsService: JwsService\n\n public constructor(jwsService: JwsService) {\n this.jwsService = jwsService\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cV2JwtSignCredentialOptions\n ): Promise<W3cV2JwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // The JWT payload is simply the credential\n const jwtPayload = new JwtPayload({\n additionalClaims: JsonTransformer.toJSON(options.credential),\n })\n\n // Add iat and cnf to the payload\n jwtPayload.iat = nowInSeconds()\n jwtPayload.additionalClaims.cnf = options.holder\n ? (await extractKeyFromHolderBinding(agentContext, options.holder)).cnf\n : undefined\n\n // Validate and resolve the verification method\n const publicJwk = await validateAndResolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n // Sign the JWT\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'vc+jwt',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n return W3cV2JwtVerifiableCredential.fromCompact(jwt)\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cV2JwtVerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n const validationResults: W3cV2VerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let credential: W3cV2JwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential.\n // Otherwise, it is done by the fromCompact method below\n if (options.credential instanceof W3cV2JwtVerifiableCredential) {\n options.credential.validate()\n }\n\n credential =\n options.credential instanceof W3cV2JwtVerifiableCredential\n ? options.credential\n : W3cV2JwtVerifiableCredential.fromCompact(options.credential)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n credential.jwt.payload.validate()\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const issuerVerificationMethod = await getVerificationMethodForJwt(agentContext, credential, ['assertionMethod'])\n const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: credential.jwt.serializedJwt,\n // We have pre-fetched the key based on the issuer/signer of the credential\n jwsSigner: {\n method: 'did',\n jwk: issuerPublicKey,\n didUrl: issuerVerificationMethod.id,\n },\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.signature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature'),\n }\n } else {\n validationResults.validations.signature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.signature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the credential is signed with the 'issuer' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (credential.resolvedCredential.issuerId !== issuerVerificationMethod.controller) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError(\n `Credential is signed using verification method ${issuerVerificationMethod.id}, while the issuer of the credential is '${credential.resolvedCredential.issuerId}'`\n ),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate whether the `issuer` of the credential is also the signer\n const issuerIsSigner = signatureResult?.jwsSigners.some(\n (jwsSigner) => jwsSigner.jwk.fingerprint === issuerPublicKey.fingerprint\n )\n if (!issuerIsSigner) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError('Credential is not signed by the issuer of the credential'),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cV2JwtSignPresentationOptions\n ): Promise<W3cV2JwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // The JWT payload is simply the presentation\n const jwtPayload = new JwtPayload({\n additionalClaims: JsonTransformer.toJSON(options.presentation),\n })\n\n // Add the nonce and aud to the payload\n jwtPayload.additionalClaims.nonce = options.challenge\n jwtPayload.aud = options.domain\n\n const holder = await extractHolderFromPresentationCredentials(agentContext, options.presentation)\n\n // Sign JWT\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: holder.publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'vp+jwt',\n alg: holder.alg,\n kid: holder?.cnf?.kid,\n },\n })\n\n return W3cV2JwtVerifiablePresentation.fromCompact(jwt)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cV2JwtVerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n const validationResults: W3cV2VerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let presentation: W3cV2JwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cV2JwtVerifiablePresentation) {\n options.presentation.validate()\n }\n\n presentation =\n options.presentation instanceof W3cV2JwtVerifiablePresentation\n ? options.presentation\n : W3cV2JwtVerifiablePresentation.fromCompact(options.presentation)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n presentation.jwt.payload.validate()\n\n // Make sure challenge matches nonce\n if (options.challenge !== presentation.jwt.payload.additionalClaims.nonce) {\n throw new CredoError(`JWT payload 'nonce' does not match challenge '${options.challenge}'`)\n }\n\n const audArray = asArray(presentation.jwt.payload.aud)\n if (options.domain && !audArray.includes(options.domain)) {\n throw new CredoError(`JWT payload 'aud' does not include domain '${options.domain}'`)\n }\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const proverVerificationMethod = await getVerificationMethodForJwt(agentContext, presentation, ['authentication'])\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: presentation.jwt.serializedJwt,\n allowedJwsSignerMethods: ['did'],\n jwsSigner: {\n method: 'did',\n didUrl: proverVerificationMethod.id,\n jwk: proverPublicKey,\n },\n trustedCertificates: [],\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature on presentation'),\n }\n } else {\n validationResults.validations.presentationSignature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the presentation is signed with the 'holder' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (\n presentation.resolvedPresentation.holderId &&\n proverVerificationMethod.controller !== presentation.resolvedPresentation.holderId\n ) {\n validationResults.validations.holderIsSigner = {\n isValid: false,\n error: new CredoError(\n `Presentation is signed using verification method ${proverVerificationMethod.id}, while the holder of the presentation is '${presentation.resolvedPresentation.holderId}'`\n ),\n }\n } else {\n // If no holderId is present, this validation passes by default as there can't be\n // a mismatch between the 'holder' property and the signer of the presentation.\n validationResults.validations.holderIsSigner = {\n isValid: true,\n }\n }\n\n // To keep things simple, we only support JWT VCs in JWT VPs for now\n const credentials = asArray(presentation.resolvedPresentation.verifiableCredential)\n\n // Verify all credentials in parallel, and await the result\n validationResults.validations.credentials = await Promise.all(\n credentials.map(async (credential) => {\n if (!(credential.envelopedCredential instanceof W3cV2JwtVerifiableCredential)) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is not of format JWT. Presentations in JWT format can only contain credentials in JWT format.'\n ),\n validations: {},\n }\n }\n\n const credentialResult = await this.verifyCredential(agentContext, {\n credential: credential.envelopedCredential,\n })\n\n let credentialSubjectAuthentication: SingleValidationResult\n\n // Check whether any of the credentialSubjectIds for each credential is the same as the controller of the verificationMethod\n // This authenticates the presentation creator controls one of the credentialSubject ids.\n // NOTE: this doesn't take into account the case where the credentialSubject is no the holder. In the\n // future we can add support for other flows, but for now this is the most common use case.\n // TODO: should this be handled on a higher level? I don't really see it being handled in the jsonld lib\n // or in the did-jwt-vc lib (it seems they don't even verify the credentials itself), but we probably need some\n // more experience on the use cases before we loosen the restrictions (as it means we need to handle it on a higher layer).\n const credentialSubjectIds = credential.resolvedCredential.credentialSubjectIds\n const presentationAuthenticatesCredentialSubject = credentialSubjectIds.some(\n (subjectId) => proverVerificationMethod.controller === subjectId\n )\n\n if (credentialSubjectIds.length > 0 && !presentationAuthenticatesCredentialSubject) {\n credentialSubjectAuthentication = {\n isValid: false,\n error: new CredoError(\n 'Credential has one or more credentialSubject ids, but presentation does not authenticate credential subject'\n ),\n }\n } else {\n credentialSubjectAuthentication = {\n isValid: true,\n }\n }\n\n return {\n ...credentialResult,\n isValid: credentialResult.isValid && credentialSubjectAuthentication.isValid,\n validations: {\n ...credentialResult.validations,\n credentialSubjectAuthentication,\n },\n }\n })\n )\n\n // Deeply nested check whether all validations have passed\n validationResults.isValid = Object.values(validationResults.validations).every((v) =>\n Array.isArray(v) ? v.every((vv) => vv.isValid) : v.isValid\n )\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BO,sCAAMA,4BAA0B;CAGrC,AAAO,YAAY,YAAwB;AACzC,OAAK,aAAa;;;;;CAMpB,MAAa,eACX,cACA,SACuC;AAEvC,mBAAiB,aAAa,QAAQ,WAAW;EAGjD,MAAM,aAAa,IAAI,WAAW,EAChC,kBAAkB,gBAAgB,OAAO,QAAQ,WAAW,EAC7D,CAAC;AAGF,aAAW,MAAM,cAAc;AAC/B,aAAW,iBAAiB,MAAM,QAAQ,UACrC,MAAM,4BAA4B,cAAc,QAAQ,OAAO,EAAE,MAClE;EAGJ,MAAM,YAAY,MAAM,qCAAqC,cAAc,QAAQ,oBAAoB,CACrG,kBACD,CAAC;EAGF,MAAM,MAAM,MAAM,KAAK,WAAW,iBAAiB,cAAc;GAC/D,SAAS;GACT,OAAO,UAAU;GACjB,wBAAwB;IACtB,KAAK;IACL,KAAK,QAAQ;IACb,KAAK,QAAQ;IACd;GACF,CAAC;AAEF,SAAO,6BAA6B,YAAY,IAAI;;;;;;;;CAStD,MAAa,iBACX,cACA,SACsC;EACtC,MAAMC,oBAAiD;GACrD,SAAS;GACT,aAAa,EAAE;GAChB;AAED,MAAI;GACF,IAAIC;AACJ,OAAI;AAGF,QAAI,QAAQ,sBAAsB,6BAChC,SAAQ,WAAW,UAAU;AAG/B,iBACE,QAAQ,sBAAsB,+BAC1B,QAAQ,aACR,6BAA6B,YAAY,QAAQ,WAAW;AA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AgC;KACrE,aAAa;MACX,GAAG,iBAAiB;MACpB;MACD;KACF;KACD,CACH;AAGD,qBAAkB,UAAU,OAAO,OAAO,kBAAkB,YAAY,CAAC,OAAO,MAC9E,MAAM,QAAQ,EAAE,GAAG,EAAE,OAAO,OAAO,GAAG,QAAQ,GAAG,EAAE,QACpD;AAED,UAAO;WACA,OAAO;AACd,qBAAkB,QAAQ;AAC1B,UAAO;;;;wCAvXZ,YAAY"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClaimFormat } from "../models/ClaimFormat.mjs";
|
|
2
|
-
import { Jwt } from "../../../crypto/jose/jwt/Jwt.mjs";
|
|
3
2
|
import { W3cV2Credential } from "../models/credential/W3cV2Credential.mjs";
|
|
3
|
+
import { Jwt } from "../../../crypto/jose/jwt/Jwt.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.ts
|
|
6
6
|
interface W3cV2JwtVerifiableCredentialOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClaimFormat } from "../models/ClaimFormat.js";
|
|
2
|
-
import { Jwt } from "../../../crypto/jose/jwt/Jwt.js";
|
|
3
2
|
import { W3cV2Credential } from "../models/credential/W3cV2Credential.js";
|
|
3
|
+
import { Jwt } from "../../../crypto/jose/jwt/Jwt.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.ts
|
|
6
6
|
interface W3cV2JwtVerifiableCredentialOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentialTransformer.mjs","names":["payloadOptions: JwtPayloadOptions"],"sources":["../../../../src/modules/vc/jwt-vc/credentialTransformer.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"credentialTransformer.mjs","names":["payloadOptions: JwtPayloadOptions"],"sources":["../../../../src/modules/vc/jwt-vc/credentialTransformer.ts"],"sourcesContent":["import { isObject } from 'class-validator'\nimport type { JwtPayloadOptions } from '../../../crypto/jose/jwt'\n\nimport { JwtPayload } from '../../../crypto/jose/jwt'\nimport { CredoError } from '../../../error'\nimport { isJsonObject } from '../../../types'\nimport { JsonTransformer } from '../../../utils'\nimport { W3cCredential } from '../models/credential/W3cCredential'\nimport { w3cDate } from '../util'\n\nexport function getJwtPayloadFromCredential(credential: W3cCredential) {\n const vc = JsonTransformer.toJSON(credential)\n\n const payloadOptions: JwtPayloadOptions = {\n additionalClaims: {\n vc,\n },\n }\n\n // Extract `nbf` and remove issuance date from vc\n const issuanceDate = Date.parse(credential.issuanceDate)\n if (Number.isNaN(issuanceDate)) {\n throw new CredoError('JWT VCs must have a valid issuance date')\n }\n payloadOptions.nbf = Math.floor(issuanceDate / 1000)\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.issuanceDate\n\n // Extract `exp` and remove expiration date from vc\n if (credential.expirationDate) {\n const expirationDate = Date.parse(credential.expirationDate)\n if (!Number.isNaN(expirationDate)) {\n payloadOptions.exp = Math.floor(expirationDate / 1000)\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.expirationDate\n }\n }\n\n // Extract `iss` and remove issuer id from vc\n payloadOptions.iss = credential.issuerId\n if (typeof vc.issuer === 'string') {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.issuer\n } else if (typeof vc.issuer === 'object') {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.issuer.id\n if (Object.keys(vc.issuer).length === 0) {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.issuer\n }\n }\n\n // Extract `jti` and remove id from vc\n if (credential.id) {\n payloadOptions.jti = credential.id\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.id\n }\n\n if (Array.isArray(credential.credentialSubject) && credential.credentialSubject.length !== 1) {\n throw new CredoError('JWT VCs must have exactly one credential subject')\n }\n\n // Extract `sub` and remove credential subject id from vc\n const [credentialSubjectId] = credential.credentialSubjectIds\n if (credentialSubjectId) {\n payloadOptions.sub = credentialSubjectId\n\n if (Array.isArray(vc.credentialSubject)) {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.credentialSubject[0].id\n } else {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vc.credentialSubject?.id\n }\n }\n\n return new JwtPayload(payloadOptions)\n}\n\nexport function getCredentialFromJwtPayload(jwtPayload: JwtPayload) {\n if (!('vc' in jwtPayload.additionalClaims) || !isJsonObject(jwtPayload.additionalClaims.vc)) {\n throw new CredoError(\"JWT does not contain a valid 'vc' claim\")\n }\n\n const jwtVc = jwtPayload.additionalClaims.vc\n\n if (!jwtPayload.nbf || !jwtPayload.iss) {\n throw new CredoError(\"JWT does not contain valid 'nbf' and 'iss' claims\")\n }\n\n if (Array.isArray(jwtVc.credentialSubject) && jwtVc.credentialSubject.length !== 1) {\n throw new CredoError('JWT VCs must have exactly one credential subject')\n }\n\n if (Array.isArray(jwtVc.credentialSubject) && !isObject(jwtVc.credentialSubject[0])) {\n throw new CredoError('JWT VCs must have a credential subject of type object')\n }\n\n const credentialSubject = Array.isArray(jwtVc.credentialSubject)\n ? jwtVc.credentialSubject[0]\n : jwtVc.credentialSubject\n if (!isJsonObject(credentialSubject)) {\n throw new CredoError('JWT VC does not have a valid credential subject')\n }\n const subjectWithId = jwtPayload.sub ? { ...credentialSubject, id: jwtPayload.sub } : credentialSubject\n\n // Validate vc.id and jti\n if (jwtVc.id && jwtPayload.jti !== jwtVc.id) {\n throw new CredoError('JWT jti and vc.id do not match')\n }\n\n // Validate vc.issuer and iss\n if (\n (typeof jwtVc.issuer === 'string' && jwtPayload.iss !== jwtVc.issuer) ||\n (isJsonObject(jwtVc.issuer) && jwtVc.issuer.id && jwtPayload.iss !== jwtVc.issuer.id)\n ) {\n throw new CredoError('JWT iss and vc.issuer(.id) do not match')\n }\n\n // Validate vc.issuanceDate and nbf\n if (jwtVc.issuanceDate) {\n if (typeof jwtVc.issuanceDate !== 'string') {\n throw new CredoError('JWT vc.issuanceDate must be a string')\n }\n\n const issuanceDate = Date.parse(jwtVc.issuanceDate) / 1000\n if (jwtPayload.nbf !== issuanceDate) {\n throw new CredoError('JWT nbf and vc.issuanceDate do not match')\n }\n }\n\n // Validate vc.expirationDate and exp\n if (jwtVc.expirationDate) {\n if (typeof jwtVc.expirationDate !== 'string') {\n throw new CredoError('JWT vc.expirationDate must be a string')\n }\n\n const expirationDate = Date.parse(jwtVc.expirationDate) / 1000\n if (expirationDate !== jwtPayload.exp) {\n throw new CredoError('JWT exp and vc.expirationDate do not match')\n }\n }\n\n // Validate vc.credentialSubject.id and sub\n if (\n (isJsonObject(jwtVc.credentialSubject) &&\n jwtVc.credentialSubject.id &&\n jwtPayload.sub !== jwtVc.credentialSubject.id) ||\n (Array.isArray(jwtVc.credentialSubject) &&\n isJsonObject(jwtVc.credentialSubject[0]) &&\n jwtVc.credentialSubject[0].id &&\n jwtPayload.sub !== jwtVc.credentialSubject[0].id)\n ) {\n throw new CredoError('JWT sub and vc.credentialSubject.id do not match')\n }\n\n // Create a verifiable credential structure that is compatible with the VC data model\n const dataModelVc = {\n ...jwtVc,\n issuanceDate: w3cDate(jwtPayload.nbf * 1000),\n expirationDate: jwtPayload.exp ? w3cDate(jwtPayload.exp * 1000) : undefined,\n issuer: typeof jwtVc.issuer === 'object' ? { ...jwtVc.issuer, id: jwtPayload.iss } : jwtPayload.iss,\n id: jwtPayload.jti,\n credentialSubject: Array.isArray(jwtVc.credentialSubject) ? [subjectWithId] : subjectWithId,\n }\n\n const vcInstance = JsonTransformer.fromJSON(dataModelVc, W3cCredential)\n\n return vcInstance\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,SAAgB,4BAA4B,YAA2B;CACrE,MAAM,KAAK,gBAAgB,OAAO,WAAW;CAE7C,MAAMA,iBAAoC,EACxC,kBAAkB,EAChB,IACD,EACF;CAGD,MAAM,eAAe,KAAK,MAAM,WAAW,aAAa;AACxD,KAAI,OAAO,MAAM,aAAa,CAC5B,OAAM,IAAI,WAAW,0CAA0C;AAEjE,gBAAe,MA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AW,MAAM,IAAK,GAAG;EAClE,QAAQ,OAAO,MAAM,WAAW,WAAW;GAAE,GAAG,MAAM;GAAQ,IAAI,WAAW;GAAK,GAAG,WAAW;EAChG,IAAI,WAAW;EACf,mBAAmB,MAAM,QAAQ,MAAM,kBAAkB,GAAG,CAAC,cAAc,GAAG;EAC/E;AAID,QAFmB,gBAAgB,SAAS,aAAa,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
const require_W3cJwtVerifiableCredential = require('./W3cJwtVerifiableCredential.js');
|
|
4
3
|
const require_W3cV2JwtVerifiableCredential = require('./W3cV2JwtVerifiableCredential.js');
|
|
4
|
+
const require_W3cJwtVerifiableCredential = require('./W3cJwtVerifiableCredential.js');
|
|
5
5
|
const require_W3cJwtVerifiablePresentation = require('./W3cJwtVerifiablePresentation.js');
|
|
6
6
|
const require_W3cJwtCredentialService = require('./W3cJwtCredentialService.js');
|
|
7
7
|
const require_W3cV2JwtVerifiablePresentation = require('./W3cV2JwtVerifiablePresentation.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.mjs";
|
|
4
3
|
import { W3cV2JwtVerifiableCredential } from "./W3cV2JwtVerifiableCredential.mjs";
|
|
4
|
+
import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.mjs";
|
|
5
5
|
import { W3cJwtVerifiablePresentation } from "./W3cJwtVerifiablePresentation.mjs";
|
|
6
6
|
import { W3cJwtCredentialService } from "./W3cJwtCredentialService.mjs";
|
|
7
7
|
import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentationTransformer.mjs","names":["payloadOptions: JwtPayloadOptions"],"sources":["../../../../src/modules/vc/jwt-vc/presentationTransformer.ts"],"sourcesContent":["import type { JwtPayloadOptions } from '../../../crypto/jose/jwt'\nimport
|
|
1
|
+
{"version":3,"file":"presentationTransformer.mjs","names":["payloadOptions: JwtPayloadOptions"],"sources":["../../../../src/modules/vc/jwt-vc/presentationTransformer.ts"],"sourcesContent":["import type { JwtPayloadOptions } from '../../../crypto/jose/jwt'\nimport { JwtPayload } from '../../../crypto/jose/jwt'\nimport { CredoError } from '../../../error'\nimport { isJsonObject } from '../../../types'\nimport { JsonTransformer } from '../../../utils'\nimport type { W3cJsonPresentation } from '../models/presentation/W3cJsonPresentation'\nimport { W3cPresentation } from '../models/presentation/W3cPresentation'\n\nexport function getJwtPayloadFromPresentation(presentation: W3cPresentation) {\n const vp = JsonTransformer.toJSON(presentation) as Partial<W3cJsonPresentation>\n\n const payloadOptions: JwtPayloadOptions = {\n additionalClaims: {\n vp,\n },\n }\n\n // Extract `iss` and remove holder id from vp\n if (presentation.holderId) {\n payloadOptions.iss = presentation.holderId\n\n if (typeof vp.holder === 'string') {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vp.holder\n } else if (typeof vp.holder === 'object') {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vp.holder.id\n if (Object.keys(vp.holder).length === 0) {\n // biome-ignore lint/performance/noDelete: no explanation\n delete vp.holder\n }\n }\n }\n\n // Extract `jti` and remove id from vp\n if (presentation.id) {\n payloadOptions.jti = presentation.id\n // biome-ignore lint/performance/noDelete: no explanation\n delete vp.id\n }\n\n return new JwtPayload(payloadOptions)\n}\n\nexport function getPresentationFromJwtPayload(jwtPayload: JwtPayload) {\n if (!('vp' in jwtPayload.additionalClaims) || !isJsonObject(jwtPayload.additionalClaims.vp)) {\n throw new CredoError(\"JWT does not contain a valid 'vp' claim\")\n }\n\n const jwtVp = jwtPayload.additionalClaims.vp\n\n // Validate vp.id and jti\n if (jwtVp.id && jwtPayload.jti !== jwtVp.id) {\n throw new CredoError('JWT jti and vp.id do not match')\n }\n\n // Validate vp.holder and iss\n if (\n (typeof jwtVp.holder === 'string' && jwtPayload.iss !== jwtVp.holder) ||\n (isJsonObject(jwtVp.holder) && jwtVp.holder.id && jwtPayload.iss !== jwtVp.holder.id)\n ) {\n throw new CredoError('JWT iss and vp.holder(.id) do not match')\n }\n\n const dataModelVp = {\n ...jwtVp,\n id: jwtPayload.jti,\n holder: jwtPayload.iss,\n }\n\n const vpInstance = JsonTransformer.fromJSON(dataModelVp, W3cPresentation)\n\n return vpInstance\n}\n"],"mappings":";;;;;;;;;;;;AAQA,SAAgB,8BAA8B,cAA+B;CAC3E,MAAM,KAAK,gBAAgB,OAAO,aAAa;CAE/C,MAAMA,iBAAoC,EACxC,kBAAkB,EAChB,IACD,EACF;AAGD,KAAI,aAAa,UAAU;AACzB,iBAAe,MAAM,aAAa;AAElC,MAAI,OAAO,GAAG,WAAW,SAEvB,QAAO,GAAG;WACD,OAAO,GAAG,WAAW,UAAU;AAExC,UAAO,GAAG,OAAO;AACjB,OAAI,OAAO,KAAK,GAAG,OAAO,CAAC,WAAW,EAEpC,QAAO,GAAG;;;AAMhB,KAAI,aAAa,IAAI;AACnB,iBAAe,MAAM,aAAa;AAElC,SAAO,GAAG;;AAGZ,QAAO,IAAI,WAAW,eAAe;;AAGvC,SAAgB,8BAA8B,YAAwB;AACpE,KAAI,EAAE,QAAQ,WAAW,qBAAqB,CAAC,aAAa,WAAW,iBAAiB,GAAG,CACzF,OAAM,IAAI,WAAW,0CAA0C;CAGjE,MAAM,QAAQ,WAAW,iBAAiB;AAG1C,KAAI,MAAM,MAAM,WAAW,QAAQ,MAAM,GACvC,OAAM,IAAI,WAAW,iCAAiC;AAIxD,KACG,OAAO,MAAM,WAAW,YAAY,WAAW,QAAQ,MAAM,UAC7D,aAAa,MAAM,OAAO,IAAI,MAAM,OAAO,MAAM,WAAW,QAAQ,MAAM,OAAO,GAElF,OAAM,IAAI,WAAW,0CAA0C;CAGjE,MAAM,cAAc;EAClB,GAAG;EACH,IAAI,WAAW;EACf,QAAQ,WAAW;EACpB;AAID,QAFmB,gBAAgB,SAAS,aAAa,gBAAgB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { W3cIssuer, W3cIssuerOptions } from "./W3cIssuer.mjs";
|
|
1
|
+
import { JsonObject, SingleOrArray } from "../../../../types.mjs";
|
|
3
2
|
import { W3cCredentialSchema } from "./W3cCredentialSchema.mjs";
|
|
4
3
|
import { W3cCredentialStatus } from "./W3cCredentialStatus.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { W3cCredentialSubject, W3cCredentialSubjectOptions } from "./W3cCredentialSubject.mjs";
|
|
5
|
+
import { W3cIssuer, W3cIssuerOptions } from "./W3cIssuer.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/vc/models/credential/W3cCredential.d.ts
|
|
8
8
|
interface W3cCredentialOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredential.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"W3cCredential.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;UAciB,oBAAA;YACL,eAAe;EADV,EAAA,CAAA,EAAA,MAAA;EAAoB,IAAA,EAG7B,KAH6B,CAAA,MAAA,CAAA;QACV,EAAA,MAAA,GAGR,gBAHQ;cAAf,EAAA,MAAA;gBAEJ,CAAA,EAAA,MAAA;mBACW,EAGE,aAHF,CAGgB,2BAHhB,CAAA;kBAGgB,CAAA,EACd,mBADc;kBAAd,CAAA,EAEA,aAFA,CAEc,mBAFd,CAAA;;AAEc,cAGtB,aAAA,CAHsB;aAAd,CAAA,OAAA,EAIS,oBAJT;EAAa,OAAA,EAoCf,KApCe,CAAA,MAAA,GAoCA,UApCA,CAAA;EAGrB,EAAA,CAAA,EAAA,MAAA;EAAa,IAAA,EAwCV,KAxCU,CAAA,MAAA,CAAA;QACI,EAAA,MAAA,GA2CH,SA3CG;cAgCI,EAAA,MAAA;gBAAf,CAAA,EAAA,MAAA;mBAOH,EAea,aAfb,CAe2B,oBAf3B,CAAA;kBAIW,CAAA,EAiBC,aAjBD,CAiBe,mBAjBf,CAAA;kBAWgB,CAAA,EAYf,mBAZe;MAAd,QAAA,CAAA,CAAA,EAAA,MAAA;MAMa,mBAAA,CAAA,CAAA,EAAA,MAAA,EAAA;MAAd,oBAAA,CAAA,CAAA,EAAA,MAAA,EAAA;MAMA,QAAA,CAAA,CAAA,EA0BH,KA1BG,CAAA,MAAA,GA0BY,UA1BZ,CAAA;SA0BY,QAAA,CAAA,IAAA,EAIT,MAJS,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,EAIc,aAJd"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { W3cIssuer, W3cIssuerOptions } from "./W3cIssuer.js";
|
|
1
|
+
import { JsonObject, SingleOrArray } from "../../../../types.js";
|
|
3
2
|
import { W3cCredentialSchema } from "./W3cCredentialSchema.js";
|
|
4
3
|
import { W3cCredentialStatus } from "./W3cCredentialStatus.js";
|
|
5
|
-
import {
|
|
4
|
+
import { W3cCredentialSubject, W3cCredentialSubjectOptions } from "./W3cCredentialSubject.js";
|
|
5
|
+
import { W3cIssuer, W3cIssuerOptions } from "./W3cIssuer.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/vc/models/credential/W3cCredential.d.ts
|
|
8
8
|
interface W3cCredentialOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredential.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"W3cCredential.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;AAciB,UAAA,oBAAA,CAAoB;EAAA,OAAA,CAAA,EACzB,KADyB,CAAA,MAAA,GACV,UADU,CAAA;KACV,EAAA,MAAA;MAAf,EAEJ,KAFI,CAAA,MAAA,CAAA;QAEJ,EAAA,MAAA,GACW,gBADX;cACW,EAAA,MAAA;gBAGgB,CAAA,EAAA,MAAA;mBAAd,EAAA,aAAA,CAAc,2BAAd,CAAA;kBACA,CAAA,EAAA,mBAAA;kBACc,CAAA,EAAd,aAAc,CAAA,mBAAA,CAAA;;AAAD,cAGrB,aAAA,CAHqB;EAGrB,WAAA,CAAA,OAAa,EACI,oBADJ;EAAA,OAAA,EAiCP,KAjCO,CAAA,MAAA,GAiCQ,UAjCR,CAAA;KACI,EAAA,MAAA;MAgCI,EAOlB,KAPkB,CAAA,MAAA,CAAA;QAAf,EAAA,MAAA,GAWQ,SAXR;cAOH,EAAA,MAAA;gBAIW,CAAA,EAAA,MAAA;mBAWgB,EAAd,aAAc,CAAA,oBAAA,CAAA;kBAAd,CAAA,EAMD,aANC,CAMa,mBANb,CAAA;kBAMa,CAAA,EAMd,mBANc;MAAd,QAAA,CAAA,CAAA,EAAA,MAAA;MAMA,mBAAA,CAAA,CAAA,EAAA,MAAA,EAAA;MA0BY,oBAAA,CAAA,CAAA,EAAA,MAAA,EAAA;MAAf,QAAA,CAAA,CAAA,EAAA,KAAA,CAAA,MAAA,GAAe,UAAf,CAAA;SAIM,QAAA,CAAA,IAAA,EAAA,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,EAAuB,aAAvB"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
4
4
|
const require_decorateMetadata = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
5
5
|
const require_decorate = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
6
|
-
const require_JsonTransformer = require('../../../../utils/JsonTransformer.js');
|
|
7
6
|
const require_array = require('../../../../utils/array.js');
|
|
7
|
+
const require_JsonTransformer = require('../../../../utils/JsonTransformer.js');
|
|
8
8
|
const require_validators = require('../../../../utils/validators.js');
|
|
9
9
|
require('../../../../utils/index.js');
|
|
10
10
|
const require_constants = require('../../constants.js');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { __decorateMetadata } from "../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
4
4
|
import { __decorate } from "../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
5
|
-
import { JsonTransformer } from "../../../../utils/JsonTransformer.mjs";
|
|
6
5
|
import { asArray, mapSingleOrArray } from "../../../../utils/array.mjs";
|
|
6
|
+
import { JsonTransformer } from "../../../../utils/JsonTransformer.mjs";
|
|
7
7
|
import { IsInstanceOrArrayOfInstances, IsUri } from "../../../../utils/validators.mjs";
|
|
8
8
|
import "../../../../utils/index.mjs";
|
|
9
9
|
import { CREDENTIALS_CONTEXT_V1_URL } from "../../constants.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredential.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"W3cCredential.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredential.ts"],"sourcesContent":["import { Expose, Type } from 'class-transformer'\nimport { IsInstance, IsOptional, IsRFC3339, ValidateNested } from 'class-validator'\nimport type { JsonObject, SingleOrArray } from '../../../../types'\nimport { asArray, JsonTransformer, mapSingleOrArray } from '../../../../utils'\nimport { IsInstanceOrArrayOfInstances, IsUri } from '../../../../utils/validators'\nimport { CREDENTIALS_CONTEXT_V1_URL } from '../../constants'\nimport { IsCredentialJsonLdContext, IsCredentialType } from '../../validators'\nimport { W3cCredentialSchema } from './W3cCredentialSchema'\nimport { W3cCredentialStatus } from './W3cCredentialStatus'\nimport type { W3cCredentialSubjectOptions } from './W3cCredentialSubject'\nimport { IsW3cCredentialSubject, W3cCredentialSubject, W3cCredentialSubjectTransformer } from './W3cCredentialSubject'\nimport type { W3cIssuerOptions } from './W3cIssuer'\nimport { IsW3cIssuer, W3cIssuer, W3cIssuerTransformer } from './W3cIssuer'\n\nexport interface W3cCredentialOptions {\n context?: Array<string | JsonObject>\n id?: string\n type: Array<string>\n issuer: string | W3cIssuerOptions\n issuanceDate: string\n expirationDate?: string\n credentialSubject: SingleOrArray<W3cCredentialSubjectOptions>\n credentialStatus?: W3cCredentialStatus\n credentialSchema?: SingleOrArray<W3cCredentialSchema>\n}\n\nexport class W3cCredential {\n public constructor(options: W3cCredentialOptions) {\n if (options) {\n this.context = options.context ?? [CREDENTIALS_CONTEXT_V1_URL]\n this.id = options.id\n this.type = options.type || ['VerifiableCredential']\n this.issuer =\n typeof options.issuer === 'string' || options.issuer instanceof W3cIssuer\n ? options.issuer\n : new W3cIssuer(options.issuer)\n this.issuanceDate = options.issuanceDate\n this.expirationDate = options.expirationDate\n this.credentialSubject = mapSingleOrArray(options.credentialSubject, (subject) =>\n subject instanceof W3cCredentialSubject ? subject : new W3cCredentialSubject(subject)\n )\n\n if (options.credentialStatus) {\n this.credentialStatus =\n options.credentialStatus instanceof W3cCredentialStatus\n ? options.credentialStatus\n : new W3cCredentialStatus(options.credentialStatus)\n }\n\n if (options.credentialSchema) {\n this.credentialSchema = mapSingleOrArray(options.credentialSchema, (schema) =>\n schema instanceof W3cCredentialSchema ? schema : new W3cCredentialSchema(schema)\n )\n }\n }\n }\n\n @Expose({ name: '@context' })\n @IsCredentialJsonLdContext()\n public context!: Array<string | JsonObject>\n\n @IsOptional()\n @IsUri()\n public id?: string\n\n @IsCredentialType()\n public type!: Array<string>\n\n @W3cIssuerTransformer()\n @IsW3cIssuer()\n public issuer!: string | W3cIssuer\n\n @IsRFC3339()\n public issuanceDate!: string\n\n @IsRFC3339()\n @IsOptional()\n public expirationDate?: string\n\n @IsW3cCredentialSubject({ each: true })\n @W3cCredentialSubjectTransformer()\n public credentialSubject!: SingleOrArray<W3cCredentialSubject>\n\n @IsOptional()\n @Type(() => W3cCredentialSchema)\n @ValidateNested({ each: true })\n @IsInstanceOrArrayOfInstances({ classType: W3cCredentialSchema, allowEmptyArray: true })\n public credentialSchema?: SingleOrArray<W3cCredentialSchema>\n\n @IsOptional()\n @Type(() => W3cCredentialStatus)\n @ValidateNested({ each: true })\n @IsInstance(W3cCredentialStatus)\n public credentialStatus?: W3cCredentialStatus\n\n public get issuerId(): string {\n return this.issuer instanceof W3cIssuer ? this.issuer.id : this.issuer\n }\n\n public get credentialSchemaIds(): string[] {\n if (!this.credentialSchema) return []\n\n if (Array.isArray(this.credentialSchema)) {\n return this.credentialSchema.map((credentialSchema) => credentialSchema.id)\n }\n\n return [this.credentialSchema.id]\n }\n\n public get credentialSubjectIds(): string[] {\n if (Array.isArray(this.credentialSubject)) {\n return this.credentialSubject\n .map((credentialSubject) => credentialSubject.id)\n .filter((v): v is string => v !== undefined)\n }\n\n return this.credentialSubject.id ? [this.credentialSubject.id] : []\n }\n\n public get contexts(): Array<string | JsonObject> {\n return asArray(this.context)\n }\n\n public static fromJson(json: Record<string, unknown>) {\n return JsonTransformer.fromJSON(json, W3cCredential)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,IAAa,gBAAb,MAAa,cAAc;CACzB,AAAO,YAAY,SAA+B;AAChD,MAAI,SAAS;AACX,QAAK,UAAU,QAAQ,WAAW,CAAC,2BAA2B;AAC9D,QAAK,KAAK,QAAQ;AAClB,QAAK,OAAO,QAAQ,QAAQ,CAAC,uBAAuB;AACpD,QAAK,SACH,OAAO,QAAQ,WAAW,YAAY,QAAQ,kBAAkB,YAC5D,QAAQ,SACR,IAAI,UAAU,QAAQ,OAAO;AACnC,QAAK,eAAe,QAAQ;AAC5B,QAAK,iBAAiB,QAAQ;AAC9B,QAAK,oBAAoB,iBAAiB,QAAQ,oBAAoB,YACpE,mBAAmB,uBAAuB,UAAU,IAAI,qBAAqB,QAAQ,CACtF;AAED,OAAI,QAAQ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,eAAe,EAAE,MAAM,MAAM,CAAC;CAC9B,WAAW,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialSubject.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"W3cCredentialSubject.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":[],"mappings":";;;;;;UAUiB,2BAAA;EAAA,EAAA,CAAA,EAAA,MAAA;EAMJ,MAAA,CAAA,EAHF,MAGE,CAAA,MAAA,EAAoB,OAAA,CAAA;;AACH,cADjB,oBAAA,CACiB;aAcZ,CAAA,OAAA,EAdY,2BAcZ;EAAM,EAAA,CAAA,EAAA,MAAA;EAGR,MAAA,CAAA,EAHE,MAGF,CAAA,MAAA,EAAA,OAAA,CAAA;AA8BhB;AAAsC,iBA9BtB,+BAAA,CAAA,CA8BsB,EA9BS,iBA8BT;AAAqB,iBAA3C,sBAAA,CAA2C,iBAAA,CAAA,EAAA,iBAAA,CAAA,EAAoB,iBAApB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialSubject.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"W3cCredentialSubject.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AAMa,UANI,2BAAA,CAMgB;EAAA,EAAA,CAAA,EAAA,MAAA;QACH,CAAA,EAJnB,MAImB,CAAA,MAAA,EAAA,OAAA,CAAA;;AAcN,cAfX,oBAAA,CAeW;EAGR,WAAA,CAAA,OAAA,EAjBc,2BAiBiB;EA8B/B,EAAA,CAAA,EAAA,MAAA;EAAsB,MAAA,CAAA,EAjCpB,MAiCoB,CAAA,MAAA,EAAA,OAAA,CAAA;;AAAyC,iBA9B/D,+BAAA,CAAA,CA8B+D,EA9BhC,iBA8BgC;AAAiB,iBAAhF,sBAAA,CAAgF,iBAAA,CAAA,EAArC,iBAAqC,CAAA,EAAjB,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialSubject.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"W3cCredentialSubject.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cCredentialSubject.ts"],"sourcesContent":["import { Transform, TransformationType } from 'class-transformer'\nimport type { ValidationOptions } from 'class-validator'\nimport { buildMessage, IsOptional, isInstance, ValidateBy } from 'class-validator'\n\nimport { CredoError } from '../../../../error'\n\n/**\n * @see https://www.w3.org/TR/vc-data-model/#credential-subject\n */\n\nexport interface W3cCredentialSubjectOptions {\n id?: string\n // note claims must not contain an id field\n claims?: Record<string, unknown>\n}\n\nexport class W3cCredentialSubject {\n public constructor(options: W3cCredentialSubjectOptions) {\n if (options) {\n this.id = options.id\n\n // biome-ignore lint/correctness/noUnusedVariables: no explanation\n const { id, ...claims } = options.claims ?? {}\n this.claims = Object.keys(claims).length > 0 ? claims : undefined\n }\n }\n\n @IsOptional()\n public id?: string\n\n @IsOptional()\n public claims?: Record<string, unknown>\n}\n\nexport function W3cCredentialSubjectTransformer() {\n return Transform(({ value, type }: { value: W3cCredentialSubjectOptions; type: TransformationType }) => {\n if (type === TransformationType.PLAIN_TO_CLASS) {\n const vToClass = (v: unknown) => {\n if (!v || typeof v !== 'object') throw new CredoError('Invalid credential subject')\n if (isInstance(v, W3cCredentialSubject)) return v\n const { id, ...claims } = v as Record<string, unknown>\n if (id !== undefined && typeof id !== 'string') throw new CredoError('Invalid credential subject id')\n return new W3cCredentialSubject({ id, claims })\n }\n\n if (Array.isArray(value) && value.length === 0) {\n throw new CredoError('At least one credential subject is required')\n }\n\n return Array.isArray(value) ? value.map(vToClass) : vToClass(value)\n }\n if (type === TransformationType.CLASS_TO_PLAIN) {\n const vToJson = (v: unknown) => {\n if (v instanceof W3cCredentialSubject) return v.id ? { ...v.claims, id: v.id } : { ...v.claims }\n return v\n }\n\n return Array.isArray(value) ? value.map(vToJson) : vToJson(value)\n }\n // PLAIN_TO_PLAIN\n return value\n })\n}\n\nexport function IsW3cCredentialSubject(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: 'IsW3cCredentialSubject',\n validator: {\n validate: (value): boolean => {\n return isInstance(value, W3cCredentialSubject)\n },\n defaultMessage: buildMessage(\n (eachPrefix) =>\n `${eachPrefix}$property must be an object or an array of objects with an optional id property`,\n validationOptions\n ),\n },\n },\n validationOptions\n )\n}\n"],"mappings":";;;;;;;;;;;AAgBA,IAAa,uBAAb,MAAkC;CAChC,AAAO,YAAY,SAAsC;AACvD,MAAI,SAAS;AACX,QAAK,KAAK,QAAQ;GAGlB,MAAM,EAAE,GAAI,GAAG,WAAW,QAAQ,UAAU,EAAE;AAC9C,QAAK,SAAS,OAAO,KAAK,OAAO,CAAC,SAAS,IAAI,SAAS;;;;YAI3D,YAAY;YAGZ,YAAY;AAIf,SAAgB,kCAAkC;AAChD,QAAO,WAAW,EAAE,OAAO,WAA6E;AACtG,MAAI,SAAS,mBAAmB,gBAAgB;GAC9C,MAAM,YAAY,MAAe;AAC/B,QAAI,CAAC,KAAK,OAAO,MAAM,SAAU,OAAM,IAAI,WAAW,6BAA6B;AACnF,QAAI,WAAW,GAAG,qBAAqB,CAAE,QAAO;IAChD,MAAM,EAAE,GAAI,GAAG,WAAW;AAC1B,QAAI,OAAO,UAAa,OAAO,OAAO,SAAU,OAAM,IAAI,WAAW,gCAAgC;AACrG,WAAO,IAAI,qBAAqB;KAAE;KAAI;KAAQ,CAAC;;AAGjD,OAAI,MAAM,QAAQ,MAAM,IAAI,MAAM,WAAW,EAC3C,OAAM,IAAI,WAAW,8CAA8C;AAGrE,UAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,IAAI,SAAS,GAAG,SAAS,MAAM;;AAErE,MAAI,SAAS,mBAAmB,gBAAgB;GAC9C,MAAM,WAAW,MAAe;AAC9B,QAAI,aAAa,qBAAsB,QAAO,EAAE,KAAK;KAAE,GAAG,EAAE;KAAQ,IAAI,EAAE;KAAI,GAAG,EAAE,GAAG,EAAE,QAAQ;AAChG,WAAO;;AAGT,UAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,IAAI,QAAQ,GAAG,QAAQ,MAAM;;AAGnE,SAAO;GACP;;AAGJ,SAAgB,uBAAuB,mBAA0D;AAC/F,QAAO,WACL;EACE,MAAM;EACN,WAAW;GACT,WAAW,UAAmB;AAC5B,WAAO,WAAW,OAAO,qBAAqB;;GAEhD,gBAAgB,cACb,eACC,GAAG,WAAW,kFAChB,kBACD;GACF;EACF,EACD,kBACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cIssuer.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"W3cIssuer.d.mts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWiB,UAAA,gBAAA,CAAgB;EAIpB,EAAA,EAAA,MAAA;AAab;AAiBgB,cA9BH,SAAA,CA8Bc;EAAA,WAAA,CAAA,OAAA,EA7BG,gBA6BH;MAAqB,MAAA;;AAAqC,iBAjBrE,oBAAA,CAAA,CAiBqE,EAjBjD,iBAiBiD;iBAArE,WAAA,qBAAgC,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cIssuer.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"W3cIssuer.d.ts","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":[],"mappings":";;;;;;AAWA;AAIA;AAagB,UAjBC,gBAAA,CAiBmB;EAiBpB,EAAA,EAAA,MAAA;;AAAgC,cA9BnC,SAAA,CA8BmC;aAAoB,CAAA,OAAA,EA7BtC,gBA6BsC;EAAiB,EAAA,EAAA,MAAA;;iBAjBrE,oBAAA,CAAA,GAAoB;iBAiBpB,WAAA,qBAAgC,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cIssuer.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"W3cIssuer.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cIssuer.ts"],"sourcesContent":["import { instanceToPlain, plainToInstance, Transform, TransformationType } from 'class-transformer'\nimport type { ValidationOptions } from 'class-validator'\nimport { buildMessage, isInstance, isString, ValidateBy } from 'class-validator'\n\nimport { IsUri, isUri } from '../../../../utils/validators'\n\n/**\n * TODO: check how to support arbitrary data in class\n * @see https://www.w3.org/TR/vc-data-model/#credential-subject\n */\n\nexport interface W3cIssuerOptions {\n id: string\n}\n\nexport class W3cIssuer {\n public constructor(options: W3cIssuerOptions) {\n if (options) {\n this.id = options.id\n }\n }\n\n @IsUri()\n public id!: string\n}\n\n// Custom transformers\n\nexport function W3cIssuerTransformer() {\n return Transform(({ value, type }: { value: string | W3cIssuerOptions; type: TransformationType }) => {\n if (type === TransformationType.PLAIN_TO_CLASS) {\n if (isString(value)) return value\n return plainToInstance(W3cIssuer, value)\n }\n if (type === TransformationType.CLASS_TO_PLAIN) {\n if (isString(value)) return value\n return instanceToPlain(value)\n }\n // PLAIN_TO_PLAIN\n return value\n })\n}\n\n// Custom validators\n\nexport function IsW3cIssuer(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: 'IsW3cIssuer',\n validator: {\n validate: (value): boolean => {\n if (typeof value === 'string') {\n return isUri(value)\n }\n if (isInstance(value, W3cIssuer)) {\n return isUri(value.id)\n }\n return false\n },\n defaultMessage: buildMessage(\n (eachPrefix) => `${eachPrefix}$property must be an URI or an object with an id property which is an URI`,\n validationOptions\n ),\n },\n },\n validationOptions\n )\n}\n"],"mappings":";;;;;;;;;AAeA,IAAa,YAAb,MAAuB;CACrB,AAAO,YAAY,SAA2B;AAC5C,MAAI,QACF,MAAK,KAAK,QAAQ;;;YAIrB,OAAO;AAMV,SAAgB,uBAAuB;AACrC,QAAO,WAAW,EAAE,OAAO,WAA2E;AACpG,MAAI,SAAS,mBAAmB,gBAAgB;AAC9C,OAAI,SAAS,MAAM,CAAE,QAAO;AAC5B,UAAO,gBAAgB,WAAW,MAAM;;AAE1C,MAAI,SAAS,mBAAmB,gBAAgB;AAC9C,OAAI,SAAS,MAAM,CAAE,QAAO;AAC5B,UAAO,gBAAgB,MAAM;;AAG/B,SAAO;GACP;;AAKJ,SAAgB,YAAY,mBAA0D;AACpF,QAAO,WACL;EACE,MAAM;EACN,WAAW;GACT,WAAW,UAAmB;AAC5B,QAAI,OAAO,UAAU,SACnB,QAAO,MAAM,MAAM;AAErB,QAAI,WAAW,OAAO,UAAU,CAC9B,QAAO,MAAM,MAAM,GAAG;AAExB,WAAO;;GAET,gBAAgB,cACb,eAAe,GAAG,WAAW,4EAC9B,kBACD;GACF;EACF,EACD,kBACD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JsonObject, SingleOrArray } from "../../../../types.mjs";
|
|
1
2
|
import { W3cV2CredentialSchema, W3cV2CredentialSchemaOptions } from "./W3cV2CredentialSchema.mjs";
|
|
2
3
|
import { W3cV2CredentialStatus, W3cV2CredentialStatusOptions } from "./W3cV2CredentialStatus.mjs";
|
|
3
4
|
import { W3cV2CredentialSubject, W3cV2CredentialSubjectOptions } from "./W3cV2CredentialSubject.mjs";
|
|
@@ -7,7 +8,6 @@ import { W3cV2JsonCredential } from "./W3cV2JsonCredential.mjs";
|
|
|
7
8
|
import { W3cV2LocalizedValue, W3cV2LocalizedValueOptions } from "./W3cV2LocalizedValue.mjs";
|
|
8
9
|
import { W3cV2RefreshService, W3cV2RefreshServiceOptions } from "./W3cV2RefreshService.mjs";
|
|
9
10
|
import { W3cV2TermsOfUse, W3cV2TermsOfUseOptions } from "./W3cV2TermsOfUse.mjs";
|
|
10
|
-
import { JsonObject, SingleOrArray } from "../../../../types.mjs";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/vc/models/credential/W3cV2Credential.d.ts
|
|
13
13
|
interface W3cV2CredentialOptions {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JsonObject, SingleOrArray } from "../../../../types.js";
|
|
1
2
|
import { W3cV2CredentialSchema, W3cV2CredentialSchemaOptions } from "./W3cV2CredentialSchema.js";
|
|
2
3
|
import { W3cV2CredentialStatus, W3cV2CredentialStatusOptions } from "./W3cV2CredentialStatus.js";
|
|
3
4
|
import { W3cV2CredentialSubject, W3cV2CredentialSubjectOptions } from "./W3cV2CredentialSubject.js";
|
|
@@ -7,7 +8,6 @@ import { W3cV2JsonCredential } from "./W3cV2JsonCredential.js";
|
|
|
7
8
|
import { W3cV2LocalizedValue, W3cV2LocalizedValueOptions } from "./W3cV2LocalizedValue.js";
|
|
8
9
|
import { W3cV2RefreshService, W3cV2RefreshServiceOptions } from "./W3cV2RefreshService.js";
|
|
9
10
|
import { W3cV2TermsOfUse, W3cV2TermsOfUseOptions } from "./W3cV2TermsOfUse.js";
|
|
10
|
-
import { JsonObject, SingleOrArray } from "../../../../types.js";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/vc/models/credential/W3cV2Credential.d.ts
|
|
13
13
|
interface W3cV2CredentialOptions {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
4
4
|
const require_decorateMetadata = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
5
5
|
const require_decorate = require('../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
6
|
-
const require_JsonTransformer = require('../../../../utils/JsonTransformer.js');
|
|
7
6
|
const require_array = require('../../../../utils/array.js');
|
|
7
|
+
const require_JsonTransformer = require('../../../../utils/JsonTransformer.js');
|
|
8
8
|
const require_validators = require('../../../../utils/validators.js');
|
|
9
9
|
require('../../../../utils/index.js');
|
|
10
10
|
const require_constants = require('../../constants.js');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { __decorateMetadata } from "../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
4
4
|
import { __decorate } from "../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
5
|
-
import { JsonTransformer } from "../../../../utils/JsonTransformer.mjs";
|
|
6
5
|
import { asArray, mapSingleOrArray } from "../../../../utils/array.mjs";
|
|
6
|
+
import { JsonTransformer } from "../../../../utils/JsonTransformer.mjs";
|
|
7
7
|
import { IsInstanceOrArrayOfInstances, IsNever, IsStringOrInstanceOrArrayOfInstances, IsUri } from "../../../../utils/validators.mjs";
|
|
8
8
|
import "../../../../utils/index.mjs";
|
|
9
9
|
import { CREDENTIALS_CONTEXT_V2_URL } from "../../constants.mjs";
|