@credo-ts/core 0.6.0-pr-2392-20251010173905 → 0.6.0-pr-2457-20251016083534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/agent/Agent.d.mts +1 -1
- package/build/agent/Agent.d.mts.map +1 -1
- package/build/agent/Agent.d.ts +1 -1
- package/build/agent/Agent.d.ts.map +1 -1
- package/build/agent/Agent.js +2 -2
- package/build/agent/Agent.mjs +2 -2
- package/build/agent/Agent.mjs.map +1 -1
- package/build/agent/AgentConfig.d.mts +1 -1
- package/build/agent/AgentConfig.d.mts.map +1 -1
- package/build/agent/AgentConfig.d.ts +1 -1
- package/build/agent/AgentConfig.d.ts.map +1 -1
- package/build/agent/AgentConfig.mjs.map +1 -1
- package/build/agent/AgentModules.d.mts +4 -4
- package/build/agent/AgentModules.d.mts.map +1 -1
- package/build/agent/AgentModules.d.ts +4 -4
- package/build/agent/AgentModules.d.ts.map +1 -1
- package/build/agent/AgentModules.mjs.map +1 -1
- package/build/agent/BaseAgent.d.mts +4 -4
- package/build/agent/BaseAgent.d.ts +4 -4
- package/build/agent/BaseAgent.mjs.map +1 -1
- package/build/agent/EventEmitter.d.mts +1 -1
- package/build/agent/EventEmitter.d.mts.map +1 -1
- package/build/agent/EventEmitter.d.ts +1 -1
- package/build/agent/EventEmitter.d.ts.map +1 -1
- package/build/agent/EventEmitter.mjs.map +1 -1
- package/build/agent/context/AgentContext.d.mts.map +1 -1
- package/build/agent/context/AgentContext.d.ts.map +1 -1
- package/build/agent/context/AgentContext.mjs.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.d.mts.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.d.ts.map +1 -1
- package/build/agent/context/DefaultAgentContextProvider.js +1 -1
- package/build/agent/context/DefaultAgentContextProvider.mjs +1 -1
- package/build/agent/context/DefaultAgentContextProvider.mjs.map +1 -1
- package/build/crypto/JwsService.d.mts +5 -5
- package/build/crypto/JwsService.d.mts.map +1 -1
- package/build/crypto/JwsService.d.ts +5 -5
- package/build/crypto/JwsService.d.ts.map +1 -1
- package/build/crypto/JwsService.js +3 -3
- package/build/crypto/JwsService.mjs +3 -3
- package/build/crypto/JwsService.mjs.map +1 -1
- package/build/crypto/KmsKeyPair.js +1 -5
- package/build/crypto/KmsKeyPair.mjs +1 -2
- package/build/crypto/KmsKeyPair.mjs.map +1 -1
- package/build/crypto/hashes/Hasher.d.mts +4 -2
- package/build/crypto/hashes/Hasher.d.mts.map +1 -1
- package/build/crypto/hashes/Hasher.d.ts +4 -2
- package/build/crypto/hashes/Hasher.d.ts.map +1 -1
- package/build/crypto/hashes/Hasher.js +8 -3
- package/build/crypto/hashes/Hasher.mjs +8 -3
- package/build/crypto/hashes/Hasher.mjs.map +1 -1
- package/build/crypto/hashes/IHash.d.mts +3 -1
- package/build/crypto/hashes/IHash.d.mts.map +1 -1
- package/build/crypto/hashes/IHash.d.ts +3 -1
- package/build/crypto/hashes/IHash.d.ts.map +1 -1
- package/build/crypto/hashes/Sha1.d.mts +2 -1
- package/build/crypto/hashes/Sha1.d.mts.map +1 -1
- package/build/crypto/hashes/Sha1.d.ts +2 -1
- package/build/crypto/hashes/Sha1.d.ts.map +1 -1
- package/build/crypto/hashes/Sha1.js +3 -3
- package/build/crypto/hashes/Sha1.mjs +1 -1
- package/build/crypto/hashes/Sha1.mjs.map +1 -1
- package/build/crypto/hashes/Sha256.d.mts +2 -1
- package/build/crypto/hashes/Sha256.d.mts.map +1 -1
- package/build/crypto/hashes/Sha256.d.ts +2 -1
- package/build/crypto/hashes/Sha256.d.ts.map +1 -1
- package/build/crypto/hashes/Sha256.js +3 -3
- package/build/crypto/hashes/Sha256.mjs +1 -1
- package/build/crypto/hashes/Sha256.mjs.map +1 -1
- package/build/crypto/hashes/Sha384.d.mts +10 -0
- package/build/crypto/hashes/Sha384.d.mts.map +1 -0
- package/build/crypto/hashes/Sha384.d.ts +10 -0
- package/build/crypto/hashes/Sha384.d.ts.map +1 -0
- package/build/crypto/hashes/Sha384.js +15 -0
- package/build/crypto/hashes/Sha384.mjs +14 -0
- package/build/crypto/hashes/Sha384.mjs.map +1 -0
- package/build/crypto/hashes/Sha512.d.mts +2 -1
- package/build/crypto/hashes/Sha512.d.mts.map +1 -1
- package/build/crypto/hashes/Sha512.d.ts +2 -1
- package/build/crypto/hashes/Sha512.d.ts.map +1 -1
- package/build/crypto/hashes/Sha512.js +3 -3
- package/build/crypto/hashes/Sha512.mjs +1 -1
- package/build/crypto/hashes/Sha512.mjs.map +1 -1
- package/build/crypto/hashes/index.js +1 -0
- package/build/crypto/hashes/index.mjs +1 -0
- package/build/crypto/index.js +1 -0
- package/build/crypto/index.mjs +1 -0
- package/build/crypto/jose/jwt/Jwt.d.mts.map +1 -1
- package/build/crypto/jose/jwt/Jwt.d.ts.map +1 -1
- package/build/crypto/jose/jwt/Jwt.js +1 -1
- package/build/crypto/jose/jwt/Jwt.mjs +1 -1
- package/build/crypto/jose/jwt/Jwt.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoSubtle.js +1 -1
- package/build/crypto/webcrypto/CredoSubtle.mjs +1 -1
- package/build/crypto/webcrypto/CredoSubtle.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts +7 -7
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts +7 -7
- package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWalletWebCrypto.js +6 -9
- package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs +5 -6
- package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.js +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.mjs +1 -1
- package/build/crypto/webcrypto/CredoWebCrypto.mjs.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.d.mts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.d.ts.map +1 -1
- package/build/crypto/webcrypto/CredoWebCryptoKey.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.js +4 -2
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs +4 -2
- package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.js +4 -2
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs +4 -2
- package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoSha1Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/CredoSha256Provider.mjs.map +1 -1
- package/build/crypto/webcrypto/providers/index.js +1 -1
- package/build/crypto/webcrypto/providers/index.mjs +1 -1
- package/build/crypto/webcrypto/types.d.mts +2 -1
- package/build/crypto/webcrypto/types.d.mts.map +1 -1
- package/build/crypto/webcrypto/types.d.ts +2 -1
- package/build/crypto/webcrypto/types.d.ts.map +1 -1
- package/build/crypto/webcrypto/types.mjs.map +1 -1
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.js +4 -4
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs +4 -4
- package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs.map +1 -1
- package/build/error/index.js +2 -2
- package/build/error/index.mjs +2 -2
- package/build/index.d.mts +161 -157
- package/build/index.d.mts.map +1 -1
- package/build/index.d.ts +161 -157
- package/build/index.d.ts.map +1 -1
- package/build/index.js +67 -62
- package/build/index.mjs +66 -62
- package/build/index.mjs.map +1 -1
- package/build/logger/BaseLogger.mjs.map +1 -1
- package/build/logger/ConsoleLogger.mjs.map +1 -1
- package/build/logger/Logger.mjs.map +1 -1
- package/build/modules/cache/CacheModule.mjs.map +1 -1
- package/build/modules/cache/CachedStorageService.mjs.map +1 -1
- package/build/modules/cache/InMemoryLruCache.d.mts.map +1 -1
- package/build/modules/cache/InMemoryLruCache.d.ts.map +1 -1
- package/build/modules/cache/InMemoryLruCache.js +1 -1
- package/build/modules/cache/InMemoryLruCache.mjs +1 -1
- package/build/modules/cache/InMemoryLruCache.mjs.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.mts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.ts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.mjs.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.mts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.ts.map +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.js +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs +1 -1
- package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs.map +1 -1
- package/build/modules/dcql/DcqlModule.d.mts.map +1 -1
- package/build/modules/dcql/DcqlModule.d.ts.map +1 -1
- package/build/modules/dcql/DcqlModule.mjs.map +1 -1
- package/build/modules/dcql/DcqlService.d.mts.map +1 -1
- package/build/modules/dcql/DcqlService.d.ts.map +1 -1
- package/build/modules/dcql/DcqlService.js +2 -2
- package/build/modules/dcql/DcqlService.mjs +2 -2
- package/build/modules/dcql/DcqlService.mjs.map +1 -1
- package/build/modules/dcql/models/DcqlCredentialsForRequest.d.mts +3 -3
- package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +3 -3
- package/build/modules/dcql/models/index.d.mts +2 -2
- package/build/modules/dcql/models/index.d.mts.map +1 -1
- package/build/modules/dcql/models/index.d.ts +2 -2
- package/build/modules/dcql/models/index.d.ts.map +1 -1
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.mts +2 -2
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +2 -2
- package/build/modules/dids/DidsApi.d.mts +2 -2
- package/build/modules/dids/DidsApi.d.mts.map +1 -1
- package/build/modules/dids/DidsApi.d.ts +2 -2
- package/build/modules/dids/DidsApi.d.ts.map +1 -1
- package/build/modules/dids/DidsApi.js +1 -1
- package/build/modules/dids/DidsApi.mjs +1 -1
- package/build/modules/dids/DidsApi.mjs.map +1 -1
- package/build/modules/dids/DidsModule.d.mts.map +1 -1
- package/build/modules/dids/DidsModule.d.ts.map +1 -1
- package/build/modules/dids/DidsModule.mjs.map +1 -1
- package/build/modules/dids/DidsModuleConfig.js +2 -2
- package/build/modules/dids/DidsModuleConfig.mjs +2 -2
- package/build/modules/dids/domain/DidDocument.d.mts +1 -1
- package/build/modules/dids/domain/DidDocument.d.mts.map +1 -1
- package/build/modules/dids/domain/DidDocument.d.ts +1 -1
- package/build/modules/dids/domain/DidDocument.d.ts.map +1 -1
- package/build/modules/dids/domain/DidDocument.js +6 -6
- package/build/modules/dids/domain/DidDocument.mjs +6 -6
- package/build/modules/dids/domain/DidDocument.mjs.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.d.mts.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.d.ts.map +1 -1
- package/build/modules/dids/domain/DidDocumentBuilder.mjs.map +1 -1
- package/build/modules/dids/domain/index.js +11 -11
- package/build/modules/dids/domain/index.mjs +11 -11
- package/build/modules/dids/domain/key-type/ed25519.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidJsonWebKey.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.mts +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.mts.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.ts +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.d.ts.map +1 -1
- package/build/modules/dids/domain/key-type/keyDidMapping.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.js +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.mjs +1 -1
- package/build/modules/dids/domain/key-type/secp256k1.mjs.map +1 -1
- package/build/modules/dids/domain/key-type/x25519.js +1 -1
- package/build/modules/dids/domain/key-type/x25519.mjs +1 -1
- package/build/modules/dids/domain/key-type/x25519.mjs.map +1 -1
- package/build/modules/dids/domain/keyDidDocument.js +1 -1
- package/build/modules/dids/domain/keyDidDocument.mjs +1 -1
- package/build/modules/dids/domain/keyDidDocument.mjs.map +1 -1
- package/build/modules/dids/domain/parse.d.mts.map +1 -1
- package/build/modules/dids/domain/parse.d.ts.map +1 -1
- package/build/modules/dids/domain/parse.mjs.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.mts +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.mts.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.ts +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.d.ts.map +1 -1
- package/build/modules/dids/domain/service/DidCommV2Service.mjs.map +1 -1
- package/build/modules/dids/domain/service/DidDocumentService.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/Multikey.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts.map +1 -1
- package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.mjs.map +1 -1
- package/build/modules/dids/domain/verificationMethod/index.js +3 -3
- package/build/modules/dids/domain/verificationMethod/index.mjs +3 -3
- package/build/modules/dids/findMatchingEd25519Key.d.mts +1 -1
- package/build/modules/dids/findMatchingEd25519Key.d.ts +1 -1
- package/build/modules/dids/findMatchingEd25519Key.js +1 -1
- package/build/modules/dids/findMatchingEd25519Key.mjs +1 -1
- package/build/modules/dids/findMatchingEd25519Key.mjs.map +1 -1
- package/build/modules/dids/helpers.mjs.map +1 -1
- package/build/modules/dids/index.js +15 -15
- package/build/modules/dids/index.mjs +15 -15
- package/build/modules/dids/methods/index.js +5 -5
- package/build/modules/dids/methods/index.mjs +5 -5
- package/build/modules/dids/methods/jwk/DidJwk.d.mts +1 -1
- package/build/modules/dids/methods/jwk/DidJwk.d.ts +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.js +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs +1 -1
- package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.js +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs +1 -1
- package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs.map +1 -1
- package/build/modules/dids/methods/key/DidKey.d.mts +1 -1
- package/build/modules/dids/methods/key/DidKey.d.ts +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.js +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.mjs +1 -1
- package/build/modules/dids/methods/key/KeyDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts +2 -2
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts +2 -2
- package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidRegistrar.mjs.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/PeerDidResolver.mjs.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts.map +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.js +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs +1 -1
- package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs.map +1 -1
- package/build/modules/dids/methods/peer/index.js +1 -1
- package/build/modules/dids/methods/peer/index.mjs +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo0.mjs.map +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo1.js +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo1.mjs +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.js +2 -2
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs +2 -2
- package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs.map +1 -1
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.js +7 -8
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs +4 -4
- package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.d.mts.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.d.ts.map +1 -1
- package/build/modules/dids/methods/web/WebDidResolver.mjs.map +1 -1
- package/build/modules/dids/repository/DidRecord.d.mts.map +1 -1
- package/build/modules/dids/repository/DidRecord.d.ts.map +1 -1
- package/build/modules/dids/repository/DidRecord.js +1 -1
- package/build/modules/dids/repository/DidRecord.mjs +1 -1
- package/build/modules/dids/repository/DidRecord.mjs.map +1 -1
- package/build/modules/dids/repository/DidRepository.d.mts +3 -3
- package/build/modules/dids/repository/DidRepository.d.mts.map +1 -1
- package/build/modules/dids/repository/DidRepository.d.ts +3 -3
- package/build/modules/dids/repository/DidRepository.d.ts.map +1 -1
- package/build/modules/dids/repository/DidRepository.js +1 -1
- package/build/modules/dids/repository/DidRepository.mjs +1 -1
- package/build/modules/dids/repository/DidRepository.mjs.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.d.mts.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.d.ts.map +1 -1
- package/build/modules/dids/services/DidRegistrarService.mjs.map +1 -1
- package/build/modules/dids/services/DidResolverService.d.mts.map +1 -1
- package/build/modules/dids/services/DidResolverService.d.ts.map +1 -1
- package/build/modules/dids/services/DidResolverService.js +1 -1
- package/build/modules/dids/services/DidResolverService.mjs +1 -1
- package/build/modules/dids/services/DidResolverService.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts +5 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts +5 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.js +9 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs +9 -5
- package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.mts +3 -3
- package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.ts +3 -3
- package/build/modules/dif-presentation-exchange/models/index.d.mts +4 -4
- package/build/modules/dif-presentation-exchange/models/index.d.ts +4 -4
- package/build/modules/dif-presentation-exchange/utils/credentialSelection.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/index.js +1 -1
- package/build/modules/dif-presentation-exchange/utils/index.mjs +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts +5 -5
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts +5 -5
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.js +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/presentationsToCreate.mjs.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/transform.mjs.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.mts +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.mts.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.ts +1 -1
- package/build/modules/generic-records/GenericRecordsApi.d.ts.map +1 -1
- package/build/modules/generic-records/GenericRecordsApi.mjs.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.d.mts.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.d.ts.map +1 -1
- package/build/modules/generic-records/services/GenericRecordService.mjs.map +1 -1
- package/build/modules/kms/KeyManagementApi.d.mts +7 -7
- package/build/modules/kms/KeyManagementApi.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementApi.d.ts +7 -7
- package/build/modules/kms/KeyManagementApi.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementApi.js +7 -7
- package/build/modules/kms/KeyManagementApi.mjs +7 -7
- package/build/modules/kms/KeyManagementApi.mjs.map +1 -1
- package/build/modules/kms/KeyManagementModule.d.mts +2 -2
- package/build/modules/kms/KeyManagementModule.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementModule.d.ts +2 -2
- package/build/modules/kms/KeyManagementModule.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementModule.mjs.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.mts +0 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.mts.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.ts +0 -1
- package/build/modules/kms/KeyManagementModuleConfig.d.ts.map +1 -1
- package/build/modules/kms/KeyManagementModuleConfig.js +0 -6
- package/build/modules/kms/KeyManagementModuleConfig.mjs +0 -6
- package/build/modules/kms/KeyManagementModuleConfig.mjs.map +1 -1
- package/build/modules/kms/KeyManagementService.d.mts +6 -6
- package/build/modules/kms/KeyManagementService.d.ts +6 -6
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.mts +1 -1
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.ts +1 -1
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.js +5 -2
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs +5 -2
- package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs.map +1 -1
- package/build/modules/kms/index.d.mts +25 -25
- package/build/modules/kms/index.d.ts +25 -25
- package/build/modules/kms/index.js +10 -10
- package/build/modules/kms/index.mjs +10 -10
- package/build/modules/kms/index.mjs.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.d.mts +3 -4
- package/build/modules/kms/jwk/PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.d.ts +3 -4
- package/build/modules/kms/jwk/PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/PublicJwk.js +2 -5
- package/build/modules/kms/jwk/PublicJwk.mjs +2 -5
- package/build/modules/kms/jwk/PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.mts +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.ts +1 -1
- package/build/modules/kms/jwk/alg/encryption.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/encryption.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/index.js +1 -1
- package/build/modules/kms/jwk/alg/index.mjs +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.mts +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.ts +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/keyDerivation.mjs.map +1 -1
- package/build/modules/kms/jwk/alg/signing.d.mts +1 -1
- package/build/modules/kms/jwk/alg/signing.d.mts.map +1 -1
- package/build/modules/kms/jwk/alg/signing.d.ts +1 -1
- package/build/modules/kms/jwk/alg/signing.d.ts.map +1 -1
- package/build/modules/kms/jwk/alg/signing.mjs.map +1 -1
- package/build/modules/kms/jwk/assertSupported.d.mts +2 -2
- package/build/modules/kms/jwk/assertSupported.d.ts +2 -2
- package/build/modules/kms/jwk/humanDescription.d.mts.map +1 -1
- package/build/modules/kms/jwk/humanDescription.d.ts.map +1 -1
- package/build/modules/kms/jwk/humanDescription.mjs.map +1 -1
- package/build/modules/kms/jwk/index.js +8 -8
- package/build/modules/kms/jwk/index.mjs +8 -8
- package/build/modules/kms/jwk/jwkThumbprint.js +2 -2
- package/build/modules/kms/jwk/jwkThumbprint.mjs +2 -2
- package/build/modules/kms/jwk/jwkThumbprint.mjs.map +1 -1
- package/build/modules/kms/jwk/keyOps.d.mts.map +1 -1
- package/build/modules/kms/jwk/keyOps.d.ts.map +1 -1
- package/build/modules/kms/jwk/keyOps.js +1 -1
- package/build/modules/kms/jwk/keyOps.mjs +1 -1
- package/build/modules/kms/jwk/keyOps.mjs.map +1 -1
- package/build/modules/kms/jwk/knownJwk.d.mts +1 -1
- package/build/modules/kms/jwk/knownJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/knownJwk.d.ts +1 -1
- package/build/modules/kms/jwk/knownJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/knownJwk.js +1 -1
- package/build/modules/kms/jwk/knownJwk.mjs +1 -1
- package/build/modules/kms/jwk/knownJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/PublicJwk.d.mts +3 -2
- package/build/modules/kms/jwk/kty/PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/PublicJwk.d.ts +3 -2
- package/build/modules/kms/jwk/kty/PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P256PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P384PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/P521PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts +7 -6
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts +7 -6
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecPublicKey.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts +3 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts +3 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/ec/ecSignature.js +2 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.mjs +2 -2
- package/build/modules/kms/jwk/kty/ec/ecSignature.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/index.js +1 -1
- package/build/modules/kms/jwk/kty/index.mjs +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts +6 -5
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts +6 -5
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts +6 -5
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts +6 -5
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/okp/okpPublicKey.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts +8 -7
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts +8 -7
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.mjs.map +1 -1
- package/build/modules/kms/jwk/kty/rsa/rsaPublicKey.mjs.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.mts +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.ts +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsCreateKeyOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.d.mts +169 -168
- package/build/modules/kms/options/KmsDecryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.d.ts +169 -168
- package/build/modules/kms/options/KmsDecryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsDecryptOptions.js +13 -12
- package/build/modules/kms/options/KmsDecryptOptions.mjs +13 -12
- package/build/modules/kms/options/KmsDecryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.d.mts +123 -122
- package/build/modules/kms/options/KmsEncryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.d.ts +123 -122
- package/build/modules/kms/options/KmsEncryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsEncryptOptions.js +13 -12
- package/build/modules/kms/options/KmsEncryptOptions.mjs +13 -12
- package/build/modules/kms/options/KmsEncryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts +49 -48
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts +49 -48
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.js +3 -2
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs +3 -2
- package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts +25 -24
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts +25 -24
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.js +5 -4
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs +5 -4
- package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsOperation.d.mts +3 -3
- package/build/modules/kms/options/KmsOperation.d.ts +3 -3
- package/build/modules/kms/options/KmsOperation.mjs.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.d.mts +5 -4
- package/build/modules/kms/options/KmsSignOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.d.ts +5 -4
- package/build/modules/kms/options/KmsSignOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsSignOptions.js +2 -1
- package/build/modules/kms/options/KmsSignOptions.mjs +2 -1
- package/build/modules/kms/options/KmsSignOptions.mjs.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.d.mts +7 -6
- package/build/modules/kms/options/KmsVerifyOptions.d.mts.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.d.ts +7 -6
- package/build/modules/kms/options/KmsVerifyOptions.d.ts.map +1 -1
- package/build/modules/kms/options/KmsVerifyOptions.js +3 -2
- package/build/modules/kms/options/KmsVerifyOptions.mjs +3 -2
- package/build/modules/kms/options/KmsVerifyOptions.mjs.map +1 -1
- package/build/modules/mdoc/Mdoc.d.mts +1 -3
- package/build/modules/mdoc/Mdoc.d.mts.map +1 -1
- package/build/modules/mdoc/Mdoc.d.ts +1 -3
- package/build/modules/mdoc/Mdoc.d.ts.map +1 -1
- package/build/modules/mdoc/Mdoc.js +1 -7
- package/build/modules/mdoc/Mdoc.mjs +1 -7
- package/build/modules/mdoc/Mdoc.mjs.map +1 -1
- package/build/modules/mdoc/MdocApi.d.mts +1 -1
- package/build/modules/mdoc/MdocApi.d.mts.map +1 -1
- package/build/modules/mdoc/MdocApi.d.ts +1 -1
- package/build/modules/mdoc/MdocApi.d.ts.map +1 -1
- package/build/modules/mdoc/MdocApi.mjs.map +1 -1
- package/build/modules/mdoc/MdocContext.js +9 -11
- package/build/modules/mdoc/MdocContext.mjs +6 -7
- package/build/modules/mdoc/MdocContext.mjs.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.mts +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.mts.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.ts.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.mjs.map +1 -1
- package/build/modules/mdoc/MdocModule.d.mts.map +1 -1
- package/build/modules/mdoc/MdocModule.d.ts.map +1 -1
- package/build/modules/mdoc/MdocModule.mjs.map +1 -1
- package/build/modules/mdoc/MdocOptions.d.mts +4 -3
- package/build/modules/mdoc/MdocOptions.d.mts.map +1 -1
- package/build/modules/mdoc/MdocOptions.d.ts +4 -3
- package/build/modules/mdoc/MdocOptions.d.ts.map +1 -1
- package/build/modules/mdoc/MdocService.d.mts +1 -1
- package/build/modules/mdoc/MdocService.d.mts.map +1 -1
- package/build/modules/mdoc/MdocService.d.ts +1 -2
- package/build/modules/mdoc/MdocService.d.ts.map +1 -1
- package/build/modules/mdoc/MdocService.mjs.map +1 -1
- package/build/modules/mdoc/index.d.mts +3 -3
- package/build/modules/mdoc/index.d.ts +3 -3
- package/build/modules/mdoc/repository/MdocRecord.d.mts +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.mts.map +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.ts +1 -1
- package/build/modules/mdoc/repository/MdocRecord.d.ts.map +1 -1
- package/build/modules/mdoc/repository/MdocRecord.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts +2 -4
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +2 -4
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcModule.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts +5 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts +5 -1
- package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts +4 -5
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +4 -5
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcService.js +40 -48
- package/build/modules/sd-jwt-vc/SdJwtVcService.mjs +41 -49
- package/build/modules/sd-jwt-vc/SdJwtVcService.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/decodeSdJwtVc.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/disclosureFrame.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/index.js +1 -1
- package/build/modules/sd-jwt-vc/index.mjs +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.mjs.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.mts +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.ts +1 -1
- package/build/modules/sd-jwt-vc/utils.js +1 -1
- package/build/modules/sd-jwt-vc/utils.mjs +1 -1
- package/build/modules/sd-jwt-vc/utils.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialService.d.mts +2 -2
- package/build/modules/vc/W3cCredentialService.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialService.d.ts +2 -2
- package/build/modules/vc/W3cCredentialService.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialService.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialServiceOptions.d.mts +2 -2
- package/build/modules/vc/W3cCredentialServiceOptions.d.ts +2 -2
- package/build/modules/vc/W3cCredentialsApi.d.mts +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.ts +1 -1
- package/build/modules/vc/W3cCredentialsApi.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialsApi.mjs.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.d.mts.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.d.ts.map +1 -1
- package/build/modules/vc/W3cCredentialsModule.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialService.d.mts +3 -3
- package/build/modules/vc/W3cV2CredentialService.d.ts +3 -3
- package/build/modules/vc/W3cV2CredentialService.js +1 -1
- package/build/modules/vc/W3cV2CredentialService.mjs +1 -1
- package/build/modules/vc/W3cV2CredentialService.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts +3 -3
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts.map +1 -1
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts +3 -3
- package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.mts +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.mts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.ts +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.d.ts.map +1 -1
- package/build/modules/vc/W3cV2CredentialsApi.mjs.map +1 -1
- package/build/modules/vc/W3cV2CredentialsModule.mjs.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts +2 -2
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts +2 -2
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.js +6 -6
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs +6 -6
- package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs.map +1 -1
- package/build/modules/vc/data-integrity/deriveProof.d.mts +1 -1
- package/build/modules/vc/data-integrity/deriveProof.d.ts +1 -1
- package/build/modules/vc/data-integrity/deriveProof.js +1 -1
- package/build/modules/vc/data-integrity/deriveProof.mjs +1 -1
- package/build/modules/vc/data-integrity/deriveProof.mjs.map +1 -1
- package/build/modules/vc/data-integrity/index.js +8 -8
- package/build/modules/vc/data-integrity/index.mjs +8 -8
- package/build/modules/vc/data-integrity/jsonldUtil.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.js +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.mjs +1 -1
- package/build/modules/vc/data-integrity/jsonldUtil.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.js +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/documentLoader.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/index.js +1 -1
- package/build/modules/vc/data-integrity/libraries/index.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld-signatures.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/jsonld.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.js +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.mjs +1 -1
- package/build/modules/vc/data-integrity/libraries/vc.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts +5 -4
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts +5 -4
- package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/LdKeyPair.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/ProofTransformer.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.js +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts +2 -2
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.js +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs +1 -1
- package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/data-integrity/models/index.js +2 -2
- package/build/modules/vc/data-integrity/models/index.mjs +2 -2
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.mts +1 -1
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.ts +1 -1
- package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.mjs.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts +3 -2
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts.map +1 -1
- package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.mjs.map +1 -1
- package/build/modules/vc/index.js +14 -14
- package/build/modules/vc/index.mjs +14 -14
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts +2 -2
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts +2 -2
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.js +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts +4 -4
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts.map +1 -1
- package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.mts +2 -2
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts +2 -2
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.js +4 -4
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs +4 -4
- package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.mts +1 -1
- package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.ts +1 -1
- package/build/modules/vc/jwt-vc/credentialTransformer.mjs.map +1 -1
- package/build/modules/vc/jwt-vc/index.js +1 -1
- package/build/modules/vc/jwt-vc/index.mjs +1 -1
- package/build/modules/vc/jwt-vc/presentationTransformer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.d.mts +3 -3
- package/build/modules/vc/models/credential/W3cCredential.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.d.ts +3 -3
- package/build/modules/vc/models/credential/W3cCredential.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredential.js +1 -1
- package/build/modules/vc/models/credential/W3cCredential.mjs +1 -1
- package/build/modules/vc/models/credential/W3cCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cCredentialSubject.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cIssuer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.d.mts +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.d.ts +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.js +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.mjs +1 -1
- package/build/modules/vc/models/credential/W3cV2Credential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.js +2 -2
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs +2 -2
- package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.mts +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.ts +1 -1
- package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Evidence.js +2 -2
- package/build/modules/vc/models/credential/W3cV2Evidence.mjs +2 -2
- package/build/modules/vc/models/credential/W3cV2Evidence.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2Issuer.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cV2LocalizedValue.mjs.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.d.mts.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.d.ts.map +1 -1
- package/build/modules/vc/models/credential/W3cVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/models/credential/index.js +1 -1
- package/build/modules/vc/models/credential/index.mjs +1 -1
- package/build/modules/vc/models/index.js +1 -1
- package/build/modules/vc/models/index.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.d.mts.map +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.d.ts.map +1 -1
- package/build/modules/vc/models/presentation/W3cHolder.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cJsonPresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cJsonPresentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.d.mts +2 -2
- package/build/modules/vc/models/presentation/W3cPresentation.d.mts.map +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.d.ts +2 -2
- package/build/modules/vc/models/presentation/W3cPresentation.d.ts.map +1 -1
- package/build/modules/vc/models/presentation/W3cPresentation.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.mts +2 -2
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.ts +2 -2
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.js +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2Holder.mjs.map +1 -1
- package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.d.ts +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.js +1 -1
- package/build/modules/vc/models/presentation/W3cV2Presentation.mjs +1 -1
- package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.mts +1 -1
- package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.ts +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.d.mts.map +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.d.ts.map +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.mjs.map +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.js +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.mjs +1 -1
- package/build/modules/vc/repository/W3cV2CredentialRecord.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts +2 -2
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts +2 -2
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.mts +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.ts +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.js +3 -3
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs +3 -3
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs.map +1 -1
- package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs.map +1 -1
- package/build/modules/vc/v2-jwt-utils.js +2 -2
- package/build/modules/vc/v2-jwt-utils.mjs +2 -2
- package/build/modules/vc/v2-jwt-utils.mjs.map +1 -1
- package/build/modules/vc/validators.mjs.map +1 -1
- package/build/modules/x509/X509Api.d.mts +1 -1
- package/build/modules/x509/X509Api.d.ts +1 -1
- package/build/modules/x509/X509Api.js +1 -1
- package/build/modules/x509/X509Api.mjs +1 -1
- package/build/modules/x509/X509Certificate.d.mts +5 -5
- package/build/modules/x509/X509Certificate.d.mts.map +1 -1
- package/build/modules/x509/X509Certificate.d.ts +5 -5
- package/build/modules/x509/X509Certificate.d.ts.map +1 -1
- package/build/modules/x509/X509Certificate.js +4 -7
- package/build/modules/x509/X509Certificate.mjs +3 -6
- package/build/modules/x509/X509Certificate.mjs.map +1 -1
- package/build/modules/x509/X509Module.d.mts.map +1 -1
- package/build/modules/x509/X509Module.d.ts.map +1 -1
- package/build/modules/x509/X509Module.js +1 -1
- package/build/modules/x509/X509Module.mjs +1 -1
- package/build/modules/x509/X509Module.mjs.map +1 -1
- package/build/modules/x509/X509ModuleConfig.d.mts +2 -2
- package/build/modules/x509/X509ModuleConfig.d.ts +2 -2
- package/build/modules/x509/X509Service.d.mts +1 -1
- package/build/modules/x509/X509Service.d.mts.map +1 -1
- package/build/modules/x509/X509Service.d.ts +1 -1
- package/build/modules/x509/X509Service.d.ts.map +1 -1
- package/build/modules/x509/X509Service.js +4 -4
- package/build/modules/x509/X509Service.mjs +3 -3
- package/build/modules/x509/X509Service.mjs.map +1 -1
- package/build/modules/x509/extraction.d.mts +1 -1
- package/build/modules/x509/extraction.d.ts +1 -1
- package/build/modules/x509/index.js +3 -3
- package/build/modules/x509/index.mjs +3 -3
- package/build/modules/x509/utils/extensions.d.mts.map +1 -1
- package/build/modules/x509/utils/extensions.d.ts.map +1 -1
- package/build/modules/x509/utils/extensions.js +1 -1
- package/build/modules/x509/utils/extensions.mjs +1 -1
- package/build/modules/x509/utils/extensions.mjs.map +1 -1
- package/build/modules/x509/utils/index.js +1 -1
- package/build/modules/x509/utils/index.mjs +1 -1
- package/build/modules/x509/utils/nameConversion.d.mts.map +1 -1
- package/build/modules/x509/utils/nameConversion.d.ts.map +1 -1
- package/build/modules/x509/utils/nameConversion.mjs.map +1 -1
- package/build/plugins/DependencyManager.d.mts.map +1 -1
- package/build/plugins/DependencyManager.d.ts.map +1 -1
- package/build/plugins/DependencyManager.mjs.map +1 -1
- package/build/storage/BaseRecord.mjs.map +1 -1
- package/build/storage/Metadata.mjs.map +1 -1
- package/build/storage/Repository.d.mts.map +1 -1
- package/build/storage/Repository.d.ts.map +1 -1
- package/build/storage/Repository.js +1 -1
- package/build/storage/Repository.mjs +1 -1
- package/build/storage/Repository.mjs.map +1 -1
- package/build/storage/RepositoryEvents.mjs.map +1 -1
- package/build/storage/StorageService.d.mts +1 -1
- package/build/storage/StorageService.d.ts +1 -1
- package/build/storage/index.js +1 -1
- package/build/storage/index.mjs +1 -1
- package/build/storage/migration/StorageUpdateService.d.mts.map +1 -1
- package/build/storage/migration/StorageUpdateService.d.ts.map +1 -1
- package/build/storage/migration/StorageUpdateService.js +1 -1
- package/build/storage/migration/StorageUpdateService.mjs +1 -1
- package/build/storage/migration/StorageUpdateService.mjs.map +1 -1
- package/build/storage/migration/UpdateAssistant.d.mts +1 -1
- package/build/storage/migration/UpdateAssistant.d.mts.map +1 -1
- package/build/storage/migration/UpdateAssistant.d.ts +1 -1
- package/build/storage/migration/UpdateAssistant.d.ts.map +1 -1
- package/build/storage/migration/UpdateAssistant.js +1 -1
- package/build/storage/migration/UpdateAssistant.mjs +1 -1
- package/build/storage/migration/UpdateAssistant.mjs.map +1 -1
- package/build/storage/migration/index.js +1 -1
- package/build/storage/migration/index.mjs +1 -1
- package/build/storage/migration/isUpToDate.d.mts.map +1 -1
- package/build/storage/migration/isUpToDate.d.ts.map +1 -1
- package/build/storage/migration/isUpToDate.js +1 -1
- package/build/storage/migration/isUpToDate.mjs +1 -1
- package/build/storage/migration/isUpToDate.mjs.map +1 -1
- package/build/storage/migration/updates/0.3.1-0.4/cache.mjs.map +1 -1
- package/build/storage/migration/updates/0.4-0.5/w3cCredentialRecord.mjs.map +1 -1
- package/build/storage/migration/updates.d.mts +1 -1
- package/build/storage/migration/updates.d.mts.map +1 -1
- package/build/storage/migration/updates.d.ts +1 -1
- package/build/storage/migration/updates.d.ts.map +1 -1
- package/build/storage/migration/updates.js +4 -4
- package/build/storage/migration/updates.mjs +1 -1
- package/build/storage/migration/updates.mjs.map +1 -1
- package/build/types.d.mts +12 -1
- package/build/types.d.mts.map +1 -1
- package/build/types.d.ts +12 -1
- package/build/types.d.ts.map +1 -1
- package/build/types.mjs.map +1 -1
- package/build/utils/HashlinkEncoder.d.mts +1 -1
- package/build/utils/HashlinkEncoder.d.mts.map +1 -1
- package/build/utils/HashlinkEncoder.d.ts +1 -1
- package/build/utils/HashlinkEncoder.d.ts.map +1 -1
- package/build/utils/HashlinkEncoder.mjs.map +1 -1
- package/build/utils/JsonEncoder.d.mts +3 -2
- package/build/utils/JsonEncoder.d.mts.map +1 -1
- package/build/utils/JsonEncoder.d.ts +3 -2
- package/build/utils/JsonEncoder.d.ts.map +1 -1
- package/build/utils/JsonEncoder.js +8 -8
- package/build/utils/JsonEncoder.mjs +4 -3
- package/build/utils/JsonEncoder.mjs.map +1 -1
- package/build/utils/JsonTransformer.mjs.map +1 -1
- package/build/utils/MessageValidator.mjs.map +1 -1
- package/build/utils/MultiBaseEncoder.d.mts +4 -2
- package/build/utils/MultiBaseEncoder.d.mts.map +1 -1
- package/build/utils/MultiBaseEncoder.d.ts +4 -2
- package/build/utils/MultiBaseEncoder.d.ts.map +1 -1
- package/build/utils/MultiBaseEncoder.mjs.map +1 -1
- package/build/utils/MultiHashEncoder.d.mts +5 -5
- package/build/utils/MultiHashEncoder.d.mts.map +1 -1
- package/build/utils/MultiHashEncoder.d.ts +5 -5
- package/build/utils/MultiHashEncoder.d.ts.map +1 -1
- package/build/utils/MultiHashEncoder.js +5 -7
- package/build/utils/MultiHashEncoder.mjs +5 -4
- package/build/utils/MultiHashEncoder.mjs.map +1 -1
- package/build/utils/TypedArrayEncoder.d.mts +12 -9
- package/build/utils/TypedArrayEncoder.d.mts.map +1 -1
- package/build/utils/TypedArrayEncoder.d.ts +12 -9
- package/build/utils/TypedArrayEncoder.d.ts.map +1 -1
- package/build/utils/TypedArrayEncoder.js +22 -17
- package/build/utils/TypedArrayEncoder.mjs +7 -1
- package/build/utils/TypedArrayEncoder.mjs.map +1 -1
- package/build/utils/VarintEncoder.js +1 -4
- package/build/utils/VarintEncoder.mjs +1 -2
- package/build/utils/VarintEncoder.mjs.map +1 -1
- package/build/utils/base58.mjs.map +1 -1
- package/build/utils/buffer.d.mts +1 -1
- package/build/utils/buffer.d.ts +1 -1
- package/build/utils/buffer.mjs +1 -1
- package/build/utils/deepEquality.mjs.map +1 -1
- package/build/utils/index.js +10 -11
- package/build/utils/index.mjs +9 -9
- package/build/utils/objectEquality.mjs.map +1 -1
- package/build/utils/timestamp.d.mts +10 -2
- package/build/utils/timestamp.d.mts.map +1 -1
- package/build/utils/timestamp.d.ts +10 -2
- package/build/utils/timestamp.d.ts.map +1 -1
- package/build/utils/timestamp.js +9 -1
- package/build/utils/timestamp.mjs +8 -2
- package/build/utils/timestamp.mjs.map +1 -1
- package/build/utils/transformers.d.mts.map +1 -1
- package/build/utils/transformers.d.ts.map +1 -1
- package/build/utils/transformers.mjs.map +1 -1
- package/build/utils/validators.d.mts.map +1 -1
- package/build/utils/validators.d.ts.map +1 -1
- package/build/utils/validators.mjs.map +1 -1
- package/build/utils/zod.js +2 -0
- package/build/utils/zod.mjs +2 -1
- package/build/utils/zod.mjs.map +1 -1
- package/package.json +25 -25
- package/build/utils/buffer.js +0 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AnyUint8Array } from "../../types.mjs";
|
|
1
2
|
import { CredoWebCrypto } from "../../crypto/webcrypto/CredoWebCrypto.mjs";
|
|
2
3
|
import { X509CreateCertificateOptions } from "./X509ServiceOptions.mjs";
|
|
3
|
-
import { AgentContext } from "../../agent/context/AgentContext.mjs";
|
|
4
4
|
import { PublicJwk } from "../kms/jwk/PublicJwk.mjs";
|
|
5
|
+
import { AgentContext } from "../../agent/context/AgentContext.mjs";
|
|
5
6
|
import * as x509 from "@peculiar/x509";
|
|
6
7
|
|
|
7
8
|
//#region src/modules/x509/X509Certificate.d.ts
|
|
@@ -27,18 +28,18 @@ declare enum X509ExtendedKeyUsage {
|
|
|
27
28
|
}
|
|
28
29
|
type X509CertificateOptions = {
|
|
29
30
|
publicJwk: PublicJwk;
|
|
30
|
-
privateKey?:
|
|
31
|
+
privateKey?: AnyUint8Array;
|
|
31
32
|
x509Certificate: x509.X509Certificate;
|
|
32
33
|
};
|
|
33
34
|
declare class X509Certificate {
|
|
34
35
|
publicJwk: PublicJwk;
|
|
35
|
-
privateKey?:
|
|
36
|
+
privateKey?: AnyUint8Array;
|
|
36
37
|
private x509Certificate;
|
|
37
38
|
private constructor();
|
|
38
39
|
set keyId(keyId: string);
|
|
39
40
|
get keyId(): string;
|
|
40
41
|
get hasKeyId(): boolean;
|
|
41
|
-
static fromRawCertificate(rawCertificate:
|
|
42
|
+
static fromRawCertificate(rawCertificate: AnyUint8Array): X509Certificate;
|
|
42
43
|
static fromEncodedCertificate(encodedCertificate: string): X509Certificate;
|
|
43
44
|
private static parseCertificate;
|
|
44
45
|
private getMatchingExtensions;
|
|
@@ -104,7 +105,6 @@ declare class X509Certificate {
|
|
|
104
105
|
* @param format the format to export to, defaults to `pem`
|
|
105
106
|
*/
|
|
106
107
|
toString(format?: 'asn' | 'pem' | 'hex' | 'base64' | 'text' | 'base64url'): string;
|
|
107
|
-
private toJSON;
|
|
108
108
|
equal(certificate: X509Certificate): boolean;
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Certificate.d.mts","names":[],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"X509Certificate.d.mts","names":[],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":[],"mappings":";;;;;;;;aA+BY,YAAA;;;;EAAA,gBAAY,GAAA,CAAA;EAYZ,YAAA,GAAA,EAAA;EAUA,WAAA,GAAA,EAAA;EAAsB,OAAA,GAAA,EAAA;cACrB,GAAA,GAAA;cACE,GAAA,GAAA;;AACwB,aAb3B,oBAAA;EAgBC,UAAA,GAAA,mBAAe;EAAA,UAAA,GAAA,mBAAA;aACR,GAAA,mBAAA;iBACE,GAAA,mBAAA;cAqB6B,GAAA,mBAAA;aAAgB,GAAA,mBAAA;OAKC,GAAA,iBAAA;;AAsBzC,KAxDf,sBAAA,GAwDe;aAvDd;eACE;iBA6GM,EA5GF,IAAA,CAAK,eA4GH;;AAoCiB,cA7IzB,eAAA,CA6IyB;WAAyC,EA5I3D,SA4I2D;YAAc,CAAA,EA3IvE,aA2IuE;UAAA,eAAA;UA6FvF,WAAA,CAAA;MACA,KAAA,CAAA,KAAA,EAAA,MAAA;MACA,KAAA,CAAA,CAAA,EAAA,MAAA;MAEkB,QAAA,CAAA,CAAA,EAAA,OAAA;SACN,kBAAA,CAAA,cAAA,EAxNiC,aAwNjC,CAAA,EAxNiD,eAwNjD;SAcH,sBAAA,CAAA,kBAAA,EAAA,MAAA,CAAA,EAjOqD,eAiOrD;iBAAc,gBAAA;UAiCkB,qBAAA;MAAY,cAAA,CAAA,CAAA,EA5OhC,UA4OgC,CA5OhC,WA4OgC,CAAA;;;IAkC/B,KAAA,EAAA,MAAA;EAAe,CAAA,EAAA;;;;;;;;;;;kBAvNtB;0BAwBgB;;yBAYC,yCAAyC,iBAAc,QAAA;;;;;;;;sBAiGrE;gBACN;;;;;;;;;;;;gBAcH,iBAAc;;;;kCAiCkB,eAAY;;;;;;;;;;;;;;;;;;;qBAkC/B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AnyUint8Array } from "../../types.js";
|
|
1
2
|
import { CredoWebCrypto } from "../../crypto/webcrypto/CredoWebCrypto.js";
|
|
2
3
|
import { X509CreateCertificateOptions } from "./X509ServiceOptions.js";
|
|
3
|
-
import { AgentContext } from "../../agent/context/AgentContext.js";
|
|
4
4
|
import { PublicJwk } from "../kms/jwk/PublicJwk.js";
|
|
5
|
+
import { AgentContext } from "../../agent/context/AgentContext.js";
|
|
5
6
|
import * as x509 from "@peculiar/x509";
|
|
6
7
|
|
|
7
8
|
//#region src/modules/x509/X509Certificate.d.ts
|
|
@@ -27,18 +28,18 @@ declare enum X509ExtendedKeyUsage {
|
|
|
27
28
|
}
|
|
28
29
|
type X509CertificateOptions = {
|
|
29
30
|
publicJwk: PublicJwk;
|
|
30
|
-
privateKey?:
|
|
31
|
+
privateKey?: AnyUint8Array;
|
|
31
32
|
x509Certificate: x509.X509Certificate;
|
|
32
33
|
};
|
|
33
34
|
declare class X509Certificate {
|
|
34
35
|
publicJwk: PublicJwk;
|
|
35
|
-
privateKey?:
|
|
36
|
+
privateKey?: AnyUint8Array;
|
|
36
37
|
private x509Certificate;
|
|
37
38
|
private constructor();
|
|
38
39
|
set keyId(keyId: string);
|
|
39
40
|
get keyId(): string;
|
|
40
41
|
get hasKeyId(): boolean;
|
|
41
|
-
static fromRawCertificate(rawCertificate:
|
|
42
|
+
static fromRawCertificate(rawCertificate: AnyUint8Array): X509Certificate;
|
|
42
43
|
static fromEncodedCertificate(encodedCertificate: string): X509Certificate;
|
|
43
44
|
private static parseCertificate;
|
|
44
45
|
private getMatchingExtensions;
|
|
@@ -104,7 +105,6 @@ declare class X509Certificate {
|
|
|
104
105
|
* @param format the format to export to, defaults to `pem`
|
|
105
106
|
*/
|
|
106
107
|
toString(format?: 'asn' | 'pem' | 'hex' | 'base64' | 'text' | 'base64url'): string;
|
|
107
|
-
private toJSON;
|
|
108
108
|
equal(certificate: X509Certificate): boolean;
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Certificate.d.ts","names":[],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"X509Certificate.d.ts","names":[],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":[],"mappings":";;;;;;;;aA+BY,YAAA;;EAAA,cAAA,GAAY,CAAA;EAYZ,eAAA,GAAA,CAAA;EAUA,gBAAA,GAAA,CAAA;EAAsB,YAAA,GAAA,EAAA;aACrB,GAAA,EAAA;SACE,GAAA,EAAA;cACS,GAAA,GAAA;EAAe,YAAA,GAAA,GAAA;AAGvC;AAA4B,aAhBhB,oBAAA;YAiBQ,GAAA,mBAAA;YACE,GAAA,mBAAA;aAqB6B,GAAA,mBAAA;iBAAgB,GAAA,mBAAA;cAKC,GAAA,mBAAA;aAsBzC,GAAA,mBAAA;OAAA,GAAA,iBAAA;;KAxDf,sBAAA;WA+GS,EA9GR,SA8GQ;YAwBgB,CAAA,EArItB,aAqIsB;iBAYC,EAhJnB,IAAA,CAAK,eAgJc;;AAAuD,cA7IhF,eAAA,CA6IgF;WAAA,EA5IzE,SA4IyE;YA6FvF,CAAA,EAxOgB,aAwOhB;UACA,eAAA;UACA,WAAA,CAAA;MAEkB,KAAA,CAAA,KAAA,EAAA,MAAA;MACN,KAAA,CAAA,CAAA,EAAA,MAAA;MAcH,QAAA,CAAA,CAAA,EAAA,OAAA;SAAc,kBAAA,CAAA,cAAA,EAtOsB,aAsOtB,CAAA,EAtOsC,eAsOtC;SAiCkB,sBAAA,CAAA,kBAAA,EAAA,MAAA,CAAA,EAlQqB,eAkQrB;iBAAY,gBAAA;;wBA5OhC,WAAA;MA8QC,uBAAA,CAAA,CAAA,EAAA;IAAe,IAAA,sBAAA;;;;;;;;;;;;;kBAvNtB;0BAwBgB;;yBAYC,yCAAyC,iBAAc,QAAA;;;;;;;;sBAiGrE;gBACN;;;;;;;;;;;;gBAcH,iBAAc;;;;kCAiCkB,eAAY;;;;;;;;;;;;;;;;;;;qBAkC/B"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
-
const require_X509Error = require('./X509Error.js');
|
|
5
4
|
const require_TypedArrayEncoder = require('../../utils/TypedArrayEncoder.js');
|
|
6
5
|
require('../../utils/index.js');
|
|
7
6
|
const require_equals = require('../kms/jwk/equals.js');
|
|
@@ -11,15 +10,16 @@ const require_keyAlgorithmConversion = require('../../crypto/webcrypto/utils/key
|
|
|
11
10
|
require('../../crypto/webcrypto/utils/index.js');
|
|
12
11
|
const require_CredoWebCrypto = require('../../crypto/webcrypto/CredoWebCrypto.js');
|
|
13
12
|
require('../../crypto/webcrypto/index.js');
|
|
14
|
-
const require_nameConversion = require('./utils/nameConversion.js');
|
|
15
13
|
const require_extensions = require('./utils/extensions.js');
|
|
14
|
+
const require_X509Error = require('./X509Error.js');
|
|
15
|
+
const require_nameConversion = require('./utils/nameConversion.js');
|
|
16
16
|
require('./utils/index.js');
|
|
17
|
-
let __peculiar_x509 = require("@peculiar/x509");
|
|
18
|
-
__peculiar_x509 = require_rolldown_runtime.__toESM(__peculiar_x509);
|
|
19
17
|
let __peculiar_asn1_schema = require("@peculiar/asn1-schema");
|
|
20
18
|
__peculiar_asn1_schema = require_rolldown_runtime.__toESM(__peculiar_asn1_schema);
|
|
21
19
|
let __peculiar_asn1_x509 = require("@peculiar/asn1-x509");
|
|
22
20
|
__peculiar_asn1_x509 = require_rolldown_runtime.__toESM(__peculiar_asn1_x509);
|
|
21
|
+
let __peculiar_x509 = require("@peculiar/x509");
|
|
22
|
+
__peculiar_x509 = require_rolldown_runtime.__toESM(__peculiar_x509);
|
|
23
23
|
|
|
24
24
|
//#region src/modules/x509/X509Certificate.ts
|
|
25
25
|
let X509KeyUsage = /* @__PURE__ */ function(X509KeyUsage$1) {
|
|
@@ -229,9 +229,6 @@ var X509Certificate = class X509Certificate {
|
|
|
229
229
|
toString(format) {
|
|
230
230
|
return this.x509Certificate.toString(format ?? "pem");
|
|
231
231
|
}
|
|
232
|
-
toJSON() {
|
|
233
|
-
return this.toString();
|
|
234
|
-
}
|
|
235
232
|
equal(certificate) {
|
|
236
233
|
const parsedOther = new __peculiar_x509.X509Certificate(certificate.rawCertificate);
|
|
237
234
|
return this.x509Certificate.equal(parsedOther);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { X509Error } from "./X509Error.mjs";
|
|
4
3
|
import { TypedArrayEncoder } from "../../utils/TypedArrayEncoder.mjs";
|
|
5
4
|
import "../../utils/index.mjs";
|
|
6
5
|
import { assymetricPublicJwkMatches } from "../kms/jwk/equals.mjs";
|
|
@@ -10,12 +9,13 @@ import { publicJwkToCryptoKeyAlgorithm, spkiToPublicJwk } from "../../crypto/web
|
|
|
10
9
|
import "../../crypto/webcrypto/utils/index.mjs";
|
|
11
10
|
import { CredoWebCrypto } from "../../crypto/webcrypto/CredoWebCrypto.mjs";
|
|
12
11
|
import "../../crypto/webcrypto/index.mjs";
|
|
13
|
-
import { convertName } from "./utils/nameConversion.mjs";
|
|
14
12
|
import { createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createKeyUsagesExtension, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension } from "./utils/extensions.mjs";
|
|
13
|
+
import { X509Error } from "./X509Error.mjs";
|
|
14
|
+
import { convertName } from "./utils/nameConversion.mjs";
|
|
15
15
|
import "./utils/index.mjs";
|
|
16
|
-
import * as x509 from "@peculiar/x509";
|
|
17
16
|
import { AsnParser } from "@peculiar/asn1-schema";
|
|
18
17
|
import { SubjectPublicKeyInfo, id_ce_authorityKeyIdentifier, id_ce_extKeyUsage, id_ce_issuerAltName, id_ce_keyUsage, id_ce_subjectAltName, id_ce_subjectKeyIdentifier } from "@peculiar/asn1-x509";
|
|
18
|
+
import * as x509 from "@peculiar/x509";
|
|
19
19
|
|
|
20
20
|
//#region src/modules/x509/X509Certificate.ts
|
|
21
21
|
let X509KeyUsage = /* @__PURE__ */ function(X509KeyUsage$1) {
|
|
@@ -225,9 +225,6 @@ var X509Certificate = class X509Certificate {
|
|
|
225
225
|
toString(format) {
|
|
226
226
|
return this.x509Certificate.toString(format ?? "pem");
|
|
227
227
|
}
|
|
228
|
-
toJSON() {
|
|
229
|
-
return this.toString();
|
|
230
|
-
}
|
|
231
228
|
equal(certificate) {
|
|
232
229
|
const parsedOther = new x509.X509Certificate(certificate.rawCertificate);
|
|
233
230
|
return this.x509Certificate.equal(parsedOther);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Certificate.mjs","names":["extensions: Array<x509.Extension | undefined>","certificate","certificateInstance","publicCryptoKey: CredoWebCryptoKey | undefined"],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":["import type { AgentContext } from '../../agent'\nimport type { X509CreateCertificateOptions } from './X509ServiceOptions'\n\nimport { AsnParser } from '@peculiar/asn1-schema'\nimport {\n SubjectPublicKeyInfo,\n id_ce_authorityKeyIdentifier,\n id_ce_extKeyUsage,\n id_ce_issuerAltName,\n id_ce_keyUsage,\n id_ce_subjectAltName,\n id_ce_subjectKeyIdentifier,\n} from '@peculiar/asn1-x509'\nimport * as x509 from '@peculiar/x509'\nimport { CredoWebCrypto, CredoWebCryptoKey } from '../../crypto/webcrypto'\nimport { publicJwkToCryptoKeyAlgorithm, spkiToPublicJwk } from '../../crypto/webcrypto/utils'\nimport { TypedArrayEncoder } from '../../utils'\n\nimport { PublicJwk, assymetricPublicJwkMatches } from '../kms'\nimport { X509Error } from './X509Error'\nimport {\n convertName,\n createAuthorityKeyIdentifierExtension,\n createBasicConstraintsExtension,\n createCrlDistributionPointsExtension,\n createExtendedKeyUsagesExtension,\n createIssuerAlternativeNameExtension,\n createKeyUsagesExtension,\n createSubjectAlternativeNameExtension,\n createSubjectKeyIdentifierExtension,\n} from './utils'\n\nexport enum X509KeyUsage {\n DigitalSignature = 1,\n NonRepudiation = 2,\n KeyEncipherment = 4,\n DataEncipherment = 8,\n KeyAgreement = 16,\n KeyCertSign = 32,\n CrlSign = 64,\n EncipherOnly = 128,\n DecipherOnly = 256,\n}\n\nexport enum X509ExtendedKeyUsage {\n ServerAuth = '1.3.6.1.5.5.7.3.1',\n ClientAuth = '1.3.6.1.5.5.7.3.2',\n CodeSigning = '1.3.6.1.5.5.7.3.3',\n EmailProtection = '1.3.6.1.5.5.7.3.4',\n TimeStamping = '1.3.6.1.5.5.7.3.8',\n OcspSigning = '1.3.6.1.5.5.7.3.9',\n MdlDs = '1.0.18013.5.1.2',\n}\n\nexport type X509CertificateOptions = {\n publicJwk: PublicJwk\n privateKey?: Uint8Array\n x509Certificate: x509.X509Certificate\n}\n\nexport class X509Certificate {\n public publicJwk: PublicJwk\n public privateKey?: Uint8Array\n private x509Certificate: x509.X509Certificate\n\n private constructor(options: X509CertificateOptions) {\n this.publicJwk = options.publicJwk\n this.privateKey = options.privateKey\n this.x509Certificate = options.x509Certificate\n }\n\n public set keyId(keyId: string) {\n this.publicJwk.keyId = keyId\n }\n\n public get keyId(): string {\n return this.publicJwk.keyId\n }\n\n public get hasKeyId(): boolean {\n return this.publicJwk.hasKeyId\n }\n\n public static fromRawCertificate(rawCertificate: Uint8Array): X509Certificate {\n const certificate = new x509.X509Certificate(rawCertificate)\n return X509Certificate.parseCertificate(certificate)\n }\n\n public static fromEncodedCertificate(encodedCertificate: string): X509Certificate {\n const certificate = new x509.X509Certificate(encodedCertificate)\n return X509Certificate.parseCertificate(certificate)\n }\n\n private static parseCertificate(certificate: x509.X509Certificate): X509Certificate {\n const spki = AsnParser.parse(certificate.publicKey.rawData, SubjectPublicKeyInfo)\n const privateKey = certificate.privateKey ? new Uint8Array(certificate.privateKey.rawData) : undefined\n\n const publicJwk = spkiToPublicJwk(spki)\n\n return new X509Certificate({\n publicJwk,\n privateKey,\n x509Certificate: certificate,\n })\n }\n\n private getMatchingExtensions<T = { critical: boolean }>(objectIdentifier: string): Array<T> | undefined {\n return this.x509Certificate.extensions.filter((e) => e.type === objectIdentifier) as Array<T> | undefined\n }\n\n public get rawCertificate() {\n return new Uint8Array(this.x509Certificate.rawData)\n }\n\n public get subjectAlternativeNames() {\n const san = this.getMatchingExtensions<x509.SubjectAlternativeNameExtension>(id_ce_subjectAltName)\n return san?.flatMap((s) => s.names.items).map((i) => ({ type: i.type, value: i.value })) ?? []\n }\n\n public get issuerAlternativeNames() {\n const ian = this.getMatchingExtensions<x509.IssuerAlternativeNameExtension>(id_ce_issuerAltName)\n return ian?.flatMap((i) => i.names.items).map((i) => ({ type: i.type, value: i.value })) ?? []\n }\n\n public get sanDnsNames() {\n return this.subjectAlternativeNames.filter((san) => san.type === 'dns').map((san) => san.value)\n }\n\n public get sanUriNames() {\n return this.subjectAlternativeNames.filter((ian) => ian.type === 'url').map((ian) => ian.value)\n }\n\n public get ianDnsNames() {\n return this.issuerAlternativeNames.filter((san) => san.type === 'dns').map((san) => san.value)\n }\n\n public get ianUriNames() {\n return this.issuerAlternativeNames.filter((ian) => ian.type === 'url').map((ian) => ian.value)\n }\n\n public get authorityKeyIdentifier() {\n const keyIds = this.getMatchingExtensions<x509.AuthorityKeyIdentifierExtension>(id_ce_authorityKeyIdentifier)?.map(\n (e) => e.keyId\n )\n\n if (keyIds && keyIds.length > 1) {\n throw new X509Error('Multiple Authority Key Identifiers are not allowed')\n }\n\n return keyIds?.[0]\n }\n\n public get subjectKeyIdentifier() {\n const keyIds = this.getMatchingExtensions<x509.SubjectKeyIdentifierExtension>(id_ce_subjectKeyIdentifier)?.map(\n (e) => e.keyId\n )\n\n if (keyIds && keyIds.length > 1) {\n throw new X509Error('Multiple Subject Key Identifiers are not allowed')\n }\n\n return keyIds?.[0]\n }\n\n // biome-ignore lint/suspicious/useGetterReturn: <explanation>\n public get keyUsage() {\n const keyUsages = this.getMatchingExtensions<x509.KeyUsagesExtension>(id_ce_keyUsage)?.map((e) => e.usages)\n\n if (keyUsages && keyUsages.length > 1) {\n throw new X509Error('Multiple Key Usages are not allowed')\n }\n\n if (keyUsages) {\n return Object.values(X509KeyUsage)\n .filter((key): key is number => typeof key === 'number')\n .filter((flagValue) => (keyUsages[0] & flagValue) === flagValue)\n .map((flagValue) => flagValue as X509KeyUsage)\n }\n }\n\n public get extendedKeyUsage() {\n const extendedKeyUsages = this.getMatchingExtensions<x509.ExtendedKeyUsageExtension>(id_ce_extKeyUsage)?.map(\n (e) => e.usages\n )\n\n if (extendedKeyUsages && extendedKeyUsages.length > 1) {\n throw new X509Error('Multiple Key Usages are not allowed')\n }\n\n return extendedKeyUsages?.[0] as X509ExtendedKeyUsage | undefined\n }\n\n public isExtensionCritical(id: string): boolean {\n const extension = this.getMatchingExtensions(id)\n if (!extension) {\n throw new X509Error(`extension with id '${id}' is not found`)\n }\n\n return !!extension[0].critical\n }\n\n public static async create(options: X509CreateCertificateOptions, webCrypto: CredoWebCrypto) {\n const subjectPublicKey = options.subjectPublicKey ?? options.authorityKey\n const isSelfSignedCertificate = assymetricPublicJwkMatches(options.authorityKey.toJson(), subjectPublicKey.toJson())\n\n const signingKey = new CredoWebCryptoKey(\n options.authorityKey,\n publicJwkToCryptoKeyAlgorithm(options.authorityKey),\n false,\n 'private',\n ['sign']\n )\n const publicKey = new CredoWebCryptoKey(\n subjectPublicKey,\n publicJwkToCryptoKeyAlgorithm(options.authorityKey),\n true,\n 'public',\n ['verify']\n )\n\n const issuerName = convertName(options.issuer)\n\n const extensions: Array<x509.Extension | undefined> = []\n extensions.push(\n createSubjectKeyIdentifierExtension(options.extensions?.subjectKeyIdentifier, { publicJwk: subjectPublicKey })\n )\n extensions.push(createKeyUsagesExtension(options.extensions?.keyUsage))\n extensions.push(createExtendedKeyUsagesExtension(options.extensions?.extendedKeyUsage))\n extensions.push(\n createAuthorityKeyIdentifierExtension(options.extensions?.authorityKeyIdentifier, {\n publicJwk: options.authorityKey,\n })\n )\n extensions.push(createIssuerAlternativeNameExtension(options.extensions?.issuerAlternativeName))\n extensions.push(createSubjectAlternativeNameExtension(options.extensions?.subjectAlternativeName))\n extensions.push(createBasicConstraintsExtension(options.extensions?.basicConstraints))\n extensions.push(createCrlDistributionPointsExtension(options.extensions?.crlDistributionPoints))\n\n if (isSelfSignedCertificate) {\n if (options.subject) {\n throw new X509Error('Do not provide a subject name when the certificate is supposed to be self signed')\n }\n\n const certificate = await x509.X509CertificateGenerator.createSelfSigned(\n {\n keys: { publicKey, privateKey: signingKey },\n name: issuerName,\n notBefore: options.validity?.notBefore,\n notAfter: options.validity?.notAfter,\n extensions: extensions.filter((e) => e !== undefined),\n serialNumber: options.serialNumber,\n },\n webCrypto\n )\n\n const certificateInstance = X509Certificate.parseCertificate(certificate)\n if (subjectPublicKey.hasKeyId) certificateInstance.publicJwk.keyId = subjectPublicKey.keyId\n return certificateInstance\n }\n\n if (!options.subject) {\n throw new X509Error('Provide a subject name when the certificate is not supposed to be self signed')\n }\n\n const subjectName = convertName(options.subject)\n\n const certificate = await x509.X509CertificateGenerator.create(\n {\n signingKey,\n publicKey,\n issuer: issuerName,\n subject: subjectName,\n notBefore: options.validity?.notBefore,\n notAfter: options.validity?.notAfter,\n extensions: extensions.filter((e) => e !== undefined),\n },\n webCrypto\n )\n\n const certificateInstance = X509Certificate.parseCertificate(certificate)\n if (subjectPublicKey.hasKeyId) certificateInstance.publicJwk.keyId = subjectPublicKey.keyId\n return certificateInstance\n }\n\n public get subject() {\n return this.x509Certificate.subject\n }\n\n public get issuer() {\n return this.x509Certificate.issuer\n }\n\n public async verify(\n {\n verificationDate = new Date(),\n publicJwk,\n skipSignatureVerification = false,\n }: {\n verificationDate: Date\n publicJwk?: PublicJwk\n\n /**\n * Whether to skip the verification of the signature and only perform other checks (such\n * as whether the certificate is not expired).\n *\n * This can be useful when an non-self-signed certificate is directly trusted, and it may\n * not be possible to verify the certifcate as the root/intermediate certificate containing\n * the key of the signer/intermediate is not present.\n *\n * @default false\n */\n skipSignatureVerification?: boolean\n },\n webCrypto: CredoWebCrypto\n ) {\n let publicCryptoKey: CredoWebCryptoKey | undefined\n if (publicJwk) {\n const cryptoKeyAlgorithm = publicJwkToCryptoKeyAlgorithm(publicJwk)\n publicCryptoKey = new CredoWebCryptoKey(publicJwk, cryptoKeyAlgorithm, true, 'public', ['verify'])\n }\n\n // We use the library to validate the signature, but the date is manually verified\n const isSignatureValid = skipSignatureVerification\n ? true\n : await this.x509Certificate.verify({ signatureOnly: true, publicKey: publicCryptoKey }, webCrypto)\n const time = verificationDate.getTime()\n\n const isNotBeforeValid = this.x509Certificate.notBefore.getTime() <= time\n const isNotAfterValid = time <= this.x509Certificate.notAfter.getTime()\n\n if (!isSignatureValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' has an invalid signature`)\n }\n\n if (!isNotBeforeValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' used before it is allowed`)\n }\n\n if (!isNotAfterValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' used after it is allowed`)\n }\n }\n\n /**\n * Get the thumprint of the X509 certificate in hex format.\n */\n public async getThumprintInHex(agentContext: AgentContext) {\n const thumbprint = await this.x509Certificate.getThumbprint(new CredoWebCrypto(agentContext))\n const thumbprintHex = TypedArrayEncoder.toHex(new Uint8Array(thumbprint))\n\n return thumbprintHex\n }\n\n /**\n * Get the data elements of the x509 certificate\n */\n public get data() {\n return {\n issuerName: this.x509Certificate.issuerName.toString(),\n issuer: this.x509Certificate.issuer,\n subjectName: this.x509Certificate.subjectName.toString(),\n subject: this.x509Certificate.subject,\n serialNumber: this.x509Certificate.serialNumber,\n pem: this.x509Certificate.toString(),\n notBefore: this.x509Certificate.notBefore,\n notAfter: this.x509Certificate.notAfter,\n }\n }\n\n public getIssuerNameField(field: string) {\n return this.x509Certificate.issuerName.getField(field)\n }\n\n /**\n * @param format the format to export to, defaults to `pem`\n */\n public toString(format?: 'asn' | 'pem' | 'hex' | 'base64' | 'text' | 'base64url') {\n return this.x509Certificate.toString(format ?? 'pem')\n }\n\n private toJSON() {\n return this.toString()\n }\n\n public equal(certificate: X509Certificate) {\n const parsedOther = new x509.X509Certificate(certificate.rawCertificate)\n\n return this.x509Certificate.equal(parsedOther)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,IAAY,wDAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGF,IAAY,wEAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AASF,IAAa,kBAAb,MAAa,gBAAgB;CAK3B,AAAQ,YAAY,SAAiC;AACnD,OAAK,YAAY,QAAQ;AACzB,O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4BAA4B;AAGhG,MAAI,CAAC,iBACH,OAAM,IAAI,UAAU,iBAAiB,KAAK,gBAAgB,QAAQ,6BAA6B;AAGjG,MAAI,CAAC,gBACH,OAAM,IAAI,UAAU,iBAAiB,KAAK,gBAAgB,QAAQ,4BAA4B;;;;;CAOlG,MAAa,kBAAkB,cAA4B;EACzD,MAAM,aAAa,MAAM,KAAK,gBAAgB,cAAc,IAAI,eAAe,aAAa,CAAC;AAG7F,SAFsB,kBAAkB,MAAM,IAAI,WAAW,WAAW,CAAC;;;;;CAQ3E,IAAW,OAAO;AAChB,SAAO;GACL,YAAY,KAAK,gBAAgB,WAAW,UAAU;GACtD,QAAQ,KAAK,gBAAgB;GAC7B,aAAa,KAAK,gBAAgB,YAAY,UAAU;GACxD,SAAS,KAAK,gBAAgB;GAC9B,cAAc,KAAK,gBAAgB;GACnC,KAAK,KAAK,gBAAgB,UAAU;GACpC,WAAW,KAAK,gBAAgB;GAChC,UAAU,KAAK,gBAAgB;GAChC;;CAGH,AAAO,mBAAmB,OAAe;AACvC,SAAO,KAAK,gBAAgB,WAAW,SAAS,MAAM;;;;;CAMxD,AAAO,SAAS,QAAkE;AAChF,SAAO,KAAK,gBAAgB,SAAS,UAAU,MAAM;;CAGvD,AAAQ,SAAS;AACf,SAAO,KAAK,UAAU;;CAGxB,AAAO,MAAM,aAA8B;EACzC,MAAM,cAAc,IAAI,KAAK,gBAAgB,YAAY,eAAe;AAExE,SAAO,KAAK,gBAAgB,MAAM,YAAY"}
|
|
1
|
+
{"version":3,"file":"X509Certificate.mjs","names":["extensions: Array<x509.Extension | undefined>","certificate","certificateInstance","publicCryptoKey: CredoWebCryptoKey | undefined"],"sources":["../../../src/modules/x509/X509Certificate.ts"],"sourcesContent":["import { AsnParser } from '@peculiar/asn1-schema'\nimport {\n id_ce_authorityKeyIdentifier,\n id_ce_extKeyUsage,\n id_ce_issuerAltName,\n id_ce_keyUsage,\n id_ce_subjectAltName,\n id_ce_subjectKeyIdentifier,\n SubjectPublicKeyInfo,\n} from '@peculiar/asn1-x509'\nimport * as x509 from '@peculiar/x509'\nimport type { AgentContext } from '../../agent'\nimport { CredoWebCrypto, CredoWebCryptoKey } from '../../crypto/webcrypto'\nimport { publicJwkToCryptoKeyAlgorithm, spkiToPublicJwk } from '../../crypto/webcrypto/utils'\nimport type { AnyUint8Array } from '../../types'\nimport { TypedArrayEncoder } from '../../utils'\nimport { assymetricPublicJwkMatches, PublicJwk } from '../kms'\nimport {\n convertName,\n createAuthorityKeyIdentifierExtension,\n createBasicConstraintsExtension,\n createCrlDistributionPointsExtension,\n createExtendedKeyUsagesExtension,\n createIssuerAlternativeNameExtension,\n createKeyUsagesExtension,\n createSubjectAlternativeNameExtension,\n createSubjectKeyIdentifierExtension,\n} from './utils'\nimport { X509Error } from './X509Error'\nimport type { X509CreateCertificateOptions } from './X509ServiceOptions'\n\nexport enum X509KeyUsage {\n DigitalSignature = 1,\n NonRepudiation = 2,\n KeyEncipherment = 4,\n DataEncipherment = 8,\n KeyAgreement = 16,\n KeyCertSign = 32,\n CrlSign = 64,\n EncipherOnly = 128,\n DecipherOnly = 256,\n}\n\nexport enum X509ExtendedKeyUsage {\n ServerAuth = '1.3.6.1.5.5.7.3.1',\n ClientAuth = '1.3.6.1.5.5.7.3.2',\n CodeSigning = '1.3.6.1.5.5.7.3.3',\n EmailProtection = '1.3.6.1.5.5.7.3.4',\n TimeStamping = '1.3.6.1.5.5.7.3.8',\n OcspSigning = '1.3.6.1.5.5.7.3.9',\n MdlDs = '1.0.18013.5.1.2',\n}\n\nexport type X509CertificateOptions = {\n publicJwk: PublicJwk\n privateKey?: AnyUint8Array\n x509Certificate: x509.X509Certificate\n}\n\nexport class X509Certificate {\n public publicJwk: PublicJwk\n public privateKey?: AnyUint8Array\n private x509Certificate: x509.X509Certificate\n\n private constructor(options: X509CertificateOptions) {\n this.publicJwk = options.publicJwk\n this.privateKey = options.privateKey\n this.x509Certificate = options.x509Certificate\n }\n\n public set keyId(keyId: string) {\n this.publicJwk.keyId = keyId\n }\n\n public get keyId(): string {\n return this.publicJwk.keyId\n }\n\n public get hasKeyId(): boolean {\n return this.publicJwk.hasKeyId\n }\n\n public static fromRawCertificate(rawCertificate: AnyUint8Array): X509Certificate {\n const certificate = new x509.X509Certificate(rawCertificate)\n return X509Certificate.parseCertificate(certificate)\n }\n\n public static fromEncodedCertificate(encodedCertificate: string): X509Certificate {\n const certificate = new x509.X509Certificate(encodedCertificate)\n return X509Certificate.parseCertificate(certificate)\n }\n\n private static parseCertificate(certificate: x509.X509Certificate): X509Certificate {\n const spki = AsnParser.parse(certificate.publicKey.rawData, SubjectPublicKeyInfo)\n const privateKey = certificate.privateKey ? new Uint8Array(certificate.privateKey.rawData) : undefined\n\n const publicJwk = spkiToPublicJwk(spki)\n\n return new X509Certificate({\n publicJwk,\n privateKey,\n x509Certificate: certificate,\n })\n }\n\n private getMatchingExtensions<T = { critical: boolean }>(objectIdentifier: string): Array<T> | undefined {\n return this.x509Certificate.extensions.filter((e) => e.type === objectIdentifier) as Array<T> | undefined\n }\n\n public get rawCertificate() {\n return new Uint8Array(this.x509Certificate.rawData)\n }\n\n public get subjectAlternativeNames() {\n const san = this.getMatchingExtensions<x509.SubjectAlternativeNameExtension>(id_ce_subjectAltName)\n return san?.flatMap((s) => s.names.items).map((i) => ({ type: i.type, value: i.value })) ?? []\n }\n\n public get issuerAlternativeNames() {\n const ian = this.getMatchingExtensions<x509.IssuerAlternativeNameExtension>(id_ce_issuerAltName)\n return ian?.flatMap((i) => i.names.items).map((i) => ({ type: i.type, value: i.value })) ?? []\n }\n\n public get sanDnsNames() {\n return this.subjectAlternativeNames.filter((san) => san.type === 'dns').map((san) => san.value)\n }\n\n public get sanUriNames() {\n return this.subjectAlternativeNames.filter((ian) => ian.type === 'url').map((ian) => ian.value)\n }\n\n public get ianDnsNames() {\n return this.issuerAlternativeNames.filter((san) => san.type === 'dns').map((san) => san.value)\n }\n\n public get ianUriNames() {\n return this.issuerAlternativeNames.filter((ian) => ian.type === 'url').map((ian) => ian.value)\n }\n\n public get authorityKeyIdentifier() {\n const keyIds = this.getMatchingExtensions<x509.AuthorityKeyIdentifierExtension>(id_ce_authorityKeyIdentifier)?.map(\n (e) => e.keyId\n )\n\n if (keyIds && keyIds.length > 1) {\n throw new X509Error('Multiple Authority Key Identifiers are not allowed')\n }\n\n return keyIds?.[0]\n }\n\n public get subjectKeyIdentifier() {\n const keyIds = this.getMatchingExtensions<x509.SubjectKeyIdentifierExtension>(id_ce_subjectKeyIdentifier)?.map(\n (e) => e.keyId\n )\n\n if (keyIds && keyIds.length > 1) {\n throw new X509Error('Multiple Subject Key Identifiers are not allowed')\n }\n\n return keyIds?.[0]\n }\n\n // biome-ignore lint/suspicious/useGetterReturn: no explanation\n public get keyUsage() {\n const keyUsages = this.getMatchingExtensions<x509.KeyUsagesExtension>(id_ce_keyUsage)?.map((e) => e.usages)\n\n if (keyUsages && keyUsages.length > 1) {\n throw new X509Error('Multiple Key Usages are not allowed')\n }\n\n if (keyUsages) {\n return Object.values(X509KeyUsage)\n .filter((key): key is number => typeof key === 'number')\n .filter((flagValue) => (keyUsages[0] & flagValue) === flagValue)\n .map((flagValue) => flagValue as X509KeyUsage)\n }\n }\n\n public get extendedKeyUsage() {\n const extendedKeyUsages = this.getMatchingExtensions<x509.ExtendedKeyUsageExtension>(id_ce_extKeyUsage)?.map(\n (e) => e.usages\n )\n\n if (extendedKeyUsages && extendedKeyUsages.length > 1) {\n throw new X509Error('Multiple Key Usages are not allowed')\n }\n\n return extendedKeyUsages?.[0] as X509ExtendedKeyUsage | undefined\n }\n\n public isExtensionCritical(id: string): boolean {\n const extension = this.getMatchingExtensions(id)\n if (!extension) {\n throw new X509Error(`extension with id '${id}' is not found`)\n }\n\n return !!extension[0].critical\n }\n\n public static async create(options: X509CreateCertificateOptions, webCrypto: CredoWebCrypto) {\n const subjectPublicKey = options.subjectPublicKey ?? options.authorityKey\n const isSelfSignedCertificate = assymetricPublicJwkMatches(options.authorityKey.toJson(), subjectPublicKey.toJson())\n\n const signingKey = new CredoWebCryptoKey(\n options.authorityKey,\n publicJwkToCryptoKeyAlgorithm(options.authorityKey),\n false,\n 'private',\n ['sign']\n )\n const publicKey = new CredoWebCryptoKey(\n subjectPublicKey,\n publicJwkToCryptoKeyAlgorithm(options.authorityKey),\n true,\n 'public',\n ['verify']\n )\n\n const issuerName = convertName(options.issuer)\n\n const extensions: Array<x509.Extension | undefined> = []\n extensions.push(\n createSubjectKeyIdentifierExtension(options.extensions?.subjectKeyIdentifier, { publicJwk: subjectPublicKey })\n )\n extensions.push(createKeyUsagesExtension(options.extensions?.keyUsage))\n extensions.push(createExtendedKeyUsagesExtension(options.extensions?.extendedKeyUsage))\n extensions.push(\n createAuthorityKeyIdentifierExtension(options.extensions?.authorityKeyIdentifier, {\n publicJwk: options.authorityKey,\n })\n )\n extensions.push(createIssuerAlternativeNameExtension(options.extensions?.issuerAlternativeName))\n extensions.push(createSubjectAlternativeNameExtension(options.extensions?.subjectAlternativeName))\n extensions.push(createBasicConstraintsExtension(options.extensions?.basicConstraints))\n extensions.push(createCrlDistributionPointsExtension(options.extensions?.crlDistributionPoints))\n\n if (isSelfSignedCertificate) {\n if (options.subject) {\n throw new X509Error('Do not provide a subject name when the certificate is supposed to be self signed')\n }\n\n const certificate = await x509.X509CertificateGenerator.createSelfSigned(\n {\n keys: { publicKey, privateKey: signingKey },\n name: issuerName,\n notBefore: options.validity?.notBefore,\n notAfter: options.validity?.notAfter,\n extensions: extensions.filter((e) => e !== undefined),\n serialNumber: options.serialNumber,\n },\n webCrypto\n )\n\n const certificateInstance = X509Certificate.parseCertificate(certificate)\n if (subjectPublicKey.hasKeyId) certificateInstance.publicJwk.keyId = subjectPublicKey.keyId\n return certificateInstance\n }\n\n if (!options.subject) {\n throw new X509Error('Provide a subject name when the certificate is not supposed to be self signed')\n }\n\n const subjectName = convertName(options.subject)\n\n const certificate = await x509.X509CertificateGenerator.create(\n {\n signingKey,\n publicKey,\n issuer: issuerName,\n subject: subjectName,\n notBefore: options.validity?.notBefore,\n notAfter: options.validity?.notAfter,\n extensions: extensions.filter((e) => e !== undefined),\n },\n webCrypto\n )\n\n const certificateInstance = X509Certificate.parseCertificate(certificate)\n if (subjectPublicKey.hasKeyId) certificateInstance.publicJwk.keyId = subjectPublicKey.keyId\n return certificateInstance\n }\n\n public get subject() {\n return this.x509Certificate.subject\n }\n\n public get issuer() {\n return this.x509Certificate.issuer\n }\n\n public async verify(\n {\n verificationDate = new Date(),\n publicJwk,\n skipSignatureVerification = false,\n }: {\n verificationDate: Date\n publicJwk?: PublicJwk\n\n /**\n * Whether to skip the verification of the signature and only perform other checks (such\n * as whether the certificate is not expired).\n *\n * This can be useful when an non-self-signed certificate is directly trusted, and it may\n * not be possible to verify the certifcate as the root/intermediate certificate containing\n * the key of the signer/intermediate is not present.\n *\n * @default false\n */\n skipSignatureVerification?: boolean\n },\n webCrypto: CredoWebCrypto\n ) {\n let publicCryptoKey: CredoWebCryptoKey | undefined\n if (publicJwk) {\n const cryptoKeyAlgorithm = publicJwkToCryptoKeyAlgorithm(publicJwk)\n publicCryptoKey = new CredoWebCryptoKey(publicJwk, cryptoKeyAlgorithm, true, 'public', ['verify'])\n }\n\n // We use the library to validate the signature, but the date is manually verified\n const isSignatureValid = skipSignatureVerification\n ? true\n : await this.x509Certificate.verify({ signatureOnly: true, publicKey: publicCryptoKey }, webCrypto)\n const time = verificationDate.getTime()\n\n const isNotBeforeValid = this.x509Certificate.notBefore.getTime() <= time\n const isNotAfterValid = time <= this.x509Certificate.notAfter.getTime()\n\n if (!isSignatureValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' has an invalid signature`)\n }\n\n if (!isNotBeforeValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' used before it is allowed`)\n }\n\n if (!isNotAfterValid) {\n throw new X509Error(`Certificate: '${this.x509Certificate.subject}' used after it is allowed`)\n }\n }\n\n /**\n * Get the thumprint of the X509 certificate in hex format.\n */\n public async getThumprintInHex(agentContext: AgentContext) {\n const thumbprint = await this.x509Certificate.getThumbprint(new CredoWebCrypto(agentContext))\n const thumbprintHex = TypedArrayEncoder.toHex(new Uint8Array(thumbprint))\n\n return thumbprintHex\n }\n\n /**\n * Get the data elements of the x509 certificate\n */\n public get data() {\n return {\n issuerName: this.x509Certificate.issuerName.toString(),\n issuer: this.x509Certificate.issuer,\n subjectName: this.x509Certificate.subjectName.toString(),\n subject: this.x509Certificate.subject,\n serialNumber: this.x509Certificate.serialNumber,\n pem: this.x509Certificate.toString(),\n notBefore: this.x509Certificate.notBefore,\n notAfter: this.x509Certificate.notAfter,\n }\n }\n\n public getIssuerNameField(field: string) {\n return this.x509Certificate.issuerName.getField(field)\n }\n\n /**\n * @param format the format to export to, defaults to `pem`\n */\n public toString(format?: 'asn' | 'pem' | 'hex' | 'base64' | 'text' | 'base64url') {\n return this.x509Certificate.toString(format ?? 'pem')\n }\n\n public equal(certificate: X509Certificate) {\n const parsedOther = new x509.X509Certificate(certificate.rawCertificate)\n\n return this.x509Certificate.equal(parsedOther)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,IAAY,wDAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGF,IAAY,wEAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AASF,IAAa,kBAAb,MAAa,gBAAgB;CAK3B,AAAQ,YAAY,SAAiC;AACnD,OAAK,YAAY,QAAQ;AACzB,OAAK,aAAa,QAAQ;AAC1B,OAAK,kBAAkB,QAAQ;;CAGjC,IAAW,MAAM,OAAe;AAC9B,OAAK,UAAU,QAAQ;;CAGzB,IAAW,QAAgB;AACzB,SAAO,KAAK,UAAU;;CAGxB,IAAW,WAAoB;AAC7B,SAAO,KAAK,UAAU;;CAGxB,OAAc,mBAAmB,gBAAgD;EAC/E,MAAM,cAAc,IAAI,KAAK,gBAAgB,eAAe;AAC5D,SAAO,gBAAgB,iBAAiB,YAAY;;CAGtD,OAA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AW,CAAC;;;;;CAQ3E,IAAW,OAAO;AAChB,SAAO;GACL,YAAY,KAAK,gBAAgB,WAAW,UAAU;GACtD,QAAQ,KAAK,gBAAgB;GAC7B,aAAa,KAAK,gBAAgB,YAAY,UAAU;GACxD,SAAS,KAAK,gBAAgB;GAC9B,cAAc,KAAK,gBAAgB;GACnC,KAAK,KAAK,gBAAgB,UAAU;GACpC,WAAW,KAAK,gBAAgB;GAChC,UAAU,KAAK,gBAAgB;GAChC;;CAGH,AAAO,mBAAmB,OAAe;AACvC,SAAO,KAAK,gBAAgB,WAAW,SAAS,MAAM;;;;;CAMxD,AAAO,SAAS,QAAkE;AAChF,SAAO,KAAK,gBAAgB,SAAS,UAAU,MAAM;;CAGvD,AAAO,MAAM,aAA8B;EACzC,MAAM,cAAc,IAAI,KAAK,gBAAgB,YAAY,eAAe;AAExE,SAAO,KAAK,gBAAgB,MAAM,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Module.d.mts","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"X509Module.d.mts","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAUa,UAAA,YAAsB;EAAtB,SAAA,GAAA,EAAW,OACH,OADG;EAAA,SAAA,MAAA,EAGE,gBAHF;aACH,CAAA,OAAA,CAAA,EAIU,uBAJV;;;;UADc,CAAA,iBAAA,EAYE,iBAZF,CAAA,EAAA,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Module.d.ts","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"X509Module.d.ts","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAUA;AAAwB,cAAX,UAAA,YAAsB,MAAX,CAAA;WACH,GAAA,EAAA,OAAA,OAAA;WAEK,MAAA,EAAA,gBAAA;aAEK,CAAA,OAAA,CAAA,EAAA,uBAAA;;;;8BAOM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_AgentConfig = require('../../agent/AgentConfig.js');
|
|
4
|
-
const require_X509Service = require('./X509Service.js');
|
|
5
4
|
const require_X509ModuleConfig = require('./X509ModuleConfig.js');
|
|
5
|
+
const require_X509Service = require('./X509Service.js');
|
|
6
6
|
const require_X509Api = require('./X509Api.js');
|
|
7
7
|
|
|
8
8
|
//#region src/modules/x509/X509Module.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import { AgentConfig } from "../../agent/AgentConfig.mjs";
|
|
4
|
-
import { X509Service } from "./X509Service.mjs";
|
|
5
4
|
import { X509ModuleConfig } from "./X509ModuleConfig.mjs";
|
|
5
|
+
import { X509Service } from "./X509Service.mjs";
|
|
6
6
|
import { X509Api } from "./X509Api.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/x509/X509Module.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Module.mjs","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"X509Module.mjs","names":[],"sources":["../../../src/modules/x509/X509Module.ts"],"sourcesContent":["import { AgentConfig } from '../../agent/AgentConfig'\nimport type { DependencyManager, Module } from '../../plugins'\nimport { X509Api } from './X509Api'\nimport type { X509ModuleConfigOptions } from './X509ModuleConfig'\nimport { X509ModuleConfig } from './X509ModuleConfig'\nimport { X509Service } from './X509Service'\n\n/**\n * @public\n */\nexport class X509Module implements Module {\n public readonly api = X509Api\n\n public readonly config: X509ModuleConfig\n\n public constructor(options?: X509ModuleConfigOptions) {\n this.config = new X509ModuleConfig(options)\n }\n\n /**\n * Registers the dependencies of the sd-jwt-vc module on the dependency manager.\n */\n public register(dependencyManager: DependencyManager) {\n // Warn about experimental module\n dependencyManager\n .resolve(AgentConfig)\n .logger.warn(\n \"The 'X509' module is experimental and could have unexpected breaking changes. When using this module, make sure to use strict versions for all @credo-ts packages.\"\n )\n\n // Register config\n dependencyManager.registerInstance(X509ModuleConfig, this.config)\n\n // Services\n dependencyManager.registerSingleton(X509Service)\n }\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAa,aAAb,MAA0C;CAKxC,AAAO,YAAY,SAAmC;OAJtC,MAAM;AAKpB,OAAK,SAAS,IAAI,iBAAiB,QAAQ;;;;;CAM7C,AAAO,SAAS,mBAAsC;AAEpD,oBACG,QAAQ,YAAY,CACpB,OAAO,KACN,qKACD;AAGH,oBAAkB,iBAAiB,kBAAkB,KAAK,OAAO;AAGjE,oBAAkB,kBAAkB,YAAY"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { X509Certificate } from "./X509Certificate.mjs";
|
|
2
|
+
import { SdJwtVc } from "../sd-jwt-vc/SdJwtVcService.mjs";
|
|
1
3
|
import { JwtPayload } from "../../crypto/jose/jwt/JwtPayload.mjs";
|
|
2
4
|
import { W3cJwtVerifiableCredential } from "../vc/jwt-vc/W3cJwtVerifiableCredential.mjs";
|
|
3
5
|
import { W3cJwtVerifiablePresentation } from "../vc/jwt-vc/W3cJwtVerifiablePresentation.mjs";
|
|
4
|
-
import { X509Certificate } from "./X509Certificate.mjs";
|
|
5
6
|
import { Mdoc } from "../mdoc/Mdoc.mjs";
|
|
6
|
-
import { SdJwtVc } from "../sd-jwt-vc/SdJwtVcService.mjs";
|
|
7
7
|
import { AgentContext } from "../../agent/context/AgentContext.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/x509/X509ModuleConfig.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { X509Certificate } from "./X509Certificate.js";
|
|
2
|
+
import { SdJwtVc } from "../sd-jwt-vc/SdJwtVcService.js";
|
|
1
3
|
import { JwtPayload } from "../../crypto/jose/jwt/JwtPayload.js";
|
|
2
4
|
import { W3cJwtVerifiableCredential } from "../vc/jwt-vc/W3cJwtVerifiableCredential.js";
|
|
3
5
|
import { W3cJwtVerifiablePresentation } from "../vc/jwt-vc/W3cJwtVerifiablePresentation.js";
|
|
4
|
-
import { X509Certificate } from "./X509Certificate.js";
|
|
5
6
|
import { Mdoc } from "../mdoc/Mdoc.js";
|
|
6
|
-
import { SdJwtVc } from "../sd-jwt-vc/SdJwtVcService.js";
|
|
7
7
|
import { AgentContext } from "../../agent/context/AgentContext.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/x509/X509ModuleConfig.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X509Certificate } from "./X509Certificate.mjs";
|
|
2
1
|
import { X509CreateCertificateOptions, X509GetLeafCertificateOptions, X509ParseCertificateOptions, X509ValidateCertificateChainOptions } from "./X509ServiceOptions.mjs";
|
|
2
|
+
import { X509Certificate } from "./X509Certificate.mjs";
|
|
3
3
|
import { AgentContext } from "../../agent/context/AgentContext.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/x509/X509Service.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Service.d.mts","names":[],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"X509Service.d.mts","names":[],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":[],"mappings":";;;;;cAea,WAAA;;;;AAFb;;;;;;;;;;;;;;;SA4IM,wBAAA,CAAA,YAAA,EAtHY,YAsHZ,EAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,gBAAA;IAAA;EAAA,CAAA,EAhHC,mCAgHD,CAAA,EAhHoC,OAgHpC,CAhHoC,eAgHpC,EAAA,CAAA;;;;;;SASmG,gBAAA,CAAA,aAAA,EAnBtF,YAmBsF,EAAA;IAAA;EAAA,CAAA,EAlB7E,2BAkB6E,CAAA,EAjBpG,eAiBoG;EAAA,OAAA,kBAAA,CAAA,aAAA,EAVtF,YAUsF,EAAA;IAAA;EAAA,CAAA,EAT/E,6BAS+E,CAAA,EARpG,eAQoG;yCAAnD,uBAAuB,+BAA4B,QAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X509Certificate } from "./X509Certificate.js";
|
|
2
1
|
import { X509CreateCertificateOptions, X509GetLeafCertificateOptions, X509ParseCertificateOptions, X509ValidateCertificateChainOptions } from "./X509ServiceOptions.js";
|
|
2
|
+
import { X509Certificate } from "./X509Certificate.js";
|
|
3
3
|
import { AgentContext } from "../../agent/context/AgentContext.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/x509/X509Service.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Service.d.ts","names":[],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"X509Service.d.ts","names":[],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":[],"mappings":";;;;;cAea,WAAA;;AAFb;;;;;;;;;;;;;;;;;SA6IK,wBAAA,CAAA,YAAA,EAvHa,YAuHb,EAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,gBAAA;IAAA;EAAA,CAAA,EAjHE,mCAiHF,CAAA,EAjHqC,OAiHrC,CAjHqC,eAiHrC,EAAA,CAAA;;;;;;yCAXc;;KACS,8BACvB;2CAOc;;KACO,gCACrB;yCAQiD,uBAAuB,+BAA4B,QAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
-
const require_X509Error = require('./X509Error.js');
|
|
5
4
|
const require_decorate = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
6
5
|
require('../../agent/index.js');
|
|
7
6
|
const require_CredoWebCrypto = require('../../crypto/webcrypto/CredoWebCrypto.js');
|
|
8
7
|
require('../../crypto/webcrypto/index.js');
|
|
8
|
+
const require_X509Error = require('./X509Error.js');
|
|
9
9
|
const require_X509Certificate = require('./X509Certificate.js');
|
|
10
|
-
let __peculiar_x509 = require("@peculiar/x509");
|
|
11
|
-
__peculiar_x509 = require_rolldown_runtime.__toESM(__peculiar_x509);
|
|
12
10
|
let tsyringe = require("tsyringe");
|
|
13
11
|
tsyringe = require_rolldown_runtime.__toESM(tsyringe);
|
|
12
|
+
let __peculiar_x509 = require("@peculiar/x509");
|
|
13
|
+
__peculiar_x509 = require_rolldown_runtime.__toESM(__peculiar_x509);
|
|
14
14
|
|
|
15
15
|
//#region src/modules/x509/X509Service.ts
|
|
16
16
|
let X509Service = class X509Service$1 {
|
|
@@ -45,7 +45,7 @@ let X509Service = class X509Service$1 {
|
|
|
45
45
|
}
|
|
46
46
|
let parsedChain = (await new __peculiar_x509.X509ChainBuilder({ certificates: certificatesToBuildChain }).build(parsedLeafCertificate, webCrypto)).map((c) => require_X509Certificate.X509Certificate.fromRawCertificate(new Uint8Array(c.rawData))).reverse();
|
|
47
47
|
if (parsedChain.length < certificateChain.length) throw new require_X509Error.X509Error("Could not parse the full chain. Likely due to incorrect ordering");
|
|
48
|
-
let previousCertificate
|
|
48
|
+
let previousCertificate;
|
|
49
49
|
if (trustedCertificates) {
|
|
50
50
|
const parsedTrustedCertificates = trustedCertificates.map((trustedCertificate) => require_X509Certificate.X509Certificate.fromEncodedCertificate(trustedCertificate));
|
|
51
51
|
const trustedCertificateIndex = parsedChain.findIndex((cert) => parsedTrustedCertificates.some((tCert) => cert.equal(tCert)));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { X509Error } from "./X509Error.mjs";
|
|
4
3
|
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
5
4
|
import "../../agent/index.mjs";
|
|
6
5
|
import { CredoWebCrypto } from "../../crypto/webcrypto/CredoWebCrypto.mjs";
|
|
7
6
|
import "../../crypto/webcrypto/index.mjs";
|
|
7
|
+
import { X509Error } from "./X509Error.mjs";
|
|
8
8
|
import { X509Certificate } from "./X509Certificate.mjs";
|
|
9
|
-
import * as x509 from "@peculiar/x509";
|
|
10
9
|
import { injectable } from "tsyringe";
|
|
10
|
+
import * as x509 from "@peculiar/x509";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/x509/X509Service.ts
|
|
13
13
|
let X509Service = class X509Service$1 {
|
|
@@ -42,7 +42,7 @@ let X509Service = class X509Service$1 {
|
|
|
42
42
|
}
|
|
43
43
|
let parsedChain = (await new x509.X509ChainBuilder({ certificates: certificatesToBuildChain }).build(parsedLeafCertificate, webCrypto)).map((c) => X509Certificate.fromRawCertificate(new Uint8Array(c.rawData))).reverse();
|
|
44
44
|
if (parsedChain.length < certificateChain.length) throw new X509Error("Could not parse the full chain. Likely due to incorrect ordering");
|
|
45
|
-
let previousCertificate
|
|
45
|
+
let previousCertificate;
|
|
46
46
|
if (trustedCertificates) {
|
|
47
47
|
const parsedTrustedCertificates = trustedCertificates.map((trustedCertificate) => X509Certificate.fromEncodedCertificate(trustedCertificate));
|
|
48
48
|
const trustedCertificateIndex = parsedChain.findIndex((cert) => parsedTrustedCertificates.some((tCert) => cert.equal(tCert)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X509Service.mjs","names":["X509Service","parsedLeafCertificate: x509.X509Certificate","certificatesToBuildChain: x509.X509Certificate[]","previousCertificate: X509Certificate | undefined"],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"X509Service.mjs","names":["X509Service","parsedLeafCertificate: x509.X509Certificate","certificatesToBuildChain: x509.X509Certificate[]","previousCertificate: X509Certificate | undefined"],"sources":["../../../src/modules/x509/X509Service.ts"],"sourcesContent":["import * as x509 from '@peculiar/x509'\nimport { injectable } from 'tsyringe'\nimport { AgentContext } from '../../agent'\nimport { CredoWebCrypto } from '../../crypto/webcrypto'\nimport { X509Certificate } from './X509Certificate'\nimport { X509Error } from './X509Error'\nimport type {\n X509CreateCertificateOptions,\n X509GetLeafCertificateOptions,\n X509ParseCertificateOptions,\n X509ValidateCertificateChainOptions,\n} from './X509ServiceOptions'\n\n@injectable()\n// biome-ignore lint/complexity/noStaticOnlyClass: no explanation\nexport class X509Service {\n /**\n *\n * Validate a chain of X.509 certificates according to RFC 5280\n *\n * This function requires a list of base64 encoded certificates and, optionally, a certificate that should be found in the chain.\n * If no certificate is provided, it will just assume the leaf certificate\n *\n * The leaf certificate should be the 0th index and the root the last\n *\n * The Issuer of the certificate is found with the following algorithm:\n * - Check if there is an AuthorityKeyIdentifierExtension\n * - Go through all the other certificates and see if the SubjectKeyIdentifier is equal to thje AuthorityKeyIdentifier\n * - If they are equal, the certificate is verified and returned as the issuer\n *\n * Additional validation:\n * - Make sure atleast a single certificate is in the chain\n * - Check whether a certificate in the chain matches with a trusted certificate\n */\n public static async validateCertificateChain(\n agentContext: AgentContext,\n {\n certificateChain,\n certificate = certificateChain[0],\n verificationDate = new Date(),\n trustedCertificates,\n }: X509ValidateCertificateChainOptions\n ) {\n if (certificateChain.length === 0) throw new X509Error('Certificate chain is empty')\n const webCrypto = new CredoWebCrypto(agentContext)\n\n let parsedLeafCertificate: x509.X509Certificate\n let certificatesToBuildChain: x509.X509Certificate[]\n try {\n parsedLeafCertificate = new x509.X509Certificate(certificate)\n certificatesToBuildChain = [...certificateChain, ...(trustedCertificates ?? [])].map(\n (c) => new x509.X509Certificate(c)\n )\n } catch (error) {\n throw new X509Error('Error during parsing of x509 certificate', { cause: error })\n }\n\n const certificateChainBuilder = new x509.X509ChainBuilder({\n certificates: certificatesToBuildChain,\n })\n\n const chain = await certificateChainBuilder.build(parsedLeafCertificate, webCrypto)\n\n // The chain is reversed here as the `x5c` header (the expected input),\n // has the leaf certificate as the first entry, while the `x509` library expects this as the last\n let parsedChain = chain.map((c) => X509Certificate.fromRawCertificate(new Uint8Array(c.rawData))).reverse()\n\n // We allow longer parsed chain, in case the root cert was not part of the chain, but in the\n // list of trusted certificates\n if (parsedChain.length < certificateChain.length) {\n throw new X509Error('Could not parse the full chain. Likely due to incorrect ordering')\n }\n\n let previousCertificate: X509Certificate | undefined\n\n if (trustedCertificates) {\n const parsedTrustedCertificates = trustedCertificates.map((trustedCertificate) =>\n X509Certificate.fromEncodedCertificate(trustedCertificate)\n )\n\n const trustedCertificateIndex = parsedChain.findIndex((cert) =>\n parsedTrustedCertificates.some((tCert) => cert.equal(tCert))\n )\n\n if (trustedCertificateIndex === -1) {\n throw new X509Error('No trusted certificate was found while validating the X.509 chain')\n }\n\n if (trustedCertificateIndex > 0) {\n // When we trust a certificate other than the first certificate in the provided chain we keep a reference to the\n // previous certificate as we need the key of this certificate to verify the first certificate in the chain as\n // it's not self-sigend.\n previousCertificate = parsedChain[trustedCertificateIndex - 1]\n\n // Pop everything off before the index of the trusted certificate (those are more root) as it is not relevant for validation\n parsedChain = parsedChain.slice(trustedCertificateIndex)\n }\n }\n\n // Verify the certificate with the publicKey of the certificate above\n for (let i = 0; i < parsedChain.length; i++) {\n const cert = parsedChain[i]\n const publicJwk = previousCertificate ? previousCertificate.publicJwk : undefined\n\n // The only scenario where this will trigger is if the trusted certificates and the x509 chain both do not contain the\n // intermediate/root certificate needed. E.g. for ISO 18013-5 mDL the root cert MUST NOT be in the chain. If the signer\n // certificate is then trusted, it will fail, as we can't verify the signer certifciate without having access to the signer\n // key of the root certificate.\n // See also https://github.com/openid/OpenID4VCI/issues/62\n //\n // In this case we could skip the signature verification (not other verifications), as we already trust the signer certificate,\n // but i think the purpose of ISO 18013-5 mDL is that you trust the root certificate. If we can't verify the whole chain e.g.\n // when we receive a credential we have the chance it will fail later on.\n const skipSignatureVerification = i === 0 && trustedCertificates && !publicJwk\n // NOTE: at some point we might want to change this to throw an error instead of skipping the signature verification of the trusted\n // but it would basically prevent mDOCs from unknown issuers to be verified in the wallet. Verifiers should only trust the root certificate\n // anyway.\n // if (i === 0 && trustedCertificates && cert.issuer !== cert.subject && !publicKey) {\n // throw new X509Error(\n // 'Unable to verify the certificate chain. A non-self-signed certificate is the first certificate in the chain, and no parent certificate was found in the trusted certificates, meaning the first certificate in the chain cannot be verified. Ensure the certificate is added '\n // )\n // }\n\n await cert.verify(\n {\n publicJwk,\n verificationDate,\n skipSignatureVerification,\n },\n webCrypto\n )\n previousCertificate = cert\n }\n\n return parsedChain\n }\n\n /**\n *\n * Parses a base64-encoded X.509 certificate into a {@link X509Certificate}\n *\n */\n public static parseCertificate(\n _agentContext: AgentContext,\n { encodedCertificate }: X509ParseCertificateOptions\n ): X509Certificate {\n const certificate = X509Certificate.fromEncodedCertificate(encodedCertificate)\n\n return certificate\n }\n\n public static getLeafCertificate(\n _agentContext: AgentContext,\n { certificateChain }: X509GetLeafCertificateOptions\n ): X509Certificate {\n if (certificateChain.length === 0) throw new X509Error('Certificate chain is empty')\n\n const certificate = X509Certificate.fromEncodedCertificate(certificateChain[0])\n\n return certificate\n }\n\n public static async createCertificate(agentContext: AgentContext, options: X509CreateCertificateOptions) {\n const webCrypto = new CredoWebCrypto(agentContext)\n\n const certificate = await X509Certificate.create(options, webCrypto)\n\n return certificate\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeO,wBAAMA,cAAY;;;;;;;;;;;;;;;;;;;CAmBvB,aAAoB,yBAClB,cACA,EACE,kBACA,cAAc,iBAAiB,IAC/B,mCAAmB,IAAI,MAAM,EAC7B,uBAEF;AACA,MAAI,iBAAiB,WAAW,EAAG,OAAM,IAAI,UAAU,6BAA6B;EACpF,MAAM,YAAY,IAAI,eAAe,aAAa;EAElD,IAAIC;EACJ,IAAIC;AACJ,MAAI;AACF,2BAAwB,IAAI,KAAK,gBAAgB,YAAY;AAC7D,8BAA2B,CAAC,GAAG,kBAAkB,GAAI,uBAAuB,EAAE,CAAE,CAAC,KAC9E,MAAM,IAAI,KAAK,gBAAgB,EAAE,CACnC;WACM,OAAO;AACd,SAAM,IAAI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UAAU;;;0BAxJvE,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Jwt } from "../../crypto/jose/jwt/Jwt.mjs";
|
|
2
1
|
import { X509Certificate } from "./X509Certificate.mjs";
|
|
2
|
+
import { Jwt } from "../../crypto/jose/jwt/Jwt.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/x509/extraction.d.ts
|
|
5
5
|
declare function extractX509CertificatesFromJwt(jwt: Jwt): X509Certificate[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Jwt } from "../../crypto/jose/jwt/Jwt.js";
|
|
2
1
|
import { X509Certificate } from "./X509Certificate.js";
|
|
2
|
+
import { Jwt } from "../../crypto/jose/jwt/Jwt.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/x509/extraction.d.ts
|
|
5
5
|
declare function extractX509CertificatesFromJwt(jwt: Jwt): X509Certificate[] | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
const require_extensions = require('./utils/extensions.js');
|
|
3
4
|
const require_X509Error = require('./X509Error.js');
|
|
4
5
|
const require_nameConversion = require('./utils/nameConversion.js');
|
|
5
|
-
const require_extensions = require('./utils/extensions.js');
|
|
6
6
|
require('./utils/index.js');
|
|
7
7
|
const require_X509Certificate = require('./X509Certificate.js');
|
|
8
|
-
const
|
|
8
|
+
const require_extraction = require('./extraction.js');
|
|
9
9
|
const require_X509ModuleConfig = require('./X509ModuleConfig.js');
|
|
10
|
+
const require_X509Service = require('./X509Service.js');
|
|
10
11
|
const require_X509Api = require('./X509Api.js');
|
|
11
12
|
const require_X509Module = require('./X509Module.js');
|
|
12
13
|
require('./X509ServiceOptions.js');
|
|
13
|
-
const require_extraction = require('./extraction.js');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
import { createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createKeyUsagesExtension, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension } from "./utils/extensions.mjs";
|
|
3
4
|
import { X509Error } from "./X509Error.mjs";
|
|
4
5
|
import { convertName } from "./utils/nameConversion.mjs";
|
|
5
|
-
import { createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createKeyUsagesExtension, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension } from "./utils/extensions.mjs";
|
|
6
6
|
import "./utils/index.mjs";
|
|
7
7
|
import { X509Certificate, X509ExtendedKeyUsage, X509KeyUsage } from "./X509Certificate.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { extractX509CertificatesFromJwt } from "./extraction.mjs";
|
|
9
9
|
import { X509ModuleConfig } from "./X509ModuleConfig.mjs";
|
|
10
|
+
import { X509Service } from "./X509Service.mjs";
|
|
10
11
|
import { X509Api } from "./X509Api.mjs";
|
|
11
12
|
import { X509Module } from "./X509Module.mjs";
|
|
12
13
|
import "./X509ServiceOptions.mjs";
|
|
13
|
-
import { extractX509CertificatesFromJwt } from "./extraction.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":[],"mappings":";;;;;cAgBa,+CACF;aACuB;MAAW;cAUhC,oCAAqC,iDAA4C;AAZjF,cAoBA,gCAVZ,EAAA,CAAA,OAAA,EAUyD,gCAVzD,CAAA,kBAAA,CAAA,EAAA,GAU6G,yBAV7G,GAAA,SAAA;AAAA,cAgBY,qCAhBZ,EAAA,CAAA,OAAA,EAiBU,gCAjBV,CAAA,wBAAA,CAAA,EAAA,iBAAA,EAAA;WATU,EA2BuB,SA3BvB;MA2BkC,+BA1BX,GAAA,SAAA;AAAW,cAoChC,oCApCgC,EAAA,CAAA,OAAA,EAqClC,gCArCkC,CAAA,uBAAA,CAAA,EAAA,GAqCuB,8BArCvB,GAAA,SAAA;AAAA,cA4ChC,qCA5CgC,EAAA,CAAA,OAAA,EA6ClC,gCA7CkC,CAAA,wBAAA,CAAA,EAAA,GA6CwB,+BA7CxB,GAAA,SAAA;AAUhC,cA0CA,+BApCZ,EAAA,CAAA,OAAA,EAoCwD,gCApCxD,CAAA,kBAAA,CAAA,EAAA,GAoC4G,yBApC5G,GAAA,SAAA;AAAA,cA0CY,oCA1CZ,EAAA,CAAA,OAAA,EA2CU,gCA3CV,CAAA,uBAAA,CAAA,EAAA,GA2CmE,8BA3CnE,GAAA,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":[],"mappings":";;;;;cAgBa,+CACF;aACuB;AAFlC,CAAA,EAAA,GAE6C,6BAFhC,GAAA,SAUZ;AAAA,cAEY,wBAFZ,EAAA,CAAA,OAAA,EAEiD,gCAFjD,CAAA,UAAA,CAAA,EAAA,GAE6F,kBAF7F,GAAA,SAAA;AATU,cAmBE,gCAnBF,EAAA,CAAA,OAAA,EAmB+C,gCAnB/C,CAAA,kBAAA,CAAA,EAAA,GAmBmG,yBAnBnG,GAAA,SAAA;AACuB,cAwBrB,qCAxBqB,EAAA,CAAA,OAAA,EAyBvB,gCAzBuB,CAAA,wBAAA,CAAA,EAAA,iBAAA,EAAA;WAAW,EA0BX,SA1BW;CAAA,EAAA,GA0BA,+BA1BA,GAAA,SAAA;AAUhC,cA0BA,oCApBZ,EAAA,CAAA,OAAA,EAqBU,gCArBV,CAAA,uBAAA,CAAA,EAAA,GAqBmE,8BArBnE,GAAA,SAAA;AAAA,cA4BY,qCA5BZ,EAAA,CAAA,OAAA,EA6BU,gCA7BV,CAAA,wBAAA,CAAA,EAAA,GA6BoE,+BA7BpE,GAAA,SAAA;AANiD,cA0CrC,+BA1CqC,EAAA,CAAA,OAAA,EA0CO,gCA1CP,CAAA,kBAAA,CAAA,EAAA,GA0C2D,yBA1C3D,GAAA,SAAA;AAA4C,cAgDjF,oCAhDiF,EAAA,CAAA,OAAA,EAiDnF,gCAjDmF,CAAA,uBAAA,CAAA,EAAA,GAiD1B,8BAjD0B,GAAA,SAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
|
|
4
|
-
const require_Hasher = require('../../../crypto/hashes/Hasher.js');
|
|
5
4
|
const require_TypedArrayEncoder = require('../../../utils/TypedArrayEncoder.js');
|
|
5
|
+
const require_Hasher = require('../../../crypto/hashes/Hasher.js');
|
|
6
6
|
require('../../../utils/index.js');
|
|
7
7
|
require('../../kms/index.js');
|
|
8
8
|
const require_keyAlgorithmConversion = require('../../../crypto/webcrypto/utils/keyAlgorithmConversion.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { Hasher } from "../../../crypto/hashes/Hasher.mjs";
|
|
4
3
|
import { TypedArrayEncoder } from "../../../utils/TypedArrayEncoder.mjs";
|
|
4
|
+
import { Hasher } from "../../../crypto/hashes/Hasher.mjs";
|
|
5
5
|
import "../../../utils/index.mjs";
|
|
6
6
|
import "../../kms/index.mjs";
|
|
7
7
|
import { publicJwkToSpki } from "../../../crypto/webcrypto/utils/keyAlgorithmConversion.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/modules/x509/utils/extensions.ts"],"sourcesContent":["import {\n AuthorityKeyIdentifierExtension,\n BasicConstraintsExtension,\n CRLDistributionPointsExtension,\n ExtendedKeyUsageExtension,\n IssuerAlternativeNameExtension,\n KeyUsagesExtension,\n SubjectAlternativeNameExtension,\n SubjectKeyIdentifierExtension,\n} from '@peculiar/x509'\nimport { Hasher } from '../../../crypto/hashes/Hasher'\nimport { publicJwkToSpki } from '../../../crypto/webcrypto/utils'\nimport { TypedArrayEncoder } from '../../../utils'\nimport { PublicJwk } from '../../kms'\nimport type { X509CertificateExtensionsOptions } from '../X509ServiceOptions'\n\nexport const createSubjectKeyIdentifierExtension = (\n options: X509CertificateExtensionsOptions['subjectKeyIdentifier'],\n additionalOptions: { publicJwk: PublicJwk }\n) => {\n if (!options || !options.include) return\n\n const spki = publicJwkToSpki(additionalOptions.publicJwk)\n const hash = Hasher.hash(new Uint8Array(spki.subjectPublicKey), 'SHA-1')\n\n return new SubjectKeyIdentifierExtension(TypedArrayEncoder.toHex(hash))\n}\n\nexport const createKeyUsagesExtension = (options: X509CertificateExtensionsOptions['keyUsage']) => {\n if (!options) return\n\n const flags = options.usages.reduce((prev, curr) => prev | curr, 0)\n\n return new KeyUsagesExtension(flags, options.markAsCritical)\n}\n\nexport const createExtendedKeyUsagesExtension = (options: X509CertificateExtensionsOptions['extendedKeyUsage']) => {\n if (!options) return\n\n return new ExtendedKeyUsageExtension(options.usages, options.markAsCritical)\n}\n\nexport const createAuthorityKeyIdentifierExtension = (\n options: X509CertificateExtensionsOptions['authorityKeyIdentifier'],\n additionalOptions: { publicJwk: PublicJwk }\n) => {\n if (!options) return\n\n const spki = publicJwkToSpki(additionalOptions.publicJwk)\n const hash = Hasher.hash(new Uint8Array(spki.subjectPublicKey), 'SHA-1')\n\n return new AuthorityKeyIdentifierExtension(TypedArrayEncoder.toHex(hash), options.markAsCritical)\n}\n\nexport const createIssuerAlternativeNameExtension = (\n options: X509CertificateExtensionsOptions['issuerAlternativeName']\n) => {\n if (!options) return\n\n return new IssuerAlternativeNameExtension(options.name, options.markAsCritical)\n}\n\nexport const createSubjectAlternativeNameExtension = (\n options: X509CertificateExtensionsOptions['subjectAlternativeName']\n) => {\n if (!options) return\n\n return new SubjectAlternativeNameExtension(options.name, options.markAsCritical)\n}\n\nexport const createBasicConstraintsExtension = (options: X509CertificateExtensionsOptions['basicConstraints']) => {\n if (!options) return\n\n return new BasicConstraintsExtension(options.ca, options.pathLenConstraint, options.markAsCritical)\n}\n\nexport const createCrlDistributionPointsExtension = (\n options: X509CertificateExtensionsOptions['crlDistributionPoints']\n) => {\n if (!options) return\n\n return new CRLDistributionPointsExtension(options.urls, options.markAsCritical)\n}\n"],"mappings":";;;;;;;;;;;AAgBA,MAAa,uCACX,SACA,sBACG;AACH,KAAI,CAAC,WAAW,CAAC,QAAQ,QAAS;CAElC,MAAM,OAAO,gBAAgB,kBAAkB,UAAU;CACzD,MAAM,OAAO,OAAO,KAAK,IAAI,WAAW,KAAK,iBAAiB,EAAE,QAAQ;AAExE,QAAO,IAAI,8BAA8B,kBAAkB,MAAM,KAAK,CAAC;;AAGzE,MAAa,4BAA4B,YAA0D;AACjG,KAAI,CAAC,QAAS;AAId,QAAO,IAAI,mBAFG,QAAQ,OAAO,QAAQ,MAAM,SAAS,OAAO,MAAM,EAAE,EAE9B,QAAQ,eAAe;;AAG9D,MAAa,oCAAoC,YAAkE;AACjH,KAAI,CAAC,QAAS;AAEd,QAAO,IAAI,0BAA0B,QAAQ,QAAQ,QAAQ,eAAe;;AAG9E,MAAa,yCACX,SACA,sBACG;AACH,KAAI,CAAC,QAAS;CAEd,MAAM,OAAO,gBAAgB,kBAAkB,UAAU;CACzD,MAAM,OAAO,OAAO,KAAK,IAAI,WAAW,KAAK,iBAAiB,EAAE,QAAQ;AAExE,QAAO,IAAI,gCAAgC,kBAAkB,MAAM,KAAK,EAAE,QAAQ,eAAe;;AAGnG,MAAa,wCACX,YACG;AACH,KAAI,CAAC,QAAS;AAEd,QAAO,IAAI,+BAA+B,QAAQ,MAAM,QAAQ,eAAe;;AAGjF,MAAa,yCACX,YACG;AACH,KAAI,CAAC,QAAS;AAEd,QAAO,IAAI,gCAAgC,QAAQ,MAAM,QAAQ,eAAe;;AAGlF,MAAa,mCAAmC,YAAkE;AAChH,KAAI,CAAC,QAAS;AAEd,QAAO,IAAI,0BAA0B,QAAQ,IAAI,QAAQ,mBAAmB,QAAQ,eAAe;;AAGrG,MAAa,wCACX,YACG;AACH,KAAI,CAAC,QAAS;AAEd,QAAO,IAAI,+BAA+B,QAAQ,MAAM,QAAQ,eAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { convertName } from "./nameConversion.mjs";
|
|
4
3
|
import { createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createKeyUsagesExtension, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension } from "./extensions.mjs";
|
|
4
|
+
import { convertName } from "./nameConversion.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nameConversion.d.mts","names":[],"sources":["../../../../src/modules/x509/utils/nameConversion.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"nameConversion.d.mts","names":[],"sources":["../../../../src/modules/x509/utils/nameConversion.ts"],"sourcesContent":[],"mappings":";;;cAGa,6BAA8B"}
|