@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
|
@@ -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 { mapSingleOrArray } from "../../../../utils/array.mjs";
|
|
6
|
+
import { JsonTransformer } from "../../../../utils/JsonTransformer.mjs";
|
|
7
7
|
import { IsInstanceOrArrayOfInstances, IsNever, IsUri } from "../../../../utils/validators.mjs";
|
|
8
8
|
import "../../../../utils/index.mjs";
|
|
9
9
|
import { CREDENTIALS_CONTEXT_V2_URL, VERIFIABLE_PRESENTATION_TYPE } from "../../constants.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClaimFormat } from "../ClaimFormat.mjs";
|
|
2
|
-
import { W3cV2JwtVerifiablePresentation } from "../../jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
|
|
3
2
|
import { W3cV2SdJwtVerifiablePresentation } from "../../sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs";
|
|
3
|
+
import { W3cV2JwtVerifiablePresentation } from "../../jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.ts
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClaimFormat } from "../ClaimFormat.js";
|
|
2
|
-
import { W3cV2JwtVerifiablePresentation } from "../../jwt-vc/W3cV2JwtVerifiablePresentation.js";
|
|
3
2
|
import { W3cV2SdJwtVerifiablePresentation } from "../../sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.js";
|
|
3
|
+
import { W3cV2JwtVerifiablePresentation } from "../../jwt-vc/W3cV2JwtVerifiablePresentation.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.ts
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialRecord.d.mts","names":[],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"W3cCredentialRecord.d.mts","names":[],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,0BAAA;;cAEH;cACA;EAHG,IAAA,EAIT,uBAJmC;;AAE7B,KAKF,uBAAA,GALE;;;;EAKF,aAAA,CAAA,EAIM,KAJN,CAAA,MAAuB,CAAA;AAOnC,CAAA;AAAoC,KAAxB,wBAAA,GAAwB;UAEtB,EAAA,MAAA;YACD,EADC,KACD,CAAA,MAAA,CAAA;WACD,EADC,KACD,CAAA,MAAA,CAAA;UAIG,EAJH,KAIG,CAAA,MAAA,CAAA;SAEA,CAAA,EAAA,MAAA;aACE,EAHF,uBAGE,CAAA,aAAA,CAAA;YACR,CAAA,EAFM,KAEN,CAAA,MAAA,CAAA;cACA,CAAA,EAFQ,KAER,CAAA,MAAA,CAAA;EAAK,KAAA,EADL,KACK,CAAA,MAAA,CAAA;EAGD,IAAA,CAAA,EAHJ,KAGI,CAAA,MAAA,CAAA;CAAoB;AAAmB,cAAvC,mBAAA,SAA4B,UAAW,CAAA,wBAAA,EAA0B,uBAA1B,CAAA,CAAA;kBAA0B,IAAA,GAAA,qBAAA;WAKxD,IAAA,GAAA,qBAAA;YAEM,EAFN,uBAEM;aAUH,CAAA,KAAA,EAVG,0BAUH;SAA0B,CAAA,CAAA,EAA/B,IAA+B,CAA1B,wBAA0B,EAAA,uBAAA,CAAA;;;;;;;;;;;;0BA4C/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialRecord.d.ts","names":[],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"W3cCredentialRecord.d.ts","names":[],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,0BAAA;;EAAA,SAAA,CAAA,EAEH,IAFG;EAA0B,UAAA,EAG7B,uBAH6B;MAE7B,EAEN,uBAFM;;AAEN,KAGI,uBAAA,GAHJ;EAAuB;AAG/B;AAOA;EAAoC,aAAA,CAAA,EAHlB,KAGkB,CAAA,MAAA,CAAA;;AAGvB,KAHD,wBAAA,GAGC;UACD,EAAA,MAAA;YAIG,EAND,KAMC,CAAA,MAAA,CAAA;WAEA,EAPF,KAOE,CAAA,MAAA,CAAA;UACE,EAPL,KAOK,CAAA,MAAA,CAAA;SACR,CAAA,EAAA,MAAA;aACA,EALM,uBAKN,CAAA,aAAA,CAAA;EAAK,UAAA,CAAA,EAHC,KAGD,CAAA,MAAA,CAAA;EAGD,YAAA,CAAA,EALI,KAKJ,CAAA,MAAoB,CAAA;EAAA,KAAA,EAJxB,KAIwB,CAAA,MAAA,CAAA;MAAmB,CAAA,EAH3C,KAG2C,CAAA,MAAA,CAAA;;AAK9B,cALT,mBAAA,SAA4B,UAKnB,CAL8B,wBAK9B,EALwD,uBAKxD,CAAA,CAAA;kBAEM,IAAA,GAAA,qBAAA;WAUH,IAAA,GAAA,qBAAA;YAA0B,EAZ7B,uBAY6B;aAA/B,CAAA,KAAA,EAVQ,0BAUR;SA4CA,CAAA,CAAA,EA5CA,IA4CA,CA5CK,wBA4CL,EA5C+B,uBA4C/B,CAAA;;;;;;;;;;;;0BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialRecord.mjs","names":["tags: Tags<DefaultW3cCredentialTags, CustomW3cCredentialTags>"],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"W3cCredentialRecord.mjs","names":["tags: Tags<DefaultW3cCredentialTags, CustomW3cCredentialTags>"],"sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"sourcesContent":["import { BaseRecord, type Tags } from '../../../storage/BaseRecord'\nimport { JsonTransformer } from '../../../utils'\nimport type { Constructable } from '../../../utils/mixins'\nimport { uuid } from '../../../utils/uuid'\nimport { ClaimFormat, type W3cVerifiableCredential, W3cVerifiableCredentialTransformer } from '../models'\n\nexport interface W3cCredentialRecordOptions {\n id?: string\n createdAt?: Date\n credential: W3cVerifiableCredential\n tags: CustomW3cCredentialTags\n}\n\nexport type CustomW3cCredentialTags = {\n /**\n * Expanded types are used for JSON-LD credentials to allow for filtering on the expanded type.\n */\n expandedTypes?: Array<string>\n}\n\nexport type DefaultW3cCredentialTags = {\n issuerId: string\n subjectIds: Array<string>\n schemaIds: Array<string>\n contexts: Array<string>\n givenId?: string\n\n // Can be any of the values for claimFormat\n claimFormat: W3cVerifiableCredential['claimFormat']\n\n proofTypes?: Array<string>\n cryptosuites?: Array<string>\n types: Array<string>\n algs?: Array<string>\n}\n\nexport class W3cCredentialRecord extends BaseRecord<DefaultW3cCredentialTags, CustomW3cCredentialTags> {\n public static readonly type = 'W3cCredentialRecord'\n public readonly type = W3cCredentialRecord.type\n\n @W3cVerifiableCredentialTransformer()\n public credential!: W3cVerifiableCredential\n\n public constructor(props: W3cCredentialRecordOptions) {\n super()\n if (props) {\n this.id = props.id ?? uuid()\n this.createdAt = props.createdAt ?? new Date()\n this._tags = props.tags\n this.credential = props.credential\n }\n }\n\n public getTags(): Tags<DefaultW3cCredentialTags, CustomW3cCredentialTags> {\n // Contexts are usually strings, but can sometimes be objects. We're unable to use objects as tags,\n // so we filter out the objects before setting the tags.\n const stringContexts = this.credential.contexts.filter((ctx): ctx is string => typeof ctx === 'string')\n\n const tags: Tags<DefaultW3cCredentialTags, CustomW3cCredentialTags> = {\n ...this._tags,\n issuerId: this.credential.issuerId,\n subjectIds: this.credential.credentialSubjectIds,\n schemaIds: this.credential.credentialSchemaIds,\n contexts: stringContexts,\n givenId: this.credential.id,\n claimFormat: this.credential.claimFormat,\n types: this.credential.type,\n }\n\n // Proof types is used for ldp_vc credentials\n if (this.credential.claimFormat === ClaimFormat.LdpVc) {\n tags.proofTypes = this.credential.proofTypes\n tags.cryptosuites = this.credential.dataIntegrityCryptosuites\n }\n\n // Algs is used for jwt_vc credentials\n else if (this.credential.claimFormat === ClaimFormat.JwtVc) {\n tags.algs = [this.credential.jwt.header.alg]\n }\n\n return tags\n }\n\n /**\n * This overwrites the default clone method for records\n * as the W3cRecord has issues with the default clone method\n * due to how W3cJwtVerifiableCredential is implemented. This is\n * a temporary way to make sure the clone still works, but ideally\n * we find an alternative.\n */\n public clone(): this {\n return JsonTransformer.fromJSON(JsonTransformer.toJSON(this), this.constructor as Constructable<this>)\n }\n\n /**\n * encoded is convenience method added to all credential records\n */\n public get encoded() {\n return this.credential.encoded\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,IAAa,sBAAb,MAAa,4BAA4B,WAA8D;CAOrG,AAAO,YAAY,OAAmC;AACpD,SAAO;OANO,OAAO,oBAAoB;AAOzC,MAAI,OAAO;AACT,QAAK,KAAK,MAAM,MAAM,MAAM;AAC5B,QAAK,YAAY,MAAM,6BAAa,IAAI,MAAM;AAC9C,QAAK,QAAQ,MAAM;AACnB,QAAK,aAAa,MAAM;;;CAI5B,AAAO,UAAmE;EAGxE,MAAM,iBAAiB,KAAK,WAAW,SAAS,QAAQ,QAAuB,OAAO,QAAQ,SAAS;EAEvG,MAAMA,OAAgE;GACpE,GAAG,KAAK;GACR,UAAU,KAAK,WAAW;GAC1B,YAAY,KAAK,WAAW;GAC5B,WAAW,KAAK,WAAW;GAC3B,UAAU;GACV,SAAS,KAAK,WAAW;GACzB,aAAa,KAAK,WAAW;GAC7B,OAAO,KAAK,WAAW;GACxB;AAGD,MAAI,KAAK,WAAW,gBAAgB,YAAY,OAAO;AACrD,QAAK,aAAa,KAAK,WAAW;AAClC,QAAK,eAAe,KAAK,WAAW;aAI7B,KAAK,WAAW,gBAAgB,YAAY,MACnD,MAAK,OAAO,CAAC,KAAK,WAAW,IAAI,OAAO,IAAI;AAG9C,SAAO;;;;;;;;;CAUT,AAAO,QAAc;AACnB,SAAO,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,EAAE,KAAK,YAAmC;;;;;CAMxG,IAAW,UAAU;AACnB,SAAO,KAAK,WAAW;;;oBA7DF,OAAO;YAG7B,oCAAoC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const require_decorateMetadata = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
4
4
|
const require_decorate = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
5
|
-
const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
|
|
6
5
|
const require_array = require('../../../utils/array.js');
|
|
6
|
+
const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
|
|
7
7
|
require('../../../utils/index.js');
|
|
8
8
|
const require_BaseRecord = require('../../../storage/BaseRecord.js');
|
|
9
9
|
const require_uuid = require('../../../utils/uuid.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 } from "../../../utils/array.mjs";
|
|
6
|
+
import { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
|
|
7
7
|
import "../../../utils/index.mjs";
|
|
8
8
|
import { BaseRecord } from "../../../storage/BaseRecord.mjs";
|
|
9
9
|
import { uuid } from "../../../utils/uuid.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2CredentialRecord.mjs","names":["tags: Tags<DefaultW3cV2CredentialTags, TagsBase>"],"sources":["../../../../src/modules/vc/repository/W3cV2CredentialRecord.ts"],"sourcesContent":["import { BaseRecord, type Tags, type TagsBase } from '../../../storage/BaseRecord'\nimport {
|
|
1
|
+
{"version":3,"file":"W3cV2CredentialRecord.mjs","names":["tags: Tags<DefaultW3cV2CredentialTags, TagsBase>"],"sources":["../../../../src/modules/vc/repository/W3cV2CredentialRecord.ts"],"sourcesContent":["import { BaseRecord, type Tags, type TagsBase } from '../../../storage/BaseRecord'\nimport { asArray, JsonTransformer } from '../../../utils'\nimport type { Constructable } from '../../../utils/mixins'\nimport { uuid } from '../../../utils/uuid'\nimport { ClaimFormat, W3cV2EnvelopedVerifiableCredential, type W3cV2VerifiableCredential } from '../models'\nimport { W3cV2VerifiableCredentialTransformer } from '../models/credential/W3cV2VerifiableCredential'\n\nexport interface W3cV2CredentialRecordOptions {\n id?: string\n createdAt?: Date\n credential: W3cV2VerifiableCredential\n}\n\nexport type DefaultW3cV2CredentialTags = {\n issuerId: string\n subjectIds: Array<string>\n schemaIds: Array<string>\n contexts: Array<string>\n givenId?: string\n claimFormat: W3cV2VerifiableCredential['claimFormat']\n\n types: Array<string>\n algs?: Array<string>\n}\n\nexport class W3cV2CredentialRecord extends BaseRecord<DefaultW3cV2CredentialTags> {\n public static readonly type = 'W3cV2CredentialRecord'\n public readonly type = W3cV2CredentialRecord.type\n\n @W3cV2VerifiableCredentialTransformer()\n public credential!: W3cV2VerifiableCredential\n\n public constructor(props: W3cV2CredentialRecordOptions) {\n super()\n if (props) {\n this.id = props.id ?? uuid()\n this.createdAt = props.createdAt ?? new Date()\n this.credential = props.credential\n }\n }\n\n public getTags(): Tags<DefaultW3cV2CredentialTags, TagsBase> {\n const resolvedCredential = this.credential.resolvedCredential\n\n // Contexts are usually strings, but can sometimes be objects. We're unable to use objects as tags,\n // so we filter out the objects before setting the tags.\n const stringContexts = resolvedCredential.contexts.filter((ctx): ctx is string => typeof ctx === 'string')\n\n const tags: Tags<DefaultW3cV2CredentialTags, TagsBase> = {\n ...this._tags,\n issuerId: resolvedCredential.issuerId,\n subjectIds: resolvedCredential.credentialSubjectIds,\n schemaIds: resolvedCredential.credentialSchemaIds,\n contexts: stringContexts,\n givenId: resolvedCredential.id,\n claimFormat: this.credential.claimFormat,\n types: asArray(resolvedCredential.type),\n }\n\n if (this.credential instanceof W3cV2EnvelopedVerifiableCredential) {\n const enveloped = this.credential.envelopedCredential\n if (enveloped.claimFormat === ClaimFormat.JwtW3cVc) {\n tags.algs = [enveloped.jwt.header.alg]\n } else if (enveloped.claimFormat === ClaimFormat.SdJwtW3cVc) {\n tags.algs = [enveloped.sdJwt.header.alg]\n }\n }\n\n return tags\n }\n\n /**\n * This overwrites the default `clone` method for records, as the W3cV3CredentialRecord\n * has issues with the default clone method due to the way the JWT and SD-JWT\n * records are implemented. This is a temporary way to make sure the clone still works, but ideally\n * we find an alternative.\n */\n public clone(): this {\n return JsonTransformer.fromJSON(JsonTransformer.toJSON(this), this.constructor as Constructable<this>)\n }\n\n /**\n * encoded is convenience method added to all credential records\n */\n public get encoded() {\n return this.credential.encoded\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAa,wBAAb,MAAa,8BAA8B,WAAuC;CAOhF,AAAO,YAAY,OAAqC;AACtD,SAAO;OANO,OAAO,sBAAsB;AAO3C,MAAI,OAAO;AACT,QAAK,KAAK,MAAM,MAAM,MAAM;AAC5B,QAAK,YAAY,MAAM,6BAAa,IAAI,MAAM;AAC9C,QAAK,aAAa,MAAM;;;CAI5B,AAAO,UAAsD;EAC3D,MAAM,qBAAqB,KAAK,WAAW;EAI3C,MAAM,iBAAiB,mBAAmB,SAAS,QAAQ,QAAuB,OAAO,QAAQ,SAAS;EAE1G,MAAMA,OAAmD;GACvD,GAAG,KAAK;GACR,UAAU,mBAAmB;GAC7B,YAAY,mBAAmB;GAC/B,WAAW,mBAAmB;GAC9B,UAAU;GACV,SAAS,mBAAmB;GAC5B,aAAa,KAAK,WAAW;GAC7B,OAAO,QAAQ,mBAAmB,KAAK;GACxC;AAED,MAAI,KAAK,sBAAsB,oCAAoC;GACjE,MAAM,YAAY,KAAK,WAAW;AAClC,OAAI,UAAU,gBAAgB,YAAY,SACxC,MAAK,OAAO,CAAC,UAAU,IAAI,OAAO,IAAI;YAC7B,UAAU,gBAAgB,YAAY,WAC/C,MAAK,OAAO,CAAC,UAAU,MAAM,OAAO,IAAI;;AAI5C,SAAO;;;;;;;;CAST,AAAO,QAAc;AACnB,SAAO,gBAAgB,SAAS,gBAAgB,OAAO,KAAK,EAAE,KAAK,YAAmC;;;;;CAMxG,IAAW,UAAU;AACnB,SAAO,KAAK,WAAW;;;sBA3DF,OAAO;YAG7B,sCAAsC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClaimFormat } from "../models/ClaimFormat.mjs";
|
|
2
1
|
import { SingleOrArray } from "../../../types.mjs";
|
|
2
|
+
import { ClaimFormat } from "../models/ClaimFormat.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts
|
|
5
5
|
interface W3cV2SdJwtHeader {
|
|
@@ -24,7 +24,7 @@ interface W3cV2SdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp>
|
|
|
24
24
|
payload: Record<string, unknown>;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
declare function sdJwtVcHasher(data: string | ArrayBufferLike, alg: string): Uint8Array<
|
|
27
|
+
declare function sdJwtVcHasher(data: string | ArrayBufferLike, alg: string): Uint8Array<ArrayBuffer>;
|
|
28
28
|
declare function decodeSdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp>(compact: string, claimFormat: T): W3cV2SdJwt<T>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { W3cV2SdJwt, W3cV2SdJwtHeader, W3cV2SdJwtPayload, decodeSdJwt, sdJwtVcHasher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwt.d.mts","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwt.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,gBAAA;;;;AAAjB;AAMiB,UAAA,iBAAA,CAAiB;EAOjB,IAAA,EANT,aAMmB,CAAA,MAAA,CAAA;EAAA,GAAA,CAAA,EAAA,MAAA;KAAW,CAAA,EAAA,MAAA;WAAyB,EAAA,MAAY,CAAA,EAAA,OAAA;;AAGjE,UAHO,UAGP,CAAA,UAH4B,WAAA,CAAY,UAGxC,GAHqD,WAAA,CAAY,UAGjE,CAAA,CAAA;aACC,EAHI,CAGJ;SACK,EAAA,MAAA;QAEJ,EAJF,gBAIE;SACC,EAJF,iBAIE;EAAM,YAAA,EAHH,iBAGG;EAIH,KAAA,CAAA,EAAA;IAAa,MAAA,EALjB,MAKiB,CAAA,MAAA,EAAA,OAAA,CAAA;IAAgB,OAAA,EAJhC,MAIgC,CAAA,MAAA,EAAA,OAAA,CAAA;;;AAA4B,iBAAzD,aAAA,CAAyD,IAAA,EAAA,MAAA,GAA5B,eAA4B,EAAA,GAAA,EAAA,MAAA,CAAA,EAAA,UAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"W3cV2SdJwt.d.mts","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwt.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,gBAAA;;;;AAAjB;AAMiB,UAAA,iBAAA,CAAiB;EAOjB,IAAA,EANT,aAMmB,CAAA,MAAA,CAAA;EAAA,GAAA,CAAA,EAAA,MAAA;KAAW,CAAA,EAAA,MAAA;WAAyB,EAAA,MAAY,CAAA,EAAA,OAAA;;AAGjE,UAHO,UAGP,CAAA,UAH4B,WAAA,CAAY,UAGxC,GAHqD,WAAA,CAAY,UAGjE,CAAA,CAAA;aACC,EAHI,CAGJ;SACK,EAAA,MAAA;QAEJ,EAJF,gBAIE;SACC,EAJF,iBAIE;EAAM,YAAA,EAHH,iBAGG;EAIH,KAAA,CAAA,EAAA;IAAa,MAAA,EALjB,MAKiB,CAAA,MAAA,EAAA,OAAA,CAAA;IAAgB,OAAA,EAJhC,MAIgC,CAAA,MAAA,EAAA,OAAA,CAAA;;;AAA4B,iBAAzD,aAAA,CAAyD,IAAA,EAAA,MAAA,GAA5B,eAA4B,EAAA,GAAA,EAAA,MAAA,CAAA,EAAA,UAAA,CAAA,WAAA,CAAA;AAIzD,iBAAA,WAAW,CAAA,UAAW,WAAA,CAAY,UAAvB,GAAoC,WAAA,CAAY,UAAhD,CAAA,CAAA,OAAA,EAAA,MAAA,EAAA,WAAA,EAEZ,CAFY,CAAA,EAGxB,UAHwB,CAGb,CAHa,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClaimFormat } from "../models/ClaimFormat.js";
|
|
2
1
|
import { SingleOrArray } from "../../../types.js";
|
|
2
|
+
import { ClaimFormat } from "../models/ClaimFormat.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts
|
|
5
5
|
interface W3cV2SdJwtHeader {
|
|
@@ -24,7 +24,7 @@ interface W3cV2SdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp>
|
|
|
24
24
|
payload: Record<string, unknown>;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
declare function sdJwtVcHasher(data: string | ArrayBufferLike, alg: string): Uint8Array<
|
|
27
|
+
declare function sdJwtVcHasher(data: string | ArrayBufferLike, alg: string): Uint8Array<ArrayBuffer>;
|
|
28
28
|
declare function decodeSdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp>(compact: string, claimFormat: T): W3cV2SdJwt<T>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { W3cV2SdJwt, W3cV2SdJwtHeader, W3cV2SdJwtPayload, decodeSdJwt, sdJwtVcHasher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwt.d.ts","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwt.ts"],"sourcesContent":[],"mappings":";;;;UAMiB,gBAAA;;EAAA,GAAA,CAAA,EAAA,MAAA;EAMA,CAAA,QAAA,EAAA,MAAA,CAAA,EAAiB,OAAA;AAOlC;AAA2B,UAPV,iBAAA,CAOU;MAAW,EAN9B,aAM0C,CAAA,MAAA,CAAA;KAAa,CAAA,EAAA,MAAA;KAChD,CAAA,EAAA,MAAA;WAEL,EAAA,MAAA,CAAA,EAAA,OAAA;;AAEM,UALC,UAKD,CAAA,UALsB,WAAA,CAAY,UAKlC,GAL+C,WAAA,CAAY,UAK3D,CAAA,CAAA;aAEJ,EANG,CAMH;SACC,EAAA,MAAA;EAAM,MAAA,EALT,gBAKS;EAIH,OAAA,EARL,iBAQkB;EAAA,YAAA,EAPb,iBAOa;OAAgB,CAAA,EAAA;IAA4B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A,EAG/C,UAH+C,CAGpC,CAHoC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwt.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwt.ts"],"sourcesContent":["import { decodeSdJwtSync, getClaimsSync } from '@sd-jwt/decode'\nimport { Hasher } from '../../../crypto'\nimport { CredoError } from '../../../error'\nimport { type SingleOrArray
|
|
1
|
+
{"version":3,"file":"W3cV2SdJwt.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwt.ts"],"sourcesContent":["import { decodeSdJwtSync, getClaimsSync } from '@sd-jwt/decode'\nimport { Hasher } from '../../../crypto'\nimport { CredoError } from '../../../error'\nimport { isJsonObject, type SingleOrArray } from '../../../types'\nimport { ClaimFormat } from '../models'\n\nexport interface W3cV2SdJwtHeader {\n alg: string\n kid?: string\n [property: string]: unknown\n}\n\nexport interface W3cV2SdJwtPayload {\n type: SingleOrArray<string>\n iss?: string\n jti?: string\n [property: string]: unknown\n}\n\nexport interface W3cV2SdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp> {\n claimFormat: T\n compact: string\n header: W3cV2SdJwtHeader\n payload: W3cV2SdJwtPayload\n prettyClaims: W3cV2SdJwtPayload\n kbJwt?: {\n header: Record<string, unknown>\n payload: Record<string, unknown>\n }\n}\n\nexport function sdJwtVcHasher(data: string | ArrayBufferLike, alg: string) {\n return Hasher.hash(typeof data === 'string' ? data : new Uint8Array(data), alg)\n}\n\nexport function decodeSdJwt<T extends ClaimFormat.SdJwtW3cVc | ClaimFormat.SdJwtW3cVp>(\n compact: string,\n claimFormat: T\n): W3cV2SdJwt<T> {\n const { jwt, disclosures, kbJwt } = decodeSdJwtSync(compact, sdJwtVcHasher)\n\n const header = jwt.header as W3cV2SdJwtHeader\n const payload = jwt.payload as W3cV2SdJwtPayload\n const prettyClaims = getClaimsSync(payload, disclosures, sdJwtVcHasher) as W3cV2SdJwtPayload\n\n if (!isJsonObject(prettyClaims)) {\n throw new CredoError('SD-JWT claims are not a valid JSON object')\n }\n\n return {\n claimFormat,\n compact,\n header,\n payload,\n prettyClaims,\n kbJwt,\n }\n}\n"],"mappings":";;;;;;;;;;;AA+BA,SAAgB,cAAc,MAAgC,KAAa;AACzE,QAAO,OAAO,KAAK,OAAO,SAAS,WAAW,OAAO,IAAI,WAAW,KAAK,EAAE,IAAI;;AAGjF,SAAgB,YACd,SACA,aACe;CACf,MAAM,EAAE,KAAK,aAAa,UAAU,gBAAgB,SAAS,cAAc;CAE3E,MAAM,SAAS,IAAI;CACnB,MAAM,UAAU,IAAI;CACpB,MAAM,eAAe,cAAc,SAAS,aAAa,cAAc;AAEvE,KAAI,CAAC,aAAa,aAAa,CAC7B,OAAM,IAAI,WAAW,4CAA4C;AAGnE,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W3cV2SdJwtVerifiableCredential } from "./W3cV2SdJwtVerifiableCredential.mjs";
|
|
2
|
-
import { W3cV2SdJwtVerifiablePresentation } from "./W3cV2SdJwtVerifiablePresentation.mjs";
|
|
3
2
|
import { W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions } from "../W3cV2CredentialServiceOptions.mjs";
|
|
3
|
+
import { W3cV2SdJwtVerifiablePresentation } from "./W3cV2SdJwtVerifiablePresentation.mjs";
|
|
4
4
|
import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "../models/W3cV2VerifyResult.mjs";
|
|
5
5
|
import { AgentContext } from "../../../agent/context/AgentContext.mjs";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { W3cV2SdJwtVerifiableCredential } from "./W3cV2SdJwtVerifiableCredential.js";
|
|
2
|
-
import { W3cV2SdJwtVerifiablePresentation } from "./W3cV2SdJwtVerifiablePresentation.js";
|
|
3
2
|
import { W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions } from "../W3cV2CredentialServiceOptions.js";
|
|
3
|
+
import { W3cV2SdJwtVerifiablePresentation } from "./W3cV2SdJwtVerifiablePresentation.js";
|
|
4
4
|
import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "../models/W3cV2VerifyResult.js";
|
|
5
5
|
import { AgentContext } from "../../../agent/context/AgentContext.js";
|
|
6
6
|
|
|
@@ -5,10 +5,10 @@ const require_CredoError = require('../../../error/CredoError.js');
|
|
|
5
5
|
require('../../../error/index.js');
|
|
6
6
|
require('../../../plugins/index.js');
|
|
7
7
|
const require_decorate = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
8
|
+
const require_array = require('../../../utils/array.js');
|
|
8
9
|
const require_TypedArrayEncoder = require('../../../utils/TypedArrayEncoder.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_KeyManagementApi = require('../../kms/KeyManagementApi.js');
|
|
@@ -99,7 +99,7 @@ let W3cV2SdJwtCredentialService = class W3cV2SdJwtCredentialService$1 {
|
|
|
99
99
|
kbVerifier: holder ? require_utils.getSdJwtVerifier(agentContext, holder.publicJwk) : void 0
|
|
100
100
|
});
|
|
101
101
|
try {
|
|
102
|
-
await sdJwt.verify(credential.encoded
|
|
102
|
+
await sdJwt.verify(credential.encoded);
|
|
103
103
|
validationResults.validations.signature = { isValid: true };
|
|
104
104
|
} catch (error) {
|
|
105
105
|
validationResults.validations.signature = {
|
|
@@ -181,7 +181,7 @@ let W3cV2SdJwtCredentialService = class W3cV2SdJwtCredentialService$1 {
|
|
|
181
181
|
kbVerifier: holder ? require_utils.getSdJwtVerifier(agentContext, holder.publicJwk) : void 0
|
|
182
182
|
});
|
|
183
183
|
try {
|
|
184
|
-
await sdjwt.verify(presentation.encoded
|
|
184
|
+
await sdjwt.verify(presentation.encoded);
|
|
185
185
|
validationResults.validations.presentationSignature = { isValid: true };
|
|
186
186
|
} catch (error) {
|
|
187
187
|
validationResults.validations.presentationSignature = {
|
|
@@ -4,10 +4,10 @@ import { CredoError } from "../../../error/CredoError.mjs";
|
|
|
4
4
|
import "../../../error/index.mjs";
|
|
5
5
|
import { injectable } from "../../../plugins/index.mjs";
|
|
6
6
|
import { __decorate } from "../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
7
|
+
import { asArray } from "../../../utils/array.mjs";
|
|
7
8
|
import { TypedArrayEncoder } from "../../../utils/TypedArrayEncoder.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 { KeyManagementApi } from "../../kms/KeyManagementApi.mjs";
|
|
@@ -95,7 +95,7 @@ let W3cV2SdJwtCredentialService = class W3cV2SdJwtCredentialService$1 {
|
|
|
95
95
|
kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : void 0
|
|
96
96
|
});
|
|
97
97
|
try {
|
|
98
|
-
await sdJwt.verify(credential.encoded
|
|
98
|
+
await sdJwt.verify(credential.encoded);
|
|
99
99
|
validationResults.validations.signature = { isValid: true };
|
|
100
100
|
} catch (error) {
|
|
101
101
|
validationResults.validations.signature = {
|
|
@@ -177,7 +177,7 @@ let W3cV2SdJwtCredentialService = class W3cV2SdJwtCredentialService$1 {
|
|
|
177
177
|
kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : void 0
|
|
178
178
|
});
|
|
179
179
|
try {
|
|
180
|
-
await sdjwt.verify(presentation.encoded
|
|
180
|
+
await sdjwt.verify(presentation.encoded);
|
|
181
181
|
validationResults.validations.presentationSignature = { isValid: true };
|
|
182
182
|
} catch (error) {
|
|
183
183
|
validationResults.validations.presentationSignature = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwtCredentialService.mjs","names":["W3cV2SdJwtCredentialService","validationResults: W3cV2VerifyCredentialResult","credential: W3cV2SdJwtVerifiableCredential","validationResults: W3cV2VerifyPresentationResult","presentation: W3cV2SdJwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult"],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.ts"],"sourcesContent":["import { SDJwtInstance } from '@sd-jwt/core'\nimport type { DisclosureFrame, PresentationFrame, SDJWTConfig } from '@sd-jwt/types'\nimport type { AgentContext } from '../../../agent/context'\nimport { JwtPayload } from '../../../crypto'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { JsonTransformer, MessageValidator, TypedArrayEncoder, asArray, nowInSeconds } from '../../../utils'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type/keyDidMapping'\nimport { KeyManagementApi } from '../../kms'\nimport {\n extractKeyFromHolderBinding,\n getSdJwtSigner,\n getSdJwtVerifier,\n parseHolderBindingFromCredential,\n} from '../../sd-jwt-vc/utils'\nimport type {\n W3cV2SdJwtSignCredentialOptions,\n W3cV2SdJwtSignPresentationOptions,\n W3cV2SdJwtVcPresentOptions,\n W3cV2SdJwtVerifyCredentialOptions,\n W3cV2SdJwtVerifyPresentationOptions,\n} from '../W3cV2CredentialServiceOptions'\nimport type {\n SingleValidationResult,\n W3cV2JsonCredential,\n W3cV2JsonPresentation,\n W3cV2VerifyCredentialResult,\n W3cV2VerifyPresentationResult,\n} from '../models'\nimport {\n extractHolderFromPresentationCredentials,\n getVerificationMethodForJwt,\n validateAndResolveVerificationMethod,\n} from '../v2-jwt-utils'\nimport { sdJwtVcHasher } from './W3cV2SdJwt'\nimport { W3cV2SdJwtVerifiableCredential } from './W3cV2SdJwtVerifiableCredential'\nimport { W3cV2SdJwtVerifiablePresentation } from './W3cV2SdJwtVerifiablePresentation'\n\n/**\n * List of fields that cannot be selectively disclosed.\n *\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-with-sd-jwt\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-vps-sd-jwt\n */\nconst NON_DISCLOSEABLE_FIELDS = ['@context', 'type', 'credentialStatus', 'credentialSchema', 'relatedResource']\n\n/**\n * Supports signing and verifying W3C Verifiable Credentials and Presentations\n * secured with Selective Disclosure JSON Web Tokens (SD-JWT).\n *\n * @see https://www.w3.org/TR/vc-data-model/\n * @see https://www.w3.org/TR/vc-jose-cose/#with-sd-jwt\n */\n@injectable()\nexport class W3cV2SdJwtCredentialService {\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cV2SdJwtSignCredentialOptions\n ): Promise<W3cV2SdJwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // The JWT payload is simply the credential\n const payload = JsonTransformer.toJSON(options.credential) as W3cV2JsonCredential\n\n // Add iat and cnf to the payload\n payload.iat = nowInSeconds()\n payload.cnf = options.holder ? (await extractKeyFromHolderBinding(agentContext, options.holder)).cnf : undefined\n\n // Validate and resolve the verification method\n const publicJwk = await validateAndResolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n // Validate the disclosure frame\n const disclosureFrame = options.disclosureFrame as DisclosureFrame<W3cV2JsonCredential> | undefined\n this.validateDisclosureFrame(disclosureFrame)\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n signer: getSdJwtSigner(agentContext, publicJwk),\n hashAlg: options.hashingAlgorithm ?? 'sha-256',\n signAlg: options.alg,\n })\n\n // Sign SD-JWT\n const compact = await sdJwt.issue<W3cV2JsonCredential>(payload, disclosureFrame, {\n header: {\n typ: 'vc+sd-jwt',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n return W3cV2SdJwtVerifiableCredential.fromCompact(compact)\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: W3cV2SdJwtVerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n const validationResults: W3cV2VerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n })\n\n try {\n let credential: W3cV2SdJwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential\n // Otherwise, it is done by fromCompact below\n if (options.credential instanceof W3cV2SdJwtVerifiableCredential) {\n options.credential.validate()\n }\n\n credential =\n options.credential instanceof W3cV2SdJwtVerifiableCredential\n ? options.credential\n : W3cV2SdJwtVerifiableCredential.fromCompact(options.credential)\n\n // Validate JWT payload\n JwtPayload.fromJson(credential.sdJwt.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 const holderBinding = parseHolderBindingFromCredential(credential.sdJwt.prettyClaims)\n const holder = holderBinding ? await extractKeyFromHolderBinding(agentContext, holderBinding) : undefined\n\n sdJwt.config({\n verifier: getSdJwtVerifier(agentContext, issuerPublicKey),\n kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : undefined,\n })\n\n try {\n await sdJwt.verify(credential.encoded, [], false)\n\n validationResults.validations.signature = {\n isValid: true,\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 validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\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: W3cV2SdJwtSignPresentationOptions\n ): Promise<W3cV2SdJwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // The JWT payload is simply the presentation\n const payload = JsonTransformer.toJSON(options.presentation) as W3cV2JsonPresentation\n\n // Add the nonce and aud to the payload\n payload.nonce = options.challenge\n payload.aud = options.domain\n\n const holder = await extractHolderFromPresentationCredentials(agentContext, options.presentation)\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n signer: getSdJwtSigner(agentContext, holder.publicJwk),\n hashAlg: options.hashingAlgorithm ?? 'sha-256',\n signAlg: holder.alg,\n })\n\n // Validate the disclosure frame\n const disclosureFrame = options.disclosureFrame as DisclosureFrame<W3cV2JsonPresentation> | undefined\n this.validateDisclosureFrame(disclosureFrame)\n\n // Sign SD-JWT\n const compact = await sdJwt.issue<W3cV2JsonPresentation>(payload, disclosureFrame, {\n header: {\n typ: 'vp+sd-jwt',\n alg: holder.alg,\n kid: holder?.cnf?.kid,\n },\n })\n\n return W3cV2SdJwtVerifiablePresentation.fromCompact(compact)\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: W3cV2SdJwtVerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n const validationResults: W3cV2VerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n const sdjwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n })\n\n try {\n let presentation: W3cV2SdJwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cV2SdJwtVerifiablePresentation) {\n MessageValidator.validateSync(options.presentation.resolvedPresentation)\n }\n\n presentation =\n options.presentation instanceof W3cV2SdJwtVerifiablePresentation\n ? options.presentation\n : W3cV2SdJwtVerifiablePresentation.fromCompact(options.presentation)\n\n // Validate JWT payload\n JwtPayload.fromJson(presentation.sdJwt.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 proverVerificationMethod = await getVerificationMethodForJwt(agentContext, presentation, ['authentication'])\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n const holderBinding = parseHolderBindingFromCredential(presentation.sdJwt.prettyClaims)\n const holder = holderBinding ? await extractKeyFromHolderBinding(agentContext, holderBinding) : undefined\n\n sdjwt.config({\n verifier: getSdJwtVerifier(agentContext, proverPublicKey),\n kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : undefined,\n })\n\n try {\n await sdjwt.verify(presentation.encoded, [], false)\n\n validationResults.validations.presentationSignature = {\n isValid: true,\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 W3cV2SdJwtVerifiableCredential)) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is not of format SD-JWT. Presentations in SD-JWT format can only contain credentials in SD-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 public async present(\n agentContext: AgentContext,\n options: W3cV2SdJwtVcPresentOptions\n ): Promise<W3cV2SdJwtVerifiableCredential> {\n const originalCompact =\n options.credential instanceof W3cV2SdJwtVerifiableCredential ? options.credential.encoded : options.credential\n\n const presentationFrame = options.presentationFrame as PresentationFrame<W3cV2JsonCredential>\n\n const sdjwt = new SDJwtInstance(this.getBaseSdJwtConfig(agentContext))\n const disclosedCompact = await sdjwt.present(originalCompact, presentationFrame)\n\n return W3cV2SdJwtVerifiableCredential.fromCompact(disclosedCompact)\n }\n\n private validateDisclosureFrame(disclosureFrame?: DisclosureFrame<W3cV2JsonCredential | W3cV2JsonPresentation>) {\n if (!disclosureFrame) return\n\n for (const field of NON_DISCLOSEABLE_FIELDS) {\n if (disclosureFrame[field]) {\n throw new CredoError(`'${field}' property cannot be selectively disclosed`)\n }\n\n if (Array.isArray(disclosureFrame._sd) && disclosureFrame._sd?.includes(field)) {\n throw new CredoError(`'${field}' property cannot be selectively disclosed`)\n }\n }\n }\n\n private getBaseSdJwtConfig(agentContext: AgentContext): SDJWTConfig {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return {\n hasher: sdJwtVcHasher,\n saltGenerator: (length) => TypedArrayEncoder.toBase64URL(kms.randomBytes({ length })).slice(0, length),\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAM,0BAA0B;CAAC;CAAY;CAAQ;CAAoB;CAAoB;CAAkB;AAUxG,wCAAMA,8BAA4B;;;;CAIvC,MAAa,eACX,cACA,SACyC;AA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,YAAY,iBAAiB;;CAGrE,AAAQ,wBAAwB,iBAAgF;AAC9G,MAAI,CAAC,gBAAiB;AAEtB,OAAK,MAAM,SAAS,yBAAyB;AAC3C,OAAI,gBAAgB,OAClB,OAAM,IAAI,WAAW,IAAI,MAAM,4CAA4C;AAG7E,OAAI,MAAM,QAAQ,gBAAgB,IAAI,IAAI,gBAAgB,KAAK,SAAS,MAAM,CAC5E,OAAM,IAAI,WAAW,IAAI,MAAM,4CAA4C;;;CAKjF,AAAQ,mBAAmB,cAAyC;EAClE,MAAM,MAAM,aAAa,QAAQ,iBAAiB;AAElD,SAAO;GACL,QAAQ;GACR,gBAAgB,WAAW,kBAAkB,YAAY,IAAI,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,OAAO;GACvG;;;0CA9XJ,YAAY"}
|
|
1
|
+
{"version":3,"file":"W3cV2SdJwtCredentialService.mjs","names":["W3cV2SdJwtCredentialService","validationResults: W3cV2VerifyCredentialResult","credential: W3cV2SdJwtVerifiableCredential","validationResults: W3cV2VerifyPresentationResult","presentation: W3cV2SdJwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult"],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.ts"],"sourcesContent":["import { SDJwtInstance } from '@sd-jwt/core'\nimport type { DisclosureFrame, PresentationFrame, SDJWTConfig } from '@sd-jwt/types'\nimport type { AgentContext } from '../../../agent/context'\nimport { JwtPayload } from '../../../crypto'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { asArray, JsonTransformer, MessageValidator, nowInSeconds, TypedArrayEncoder } from '../../../utils'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type/keyDidMapping'\nimport { KeyManagementApi } from '../../kms'\nimport {\n extractKeyFromHolderBinding,\n getSdJwtSigner,\n getSdJwtVerifier,\n parseHolderBindingFromCredential,\n} from '../../sd-jwt-vc/utils'\nimport type {\n SingleValidationResult,\n W3cV2JsonCredential,\n W3cV2JsonPresentation,\n W3cV2VerifyCredentialResult,\n W3cV2VerifyPresentationResult,\n} from '../models'\nimport {\n extractHolderFromPresentationCredentials,\n getVerificationMethodForJwt,\n validateAndResolveVerificationMethod,\n} from '../v2-jwt-utils'\nimport type {\n W3cV2SdJwtSignCredentialOptions,\n W3cV2SdJwtSignPresentationOptions,\n W3cV2SdJwtVcPresentOptions,\n W3cV2SdJwtVerifyCredentialOptions,\n W3cV2SdJwtVerifyPresentationOptions,\n} from '../W3cV2CredentialServiceOptions'\nimport { sdJwtVcHasher } from './W3cV2SdJwt'\nimport { W3cV2SdJwtVerifiableCredential } from './W3cV2SdJwtVerifiableCredential'\nimport { W3cV2SdJwtVerifiablePresentation } from './W3cV2SdJwtVerifiablePresentation'\n\n/**\n * List of fields that cannot be selectively disclosed.\n *\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-with-sd-jwt\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-vps-sd-jwt\n */\nconst NON_DISCLOSEABLE_FIELDS = ['@context', 'type', 'credentialStatus', 'credentialSchema', 'relatedResource']\n\n/**\n * Supports signing and verifying W3C Verifiable Credentials and Presentations\n * secured with Selective Disclosure JSON Web Tokens (SD-JWT).\n *\n * @see https://www.w3.org/TR/vc-data-model/\n * @see https://www.w3.org/TR/vc-jose-cose/#with-sd-jwt\n */\n@injectable()\nexport class W3cV2SdJwtCredentialService {\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cV2SdJwtSignCredentialOptions\n ): Promise<W3cV2SdJwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // The JWT payload is simply the credential\n const payload = JsonTransformer.toJSON(options.credential) as W3cV2JsonCredential\n\n // Add iat and cnf to the payload\n payload.iat = nowInSeconds()\n payload.cnf = options.holder ? (await extractKeyFromHolderBinding(agentContext, options.holder)).cnf : undefined\n\n // Validate and resolve the verification method\n const publicJwk = await validateAndResolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n // Validate the disclosure frame\n const disclosureFrame = options.disclosureFrame as DisclosureFrame<W3cV2JsonCredential> | undefined\n this.validateDisclosureFrame(disclosureFrame)\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n signer: getSdJwtSigner(agentContext, publicJwk),\n hashAlg: options.hashingAlgorithm ?? 'sha-256',\n signAlg: options.alg,\n })\n\n // Sign SD-JWT\n const compact = await sdJwt.issue<W3cV2JsonCredential>(payload, disclosureFrame, {\n header: {\n typ: 'vc+sd-jwt',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n return W3cV2SdJwtVerifiableCredential.fromCompact(compact)\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: W3cV2SdJwtVerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n const validationResults: W3cV2VerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n })\n\n try {\n let credential: W3cV2SdJwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential\n // Otherwise, it is done by fromCompact below\n if (options.credential instanceof W3cV2SdJwtVerifiableCredential) {\n options.credential.validate()\n }\n\n credential =\n options.credential instanceof W3cV2SdJwtVerifiableCredential\n ? options.credential\n : W3cV2SdJwtVerifiableCredential.fromCompact(options.credential)\n\n // Validate JWT payload\n JwtPayload.fromJson(credential.sdJwt.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 const holderBinding = parseHolderBindingFromCredential(credential.sdJwt.prettyClaims)\n const holder = holderBinding ? await extractKeyFromHolderBinding(agentContext, holderBinding) : undefined\n\n sdJwt.config({\n verifier: getSdJwtVerifier(agentContext, issuerPublicKey),\n kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : undefined,\n })\n\n try {\n await sdJwt.verify(credential.encoded)\n\n validationResults.validations.signature = {\n isValid: true,\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 validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\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: W3cV2SdJwtSignPresentationOptions\n ): Promise<W3cV2SdJwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // The JWT payload is simply the presentation\n const payload = JsonTransformer.toJSON(options.presentation) as W3cV2JsonPresentation\n\n // Add the nonce and aud to the payload\n payload.nonce = options.challenge\n payload.aud = options.domain\n\n const holder = await extractHolderFromPresentationCredentials(agentContext, options.presentation)\n\n const sdJwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n signer: getSdJwtSigner(agentContext, holder.publicJwk),\n hashAlg: options.hashingAlgorithm ?? 'sha-256',\n signAlg: holder.alg,\n })\n\n // Validate the disclosure frame\n const disclosureFrame = options.disclosureFrame as DisclosureFrame<W3cV2JsonPresentation> | undefined\n this.validateDisclosureFrame(disclosureFrame)\n\n // Sign SD-JWT\n const compact = await sdJwt.issue<W3cV2JsonPresentation>(payload, disclosureFrame, {\n header: {\n typ: 'vp+sd-jwt',\n alg: holder.alg,\n kid: holder?.cnf?.kid,\n },\n })\n\n return W3cV2SdJwtVerifiablePresentation.fromCompact(compact)\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: W3cV2SdJwtVerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n const validationResults: W3cV2VerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n const sdjwt = new SDJwtInstance({\n ...this.getBaseSdJwtConfig(agentContext),\n })\n\n try {\n let presentation: W3cV2SdJwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cV2SdJwtVerifiablePresentation) {\n MessageValidator.validateSync(options.presentation.resolvedPresentation)\n }\n\n presentation =\n options.presentation instanceof W3cV2SdJwtVerifiablePresentation\n ? options.presentation\n : W3cV2SdJwtVerifiablePresentation.fromCompact(options.presentation)\n\n // Validate JWT payload\n JwtPayload.fromJson(presentation.sdJwt.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 proverVerificationMethod = await getVerificationMethodForJwt(agentContext, presentation, ['authentication'])\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n const holderBinding = parseHolderBindingFromCredential(presentation.sdJwt.prettyClaims)\n const holder = holderBinding ? await extractKeyFromHolderBinding(agentContext, holderBinding) : undefined\n\n sdjwt.config({\n verifier: getSdJwtVerifier(agentContext, proverPublicKey),\n kbVerifier: holder ? getSdJwtVerifier(agentContext, holder.publicJwk) : undefined,\n })\n\n try {\n await sdjwt.verify(presentation.encoded)\n\n validationResults.validations.presentationSignature = {\n isValid: true,\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 W3cV2SdJwtVerifiableCredential)) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is not of format SD-JWT. Presentations in SD-JWT format can only contain credentials in SD-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 public async present(\n agentContext: AgentContext,\n options: W3cV2SdJwtVcPresentOptions\n ): Promise<W3cV2SdJwtVerifiableCredential> {\n const originalCompact =\n options.credential instanceof W3cV2SdJwtVerifiableCredential ? options.credential.encoded : options.credential\n\n const presentationFrame = options.presentationFrame as PresentationFrame<W3cV2JsonCredential>\n\n const sdjwt = new SDJwtInstance(this.getBaseSdJwtConfig(agentContext))\n const disclosedCompact = await sdjwt.present(originalCompact, presentationFrame)\n\n return W3cV2SdJwtVerifiableCredential.fromCompact(disclosedCompact)\n }\n\n private validateDisclosureFrame(disclosureFrame?: DisclosureFrame<W3cV2JsonCredential | W3cV2JsonPresentation>) {\n if (!disclosureFrame) return\n\n for (const field of NON_DISCLOSEABLE_FIELDS) {\n if (disclosureFrame[field]) {\n throw new CredoError(`'${field}' property cannot be selectively disclosed`)\n }\n\n if (Array.isArray(disclosureFrame._sd) && disclosureFrame._sd?.includes(field)) {\n throw new CredoError(`'${field}' property cannot be selectively disclosed`)\n }\n }\n }\n\n private getBaseSdJwtConfig(agentContext: AgentContext): SDJWTConfig {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return {\n hasher: sdJwtVcHasher,\n saltGenerator: (length) => TypedArrayEncoder.toBase64URL(kms.randomBytes({ length })).slice(0, length),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;EAEtG,MAAM,oBAAoB,QAAQ;EAGlC,MAAM,mBAAmB,MADX,IAAI,cAAc,KAAK,mBAAmB,aAAa,CAAC,CACjC,QAAQ,iBAAiB,kBAAkB;AAEhF,SAAO,+BAA+B,YAAY,iBAAiB;;CAGrE,AAAQ,wBAAwB,iBAAgF;AAC9G,MAAI,CAAC,gBAAiB;AAEtB,OAAK,MAAM,SAAS,yBAAyB;AAC3C,OAAI,gBAAgB,OAClB,OAAM,IAAI,WAAW,IAAI,MAAM,4CAA4C;AAG7E,OAAI,MAAM,QAAQ,gBAAgB,IAAI,IAAI,gBAAgB,KAAK,SAAS,MAAM,CAC5E,OAAM,IAAI,WAAW,IAAI,MAAM,4CAA4C;;;CAKjF,AAAQ,mBAAmB,cAAyC;EAClE,MAAM,MAAM,aAAa,QAAQ,iBAAiB;AAElD,SAAO;GACL,QAAQ;GACR,gBAAgB,WAAW,kBAAkB,YAAY,IAAI,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,OAAO;GACvG;;;0CA9XJ,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwtVerifiableCredential.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiableCredential.ts"],"sourcesContent":["import { CredoError } from '../../../error'\nimport { JsonTransformer, MessageValidator } from '../../../utils'\nimport { ClaimFormat } from '../models/ClaimFormat'\nimport { W3cV2Credential } from '../models/credential/W3cV2Credential'\nimport { type W3cV2SdJwt
|
|
1
|
+
{"version":3,"file":"W3cV2SdJwtVerifiableCredential.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiableCredential.ts"],"sourcesContent":["import { CredoError } from '../../../error'\nimport { JsonTransformer, MessageValidator } from '../../../utils'\nimport { ClaimFormat } from '../models/ClaimFormat'\nimport { W3cV2Credential } from '../models/credential/W3cV2Credential'\nimport { decodeSdJwt, type W3cV2SdJwt } from './W3cV2SdJwt'\n\nexport interface W3cV2SdJwtVerifiableCredentialOptions {\n sdJwt: W3cV2SdJwt<ClaimFormat.SdJwtW3cVc>\n}\n\n/**\n * Represents a Verifiable Credential encoded as a SD-JWT.\n *\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-with-sd-jwt\n */\nexport class W3cV2SdJwtVerifiableCredential {\n public constructor(options: W3cV2SdJwtVerifiableCredentialOptions) {\n this.sdJwt = options.sdJwt\n this.resolvedCredential = JsonTransformer.fromJSON(options.sdJwt.prettyClaims, W3cV2Credential, { validate: false })\n\n // Validates the SD-JWT and resolved credential\n this.validate()\n }\n\n public static fromCompact(compact: string) {\n const sdJwt = decodeSdJwt(compact, ClaimFormat.SdJwtW3cVc)\n\n return new W3cV2SdJwtVerifiableCredential({\n sdJwt,\n })\n }\n\n /**\n * The original SD-JWT.\n */\n public readonly sdJwt: W3cV2SdJwt<ClaimFormat.SdJwtW3cVc>\n\n /**\n * Resolved credential is the fully resolved {@link W3cV2Credential} instance.\n */\n public readonly resolvedCredential: W3cV2Credential\n\n /**\n * The encoded version of this credential.\n */\n public get encoded() {\n return this.sdJwt.compact\n }\n\n /**\n * The {@link ClaimFormat} of the credential.\n *\n * For W3C VC SD-JWT credentials this is always `vc+sd-jwt`.\n */\n public get claimFormat(): ClaimFormat.SdJwtW3cVc {\n return ClaimFormat.SdJwtW3cVc\n }\n\n /**\n * Validates the SD-JWT and the resolved credential.\n */\n public validate() {\n // Validate the resolved credential according to the data model\n MessageValidator.validateSync(this.resolvedCredential)\n\n // Basic JWT validations to ensure compliance to the specification\n const sdJwt = this.sdJwt\n const header = sdJwt.header\n const payload = sdJwt.prettyClaims\n\n if ('typ' in header && header.typ !== 'vc+sd-jwt') {\n throw new CredoError(`The provided W3C VC SD-JWT does not have the correct 'typ' header.`)\n }\n\n if ('cyt' in header && header.cyt !== 'vc') {\n throw new CredoError(`The provided W3C VC SD-JWT does not have the correct 'cyt' header.`)\n }\n\n const iss = header.iss ?? payload.iss\n if (iss) {\n if (this.resolvedCredential.issuerId !== iss) {\n throw new CredoError(`The provided W3C VC SD-JWT has both 'iss' and 'issuer' claims, but they differ.`)\n }\n }\n\n if (payload.jti) {\n if (this.resolvedCredential.id && this.resolvedCredential.id !== payload.jti) {\n throw new CredoError(`The provided W3C VC JWT has both 'jti' and 'id' claims, but they differ.`)\n }\n }\n\n if (payload.sub) {\n if (!this.resolvedCredential.credentialSubjectIds.includes(payload.sub as string)) {\n throw new CredoError(\n `The provided W3C VC SD-JWT has a 'sub' claim, but it does not match any credentialSubject.`\n )\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,IAAa,iCAAb,MAAa,+BAA+B;CAC1C,AAAO,YAAY,SAAgD;AACjE,OAAK,QAAQ,QAAQ;AACrB,OAAK,qBAAqB,gBAAgB,SAAS,QAAQ,MAAM,cAAc,iBAAiB,EAAE,UAAU,OAAO,CAAC;AAGpH,OAAK,UAAU;;CAGjB,OAAc,YAAY,SAAiB;AAGzC,SAAO,IAAI,+BAA+B,EACxC,OAHY,YAAY,SAAS,YAAY,WAAW,EAIzD,CAAC;;;;;CAgBJ,IAAW,UAAU;AACnB,SAAO,KAAK,MAAM;;;;;;;CAQpB,IAAW,cAAsC;AAC/C,SAAO,YAAY;;;;;CAMrB,AAAO,WAAW;AAEhB,mBAAiB,aAAa,KAAK,mBAAmB;EAGtD,MAAM,QAAQ,KAAK;EACnB,MAAM,SAAS,MAAM;EACrB,MAAM,UAAU,MAAM;AAEtB,MAAI,SAAS,UAAU,OAAO,QAAQ,YACpC,OAAM,IAAI,WAAW,qEAAqE;AAG5F,MAAI,SAAS,UAAU,OAAO,QAAQ,KACpC,OAAM,IAAI,WAAW,qEAAqE;EAG5F,MAAM,MAAM,OAAO,OAAO,QAAQ;AAClC,MAAI,KACF;OAAI,KAAK,mBAAmB,aAAa,IACvC,OAAM,IAAI,WAAW,kFAAkF;;AAI3G,MAAI,QAAQ,KACV;OAAI,KAAK,mBAAmB,MAAM,KAAK,mBAAmB,OAAO,QAAQ,IACvE,OAAM,IAAI,WAAW,2EAA2E;;AAIpG,MAAI,QAAQ,KACV;OAAI,CAAC,KAAK,mBAAmB,qBAAqB,SAAS,QAAQ,IAAc,CAC/E,OAAM,IAAI,WACR,6FACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cV2SdJwtVerifiablePresentation.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.ts"],"sourcesContent":["import { CredoError } from '../../../error'\nimport { JsonTransformer, MessageValidator } from '../../../utils'\nimport { ClaimFormat } from '../models'\nimport { W3cV2Presentation } from '../models/presentation/W3cV2Presentation'\nimport { type W3cV2SdJwt
|
|
1
|
+
{"version":3,"file":"W3cV2SdJwtVerifiablePresentation.mjs","names":[],"sources":["../../../../src/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.ts"],"sourcesContent":["import { CredoError } from '../../../error'\nimport { JsonTransformer, MessageValidator } from '../../../utils'\nimport { ClaimFormat } from '../models'\nimport { W3cV2Presentation } from '../models/presentation/W3cV2Presentation'\nimport { decodeSdJwt, type W3cV2SdJwt } from './W3cV2SdJwt'\n\nexport interface W3cV2SdJwtVerifiablePresentationOptions {\n sdJwt: W3cV2SdJwt<ClaimFormat.SdJwtW3cVp>\n}\n\n/**\n * Represents a Verifiable Presentation encoded as a SD-JWT.\n *\n * @see https://www.w3.org/TR/vc-jose-cose/#securing-vps-sd-jwt\n */\nexport class W3cV2SdJwtVerifiablePresentation {\n public constructor(options: W3cV2SdJwtVerifiablePresentationOptions) {\n this.sdJwt = options.sdJwt\n this.resolvedPresentation = JsonTransformer.fromJSON(options.sdJwt.prettyClaims, W3cV2Presentation, {\n validate: false,\n })\n\n // Validates the SD-JWT and resolved presentation\n this.validate()\n }\n\n public static fromCompact(compact: string) {\n const sdJwt = decodeSdJwt(compact, ClaimFormat.SdJwtW3cVp)\n\n return new W3cV2SdJwtVerifiablePresentation({\n sdJwt,\n })\n }\n\n /**\n * The original SD-JWT.\n */\n public readonly sdJwt: W3cV2SdJwt<ClaimFormat.SdJwtW3cVp>\n\n /**\n * Resolved presentation is the fully resolved {@link W3cV2Presentation} instance.\n */\n public readonly resolvedPresentation: W3cV2Presentation\n\n /**\n * The encoded version of this presentation.\n */\n public get encoded() {\n return this.sdJwt.compact\n }\n\n /**\n * The {@link ClaimFormat} of the presentation.\n *\n * For W3C VP SD-JWT credentials this is always `vp+sd-jwt`.\n */\n public get claimFormat(): ClaimFormat.SdJwtW3cVp {\n return ClaimFormat.SdJwtW3cVp\n }\n\n /**\n * Validates the SD-JWT and the resolved presentation.\n */\n public validate() {\n // Validate the resolved credential according to the data model\n MessageValidator.validateSync(this.resolvedPresentation)\n\n // Basic JWT validations to ensure compliance to the specification\n const sdJwt = this.sdJwt\n const header = sdJwt.header\n const payload = sdJwt.prettyClaims\n\n if ('typ' in header && header.typ !== 'vp+sd-jwt') {\n throw new CredoError(`The provided W3C VP JWT does not have the correct 'typ' header.`)\n }\n\n if ('cyt' in header && header.cyt !== 'vp') {\n throw new CredoError(`The provided W3C VP JWT does not have the correct 'cyt' header.`)\n }\n\n const iss = header.iss ?? payload.iss\n if (iss && this.resolvedPresentation.holderId) {\n if (this.resolvedPresentation.holderId !== iss) {\n throw new CredoError(`The provided W3C VP SD-JWT has both 'iss' and 'holder' claims, but they differ.`)\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,IAAa,mCAAb,MAAa,iCAAiC;CAC5C,AAAO,YAAY,SAAkD;AACnE,OAAK,QAAQ,QAAQ;AACrB,OAAK,uBAAuB,gBAAgB,SAAS,QAAQ,MAAM,cAAc,mBAAmB,EAClG,UAAU,OACX,CAAC;AAGF,OAAK,UAAU;;CAGjB,OAAc,YAAY,SAAiB;AAGzC,SAAO,IAAI,iCAAiC,EAC1C,OAHY,YAAY,SAAS,YAAY,WAAW,EAIzD,CAAC;;;;;CAgBJ,IAAW,UAAU;AACnB,SAAO,KAAK,MAAM;;;;;;;CAQpB,IAAW,cAAsC;AAC/C,SAAO,YAAY;;;;;CAMrB,AAAO,WAAW;AAEhB,mBAAiB,aAAa,KAAK,qBAAqB;EAGxD,MAAM,QAAQ,KAAK;EACnB,MAAM,SAAS,MAAM;EACrB,MAAM,UAAU,MAAM;AAEtB,MAAI,SAAS,UAAU,OAAO,QAAQ,YACpC,OAAM,IAAI,WAAW,kEAAkE;AAGzF,MAAI,SAAS,UAAU,OAAO,QAAQ,KACpC,OAAM,IAAI,WAAW,kEAAkE;EAGzF,MAAM,MAAM,OAAO,OAAO,QAAQ;AAClC,MAAI,OAAO,KAAK,qBAAqB,UACnC;OAAI,KAAK,qBAAqB,aAAa,IACzC,OAAM,IAAI,WAAW,kFAAkF"}
|
|
@@ -8,16 +8,16 @@ const require_did = require('../../utils/did.js');
|
|
|
8
8
|
require('../../utils/index.js');
|
|
9
9
|
const require_PublicJwk = require('../kms/jwk/PublicJwk.js');
|
|
10
10
|
require('../kms/index.js');
|
|
11
|
-
const require_keyDidMapping = require('../dids/domain/key-type/keyDidMapping.js');
|
|
12
11
|
const require_parse = require('../dids/domain/parse.js');
|
|
12
|
+
const require_keyDidMapping = require('../dids/domain/key-type/keyDidMapping.js');
|
|
13
13
|
const require_DidResolverService = require('../dids/services/DidResolverService.js');
|
|
14
14
|
const require_DidsApi = require('../dids/DidsApi.js');
|
|
15
15
|
require('../dids/index.js');
|
|
16
16
|
const require_W3cV2JwtVerifiableCredential = require('./jwt-vc/W3cV2JwtVerifiableCredential.js');
|
|
17
17
|
const require_W3cV2SdJwtVerifiableCredential = require('./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.js');
|
|
18
|
-
const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
|
|
19
18
|
const require_utils = require('../sd-jwt-vc/utils.js');
|
|
20
19
|
require('./sd-jwt-vc/index.js');
|
|
20
|
+
const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
|
|
21
21
|
require('./jwt-vc/index.js');
|
|
22
22
|
require('./models/index.js');
|
|
23
23
|
|
|
@@ -8,16 +8,16 @@ import { isDid } from "../../utils/did.mjs";
|
|
|
8
8
|
import "../../utils/index.mjs";
|
|
9
9
|
import { PublicJwk } from "../kms/jwk/PublicJwk.mjs";
|
|
10
10
|
import "../kms/index.mjs";
|
|
11
|
-
import { getPublicJwkFromVerificationMethod, getSupportedVerificationMethodTypesForPublicJwk } from "../dids/domain/key-type/keyDidMapping.mjs";
|
|
12
11
|
import { parseDid } from "../dids/domain/parse.mjs";
|
|
12
|
+
import { getPublicJwkFromVerificationMethod, getSupportedVerificationMethodTypesForPublicJwk } from "../dids/domain/key-type/keyDidMapping.mjs";
|
|
13
13
|
import { DidResolverService } from "../dids/services/DidResolverService.mjs";
|
|
14
14
|
import { DidsApi } from "../dids/DidsApi.mjs";
|
|
15
15
|
import "../dids/index.mjs";
|
|
16
16
|
import { W3cV2JwtVerifiableCredential } from "./jwt-vc/W3cV2JwtVerifiableCredential.mjs";
|
|
17
17
|
import { W3cV2SdJwtVerifiableCredential } from "./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs";
|
|
18
|
-
import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
|
|
19
18
|
import { extractKeyFromHolderBinding, parseHolderBindingFromCredential } from "../sd-jwt-vc/utils.mjs";
|
|
20
19
|
import "./sd-jwt-vc/index.mjs";
|
|
20
|
+
import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
|
|
21
21
|
import "./jwt-vc/index.mjs";
|
|
22
22
|
import "./models/index.mjs";
|
|
23
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2-jwt-utils.mjs","names":["claims: Record<string, unknown>","alg: KnownJwaSignatureAlgorithm","kid: string | undefined","iss: string | undefined","verificationMethod: VerificationMethod"],"sources":["../../../src/modules/vc/v2-jwt-utils.ts"],"sourcesContent":["import { AgentContext } from '../../agent'\nimport { CredoError } from '../../error'\nimport { asArray, isDid } from '../../utils'\nimport {\n type DidPurpose,\n DidResolverService,\n DidsApi,\n
|
|
1
|
+
{"version":3,"file":"v2-jwt-utils.mjs","names":["claims: Record<string, unknown>","alg: KnownJwaSignatureAlgorithm","kid: string | undefined","iss: string | undefined","verificationMethod: VerificationMethod"],"sources":["../../../src/modules/vc/v2-jwt-utils.ts"],"sourcesContent":["import { AgentContext } from '../../agent'\nimport { CredoError } from '../../error'\nimport { asArray, isDid } from '../../utils'\nimport {\n type DidPurpose,\n DidResolverService,\n DidsApi,\n getPublicJwkFromVerificationMethod,\n parseDid,\n VerificationMethod,\n} from '../dids'\nimport { getSupportedVerificationMethodTypesForPublicJwk } from '../dids/domain/key-type/keyDidMapping'\nimport { type KnownJwaSignatureAlgorithm, PublicJwk } from '../kms'\nimport { extractKeyFromHolderBinding, parseHolderBindingFromCredential } from '../sd-jwt-vc/utils'\nimport { W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation } from './jwt-vc'\nimport { W3cV2Presentation } from './models'\nimport { W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiablePresentation } from './sd-jwt-vc'\n\nexport async function validateAndResolveVerificationMethod(\n agentContext: AgentContext,\n verificationMethod: string,\n allowsPurposes?: DidPurpose[]\n) {\n if (!isDid(verificationMethod)) {\n throw new CredoError('Only did identifiers are supported as verification method')\n }\n\n const parsedDid = parseDid(verificationMethod)\n if (!parsedDid.fragment) {\n throw new CredoError(`didUrl '${parsedDid.didUrl}' does not contain a '#'. Unable to derive key from did document`)\n }\n\n const dids = agentContext.resolve(DidsApi)\n const { didDocument, keys } = await dids.resolveCreatedDidDocumentWithKeys(parsedDid.did)\n const verificationMethodObject = didDocument.dereferenceKey(verificationMethod, allowsPurposes)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethodObject)\n\n publicJwk.keyId =\n keys?.find(({ didDocumentRelativeKeyId }) => verificationMethodObject.id.endsWith(didDocumentRelativeKeyId))\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n\n return publicJwk\n}\n\nexport async function extractHolderFromPresentationCredentials(\n agentContext: AgentContext,\n presentation: W3cV2Presentation\n) {\n // At the moment, we only support signing presentations with a single credential\n // Technically, it should be possible to support more than a single one. However,\n // in the context we support (OID4VP) it doesn't make sense to support multiple ones.\n const credentials = asArray(presentation.verifiableCredential)\n if (credentials.length !== 1) {\n throw new CredoError('Only a single verifiable credential is supported in a presentation')\n }\n\n const credential = credentials[0]\n let claims: Record<string, unknown>\n\n if (credential.envelopedCredential instanceof W3cV2SdJwtVerifiableCredential) {\n claims = credential.envelopedCredential.sdJwt.prettyClaims\n } else {\n claims = credential.envelopedCredential.jwt.payload.toJson()\n }\n\n // We require the credential to include a holder binding in the form of a 'cnf' claim\n const holderBinding = parseHolderBindingFromCredential(claims)\n if (!holderBinding) {\n throw new CredoError('No holder binding found in credential included in presentation')\n }\n\n return await extractKeyFromHolderBinding(agentContext, holderBinding, true)\n}\n\n/**\n * This method tries to find the verification method associated with the JWT credential or presentation.\n * This verification method can then be used to verify the credential or presentation signature.\n */\nexport async function getVerificationMethodForJwt(\n agentContext: AgentContext,\n credential:\n | W3cV2JwtVerifiableCredential\n | W3cV2JwtVerifiablePresentation\n | W3cV2SdJwtVerifiableCredential\n | W3cV2SdJwtVerifiablePresentation,\n purpose?: DidPurpose[]\n) {\n let alg: KnownJwaSignatureAlgorithm\n let kid: string | undefined\n let iss: string | undefined\n\n // Determine the algorithm, kid and iss based on the type of credential / presentation\n if (credential instanceof W3cV2JwtVerifiableCredential) {\n alg = credential.jwt.header.alg as KnownJwaSignatureAlgorithm\n kid = credential.jwt.header.kid\n iss = credential.jwt.payload.iss ?? credential.resolvedCredential.issuerId\n } else if (credential instanceof W3cV2JwtVerifiablePresentation) {\n alg = credential.jwt.header.alg as KnownJwaSignatureAlgorithm\n kid = credential.jwt.header.kid\n iss = credential.jwt.payload.iss ?? credential.resolvedPresentation.holderId\n } else if (credential instanceof W3cV2SdJwtVerifiableCredential) {\n alg = credential.sdJwt.header.alg as KnownJwaSignatureAlgorithm\n kid = credential.sdJwt.header.kid\n iss = credential.sdJwt.payload.iss ?? credential.resolvedCredential.issuerId\n } else {\n alg = credential.sdJwt.header.alg as KnownJwaSignatureAlgorithm\n kid = credential.sdJwt.header.kid\n iss = credential.sdJwt.payload.iss ?? credential.resolvedPresentation.holderId\n }\n\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n let verificationMethod: VerificationMethod\n\n // If the kid starts with # we assume it is a relative did url, and we resolve\n //it based on the `iss` and the `kid`\n if (kid?.startsWith('#')) {\n if (!iss || !isDid(iss)) {\n throw new CredoError(`JWT 'iss' MUST be a did when 'kid' is a relative did url`)\n }\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, iss)\n verificationMethod = didDocument.dereferenceKey(`${iss}${kid}`, purpose)\n } else if (kid && isDid(kid)) {\n const didDocument = await didResolver.resolveDidDocument(agentContext, kid)\n verificationMethod = didDocument.dereferenceKey(kid, purpose)\n\n if (iss && didDocument.id !== iss) {\n throw new CredoError(`kid '${kid}' does not match id of signer (holder/issuer) '${iss}'`)\n }\n } else {\n if (!iss) {\n throw new CredoError(`JWT 'iss' MUST be present in payload when no 'kid' is specified`)\n }\n\n // Find the verificationMethod in the did document based on the alg and proofPurpose\n const jwkClass = PublicJwk.supportedPublicJwkClassForSignatureAlgorithm(alg)\n const supportedVerificationMethodTypes = getSupportedVerificationMethodTypesForPublicJwk(jwkClass)\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, iss)\n const verificationMethods =\n didDocument.assertionMethod\n ?.map((v) => (typeof v === 'string' ? didDocument.dereferenceVerificationMethod(v) : v))\n .filter((v) => supportedVerificationMethodTypes.includes(v.type)) ?? []\n\n if (verificationMethods.length === 0) {\n throw new CredoError(\n `No verification methods found for signer '${iss}' and key type '${jwkClass.name}' for alg '${alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n if (verificationMethods.length > 1) {\n throw new CredoError(\n `Multiple verification methods found for signer '${iss}' and key type '${jwkClass.name}' for alg '${alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n\n verificationMethod = verificationMethods[0]\n }\n\n // Verify the controller of the verificationMethod matches the signer of the credential\n if (iss && verificationMethod.controller !== iss) {\n throw new CredoError(\n `Verification method controller '${verificationMethod.controller}' does not match the signer '${iss}'`\n )\n }\n\n return verificationMethod\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkBA,eAAsB,qCACpB,cACA,oBACA,gBACA;AACA,KAAI,CAAC,MAAM,mBAAmB,CAC5B,OAAM,IAAI,WAAW,4DAA4D;CAGnF,MAAM,YAAY,SAAS,mBAAmB;AAC9C,KAAI,CAAC,UAAU,SACb,OAAM,IAAI,WAAW,WAAW,UAAU,OAAO,kEAAkE;CAIrH,MAAM,EAAE,aAAa,SAAS,MADjB,aAAa,QAAQ,QAAQ,CACD,kCAAkC,UAAU,IAAI;CACzF,MAAM,2BAA2B,YAAY,eAAe,oBAAoB,eAAe;CAC/F,MAAM,YAAY,mCAAmC,yBAAyB;AAE9E,WAAU,QACR,MAAM,MAAM,EAAE,+BAA+B,yBAAyB,GAAG,SAAS,yBAAyB,CAAC,EACxG,YAAY,UAAU;AAE5B,QAAO;;AAGT,eAAsB,yCACpB,cACA,cACA;CAIA,MAAM,cAAc,QAAQ,aAAa,qBAAqB;AAC9D,KAAI,YAAY,WAAW,EACzB,OAAM,IAAI,WAAW,qEAAqE;CAG5F,MAAM,aAAa,YAAY;CAC/B,IAAIA;AAEJ,KAAI,WAAW,+BAA+B,+BAC5C,UAAS,WAAW,oBAAoB,MAAM;KAE9C,UAAS,WAAW,oBAAoB,IAAI,QAAQ,QAAQ;CAI9D,MAAM,gBAAgB,iCAAiC,OAAO;AAC9D,KAAI,CAAC,cACH,OAAM,IAAI,WAAW,iEAAiE;AAGxF,QAAO,MAAM,4BAA4B,cAA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gDAAgD,SAAS;EAElG,MAAM,cAAc,MAAM,YAAY,mBAAmB,cAAc,IAAI;EAC3E,MAAM,sBACJ,YAAY,iBACR,KAAK,MAAO,OAAO,MAAM,WAAW,YAAY,8BAA8B,EAAE,GAAG,EAAG,CACvF,QAAQ,MAAM,iCAAiC,SAAS,EAAE,KAAK,CAAC,IAAI,EAAE;AAE3E,MAAI,oBAAoB,WAAW,EACjC,OAAM,IAAI,WACR,6CAA6C,IAAI,kBAAkB,SAAS,KAAK,aAAa,IAAI,4EACnG;AAEH,MAAI,oBAAoB,SAAS,EAC/B,OAAM,IAAI,WACR,mDAAmD,IAAI,kBAAkB,SAAS,KAAK,aAAa,IAAI,4EACzG;AAGH,uBAAqB,oBAAoB;;AAI3C,KAAI,OAAO,mBAAmB,eAAe,IAC3C,OAAM,IAAI,WACR,mCAAmC,mBAAmB,WAAW,+BAA+B,IAAI,GACrG;AAGH,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.mjs","names":[],"sources":["../../../src/modules/vc/validators.ts"],"sourcesContent":["import type { ValidationOptions } from 'class-validator'\n\nimport {
|
|
1
|
+
{"version":3,"file":"validators.mjs","names":[],"sources":["../../../src/modules/vc/validators.ts"],"sourcesContent":["import type { ValidationOptions } from 'class-validator'\n\nimport { buildMessage, isString, isURL, ValidateBy } from 'class-validator'\nimport { isJsonObject } from '../../types'\nimport { CREDENTIALS_CONTEXT_V1_URL, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE } from './constants'\n\nexport interface IsCredentialJsonLdContextValidationOptions extends ValidationOptions {\n /**\n * Whether to allow string value in addition to arrays.\n *\n * @default false\n */\n allowString?: boolean\n\n /**\n * The expected credential context URL.\n *\n * @default {@link CREDENTIALS_CONTEXT_V1_URL}\n */\n credentialContext?: string\n}\n\nexport function IsCredentialJsonLdContext(\n validationOptions?: IsCredentialJsonLdContextValidationOptions\n): PropertyDecorator {\n const allowString = validationOptions?.allowString ?? false\n const credentialContext = validationOptions?.credentialContext ?? CREDENTIALS_CONTEXT_V1_URL\n\n return ValidateBy(\n {\n name: 'IsCredentialJsonLdContext',\n validator: {\n validate: (value): boolean => {\n if (!Array.isArray(value)) return allowString && isString(value) && value === credentialContext\n\n // First item must be the verifiable credential context\n if (value[0] !== credentialContext) return false\n\n return value.every((v) => (isString(v) && isURL(v)) || isJsonObject(v))\n },\n defaultMessage: buildMessage(\n (eachPrefix) =>\n `${eachPrefix}$property must be an array of strings or objects, where the first item is the verifiable credential context URL.`,\n validationOptions\n ),\n },\n },\n validationOptions\n )\n}\n\nexport function IsCredentialType(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: 'IsVerifiableCredentialType',\n validator: {\n validate: (value): boolean => {\n return Array.isArray(value)\n ? value.includes(VERIFIABLE_CREDENTIAL_TYPE) && value.every((v) => typeof v === 'string')\n : value === VERIFIABLE_CREDENTIAL_TYPE\n },\n defaultMessage: buildMessage(\n (eachPrefix) =>\n `${eachPrefix}$property must be \"VerifiableCredential\" or an array of strings which includes \"VerifiableCredential\"`,\n validationOptions\n ),\n },\n },\n validationOptions\n )\n}\n\nexport function IsVerifiablePresentationType(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: 'IsVerifiablePresentationType',\n validator: {\n validate: (value): boolean => {\n return Array.isArray(value)\n ? value.includes(VERIFIABLE_PRESENTATION_TYPE) && value.every((v) => typeof v === 'string')\n : value === VERIFIABLE_PRESENTATION_TYPE\n },\n defaultMessage: buildMessage(\n (eachPrefix) =>\n `${eachPrefix}$property must be \"VerifiablePresentation\" or an array of strings which includes \"VerifiablePresentation\"`,\n validationOptions\n ),\n },\n },\n validationOptions\n )\n}\n"],"mappings":";;;;;;;AAsBA,SAAgB,0BACd,mBACmB;CACnB,MAAM,cAAc,mBAAmB,eAAe;CACtD,MAAM,oBAAoB,mBAAmB,qBAAqB;AAElE,QAAO,WACL;EACE,MAAM;EACN,WAAW;GACT,WAAW,UAAmB;AAC5B,QAAI,CAAC,MAAM,QAAQ,MAAM,CAAE,QAAO,eAAe,SAAS,MAAM,IAAI,UAAU;AAG9E,QAAI,MAAM,OAAO,kBAAmB,QAAO;AAE3C,WAAO,MAAM,OAAO,MAAO,SAAS,EAAE,IAAI,MAAM,EAAE,IAAK,aAAa,EAAE,CAAC;;GAEzE,gBAAgB,cACb,eACC,GAAG,WAAW,mHAChB,kBACD;GACF;EACF,EACD,kBACD;;AAGH,SAAgB,iBAAiB,mBAA0D;AACzF,QAAO,WACL;EACE,MAAM;EACN,WAAW;GACT,WAAW,UAAmB;AAC5B,WAAO,MAAM,QAAQ,MAAM,GACvB,MAAM,SAAS,2BAA2B,IAAI,MAAM,OAAO,MAAM,OAAO,MAAM,SAAS,GACvF,UAAU;;GAEhB,gBAAgB,cACb,eACC,GAAG,WAAW,wGAChB,kBACD;GACF;EACF,EACD,kBACD;;AAGH,SAAgB,6BAA6B,mBAA0D;AACrG,QAAO,WACL;EACE,MAAM;EACN,WAAW;GACT,WAAW,UAAmB;AAC5B,WAAO,MAAM,QAAQ,MAAM,GACvB,MAAM,SAAS,6BAA6B,IAAI,MAAM,OAAO,MAAM,OAAO,MAAM,SAAS,GACzF,UAAU;;GAEhB,gBAAgB,cACb,eACC,GAAG,WAAW,4GAChB,kBACD;GACF;EACF,EACD,kBACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X509Certificate } from "./X509Certificate.mjs";
|
|
2
1
|
import { X509CreateCertificateOptions, X509ValidateCertificateChainOptions } from "./X509ServiceOptions.mjs";
|
|
2
|
+
import { X509Certificate } from "./X509Certificate.mjs";
|
|
3
3
|
import { X509ModuleConfig } from "./X509ModuleConfig.mjs";
|
|
4
4
|
import { AgentContext } from "../../agent/context/AgentContext.mjs";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X509Certificate } from "./X509Certificate.js";
|
|
2
1
|
import { X509CreateCertificateOptions, X509ValidateCertificateChainOptions } from "./X509ServiceOptions.js";
|
|
2
|
+
import { X509Certificate } from "./X509Certificate.js";
|
|
3
3
|
import { X509ModuleConfig } from "./X509ModuleConfig.js";
|
|
4
4
|
import { AgentContext } from "../../agent/context/AgentContext.js";
|
|
5
5
|
|
|
@@ -6,8 +6,8 @@ require('../../plugins/index.js');
|
|
|
6
6
|
const require_decorateMetadata = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
7
7
|
const require_decorate = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
8
8
|
require('../../agent/index.js');
|
|
9
|
-
const require_X509Service = require('./X509Service.js');
|
|
10
9
|
const require_X509ModuleConfig = require('./X509ModuleConfig.js');
|
|
10
|
+
const require_X509Service = require('./X509Service.js');
|
|
11
11
|
let tsyringe = require("tsyringe");
|
|
12
12
|
tsyringe = require_rolldown_runtime.__toESM(tsyringe);
|
|
13
13
|
|
|
@@ -5,8 +5,8 @@ import { injectable } from "../../plugins/index.mjs";
|
|
|
5
5
|
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
6
6
|
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
7
7
|
import "../../agent/index.mjs";
|
|
8
|
-
import { X509Service } from "./X509Service.mjs";
|
|
9
8
|
import { X509ModuleConfig } from "./X509ModuleConfig.mjs";
|
|
9
|
+
import { X509Service } from "./X509Service.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/x509/X509Api.ts
|
|
12
12
|
var _ref, _ref2;
|